]> git.saurik.com Git - bison.git/blob - ChangeLog
085a57baded8dbcc0665768a03675388fecf19fa
[bison.git] / ChangeLog
1 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 maint: update for changes to gnulib's announce-gen.
4 * HACKING (Announce): RELEASE_TYPE=major must now be written
5 RELEASE_TYPE=stable.
6
7 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
8
9 Version 2.4.2.
10 * NEWS (2.4.2): Set version and date. For the recent test suite
11 portability fixes, don't be so optimistic about their success
12 given the lack of feedback on the affected platforms.
13
14 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
15
16 tests: fix maintainer-xml-check for recent changes.
17 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
18 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
19 output file whose name conflicts with a previous output file
20 is now never generated.
21
22 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
23
24 portability: fix several issues with M4 subprocess.
25
26 M4's output pipe was not being drained upon fatal errors during
27 scan_skel. As a result, broken-pipe messages from M4 were seen
28 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
29 failure in the test suite. The problem was that, on platforms
30 where the default disposition for SIGPIPE is ignore instead of
31 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
32 then reported it. However, there's some sort of race condition,
33 because the new test group occasionally succeeded.
34 Reported by Albert Chin at
35 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
36
37 There were also problems with the test suite livelocking on
38 Tru64 5.1b. Reported by Didier Godefroy at
39 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
40 Switching to create_pipe_bidi suggested by Akim Demaille.
41
42 To attempt to solve both of these problems, switch to gnulib's
43 create_pipe_bidi and register M4 process as a slave. Along the
44 way, clean up file name conflict handling, which was affected by
45 the broken-pipe problem before the switch.
46 * NEWS (2.4.2): Document.
47 * THANKS (Didier Godefroy): Add.
48 * bootstrap.conf (gnulib_modules): Add pipe.
49 * gnulib: Update to latest to make sure we have all the latest
50 fixes.
51 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
52 subpipe.c.
53 * po/POTFILES.in (lib/subpipe.c): Remove.
54 * src/files.c (compute_output_file_names): Update invocations
55 of output_file_name_check.
56 (output_file_name_check): In the case that the grammar file
57 would be overwritten, use complain instead of fatal, but replace
58 the output file name with /dev/null. Use the /dev/null solution
59 for the case of two conflicting output files as well because it
60 seems safer in case Bison one day tries to open both files at
61 the same time.
62 * src/files.h (output_file_name_check): Update prototype.
63 * src/output.c (output_skeleton): Use create_pipe_bidi and
64 wait_subprocess. Assert that scan_skel completely drains the
65 pipe.
66 * src/scan-skel.l (at_directive_perform): Update
67 output_file_name_check invocation.
68 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
69 grammar file actually isn't overwritten.
70 (Conflicting output files: -o foo.y): Update expected output.
71 * tests/skeletons.at (Fatal errors but M4 continues producing
72 output): New test group.
73
74 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
75
76 Update POTFILES.
77 * HACKING (Release Procedure): Add reminder about keeping
78 POTFILES files up-to-date.
79 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
80
81 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
82
83 Code cleanup.
84 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
85 which is already defined in atconfig.
86
87 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
88
89 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
90
91 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
92
93 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
94 * HACKING (Release Procedure): Update notes on copyright years.
95 * Makefile.am (update-package-copyright-year): New target rule.
96 * build-aux/update-package-copyright-year: New file.
97 * cfg.mk (update-copyright): Add update-package-copyright-year
98 as a dependency.
99
100 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
101
102 * bootstrap: Import improvements from latest gnulib.
103
104 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
105
106 build: require Automake 1.11.1 to avoid a security flaw.
107 * HACKING (Release Procedure): Don't document Automake security
108 flaw here.
109 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
110 why here.
111
112 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
113
114 gnulib: update to latest.
115
116 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
117
118 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
119
120 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
121
122 Thank the developer of the initial push parser implementation.
123 This unfortunate oversight is several years old.
124 * THANKS (Odd Arild Olsen): Add.
125
126 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
127
128 Fix some comments concerning LR(0) versus LALR(1).
129
130 Stop equating LR(0) with nondeterminism and LALR(1) with
131 determinism. That is, if all states are consistent, then LR(0)
132 tables are deterministic. On the other hand, LALR(1) tables
133 might be nondeterministic before conflict resolution, and GLR
134 permits LALR(1) tables to remain nondeterministic.
135 * src/LR0.c, src/LR0.h: Here.
136 * src/lalr.c, src/lalr.h: Here.
137 * src/main.c (main): Here.
138 * src/state.c, src/state.h: Here.
139
140 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
141 parser tables.
142
143 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
144
145 maint: run "make update-copyright"
146
147 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
148
149 POSIX: complain if %prec's token was not defined.
150 * NEWS (2.5): Document.
151 * src/reader.c (grammar_rule_check): Convert warning to
152 complaint.
153 * tests/input.at (%prec's token must be defined): Update.
154
155 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
156
157 POSIX: warn if %prec's token was not defined.
158 Reported by Florian Krohm at
159 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
160 * NEWS (2.4.2): Document.
161 * src/reader.c (grammar_rule_check): Implement.
162 (grammar_current_rule_prec_set): Add comments explaining that we
163 here assume a %prec identifier is a token, but we still manage
164 to support POSIX.
165 * tests/input.at (%prec's token must be defined): New test
166 group.
167
168 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
169
170 * HACKING (Release Procedure): Recommend a secure automake.
171
172 2008-12-11 Akim Demaille <demaille@gostai.com>
173
174 Propagate i18n changes into glr.c.
175 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
176 building the error message format dynamically.
177 * data/lalr1.java: Formatting changes.
178
179 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
180
181 Port small part of master's 11707b2b so future ports are easier.
182 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
183
184 2008-12-11 Akim Demaille <demaille@gostai.com>
185
186 Simplify the i18n of the error messages.
187 * data/lalr1.cc: Comment changes.
188
189 2008-11-11 Akim Demaille <demaille@gostai.com>
190
191 Prefer M4 to CPP.
192 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
193 YYERROR_VERBOSE.
194
195 2008-11-11 Akim Demaille <demaille@gostai.com>
196
197 Support i18n of the parse error messages.
198 * TODO (lalr1.cc/I18n): Remove.
199 * data/lalr1.cc (yysyntax_error_): Support the translation of the
200 error messages, as done in yacc.c.
201 Stay within the yy* pseudo namespace.
202
203 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
204
205 Port small part of master's 8901f32e so future ports are easier.
206 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
207 argument, but name it in the function definition only when
208 verbose error messages are enabled and it'll thus be used.
209 (yy::parser::parse): Update use of yysyntax_error_.
210
211 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
212
213 portability: `<' and `>' are not always defined on addresses.
214 Specifically, don't sort objects by their memory addresses when
215 they're not allocated in the same array or other object. Though
216 I haven't found a test case where that fails on my platform, C
217 says the behavior is undefined.
218 * src/AnnotationList.c (AnnotationList__insertInto): Remove
219 FIXME. Use new id field of InadequacyList nodes rather than
220 their memory addresses when sorting.
221 (AnnotationList__compute_from_inadequacies): Add
222 inadequacy_list_node_count argument to pass to
223 InadequacyList__new_conflict.
224 * src/AnnotationList.h
225 (AnnotationList__compute_from_inadequacies): Update prototype
226 and documentation for new argument.
227 * src/InadequacyList.c (InadequacyList__new_conflict): Add
228 node_count argument and use it to assign a unique ID.
229 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
230 (InadequacyList): Add id field.
231 (InadequacyList__new_conflict): Update prototype and
232 documentation for new argument.
233 * src/ielr.c (ielr_compute_annotation_lists): Update
234 AnnotationList__compute_from_inadequacies invocation.
235
236 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
237
238 Fix handling of yychar manipulation in user semantic actions.
239 The problem was that yacc.c didn't always update the yychar
240 translation afterwards. However, other skeletons appear to be
241 fine. glr.c appears to already translate yychar before every
242 use. lalr1.cc does not define yychar and does not document its
243 replacement, yyla, for users. It does provide yyclearin, but
244 that does not manipulate yyla and thus requires no translation
245 update. In lalr1.java, yychar is out of scope during semantic
246 actions.
247 * NEWS (2.5): Document.
248 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
249 yytoken here.
250 (yyparse, yypush_parse): Instead, translate before every use of
251 yytoken, and add comments explaining this approach.
252 * tests/actions.at (Destroying lookahead assigned by semantic
253 action): New test group checking that translation happens before
254 lookahead destructor calls at parser return. Previously,
255 incorrect destructors were called.
256 * tests/conflicts.at (%error-verbose and consistent
257 errors): New test group checking that translation happens at
258 syntax error detection before the associated verbose error
259 message and the associated lookahead destructor calls. While
260 the destructor call is fixed by this patch, the verbose error
261 message is currently incorrect due to another bug (see
262 comments in test group), so this is an expected failure for now.
263
264 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
265
266 YYFAIL: warn about uses and remove from lalr1.java.
267 * NEWS (2.5): Document.
268 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
269 and make it private. Update all uses.
270 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
271
272 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
273
274 YYFAIL: deprecate.
275 * NEWS (2.4.2): Document deprecation and the phase-out plan.
276 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
277 deprecation.
278 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
279 YYFAIL from GCC cpp's -Wunused-macros.
280 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
281 documentation.
282 (LocalWords): Remove YYFAIL.
283
284 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
285
286 Code cleanup.
287 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
288 function, which is no longer used.
289
290 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
291
292 Add gcc's -Wundef to test suite and fix another warning from it.
293 * NEWS (2.4.2): Update description of -Wundef fix.
294 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
295 (WARN_CFLAGS_TEST): New substitution.
296 * data/glr.c: Avoid warning about __STRICT_ANSI__.
297 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
298 WARN_CFLAGS.
299 (NO_WERROR_CFLAGS): Likewise.
300 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
301
302 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
303
304 * data/yacc.c: Reformat m4 a little.
305
306 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
307
308 Document gcc -Wundef fix.
309 * NEWS (2.4.2): Here.
310 * THANKS (Jonathan Nieder): Add.
311
312 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
313
314 Simplify y.tab.c when location tracking is disabled.
315 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
316 tracking is not enabled. Instead, unconditionally define
317 YY_LOCATION_PRINT as a no-op for backward compatibility.
318
319 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
320
321 Avoid warnings from gcc -Wundef y.tab.c.
322 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
323 defined before using them.
324 * data/lalr1.cc: Likewise.
325 * data/yacc.c: Likewise.
326
327 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
328
329 autoconf: update to latest for fix of M4 detection.
330 Reported by Eric Blake.
331 * submodules/autoconf: Update.
332
333 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
334
335 portability: use -DGNULIB_POSIXCHECK.
336 Reported by Eric Blake. See discussions at
337 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
338 and
339 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
340 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
341 * bootstrap.conf (gnulib_modules): Add all the printf modules
342 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
343 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
344 (excluded_files): Remove m4/printf-posix.m4.
345 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
346 lib/libbison.a so gnulib libraries can be linked.
347
348 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
349
350 Enable assertion output and --disable-assert for configure.
351 * bootstrap.conf (gnulib_modules): Add assert module.
352 * src/system.h (aver): Define as assert, and summarize the
353 discussion on this issue.
354
355 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
356
357 Expand GLR acronym in summary of Bison.
358 Based on discussion with Akim Demaille starting at
359 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
360 * doc/bison.texinfo (Introduction): Here.
361 * src/getargs.c (usage): Here.
362
363 2009-10-03 Alex Rozenman <rozenman@gmail.com>
364
365 Document named references.
366 * doc/bison.texinfo (Actions): Add new example and xref to
367 Using Named References node.
368 (Using Named References): New node.
369
370 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
371
372 cleanup.
373 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
374 of char*.
375 (Sbitset__isEmpty): Use Sbitset instead of char*.
376 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
377 instead of char. This helps to avoid casting errors.
378 (Sbitset__or): Use Sbitset instead of char*.
379
380 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
381
382 portability: don't assume 8-bit bytes.
383 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
384 * src/Sbitset.h (Sbitset__nbytes): Here.
385 (Sbitset__byteAddress): Here.
386 (Sbitset__bit_mask): Here.
387 (Sbitset__last_byte_mask): Here.
388 (Sbitset__ones): Here.
389 (SBITSET__FOR_EACH): Here.
390
391 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
392
393 portability: use va_start and va_end in the same function.
394 * src/complain.c (error_message): Move va_end from here...
395 (ERROR_MESSAGE): ... to here.
396
397 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
398
399 * data/bison.m4: Update comments for rename to muscle-tab.h.
400
401 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
402
403 Rename muscle_tab.* to muscle-tab.* for consistency with master.
404 * src/Makefile.am (bison_SOURCES): Update.
405 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
406 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
407 src/tables.c: Update include.
408 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
409 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
410 include.
411
412 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
413
414 Minor code cleanup.
415 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
416 replace all uses with UNIQSTR_CONCAT.
417 * src/uniqstr.c (uniqstr_vsprintf): New function.
418 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
419 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
420 macros.
421
422 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
423
424 Minor code cleanup.
425 * src/parse-gram.y: Clean up sorting of declarations.
426 Use types to simplify %printer declarations where possible.
427 Provide %printer for BRACKETED_ID and symbol.prec.
428 * src/symtab.c: Whitespace change.
429
430 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
431
432 tests: skip tests of file names that platform does not support.
433 Reported by Michael Raskin at
434 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
435 * THANKS (Michael Raskin): Add.
436 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
437 to fail at least for file names containing ":" or "\".
438
439 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
440
441 yysyntax_error: avoid duplicate lookahead collection.
442 Except when memory reallocation is required, this change
443 eliminates the need to invoke yysyntax_error twice and thus to
444 repeat the collection of lookaheads. It also prepares for
445 future extensions that will make those repetitions more
446 expensive and that will require additional memory management in
447 yysyntax_error. Finally, it fixes an obscure bug already
448 exercised in the test suite.
449 * data/yacc.c (yysyntax_error): Add arguments for message
450 buffer variables stored in the parser. Instead of size, return
451 status similar to yyparse status but indicating success of
452 message creation. Other than the actual reallocation of the
453 message buffer, import and clean up memory management code
454 from...
455 (yyparse, yypush_parse): ... here.
456 * tests/regression.at (%error-verbose overflow): No longer an
457 expected failure.
458
459 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
460
461 yysyntax_error: test memory management more.
462 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
463 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
464 New test group.
465 (%error-verbose overflow): New test group that reveals an
466 obscure bug. Expected fail for now.
467
468 2008-12-11 Akim Demaille <demaille@gostai.com>
469
470 Pass the token type to yysyntax_error.
471 * data/yacc.c (yysyntax_error): Take the transated token instead
472 of the raw number.
473 Adjust callers.
474
475 2008-12-11 Akim Demaille <demaille@gostai.com>
476
477 Simplify the i18n of the error messages.
478 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
479 of building dynamically the format string.
480
481 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
482
483 Remove dead code.
484 * src/symtab.c (symbol_pack): Here because every symbol's number
485 is always defined by this time.
486
487 2009-10-03 Alex Rozenman <rozenman@gmail.com>
488
489 Add additional space after periods in NEWS.
490 * NEWS (2.5): here.
491
492 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
493
494 Use the correct conversion specifier for size_t.
495 Reported by Jim Meyering.
496 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
497 because Sbitset__Index is size_t.
498 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
499
500 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
501
502 tests: don't abuse AT_BISON_CHECK.
503 * tests/regression.at (parse-gram.y: LALR = IELR): Move
504 additional shell commands outside of AT_BISON_CHECK.
505
506 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
507
508 tests: check that parse-gram.y's IELR and LALR are identical.
509 * tests/atlocal.in (abs_top_srcdir): New shell variable.
510 * tests/regression.at (parse-gram.y: LALR = IELR): New test
511 group.
512
513 2009-09-16 Akim Demaille <demaille@gostai.com>
514
515 doc: comment changes.
516 * doc/bison.texinfo: Comment changes.
517
518 2009-09-16 Akim Demaille <demaille@gostai.com>
519
520 doc: spell checking.
521 * doc/bison.texinfo: here.
522
523 2009-09-19 Alex Rozenman <rozenman@gmail.com>
524
525 Keep sub-messages aligned. Fix strings for translation.
526 * src/location.h (location_print): Add return value.
527 * src/location.c (location_print): Return number of printed
528 characters.
529 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
530 new functions.
531 * src/complain.cpp (indent_ptr): New static variable.
532 (error_message, complain_at_indent, warn_at_indent): Implement
533 the alignment mechanism.
534 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
535 for translations. Use new alignment mechanism.
536 * tests/named-ref.at: Adjust test-cases.
537 * NEWS (2.5): Add an announcement about named references.
538
539 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
540
541 tests: clean up push.at test group titles.
542 * tests/push.at: Remove "Push Parsing: " from test group titles
543 because these are already under the banner "Push Parsing Tests".
544
545 2009-09-12 Alex Rozenman <rozenman@gmail.com>
546
547 Provide an additional sub-message for clarity.
548 Add "symbol not found in production" error message when
549 an "invalid reference" is detected in named references
550 resolution.
551 * src/scan-code.l: Update "invalid reference" case.
552 * tests/named-ref.at: Adjust test-cases.
553
554 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
555
556 Clean up yacc.c a little.
557 * data/yacc.c: Clean up M4 for readability, and make output
558 whitespace more consistent. For the main parse function
559 comment, instead of saying "yyparse or yypush_parse", say either
560 "yyparse" or "yypush_parse" depending on which it actually is.
561
562 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
563
564 Complain about unused %define variables and %code qualifiers.
565 * NEWS (2.5): Document.
566 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
567 * doc/bison.texinfo (Decl Summary): Document complaint, and
568 improve %define documentation a little otherwise.
569 * tests/input.at (Reject unused %code qualifiers): Update.
570 (%define errors): Update.
571 (%define, --define, --force-define): Update.
572 (%define backward compatibility): Update.
573 (Unused %define api.pure): Update.
574 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
575
576 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
577
578 Use aver not assert.
579 * src/output.c: Don't include assert.h.
580 (output_skeleton): Use aver not assert.
581 * src/system.h (aver): In documentation of why, add links to
582 Paul Eggert's explanations in the mailing lists.
583
584 2009-09-05 Alex Rozenman <rozenman@gmail.com>
585
586 Use "Unresolved reference" error message when no symbols were found
587 in a symbolic reference resolution. Remove .expr and -expr from
588 the shown reference when the reference is unresolved.
589 * src/scan-code.l: Change the error message, adjust location columns,
590 rename variable "exact_mode" to "explicit_bracketing".
591 * tests/named-ref.at: Adjust existing tests and add a new one.
592
593 2009-09-03 Akim Demaille <demaille@gostai.com>
594
595 * NEWS (2.4.2): Add "Internationalization" item.
596
597 2009-09-03 Akim Demaille <demaille@gostai.com>
598
599 bootstrap: fix/improve find_tool.
600 * bootstrap (find_tool): Improve error messages.
601 Fix typo about find_tool_names.
602
603 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
604
605 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
606 See
607 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
608 * src/scan-code.h (code_props_rule_action_init): Rename
609 named_ref arg to name so it doesn't shadow named_ref type. This
610 makes it consistent with the function definition in scan-code.l
611 anyway.
612
613 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
614
615 %define: accept unquoted values.
616 * NEWS (2.5): Group all %define changes together, and document
617 this one. Remove quotes in IELR and canonical LR entry.
618 * doc/bison.texinfo: Remove quotes in most examples throughout.
619 (Decl Summary): Update %define documentation.
620 (Table of Symbols): Likewise.
621 * src/ielr.c (LrType): Update documentation.
622 * src/parse-gram.y (content.opt): Add production for ID.
623 * tests/calc.at: Remove quotes in most tests.
624 * tests/existing.at: Likewise.
625 * tests/input.at: Likewise.
626 * tests/local.at: Likewise.
627 * tests/push.at: Likewise.
628 * tests/reduce.at: Likewise.
629 * tests/torture.at: Likewise.
630
631 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
632
633 %define lr.type: make values lowercase IDs.
634 That is, "LALR" => "lalr", "IELR" => "ielr", and
635 "canonical LR" => "canonical-lr".
636 * NEWS (2.5): Update documentation.
637 * doc/bison.texinfo (Decl Summary): Likewise.
638 * src/ielr.c (ielr): Use new values.
639 * src/ielr.h (ielr): Update documentation.
640 * src/reader.c (prepare_percent_define_front_end_variables): Use
641 and validate new values.
642 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
643 grammars.
644 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
645
646 2009-08-27 Eric Blake <ebb9@byu.net>
647
648 scan-gram: avoid portability trap with ctype usage.
649 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
650 Avoid compiler warning.
651
652 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
653
654 tests: use perl for printing special sequences to files.
655 And skip tests if perl is not available. This is better than
656 playing tricks with shell portability. Suggested by Akim
657 Demaille.
658 * tests/input.at (Bad character literals): Use it here for
659 omitting final newlines.
660 (Bad escapes in literals): Use it here for special characters.
661
662 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
663
664 tests: show a use of %define lr.default-reductions "consistent"
665 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
666 prevents the omission of expected tokens for %error-verbose.
667
668 2009-08-26 Akim Demaille <demaille@gostai.com>
669
670 tests: portability fix.
671 * tests/input.at (Bad escapes in literals): Don't expect "echo
672 '\0'" to output \ then 0.
673
674 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
675
676 Actually handle the yytable zero value correctly this time.
677 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
678 mention zero values in the YYTABLE comments.
679 * data/glr.c (yytable_value_is_error): Don't check for zero
680 value.
681 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
682 * data/yacc.c (yytable_value_is_error): Likewise.
683 * data/lalr1.java (yy_table_value_is_error_): Likewise.
684 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
685 * src/tables.h: In header comments, explain why it's useless to
686 check for a zero value in yytable.
687
688 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
689
690 More fixes related to last two patches.
691 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
692 defined.
693 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
694 yytable comments: zero indicates syntax error not default
695 action.
696 * data/glr.c (yyis_pact_ninf): Rename to...
697 (yypact_value_is_default): ... this.
698 (yyisDefaultedState): Update for rename.
699 (yyis_table_ninf): Rename to...
700 (yytable_value_is_error): ... this, and check for value zero
701 besides just YYTABLE_NINF.
702 (yygetLRActions): Check for default value from yypact. It
703 appears that this check is always performed before this function
704 is invoked, and so adding the check here is probably redundant.
705 However, the code may evolve after this subtlety is forgotten.
706 Also, update for rename to yytable_value_is_error. Because that
707 macro now checks for zero, a different but equivalent branch of
708 the if-then-else here is evaluated.
709 (yyreportSyntaxError): Update for rename to
710 yytable_value_is_error. The zero condition was mishandled
711 before.
712 (yyrecoverSyntaxError): Update for renames. No behavioral
713 changes.
714 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
715 New function.
716 (yy_table_value_is_error_): New function.
717 (parse): Use new functions where possible. No behavioral
718 changes.
719 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
720 The zero condition was mishandled before.
721 * data/yacc.c (yyis_pact_ninf): Rename to...
722 (yypact_value_is_default): ... this.
723 (yyis_table_ninf): Rename to...
724 (yytable_value_is_error): ... this, and check for value zero
725 besides just YYTABLE_NINF.
726 (yysyntax_error): Update for rename to yytable_value_is_error.
727 The zero condition was mishandled before.
728 (yyparse): Update for renames. No behavioral changes.
729 * src/tables.h: Improve comments about yypact, yytable, etc.
730 more. Most importantly, say yytable value of zero means syntax
731 error not default action.
732
733 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
734
735 Fix %error-verbose for conflicts resolved by %nonassoc.
736 * NEWS (2.5): Document.
737 * data/glr.c (yyreportSyntaxError): Fix this by checking
738 yyis_table_ninf.
739 * data/yacc.c (yysyntax_error): Likewise.
740 * data/lalr1.cc (yysyntax_error_): Fix this by checking
741 yytable_ninf_.
742 * data/lalr1.java (yysyntax_error): Likewise.
743 * tests/conflicts.at (%nonassoc and eof): Update expected output
744 and remove FIXME.
745
746 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
747
748 Some code and documentation improvements.
749 * data/c.m4 (b4_table_value_equals): New macro to capture
750 some repeated code.
751 * data/glr.c (yyis_pact_ninf): Use it here.
752 (yyis_table_ninf): Likewise.
753 (yyreportSyntaxError): Improve internal comments.
754 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
755 Use it everywhere possible.
756 (yyis_table_ninf): Likewise.
757 (yysyntax_error): Improve internal comments.
758 * data/lalr1.cc (yysyntax_error_): Likewise.
759 * data/lalr1.java (yysyntax_error): Likewise.
760 * src/tables.h: Improve comments about yypact, yytable, etc.
761
762 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
763
764 Use locale when quoting.
765 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
766 quote rather than implementing quoting here.
767
768 2009-08-20 Eric Blake <ebb9@byu.net>
769
770 Make previous patch more robust.
771 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
772 argmatch.h.
773 (output_skeleton): Use it.
774 Suggested by Akim Demaille.
775
776 Import latest m4/m4.m4.
777 * submodules/autoconf: Update to autoconf 2.64.
778 * configure.ac (M4_GNU_OPTION): New define.
779 * src/output.c (output_skeleton): Use it to resolve FIXME.
780 * NEWS: Mention this.
781
782 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
783
784 Fix complaints about escape sequences.
785 Discussed starting at
786 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
787 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
788 For a \0 and similar escape sequences meaning the null
789 character, report an invalid escape sequence instead of an
790 invalid null character because the latter does not actually
791 appear in the user's input.
792 In all escape sequence complaints, don't escape the initial
793 backslash, and don't quote when the sequence appears at the end
794 of the complaint line unless there's whitespace that quotearg
795 won't escape.
796 Consistently say "invalid" not "unrecognized".
797 Consistently prefer "empty character literal" over "extra
798 characters in character literal" warning for invalid escape
799 sequences; that is, consistently discard those sequences.
800 * tests/input.at (Bad escapes in literals): New.
801
802 2009-08-19 Akim Demaille <demaille@gostai.com>
803
804 doc: fixes.
805 * doc/bison.texinfo: Fix minor Texinfo errors.
806
807 2009-08-19 Akim Demaille <demaille@gostai.com>
808
809 doc: %initial-action to initialize yylloc.
810 Reported by Bill Allombert.
811 * doc/bison.texinfo: Set fill-column to 76.
812 (Location Type): Document the use of %initial-action to initialize
813 yylloc.
814
815 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
816
817 maint: update for gnulib's recent update-copyright changes
818 * gnulib: Update.
819 * .x-update-copyright (COPYING): Add as it's no longer implied
820 when .x-update-copyright is present.
821 * cfg.mk (update-copyright-local): Remove, now ignored.
822 (update-copyright): Declare update-b4-copyright as a dependency.
823
824 2009-08-17 Akim Demaille <demaille@gostai.com>
825
826 build: require gettext 0.17.
827
828 Suggested by Bruno Haible.
829 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
830 * configure.ac: require gettext 0.17 to ensure compatibility with
831 gnulib.
832
833 2009-08-17 Akim Demaille <demaille@gostai.com>
834
835 build: lower gettext requirements.
836
837 Bison was uselessly requiring the formatstring macros from
838 gettext, which resulted in mo files not being installed on systems
839 that perfectly supported Bison mo files. Lower the requirement.
840 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
841
842 * configure.ac: Require need-ngettext instead of
843 need-formatstring-macros.
844 Reported by Martin Jabocs.
845 Suggested by Bruno Haible.
846 * INSTALL: Restructure.
847 (Internationalization): New.
848
849 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
850
851 maint: fix use of copyright year intervals.
852 * gnulib: Update.
853 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
854 as now recommended in gnulib/NEWS.
855 * build-aux/update-b4-copyright: Fix.
856 * cfg.mk (update-copyright-env): Configure update-copyright.
857
858 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
859
860 Make it easier to write deterministic tests.
861 Continues Akim's work from his 2009-06-10 commits.
862 * src/reader.c (check_and_convert_grammar): Don't add any
863 symbols after the first symbols_do invocation.
864 * src/symtab.c (symbols_sorted): New static global.
865 (user_token_number_redeclaration): Update comments.
866 (symbol_from_uniqstr): If a new symbol is being created, assert
867 that symbols_sorted hasn't been allocated yet.
868 (symbols_free): Free symbols_sorted.
869 (symbols_cmp, symbols_cmp_qsort): New functions.
870 (symbols_do): Sort symbol_table into symbols_sorted on first
871 invocation.
872 * tests/input.at (Numbered tokens): Recombine tests now that the
873 output should be deterministic across multiple numbers.
874
875 2009-08-12 Akim Demaille <demaille@gostai.com>
876
877 distcheck: fix.
878
879 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
880
881 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
882
883 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
884
885 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
886
887 Miscellaneous code readability improvements.
888
889 * src/reader.c (reader): Move %define front-end variable
890 defaults and checking into...
891 (prepare_percent_define_front_end_variables): ... this new
892 function.
893
894 * src/scan-gram.l (INITIAL): For consistency with string
895 literals, don't store open quote on character literal. It's
896 discarded before returning anyway.
897 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
898 Make length test more readable, and make the character stored
899 for an empty literal more obvious while consistent with the
900 previous behavior.
901
902 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
903 USER_NUMBER_HAS_STRING_ALIAS throughout.
904 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
905 that is repeated in symtab.h. Improve argument names to make it
906 clear which side of the symbol-string alias pair is which.
907 (symbol_check_alias_consistency): Improve local variable names
908 for the same purpose.
909 * src/symtab.h (struct symbol): Make comments about aliases
910 clearer.
911 (symbol_make_alias): Improve comments and argument name.
912 * src/output.c (token_definitions_output): Update for rename to
913 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
914
915 2009-08-08 Alex Rozenman <rozenman@gmail.com>
916
917 Convert "misleading reference" messages to warnings.
918 * src/scan-code.l: New function 'show_sub_messages', more
919 factoring.
920 * tests/named-ref.at: Adjust tests.
921
922 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
923
924 maint: run "make update-copyright"
925
926 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
927
928 maint: make update-b4-copyright easier to use
929 * build-aux/update-b4-copyright: In warnings, report line
930 numbers rather than character positions.
931 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
932 that update-copyright runs it.
933 * gnulib: Update.
934
935 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
936
937 maint: clean up update-b4-copyright code
938 * build-aux/update-b4-copyright: Do not accept 2-digit
939 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
940 Don't accept a `[' in a b4_copyright argument.
941 Format code more consistently.
942 Don't assume b4*copyright never occurs.
943
944 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
945
946 maint: automate b4_copyright updates.
947 * Makefile.am (update-b4-copyright): New target rule.
948 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
949 * build-aux/update-b4-copyright: New.
950 * data/yacc.c: Remove stray characters around b4_copyright
951 invocations.
952
953 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
954
955 maint: automate annual package-wide copyright-year update.
956 * .x-update-copyright: New.
957 * Makefile.am (EXTRA_DIST): Remove maint.mk.
958 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
959 update-copyright. Remove gnumakefile, which is implied by
960 maintainer-makefile.
961 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
962 * gnulib: Update.
963 * maint.mk: Remove, now copied from gnulib.
964 * examples/extexi: Add missing "(C)" in copyright statement so
965 update-copyright can recognize it.
966 * src/LR0.h: Likewise.
967 * src/print.h: Likewise.
968 * src/print_graph.h: Likewise.
969 * src/gram.c: Add missing comma in copyright statement.
970 * src/gram.h: Likewise.
971
972 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
973
974 Fix "make distcheck".
975 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
976 of just calc.stamp.
977
978 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
979
980 Pacify "gcc -Wunused" for the input function from Flex.
981 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
982 and later.
983 * src/scan-code.l: Add "%option noinput", which I cannot find in
984 the Flex manual, but which Flex has supported since at least as
985 far back as 2.5.4. However, if any of our developers still use
986 Flex 2.5.4, they'll need to stop configuring with
987 --enable-gcc-warnings because "%option noinput" didn't work
988 correctly until Flex 2.5.6.
989 * src/scan-gram.l: Likewise.
990 * src/scan-skel.l: Likewise.
991
992 2009-07-31 Alex Rozenman <rozenman@gmail.com>
993
994 Fix --enable-gcc-warnings problems.
995 * src/reader.c: Adjust variable names.
996 * src/scan-code.l: Fix prototypes and adjust names.
997 * src/named-ref.c: Remove redundant "if".
998
999 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1000
1001 Fix a --enable-gcc-warnings problem.
1002 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1003 variable.
1004
1005 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1006
1007 Fix some memory leaks.
1008 * src/named-ref.c: Add a pointer check (named_ref_free).
1009 * src/scan-code.l: New function (variant_table_free). Called in
1010 code_scanner_free.
1011 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1012
1013 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1014
1015 Warn about character literals not of length one.
1016 * NEWS (2.5): Document.
1017 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1018 the length.
1019 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1020 * tests/input.at (Bad character literals): New test group.
1021
1022 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1023
1024 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1025
1026 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1027
1028 Some M4 cleanup in the testsuite.
1029 Suggested by Eric Blake at
1030 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1031 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1032 complicate the code by distinguishing between a missing value
1033 and an empty string value for an optional argument. This fix is
1034 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1035 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1036 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1037 arguments are not needed because of the following changes.
1038 Fix stale comments.
1039 Bison developers should use GNU M4 and should not use
1040 POSIXLY_CORRECT when building the test suite, so do not
1041 complicate the code by avoiding $10 and above.
1042 Do not quote an empty string value for an optional argument, and
1043 do not distinguish between a missing value and an empty string
1044 value.
1045
1046 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
1047
1048 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
1049
1050 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1051
1052 Revert unnecessary column realignment in --help output.
1053 Reported by Akim Demaille at
1054 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1055 * src/getargs.c (usage): Here.
1056
1057 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1058
1059 Alphabetical order in src/Makefile.am.
1060 * src/Makefile.am: Adjust.
1061
1062 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1063
1064 Style changes and factoring.
1065 * src/named-ref.h: Add comments.
1066 * src/parse-gram.y: Readability and style changes.
1067 * src/reader.c: Factoring: assign_named_ref function.
1068 * src/scan-code.l: Factoring and style changes. Rename
1069 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1070 Use "unsigned" type for variant index. Improve readablity.
1071 * src/scan-gram.l: Change error messages and add comments.
1072 * src/symlist.h: symbol_list_null: New function decl.
1073 * src/symlist.c: symbol_list_null: Implement here.
1074 * tests/named-refs.at: Adjust for new error messages.
1075
1076 2009-06-29 Eric Blake <ebb9@byu.net>
1077
1078 scan-code: avoid compiler warnings
1079 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1080
1081 2009-06-29 Akim Demaille <demaille@gostai.com>
1082
1083 build: avoid concurrent extraction of calc++.
1084 * examples/calc++/Makefile.am (calc.stamp): New.
1085 Depend on it to create the sources of calc++ so that concurrent
1086 builds don't launch several "extexi" in parallel.
1087 Not only this is inefficient, this also builds incorrect sources
1088 with several extractions mixed together.
1089
1090 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1091
1092 Implement support for named symbol references.
1093 * src/parse-gram.y: Add new syntax (named_ref.opt).
1094 * src/reader.c: Store named refs in symbol lists.
1095 * src/reader.h: New argument for symbol_append and
1096 action_append functions.
1097 * src/scan-code.h: Add new field (named_ref) into
1098 code_props data structure. Keeps named ref of midrule
1099 actions.
1100 * src/scan-code.l: Support for named refs in semantic
1101 action code. New function 'parse_named_ref'.
1102 * src/scan-gram.l: Support bracketed id.
1103 * src/symlist.c: Store named refs in symbol lists.
1104 * src/symlist.h: New field in symbol list: named_ref.
1105 * src/named-ref.h: New file, a struct for named_ref.
1106 * src/named-ref.cp: New file, named_ref_new function.
1107 * src/local.mk: Add two new files.
1108 * tests/testsuite.at: Include new test group:
1109 * tests/named-refs.at: this new file.
1110
1111 2009-06-25 Akim Demaille <demaille@gostai.com>
1112
1113 hash: check insertion for memory exhaustion.
1114 * src/uniqstr.c (uniqstr_new): New.
1115
1116 2009-06-11 Akim Demaille <demaille@gostai.com>
1117
1118 style changes.
1119 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1120 * src/print-xml.c: Style changes.
1121 * tests/conflicts.at: Comment changes.
1122
1123 2009-06-11 Akim Demaille <demaille@gostai.com>
1124
1125 xml: beware of user strings used to give a %prec to rules.
1126 * tests/conflicts.at (%prec with user strings): New.
1127 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1128 XML output.
1129
1130 2009-06-11 Akim Demaille <demaille@gostai.com>
1131
1132 hash: check insertion for memory exhaustion.
1133 * src/muscle-tab.c (muscle_insert, muscle_grow)
1134 * src/state.c (state_hash_insert): Check the return value of
1135 hash_insert.
1136
1137 2009-06-10 Akim Demaille <demaille@gostai.com>
1138
1139 deterministic test suite.
1140 Some consistency checks on symbols are performed after all the
1141 symbols were read, by an iteration over the symbol table. This
1142 traversal is nondeterministic, which can be a problem for test
1143 cases.
1144 Avoid this.
1145 Addresses another form of nondeterminism reported by Joel E. Denny.
1146 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1147
1148 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1149 test in two.
1150 Use different file names for the three tests to make the
1151 maintenance easier.
1152
1153 2009-06-10 Akim Demaille <demaille@gostai.com>
1154
1155 deterministic user-token-number redeclaration errors.
1156 Address nondeterminism reported by Joel E. Denny.
1157 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1158
1159 * src/uniqstr.h: Comment changes.
1160 * src/location.h (boundary_cmp, location_cmp): New.
1161 * src/symtab.c (user_token_number_redeclaration): New.
1162 (symbol_translation): Use it.
1163 * tests/input.at (Numbered tokens): Adjust the expected output.
1164
1165 2009-05-25 Akim Demaille <demaille@gostai.com>
1166
1167 gnulib: update.
1168 * gnulib: Update to latest.
1169 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1170 * m4/.gitignore: Regen.
1171 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1172 Call xalloc_die on hash_insert failures.
1173 Requested by the new __warn_unused_result__ attribute of
1174 hash_insert.
1175
1176 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1177
1178 Convert multiple variable definition warnings to complaints.
1179 * NEWS (2.5): Add a new entry for that change.
1180 * doc/bison.texinfo (Decl Summary): Update %define entry.
1181 (Bison Options): Update -D/--define/-F/--force-define entry.
1182 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
1183 * src/muscle_tab.h (muscle_percent_define_insert): Update
1184 comments.
1185 * tests/input.at (`%define errors'): Update.
1186 (`%define, --define, --force-define'): Update.
1187
1188 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1189
1190 -F/--force-define and relative %define/-D/--define priorities.
1191 * NEWS (2.5): Add documentation to -D/--define entry.
1192 * build-aux/cross-options.pl: Hard-code association of
1193 --force-define with %define.
1194 * doc/bison.texinfo (Decl Summary): In %define entry,
1195 cross-reference command-line options.
1196 (Bison Options): Add documentation to -D/--define entry.
1197 (Option Cross Key): Widen column for --force-define row.
1198 * src/getargs.c (usage): Document -F/--force-define. Realign
1199 options in output.
1200 (short_options, long_options, getargs): Parse -F/--force-define,
1201 and update muscle_percent_define_insert invocation.
1202 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
1203 (muscle_percent_define_insert): Add argument with that type.
1204 * src/muscle_tab.c (muscle_percent_define_insert): Implement
1205 -F/--force-define behavior and priorities.
1206 * src/parse-gram.y (prologue_declaration): Update
1207 muscle_percent_define_insert invocations.
1208 * tests/input.at (`%define, --define'): Rename to...
1209 (`%define, --define, --force-define'): ... this and extend.
1210
1211 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1212
1213 Update some comments to make sense for -D.
1214 * data/bison.m4 (b4_check_user_names): In header comments, say
1215 "user occurrence" instead of "grammar occurrence".
1216 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
1217 (muscle_percent_code_grow): Likewise just for consistency.
1218
1219 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1220
1221 * data/c++.m4: Update copyright year.
1222
1223 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1224
1225 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1226
1227 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1228
1229 Handle a trailing `:' in a user-supplied C++ namespace better.
1230 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1231 among the closing braces here. This fix might make the
1232 generated code easier to debug, but otherwise it should be
1233 insignificant because a trailing `:' is a C++ error already.
1234
1235 2009-05-19 Akim Demaille <demaille@gostai.com>
1236
1237 remove useless variable.
1238 * src/getargs.c (skeleton_arg): Remove now useless variable.
1239 Should help the compiler see that this printf-like call is sane.
1240
1241 2009-05-11 Akim Demaille <demaille@gostai.com>
1242
1243 doc: use C++ headers.
1244 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1245 headers.
1246
1247 2009-05-05 Akim Demaille <demaille@gostai.com>
1248
1249 fix hexadecimal token number support.
1250 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
1251
1252 2009-05-05 Akim Demaille <demaille@gostai.com>
1253
1254 tests: check token numbers.
1255 * tests/input.at (Numbered tokens): New.
1256
1257 2009-05-04 Akim Demaille <demaille@gostai.com>
1258
1259 bison: catch bad symbol names.
1260 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1261 * tests/input.at: Adjust.
1262
1263 2009-05-04 Akim Demaille <demaille@gostai.com>
1264
1265 space changes.
1266 * src/scan-gram.l: Untabify to be robust to zealous editors.
1267
1268 2009-05-04 Akim Demaille <demaille@gostai.com>
1269
1270 identifiers: dashes are letters.
1271 Dashes can now start identifiers (symbols and directives).
1272
1273 * src/scan-gram.l ({letter}): Add dash.
1274 ({id}): Remove it.
1275 * tests/input.at (Symbols): Adjust.
1276 Remove stray comment.
1277 * tests/regression.at (Invalid inputs): Adjust error message.
1278 * doc/bison.texinfo (Symbols): Update.
1279
1280 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1281
1282 Declare %code to be a permanent feature.
1283 * NEWS (2.4.2): Here.
1284 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1285 experimental.
1286 (Decl Summary): Likewise.
1287
1288 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1289
1290 Convert underscores to dashes in some %define variable names.
1291 For now, just api.push-pull and lr.keep-unreachable-states.
1292 Maintain old names for backward compatibility.
1293 * NEWS (2.5): Document.
1294 * data/c.m4 (b4_identification): Update comment.
1295 * data/yacc.c: Update access.
1296 * doc/bison.texinfo: Update.
1297 * etc/bench.pl.in (bench_grammar): Update use.
1298 * src/files.c (tr): Move to...
1299 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1300 think of a better place to expose it. My logic is that, for all
1301 uses of tr so far, command-line arguments can be involved, and
1302 getargs.h is already included.
1303 * src/main.c (main): Update access.
1304 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1305 variable names to new variable names before assigning value.
1306 * src/reader.c (reader): Update setting default.
1307 * tests/calc.at: Update uses.
1308 * tests/conflicts.at (Unreachable States After Conflict
1309 Resolution): Update use.
1310 * tests/input.at (%define enum variables): Update use.
1311 (%define backward compatibility): New test group.
1312 * tests/push.at: Update uses.
1313 * tests/reduce.at: Update uses.
1314 * tests/torture.at: Update uses.
1315
1316 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1317
1318 Set all front-end %define defaults in one place.
1319 * src/main.c (main): Move lr.keep_unreachable_states default...
1320 * src/reader.c (reader): ... to here.
1321
1322 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1323
1324 Rename lr.default_reductions to lr.default-reductions.
1325 * NEWS (2.5): Here.
1326 * doc/bison.texinfo: Here.
1327 * src/lalr.c (initialize_LA): Here.
1328 * src/print.c (print_reductions): Here.
1329 * src/reader.c (reader): Here.
1330 * src/tables.c (action_row): Here.
1331 * tests/input.at (%define enum variables): Here.
1332 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1333
1334 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1335
1336 Pacify ./configure --enable-gcc-warnings.
1337 * tests/input.at (Symbols): Prototype yyerror and yylex.
1338
1339 2009-04-21 Akim Demaille <demaille@gostai.com>
1340
1341 tests: check the use of dashes and periods in symbols.
1342 * tests/input.at (Symbol): New test group.
1343
1344 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1345
1346 Document how `%define "var" "value"' is not M4-friendly.
1347 * src/parse-gram.y (variable): In comments here.
1348
1349 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1350
1351 Add copyright updates missed during previous cherry pick.
1352 * src/output.c: Here.
1353 * src/parse-gram.y: Here.
1354 * src/scan-gram.l: Here.
1355
1356 2009-04-20 Akim Demaille <demaille@gostai.com>
1357
1358 variables: accept dashes.
1359 * src/scan-gram.l ({id}): Also accept dashes after the initial
1360 letter.
1361 ({directive}): Use {id}.
1362 * src/parse-gram.y: Comment and formatting changes.
1363 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1364 symbols.
1365 * src/complain.h, src/complain.c (yacc_at): New.
1366 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1367 symbol names.
1368 * src/output.c (token_definitions_output): Do not #define token
1369 names with dashes.
1370
1371 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1372
1373 Clean up recent patches a little.
1374 Reported by Akim Demaille.
1375 * doc/bison.texinfo (Understanding): Fix typos.
1376 * src/print.c (print_reductions): Don't use negated variable.
1377
1378 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1379
1380 List accepted values for a %define enum variable with an invalid value.
1381 Suggested by Akim Demaille at
1382 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1383 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1384 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
1385 * tests/input.at (%define lr.default_reductions invalid values): Merge
1386 into...
1387 (%define enum variables): ... here, and update output.
1388
1389 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1390
1391 Rename "default rule" to "default reduction".
1392 This includes changing variable names in code, changing
1393 comments, and renaming %define lr.default_rules to %define
1394 lr.default_reductions.
1395 * NEWS (2.5): Update IELR documentation.
1396 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
1397 Adjust YYDEFACT and yydefact_ documentation.
1398 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1399 and lr.type documentation. Make some other wording
1400 improvements.
1401 (Glossary): Adjust cross-references and Default Reduction
1402 definition.
1403 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1404 Remove a confusing comment pointed out by Akim Demaille.
1405 (initialize_LA): Adjust code.
1406 * src/print-xml.c (print_reductions): Adjust code.
1407 * src/print.c (print_reductions): Adjust code.
1408 * src/reader.c (reader): Adjust code.
1409 * src/tables.c (action_row): Adjust code.
1410 (token_actions): Adjust code.
1411 * src/tables.h: Adjust YYDEFACT documentation.
1412 * tests/input.at (%define lr.default_rules invalid values):
1413 Rename test group to...
1414 (%define lr.default_reductions invalid values): ... this, and
1415 update grammar file and expected output.
1416 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1417 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1418
1419 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1420
1421 Document %define lr.type and lr.default_rules.
1422 * NEWS (2.5): Add an entry.
1423 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1424 besides just LALR(1) and GLR(1).
1425 * doc/bison.texinfo (Introduction): Likewise.
1426 (Language and Grammar): Bison is no longer limited to LALR(1)
1427 restrictions.
1428 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1429 when trying to distinguish from GLR. Talk about LR(1) grammars
1430 rather than LALR(1) grammars.
1431 (Decl Summary): In %define api.push_pull entry, say it applies
1432 to deterministic parsers in C rather than LALR(1) parsers in C.
1433 Add lr.default_rules entry.
1434 Add lr.type entry.
1435 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1436 restrictions.
1437 (Generalized LR Parsing): Same changes as for the previous GLR
1438 section.
1439 (Memory Management): Say deterministic rather than LALR(1).
1440 (Understanding): Correct some bison output.
1441 Index discussion of "accepting state".
1442 Say deterministic rather than LALR(1).
1443 (Bison Options): In --yacc entry, say deterministic rather than
1444 LALR(1).
1445 In --report, --graph, and --xml entries, just don't mention
1446 LALR(1).
1447 (C++ Parsers): Say deterministic rather than LALR(1).
1448 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1449 (Glossary): Add Accepting State, Consistent State, Default Rule,
1450 and IELR(1) definitions.
1451 In Generalized LR (GLR) definition, make same changes as in
1452 previous GLR sections.
1453 In LALR(1) definition, say Bison uses LALR(1) by default rather
1454 than implying Bison is limited to LALR(1).
1455 (LocalWords): Add IELR.
1456
1457 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1458
1459 Finish implementing %define lr.type.
1460 Its value can be "LALR", "IELR", or "canonical LR".
1461 * lib/timevar.def (TV_IELR_PHASE1): New var.
1462 (TV_IELR_PHASE2): New var.
1463 (TV_IELR_PHASE3): New var.
1464 (TV_IELR_PHASE4): New var.
1465 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1466 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1467 Sbitset.h, ielr.h, and ielr.c.
1468 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1469 trace_types): Add trace_ielr.
1470 * src/lalr.h, src/lalr.c (ngotos): Export it.
1471 (F): Rename to...
1472 (goto_follows): ... this, update all uses, and export it.
1473 (set_goto_map): Export it.
1474 (map_goto): Export it.
1475 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1476 handled in ielr.
1477 (initialize_LA): Export it. Move lookback allocation to...
1478 (lalr): ... here because, for canonical LR, initialize_LA must
1479 be invoked but lookback and much of the rest of LALR isn't
1480 needed.
1481 * main.c (main): Instead of lalr, invoke ielr, which invokes
1482 lalr.
1483 * src/reader.c (reader): Default lr.type to "LALR".
1484 Default lr.default_rules to "accepting" if lr.type is "canonical
1485 LR". Leave the default as "all" otherwise.
1486 Check for a valid lr.type value.
1487 * src/state.h, src/state.c (struct state_list): Add state_list
1488 member.
1489 (state_new): Initialize state_list member to NULL.
1490 (state_new_isocore): New function, exported.
1491 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1492 exercises all values of lr.type.
1493 (GNU AWK Grammar): Rename test group to...
1494 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1495 AT_TEST_EXISTING_GRAMMAR.
1496 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1497 (GNU pic Grammar): Rename test group to...
1498 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1499 AT_TEST_EXISTING_GRAMMAR.
1500 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1501 all values of lr.type.
1502 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1503 (Lane Split): Likewise.
1504 (Complex Lane Split): Likewise.
1505 (Split During Added Lookahead Propagation): Likewise.
1506
1507 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1508
1509 Add new files for IELR and canonical LR implementation.
1510 * src/AnnotationList.c: New.
1511 * src/AnnotationList.h: New.
1512 * src/InadequacyList.c: New.
1513 * src/InadequacyList.h: New.
1514 * src/Sbitset.c: New.
1515 * src/Sbitset.h: New.
1516 * src/ielr.c: New.
1517 * src/ielr.h: New.
1518
1519 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1520
1521 Implement %define lr.default_rules.
1522 Its value describes the states that are permitted to contain
1523 default rules: "all", "consistent", or "accepting".
1524 * src/reader.c (reader): Default lr.default_rules to "all".
1525 Check for a valid lr.default_rules value.
1526 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1527 is "accepting", then only mark the accepting state as
1528 consistent.
1529 (initialize_LA): Tell state_lookahead_tokens_count whether
1530 lr.default_rules is "accepting".
1531 * src/tables.c (action_row): If lr.default_rules is not "all",
1532 then disable default rules in inconsistent states.
1533 * src/print.c (print_reductions): Use this opportunity to
1534 perform some assertions about whether lr.default_rules was
1535 obeyed correctly.
1536 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1537 helps with checking the parser tables for a grammar.
1538 * tests/input.at (%define lr.default_rules invalid values): New
1539 test group.
1540 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1541 AT_TEST_TABLES_AND_PARSE.
1542 (`no %define lr.default_rules'): New test group generated by
1543 AT_TEST_LR_DEFAULT_RULES.
1544 (`%define lr.default_rules "all"'): Likewise.
1545 (`%define lr.default_rules "consistent"'): Likewise.
1546 (`%define lr.default_rules "accepting"'): Likewise.
1547
1548 2009-04-20 Akim Demaille <demaille@gostai.com>
1549
1550 Consistently refer to Yacc, not YACC.
1551 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1552
1553 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1554
1555 Pacify make maintainer-check-posix.
1556 * tests/input.at (%define, --define): Move bison command-line
1557 options before grammar file name.
1558
1559 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1560
1561 Document semicolon warnings.
1562 * NEWS (2.5): Here.
1563
1564 2008-12-08 Akim Demaille <demaille@gostai.com>
1565
1566 Fix portability issue in the test suite.
1567 * tests/local.at (AT_MATCHES_CHECK): New.
1568 Based on Perl instead of Sed. Sed has too many portability
1569 pitfalls, not ever Sed is GNU Sed.
1570 * tests/actions.at (Fix user actions without a trailing semicolon):
1571 Use it.
1572
1573 2008-12-07 Di-an Jan <dianj@freeshell.org>
1574
1575 Implement the FIXME that ends an user action with a semicolon
1576 if it seems necessary.
1577 * src/scan-code.l (flex rules section): Flag cpp directive from
1578 any `#' to the first unescaped end-of-line. Semicolon is not
1579 needed after `;', `{', '}', or cpp directives and is needed after
1580 any other token (whitespaces and comments have no effect).
1581 * tests/actions.at (Fix user actions without a trailing semicolon):
1582 New test.
1583 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1584 to make user actions complete statements.
1585 Adjust column numbers in error messages.
1586 * tests/regression.at (Fix user actions without a trailing semicolon):
1587 Remove. Covered by new test.
1588
1589 2009-04-14 Akim Demaille <demaille@gostai.com>
1590
1591 doc: minor fixes.
1592 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1593 (Table of Symbols): Remove duplicate entry for %debug.
1594
1595 2009-04-10 Eric Blake <ebb9@byu.net>
1596
1597 submodules: update to latest
1598 * submodules/autoconf: Use latest upstream Autoconf.
1599
1600 2009-04-06 Eric Blake <ebb9@byu.net>
1601
1602 Work around autoconf 2.63b bug in testsuite.
1603 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1604 autoconf bug related to # in test.
1605
1606 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1607
1608 * NEWS (2.5): Describe new -D/--define feature.
1609
1610 2008-11-10 Akim Demaille <demaille@gostai.com>
1611
1612 --trace=muscles
1613 * src/getargs.h, src/getargs.c (trace_muscle): New.
1614 (trace_types, trace_args): Support it.
1615 * src/output.c (output_skeleton): Use it.
1616
1617 2008-11-10 Akim Demaille <demaille@gostai.com>
1618
1619 muscles_output.
1620 * src/output.c (muscles_output): New, extracted from...
1621 (output_skeleton): here.
1622 Adjust.
1623
1624 2008-11-21 Akim Demaille <demaille@gostai.com>
1625
1626 Display the changes in cross-options.texi.
1627 * build-aux/cross-options.pl ($sep): New, to separate items.
1628 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
1629 the changes.
1630
1631 2008-11-20 Di-an Jan <dianj@freeshell.org>
1632
1633 Improves options in the manual.
1634 * doc/bison.texinfo (-g, -x): Add space before argument.
1635 (Option Cross Key): Implement FIXME: listing directives also.
1636 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1637 (Short Option): Special case -d. Put arguments inside @option.
1638 (Bison Directive): Add column, automatically extracted from
1639 src/scan-gram.l (actual name passed as the first argument)
1640 with special case for %define.
1641 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
1642 to build-aux/cross-options.pl.
1643 * src/getargs.c (usage): Document limitations of cross-options.pl.
1644 * src/scan-gram.l: Likewise.
1645
1646 2009-02-25 Akim Demaille <demaille@gostai.com>
1647
1648 Copyright years.
1649 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1650
1651 2008-12-08 Akim Demaille <demaille@gostai.com>
1652
1653 Install autoconf as a submodule to get m4sugar.
1654 * .gitmodules: Add submodules/autoconf.
1655 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1656 submodules/autoconf.
1657
1658 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1659
1660 Simplify last patch slightly.
1661 * src/getargs.c (getargs): Here.
1662
1663 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1664
1665 Fix last warning from --enable-gcc-warnings.
1666 * src/getargs.c (getargs): Don't assign const address to non-const
1667 pointer.
1668
1669 2008-11-17 Di-an Jan <dianj@freeshell.org>
1670
1671 Handle --enable-gcc-warnings.
1672 * src/getargs.c (command_line_location): Set parameters to void.
1673
1674 2008-11-11 Akim Demaille <demaille@gostai.com>
1675
1676 AT_FULL_COMPILE.
1677 * tests/actions.at, tests/regression.at: Use it.
1678
1679 2008-11-07 Akim Demaille <demaille@gostai.com>
1680
1681 Pass command line location to skeleton_arg and language_argmatch.
1682 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1683 The location argument is now mandatory.
1684 Adjust all dependencies.
1685 (getargs): Use command_line_location.
1686
1687 2008-11-07 Akim Demaille <demaille@gostai.com>
1688
1689 -D, --define.
1690 * src/getargs.c (usage): Document -D.
1691 Fix help string for --locations.
1692 (command_line_location): New.
1693 (short_options, long_options, getargs): Support -D, --define.
1694 (getargs): Move -d support at the right place.
1695 * doc/bison.texinfo (Bison Options): Update.
1696 * tests/input.at (%define, --define): New.
1697
1698 2008-11-07 Akim Demaille <demaille@gostai.com>
1699
1700 Initialize the muscle table before parsing the command line.
1701 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1702 (getargs): Define file_name.
1703 * src/main.c (main): Initialize muscle_tab before calling
1704 getargs.
1705 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1706 its value is not available yet.
1707
1708 2008-11-09 Akim Demaille <demaille@gostai.com>
1709
1710 Require the generation of parse-gram.output.
1711 * src/Makefile.am (YACC): Pass --report=all.
1712
1713 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1714
1715 * NEWS (2.5): New stub.
1716
1717 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1718
1719 Fix options documentation.
1720 * build-aux/cross-options.pl: As in --help output, write optional
1721 arguments as [=ARG] not =[ARG].
1722 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1723
1724 2008-11-07 Akim Demaille <demaille@gostai.com>
1725
1726 Fix --help.
1727 * src/getargs.c (usage): Fix help string for -W.
1728
1729 2008-11-07 Akim Demaille <demaille@gostai.com>
1730
1731 Handle more general types of option arguments.
1732 * build-aux/cross-options.pl: The argument ends at the first
1733 space, not the first non-symbol character.
1734 Use @var for each word appearing the argument description.
1735
1736 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1737
1738 Remove spurious initial empty lines.
1739 * data/location.cc: End the @output lines with an @.
1740
1741 2008-11-04 Akim Demaille <demaille@gostai.com>
1742
1743 Remove spurious initial empty lines.
1744 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1745 * data/yacc.c: End the @output lines with an @.
1746
1747 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1748
1749 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1750 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1751 requirements for a correct m4 are stricter.
1752 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
1753 * configure.ac: Update to use AC_PROG_GNU_M4.
1754 Reported by Eric Blake.
1755
1756 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1757
1758 Help with updating web manual.
1759 * HACKING: Incorporate instructions from gnulib/doc/README.
1760 * bootstrap.conf (gnulib_modules): Add gendocs.
1761
1762 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1763
1764 Fix strange %define locations for default values.
1765 Reported by Akim Demaille at
1766 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1767 and discussed again starting at
1768 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1769 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1770 because location information is bogus.
1771 Use angle brackets to delimit fake file name because square brackets
1772 look like underexpanded m4. Choose a better fake file name.
1773 Use negative line numbers.
1774 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1775 * src/location.c (location_print): If line for a boundary is negative,
1776 only print that boundary's file name.
1777 * src/location.h: Document that.
1778 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1779 defaults): Update output.
1780
1781 2008-11-07 Akim Demaille <demaille@gostai.com>
1782
1783 Locations without columns for command line arguments.
1784 * src/location.c (location_print): Don't display negative columns.
1785 * src/location.h: Document this.
1786
1787 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1788
1789 Add reminder about uploading public key to keys.gnupg.net.
1790 * HACKING (Release Procedure): Here.
1791
1792 2009-03-31 Akim Demaille <demaille@gostai.com>
1793
1794 bootstrap: --help to stdout.
1795 * bootstrap (usage): Don't send --help to stderr.
1796 Use a here doc instead of a long string.
1797
1798 2009-03-31 Akim Demaille <demaille@gostai.com>
1799
1800 bootstrap: README-hacking no longer exists
1801 * bootstrap (checkout_only_file): Set to HACKING.
1802
1803 2009-03-26 Akim Demaille <demaille@gostai.com>
1804
1805 doc: merge HACKING and README-hacking.
1806 Two files is confusing.
1807 Reported by Alexandre Duret-Lutz.
1808
1809 * README-hacking: Merge into...
1810 * HACKING (Working from the repository): here.
1811
1812 2009-03-26 Akim Demaille <demaille@gostai.com>
1813
1814 doc: update README-hacking.
1815 * README-hacking: We now use git and git submodules.
1816 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1817
1818 2009-03-26 Akim Demaille <demaille@gostai.com>
1819
1820 lalr1.cc: avoid GCC 4.3 warnings.
1821 GCC 4.3 now warns about "a || b && c" and asks for explicit
1822 parentheses.
1823 Reported by Alexandre Duret-Lutz.
1824 * data/location.cc: Update copyright years.
1825 (Position::operator==): Use parens to make precedence explicit.
1826 Compare lines and columns first, as they are more likely to be
1827 different, and they are faster to compare.
1828
1829 2009-03-26 Akim Demaille <demaille@gostai.com>
1830
1831 gnulib: update.
1832 * gnulib: Update to latest.
1833 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
1834 use +=.
1835
1836 2009-01-08 Akim Demaille <demaille@gostai.com>
1837
1838 Fix grep portability issues.
1839 Grep on Solaris does not support -q.
1840 Reported by Summum Bonum.
1841
1842 * NEWS: Add a stub for 2.4.2.
1843 * THANKS: Add Summum Bonum.
1844 * tests/atlocal.in (EGREP): New.
1845 (CC, CXX, XSLTPROC): Make it possible to override them via
1846 envvars.
1847 * tests/java.at: Use $EGREP instead of egrep.
1848 Use AT_CHECK's ignore instead of grep's -q.
1849
1850 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1851
1852 Version 2.4.1.
1853 * NEWS: Set version and date.
1854 * lib/Makefile.am: Update copyright year.
1855 * tests/atlocal.in: Update copyright year.
1856
1857 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1858
1859 Semicolon feature removal is not about future language support.
1860 * NEWS: The semicolon feature is no longer active for newer languages,
1861 so don't claim that it causes trouble for them.
1862
1863 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1864
1865 * gnulib: Update submodule to HEAD.
1866
1867 2008-12-09 Akim Demaille <demaille@gostai.com>
1868
1869 Update data/README.
1870 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1871
1872 2008-12-05 Eric Blake <ebb9@byu.net>
1873
1874 Build testsuite with newer autoconf.
1875 * tests/output.at (m4_expand): Don't override in newer autoconf,
1876 where the underlying implementation changed.
1877 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1878 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1879 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1880 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1881 since some of them contain unbalanced ')'.
1882
1883 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1884
1885 * NEWS: Clarify a little.
1886
1887 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1888
1889 * NEWS: Update for recent changes.
1890
1891 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1892
1893 Fix unexpanded macros in GLR defines file.
1894 Reported by Csaba Raduly at
1895 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1896 * THANKS (Csaba Raduly): Add.
1897 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1898 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1899 lexer in a separate module that includes the defines file.
1900 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
1901 source.
1902 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1903 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1904 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1905 (AT_DATA_SOURCE_PROLOGUE): New.
1906 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1907 (AT_DATA_SOURCE): New.
1908 (AT_FULL_COMPILE): New, copied from master branch and extended to
1909 support an additional source file.
1910
1911 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1912
1913 Don't let maintainer-*-check targets force a version update.
1914 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1915 handled.
1916
1917 2008-11-17 Di-an Jan <dianj@freeshell.org>
1918
1919 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1920 Align menus. Adjust word wrapping. Use node names for menu names.
1921 (Examples): Don't abbreviate node names.
1922 (LocalWords): Remove abbreviations.
1923 (Copying): Make description a sentence.
1924 (Java Action Features): Remove period to match the rest of menu.
1925
1926 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1927
1928 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1929 * configure.ac: Adjust usage.
1930 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1931 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1932 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1933
1934 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1935
1936 Don't add a semicolon to actions for %skeleton or %language.
1937 It breaks Java test cases as reported by Akim Demaille.
1938 * src/scan-code.l: Implement.
1939
1940 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1941
1942 Clean up %skeleton and %language priority implementation.
1943 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1944 remove static qualifier because others will soon need to see it.
1945 (language_prio): Likewise.
1946 (getargs): Use command_line_prio rather than 0.
1947 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1948 enum fields.
1949 (skeleton_prio): Extern it.
1950 (language_prio): Extern it.
1951 * src/parse-gram.y: Use grammar_prio rather than 1.
1952
1953 2008-11-04 Akim Demaille <demaille@gostai.com>
1954
1955 * NEWS: Mention the trailing semicolon in action.
1956
1957 2008-11-04 Akim Demaille <demaille@gostai.com>
1958
1959 Reformat NEWS.
1960 * NEWS: Use more outline-mode markup.
1961 Suggested by Jim Meyering.
1962
1963 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1964
1965 Fix user actions without a trailing semicolon.
1966 Reported by Sergei Steshenko at
1967 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1968 * THANKS (Sergei Steshenko): Add.
1969 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1970 * tests/regression.at (Fix user actions without a trailing semicolon):
1971 New test case.
1972
1973 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1974
1975 Initiate further development.
1976 * NEWS: Create an empty section for new entries.
1977 * gnulib: Update submodule to HEAD.
1978
1979 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1980
1981 * NEWS: Version 2.4.
1982
1983 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1984
1985 Prepare for next release.
1986 * NEWS: Briefly mention changes since 2.3b.
1987 * README: Say GNU m4 1.4.6, which we've been requiring in release
1988 announcements already, not 1.4.3, which breaks the build.
1989
1990 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1991
1992 Say %language is experimental.
1993 We're thinking of extending it's effect on output file naming. See the
1994 thread at
1995 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1996 * NEWS: Say it's experimental.
1997 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1998 recommend it over %skeleton for now.
1999 (Bison Options): Likewise.
2000 (C++ Bison Interface): Use %skeleton not %language.
2001 (Calc++ Parser): Use %skeleton not %language.
2002 * src/getargs.c (usage): Say it's experimental.
2003
2004 2008-11-01 Di-an Jan <dianj@freeshell.org>
2005 Paolo Bonzini <bonzini@gnu.org>
2006
2007 Support all Java parser class modifiers.
2008 * data/java.m4 (b4_percent_define_get3): New.
2009 (b4_final_if, b4_strictfp_if): New.
2010 * data/lalr1.java (final, strictfp, extends, implements): Support.
2011 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2012 documentation.
2013 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2014 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2015 (AT_CHECK_JAVA_GREP): New.
2016 (Java parser class modifiers): New test.
2017 (Java parser class extends and implements): New test.
2018
2019 Model exception propagation better with throws and lex_throws.
2020 * data/java.m4 (b4_list2): New.
2021 (throws): Change default.
2022 * data/lalr1.java (yyaction): Add throws.
2023 (parse): Add lex_throws in addition to throws.
2024 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2025 * tests/java.at (Java throws specifications): New test.
2026
2027 Improve documentation for Java parsers.
2028 * doc/bison.texinfo (Java Parsers): Add subsections.
2029 Don't quote first argument of %define.
2030 (Java Bison Interface): Document output files. Move documentation
2031 of parser class and merge into Java Parser Interface. Document
2032 features that error out. Document directives with no effect.
2033 Move note about Javadoc higher.
2034 (Java Semantic Values): Explicitly mention stype.
2035 Document that generic types cannot be used.
2036 (Java Location Values): Use @deftypeivar. Document constructors.
2037 Correct return value for toString.
2038 (Java Parser Interface): List undocumented constants/fields.
2039 Move documentation of fields added by %parse-param closer to list
2040 of members. Document that token names are added as fields.
2041 Document constructors accurately. Remove error method.
2042 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2043 Interface. Describe %code lexer and yylex accutately.
2044 Remove documentation that does not match the code.
2045 (Java Action Features): New.
2046 (Java Differences): Add reference. Add item on semantic values.
2047 Add note about @{ ... @}. Clarify %% epilogue placement.
2048 (Java Declarations Summary): New.
2049
2050 Fix Java skeleton.
2051 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2052 (b4_remove_comma): Quote test argument.
2053 (b4_identification): Remove "bison" field.
2054 * tests/java.at (Java parser class and package names): New test.
2055 (Java %parse-param and %lex-param): New test.
2056 (Java stype, position_class and location_class): New test.
2057
2058 2008-10-31 Di-an Jan <dianj@freeshell.org>
2059
2060 * data/lalr1.jave: Update copyright years.
2061 (YYParser): Correct name of "generated from" file in Javadoc:
2062 use b4_file_name instead of @ofile@.
2063 (Location constructor): Correct Javadoc parameter name.
2064 (yylloc): Add missing opening m4 quote after b4_location_if.
2065 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2066 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2067 (YYParser constructor): Correct Javadoc parameter name.
2068
2069 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2070
2071 Always put auxiliary code files in the same dir as other output files.
2072 * src/files.c (compute_file_name_parts): When the user specifies
2073 --output but not --file-prefix, extract the directory prefix from the
2074 file prefix not from the grammar file name. This affects the location
2075 of files like location.hh generated by the C++ skeleton. The includes
2076 in the other output files require this fix.
2077 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2078 for expected output files.
2079 (Output files): Add a test for the above.
2080
2081 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2082
2083 * gnulib: Update submodule to HEAD.
2084
2085 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2086
2087 Update copyright year.
2088 * src/files.c: Here.
2089
2090 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2091
2092 Don't overwrite the input file.
2093 * src/files.c (output_file_name_check): Fatal error if using input file
2094 for output.
2095 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2096 argument.
2097 (Conflicting output files): Add test.
2098
2099 2008-10-28 Akim Demaille <demaille@gostai.com>
2100
2101 Space changes.
2102 * data/lalr1.cc: Formatting changes.
2103
2104 2008-10-28 Akim Demaille <demaille@gostai.com>
2105
2106 Don't define debugging functions when !YYDEBUG.
2107 * data/lalr1.cc (debug_stream, set_debug_stream)
2108 (debug_level_type, debug_level, set_debug_level): Don't
2109 declare them when YYDEBUG is not defined.
2110 The implementation are already YYDEBUG-aware.
2111
2112 2008-10-28 Akim Demaille <demaille@gostai.com>
2113
2114 Prefer "continue" for empty loop bodies.
2115 * etc/bench.pl.in: Use "continue" instead of {}.
2116
2117 2008-10-28 Akim Demaille <demaille@gostai.com>
2118
2119 Space and comments changes.
2120 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2121 * data/c.m4, data/lalr1.cc: Space changes.
2122
2123 2008-10-28 Akim Demaille <demaille@gostai.com>
2124
2125 Make gnulib a submodule.
2126 * gnulib: New.
2127 * .gitmodules (gnulib): New.
2128
2129 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2130
2131 Fix yyerror_range for user-defined location type in C++. Reported by
2132 Georg Sauthoff at
2133 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2134 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2135 * THANKS (Georg Sauthoff): Add.
2136
2137 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2138
2139 Update several administrative files mainly to facilitate releasing.
2140 * HACKING (Administrivia): Make the git-merge-changelog notes more
2141 helpful.
2142 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2143 (Release Procedure): Update for git and add numerous details that were
2144 previously missing.
2145 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2146 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2147 that announcements don't claim we bootstrapped with whatever bison
2148 happened to be in PATH. Add flex as a bootstrap tool.
2149 * Makefile.maint: Remove, previously replaced by maint.mk.
2150 * Makefile.cfg: Remove, and migrate settings to...
2151 * cfg.mk: ... here for the sake of `make announcement'.
2152 * bootstrap.conf (gnulib_modules): Add announce-gen.
2153 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2154 Berry.
2155
2156 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2157
2158 Small but important bugfixes for the Java skeleton.
2159 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2160 (yy_symbol_print): Call toString on yyvaluep.
2161
2162 2008-08-29 Akim Demaille <demaille@gostai.com>
2163
2164 Clarify UPDATED use.
2165 * doc/bison.texinfo: It refers to the last edition of this file,
2166 not to the release date of Bison.
2167 Reported by Joel E. Denny.
2168
2169 2008-08-29 Akim Demaille <demaille@gostai.com>
2170
2171 * README: Update FAQ pointer.
2172 Reported by Joel E. Denny.
2173
2174 2008-08-27 Eric Blake <ebb9@byu.net>
2175
2176 Resync m4sugar from autoconf.
2177 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2178 (m4_init): Adjust to latest m4.git changes.
2179 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2180 effects.
2181 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2182 (_m4_list_cmp): Reduce side effects.
2183
2184 2008-08-27 Akim Demaille <demaille@gostai.com>
2185
2186 Check yyerrok in calc.at.
2187 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2188 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2189 expected.
2190
2191 2008-08-27 Akim Demaille <demaille@gostai.com>
2192
2193 Support yyerrok in lalr1.cc.
2194 YYBACKUP is still to import back into lalr1.cc.
2195 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2196
2197 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2198
2199 For maintainer-check*, don't recompile for a $(VERSION) update.
2200 * cfg.mk: New file.
2201 (_is-dist-target): Override the one in GNUmakefile.
2202 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2203
2204 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2205
2206 Update for recent change to gnulib.
2207 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2208 string.h now.
2209
2210 2008-08-15 Eric Blake <ebb9@byu.net>
2211
2212 Remaining m4sugar merge from autoconf.
2213 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2214 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2215 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2216 * src/output.c (output_skeleton): Tell m4 how to find it.
2217
2218 Partial m4sugar merge from autoconf: m4_map.
2219 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2220 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2221 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2222 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2223 for empty list.
2224 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2225 Likewise.
2226 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2227 declares it.
2228
2229 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2230
2231 Keep .version and PACKAGE_VERSION in sync.
2232 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2233 dependency, and add comments justifying this in more detail. Discussed
2234 starting at
2235 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2236
2237 2008-08-06 Eric Blake <ebb9@byu.net>
2238
2239 Partial m4sugar merge from autoconf: m4_shiftn.
2240 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2241 (m4_shift2, m4_shift3): New macros.
2242 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2243 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2244 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2245 * data/java.m4 (b4_remove_comma): Likewise.
2246
2247 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2248 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2249 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2250 (m4_init): Consolidate wrapped text into single m4_wrap.
2251 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2252 in wrapped text.
2253
2254 2008-08-05 Eric Blake <ebb9@byu.net>
2255
2256 Partial m4sugar merge from autoconf: builtins, version.m4.
2257 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2258 (m4_prepend): Remove, as it is unused and inherently quadratic,
2259 whereas m4_append is linear in newer m4.
2260 (m4_mkstemp): New builtin.
2261 (m4_symbols): Make rename conditional.
2262 (m4_version_prereq): Ensure fatal error if used in bison, which
2263 intentionally lacks version.m4.
2264
2265 Fix comments in m4sugar.
2266 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2267
2268 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2269
2270 Update for recent .gitignore fix in Gnulib.
2271 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2272 anchored .gitignore entries.
2273
2274 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2275
2276 Set gnu or gnits strictness.
2277 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2278 development and gnits strictness for releases. Based on Eric Blake's
2279 suggestion at
2280 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2281
2282 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2283
2284 * NEWS: Clarify documentation of %language.
2285
2286 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2287
2288 Support usage of git-merge-changelog.
2289 * .gitattributes: New.
2290 * HACKING: Document usage of git-merge-changelog.
2291 * bootstrap: Install git-merge-changelog entries in .git/config
2292 if appropriate.
2293
2294 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2295
2296 Remove remaining dependence on CVS Id keyword.
2297 * ChangeLog: For the sake of people still using CVS, don't use dollars
2298 when mentioning Id.
2299 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2300 unusual anyway.
2301 * data/xslt/xml2dot.xsl: Likewise.
2302 * data/xslt/xml2text.xsl: Likewise.
2303 * data/xslt/xml2xhtml.xsl: Likewise.
2304 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2305 * doc/Makefile.am (neutralize): Remove, no longer needed.
2306 (.x.1): Don't use neutralize.
2307 (edit): Don't substitute for ID.
2308 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2309
2310 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2311
2312 Fix dependence on computed configure variables.
2313 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2314 $(top_srcdir)/configure.ac so that changes to computed variables, such
2315 as PACKAGE_VERSION, are seen.
2316 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2317
2318 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2319
2320 Update copyright dates for recent changes.
2321 * Makefile.am: Here.
2322 * src/Makefile.am: Here.
2323 * src/reduce.c: Here.
2324 * tests/reduce.at: Here.
2325
2326 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2327
2328 Use git-version-gen for version names between releases.
2329 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2330 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2331 * .prev-version: New.
2332 * .version.in: Remove.
2333 * ChangeLog: Remove the Id previously used for capturing the CVS
2334 revision.
2335 * GNUmakefile: Remove, now copied from Gnulib.
2336 * Makefile.am: Add code suggested by comments in
2337 build-aux/git-version-gen.
2338 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2339 .prev-version, and .version.
2340 * NEWS (2.3b+): Rename to...
2341 (?.?): ... this because we're dropping the "+" version naming scheme,
2342 but, in general, we still can't be sure of our next release name.
2343 * bootstrap: Add a quick hack to remove from .gitignore the
2344 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2345 entry. This should really be fixed in gnulib instead.
2346 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2347 * configure.ac (AC_INIT): Set version name by invoking
2348 build-aux/git-version-gen.
2349 (AC_CONFIG_FILES): Remove .version, now generated by
2350 build-aux/git-version-gen.
2351 * maint.mk: New, copied from coreutils.
2352 * doc/.cvsignore (bison.1): Add.
2353 * doc/.gitignore (/bison.1): Add.
2354 * doc/bison.1: Remove, generated.
2355 * src/.cvsignore (revision.c): Remove.
2356 * src/.gitignore (/revision.c): Remove.
2357 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2358 (BUILT_SOURCES): Remove revision.c.
2359 (revision.c): Remove.
2360 * src/getargs.c (version): Don't print revision after the VERSION.
2361 * src/revision.h: Remove.
2362
2363 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2364
2365 Fix untranslatable composition of sentences. Reported by Goran
2366 Uddeborg at
2367 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2368 * THANKS (Goran Uddeborg): Add.
2369 * src/reduce.c (reduce_print): Report the number of nonterminals and
2370 rules useless in the grammar in separate sentences.
2371 * tests/reduce.at (Useless Rules): Update output.
2372 (Reduced Automaton): Likewise.
2373 (Underivable Rules): Likewise.
2374 (Empty Language): Likewise.
2375
2376 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2377
2378 Fix some .gitignore and .cvsignore problems.
2379 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2380 (insert_vc_ignore): ... this new function, which prepends `/' to all
2381 .gitignore entries before passing them to insert_sorted_if_absent.
2382 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2383 .cvsignore files are maintained even though Bison developers run
2384 bootstrap while using Git.
2385 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2386 unneeded by Bison.
2387 (gnulib): Add.
2388 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2389 unneeded. Reported by Eric Blake.
2390 * lib/.gitignore (/*~): Add.
2391 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2392 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2393 Blake.
2394 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2395
2396 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2397
2398 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2399 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2400 * bootstrap.conf (gnulib_modules): Add unsetenv.
2401 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2402 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2403 (/setenv.m4): Add.
2404 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2405 the first argument because it may become position-dependent, and unset
2406 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2407 Add comments explaining these issues in more detail.
2408
2409 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2410
2411 Add .gitignore everywhere based on .cvsignore.
2412 * .gitignore: New.
2413 * build-aux/.gitignore: New.
2414 * data/.gitignore: New.
2415 * doc/.gitignore: New.
2416 * etc/.gitignore: New.
2417 * examples/.gitignore: New.
2418 * examples/calc++/.gitignore: New.
2419 * lib/.gitignore: New.
2420 * m4/.gitignore: New.
2421 * po/.gitignore: New.
2422 * runtime-po/.gitignore: New.
2423 * src/.gitignore: New.
2424 * tests/.gitignore: New.
2425
2426 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2427
2428 * NEWS (2.3b+): New section, empty for now.
2429 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2430
2431 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2432
2433 * NEWS (2.3b): Update release date since there has been a delay in
2434 getting the announcements and tarballs out.
2435
2436 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2437
2438 * NEWS: Version 2.3b.
2439 * configure.ac (AC_INIT): Likewise.
2440 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2441
2442 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2443
2444 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2445 been doing it for years.
2446 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2447 (Release Procedure): Add FIXME about make alpha being unmaintained.
2448
2449 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2450
2451 * data/yacc.c: Reformat m4 a little for readability.
2452 * src/lalr.c (build_relations): Correct comment.
2453
2454 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2455
2456 DJGPP specific issue.
2457 * djgpp/config.sed: Fixes required to run configure scripts generated
2458 by autoconf 2.62.
2459
2460 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2461
2462 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2463 coordinator@translationproject.org.
2464
2465 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2466
2467 * THANKS: Add Eric Blake.
2468
2469 2008-04-23 Eric Blake <ebb9@byu.net>
2470
2471 Revert prior patch, by working around autoconf regression.
2472 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2473 ("Output file name: ("): Uncomment test.
2474 ("Output file name: )"): Likewise.
2475 Based on an idea from Noah Misch.
2476
2477 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2478
2479 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2480 2.61. Reported by Juan Manuel Guerrero at
2481 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2482 * tests/output.at ("Output file name: ("): Comment out test case for
2483 now.
2484 ("Output file name: )"): Likewise.
2485
2486 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2487
2488 * GNUmakefile: Update git-version-gen invocation so make dist
2489 succeeds.
2490
2491 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2492
2493 Update to the current gnulib CVS repository, and fix trigraph handling
2494 in Bison.
2495 * bootstrap: Update gnulib CVS repository URL.
2496 (symlink_to_dir): Encapsulate the code that guarantees the destination
2497 directory exists into...
2498 (check_dst_dir): ... this new function, and...
2499 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2500 fail when copying files into lib/uniwidth/.
2501 * src/output.c (prepare_symbols): When writing yytname muscles, where
2502 symbol names will be encoded in C-string literals, tell quotearg to
2503 escape trigraphs. This used to be the default in gnulib.
2504 * tests/regression.at (Token definitions): Because of the change in
2505 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2506 escapes trigraphs in symbol names. Thus, yytname no longer has
2507 trigraphs unnecessarily doubly escaped. Update test case output.
2508 Extend test case to be sure Bison's own error messages will no longer
2509 have trigraphs in symbol names unnecessarily escaped once.
2510
2511 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2512
2513 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2514 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2515 * .cvsignore: Add .version.
2516 * .version.in: New.
2517 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2518 * configure.ac (AC_CONFIG_FILES): Add .version.
2519 * build-aux/.cvsignore: Add git-version-gen.
2520
2521 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2522
2523 * NEWS (2.3a+): Mention that -g now takes an argument.
2524 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2525 consistency. Update the -g and -x entries now that they take
2526 arguments. Use brackets to indicate optional arguments.
2527 * src/getargs.c (usage): Explain the relationship between arguments of
2528 long and short options more completely. Document --defines and -d
2529 separately since the former takes an argument but, for POSIX Yacc, the
2530 latter does not.
2531 (short_options): Let -W take an optional argument like --warnings.
2532 (getargs): Sort cases.
2533
2534 2008-02-28 Akim Demaille <demaille@gostai.com>
2535
2536 * doc/bison.texinfo: Fix a few typos.
2537
2538 2008-02-28 Akim Demaille <akim@epita.fr>
2539
2540 * doc/bison.texinfo (Bison Options): Document -W.
2541 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2542
2543 2008-02-28 Akim Demaille <akim@epita.fr>
2544
2545 * src/getargs.c (short_options): Split and sort for readability.
2546 -g and -x take optional arguments, just like their long options.
2547 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2548 understand.
2549 Fix the handling of $opt which resulted in all the argument to be
2550 considered as optional.
2551
2552 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2553
2554 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2555 say its interface is experimental.
2556 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2557 Java.
2558 (Bison Options): In the -L and --language entry, mention Java.
2559 (Java Bison Interface): Say the interface is experimental.
2560 * src/getargs.c (usage): Mention -L and --language.
2561
2562 * NEWS (2.3a+): Say the push parsing interface is experimental.
2563 * doc/bison.texinfo (Push Decl): Likewise.
2564 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2565 (Push Parser Function): Likewise.
2566 (Pull Parser Function): Likewise.
2567 (Parser Create Function): Likewise.
2568 (Parser Delete Function): Likewise.
2569 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2570 yypull_parse, and yypush_parse entries.
2571
2572 * NEWS (2.3a+): Mention XML support, and say the schema is
2573 experimental.
2574 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2575 * src/getargs.c (usage): Say the XML schema is experimental.
2576
2577 * NEWS (2.3a+): Say option instead of flag.
2578
2579 2008-02-21 Wojciech Polak <polak@gnu.org>
2580
2581 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2582 text.
2583
2584 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2585
2586 Fix impure push parser compile error reported by Bob Rossi at
2587 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2588 * data/yacc.c: Clean up whitespace in the output a little.
2589 (yypstate_allocated): Define for impure push parsers regardless of
2590 whether the pull interface is also requested.
2591 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2592 check impure push parsers without the pull interface.
2593
2594 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2595 yyerror takes arguments specified by %parse-param while yypstate_new
2596 does not.
2597 * doc/bison.texinfo (Parser Create Function): Document that
2598 yypstate_new returns 0 for multiple impure parser instances.
2599 * tests/push.at (Push Parsing: Multiple impure instances): Update
2600 expected stderr output.
2601
2602 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2603
2604 * runtime-po/POTFILES.in (push.c): Remove.
2605
2606 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2607
2608 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2609 * data/push.c: Rename to...
2610 * data/yacc.c: ... this, overwriting it.
2611 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2612 `%push-pull-parser' -> `%define api.push_pull "both"'.
2613 Remove old yacc.c tests, and update push.c tests to yacc.c.
2614
2615 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2616
2617 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2618 `"%code top" blocks' instead of `%code "top" blocks'.
2619 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2620 Clean up whitespace in the output a little.
2621
2622 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2623
2624 Fix documentation problems reported by Tim Josling at
2625 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2626 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2627 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2628 integers. Explain the effect of literal string aliases on error
2629 messages. Copy token 0 documentation from the C++ skeleton
2630 documentation.
2631
2632 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2633
2634 Accept a token number in a %left, %right, or %nonassoc for POSIX
2635 conformance. Reported by Tim Josling at
2636 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2637 * NEWS (2.3a+): Mention.
2638 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2639 and code numbers are treated by precedence declarations.
2640 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2641 of symbols.1.
2642 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2643 of symbol.
2644 (symbol.prec): New, just like symbol but allows INT.
2645 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2646 longer holds.
2647 * tests/regression.at (Token number in precedence declaration): New
2648 test case.
2649
2650 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2651
2652 DJGPP specific issues.
2653 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2654 be changed. Copyright timestamp adjusted.
2655 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2656 be changed. Copyright timestamp adjusted.
2657 * djgpp/config.site: Copyright timestamp adjusted.
2658 * djgpp/config_h.sed: Copyright timestamp adjusted.
2659 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2660 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2661 filename translation list.
2662 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2663 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2664 files shall be created. Before trying to use the temp dir where the
2665 environment variable points to check that the dir really exists. If
2666 not default to the cwd as temp dir. Copyright timestamp adjusted.
2667 * djgpp/subpipe.h: Copyright timestamp adjusted.
2668 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2669
2670 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2671
2672 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2673
2674 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2675
2676 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2677 Problem reported by Claudio Saavedra in
2678 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2679
2680 2008-01-05 Wojciech Polak <polak@gnu.org>
2681
2682 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2683 document's title with the input grammar file name.
2684
2685 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2686
2687 Automate regression testing of the XML/XSLT implementation. Discussed
2688 starting at
2689 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2690 * configure.ac (XSLTPROC): New substitution.
2691 * Makefile.am (maintainer-xml-check): New phony target invoking...
2692 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2693 invoking make maintainer-check with BISON_TEST_XML=1.
2694 * tests/atlocal.in (XSLTPROC): New.
2695 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2696 not to report reachable memory when Bison is expected to have a
2697 non-zero exit status and (2) to compare XML/XSLT output with --graph
2698 and --report=all output for every working grammar when
2699 BISON_TEST_XML=1.
2700 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2701 (AT_BISON_CHECK_XML): New.
2702 (AT_QUELL_VALGRIND): New.
2703 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2704 (AT_CHECK): ... don't redefine this since this was the old way to
2705 quell Valgrind.
2706 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2707 AT_BISON_CHECK invocations.
2708 * tests/c++.at: Likewise.
2709 * tests/calc.at: Likewise.
2710 * tests/conflicts.at: Likewise.
2711 * tests/cxx-type.at: Likewise.
2712 * tests/existing.at: Likewise.
2713 * tests/glr-regression.at: Likewise.
2714 * tests/headers.at: Likewise.
2715 * tests/input.at: Likewise.
2716 * tests/java.at: Likewise.
2717 * tests/output.at: Likewise.
2718 * tests/push.at: Likewise.
2719 * tests/reduce.at: Likewise.
2720 * tests/regression.at: Likewise.
2721 * tests/sets.at: Likewise.
2722 * tests/skeletons.at: Likewise.
2723 * tests/synclines.at: Likewise.
2724 * tests/torture.at: Likewise.
2725 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2726 tends to hang xsltproc.
2727 (Big horizontal): Likewise.
2728
2729 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2730
2731 In XML output, remove redundant class attribute on symbol element.
2732 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2733 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2734 look up a symbol to determine whether it's a nonterminal or terminal.
2735 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2736 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2737
2738 Add prec/assoc information to XML output.
2739 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2740 %prec, add a percent_prec attribute.
2741 * src/print-xml.c (print_grammar): For each terminal that has a
2742 precedence or associativity, add a prec or assoc attribute.
2743 (xml_indent): New.
2744 (xml_puts): Use xml_indent.
2745 (xml_printf): Use xml_indent.
2746 * src/print-xml.h (xml_indent): Prototype.
2747
2748 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2749 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2750
2751 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2752
2753 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2754 (bison:ruleByNumber): ... this for clarity.
2755 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2756 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2757 (xsl:template match="reduction"): Update.
2758 (xsl:template match="item"): Update.
2759 (xsl:template match="reduction"): Update.
2760
2761 In the XML output, don't print the list of rules where symbols appear.
2762 Compute it in XSLT instead. Discussed at
2763 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2764 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2765 (bison:ruleByRhs): New.
2766 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2767 bison:ruleByRhs.
2768 (xsl:template match="terminal/rule"): Remove.
2769 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2770 bison:ruleByRhs.
2771 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2772 Remove.
2773 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2774 bison:ruleByRhs and mode="number-link" for rule template.
2775 (xsl:template match="terminal/rule"): Remove.
2776 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2777 bison:ruleByRhs and mode="number-link" for rule template.
2778 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2779 Rewrite as...
2780 (xsl:template match="rule" mode="number-link"): ... this.
2781 * src/print-xml.c (print_grammar): Don't print the list of rules.
2782
2783 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2784
2785 Don't let --report affect XML output; always print all information.
2786 Discussed at
2787 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2788 * src/conflicts.c (log_resolution): Implement.
2789 * src/print-xml.c (print_core): Implement.
2790 (print_state): Implement.
2791 (print_xml): Implement.
2792
2793 * NEWS (2.3a+): Fix quotes.
2794 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2795 don't let %verbose clear the list specified by --report.
2796
2797 2007-11-26 Akim Demaille <akim@epita.fr>
2798
2799 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2800
2801 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2802
2803 In the XML output, list useless and unused symbols and rules with the
2804 useful ones and add a "usefulness" attribute. Discussed starting at
2805 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2806 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2807 (grammar_rules_print_xml): Print all rules instead of just those
2808 useful in the grammar, and add a "usefulness" attribute.
2809 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2810 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2811 (print_grammar): Print all nonterminals instead of just useful ones,
2812 and add a "usefulness" attribute to nonterminals and terminals.
2813 (print_xml): Don't print a separate "reductions" or
2814 "rules-useless-in-parser" element.
2815 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2816 (reduce_xml): Remove.
2817 (reduce_token_unused_in_grammar): New.
2818 (reduce_nonterminal_useless_in_grammar): New.
2819 * src/reduce.h (reduce_xml): Remove prototype.
2820 (reduce_token_unused_in_grammar): Add prototype.
2821 (reduce_nonterminal_useless_in_grammar): Add prototype.
2822 * data/xslt/xml2text.xsl: Update for XML changes.
2823 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2824 * tests/reduce.at (Useless Terminals): Update output.
2825 (Useless Rules): Update output.
2826 (Reduced Automaton): Update output.
2827
2828 Say "Terminals unused in grammar" instead of "Unused terminals".
2829 * NEWS (2.3a+): Update.
2830 * doc/bison.texinfo (Understanding): Update example output.
2831 * src/reduce.c (reduce_output): Implement.
2832 * data/xslt/xml2text.xsl: Implement.
2833 * data/xslt/xml2xhtml.xsl: Implement.
2834
2835 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2836
2837 Accept --report-file=FILE to override the default `.output' filename.
2838 * NEWS (2.3a+): Mention.
2839 * doc/bison.texinfo (Bison Options): Add an entry.
2840 * src/files.c (compute_output_file_names): Don't override
2841 spec_verbose_file if already set.
2842 * src/getargs.c (usage): Document --report-file.
2843 (REPORT_FILE_OPTION): New anonymous enum member.
2844 (long_options): Add entry for it.
2845 (getargs): Add case for it setting spec_verbose_file.
2846
2847 * build-aux/cross-options.pl: Don't record a short option just because
2848 there's an arg.
2849 * doc/.cvsignore: Add yacc.1.
2850
2851 2007-11-14 Akim Demaille <akim@epita.fr>
2852
2853 * doc/yacc.1.in: New.
2854 * configure.ac, doc/Makefile.am: Adjust.
2855 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2856 config.h symbol.
2857 Use AC_SUBST for assignments too.
2858 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2859
2860 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2861
2862 * src/gram.c: Remove comments that duplicate comments in gram.h.
2863
2864 When reporting useless rules and nonterminals, say "useless in grammar"
2865 instead of "useless", and say "useless in parser" instead of "never
2866 reduced". Discussed starting at
2867 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2868 * NEWS (2.3a+): Mention this change.
2869 * data/xslt/xml2text.xsl: Update output text and expected input XML
2870 element names to match changes below.
2871 * data/xslt/xml2xhtml.xsl: Likewise.
2872 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2873 Contents: "Rules useless in parser due to conflicts".
2874 * doc/bison.texinfo (Decl Summary): Reword a little.
2875 (Understanding): Update example output for changes below.
2876 * src/gram.c: (rule_useful_p): Rename to...
2877 (rule_useful_in_grammar_p): ... this.
2878 (rule_useless_p): Rename to...
2879 (rule_useless_in_grammar_p): ... this.
2880 (rule_never_reduced_p): Rename to...
2881 (rule_useless_in_parser_p): ... this.
2882 (grammar_rules_print): Update for renames.
2883 (grammar_rules_print_xml): Update for renames.
2884 (grammar_rules_never_reduced_report): Rename to...
2885 (grammar_rules_useless_report): ... this since it is used for either
2886 kind of useless rule.
2887 * src/gram.h: Reword comments and update function names in prototypes.
2888 * src/main.c (main): Say "rule useless in parser due to conflicts".
2889 * src/print-xml.c (print_rules_never_reduced): Rename to...
2890 (print_rules_useless_in_parser): ... this, and rename output XML
2891 element "rules-never-reduced" to "rules-useless-in-parser".
2892 (print_xml): Update for rename.
2893 * src/print.c (print_results): Say "Rules useless in parser due to
2894 conflicts".
2895 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2896 (nonterminals_reduce): Say "nonterminal useless in grammar".
2897 (reduce_output): Say "Nonterminals useless in grammar".
2898 Say "Rules useless in grammar".
2899 (reduce_xml): Rename output XML element "useless" to
2900 "useless-in-grammar".
2901 (reduce_print): Don't report the count of grammatically useless rules
2902 as "rules never reduced" just because %yacc is specified.
2903 In the correct report of this count, say nonterminal(s) and rule(s)
2904 "useless in grammar".
2905 * tests/conflicts.at (S/R in initial): Update expected output.
2906 (Defaulted Conflicted Reduction): Likewise.
2907 (Unreachable States After Conflict Resolution): Likewise.
2908 * tests/existing.at (GNU pic Grammar): Likewise.
2909 * tests/reduce.at (Useless Nonterminals): Likewise.
2910 (Useless Rules): Likewise.
2911 (Reduced Automaton): Likewise.
2912 (Underivable Rules): Likewise.
2913 (Empty Language): Likewise.
2914
2915 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2916
2917 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2918 here document and before the EOF so that BSD's implementation of Bourne
2919 shell doesn't parse the delimiter as part of the here document.
2920 * doc/.cvsignore: Add cross-options.texi.
2921 * src/getargs.c (usage): Add a blank line after the warning categories.
2922
2923 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
2924
2925 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2926
2927 2007-11-05 Akim Demaille <akim@epita.fr>
2928
2929 Remove Id: from bison.1.
2930 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2931 (perl -0777 -pi -e 's/\.PP\nId): New.
2932 (.x.1): Use it to ignore the version control revision.
2933
2934 2007-11-05 Akim Demaille <demaille@gostai.com>
2935
2936 * build-aux/Makefile.am: Ship cross-options.pl.
2937 * doc/Makefile.am: Always refer to cross-options.texi with
2938 $(srcdir).
2939 (MAINTAINERCLEANFILES): Add it.
2940
2941 2007-11-04 Akim Demaille <demaille@gostai.com>
2942
2943 Generate the long/short option cross-table.
2944 * build-aux/cross-options.pl: New.
2945 * doc/Makefile.am (cross-options.texi): New.
2946 * doc/bison.texinfo: Use it.
2947
2948 2007-11-04 Akim Demaille <demaille@gostai.com>
2949
2950 Generate bison.1 using help2man.
2951 * doc/common.x, doc/bison.x: New.
2952 * doc/Makefile.am (bison.1, .x.1): New.
2953 The code is taken from autoconf-2.61/man/Makefile.am.
2954 * configure.ac: Look for help2man.
2955
2956 2007-11-04 Akim Demaille <demaille@gostai.com>
2957
2958 Complete --help.
2959 * src/getargs.c (usage): Document -W, make it clear that -d,
2960 -g and -x have optional arguments.
2961
2962 2007-11-04 Akim Demaille <demaille@gostai.com>
2963
2964 Find sha1sum when named gsha1sum.
2965 * bootstrap (find_tool): New.
2966 ($SHA1SUM): New.
2967
2968 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2969
2970 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2971 at
2972 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2973 * NEWS (2.3a+): Mention.
2974 * data/bison.m4 (b4_pure_if): Don't define it here.
2975 * data/c.m4 (b4_identification): Depend on individual skeletons to
2976 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2977 values of the %define variables api.pure or api.push_pull. Define
2978 YYPURE, YYPUSH, and YYPULL accordingly.
2979 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2980 glr.cc has already defined b4_pure_flag.
2981 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2982 Remove YYPUSH and YYPULL since they're back in b4_identification again.
2983 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
2984 * doc/bison.texinfo (Pure Decl): Update.
2985 (Push Decl): Update.
2986 (Decl Summary): Add api.pure to %define entry.
2987 In %pure-parser entry, say it's deprecated and reference %define.
2988 (Pure Calling): Update.
2989 (Error Reporting): Update.
2990 (C++ Scanner Interface): Update.
2991 (How Can I Reset the Parser): Update.
2992 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2993 reference %define.
2994 * src/getargs.c (pure_parser): Remove global variable.
2995 * src/getargs.h (pure_parser): Remove extern.
2996 * src/output.c (prepare): Don't define pure_flag muscle.
2997 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2998 wrapper around `%define api.pure'.
2999 * tests/calc.at (Simple LALR Calculator): Update.
3000 (Simple GLR Calculator): Update.
3001 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3002 Update.
3003 (GLR: Resolve ambiguity, pure, locations): Update.
3004 (GLR: Merge conflicting parses, pure, no locations): Update.
3005 (GLR: Merge conflicting parses, pure, locations): Update.
3006 * tests/glr-regression.at (Uninitialized location when reporting
3007 ambiguity): Update
3008 * tests/input.at (Unused %define api.pure): New test case.
3009 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3010 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3011 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3012
3013 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3014
3015 %define push_pull -> %define api.push_pull. Discussed starting at
3016 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3017 * data/push.c: Expect the new name.
3018 * data/yacc.c: Likewise.
3019 * doc/bison.texinfo (Push Decl): Update.
3020 (Decl Summary): Update %define entry.
3021 (Push Parser Function): Update.
3022 (Pull Parser Function): Update.
3023 (Parser Create Function): Update.
3024 (Parser Delete Function): Update.
3025 * tests/calc.at (Simple LALR Calculator): Update.
3026 * tests/input.at (%define enum variables): Update.
3027 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3028 (Push Parsing: Multiple impure instances): Update.
3029 (Push Parsing: Unsupported Skeletons): Update.
3030 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3031 (Exploding the Stack Size with Malloc): Update.
3032
3033 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3034 other entries some.
3035
3036 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3037
3038 For the XML output's terminal element, rename @number to @token-number,
3039 and add @symbol-number. In the nonterminal element, rename @number to
3040 @symbol-number. Discussed starting at
3041 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3042 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3043 renames.
3044 (xsl:template match="nonterminal"): Likewise.
3045 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3046 (xsl:template match="nonterminal"): Likewise.
3047 * src/print-xml.c (print_grammar): Implement.
3048
3049 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3050
3051 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3052 2007-10-11 change, the child elements here are items not rules.
3053 (xsl:template match="item"): New.
3054 (xsl:template match="rule"): Update for new reduced itemset.
3055 (xsl:template match="point"): Remove.
3056 (xsl:template match="empty"): For consistency with --graph, don't
3057 output "/* empty */".
3058 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3059 line-wrap, don't pass a negative value as first-line-length since this
3060 won't work with the following changes.
3061 (xsl:template name="line-wrap"): Simplify slightly.
3062 (xsl:template name="ws-search"): Eliminate recursion.
3063 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3064 set next to an item whose dot is not at the end of the RHS even if it
3065 happens to be associated with the same rule.
3066
3067 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3068
3069 Add %define lr.keep_unreachable_states.
3070 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3071 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3072 * src/main.c (main): Implement it.
3073 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3074 Extend to test it, and fix a typo.
3075
3076 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3077
3078 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3079 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3080 the example .output text.
3081 * tests/regression.at (Extra lookahead sets in report): Improve wording
3082 of comments.
3083
3084 2007-10-17 Wojciech Polak <polak@gnu.org>
3085
3086 * src/print-xml.c (print_grammar): Renamed
3087 <terminal> and <nonterminal> attributes:
3088 "type" to "number" and "symbol" to "name".
3089 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3090 Use new attribute names.
3091 (xsl:template match="nonterminal"): Likewise.
3092 * data/xslt/xml2xhtml.xsl: Likewise.
3093
3094 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3095
3096 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3097 (Option Cross Key): Likewise.
3098
3099 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3100 next to an item whose dot is not at the end of the RHS even if it
3101 happens to be associated with the same rule.
3102 * src/print.c (print_core): Likewise.
3103 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3104 (Resolved SR Conflicts): Update output.
3105 * tests/regression.at (Extra lookahead sets in report): New test case.
3106
3107 2007-10-11 Wojciech Polak <polak@gnu.org>
3108
3109 * src/print-xml.c (print_core): Remove item set
3110 redundancy.
3111 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3112 Improve processing time. Suggested by Joel E. Denny.
3113 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3114 Write xsl:param "required" attribute as comment.
3115 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3116 (xsl:template match="rule"): Support new reduced itemset.
3117 (xsl:template match="point"): Remove.
3118 * data/xslt/xml2xhtml.xsl: Likewise.
3119
3120 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3121
3122 * src/getargs.c (version): Update copyright year.
3123
3124 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3125
3126 Make xml2dot.xsl and --graph produce the same output.
3127 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3128 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3129 escaped later.
3130 (xsl:template name="output-node"): Use the new escape template instead
3131 of the string-replace template directly.
3132 (xsl:template name="output-edge"): Likewise.
3133 (xsl:template name="escape"): New, escapes backslashes and newlines in
3134 addition to quotation marks.
3135 * src/graphviz.c (start_graph, output_node, output_edge): Add
3136 whitespace to output for legibility.
3137
3138 Make xml2text.xsl and --report produce the same output, and remove the
3139 XML "conflicts" element since a conflict summary is easily extracted
3140 from the automaton.
3141 * data/xslt/bison.xsl: New.
3142 (xsl:template match="state" mode="bison:count-conflicts): New.
3143 * data/xslt/xml2text.xsl: Import bison.xsl.
3144 (xsl:template match="bison-xml-report"): Instead of styling the
3145 "conflicts" element, style the "automaton" element with mode
3146 "conflicts". Unlike the former, the latter lists S/R and R/R
3147 conflicts for a state on the same line.
3148 (xsl:template match="conflicts"): Remove.
3149 (xsl:template match="conflict"): Remove.
3150 (xsl:template match="terminal"): Line-wrap the list of rules in which
3151 the terminal is used.
3152 (xsl:template match="nonterminal"): Likewise for nonterminals.
3153 (xsl:template match="automaton" mode="conflicts"): New.
3154 (xsl:template match="state" mode="conflicts"): New.
3155 (xsl:template name="line-wrap"): New.
3156 (xsl:template name="ws-search"): New.
3157 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3158 (xsl:template match="bison-xml-report"): Instead of styling the
3159 "conflicts" element, style the "automaton" element with mode
3160 "conflicts."
3161 (xsl:template match="conflicts"): Remove.
3162 (xsl:template match="conflict"): Remove.
3163 (xsl:template match="automaton" mode="conflicts"): New.
3164 (xsl:template match="state" mode="conflicts): New.
3165 * src/conflicts.c (conflicts_output_xml): Remove.
3166 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3167 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3168 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3169 the corresponding XSLT is easier. Also, never wrap between a word and
3170 the comma that follows it.
3171
3172 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3173
3174 Improve C++ namespace support. Discussed starting at
3175 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3176 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3177 b4_namespace_close): New macros that interpret the %define variable
3178 "namespace" so its value can contain "::" to indicate nested
3179 namespaces.
3180 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3181 the above macros.
3182 * data/lalr1.cc (b4_namespace): Likewise.
3183 * data/location.cc (b4_namespace): Likewise.
3184 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3185 inside a new table in the general %define entry. Document `%define
3186 namespace' there as well. Point the %name-prefix entry to it since it
3187 explains it more completely in the case of C++.
3188 (C++ Bison Interface): Mention `%define namespace' instead of
3189 %name-prefix.
3190 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3191 entry suffices.
3192 * tests/c++.at (Relative namespace references): New test case.
3193 (Absolute namespace references): New test case.
3194 (Syntactically invalid namespace references): New test case.
3195 * tests/input.at (C++ namespace reference errors): New test case.
3196
3197 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3198
3199 Add syncline support and location accessor to internal %define
3200 interfaces.
3201 * data/bison.m4 (b4_percent_define_get_loc): New.
3202 (b4_percent_define_get_syncline): New.
3203 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3204 (b4_percent_define_default): Record defining location as line 1 rather
3205 than 0 for the sake of synchronizing #line's, and define
3206 b4_percent_define_syncline(VARIABLE).
3207 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3208 * src/muscle_tab.c (muscle_syncline_grow): New.
3209 (muscle_code_grow): Use muscle_syncline_grow.
3210 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3211 define b4_percent_define_syncline(VARIABLE).
3212 (muscle_percent_define_get_loc): New.
3213 (muscle_percent_define_get_syncline): New.
3214 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3215 remove some unused variables.
3216 (muscle_percent_define_default): Record defining location as line 1
3217 rather than 0 for the sake of synchronizing #line's, and define
3218 b4_percent_define_syncline(VARIABLE).
3219 (muscle_percent_define_check_values): Use
3220 muscle_percent_define_get_loc.
3221 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3222 (muscle_percent_define_get_syncline): Prototype.
3223 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3224 defaults): Update output for location change.
3225 (Complaining during macro argument expansion): Extend to test
3226 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3227
3228 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3229
3230 Fix some error-reporting macro bugs.
3231 * data/bison.m4 (b4_cat): New.
3232 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3233 to stdout so they don't become arguments to other macros. Update
3234 comments and add examples.
3235 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3236 add examples.
3237 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3238 after printing the error directive so that M4 doesn't report subsequent
3239 problems that are induced by this problem.
3240 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3241 instead of just in them. Recognize @\n in both places. Both expand to
3242 the empty string. Needed by b4_cat.
3243 * tests/skeletons.at (Complaining during macro argument expansion):
3244 New test case.
3245 (Fatal errors make M4 exit immediately): New test case.
3246
3247 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3248
3249 Implement --print-datadir.
3250 * src/getargs.c (usage): Mention.
3251 (PRINT_DATADIR_OPTION): New anonymous enum member.
3252 (long_options): Add entry for it.
3253 (getargs): Add case for it calling compute_pkgdatadir.
3254 * src/output.c (output_skeleton): Encapsulate data directory
3255 computation from here...
3256 (prepare): ... and from here...
3257 (compute_pkgdatadir): ... into this new function.
3258 * src/output.h (compute_pkgdatadir): Prototype.
3259
3260 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3261
3262 * src/print-xml.c (escape_bufs): New static global variable
3263 replacing...
3264 (xml_escape_n): ... the static local variable buf here.
3265 (print_xml): Free memory for escape_bufs.
3266 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3267
3268 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3269
3270 Replace `%push-parser' and `%push-pull-parser' with
3271 `%define push_pull "push"' and `%define push_pull "both"'.
3272 `%define push_pull "pull"' is the default.
3273 * doc/bison.texinfo (Push Decl, Push Parser Function,
3274 Pull Parser Function, Parser Create Function, Parser Delete Function):
3275 Update declarations.
3276 (Decl Summary, Table of Symbols): Replace %push-parser and
3277 %push-pull-parser entries with a %define push_pull entry.
3278 * data/bison.m4 (b4_percent_define_check_values): New macro.
3279 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3280 definitions...
3281 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3282 definitions...
3283 * data/push.c: ... to here and compute them from the value of the
3284 %define variable push_pull.
3285 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3286 parsing requests here...
3287 * data/yacc.c: ... hack this to switch to push.c any time
3288 b4_use_push_pull_flag or the %define variable push_pull is set. This
3289 will go away when we mv push.c yacc.c.
3290 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3291 push parsing is not supported since unused %define variables are
3292 reported anyway.
3293 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3294 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3295 comments for consistency with b4_percent_define_check_values.
3296 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3297 muscles.
3298 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3299 Remove.
3300 (prologue_declaration): Remove %push-parser and %push-pull-parser
3301 rules.
3302 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3303 * tests/calc.at: Update declarations.
3304 * tests/input.at (%define enum variables): New test case.
3305 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3306 declaration.
3307 (Push Parsing: Multiple impure instances): Update declaration.
3308 (Push Parsing: Unsupported Skeletons): New test case.
3309 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3310 declaration.
3311 (Exploding the Stack Size with Malloc): Update declaration.
3312
3313 2007-09-24 Wojciech Polak <polak@gnu.org>
3314
3315 Add XSLT transformations.
3316
3317 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3318 * data/xslt/xml2text.xsl: Transform XML into plain text.
3319 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3320 * data/Makefile.am (xsltdir): New variable.
3321 (dist_xslt_DATA): Add xslt/*.xsl files.
3322
3323 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3324
3325 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3326 Problem reported by Wojciech Polak.
3327 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3328 (xml_printf): Undo change I made on 21 September; that is,
3329 indent 2 spaces, not 1.
3330
3331 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3332
3333 Pacify ./configure --enable-gcc-warnings.
3334 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3335 `char const *' instead of `char *'.
3336 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3337 local variable `sep'.
3338
3339 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3340
3341 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3342 elsewhere.
3343 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3344 (xml_printf): Indent just 1 space for level.
3345 (e_char, xlate_char): Remove.
3346 (xml_escape_string): Rewrite to avoid undefined behavior (used
3347 storage that was freed from the stack).
3348 (xml_escape_n): Don't bother checking for subscript error.
3349
3350 2007-09-21 Wojciech Polak <polak@gnu.org>
3351
3352 Add Bison XML Automaton Report.
3353
3354 Add support for an -x option to generate an XML report.
3355 It is not documented yet.
3356 * src/print-xml.c: New file.
3357 * src/print-xml.h: Likewise.
3358 * lib/timevar.def (TV_XML): New var.
3359 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3360 * src/conflicts.c: Include print-xml.h.
3361 (solved_conflicts_xml_obstack): New var.
3362 (log_resolution, conflicts_solve, conflicts_free):
3363 Add support for XML report.
3364 (conflicts_output_val): New function.
3365 * src/conflicts.h (conflicts_output_val): New decl.
3366 * src/files.c (spec_xml_file): New var.
3367 (compute_output_file_names, output_file_names_free): Add XML support.
3368 * src/files.h (spec_xml_file): New decl.
3369 * src/getargs.c (xml_flag): New var.
3370 (usage, short_options, long_options, getargs): Add XML support.
3371 * src/getargs.h (xml_flag): New decl.
3372 * src/gram.c: Include print-xml.h.
3373 (rule_lhs_print_xml, rule_rhs_print_xml):
3374 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3375 New functions.
3376 * src/gram.h: Declare external ones.
3377 * src/main.c: Include print-xml.h.
3378 (main): Add XML support.
3379 * src/reduce.c: Include print-xml.h.
3380 (reduce_xml): New function.
3381 * src/reduce.h: Declare it.
3382 * src/state.c: Include print-xml.h.
3383 (state_new): Add XML support.
3384 (state_rule_lookahead_tokens_print_xml): New function.
3385 * src/state.h: Declare it.
3386 (struct state): New member solved_conflicts_xml.
3387 * src/symtab.c (symbol_class_get_string): New function.
3388 * src/symtab.h: Declare it.
3389
3390 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3391
3392 * GNUmakefile: Switch to coreutils's version.
3393 * bootstrap: Likewise.
3394 * Makefile.cfg: Adjust to new GNUmakefile.
3395 * README-hacking: Likewise.
3396
3397 Import from gnulib:
3398
3399 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3400 Bruno Haible <bruno@clisp.org>
3401
3402 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3403 and is a script that invokes bison. Tighten the code. Add comments.
3404
3405 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3406
3407 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3408 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3409 * doc/bison.texinfo (Decl Summary): Fix.
3410 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3411 * tests/input.at (Boolean %define variables): Update output.
3412 * tests/skeletons.at (%define boolean variables: invalid skeleton
3413 defaults): Rename to...
3414 (%define Boolean variables: invalid skeleton defaults): ... this and
3415 update output.
3416
3417 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3418
3419 In impure push mode, don't allow more than one yypstate to be allocated
3420 since multiple impure parsers would corrupt yynerrs.
3421 * data/push.c (yypstate_allocated): New static global variable
3422 initialized to 0.
3423 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3424 exhaustion if yypstate_allocated is 1, but still return 2.
3425 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3426 already 1. Otherwise, set it to 1.
3427 (yypstate_delete): Set it to 0.
3428 * tests/push.at (Push Parsing: Multiple impure instances): New test
3429 case.
3430
3431 2007-08-17 Bob Rossi <bob@brasko.net>
3432
3433 * doc/bison.texinfo (Push Decl): Document the push parser.
3434 (Table of Symbols): Ditto.
3435 (Pure Decl): Ditto.
3436 (Decl Summary): Ditto.
3437 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3438 Parser Create Function, Parser Delete Function):
3439 Add new push parser symbols.
3440 (Table of Symbols): Document push-parser, push-pull-parser,
3441 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3442
3443 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3444
3445 Update to GPLv3.
3446 * doc/gpl-3.0.texi: New file.
3447 * doc/gpl.texi: Remove.
3448 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3449 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3450 * README-hacking, TODO, bootstrap, bootstrap.conf:
3451 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3452 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3453 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3454 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3455 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3456 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3457 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3458 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3459 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3460 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3461 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3462 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3463 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3464 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3465 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3466 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3467 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3468 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3469 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3470 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3471 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3472 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3473 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3474 * src/complain.c, src/complain.h, src/conflicts.c:
3475 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3476 * src/files.h, src/flex-scanner.h, src/getargs.c:
3477 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3478 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3479 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3480 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3481 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3482 * src/print.c, src/print.h, src/print_graph.c:
3483 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3484 * src/reduce.h, src/relation.c, src/relation.h:
3485 * src/revision.h, src/scan-code.h, src/scan-code.l:
3486 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3487 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3488 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3489 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3490 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3491 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3492 * tests/existing.at, tests/glr-regression.at:
3493 * tests/headers.at, tests/input.at, tests/java.at:
3494 * tests/local.at, tests/output.at, tests/push.at:
3495 * tests/reduce.at, tests/regression.at, tests/sets.at:
3496 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3497 * tests/torture.at:
3498 Update to GPLv3.
3499
3500 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3501
3502 Get rid of broken %no-parser, -n, and --no-parser implementation and
3503 documentation.
3504 * TODO: Don't mention them.
3505 * doc/bison.1: Likewise.
3506 * doc/bison.texinfo (Decl Summary): Likewise.
3507 (Bison Options): Likewise.
3508 (Option Cross Key): Likewise.
3509 * src/getargs.c (no_parser_flag): Remove global variable.
3510 (usage): Don't print description of -n and --no-parser.
3511 (long_options): Remove --no-parser entry here.
3512 (getargs): Remove -n case in the switch here.
3513 * src/getargs.h (no_parser_flag): Remove extern.
3514 * tests/regression.at (Web2c Actions): Remove comment that mentions
3515 --no-parser.
3516
3517 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3518
3519 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3520 name user variables starting with `yy'. Just pass NULL instead of a
3521 dummy local &yylval to yypush_parse.
3522 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3523 starting with `yy'.
3524
3525 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3526
3527 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3528 true since it's then always used regardless of whether yyoverflow is
3529 defined. Reported by Christian Burger at
3530 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3531 * THANKS: Add Christian Burger.
3532
3533 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3534 node names: say "Decl Summary" not "Bison Declaration Summary".
3535
3536 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3537
3538 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3539 determine whether this function has already complained about an invalid
3540 value for a %define boolean variable, don't check whether Bison has
3541 ever examined the value. As written, the check was a tautology.
3542 Instead, record and check for this complaint using a separate muscle.
3543
3544 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3545
3546 Fix push parsing memory leak reported by Brandon Lucia at
3547 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3548 * THANKS: Add Brandon Lucia.
3549 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3550 but the parse never completed and thus freed it.
3551 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3552 * tests/testsuite.at: Include push.at.
3553 * test/push.at: New.
3554 (Push Parsing: Memory Leak for Early Deletion): New test case.
3555
3556 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3557
3558 Improve handling of multiple S/R conflicts in the same state and of S/R
3559 conflicts involving multiple reductions.
3560 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3561 set for a state here or Bison will abort if it is reassigned on a
3562 later conflicted reduction in the same state.
3563 Similarly, don't finalize and assign the solved conflicts report here
3564 or it will be lost if it is reassigned on a later conflicted reduction
3565 in the same state.
3566 (set_conflicts): Instead, assign them both here after all S/R conflicts
3567 in the state have been fully examined.
3568 * src/print.c (shift_set): Rename to...
3569 (no_reduce_set): ... this.
3570 (print_reductions): Update for rename, and add %nonassoc error action
3571 tokens to no_reduce_set so that, when printing the first remaining
3572 reduction on an error action token, the reduction is enclosed in
3573 brackets.
3574 (print_results): Update for rename.
3575 * tests/conflicts.at (Solved conflicts report for multiple reductions
3576 in a state): New test case.
3577 (%nonassoc error actions for multiple reductions in a state): New test
3578 case.
3579
3580 * src/main.c (main): Don't depend on C99 features.
3581
3582 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3583
3584 * build-aux/.cvsignore: Add compile.
3585 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3586 uniwidth.
3587
3588 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3589
3590 * bootstrap (slurp): Create target directories that don't exist.
3591 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3592
3593 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3594
3595 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3596 than item number.
3597 * closure.c (closure): Likewise.
3598 * state.h (reductions): Comment sorting of rules.
3599 (state): Comment sorting of items.
3600
3601 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3602
3603 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3604 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3605 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3606 definition in order to avoid Gnulib headers since we don't use config.h
3607 here.
3608 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3609 rather than AT_DATA so that config.h is included.
3610
3611 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3612
3613 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3614 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3615 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3616 and so that YYFPRINTF is guaranteed to be defined here.
3617
3618 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3619
3620 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3621 with...
3622 (muscle_percent_define_check_values): ... this more helpful function.
3623 Again, it's not used yet, but it will be.
3624 * src/muscle_tab.h: Likewise.
3625
3626 Improve some comments in parser table construction.
3627 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3628 (generate_states): Don't mention ruleset, which is internal to closure.
3629 * src/closure.c (closure): Explain sorting of core and itemset, which
3630 is required for this function to behave correctly.
3631 * src/closure.h (closure): Mention sorting.
3632
3633 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3634
3635 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3636 move the check for disabled transitions to an aver since conflict
3637 resolution hasn't happened yet.
3638
3639 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3640 labels a state as inconsistent just because it has error transitions.
3641 The original form of this check appeared in revision 1.1 of lalr.c,
3642 which was committed on 1991-12-21. Now (at least), changing the
3643 consistency label on such a state appears to have no useful effect in
3644 any of the places it is examined, which I enumerate below. The key
3645 point to understanding each item in this enumeration is that a state
3646 with an error transition is labelled consistent in the first place only
3647 if it has no rules, so the check cannot matter for states that have
3648 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3649 to try to identify its conflicts, and a state must have *rules* to have
3650 conflicts. (2) Labelling a state as inconsistent will affect how
3651 action_row sets the default *rule* for the state. (3) Labelling a
3652 state as inconsistent will cause build_relations to add lookback edges
3653 to *rules* in that state.
3654 * src/state.h (struct state): Word the comment for member consistent
3655 more carefully.
3656
3657 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3658
3659 Don't depend on C99 features.
3660 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3661 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3662 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3663 * src/state.c (state_mark_reachable_states): Fix for-loop.
3664 (state_remove_unreachable_states): Fix for-loop.
3665
3666 Don't widen struct state with member reachable just to temporarily
3667 record reachability. Instead, use a local bitset.
3668 * src/state.h (struct state): Remove member.
3669 * src/state.c (state_new): Don't initialize it.
3670 (state_mark_reachable_states): Rename to...
3671 (state_record_reachable_states): ... this, and use bitset.
3672 (state_remove_unreachable_states): Use bitset.
3673
3674 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3675
3676 * src/Makefile.am (yacc): Quote target action commands properly so
3677 that the yacc script isn't corrupt. Reported by Hans Aberg at
3678 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3679
3680 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3681 the case of pure parsers. Reported by Frans Englich at
3682 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3683 * THANKS: Add Frans Englich.
3684
3685 * NEWS (2.3a+): In the %code entry, reference section `Bison
3686 Declaration Summary' from the manual now since the %code summary has
3687 moved there.
3688 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3689 in the rules section must be terminated by semicolons.
3690
3691 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3692
3693 Extend the front-end API for %define variables to more completely
3694 mirror the back-end. This will be useful in the future.
3695 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3696 Update comments to mention the new front-end counterparts of these
3697 macros.
3698 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3699 for muscle_string_decode and muscle_location_decode.
3700 (muscle_string_decode): New static function.
3701 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3702 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3703 functions.
3704 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3705 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3706 implementation more closely.
3707 (muscle_percent_define_invalid_value): New function.
3708 * src/muscle_tab.h (muscle_percent_define_get,
3709 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3710 Prototype.
3711
3712 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3713
3714 * NEWS (2.3a+): Mention yesterday's state-removal change.
3715 (2.3a): Remove the %language entry, which was added after 2.3a.
3716 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3717 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3718 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3719 tests/existing.at: Update copyright date.
3720
3721 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3722
3723 If conflict resolution makes states unreachable, remove those states,
3724 report rules that are then unused, and don't report conflicts in those
3725 states.
3726 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3727 New global function.
3728 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3729 function.
3730 * src/main.c (main): After conflict resolution, remove the unreachable
3731 states and update all data structures that reference states by number.
3732 * src/state.c (state_new): Initialize each state's reachable member to
3733 false.
3734 (state_mark_reachable_states): New static function.
3735 (state_remove_unreachable_states): New global function.
3736 * src/state.h (struct state): Add member bool reachable.
3737 (state_remove_unreachable_states): Prototype.
3738 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3739 New test case.
3740 * tests/existing.at (GNU pic Grammar): Update test case output now that
3741 an unused rule is discovered.
3742
3743 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3744
3745 Minor code cleanup in parser table construction.
3746 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3747 (new_itemsets, save_reductions): Update for rename to nitemset.
3748 * src/closure.c (nritemset): Rename to...
3749 (nitemset): ... this since the "r" appears to meaningless and isn't
3750 used in the comments.
3751 (closure): Update for rename.
3752 * src/closure.h (nritemset): Update extern to...
3753 (nitemset): ... this.
3754 * src/lalr.c (LA): Fix a typo in comments.
3755 * src/print.c (print_core): Update for rename to nitemset.
3756 * src/print_graph.c (print_graph): Likewise.
3757 * src/state.h: Fix some typos in header comments.
3758
3759 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3760
3761 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3762 still sticks to ASCII. Sorry!
3763
3764 * README-hacking: New file, taken mostly from coreutils, with changes
3765 for Bison. Contains much of the contents of:
3766 * README-cvs: Remove.
3767 * bootstrap: Sync from gnulib.
3768 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3769 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3770
3771 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3772
3773 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3774 Setzer.
3775 (Java Differences): Fix some typos.
3776 * THANKS: Add Sebastian Setzer.
3777
3778 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
3779
3780 * data/java.m4 (b4_single_class_if): Remove.
3781 (b4_abstract_if): Look at "%define abstract".
3782 (b4_lexer_if): New.
3783 (b4_union_name): Rename...
3784 (b4_yystype): ... to this. Map to "%define stype".
3785 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3786 b4_maybe_throws): Fix quoting.
3787 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3788 * data/lalr1.java (Lexer interface): Always define.
3789 (Lexer interface within parser class): Remove.
3790 (YYLexer class): New, used when "%code lexer" is present.
3791 (constructor): When "%code lexer" is used, pass %lex-param
3792 to the lexer constructor.
3793 (yylex, yyparse): Remove %lex-param from method invocations
3794 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3795
3796 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3797 abstract". Rename "%define union_name" to "%define stype".
3798 Rename method names according to previous patch.
3799 (Java Scanner Interface): Describe "%code lexer" instead of
3800 "%pure-parser" and "%define single_class".
3801 (Java Differences): Mention "%code lexer".
3802
3803 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3804 Include scanner here, using macros from tests/local.at.
3805 (AT_DATA_CALC_Y): Remove final argument.
3806 (_AT_CHECK_JAVA_CALC): Likewise.
3807 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3808 of %locations and %error-verbose.
3809 (main): Test with and without %lex-param.
3810 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3811 (AT_BISON_OPTION_POPDEFS): Pop it.
3812
3813 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3814
3815 DJGPP spefic issue. Inhibit the use of disallowed characters for
3816 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3817 and concern testsuite case 46.
3818 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3819 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3820 * djgpp/config.bat: Inhibit the use of disallowed characters.
3821
3822 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3823
3824 Miscellaneous %define and %code cleanup.
3825 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3826 values are interpreted.
3827 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3828 documentation a little more.
3829 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3830 muscle_percent_define_insert, muscle_percent_code_grow): New
3831 functions/macros.
3832 * src/muscle_tab.h (muscle_percent_define_insert,
3833 muscle_percent_code_grow): Prototype.
3834 * src/parse-gram.y (prologue_declaration): Use
3835 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3836 %define and %code directives.
3837
3838 Make it easy to share %define boolean variables between the front-end
3839 and back-end. Though not used yet, this will be useful in the future.
3840 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3841 Bison uses of names rather than just skeleton uses of names.
3842 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3843 b4_percent_define_skeleton_variables(VARIABLE) to
3844 b4_percent_define_bison_variables(VARIABLE).
3845 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3846 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3847 b4_percent_code_bison_qualifiers(QUALIFIER).
3848 (b4_check_user_names_wrap): Update for renames.
3849 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3850 muscle_percent_define_default): New functions mimicking
3851 b4_percent_define_flag_if and b4_percent_define_default.
3852
3853 For %define variables, report locations for invalid values and
3854 redefinitions.
3855 * data/bison.m4 (b4_percent_define_flag_if): Read
3856 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3857 value for VARIABLE.
3858 (b4_percent_define_default): Save a special location in
3859 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3860 must later be reported as invalid.
3861 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3862 functions.
3863 (muscle_percent_define_insert): Record the location of VARIABLE in
3864 muscle percent_define_loc(VARIABLE), and use it to report the previous
3865 location for a redefinition.
3866 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3867 (muscle_percent_define_default): Update like b4_percent_define_default.
3868 (muscle_grow_user_name_list): Rename to...
3869 (muscle_user_name_list_grow): ... this for consistency and use
3870 muscle_location_grow.
3871 * src/muscle_tab.h (muscle_location_grow): Prototype.
3872 * tests/input.at (%define errors): Update expected output.
3873 * tests/skeletons.at (%define boolean variables: invalid skeleton
3874 defaults): New test case.
3875
3876 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3877
3878 * src/print.c (lookahead_set, state_default_rule): Remove.
3879 (print_reductions): Replace state_default_rule invocation with
3880 equivalent use of yydefact, which was computed in token_actions in
3881 tables.c.
3882 (print_results): Don't allocate lookahead_set.
3883
3884 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
3885
3886 * data/lalr1.java: Prefix all private members with yy.
3887
3888 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3889
3890 Use YYFPRINTF instead of fprintf where appropriate. Reported by
3891 Sebastien Fricker at
3892 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
3893 * THANKS: Add Sebastien Fricker.
3894 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3895 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3896 accept a variable number of arguments.
3897
3898 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3899
3900 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3901
3902 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3903
3904 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3905 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3906 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3907
3908 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3909
3910 Undo my 2007-02-07 change, switching back to the c-strcase module
3911 introduced in the 2007-02-03 change. Bruno Haible reported that
3912 the 2007-02-07 change would be dangerous in Turkish if we add a
3913 language whose name contains "i", since "i" is not lowercase "I"
3914 in Turkish.
3915 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3916 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3917 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3918 * m4/.cvsignore: Remove strcase.m4.
3919 * src/getargs.c: Revert 2007-02-07 change, as follows.
3920 Include c-strcase.h.
3921 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3922
3923 2007-02-11 Bruno Haible <bruno@clisp.org>
3924
3925 Enable the Java related testsuite tests when the only Java compiler
3926 found is a gcj < 4.3. Discussed at
3927 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3928 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3929
3930 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3931
3932 * data/Makefile.am: Update copyright date.
3933 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3934 yypstate_new returns NULL.
3935 (yypstate_new): Return NULL if malloc does.
3936 * src/reader.c (packgram): Move translation of rule actions from the
3937 beginning of packgram to...
3938 (check_and_convert_grammar): ... here right before packgram is invoked
3939 so it's easier to write more complete comments, and remove redundant
3940 code.
3941
3942 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3943
3944 As in semantic actions, make @$ in %initial-action, %destructor, and
3945 %printer imply %locations.
3946 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3947 scanning @$.
3948 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3949 (@$ in %initial-action implies %locations,
3950 @$ in %destructor implies %locations,
3951 @$ in %printer implies %locations): ... these new test cases.
3952
3953 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3954
3955 Undo most of the 2007-02-03 change, switching to the strcase module
3956 now that gnulib strcase has been fixed.
3957 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3958 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3959 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3960 * m4/.cvsignore: Add strcase.m4.
3961 * src/getargs.c: Revert 2007-02-03 change, as follows.
3962 Don't include c-strcase.h.
3963 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3964 strcasecmp has "unspecified behavior" outside the POSIX locale,
3965 but it works fine in practice if at least one argument is ASCII,
3966 as is the case in Bison.
3967
3968 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
3969
3970 * tests/java.at: Skip tests if only one of javac/java is present.
3971 Reported by Joel E. Denny.
3972 * tests/atlocal.in: Adjust copyright years.
3973
3974 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3975
3976 * data/lalr1.java (Stack): Work around old verifiers that disallow
3977 access to the private fields of an inner class, from the outer class.
3978 We can make Stack's fields public because user code doesn't have access
3979 to the instance of Stack used by parse(). Reported by Paul Eggert.
3980
3981 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3982
3983 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3984 the right spot for these files?
3985 * bootstrap.conf (gnulib_modules): Add c-strcase.
3986 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3987 c-strncasecmp.c.
3988 * src/getargs.c: Include c-strcase.h.
3989 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3990 to avoid unspecified behavior.
3991
3992 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3993
3994 * doc/bison.texinfo (Decl Summary): Correct typo.
3995
3996 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
3997
3998 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3999 Complain if the value does not match empty, "true" or "false".
4000 * data/c++.m4: Adjust default definitions of %define variables.
4001 * data/java.m4: Adjust default definitions of %define variables.
4002 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4003 to above behavior.
4004 * tests/input.at (Boolean %define variables): Test new behavior.
4005
4006 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4007
4008 * NEWS: Mention java.
4009 * TODO: Remove things that are done.
4010 * bootstrap.conf: Add javacomp-script and javaexec-script.
4011 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4012
4013 * data/Makefile.am: Add new files.
4014 * data/java-skel.m4: New.
4015 * data/java.m4: New.
4016 * data/lalr1.java: New.
4017
4018 * doc/bison.texinfo: Put "A Complete C++ Example" under
4019 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4020 under Other Languages.
4021
4022 * src/getargs.c (valid_languages): Add Java.
4023 * src/getargs.h (struct bison_language): Update size of string fields.
4024
4025 * tests/Makefile.am: Add java.at.
4026 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4027 * tests/java.at: New.
4028 * tests/testsuite.at: Include it.
4029
4030 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4031
4032 Clean up.
4033 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4034 at_directive_argv arguments so these no longer have to be global
4035 variables. Also, update the implementation for the following changes.
4036 (fail_for_at_directive_too_many_args,
4037 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4038 (at_directive_name): Remove as at_directive_argv[0] will be used for
4039 this now.
4040 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4041 for the directive name.
4042 (at_directive_argc, at_directive_argv): Make these local within
4043 skel_lex instead of global.
4044 (INITIAL): Update directive start action for above changes.
4045 (SC_AT_DIRECTIVE_ARG): Rename to...
4046 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4047 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4048 (scan_skel): Move yylex_destroy to...
4049 (skel_scanner_free): ... here.
4050 * tests/skeletons.at (installed skeleton file name): Rename to...
4051 (installed skeleton file names): ... this.
4052
4053 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4054
4055 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4056 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4057 Summary" not "Directives".
4058 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4059 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4060 since the former is now the more complete one.
4061 (Prologue Alternatives): Likewise and do the same for %defines.
4062 (Table of Symbols): Add summary of %code, add summary of %define, and
4063 move full %code documentation to...
4064 (Decl Summary): ... here for consistency with other entries in these
4065 sections.
4066 Move %define entry in order to keep this list alphabetized.
4067 Reword %define entry a little to put less emphasis on the skeleton
4068 concept, which most users shouldn't have to think about.
4069
4070 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4071
4072 Adjust to recent gnulib changes.
4073 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4074 Add string.h, string_.h, unistd_.h, wchar_.h.
4075 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4076 * src/system.h: Don't include <stpcpy.h>; this is now done by
4077 <string.h>.
4078
4079 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4080
4081 Simplify implementation of unqualified %code, implement macros for
4082 uniform treatment of boolean %define flags. Document %define.
4083 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4084 b4_percent_code_ifdef): New.
4085 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4086 * data/c++.m4: Define default value for global_tokens_and_yystype.
4087 * data/glr.cc: Likewise.
4088 * data/location.cc: Use b4_percent_define_flag_if.
4089
4090 * doc/bison.texinfo (Decl Summary): Document %define.
4091
4092 * src/parse-gram.y (Unqualified %code): Change muscle name to
4093 b4_percent_code().
4094 (content.opt): Default to empty.
4095
4096 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4097
4098 Implement support for relative and absolute skeleton file names.
4099 Discussed starting at
4100 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4101 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4102 (Bison Options): Document in --skeleton entry.
4103 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4104 full_skeleton can't necessarily hold all of pkgdatadir.
4105 If the specified skeleton file name contains a `/', don't prepend
4106 pkgdatadir.
4107 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4108 file name contains a `/', prepend the grammar file directory.
4109 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4110 * skeletons.at: New file.
4111 (relative skeleton file names): New test case.
4112 (installed skeleton file names): New test case.
4113 * tests/testsuite.at: Include skeletons.at.
4114
4115 * bootstrap: Update copyright to 2007.
4116
4117 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4118
4119 * bootstrap: Remove occurrences of .#bootmp from the files.
4120
4121 2007-01-17 Akim Demaille <akim@epita.fr>
4122
4123 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4124 nonterminals.
4125 Use per-type %printer.
4126
4127 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4128
4129 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4130 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4131 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4132 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4133 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4134 tests/glr-regression.at, tests/input.at, tests/local.at,
4135 tests/output.at, tests/torture.at: Update copyright to 2007.
4136
4137 2007-01-16 Akim Demaille <akim@epita.fr>
4138
4139 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4140 error code.
4141 (Calc++ Scanner): Exit with failure if we can't open the input
4142 file.
4143 Accept "-" standing for stdin.
4144 (Calc++ Top Level): Print the result only if the parsing was
4145 successful.
4146
4147 2007-01-16 Akim Demaille <akim@epita.fr>
4148
4149 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4150
4151 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4152 and Joel E. Denny <jdenny@ces.clemson.edu>
4153
4154 Clean up %define and %code implementation in M4 some. Most
4155 importantly, rename all related macros to be in the b4_percent_define
4156 and b4_percent_code namespaces. Also, complete support for `.' in
4157 %define variable names and %code qualifiers.
4158 * data/bison.m4 (b4_check_user_names): Check for special
4159 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4160 m4_foreach loops.
4161 (b4_get_percent_define, b4_get_percent_code): Rename to...
4162 (b4_percent_define_get, b4_percent_code_get): ... these.
4163 Extend documentation with examples.
4164 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4165 b4_percent_define_skeleton_variables and
4166 b4_percent_code_skeleton_qualifiers.
4167 Expect any value for the %define variable `foo' to be stored in the
4168 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4169 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4170 expect any unqualified %code blocks to be stored in a macro named
4171 `b4_percent_code_unqualified'.
4172 Use m4_indir so that %define variable names and %code qualifiers can
4173 contain `.', which is allowed by the grammar parser.
4174 (b4_percent_define_default): New macro to set a default value for a
4175 %define variable.
4176 (m4_wrap): Update wrapped code, and fix some underquoting.
4177 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4178 Expect grammar uses of %define variables and %code qualifiers to be
4179 defined in b4_percent_define_user_variables and
4180 b4_percent_code_user_qualifiers.
4181 * data/c++.m4: Use b4_percent_define_default rather than
4182 m4_define_default. Fix some underquoting. Skeleton usage of %define
4183 variable define_location_comparison now implies skeleton usage of
4184 %define variable filename_type.
4185 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4186 data/push.c, data/yacc.c: Update macro names.
4187 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4188 muscle names.
4189
4190 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4191
4192 DJGPP specific issues.
4193
4194 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4195 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4196
4197 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4198
4199 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4200 run parsers in all tests so that Valgrind is invoked during
4201 maintainer-check-valgrind.
4202 (Duplicate representation of merged trees): Free all semantic values.
4203 (Duplicated user destructor for lookahead): Likewise.
4204
4205 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4206
4207 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4208 command-line prefix.
4209 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4210 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4211 miss Valgrind messages.
4212 (Exploding the Stack Size with Malloc): Likewise.
4213
4214 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4215
4216 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4217 locals. Reported by Juan Manuel Guerrero at
4218 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4219 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4220 Fix some indentation also.
4221 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4222 explaining this issue.
4223
4224 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4225 and Joel E. Denny <jdenny@ces.clemson.edu>
4226
4227 Simplify union and prologue handling, and escape union and lex/parse
4228 params with digraphs.
4229 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4230 values to the empty string since these are no longer guaranteed
4231 initialized by the front-end.
4232 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4233 braces around b4_user_stype since this is no longer done by the
4234 front-end.
4235 * src/files.c, src/files.h (pre_prologue_obstack,
4236 post_prologue_obstack): Remove.
4237 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4238 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4239 with digraphs. This fixes lex params and parse params.
4240 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4241 * src/output.c (prepare): Remove muscle insertion of the prologues.
4242 (output): Remove freeing of pre_prologue_obstack and
4243 post_prologue_obstack.
4244 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4245 than prologue_augment for prologue parsing so you don't need prologue
4246 obstacks.
4247 (grammar_declaration): For %union RHS, use `braceless' instead of
4248 "{...}" so that braces are already stripped and code is escaped with
4249 digraphs.
4250 * src/reader.c (prologue_augment): Remove.
4251 (reader): Remove initialization of pre_prologue_obstack and
4252 post_prologue_obstack.
4253 * src/reader.h (prologue_augment): Remove.
4254
4255 * data/c.m4: Remove stray parenthesis.
4256
4257 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4258
4259 Remove quotes from variables names in %define directives and from
4260 qualifiers in %code directives, and restrict the characters that are
4261 allowed in them to M4-friendly ones. For %define, continue to support
4262 the quoted form as a deprecated feature. Discussed starting at
4263 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4264 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4265 %code.
4266 * doc/bison.texinfo (Prologue Alternatives): Update.
4267 (Decl Summary): In %defines entry, update mention of `%code requires'
4268 and `%code provides'.
4269 (C++ Location Values): Update %define uses.
4270 (Calc++ Parser Interface): Likewise.
4271 (Calc++ Parser): Likewise, and update `%code requires' uses.
4272 (Table of Symbols): Update %code documentation.
4273 * src/parse-gram.y (prologue_declaration): For %define variables, use
4274 `variable' instead of `STRING'.
4275 (grammar_declaration): For %code qualifiers, use `ID' instead of
4276 `STRING'.
4277 (variable): New nonterminal that takes an `ID' or a `STRING'.
4278 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4279 and %define uses.
4280 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4281 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4282 (%define errors): Update %define uses.
4283
4284 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4285
4286 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4287 instead of muscle_insert for %define values so that M4-special
4288 characters are replaced with digraphs.
4289 * tests/input.at (%define errors): Extend to check weird values.
4290
4291 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4292
4293 Instead of having skeletons declare all valid %define variables and
4294 %code qualifiers, provide macros that retrieve the associated values
4295 and build these lists automatically. Thus Bison will now warn when a
4296 variable or qualifier is not used by the skeleton in the current
4297 invocation regardless of whether it might sometimes be used by that
4298 skeleton in other invocations. Also, move all %define value macros to
4299 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4300 form, which is replaced by %code.
4301 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4302 (b4_check_user_names): ... this, and change the series of valid name
4303 arguments to a single list argument for names used in the skeleton
4304 similar to the existing list argument for names used in the grammar.
4305 Warn instead of complaining.
4306 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4307 values and %code code, to format %code code properly, and to build
4308 lists of all %define variables and %code qualifiers used in the
4309 skeleton: b4_skeleton_percent_define_variables and
4310 b4_skeleton_percent_code_qualifiers.
4311 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4312 Remove, and...
4313 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4314 the skeleton names lists can finish building first. In place of
4315 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4316 expect the lists b4_user_percent_define_variables and
4317 b4_user_percent_code_qualifiers.
4318 * data/c++.m4: Where setting default values for b4_parser_class_name,
4319 b4_location_type, b4_filename_type, b4_namespace, and
4320 b4_define_location_comparison, update their names to the
4321 b4_percent_define_ namespace.
4322 * data/glr.c: Don't use b4_check_percent_define_variables and
4323 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4324 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4325 (b4_parser_class_name, b4_namespace): Define these using
4326 b4_get_percent_define for parser_class_name and namespace.
4327 * data/location.cc: Use b4_get_percent_define.
4328 * data/push.c: Don't use b4_check_percent_define_variables and
4329 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4330 * data/yacc.c: Likewise, and don't call m4_exit in
4331 b4_use_push_for_pull_if or m4_wrap code will never execute.
4332 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4333 Rename to...
4334 (muscle_grow_user_name_list): ... this for consistency with the
4335 terminology used in bison.m4.
4336 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4337 %define variable names, and rename muscle used_percent_define_variables
4338 to user_percent_define_variables.
4339 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4340 user_percent_code_qualifiers.
4341 (content): Remove.
4342 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4343 {CODE} form is no longer accepted.
4344 * tests/input.at (Reject bad %code qualifiers): Rename to...
4345 (Reject unused %code qualifiers): ... this, and update test output.
4346 (%define error): Update test output.
4347
4348 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4349
4350 Check for unrecognized %define variables similar to checking for
4351 unrecognized %code qualifiers. Check for redefined %define variables.
4352 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4353 generalizes...
4354 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4355 (b4_check_percent_define_variables): New, also wraps it.
4356 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4357 variables using b4_check_percent_define_variables.
4358 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4359 all those exercised in the test suite and all those listed in the
4360 `Default values' section of c++.m4. Are there others?
4361 * data/push.c, data/yacc.c: Declare no valid %define variables.
4362 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4363 similar to muscle_find, but it works even when the muscle stores a
4364 const value.
4365 (muscle_grow_used_name_list): New function for constructing the used
4366 name list muscles that b4_check_for_unrecognized_names requires.
4367 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4368 %define'd more than once. Define the b4_used_percent_define_variables
4369 muscle with muscle_grow_used_name_list.
4370 (grammar_declaration): Abbreviate %code code with
4371 muscle_grow_used_name_list.
4372 * tests/input.at (%define errors): New.
4373
4374 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4375
4376 Provide warn_at, complain_at, and fatal_at function callbacks to the
4377 skeletons, and use this for %code qualifier complaints.
4378 * data/bison.m4 (b4_error_at): New, invoked by...
4379 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4380 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4381 @fatal_at(...@) directives.
4382 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4383 qualifiers in b4_used_percent_code_qualifiers and to use
4384 b4_complain_at.
4385 * src/location.c, src/location.h (boundary_set_from_string): New global
4386 function.
4387 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4388 function.
4389 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4390 to b4_used_percent_code_qualifiers.
4391 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4392 function.
4393 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4394 (lineno): Rename to...
4395 (out_lineno): ... this so I don't misunderstand it again.
4396 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4397 here; these newlines are in the input but not the output file.
4398 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4399 (at_directive_perform): ... this new static function, and add handling
4400 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4401 directives.
4402 * tests/input.at (Reject bad %code qualifiers): Update test output with
4403 locations and extend.
4404
4405 * tests/output.at (Output file name: [, Output file name: ]): Remove
4406 bogus comment about these tests failing.
4407
4408 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4409
4410 Clean up b4_check_percent_code_qualifiers a little.
4411 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4412 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4413 documentation and add examples.
4414 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4415 qualifiers here.
4416
4417 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4418
4419 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4420 unreliable -- especially when they're hidden inside another macro.
4421 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4422 data/c.m4: Remove m4_divert(-1).
4423 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4424 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4425 m4_divert_push(0) and m4_divert_pop(0).
4426 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4427 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4428 pushed and popped by m4sugar, should be first on the stack.
4429
4430 Provide warn, complain, and fatal function callbacks to the skeletons.
4431 This provides more flexibility than m4_fatal, improves the error
4432 message format, and captures messages for translation. Discussed
4433 starting at
4434 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4435 * data/bison.m4 (b4_error): New, invoked by...
4436 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4437 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4438 directives. Because these M4 macros might be called when the current
4439 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4440 the previous removal of uses of m4_divert, which caused trouble.
4441 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4442 m4_fatal to report unrecognized %code qualifiers.
4443 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4444 push parser requests.
4445 * data/glr.c: Use b4_complain instead of m4_fatal to report
4446 non-deterministic push parser requests.
4447 Update @output usage to @output(...@) form.
4448 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4449 report missing %defines. Update @output usage to @output(...@) form.
4450 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4451 @output(...@) form.
4452 * src/main.c (main): Invoke skel_scanner_free.
4453 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4454 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4455 obstack_for_string from flex-scanner.h.
4456 (YY_DECL): Use to declare skel_lex static.
4457 (decode_at_digraphs): Remove; now handled in the new
4458 SC_AT_DIRECTIVE_ARG start condition.
4459 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4460 functions.
4461 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4462 at_directive_argv): New static globals.
4463 (INITIAL): Use fail_for_invalid_at.
4464 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4465 recognize the start of a generalized `@directive(...@)' form and
4466 start...
4467 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4468 directive args (using the new obstack_for_string), to decode the
4469 contained @ diagraphs, and to perform the directive. It recognizes
4470 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4471 @output(...@).
4472 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4473 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4474 `@,'.
4475 (scan_skel): Initialize obstack_for_string on the first call.
4476 (skel_scanner_free): New function to free obstack_for_string.
4477 * tests/input.at (Reject bad %code qualifiers): Update test output.
4478
4479 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4480
4481 Consolidate the 4 prologue alternative directives (%code, %requires,
4482 %provides, and %code-top) into a single %code directive with an
4483 optional qualifier field. Discussed at
4484 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4485 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4486 alternatives.
4487 * doc/bison.texinfo (Prologue Alternatives): Update.
4488 (Decl Summary): Update to %code "requires" and %code "provides".
4489 (Calc++ Parser): Update to %code "requires".
4490 (Table of Symbols): Remove entries for %requires, %provides, and
4491 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4492 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4493 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4494 which are skeleton-specific.
4495 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4496 declare what %code qualifiers it supports and to complain if any other
4497 qualifiers were used in the grammar.
4498 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4499 and b4_user_code([b4_percent_code_provides]) in place of
4500 b4_user_requires and b4_user_provides.
4501 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4502 Add b4_user_code([b4_percent_code_top]) and
4503 b4_user_code([b4_percent_code]).
4504 Invoke b4_check_percent_code_qualifiers.
4505 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4506 PERCENT_REQUIRES): Remove.
4507 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4508 %requires. Rewrite the %code RHS as the unqualified form defining the
4509 muscle b4_percent_code. Add another RHS for the qualified %code form,
4510 which defines muscles of the form b4_percent_code_QUALIFIER and the
4511 b4_used_percent_code_qualifiers muscle.
4512 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4513 PERCENT_REQUIRES): Remove.
4514 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4515 %code "requires" and %code "provides".
4516 * tests/input.at (Reject bad %code qualifiers): New.
4517
4518 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4519
4520 Use the new code_props interface for destructors and printers.
4521 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4522 printer_location members, and change the type of the destructor and
4523 printer members to code_props.
4524 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4525 symbol_printer_get, semantic_type_destructor_set,
4526 semantic_type_printer_set, default_tagged_destructor_set,
4527 default_tagless_destructor_set, default_tagged_printer_set,
4528 default_tagless_printer_set): Use code_props in arguments and return
4529 types in place of char const * and location.
4530 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4531 since the locations are now contained in the return of
4532 symbol_destructor_get and symbol_printer_get.
4533 * src/output.c (symbol_destructors_output, symbol_printers_output):
4534 Replace with...
4535 (symbol_code_props_output): ... this to eliminate duplicate code.
4536 (output_skeleton): Update to use symbol_code_props_output.
4537 * src/reader.c (symbol_should_be_used): Update use of
4538 symbol_destructor_get.
4539 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4540 Update uses of the various _destructor_set and _printer_set functions.
4541 * src/symtab.c: (default_tagged_destructor_location,
4542 default_tagless_destructor_location, default_tagged_printer_location,
4543 default_tagless_printer_location): Remove since we...
4544 (default_tagged_destructor, default_tagless_destructor,
4545 default_tagged_printer, default_tagless_printer): ... change the type
4546 of these to code_props.
4547 (symbol_new, semantic_type_new, symbol_destructor_set,
4548 semantic_type_destructor_set, symbol_destructor_get,
4549 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4550 symbol_check_alias_consistency, default_tagged_destructor_set,
4551 default_tagless_destructor_set, default_tagged_printer_set,
4552 default_tagless_printer_set): Update.
4553 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4554 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4555 code_props members.
4556 (symbol_print): Use SYMBOL_CODE_PRINT.
4557
4558 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4559
4560 Use the new code_props interface for rule actions.
4561 * src/symlist.h (symbol_list): Replace action, action_location, and
4562 used members with a code_props action_props member.
4563 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4564 grammar_midrule_action, grammar_current_rule_merge_set,
4565 grammar_current_rule_symbol_append, packgram): Update.
4566 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4567 * src/scan-code.l (handle_action_dollar): Update.
4568 (translate_rule_action): Remove, no longer used.
4569 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4570
4571 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4572
4573 Use the new code_props interface in parse-gram.y.
4574 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4575 Update all uses of translate_* functions to use the new code_props
4576 interface and to use gram_scanner_last_string_free and
4577 code_scanner_last_string_free where possible.
4578 (grammar_declaration): symbol_list_destructor_set and
4579 symbol_list_printer_set now perform the translation, so don't do it
4580 here. Use gram_scanner_last_string_free where possible.
4581 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4582 translate_code): Remove, no longer used.
4583 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4584 symbol_list_printer_set): Perform code translation here rather than
4585 depending on the caller to do so.
4586
4587 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4588 * src/scan-gram.h (gram_last_string): Remove declaration.
4589 * src/scan-gram.l (last_string): Declare it static.
4590
4591 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4592
4593 Encapsulate code properties and related functionality for the various
4594 destructors, printers, and actions into a code_props structure and
4595 interface. This patch merely implements code_props in scan-code.h and
4596 scan-code.l. Future patches will rewrite other modules to use it.
4597 Discussed starting at
4598 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4599 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4600 consistently initialize const structs that have an empty location
4601 field.
4602 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4603 to ensure consistency.
4604 * src/scan-code.h (code_props): New structure.
4605 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4606 function, macro, and const global variable for initializing a
4607 code_props with no code.
4608 (code_props_plain_init, code_props_symbol_action_init,
4609 code_props_rule_action_init, code_props_translate_code): The rest of
4610 the new code_props functional interface. Among other things, the init
4611 functions set the code_props kind field so that
4612 code_props_translate_code will know whether to behave like
4613 translate_symbol_action, translate_rule_action, or translate_code.
4614 These old translate functions must remain until all other modules are
4615 updated to use the new code_props interface.
4616 (code_scanner_last_string_free): New function similar to
4617 gram_scanner_last_string_free.
4618 (code_scanner_free): Add documentation.
4619 * src/scan-code.l: Implement the new interface.
4620 (code_lex): Make it static, add a code_props* argument, and remove the
4621 rule argument.
4622 (last_string): New static global similar to the one in scan-gram.l.
4623 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4624 instead of rule.
4625 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4626 code_props since Bison may one day use this information for destructors
4627 and printers.
4628 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4629 (handle_action_dollar): Use symbol_list_n_get and set used flag
4630 directly since symbol_list_n_used_set is removed.
4631 (translate_action): Add a code_props* argument and remove the rule,
4632 action, and location arguments. Pass the code_props* on to code_lex.
4633 (translate_rule_action, translate_symbol_action, translate_code):
4634 Rewrite as wrappers around the new code_props interface.
4635 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4636 it would eventually need to break the encapsulation of code_props.
4637
4638 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4639
4640 * etc/.cvsignore: New.
4641
4642 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4643
4644 Add maintainer-push-check to run maintainer-check using push parsing in
4645 place of pull parsing where available.
4646 * Makefile.am (maintainer-push-check): New.
4647 * data/bison.m4 (b4_use_push_for_pull_if): New.
4648 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4649 appropriately based on their existing values.
4650 (yypush_parse): Don't print push-parser-specific diagnostics if push
4651 parsing is being used in place of pull parsing.
4652 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4653 push.c.
4654 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4655 variable, and insert b4_use_push_for_pull_flag into muscles.
4656 * tests/Makefile.am (maintainer-push-check): New.
4657
4658 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4659
4660 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4661 (whether successful or failed) so that yypush_parse can be invoked
4662 again to start a new parse using the same yypstate.
4663 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4664 check multiple yypull_parse invocations on the same yypstate. For pull
4665 mode, extend to check multiple yyparse invocations.
4666 (Exploding the Stack Size with Alloca): Extend to try with
4667 %push-pull-parser.
4668 (Exploding the Stack Size with Malloc): Likewise.
4669
4670 * tests/calc.at (Simple LALR Calculator): Don't specify
4671 %skeleton "push.c" since %push-pull-parser implies that now.
4672 * tests/headers.at (export YYLTYPE): Don't check for the push
4673 declarations. Otherwise, this test case can't be used to see if push
4674 mode can truly emulate pull mode.
4675 * tests/input.at (Torturing the Scanner): Likewise.
4676 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4677 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4678 AT_YACC_IF, which now includes the case of push mode since %skeleton
4679 need not be used for push mode. This will be more intuitive once
4680 push.c is renamed to yacc.c.
4681
4682 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4683
4684 For push mode, convert yyparse from a macro to a function, invoke yylex
4685 instead of passing a yylexp argument to yypull_parse, and don't
4686 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4687 Discussed starting at
4688 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4689 * data/bison.m4 (b4_pull_if): New.
4690 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4691 * data/push.c: Improve M4 quoting a little.
4692 (b4_generate_macro_args, b4_parenthesize): Remove.
4693 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4694 any time a pull parser is requested.
4695 Don't #define this as a wrapper around yypull_parse. Instead, when
4696 both push and pull are requested, make it a function that does that
4697 same thing.
4698 (yypull_parse): If there's a b4_prefix, #define this to
4699 b4_prefix[pull_parse] when both push and pull are requested.
4700 Don't define this as a function unless both push and pull are
4701 requested.
4702 Remove the yylexp argument and hard-code yylex invocation instead.
4703 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4704 %push-parser.
4705 * src/getargs.c (pull_parser): New global initialized to true.
4706 * getargs.h (pull_parser): extern it.
4707 * src/output.c (prepare): Insert pull_flag muscle.
4708 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4709 (prologue_declaration): Set both push_parser and pull_parser = true for
4710 %push-pull-parser. Set push_parser = true and pull_parser = false for
4711 %push-parser.
4712 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4713 %push-parser since there's no backward-compatibility concern here.
4714 Scan %push-pull-parser.
4715 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4716 instead of %push-parser.
4717 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4718 prototype it in the module that calls yyparse.
4719 * tests/input.at (Torturing the Scanner): Likewise.
4720 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4721
4722 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4723
4724 Update etc/bench.pl. Optimize push mode a little (the yyn change
4725 deserves most of the credit).
4726 * Makefile.am (SUBDIRS): Add etc subdirectory.
4727 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4728 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4729 yytoken, yyval, and yyloc declarations to...
4730 (yyparse or yypush_parse): ... here to improve performance. For
4731 yypush_parse invocations after the first, be sure to assign yyn its old
4732 value again.
4733 (yypstate_new): Don't bother initializing the yyresult field since the
4734 initial value isn't used.
4735 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4736 remove the #define that, in push mode, set it to yyps->NAME.
4737 * etc/Makefile.am: New.
4738 * etc/bench.pl: Remove and build it instead from...
4739 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4740 "tests/bison" from the build directory by default rather than just
4741 invoking "bison" from $PATH.
4742 (calc_grammar): Update push parser code: don't declare yylval globally,
4743 don't define yyparse_wrapper, and don't #define yyparse.
4744 (bench_grammar): Update to check all working combinations of yacc.c,
4745 push.c, impure, pure, pull, and push.
4746
4747 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4748
4749 For push mode, add pull wrappers around yypush_parse.
4750 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4751 (yypull_parse): New function wrapping yypush_parse.
4752 (yyparse): New #define wrapping yypull_parse.
4753 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4754 is declared.
4755 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4756 prototype yylex in the module that calls yyparse, and don't prototype
4757 yyparse there. Otherwise, the yyparse expansion won't compile.
4758 * tests/input.at (Torturing the Scanner): Likewise.
4759
4760 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4761
4762 Enable push parsers to operate in impure mode. Thus, %push-parser no
4763 longer implies %pure-parser. The point of this change is to move
4764 towards being able to test the push parser code by running the entire
4765 test suite as if %push-parser had been declared.
4766 * data/push.c (yypush_parse): For impure mode, remove the
4767 yypushed_char, yypushed_val, and yypushed_loc arguments.
4768 Instead, declare these as local variables initialized to the global
4769 yychar, yylval, and yylloc.
4770 For the first yypush_parse invocation only, restore the initial values
4771 of these global variables when it's time to read a token since they
4772 have been overwritten.
4773 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4774 %push-parser.
4775 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4776 %pure-parser along with %push-parser since this test case was designed
4777 for pure push parsers.
4778 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4779 (AT_YACC_OR_PUSH_IF): New.
4780 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4781 add a note that it's still wrong for some cases (as it has been for a
4782 while).
4783 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4784 %push-parser no longer implies %pure-parser.
4785
4786 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4787
4788 Remove some unnecessary differences between the pull parser code and
4789 the push parser code. This patch enables yynerrs in push mode.
4790 * data/push.c: Reformat M4 a little.
4791 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4792 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4793 because push mode is on. Instead, if pure mode is on, move yynerrs
4794 to...
4795 (b4_declare_parser_state_variables): ... here.
4796 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4797 to yyps->NAME so it can be used in yypush_parse.
4798 (yypush_parse): Don't omit uses of yynerrs in push mode.
4799
4800 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4801
4802 Fix bug such that the first pushed token's value and location are
4803 sometimes overwritten (sometimes by %initial-action) before being used.
4804 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4805 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4806 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4807 more closely mimic the pull parser logic.
4808 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4809 time to read a token, which is after any initialization of yylval and
4810 yylloc.
4811 (gottoken): Rename label to...
4812 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4813 user namespace.
4814
4815 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4816
4817 Rearrange initialization of the parser state variables so that the
4818 skeleton doesn't have to have a copy for pull mode and another for push
4819 mode. This patch also fixes at least a bug such that yylloc was not
4820 initialized (with b4_location_initial_line and
4821 b4_location_initial_column) upon calling yypush_parse. However, that
4822 initialization now overwrites the first token's location;
4823 %initial-action assigning @$ already did the same thing, and both bugs
4824 will be fixed in a later patch.
4825 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4826 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4827 yyss, yyvs, yyls, and yystacksize.
4828 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4829 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4830 yylsp.
4831 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4832 yyps->NAME so it can be used in yypush_parse.
4833 (yyparse or yypush_parse): For yypush_parse, don't print the
4834 "Starting parse" diagnostic for invocations after the first.
4835 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4836 yypush_parse, only do it for the first invocation.
4837 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4838 initialization to occur in yypush_parse but only on the first
4839 invocation.
4840
4841 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4842
4843 * data/push.c: Add CPP guards around push parser declarations in both
4844 the header and the code file.
4845 In the code file, move the push parser declarations to the same place
4846 they appear in the header file.
4847 Clean up the M4 some, especially the inconsistent underquoting in
4848 some b4_c_function_def and b4_c_function_decl uses.
4849
4850 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4851
4852 Encapsulate the push parser state variables into an M4 macro so the
4853 push skeleton doesn't have to list them again for pull mode's yyparse.
4854 For push mode, remove yypush_parse's local equivalents of these
4855 variables to eliminate unnecessary copying between the two sets at
4856 run-time. This patch also fixes at least a bug related to multiple
4857 %initial-action invocations in push mode.
4858 * data/push.c (b4_declare_parser_variables): Rename to...
4859 (b4_declare_scanner_communication_variables): ... this for clarity and
4860 update both uses.
4861 (b4_declare_yyparse_variables): Remove and move its contents to the one
4862 spot where it was invoked.
4863 (b4_declare_parser_state_variables): New macro containing the parser
4864 state variables required by push mode.
4865 (struct yypstate): Replace all fields but yynew with
4866 b4_declare_parser_state_variables.
4867 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4868 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4869 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4870 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4871 parser state variable declarations with
4872 b4_declare_parser_state_variables.
4873 Don't initialize parser state variables when calling yypush_parse since
4874 yypstate_new already does that.
4875 Invoke the user's initial action only upon the first yypush_parse
4876 invocation.
4877 Remove all code that copies between the local parser state variables
4878 and the yypstate.
4879
4880 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4881
4882 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4883 prevent a name collision in a future patch where these names will
4884 sometimes be #define'd.
4885 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4886 since it no longer has the same name as the existing argument.
4887 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4888
4889 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
4890 and Joel E. Denny <jdenny@ces.clemson.edu>
4891
4892 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4893 that the argument is case-insensitive, and there's no `=' here.
4894 For the %skeleton entry, mention that %language is better.
4895 (Bison Options): Likewise for --language and --skeleton. Move the
4896 --skeleton entry so that the `Tuning the parser' section is sorted
4897 alphabetically on long options.
4898 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4899 %language directive in detail here; cross-reference the %language
4900 documentation instead.
4901 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4902 `%require "2.3b"' so that the example is always up-to-date.
4903 (Table of Symbols): Add entries for %language and %skeleton.
4904 * examples/extexi (normalize): Instead of replacing every %require
4905 argument with the current Bison version, just substitute for
4906 `@value{VERSION}'. This guarantees that we're testing what actually
4907 appears in the documentation.
4908 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4909 rather than `@VERSION@'.
4910
4911 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4912
4913 * NEWS: Reword the %language news a bit, and put it earlier.
4914
4915 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4916 Rewrite to simplify the logic.
4917 (language_argmatch): Likewise.
4918 (program_name): We now own this var.
4919 * src/getargs.h (struct bison_language): Use char[] rather than
4920 const char *.
4921
4922 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4923 Java is supported.
4924 * src/complain.c (program_name): Remove decl; no longer needed.
4925 * src/main.c (program_name): Remove; now belongs to getargs.
4926
4927 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
4928
4929 * NEWS: Document %language.
4930
4931 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4932
4933 * data/c-skel.m4, data/c++-skel.m4: New files.
4934 * data/glr.c: Complain on push parsers.
4935
4936 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4937 over %skeleton.
4938 (Decl Summary): Document %language and %skeleton.
4939 (Command line): Document -L.
4940
4941 * examples/extexi: Rewrite %require directive.
4942 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4943
4944 * src/files.c (compute_exts_from_gc): Look in language structure
4945 for .y extension.
4946 (compute_file_name_parts): Check whether .tab should be added.
4947 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4948 (language, skeleton_arg, language_argmatch): New.
4949 (long_options): Add --language.
4950 (getargs): Use skeleton_arg, add -L/--language.
4951 * src/getargs.h: Include location.h.
4952 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4953 * src/output.c (prepare): Pick default skeleton from struct language.
4954 Don't dispatch C skeletons here.
4955 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4956 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4957 * src/scan-gram.l ("%language"): New rule.
4958
4959 * tests/calc.at: Test %skeleton and %language.
4960 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4961 (AT_GLR_IF): Look for %skeleton "glr.cc".
4962 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4963 (AT_YACC_IF): Reject %language.
4964
4965 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4966
4967 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4968 since it wasn't used; only the typedef name 'semantic_type' is needed.
4969 Also, omit trailing white space.
4970
4971 * bootstrap: Sync from coreutils.
4972 (gnulib_extra_files): Add build-aux/announce.gen.
4973 (slurp): Adjust .gitignore files like .cvsignore files.
4974 * build-aux/announce-gen: Remove from CVS, since bootstrap
4975 now creates this.
4976
4977 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4978
4979 Make %push-parser imply %pure-parser. This fixes several bugs; see
4980 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4981 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4982 pure_parser = true.
4983 * data/push.c: Don't bother testing b4_push_if when deciding whether
4984 to expand b4_declare_parser_variables globally.
4985 (yypush_parse): Likewise in here.
4986
4987 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4988 (yy_reduce_print): Reformat M4 for readability.
4989
4990 2006-12-15 Bob Rossi <bob@brasko.net>
4991 and Joel Denny <jdenny@ces.clemson.edu>
4992
4993 * data/push.c (yypstate): Add typedef, and update all uses of
4994 struct yypstate to just yypstate.
4995 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4996
4997 2006-12-14 Bob Rossi <bob@brasko.net>
4998
4999 * data/push.c (yypush_parse): Declare prototype regardless of
5000 %locations option.
5001
5002 2006-12-14 Bob Rossi <bob@brasko.net>
5003
5004 * data/push.c (yyparse): Remove the prototype and the #define when in
5005 push-parser mode.
5006
5007 2006-12-13 Bob Rossi <bob@brasko.net>
5008
5009 * data/push.c (yypstate_init): Rename to...
5010 (yypstate_new): ... this and use b4_c_function_def.
5011 (yypstate_delete): New.
5012 (yypush_parse): Change parameters yynval and yynlloc to be const.
5013 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5014 yypstate_delete functions.
5015
5016 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5017
5018 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5019 strange test case titles. Reported by Bob Rossi.
5020
5021 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5022
5023 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5024 of potential ambiguities in GLR grammers.
5025
5026 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5027
5028 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5029 `bison ', use m4_index instead of m4_substr since chopping up a string
5030 containing M4-special characters causes problems here.
5031
5032 Fix a couple of bugs related to special characters in user-specified
5033 file names, and make it easier for skeletons to compute output file
5034 names with the same file name prefix as Bison-computed output file
5035 names.
5036 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5037 b4_parser_file_name and b4_spec_defines_file instead of
5038 @output_parser_name@ and @output_header_name@, which are now redundant.
5039 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5040 b4_parser_file_name, b4_spec_defines_file, and the new
5041 @basename(FILENAME@) instead of @output_parser_name@ and
5042 @output_header_name@, which inappropriately escaped the file names as
5043 C string literals.
5044 * src/files.c (all_but_ext): Remove static qualifier.
5045 (compute_output_file_names): Move `free (all_but_ext)' to...
5046 (output_file_names_free): ... here since all_but_ext is needed later.
5047 * src/files.h (all_but_ext): Extern.
5048 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5049 exactly what MUSCLE_INSERT_STRING used to do.
5050 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5051 characters are escaped properly.
5052 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5053 all_but_ext.
5054 For pkgdatadir muscle, maintain previous functionality by using
5055 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5056 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5057 digraphs would never be expanded. Hopefully no one has M4-special
5058 characters in his Bison installation path.
5059 * src/scan-skel.l: Don't parse @output_header_name@ and
5060 @output_parser_name@ anymore since they're now redundant.
5061 In @output, use decode_at_digraphs.
5062 Parse a new @basename command that invokes last_component.
5063 (decode_at_digraphs): New.
5064 (BASE_QPUTS): Remove unused.
5065 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5066 (Output file name): New tests.
5067
5068 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5069
5070 Warn about output files that are generated by the skeletons and that
5071 conflict with other output files.
5072 * data/glr.c: Don't generate the header file here when glr.cc does.
5073 * src/files.c (file_names, file_names_count): New static globals.
5074 (compute_output_file_names): Invoke output_file_name_check for files
5075 not generated by the skeletons and remove existing checks.
5076 (output_file_name_check): New function that warns about conflicting
5077 output file names.
5078 (output_file_names_free): Free file_names.
5079 * src/files.h (output_file_name_check): Declare.
5080 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5081 the skeletons.
5082 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5083 (Conflicting output files): New tests.
5084
5085 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5086
5087 * doc/bison.texinfo: Fix a couple of typos.
5088
5089 2006-12-08 Bob Rossi <bob@brasko.net>
5090
5091 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5092 Rename to...
5093 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5094 update all uses.
5095 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5096 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5097 local pv.
5098 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5099 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5100
5101 2006-12-07 Bob Rossi <bob@brasko.net>
5102 and Joel Denny <jdenny@ces.clemson.edu>
5103
5104 * data/push.c (yypvarsinit): Change return type from void* to struct
5105 yypvars*. No longer cast to void* on return.
5106 (struct yypvars): Remove yylen since it need not be remembered between
5107 yypushparse invocations.
5108 (yypushparse): Don't copy between yylen and pv->yylen.
5109
5110 2006-12-05 Bob Rossi <bob@brasko.net>
5111
5112 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5113 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5114 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5115 (struct yypvars): Remove b4_declare_parser_variables.
5116 (yypvarsinit): Remove init code for removed variables.
5117 (global scope): Do not declare b4_declare_parser_variables if
5118 push or pure mode.
5119 (yypushparse): Add b4_declare_parser_variables.
5120 Init new local variables, and remove init code for removed
5121 yypvars variables.
5122 (yyparse): Delete.
5123 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5124 and yyparse for other modes.
5125 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5126 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5127 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5128 (AT_PURE_LEX_IF): True if pure or push parser.
5129
5130 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5131
5132 Document Yacc prologue alternatives and default %destructor's and
5133 %printer's as experimental. Don't mention Java yet. Discussed at
5134 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5135 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5136 (2.3a): Annotate this entry to say the old forms of these features were
5137 also experimental.
5138 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5139 Table of Symbols): Say they're experimental. Comment out any mention
5140 of Java (we'll want this back eventually).
5141
5142 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5143
5144 Support a file name argument to %defines. Deprecate `=' in
5145 %file-prefix, %name-prefix, and %output. Discussed at
5146 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5147 * NEWS (2.3a+): Mention.
5148 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5149 form of %defines, and remove `=' from entries for %file-prefix,
5150 %name-prefix, and %output.
5151 * src/parse-gram.y (prologue_declaration): Implement.
5152 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5153 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5154 all but one occurrence of %name-prefix.
5155 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5156 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5157 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5158 occurrence of each of %file-prefix and %output. Add check for %defines
5159 with argument.
5160 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5161 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5162 Remove the `=' from %output.
5163
5164 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5165
5166 Don't escape $ in test case titles since Autoconf 2.61 now does that
5167 correctly.
5168 * tests/actions.at (Default %printer and %destructor are not for error
5169 or $undefined): Here.
5170 (Default %printer and %destructor are not for $accept): Here.
5171 * tests/input.at (Invalid $n and @n): Here.
5172
5173 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5174
5175 Rename <!> to <>. Discussed starting at
5176 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5177 * NEWS (2.3a+): Update.
5178 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5179 Update.
5180 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5181 * src/scan-gram.l (INITIAL): Implement.
5182 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5183 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5184 comment.
5185 * tests/actions.at (Default tagless %printer and %destructor,
5186 Default tagged and per-type %printer and %destructor,
5187 Default %printer and %destructor are not for error or $undefined,
5188 Default %printer and %destructor are not for $accept,
5189 Default %printer and %destructor for mid-rule values): Update.
5190 * tests/input.at (Default %printer and %destructor redeclared,
5191 Unused values with default %destructor): Update.
5192
5193 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5194
5195 Don't let %prec take a nonterminal.
5196 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5197 token.
5198 * tests/input.at (%prec takes a token): New test checking that %prec
5199 won't take a nonterminal.
5200
5201 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5202
5203 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5204 it was double-quoted.
5205 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5206 grammar is maintained with Bison's highest standards.
5207 * src/getargs.c: Fix some typos in Doxygen comments.
5208
5209 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5210
5211 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5212 later. Reported by Paul Eggert in
5213 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5214 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5215 * src/scan-code.l (translate_action): Don't bother invoking
5216 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5217 (code_scanner_free): Instead of invoking
5218 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5219 which frees more.
5220 * src/scan-gram.l (gram_scanner_free): Likewise.
5221 * src/scan-skel.l (scan_skel): Likewise.
5222
5223 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5224
5225 * src/files.c (tr): Change return type to void.
5226 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5227 has been called previously for the same key.
5228 (muscle_find): Return storage instead of value so that
5229 --enable-gcc-warnings doesn't produce warnings that the return discards
5230 const. aver that the value and storage are the same since storage
5231 could potentially be NULL when value is not.
5232 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5233 same as 0.
5234
5235 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5236
5237 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5238 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5239 us a slightly cleaner distribution, and also works.
5240 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5241 gnulib changes.
5242
5243 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5244 and Paul Eggert <eggert@cs.ucla.edu>
5245
5246 Don't let Bison leak memory except when it complains.
5247 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5248 (spec_defines_file, dir_prefix): Now char *, not const char *,
5249 since they are freed.
5250 * src/files.c: Likewise.
5251 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5252 Likewise.
5253 (tr): Now operates in-place. All uses changed.
5254 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5255 values.
5256 (compute_file_name_parts, compute_output_file_names): Don't store
5257 read-only data in variables that will be freed.
5258 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5259 src_extension, and header_extension.
5260 (output_file_names_free): New public function to free
5261 spec_verbose_file, spec_graph_file, spec_defines_file,
5262 parser_file_name, and dir_prefix.
5263 * src/getargs.c (getargs): Don't store read-only data in variables that
5264 will be freed.
5265 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5266 (which previously existed but was unused), and quotearg_free.
5267 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5268 * src/muscle_tab.c: Likewise.
5269 (muscle_entry): Make the value char const *,
5270 and add a new storage member that is char * and can be freed.
5271 (muscle_entry_free): New private function.
5272 (muscle_init): Use it instead of free.
5273 (muscle_insert, muscle_grow): Update and use new storage member.
5274 (muscle_code_grow): Free the string passed to muscle_grow
5275 since it's not needed anymore.
5276 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5277 add a new `char *code' member.
5278 ("{...}"): Declare semantic type as code.
5279 * src/scan-code.h (translate_rule_action):
5280 (translate_symbol_action, translate_code, translate_action): Return
5281 `char const *' rather than `char *' since external code should not free
5282 these strings.
5283 * src/scan-code.l: Likewise.
5284 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5285 which is "{...}" in the parser.
5286 * tests/Makefile.am (maintainer-check-valgrind): Set
5287 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5288 Valgrind.
5289 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5290 complain.
5291 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5292 expecting a non-zero exit status sets --leak-check=summary and
5293 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5294 this case, and we don't want to hear about it.
5295
5296 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5297
5298 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5299 instead of from the template, to simplify configuration a bit.
5300 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5301 and m4/wint_t.m4, as they are needed with the latest gnulib.
5302
5303 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5304
5305 Disable unset/unused mid-rule value warnings by default, and recognize
5306 --warnings=midrule-values to enable them. Discussed starting at
5307 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5308 * NEWS (2.3a+): Mention.
5309 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5310 warnings): Add entry for midrule-values subargument.
5311 * src/reader.c (symbol_should_be_used): Don't return true just because
5312 the value is a set/used mid-rule value unless
5313 --warnings=midrule-values was specified.
5314 * tests/input.at (Unused values, Unused values before symbol
5315 declarations): Run tests with and without --warnings=midrule-values.
5316
5317 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5318 than LIST_FREE directly.
5319
5320 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5321
5322 Finish implementing --warnings=error, which should not be implied by
5323 --warnings=all (or by its synonyms -W and --warnings without
5324 subarguments).
5325 * src/complain.c (set_warning_issued): New function to report that
5326 warnings are being treated as errors and to record an error if so.
5327 Invoke...
5328 (warn_at, warn): ... here.
5329 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5330 "error - warnings are errors" does not appear above "all - all of the
5331 above".
5332 (getargs): For -W and --warnings without subarguments, don't let
5333 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5334 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5335
5336 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5337
5338 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5339 empty subargument list. For example: `bison --warnings= parser.y'.
5340
5341 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5342
5343 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5344 the parser header file so that gcc doesn't warn.
5345
5346 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5347
5348 Split the default %destructor/%printer into two kinds: <*> and <!>.
5349 Discussed starting at
5350 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5351 * NEWS (2.3a+): Mention.
5352 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5353 previous change today related to mid-rules.
5354 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5355 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5356 (TYPE_TAG_ANY): Add as <*>.
5357 (TYPE_TAG_NONE): Add as <!>.
5358 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5359 for <*> and <!>.
5360 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5361 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5362 * src/symlist.c (symbol_list_default_new): Split into tagged and
5363 tagless versions.
5364 (symbol_list_destructor_set, symbol_list_printer_set): Split
5365 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5366 SYMLIST_DEFAULT_TAGLESS.
5367 * src/symlist.h: Update symbol_list_default*_new prototypes.
5368 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5369 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5370 * src/symtab.c (default_destructor, default_destructor_location,
5371 default_printer, default_printer_location): Split each into tagged and
5372 tagless versions.
5373 (symbol_destructor_get, symbol_destructor_location_get,
5374 symbol_printer_get, symbol_printer_location_get): Implement tagged
5375 default and tagless default cases.
5376 (default_destructor_set, default_printer_set): Split each into tagged
5377 and tagless versions.
5378 * src/symtab.h: Update prototypes.
5379 * tests/actions.at (Default %printer and %destructor): Rename to...
5380 (Default tagless %printer and %destructor): ... this, and extend.
5381 (Per-type %printer and %destructor): Rename to...
5382 (Default tagged and per-type %printer and %destructor): ... this, and
5383 extend.
5384 (Default %printer and %destructor for user-defined end token): Extend.
5385 (Default %printer and %destructor are not for error or $undefined):
5386 Update.
5387 (Default %printer and %destructor are not for $accept): Update.
5388 (Default %printer and %destructor for mid-rule values): Extend.
5389 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5390 (Unused values with default %destructor): Extend.
5391
5392 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5393
5394 Don't apply the default %destructor/%printer to an unreferenced midrule
5395 value. Mentioned at
5396 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5397 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5398 like $@n instead of just @n so that the default %destructor/%printer
5399 logic doesn't see them as user-defined symbols.
5400 (symbol_is_dummy): Check for both forms of the name.
5401 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5402 name for which the midrule value is referenced in any action.
5403 * tests/actions.at (Default %printer and %destructor for mid-rule
5404 values): New test.
5405 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5406 for change to dummy symbol names.
5407
5408 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5409
5410 Warn about unset midrule $$ if the corresponding $n is used.
5411 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5412 $n usage.
5413 (packgram): Before invoking grammar_rule_check on any rule, make sure
5414 all actions have already been scanned in order to set `used' flags.
5415 Otherwise, checking that a midrule's $$ is set will not always work
5416 properly because the midrule check must forward-reference the midrule's
5417 parent rule.
5418 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5419 warning.
5420
5421 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5422
5423 More improvements to the documentation of the prologue alternatives:
5424 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5425 Bison manual.
5426 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5427 some text to clarify the relative importance of the new directives and
5428 to show how these directives may be viewed as code labels.
5429
5430 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5431
5432 Similar to the recently removed %before-header, add %code-top as the
5433 alternative to the pre-prologue. Mentioned at
5434 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5435 Also, let the prologue alternatives appear in the grammar section.
5436 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5437 (prologue_declaration): Move the existing prologue alternatives to...
5438 (grammar_declaration): ... here and add %code-top.
5439 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5440
5441 Clean up and extend documentation for the prologue alternatives.
5442 * NEWS (2.3a+): Describe prologue alternatives.
5443 * doc/bison.texinfo (Prologue): Move discussion of prologue
5444 alternatives to...
5445 (Prologue Alternatives): ... this new section, and extend it to discuss
5446 all 4 directives in detail.
5447 (Table of Symbols): Clean up discussion of prologue alternatives and
5448 add %code-top.
5449
5450 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5451
5452 DJGPP specific issues.
5453
5454 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5455 config.bat accordingly.
5456 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5457 * djgpp/config.site: Likewise.
5458
5459 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5460
5461 Replace %*-header with %provides, %requires, %code. See discussion at
5462 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5463
5464 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5465 (b4_user_start_header): Remove.
5466 * data/glr.c: Use new macros instead of b4_*start_header
5467 and b4_*end_header.
5468 * data/glr.cc: Likewise.
5469 * data/lalr1.cc: Likewise.
5470 * data/push.c: Likewise.
5471 * data/yacc.c: Likewise.
5472
5473 * doc/bison.texinfo: Remove %before-header, rename
5474 %{start,end,after}-header to %requires, %provides, %code.
5475
5476 * src/parse-gram.y: Likewise (also rename token names accordingly).
5477 * src/scan-gram.l: Likewise.
5478 * tests/actions.at: Likewise.
5479
5480 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5481
5482 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5483 Problem reported by Joel E. Denny.
5484
5485 2006-10-14 Jim Meyering <jim@meyering.net>
5486
5487 (Sync from coreutils.)
5488 Work also when the working directory (with e.g. coreutils sources)
5489 is version controlled with git, rather than CVS.
5490 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5491 rather than CVS.
5492 In messages and comments, say e.g., "checked-out sources",
5493 rather than "CVS sources".
5494 (version_controlled_file): New function. Work for git as well as
5495 for CVS. Don't use grep's -q option.
5496 (slurp): Call it here, in place of CVS-specific code.
5497
5498 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5499
5500 Fix testsuite for ./configure --enable-gcc-warnings:
5501 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5502 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5503 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5504 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5505 * test/regression.at (Diagnostic that expects two alternatives):
5506 Likewise.
5507
5508 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5509
5510 * bootstrap.conf (gnulib_modules): Add config-h.
5511 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5512 worry about HAVE_CONFIG_H.
5513 * lib/abitset.c: Likewise.
5514 * lib/bitset.c: Likewise.
5515 * lib/bitset_stats.c: Likewise.
5516 * lib/bitsetv-print.c: Likewise.
5517 * lib/bitsetv.c: Likewise.
5518 * lib/ebitset.c: Likewise.
5519 * lib/get-errno.c: Likewise.
5520 * lib/lbitset.c: Likewise.
5521 * lib/subpipe.c: Likewise.
5522 * lib/timevar.c: Likewise.
5523 * lib/vbitset.c: Likewise.
5524 * lib/bitset.c: Include "bitset.h" first, to test interface.
5525 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5526 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5527 * lib/bitsetv.c: Include "bitsetv.h" first.
5528 * lib/get-errno.c: Include "get-errno.h" first.
5529 * m4/.cvsignore: Add config-h.m4.
5530 * tests/actions.at (Default %printer and %destructor for ...):
5531 Adjust expected line numbers in output to reflect removal of #if
5532 HAVE_CONFIG_H lines.
5533 * tests/glr-regression.at (Missed %merge type warnings when ...):
5534 Likewise.
5535 * tests/regression.at (Braced code in declaration in rules section):
5536 Likewise.
5537 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5538 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5539 Include <config.h> unconditionally.
5540
5541 * bootstrap: Sync from coreutils, as follows:
5542
5543 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5544
5545 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5546 variable was sometimes used without being initialized. This
5547 messed up the installation of the INSTALL file in some cases.
5548
5549 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5550
5551 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5552 --copy. Inspired by a suggestion from Bruno Haible.
5553
5554 2006-10-03 Jim Meyering <jim@meyering.net>
5555
5556 * bootstrap: Undo last change to this file, since now gnulib-tool
5557 sticks with the automake default in generating dependencies.
5558
5559 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5560
5561 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5562 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5563
5564 * doc/bison.1: Add copyright notice.
5565
5566 * data/glr.c: Don't include <stdarg.h>; not used.
5567
5568 * NEWS: The -g and --graph options now output graphs in Graphviz
5569 DOT format, not VCG format.
5570 * doc/bison.1: Likewise.
5571 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5572 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5573 of this change in
5574 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5575 * TODO: Remove Graphviz entry.
5576 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5577 remove vcg.c, vcg.h, vcg_defaults.h.
5578 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5579 * src/graphviz.c, src/graphviz.h: New files.
5580 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5581 * src/files.h: Make comment more generic.
5582 * src/main.c (main): Likewise.
5583 * src/print_graph.h: Likewise.
5584 * src/getargs.c (usage): Make usage description more generic.
5585 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5586 (static_graph, fgraph): Remove. All uses changed to pass
5587 arguments instead of sharing a static var.
5588 (print_core, print_actions, print_state, print_graph):
5589 Output graphviz format rather than VCG format.
5590 * tests/.cvsignore: Remove *.vcg; add *.dot.
5591 * tests/output.at: Expect *.dot files, not *.vcg files.
5592
5593 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5594 accommodates the 2006-10-08 change.
5595
5596 2006-10-11 Bob Rossi <bob@brasko.net>
5597
5598 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5599 (b4_yyssa, b4_yyerror_range): New macros.
5600 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5601 (yypvarsinit): Remove init of removed fields.
5602 (yypushparse): Remove use of removed fields; use new macros instead.
5603
5604 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5605
5606 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5607 in a push parser. Reindent slightly to match yacc.c better.
5608
5609 2006-10-11 Bob Rossi <bob@brasko.net>
5610
5611 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5612 yymsg_alloc fields.
5613 (yypvarsinit, yypushparse): Remove init of removed fields.
5614 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5615
5616 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5617
5618 * THANKS: Add Paolo Bonzini and Bob Rossi.
5619
5620 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5621
5622 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5623 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5624 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5625 b4_define_user_cde and uses): Remove.
5626 (b4_comment, b4_prefix, b4_sync_start): New.
5627 * data/bison.m4: New file, with most of the content removed from c.m4.
5628 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5629 * src/output.c (output_skeleton): Pass bison.m4.
5630 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5631 only if specified.
5632
5633 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5634
5635 Fix test failure reported by Tom Lane in
5636 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5637 and try to make such failures easier to catch in the future.
5638 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5639 that's now the caller's responsibility.
5640 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5641 Set yychar = YYEOF if it's negative.
5642 * tests/actions.at (yylex): Abort if asked to read past EOF.
5643 * tests/conflicts.at (yylex): Likewise.
5644 * tests/cxx-type.at (yylex): Likewise.
5645 * tests/glr-regression.at (yylex): Likewise.
5646 * tests/input.at (yylex): Likewise.
5647 * tests/regression.at (yylex): Likewise.
5648 * tests/torture.at (yylex): Likewise.
5649
5650 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5651
5652 Fix problems with translating English-language diagnostics.
5653 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5654 respect to bison-runtime pot generation. The YY_ stuff
5655 wasn't being captured.
5656 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5657 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5658 * runtime-po/POTFILES.in: Add data/push.c.
5659
5660 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5661
5662 Merge bootstrap changes from coreutils.
5663
5664 2006-09-28 Jim Meyering <jim@meyering.net>
5665
5666 Automatically generated dependencies are important even
5667 when all of the sources in a directory come from gnulib.
5668 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5669 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5670
5671 2006-09-23 Jim Meyering <jim@meyering.net>
5672
5673 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5674
5675 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5676
5677 * bootstrap: Add support for --force.
5678 (usage): New function. Describe usage less tersely.
5679 (CVS_only_file): New var.
5680
5681 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5682
5683 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5684 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5685 Adjust white space and comments to match GNU style better.
5686
5687 2006-09-20 Bob Rossi <bob@brasko.net>
5688
5689 * data/push.c (yyresult_get): Remove function.
5690 (YYPUSH_MORE): Add #define.
5691 (yypushparse): Modify return value.
5692
5693 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5694
5695 * stamp-h.in: Remove; no longer needed.
5696 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5697 Remove config.h, config.hin, intl (no longer created).
5698 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5699 stamp-h1.
5700
5701 Sync bootstrap from coreutils, as follows:
5702
5703 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5704
5705 * bootstrap (symlink_to_gnulib): New function.
5706 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5707 to copies-of-gnulib.
5708 (cp_mark_as_generated, slurp, gnulib_files):
5709 Avoid making a copy if it's the same as the old version.
5710 (gnulib_files): Add support for this variable (used by Bison).
5711
5712 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5713
5714 * src/getargs.c (usage): Rework to use conventions similar to
5715 coreutils, to make translation a bit easier and the code a bit
5716 smaller. Problem reported by Tim Van Holder.
5717
5718 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5719
5720 Use some of gnulib's new modules, taken from coreutils.
5721
5722 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5723 * bootstrap.conf: New file.
5724 (gnulib_modules): Add configmake, inttypes, unistd.
5725 (XGETTEXT_OPTIONS): Add complain, complain_at,
5726 fatal, fatal_at, warn, warn_at, unexpected_end.
5727 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5728 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5729 (gl_EARLY): Add.
5730 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5731 (gl_INIT): Add
5732 (GNULIB_AUTOCONF_SNIPPET): Remove.
5733 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5734 the pickiest.
5735 * lib/.cvsignore: Add inttypes_.h.
5736 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5737 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5738 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5739 no-longer-necessary initializations.
5740 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5741 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5742 use the unistd module.
5743 * src/system.h: Likewise.
5744 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5745 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5746 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5747 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5748 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5749 * src/system.h: Include inttypes.h unconditionally, now that we
5750 use the inttypes module. Don't bother to include stdint.h, since
5751 inttypes.h now does that for us.
5752 (LOCALEDIR): Remove, now that we use the configmake module.
5753 * src/getargs.c: Include configmake.h.
5754 * src/main.c: Likewise.
5755 * src/output.c: Likewise.
5756 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5757 not from $abs_top_builddir, since config.h moved.
5758
5759
5760 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5761 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5762
5763 * src/parse-gram.y (symbol_declaration): Don't put statements
5764 before declarations; it's not portable to C89.
5765 * src/scan-code.l (handle_action_at): Likewise.
5766
5767 * src/scan-code.l: Always initialize braces_level; the old code
5768 left it uninitialized and therefore had undefined behavior.
5769
5770 Don't attempt to redefine 'assert', since it runs afoul of
5771 systems where standard headers (mistakenly) include <assert.h>.
5772 Instead, define and use our own alternative, called 'aver'.
5773 * src/reader.c: Don't include assert.h, since we no longer
5774 use assert.
5775 * src/scan-code.l: Likewise.
5776 * src/system.h (assert): Remove, replacing with....
5777 (aver): New function, taking a bool arg. All uses changed.
5778 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5779 not merely an integer.
5780
5781 2006-09-15 Bob Rossi <bob@brasko.net>
5782
5783 Add support for push parsing. Based on the original work of
5784 Odd Arild Olsen <oao@fibula.no>.
5785 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5786 * data/c.m4 (YYPUSH): New.
5787 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5788 * data/push.c: New file.
5789 * src/getargs.c (push_parser): New var.
5790 * src/getargs.h (push_parser): New declaration.
5791 * src/output.c (prepare): Add macro insertion of `push_flag'.
5792 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5793 (prologue_declaration): Parse %push-parser.
5794 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5795 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5796 list of removed lines from the traces observed.
5797 (AT_CHECK_CALC_LALR): Added push parser tests.
5798
5799 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5800
5801 * NEWS: Version 2.3a.
5802 * configure.ac (AC_INIT): Likewise.
5803
5804 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5805 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5806 due to header ordering dependencies. I don't know why the #define
5807 was there.
5808
5809 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5810 runtime cost when YYDEBUG is not defined, and so that some tests
5811 that used to fail now work. Problem and initial suggestion by
5812 Paolo Bonzini.
5813 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5814 * data/glr.cc (b4_parser_class_name):
5815 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5816 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5817 (yydebug_) [YYDEBUG]: New member.
5818 (yycdebug_): Now defined only if YYDEBUG.
5819 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5820 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5821 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5822 if YYYDEBUG.
5823 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5824 Define only if YYDEBUG.
5825 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5826 set_debug_level.
5827 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5828 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5829 AT_CHECK_CALC_GLR_CC that are working now.
5830
5831 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5832
5833 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5834 We don't need them in glr.cc, and glr.c defines them.
5835 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5836 assumes that defining it to anything is the same as defining
5837 it to 1. Problem reported by Paolo Bonzini.
5838
5839 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5840
5841 * data/c.m4 (b4_null, b4_case): Define.
5842 * src/output.c (prepare_symbols): Use b4_null.
5843 (user_actions_output): Use b4_case.
5844
5845 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5846
5847 * data/glr.c (b4_shared_declarations): Put start-header first,
5848 before any #includes that we generate, so that feature-test
5849 macros work. Problem reported by Michael Deutschmann in
5850 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5851 * data/lalr1.cc: Likewise.
5852 * doc/bison.texinfo (Prologue): Document that feature-test macros
5853 should be defined before any Bison declarations.
5854 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5855 that depend on location.hh after, not before, Bison decls, since
5856 we now include location.hh after the first user prologue.
5857
5858 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5859 Sander Brandenburg in
5860 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5861 Also, fix minor white space and comment issues.
5862 (Prologue): Mention that it's better to define feature-test macros
5863 before Bison declarations. Problem reported by Michael Deutschmann.
5864
5865 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5866 by Jim Meyering.
5867 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5868 This adjusts to recent gnulib changes.
5869
5870 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5871
5872 Finish implementation of per-type %destructor/%printer. Discussed
5873 starting at
5874 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5875 and
5876 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5877 * NEWS (2.3+): Add a description of this feature to the default
5878 %destructor/%printer description.
5879 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5880 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5881 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5882 list node contains a semantic type.
5883 * src/symtab.c, src/symtab.h: Extend with a table that associates
5884 semantic types with their %destructor's and %printer's.
5885 (semantic_type_from_uniqstr, semantic_type_get,
5886 semantic_type_destructor_set, semantic_type_printer_set): New functions
5887 composing the public interface of that table.
5888 (symbol_destructor_get, symbol_destructor_location_get,
5889 symbol_printer_get, symbol_printer_location_get): If there's no
5890 per-symbol %destructor/%printer, look up the per-type before trying
5891 the default.
5892 * tests/actions.at (Per-type %printer and %destructor): New test case.
5893 * tests/input.at (Default %printer and %destructor redeclared):
5894 Extend to check that multiple occurrences of %symbol-default in a
5895 single %destructor/%printer declaration is an error.
5896 (Per-type %printer and %destructor redeclared, Unused values with
5897 per-type %destructor): New test cases.
5898
5899 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5900
5901 Require default %destructor/%printer to be declared using
5902 %symbol-default instead of an empty symbol list, and start working on
5903 new per-type %destructor/%printer. Discussed at
5904 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5905 * NEWS (2.3+): Add %symbol-default to example.
5906 * bison.texinfo (Freeing Discarded Symbols): Likewise.
5907 (Table of Symbols): Add entry for %symbol-default.
5908 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5909 (generic_symlist, generic_symlist_item): New nonterminals for creating
5910 a list in which each item is a symbol, semantic type, or
5911 %symbol-default.
5912 (grammar_declaration): Use generic_symlist in %destructor and %printer
5913 declarations instead of symbols.1 or an empty list.
5914 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5915 for changes to symbol_list.
5916 * src/reader.c: Update for changes to symbol_list.
5917 * src/scan-code.l: Likewise.
5918 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5919 * src/symlist.c, src/symlist.h: Extend such that a list node may
5920 represent a semantic type or a %symbol-default in addition to just an
5921 ordinary symbol. Add switched functions for setting %destructor's and
5922 %printer's.
5923 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5924 %destructor/%printer declarations.
5925
5926 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5927
5928 Whether the default %destructor/%printer applies to a particular symbol
5929 isn't a question of whether the user *declares* that symbol (in %token,
5930 for example). It's a question of whether the user by any means
5931 *defines* the symbol at all (by simply using a char token, for
5932 example). $end is defined by Bison whereas any other token with token
5933 number 0 is defined by the user. The error token is always defined by
5934 Bison regardless of whether the user declares it with %token, but we
5935 may one day let the user define error as a nonterminal instead.
5936 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5937 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5938 the meaning of "user-defined".
5939 * tests/actions.at (Default %printer and %destructor for user-declared
5940 end token): Rename to...
5941 (Default %printer and %destructor for user-defined end token): ...
5942 this.
5943
5944 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5945 computation of whether to apply the default, don't maintain a list of
5946 every Bison-defined symbol. Instead, just check for a first character
5947 of '$', which a user symbol cannot have, and check for the error token.
5948
5949 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5950
5951 Don't apply the default %destructor or %printer to the error token,
5952 $undefined, or $accept. This change fits the general rule that the
5953 default %destructor and %printer are only for user-declared symbols,
5954 and it solves several difficulties that are described in the new test
5955 cases listed below.
5956 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5957 * tests/actions.at (Default %printer and %destructor are not for error
5958 or $undefined, Default %printer and %destructor are not for $accept):
5959 New test cases.
5960
5961 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5962
5963 Allow %start after the first rule.
5964 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5965 when parsing the first rule.
5966 (check_and_convert_grammar): Search for it here after all grammar
5967 declarations have been parsed. Skip midrules, which have dummy LHS
5968 nonterminals.
5969 * src/symtab.c (symbol_is_dummy): New function.
5970 * src/symtab.h (symbol_is_dummy): Declare it.
5971 * tests/input.at (%start after first rule): New test.
5972
5973 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5974
5975 Redo some of the previous commit: add back the ability to use
5976 non-aliased/undeclared string literals since it might be useful to
5977 those declaring %token-table.
5978 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5979 commit: don't worry about complaints from symbols_pack.
5980 * src/symtab.c (symbol_new, symbol_class_set,
5981 symbol_check_alias_consistency): Undo changes in previous commit: count
5982 each string literal as a new symbol and token, assign it a symbol
5983 number, and don't complain about non-aliased string literals.
5984 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5985 and token counts but does still set aliased tokens to the same number,
5986 symbol_pack_processor now leaves empty slots in the symbols array.
5987 Remove those slots.
5988 * tests/regression.at (Undeclared string literal): Remove test case
5989 added in previous commit since non-aliased string literals are allowed
5990 again.
5991 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5992 remove unnecessary string literal declarations.
5993 * tests/sets.at (Firsts): Likewise.
5994
5995 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5996
5997 Don't allow an undeclared string literal, but allow a string literal to
5998 be used before its declaration.
5999 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6000 symbols_pack complained.
6001 * src/symtab.c (symbol_new): Don't count a string literal as a new
6002 symbol.
6003 (symbol_class_set): Don't count a string literal as a new token, and
6004 don't assign it a symbol number since symbol_make_alias does that.
6005 (symbol_make_alias): It's not necessary to decrement the symbol and
6006 token counts anymore. Don't assume that an alias declaration occurs
6007 before any uses of the identifier or string, and thus don't assert that
6008 one of them has the highest symbol number so far.
6009 (symbol_check_alias_consistency): Complain if there's a string literal
6010 that wasn't declared as an alias.
6011 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6012 symbol_pack asserts that every token has been assigned a symbol number
6013 although undeclared string literals have not.
6014 * tests/regression.at (String alias declared after use, Undeclared
6015 string literal): New test cases.
6016 (Characters Escapes, Web2c Actions): Declare string literals as
6017 aliases.
6018 * tests/sets.at (Firsts): Likewise.
6019
6020 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6021
6022 In the grammar scanner, STRING_FINISH unclosed constructs and return
6023 them to the parser in order to improve error messages.
6024 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6025 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6026 * tests/input.at (Unclosed constructs): New test case.
6027 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6028 seen.
6029
6030 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6031 unused global.
6032
6033 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6034
6035 Handle string aliases for character tokens correctly.
6036 * src/symtab.c (symbol_user_token_number_set): If the token has an
6037 alias, check and set its alias's user token number instead of its own,
6038 which is set to indicate the alias. Previously, every occurrence of
6039 the character token in the grammar overwrote that alias indicator with
6040 the character code.
6041 * tests/input.at (String aliases for character tokens): New test.
6042
6043 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6044
6045 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6046
6047 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6048
6049 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6050 to prevent failures when building on older platforms.
6051 Check for autopoint failure.
6052 Set XGETTEXT_OPTIONS to values that check for C format strings,
6053 so that translators are warned about them (this also helps
6054 prevent core dumps).
6055
6056 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6057 function, since it simplifies our code a bit.
6058
6059 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6060 rather than -W, so we don't get bogus warnings about sign comparisons.
6061 Add -Wpointer-arith, since that warning is useful (it reports code
6062 that does not conform to C89 and that some compilers reject).
6063 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6064 since it's no longer needed.
6065
6066 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6067
6068 Clean up scanners a bit.
6069 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6070 definitions so gcc won't warn when obstack_for_string is unused.
6071 * src/scan-code.l: config.h and system.h are already #include'd by
6072 scan-code-c.c, so get rid of them here.
6073 * src/scan-gram.l: Likewise.
6074 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6075 definitions rather than duplicating the rest of it.
6076 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6077
6078 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6079
6080 Suppress signed/unsigned comparison warnings for yycheck.
6081 * data/c.m4 (b4_safest_int_type): New macro.
6082 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6083 a signed int type, cast it to b4_safest_int_type first.
6084 * data/yacc.c: Likewise.
6085 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6086 also overwritten.
6087
6088 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6089
6090 * doc/bison.texinfo: Fix some typos.
6091
6092 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6093
6094 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6095 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6096
6097 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6098 the latest gnulib does this a different way.
6099 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6100 translation was patched, so stop omitting it.
6101
6102 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6103
6104 Enable declaration of default %printer/%destructor. Make the parser
6105 use these for all user-declared grammar symbols for which the user does
6106 not declare a specific %printer/%destructor. Thus, the parser uses it
6107 for token 0 if the user declares it but not if Bison generates it as
6108 $end. Discussed starting at
6109 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6110 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6111 and
6112 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6113 * NEWS (2.3+): Mention.
6114 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6115 declare a %destructor for a mid-rule's semantic value. It's just
6116 impossible to declare one specific to it.
6117 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6118 code. Describe default %destructor form.
6119 * src/parse-gram.y (grammar_declaration): Parse default
6120 %printer/%destructor declarations.
6121 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6122 and symbol_destructor_location_get rather than accessing the destructor
6123 and destructor_location members of struct symbol.
6124 (symbol_printers_output): Likewise but for %printer's.
6125 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6126 again.
6127 * src/symtab.c (default_destructor, default_destructor_location,
6128 default_printer, default_printer_location): New static global
6129 variables to record the default %destructor and %printer.
6130 (symbol_destructor_get, symbol_destructor_location_get,
6131 symbol_printer_get, symbol_printer_location_get): New functions to
6132 compute the appropriate %destructor and %printer for a symbol.
6133 (default_destructor_set, default_printer_set): New functions to set the
6134 default %destructor and %printer.
6135 * src/symtab.h: Prototype all those new functions.
6136 * tests/actions.at (Default %printer and %destructor): New test to
6137 check that the right %printer and %destructor are called, that they're
6138 not called for $end, and that $$ and @$ work correctly.
6139 (Default %printer and %destructor for user-declared end token): New
6140 test to check that the default %printer and %destructor are called for
6141 a user-declared end token.
6142 * tests/input.at (Default %printer and %destructor redeclared, Unused
6143 values with default %destructor): New tests to check related grammar
6144 warnings and errors.
6145
6146 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6147
6148 Clean up handling of %destructor for the end token (token 0).
6149 Discussed starting at
6150 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6151 and
6152 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6153
6154 Make the skeletons consistent in how they pop the end token and invoke
6155 its %destructor.
6156 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6157 state, which has token number 0, since this would invoke the
6158 %destructor for the end token.
6159 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6160 until after shifting the end token, or else it won't be popped.
6161 * data/yacc.c (yyparse): Likewise.
6162
6163 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6164 it's the end token. Upon termination, destroy an unshifted lookahead
6165 even when it's the end token.
6166 * data/lalr1.cc (yy::parser::parse): Likewise.
6167 * data/yacc.c (yyparse): Likewise.
6168
6169 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6170 value warnings for the end token when the user gives the end token a
6171 %destructor.
6172
6173 * tests/actions.at (Printers and Destructors): Test all the above.
6174
6175 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6176
6177 Update to latest gnulib and gettext versions.
6178 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6179 Add fopen-safer.
6180 (gnulib_files): Add m4/warning.m4. Don't worry about files
6181 overwritten by autopoint.
6182 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6183 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6184 rejects them.
6185 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6186 so that we can remove the intl files at a better time.
6187 (intl_files_to_remove): Remove aclocal.m4, since it gets
6188 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6189 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6190 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6191 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6192 Remove datarootdir hack; no longer needed.
6193 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6194 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6195 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6196 strdup.h.
6197 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6198 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6199
6200 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6201
6202 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6203 it with --assume-autoconf='latest-stable'.
6204
6205 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6206
6207 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6208 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6209 YYSTYPE' and `{'.
6210 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6211 those from muscle_tab.c since the old ones are misleading.
6212
6213 2006-07-13 Akim Demaille <akim@epita.fr>
6214
6215 Support %define "KEY" {VALUE}.
6216 * src/scan-code.h, src/scan-code.l (translate_action)
6217 (translate_rule_action, translate_symbol_action, translate_code):
6218 Return char *, not const char *.
6219 * src/parse-gram.y (declaration): Rename as...
6220 (prologue_declaration): this.
6221 (string_content): Remove this nonterminal, use STRING.
6222 (braceless, content, content.opt): New nonterminal.
6223 Use them.
6224 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6225 as value.
6226 * src/scan-gram.l (getargs.h): Don't include it.
6227
6228 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6229
6230 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6231 rather than a for-loop that declares a local bool variable. This
6232 should work around a compatibility problem with a Cray x1e C++
6233 compiler reported by Hung Nguyen in
6234 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6235 The for-loop was introduced in the 2004-11-17 change but I don't
6236 know why it was needed.
6237
6238 2006-07-12 Akim Demaille <akim@epita.fr>
6239
6240 * data/c.m4: Comment changes.
6241
6242 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6243
6244 * src/complain.c (error_message, ERROR_MESSAGE): New.
6245 To factor...
6246 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6247 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6248
6249 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6250
6251 * NEWS: Instead of %union, you can define and use your own union type
6252 YYSTYPE if your grammar contains at least one <type> tag.
6253 Your YYSTYPE need not be a macro; it can be a typedef.
6254 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6255 (Union Decl, Decl Summary): Document this.
6256 * data/glr.c (YYSTYPE): Implement this.
6257 * data/glr.cc (YYSTYPE): Likewise.
6258 * data/lalr1.cc (YYSTYPE): Likewise.
6259 * data/yacc.c (YYSTYPE): Likewise.
6260 * src/output.c (prepare): Output tag_seen_flag.
6261 * src/parse-gram.y (declaration, grammar_declaration):
6262 Use 'union_seen' rather than 'typed' to determine whether
6263 %union has been seen, since grammars can now be typed without
6264 %union.
6265 (symbol_declaration, type.opt, symbol_def):
6266 Keep track of whether a tag has been seen.
6267 * src/reader.c (union_seen, tag_seen): New vars.
6268 (typed): remove.
6269 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6270 * src/scan-code.l (untyped_var_seen): New variable.
6271 (handle_action_dollar): Adjust to above changes.
6272 (handle_action_dollar, handle_action_at):
6273 Improve overflow checking for outlandish numbers.
6274 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6275 avoid new diagnostics generated by above changes.
6276 * tests/regression.at (YYSTYPE typedef): Add test to check
6277 for type tags without %union.
6278
6279 * src/symlist.c (symbol_list_length): Return int, not unsigned
6280 int, since callers expect int. This may need to get revisited
6281 once we have proper integer overflow checking.
6282
6283 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6284 object is now static.
6285
6286 * src/getargs.c (flags_argmatch): Return void, not int,
6287 to pacify ./configure --enable-gcc-warnings.
6288
6289 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6290 since last_string is already defined to FLEX_PREFIX (last_string).
6291
6292 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6293
6294 Implement --warnings/-W.
6295 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6296 replaced by...
6297 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6298 Adjust callers.
6299 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6300 (warnings_args, warnings_types): New.
6301 (getargs, short_options, long_options): Accept -W/--warnings.
6302 Sort the options by alphabetical order, upper case letter right
6303 before its lower case.
6304
6305 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6306
6307 Change %merge result type clash warnings to errors. Discussed at
6308 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6309 * src/reader.c (record_merge_function_type): Use complain_at.
6310 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6311 declared later): Update test case results.
6312
6313 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6314
6315 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6316 to be in alphabetical order.
6317 (trace_args): Spelling fixes.
6318
6319 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6320
6321 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6322 so they don't collide with user-defined macros.
6323 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6324 this was never guaranteed, and now that we're using gnulib stdint,
6325 which defines int_fast16_t to long int, the problem is exposed.
6326
6327 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6328
6329 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6330 need the full POSIX semantics (and weren't implementing them
6331 anyway).
6332
6333 Adjust to Autoconf 2.60 and today's gnulib.
6334 * bootstrap (gnulib_modules): Add stdint.
6335 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6336 no longer copies it.
6337 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6338 since stdint needs the former and wcwidth (which is now required
6339 by mbswidth) needs the latter.
6340 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6341 work around a compatibility glitch between gettext 0.14.6 and
6342 Autoconf 2.60.
6343 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6344 Do not check for uintptr_t, since new stdint module does the right
6345 thing.
6346 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6347 Add stdint.h, stdint_.h, wcwidth.h.
6348 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6349 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6350 stdint.m4, wchar_t.m4, wcwidth.m4.
6351 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6352 usual order for ../lib/*.h files.
6353 (file_name_split): Use last_component, not base_name, to adjust
6354 to gnulib changes.
6355 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6356 for ../lib/*.h files.
6357 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6358 Define unconditionally, since we now assume the stdint module.
6359 * src/scan-skel.l: Include <dirname.h>.
6360 (BASE_QPUTS): Use last_component, not base_name.
6361 * src/system.h: Include <unlocked-io.h> in the usual order
6362 for ../lib/*.h files. Include <stdint.h> unconditionally,
6363 since we now use the stdint module.
6364 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6365 HAVE_UINTPTR_T, since we now use the stdint module.
6366 (base_name): Remove decl, since files now include <dirname.h>
6367 to get the decl.
6368
6369 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6370
6371 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6372 New, default to 1.
6373 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6374 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6375 default.
6376 * tests/calc.at: Adjust.
6377
6378 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6379
6380 * data/c.m4 (b4_basename): New.
6381 (b4_syncline): Also output the location of its invocation (from
6382 the skeleton).
6383 (b4_user_action, b4_define_user_action, b4_user_actions)
6384 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6385 (b4_user_stype): New.
6386 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6387
6388 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6389
6390 In the grammar file, the first column is 1 not 0 on the first line as
6391 on every other line.
6392 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6393 * tests/input.at (Torturing the Scanner): Update output.
6394
6395 * src/scan-gram.l (scanner_cursor): Declare it static.
6396
6397 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6398
6399 In warnings, say "previous declaration" rather than "first
6400 declaration".
6401 * src/symtab.c (redeclaration): Do that here.
6402 * src/reader.c (record_merge_function_type): In the case of a result
6403 type clash, report the previous declaration rather than the very first
6404 one in the grammar file.
6405 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6406 declared later): Add a third declaration to check this behavior.
6407 * tests/input.at (Incompatible Aliases): Update output.
6408
6409 2006-06-27 Akim Demaille <akim@epita.fr>
6410
6411 * doc/Doxyfile.in: New.
6412 * doc/Makefile.am: Use it.
6413 * src/lalr.h, src/symtab.h: Initial doxygenation.
6414
6415 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6416
6417 Don't miss %merge result type warnings just because the LHS types are
6418 declared after the %merge. This continues the effort of the previous
6419 patch.
6420 * src/reader.c (get_merge_function): Don't set the merger type yet.
6421 (record_merge_function_type): New function for setting the merger type
6422 and checking for clashes.
6423 (grammar_current_rule_merge_set): Set the location of the %merge for
6424 the current rule.
6425 (packgram): Invoke record_merge_function_type for each rule now that
6426 all symbol type declarations have been parsed.
6427 * src/reader.h (merger_list.type_declaration_location): New member
6428 storing the location of the first %merge from which the type for this
6429 merging function was derived.
6430 * src/symlist.h (symbol_list.merger_declaration_location): New member
6431 storing the location of a rule's %merge, if any.
6432 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6433 declared later): New test to catch the error fixed by the above patch.
6434
6435 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6436
6437 Get action warnings (grammar_rule_check) right even when symbol
6438 declarations appear after the rules. Discussed at
6439 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6440 and
6441 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6442 Don't mistake the type of $$ in a midrule to be that of its parent
6443 rule's $$.
6444 * src/reader.c (grammar_current_rule_end): Don't invoke
6445 grammar_rule_check yet since not all symbol declarations may have been
6446 parsed yet.
6447 (grammar_midrule_action): Likewise.
6448 Don't record whether the midrule's $$ has been used yet since actions
6449 haven't been translated yet.
6450 Record the midrule's parent rule and its RHS index within the parent
6451 rule.
6452 (grammar_current_rule_action_append): Don't translate the action yet
6453 since not all symbol declarations may have been parsed yet and, thus,
6454 warnings about types for $$, $n, @$, and @n can't be reported yet.
6455 (packgram): Translate the action and invoke grammar_rule_check now that
6456 all symbol declarations have been parsed.
6457 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6458 after parsing the entire grammar file, the symbol list here in the case
6459 of a midrule is actually the midrule's empty RHS, so reference its
6460 parent rule's RHS where necessary.
6461 On the other hand, now that you can already know it's a midrule, you
6462 aren't forced to think $$ has the same type as its parent rule's $$.
6463 (handle_action_at): In the case of a midrule, reference the parent rule
6464 where necessary.
6465 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6466 members.
6467 (symbol_list_length): Now that this is invoked after all rules have
6468 been parsed, a NULL symbol (rather than a NULL symbol list node)
6469 terminates a rule. symbol_list_print already does this correctly.
6470 * src/symlist.h (symbol_list.midrule_parent_rule,
6471 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6472 remember their relationships with their parents.
6473 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6474 fixed by the above patch.
6475 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6476 implementing...
6477 (Unused values): ... this old test case and...
6478 (Unused values before symbol declarations): ... this new test case.
6479 This one is the same as `Unused values' except that all symbol
6480 declarations appear after the rules in order to catch the rest of the
6481 errors fixed by the above patch.
6482
6483 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6484
6485 More cleanup.
6486 * src/reader.c (current_rule): Declare it static since it's no longer
6487 used outside this file.
6488 (grammar_current_rule_action_append): Remove redundant arguments from
6489 translate_rule_action invocation.
6490 * src/reader.h (current_rule): Remove this unused extern.
6491 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6492 * src/scan-code.l (translate_rule_action): Likewise.
6493
6494 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6495
6496 Clean up yesterday's patch.
6497 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6498 to...
6499 * src/reader.c (grammar_current_rule_action_append): ... here for
6500 consistency with grammar_current_rule_symbol_append.
6501 * tests/regression.at (Braced code in declaration in rules section):
6502 Make yyerror and yylex static as usual.
6503
6504 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6505
6506 Fix bug that mistakes braced code in a declaration in the rules section
6507 to be a rule action. Mentioned at
6508 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6509 * src/scan-gram.l: Move midrule action detection from the start of the
6510 scanning of any braced code to...
6511 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6512 action. For readability, use $2 and @2 rather than the equivalent
6513 global variables.
6514 * tests/regression.at (Braced code in declaration in rules section):
6515 New test to catch the error fixed by the above patch.
6516
6517 Work on code readability some.
6518 * src/scan-code.l (current_rule): Get rid of this misleading and
6519 redundant declaration: it's actually extern'ed in reader.h.
6520 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6521 translate_action): Add a rule argument and use it instead of the global
6522 current_rule.
6523 (translate_rule_action): This already receives current_rule through an
6524 argument, so pass it on to translate_action instead of assigning
6525 current_rule to current_rule.
6526 (translate_symbol_action, translate_code): Pass rule = NULL to
6527 translate_action.
6528
6529 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6530
6531 Rename %before-definitions to %start-header and %after-definitions to
6532 %end-header. Don't use these declarations to separate pre-prologue
6533 blocks from post-prologue blocks. Add new order-independent
6534 declarations %before-header and %after-header as alternatives to the
6535 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6536 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6537 * NEWS (2.3+): Update for these changes.
6538 * data/glr.c (b4_before_definitions): Update to...
6539 (b4_start_header): ... this.
6540 (b4_after_definitions): Update to...
6541 (b4_end_header): ... this.
6542 * data/glr.cc: Likewise.
6543 * data/lalr1.cc: Likewise.
6544 * data/yacc.c: Likewise.
6545 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6546 prologue blocks with %*-header declarations.
6547 (Calc++ Parser): Likewise.
6548 (Decl Summary): Update names.
6549 (Table of Symbols): Update description.
6550 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6551 (PERCENT_END_HEADER): ... this.
6552 (PERCENT_BEFORE_DEFINITIONS): Update to...
6553 (PERCENT_START_HEADER): ... this.
6554 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6555 (declaration): Update token names and m4 macro names.
6556 When parsing %end-header and %start-header, invoke translate_code
6557 before muscle_code_grow, and no longer set global booleans to remember
6558 whether these declarations have been seen.
6559 Parse new %after-header and %before-header.
6560 * src/reader.c (before_definitions, after_definitions): Remove.
6561 (prologue_augment): Accept a new bool argument to specify whether to
6562 augment the pre-prologue or post-prologue.
6563 * src/reader.h (before_definitions, after_definitions): Remove these
6564 extern's.
6565 (prologue_augment): Add new bool argument.
6566 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6567 (PERCENT_END_HEADER): ... this.
6568 (PERCENT_BEFORE_DEFINITIONS): Update to...
6569 (PERCENT_START_HEADER): ... this.
6570 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6571 * tests/actions.at (Printers and Destructors): Update names.
6572
6573 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6574
6575 Add comparison operators for C++ location classes. Discussed at
6576 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6577 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6578 declaration indicating whether filename_type has an operator==. If
6579 filename_type is `std::string', it defaults to `1', `0' otherwise.
6580 * data/location.cc: Iff b4_define_location_comparison is `1', add
6581 operator== and operator!= for class position and for class location.
6582
6583 Some minor fixes.
6584 * src/scan-action.l: Remove unused file.
6585 * src/symtab.c (symbol_printer_set): Use printer_location not
6586 destructor_location.
6587 * src/symtab.h (struct symbol): Replace incorrect source comment for
6588 printer members.
6589 * tests/input.at (Incompatible Aliases): Update output with correct
6590 printer location.
6591
6592 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6593
6594 Don't put the pre-prologue in the header file. For the yacc.c code
6595 file and the glr.c header and code files, move the pre-prologue before
6596 the token definitions. Add new %before-definitions and
6597 %after-definitions to declare code that will go in both the header file
6598 and code file. Discussed at
6599 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6600 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6601 and
6602 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6603 * NEWS (2.3+): Describe these changes.
6604 * data/glr.c (b4_pre_prologue): Move from within to before...
6605 (b4_shared_declarations): ... this.
6606 Add new b4_before_definitions before b4_token_enums.
6607 Add new b4_after_definitions at the end.
6608 * data/glr.cc (b4_pre_prologue): Replace with...
6609 (b4_before_definitions): ... this in the header file.
6610 (b4_after_definitions): New near the end of the header file.
6611 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6612 code file right before including the header file.
6613 (b4_before_definitions): New in the previous position of
6614 b4_pre_prologue in the header file.
6615 (b4_after_definitions): New near the end of the header file.
6616 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6617 (b4_token_enums_defines): In the code file, move to right before
6618 YYSTYPE for consistency with the header file.
6619 (b4_before_definitions): New right before b4_token_enums_defines in
6620 both the header and code file.
6621 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6622 header and code file.
6623 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6624 of prologues for %union dependencies.
6625 (Decl Summary): In %defines description, mention the effect of
6626 %before-definitions and %after-definitions on the header file.
6627 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6628 than in the pre-prologue so that make check succeeds.
6629 (Table of Symbols): Add entries for %before-definitions and
6630 %after-definitions.
6631 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6632 %before-definitions.
6633 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6634 (declaration): Parse those declarations and append to
6635 b4_before_definitions and b4_after_definitions, respectively.
6636 * src/reader.c (before_definitions, after_definitions): New bools to
6637 track whether those declarations have been seen.
6638 (prologue_augment): Add to the post-prologue if %union,
6639 %before-definitions, or %after-definitions has been seen.
6640 * src/reader.h (before_definitions, after_definitions): New extern's.
6641 * src/scan-gram.l: Scan the new declarations.
6642 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6643 prologue block in a %before-definitions or a %after-definitions based
6644 on whether the %union is declared.
6645 * tests/regression.at (Early token definitions with --yacc, Early token
6646 definitions without --yacc): Move tests for token definitions into the
6647 post-prologue since token names are no longer defined in the
6648 pre-prologue.
6649
6650 2006-06-20 Akim Demaille <akim@epita.fr>
6651
6652 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6653 (symbol_get): Use it.
6654 * src/parse-gram.y: Use it.
6655
6656 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6657
6658 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6659 build succeeds when configured with --enable-gcc-warnings.
6660
6661 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6662
6663 * src/parse-gram.y (char_name): New function.
6664 (CHAR, STRING, string_content): For %printer, properly escape.
6665 (ID): Prefer fputs to fprintf.
6666 (id): Reindent to be consistent with other rules.
6667 Properly quote char.
6668
6669 The Translation Project changed its way of publishing translations
6670 to maintainers. I haven't received any responses to my request
6671 for supporting the old way, or for documenting the new way. I
6672 have modified 'bootstrap' to use screen scraping
6673 (in this case, HTML scraping). This is unreliable and inelegant,
6674 but I don't see any better way. Yuck.
6675 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6676 (get_translations): New function, which uses HTML scraping to
6677 deduce locations of latest translations.
6678 Use this function to grab both bison and bison-runtime .po files.
6679 Don't bother priming the pump for the runtime-po domain any more,
6680 as it's now translated better than bison is.
6681
6682 2006-06-19 Akim Demaille <akim@epita.fr>
6683
6684 * src/scan-gram.l: No longer "parse" things after `%union' until
6685 `{'. Rather, return a single "%union" token.
6686 No longer make symbols: return strings, and leave the conversion
6687 to symbols to the parser.
6688 (SC_PRE_CODE, token_type): Remove.
6689 * src/parse-gram.y (%union): New field `character'.
6690 Sort tokens.
6691 (CHAR): New token.
6692 (ID, ID_COLON): Now that the scanner no longer makes them
6693 identifiers, adjust all uses to invoke symbol_get.
6694 (id_colon): New, wraps the conversion from string to symbol.
6695 (%union): Accept a possible union_name.
6696 (symbol): Now can be a char.
6697 * data/c.m4 (b4_union_name): Leave a default value.
6698 * data/glr.c, data/yacc.c: Use it.
6699
6700 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6701
6702 For associating token numbers with token names for "yacc.c", don't use
6703 #define statements unless `--yacc' is specified; always use enum
6704 yytokentype. Most important discussions start at:
6705 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6706 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6707 and
6708 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6709 * NEWS (2.3+): Mention.
6710 * data/c.m4 (b4_yacc_if): New.
6711 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6712 token #define's.
6713 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6714 on token name definitions.
6715 * src/getargs.c (usage): Capitalize `Yacc' in English.
6716 * src/output.c (prepare): Define b4_yacc_flag.
6717 * tests/regression.at (Early token definitions): Test that tokens names
6718 are defined before the pre-prologue not just before the post-prologue.
6719 Remove this test case and copy to...
6720 (Early token definitions with --yacc): ... this to test #define's.
6721 (Early token definitions without --yacc): ... and this to test enums.
6722
6723 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6724
6725 * NEWS: Reword the post-2.3 change to not be so optimistic about
6726 removing the old "look-ahead" spelling.
6727 Update previous look-ahead/lookahead change reports.
6728 * REFERENCES: look-ahead -> lookahead (since that's
6729 what he actually wrote).
6730 * doc/refcard.tex: look ahead -> lookahead,
6731 look-ahead -> lookahead
6732
6733 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6734
6735 For consistency, use `lookahead' instead of `look-ahead' or
6736 `look_ahead'. Discussed starting at
6737 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6738 and then at
6739 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6740 * NEWS: For the next release, note the change to `--report'.
6741 * TODO, doc/bison.1: Update English.
6742 * doc/bison.texinfo: Update English.
6743 (Understanding Your Parser, Bison Options): Document as
6744 `--report=lookahead' rather than `--report=look-ahead'.
6745 * src/conflicts.c: Update English in comments.
6746 (lookahead_set): Rename from look_ahead_set.
6747 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6748 (resolve_sr_conflict): Rename local look_ahead_tokens to
6749 lookahead_tokens, and update other uses.
6750 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6751 count_rr_conflicts, conflicts_free): Update uses.
6752 * src/getargs.c (report_args): Move "lookahead" before alternate
6753 spellings.
6754 (report_types): Update uses.
6755 (usage): For `--report' usage description, state `lookahead' spelling
6756 rather than `look-ahead'.
6757 * src/getargs.h (report.report_lookahead_tokens): Rename from
6758 report_look_ahead_tokens.
6759 * src/lalr.c: Update English in comments.
6760 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6761 (state_lookahead_tokens_count): Rename from
6762 state_look_ahead_tokens_count.
6763 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6764 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6765 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6766 Update other uses.
6767 Update English in output.
6768 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6769 * src/print.c: Update English in comments.
6770 (lookahead_set): Rename from look_ahead_set.
6771 (print_reduction): Rename argument lookahead_token from
6772 look_ahead_token.
6773 (print_core, state_default_rule, print_reductions, print_results):
6774 Update uses.
6775 * src/print_graph.c: Update English in comments.
6776 (print_core): Update uses.
6777 * src/state.c: Update English in comments.
6778 (reductions_new): Update uses.
6779 (state_rule_lookahead_tokens_print): Rename from
6780 state_rule_look_ahead_tokens_print, and update other uses.
6781 * src/state.h: Update English in comments.
6782 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6783 (state_rule_lookahead_tokens_print): Rename from
6784 state_rule_look_ahead_tokens_print.
6785 * src/tables.c: Update English in comments.
6786 (conflict_row, action_row): Update uses.
6787 * tests/glr-regression.at
6788 (Incorrect lookahead during deterministic GLR,
6789 Incorrect lookahead during nondeterministic GLR): Rename
6790 print_look_ahead to print_lookahead.
6791 * tests/torture.at: Update English in comments.
6792 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6793 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6794 (Many lookahead tokens): Update uses.
6795 * data/glr.c: Update English in comments.
6796 * lalr1.cc: Likewise.
6797 * yacc.c: Likewise.
6798 * src/conflicts.h: Likewise.
6799 * src/lalr.h: Likewise.
6800 * src/main.c: Likewise.
6801 * src/output.c: Likewise.
6802 * src/parse-gram.c: Likewise.
6803 * src/tables.h: Likewise.
6804 * tests/calc.at: Likewise.
6805
6806 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6807
6808 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6809
6810 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6811
6812 * TODO: Add request from Nelson H. F. Beebe to be able to install
6813 Bison without installing the yacc script.
6814
6815 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6816
6817 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6818 and yytext if they're already #define'd.
6819 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6820 * src/scan-code-c.c: ... here.
6821 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6822 <config.h>.
6823
6824 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6825
6826 Get Bison to build again when configured with --enable-gcc-warnings.
6827 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6828 missing #include's.
6829 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6830 loc argument as it shadows a global.
6831 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6832 invocation.
6833
6834 * src/.cvsignore: Add scan-code.c.
6835
6836 2006-06-07 Akim Demaille <akim@epita.fr>
6837
6838 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6839 to...
6840 * src/scan-code.l: here.
6841 * tests/input.at (Torturing the Scanner): Fix another location
6842 error.
6843
6844 2006-06-07 Akim Demaille <akim@epita.fr>
6845
6846 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6847
6848 2006-06-06 Akim Demaille <akim@epita.fr>
6849
6850 Extract the parsing of user actions from the grammar scanner.
6851 As a consequence, the relation between the grammar scanner and
6852 parser is much simpler. We can also split "composite tokens" back
6853 into simple tokens.
6854 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6855 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6856 rename as...
6857 * src/location.h, src/location.c (add_column_width)
6858 (location_compute): these.
6859 Fix the column count: the initial column is 0.
6860 (location_print): Be robust to ending column being 0.
6861 * src/location.h (boundary_set): New.
6862 * src/main.c: Adjust to scanner_free being renamed as
6863 gram_scanner_free.
6864 * src/output.c: Include scan-code.h.
6865 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6866 Use boundary_set.
6867 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6868 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6869 which is now, again, a separate token.
6870 Adjust all dependencies.
6871 Whereever actions with $ and @ are used, use translate_code.
6872 (action): Remove this nonterminal which is now useless.
6873 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6874 (grammar_current_rule_action_append): Use translate_code.
6875 (packgram): Bound check ruleno, itemno, and rule_length.
6876 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6877 (last_string, last_braced_code_loc, max_left_semantic_context)
6878 (scanner_initialize, scanner_free, scanner_last_string_free)
6879 (gram_out, gram_lineno, YY_DECL_): Move to...
6880 * src/scan-gram.h: this new file.
6881 (YY_DECL): Rename as...
6882 (GRAM_DECL): this.
6883 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6884 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6885 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6886 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6887 Move these declarations, and...
6888 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6889 these to...
6890 * src/flex-scanner.h: this new file.
6891 * src/scan-gram.l (rule_length, rule_length_overflow)
6892 (increment_rule_length): Remove.
6893 (last_braced_code_loc): Rename as...
6894 (gram_last_braced_code_loc): this.
6895 Adjust to the changes of the parser.
6896 Move all the handling of $ and @ into...
6897 * src/scan-code.l: here.
6898 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6899 (handle_action_dollar, handle_action_at): Move to...
6900 * src/scan-code.l: here.
6901 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6902 scan-code.h, scan-code-c.c, scan-gram.h.
6903 (EXTRA_bison_SOURCES): Add scan-code.l.
6904 (BUILT_SOURCES): Add scan-code.c.
6905 (yacc): Be robust to white spaces.
6906
6907 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6908 * tests/regression.at: Adjust the column numbers.
6909 * tests/regression.at: Adjust the error message.
6910
6911 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6912
6913 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6914 Use Akim's wording from
6915 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6916
6917 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6918
6919 Between Bison releases, manually append `+' to the previous Bison
6920 release number, and use that as a signal to automatically print the
6921 ChangeLog's CVS Id keyword from --version. Discussed starting at
6922 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6923 * ChangeLog: Add Id header.
6924 * configure.ac (AC_INIT): Append `+' to `2.3'.
6925 * src/.cvsignore: Add revision.c.
6926 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6927 (BUILT_SOURCES): Add revision.c.
6928 (revision.c): New target rule. This file defines a new global variable
6929 named revision. It initializes it with either the Id from ChangeLog
6930 or, if VERSION doesn't contain `+', with the empty string.
6931 * src/getargs.c (version): Print the value of revision.
6932 * src/revision.h: Extern revision.
6933
6934 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6935
6936 * NEWS: Version 2.3.
6937 * configure.ac (AC_INIT): Likewise.
6938
6939 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6940
6941 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6942 with no arguments, not as an object-like macro. This is for
6943 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6944 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6945 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6946 Document this.
6947
6948 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6949
6950 * src/getargs.c (usage): Back out yesterday's modification of the
6951 --help output so that we don't have to wait for translation before
6952 releasing 2.3.
6953
6954 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6955
6956 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6957 Problem reported by Akim Demaille.
6958
6959 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6960
6961 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6962
6963 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6964
6965 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6966 generated source code. Problem reported by Frans Englich in
6967 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6968
6969 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6970
6971 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6972 shell, not within 'make', so that 'make' by an ordinary builder
6973 (using GNU make) does not worry about configuring gzip. This also
6974 works around a bug reported independently by Keith Thompson and by
6975 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6976 stderr rather than stdout, messing up the build logs.
6977
6978 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6979
6980 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6981 to make sure that YYID will never be unused. This fixes a 'make
6982 maintainer-check' failure caused by the recent changes to the 'Trivial
6983 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6984 not used.
6985 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6986
6987 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6988
6989 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6990 state before an empty RHS is always resolved here. Only the location
6991 of that state is guaranteed to be resolved, and that's enough. This
6992 fixes the remaining bug reported by Derek M. Jones in
6993 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6994 * tests/glr-regression.at (Uninitialized location when reporting
6995 ambiguity): Test the above case.
6996 Also, the embedded comments in this test case claim it checks the case
6997 of an empty RHS that has inherited the initial location. However, the
6998 corresponding LHS was already resolved, so yyresolveLocations didn't
6999 actually have reason to modify it. Fix this by forcing
7000 nondeterministic operation at the beginning of the parse.
7001
7002 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7003
7004 * data/c.m4 (b4_yy_symbol_print_generate):
7005 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7006 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7007 of the bugs reported today by Derek M Jones in
7008 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7009 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7010 defined to be a type name without parens or brackets.
7011 (Location Type): Similarly for YYLTYPE.
7012 * tests/regression.at (Trivial grammars): Put in a test for this
7013 bug that will be caught by 'make maintainer-check' (though not,
7014 alas, by 'make check' unless your compiler is picky).
7015
7016 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7017
7018 * NEWS: Version 2.2.
7019 * configure.ac (AC_INIT): Likewise.
7020
7021 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7022
7023 * data/glr.c (yyreportTree): Make room in yystates for the state
7024 preceding the RHS. This fixes the segmentation fault reported by Derek
7025 M. Jones in
7026 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7027 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7028 to the user. Reported for yyreportTree by Derek M. Jones later in the
7029 same thread.
7030 * THANKS: Add Derek M. Jones.
7031 Update my email address.
7032 Fix typo in Steve Murphy's name.
7033
7034 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7035
7036 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7037 checking against YYLAST that caused the parser to miss a potential
7038 alternative in its diagnostic.
7039 Problem reported by Maria Jose Moron Fernandez in
7040 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7041 * data/lalr1.cc (yysyntax_error_): Likewise.
7042 * data/yacc.c (yysyntax_error): Likewise.
7043 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7044 tokens, in case we run into an older C compiler.
7045 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7046 Use them to check for the off-by-one error fixed above.
7047
7048 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7049 YYSIZE_T, not size_t.
7050 * tests/regression.at (Trivial grammars): New test, to catch
7051 the error fixed by the above patch.
7052
7053 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7054
7055 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7056 scheme.
7057 Reported by Steve Murphy.
7058
7059 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7060
7061 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7062 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7063
7064 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7065
7066 Implement --trace=m4.
7067 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7068 * src/output.c (output_skeleton): When set, pass -dV to m4.
7069
7070 Factor the handling of flags in m4.
7071 * src/output.c (prepare): Rename the muscle names debug, defines,
7072 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7073 * data/c.m4: Adjust.
7074 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7075 Use b4_define_flag_if to define other b4_FLAG_if macros.
7076 (b4_location_if): As a consequence, rename as...
7077 (b4_locations_if): this, for consistency.
7078 Adjust all the skeletons.
7079
7080 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7081
7082 * etc/bench.pm: Shorten bench names.
7083
7084 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7085
7086 * src/output.h, src/output.c (error_verbose): Move to...
7087 * src/getargs.h, src/getargs.c: here.
7088 Sort the flags.
7089 Adjust dependencies.
7090
7091 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7092
7093 * data/c.m4 (b4_copyright): Put the special exception for Bison
7094 skeletons here, so we don't have to put it in each skeleton. All
7095 uses changed. Suggested by Akim Demaille. Also, wrap the
7096 copyright notice, in case it is longer than 80 columns. Replace
7097 comma by newline after title.
7098
7099 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7100
7101 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7102 incompatibility, not a bug. Mention that it wasn't fixed as of
7103 flex 2.5.33.
7104
7105 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7106
7107 * examples/extexi: Enforce the precedence of concatenation over
7108 >>.
7109 Reported by Tommy Nordgren.
7110
7111 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7112
7113 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7114 with the member "token".
7115 Reported by Martin Nylin.
7116
7117 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7118
7119 * data/glr.c: Switch to Bison 2.2 special-exception language in
7120 the copyright notice. Use more-regular format for titles and
7121 copyright notices.
7122 * data/glr.cc: Likewise.
7123 * data/location.cc: Likewise.
7124 * data/yacc.cc: Likewise.
7125 * doc/bison.texinfo (Conditions): Document this.
7126 * NEWS: likewise. Upgrade version to 2.2.
7127
7128 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7129
7130 * data/glr.cc: Remove dead code.
7131
7132 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7133
7134 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7135 that variable and the line breaks the bootstrap. Problem reported
7136 by Juan M. Guerrero.
7137
7138 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7139
7140 * doc/bison.texinfo (Multiple start-symbols): New.
7141
7142 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7143
7144 * etc/README, etc/bench.pl: New.
7145
7146 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7147
7148 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7149 rule.
7150 Reported by Mickael Labau.
7151 * tests/input.at (Torturing the Scanner): Test it.
7152
7153 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7154
7155 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7156 Problem reported by Bob Rossi.
7157
7158 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7159
7160 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7161 and didn't really work.
7162 For the index, use @ifnotinfo, not @iftex.
7163 Minor cleanups of spacing and terminology.
7164
7165 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7166
7167 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7168 of AT_NAME_PREFIX when %name-prefix is not used.
7169
7170 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7171
7172 Apply --prefix to C++ skeletons too: they change the namespace.
7173 The test suite already exercize these cases.
7174 * data/c++.m4 (b4_namespace): New.
7175 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7176 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7177 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7178 * doc/bison.texinfo: Document it.
7179 (Option Cross Key): Use @multitable in all formats. It looks
7180 nicer, even in TeX outputs.
7181 (Rules): Use the same code whatever the output type is.
7182 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7183 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7184 * tests/calc.at: Use it, instead of hard coding `yy'.
7185
7186 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7187
7188 * TODO: Remove dead items.
7189
7190 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7191
7192 * doc/FAQ: Remove, merged into...
7193 * doc/bison.texinfo (FAQ): this.
7194 * doc/Makefile.am (EXTRA_DIST): Adjust.
7195
7196 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7197
7198 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7199 even if empty.
7200 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7201 * doc/bison.texinfo (Calc++ Scanner): Use it.
7202
7203 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7204
7205 Fix two nits reported by twlevo, plus one more that I discovered.
7206
7207 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7208 this is the usual Bison style.
7209 * src/location.h (location_print): Likewise.
7210
7211 * src/reader.h (token_name): Likewise.
7212
7213 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7214
7215 Fix some nits reported by twlevo.
7216 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7217 and "POSIX". Use more-modern syntax for URLs. Mention C++
7218 and ask for Java. Don't hardwire OS version numbers. Add
7219 copyright notice.
7220 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7221 * src/conflicts.c (solved_conflicts_obstack): Now static.
7222
7223 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7224
7225 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7226 page. Say "you can use it" not "you may use it" as on the web page;
7227 we're describing capabilities not granting permission.
7228
7229 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7230
7231 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7232 shadowing warnings. Use usual patter for iterating through RHS.
7233 * tests/glr-regression.at
7234 (Uninitialized location when reporting ambiguity):
7235 Modify yylex so that it uses its argument, rather than trying
7236 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7237 const char -> char const.
7238
7239 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7240 Don't use tabs inside commands; it messes up 'ps'.
7241 Problem reported by twlevo.
7242
7243 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7244
7245 * tests/glr-regression.at (Uninitialized location when reporting
7246 ambiguity): New test case.
7247 * data/glr.c (yyresolveLocations): New function, which uses
7248 YYLLOC_DEFAULT.
7249 (yyresolveValue): Invoke yyresolveLocations before reporting an
7250 ambiguity.
7251 * doc/bison.texinfo (Default Action for Locations): Note
7252 YYLLOC_DEFAULT's usage for ambiguity locations.
7253 (GLR Semantic Actions): Cross-reference those notes.
7254
7255 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7256
7257 * tests/glr-regression.at (Leaked semantic values when reporting
7258 ambiguity): Remove unnecessary union and type declarations.
7259 (Leaked lookahead after nondeterministic parse syntax error): New test
7260 case.
7261 * data/glr.c (yyparse): Check for zero stacks remaining before
7262 attempting to shift the lookahead so that you don't lose it.
7263
7264 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7265
7266 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7267 * tests/glr-regression.at (Leaked semantic values when reporting
7268 ambiguity): New test case.
7269 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7270 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7271 now unnecessary yystackp parameter.
7272 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7273 destructors can be called.
7274
7275 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7276 in existing testcases.
7277
7278 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7279
7280 Don't leak semantic values for parent RHS when a user action cuts the
7281 parser, and clean up related code a bit.
7282 * tests/glr-regression.at (Leaked merged semantic value if user action
7283 cuts parse): Rename to...
7284 (Leaked semantic values if user action cuts parse): ... this. Add check
7285 for leaked parent RHS values.
7286 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7287 between an unresolved state (non-empty chain of semantic options) and
7288 an incomplete one (signaled by an empty chain).
7289 (yyresolveStates): Document the interface. Move all manipulation of a
7290 successfully or unsuccessfully resolved yyGLRState to...
7291 (yyresolveValue): ... here so that yyresolveValue always leaves a
7292 yyGLRState with consistent data and thus is easier to understand.
7293 Remove the yyvalp and yylocp parameters since they are always just
7294 taken from the yys parameter. When reporting a discarded merged value
7295 in debugging output, note that it is incompletely merged. Document the
7296 interface.
7297 (yyresolveAction): If resolving any of the RHS states fails, destroy
7298 them all rather than leaking them. Thus, as long as user actions are
7299 written to clean up the RHS correctly, yyresolveAction always cleans up
7300 the RHS of a semantic option. Document the interface.
7301
7302 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7303
7304 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7305 led to a segmentation fault in GNU Pascal. Problem reported
7306 by Waldek Hebisch.
7307
7308 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7309
7310 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7311 mid-rule action inside a nonterminal symbol in order to declare a
7312 destructor for its semantic value.
7313
7314 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7315
7316 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7317 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7318 __cplusplus && ! defined _STDLIB_H && !
7319 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7320 defined free))]: Include <stdlib.h> rather than rolling our own
7321 declarations of malloc and free, to avoid problems with
7322 incompatible declarations (using 'throw') C++'s stdlib.h. This
7323 should fix Debian bug 340012
7324 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7325 reported by Guillaume Melquiond.
7326
7327 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7328
7329 * NEWS: Clarify symbols versus types in unused-value warnings.
7330
7331 * configure.ac (AC_INIT): Bump version number.
7332
7333 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7334
7335 * NEWS: Version 2.1a.
7336 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7337 since C99 requires this.
7338
7339 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7340
7341 * m4/c-working.m4: New file.
7342 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7343
7344 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7345
7346 * Makefile.maint: Merge from coreutils.
7347
7348 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7349
7350 More portability fixes for problems summarized by Nelson H. F. Beebe.
7351
7352 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7353 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7354 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7355 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7356 messes up because C++ code is compiled in 32-bit mode but linked
7357 in 64-bit mode.
7358
7359 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7360
7361 More portability fixes for problems summarized by Nelson H. F. Beebe.
7362
7363 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7364 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7365
7366 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7367 nodist_PROGRAMS, since we don't need to actually compile the
7368 example if we're just doing a plain 'make'. This avoids bothering
7369 the installer unnecessarily about problems due to weird C++
7370 compilers.
7371
7372 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7373
7374 More portability fixes for problems summarized by Nelson H. F. Beebe.
7375
7376 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7377 than #include "...", and compile with -I'.'. The old method was
7378 not portable, according to Posix and the C standard, and it does
7379 not work with Sun C 5.7, where previous #line directives affect
7380 the working directory used in later #include "..." directives.
7381
7382 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7383
7384 Various DJGGP specific issues in /djgpp
7385
7386 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7387
7388 More portability fixes for problems summarized by Nelson H. F. Beebe.
7389
7390 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7391 '#include <map>' works and that you can apply ++ to iterators.
7392
7393 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7394
7395 Work around portability problems summarized by Nelson H. F. Beebe in
7396 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7397
7398 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7399 that '#include <string>' works.
7400
7401 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7402 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7403 "warning: sorry: semantics of inline function static data `const
7404 unsigned char translate_table[262]' are wrong (you'll wind up with
7405 multiple copies)".
7406
7407 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7408 or, xor to not_, and_, or_, and xor_, respectively. This works
7409 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7410 random system header somewhere that includes the equivalent of
7411 <iso646.h>.
7412
7413 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7414 -E" works; it apparently doesn't work with PathScale EKO Compiler
7415 Suite Version 2.0.
7416
7417 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7418
7419 During deterministic GLR operation, user actions should be able to
7420 influence the parse by changing yychar. To make this easier to fix and
7421 to make glr.c easier to evolve in general, don't maintain yytoken in
7422 parallel with yychar; just compute yytoken when needed.
7423 * tests/glr-regression.at (Incorrect lookahead during deterministic
7424 GLR): Check that setting yychar in a user action has the intended
7425 effect.
7426 * data/glr.c (yyGLRStack): Remove yytokenp member.
7427 (yyclearin): Don't set *yytokenp.
7428 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7429 yychar rather than *yytokenp to determine the current lookahead.
7430 Compute yytoken locally when needed.
7431 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7432 point to.
7433
7434 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7435 after `--report' documentation.
7436
7437 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7438
7439 * src/parse-gram.y (grammar_declaration): Location of printer
7440 symbol is @1, not list->location. Bug reported by twlevo.
7441 * tests/input.at (Incompatible Aliases): Adjust to above change.
7442
7443 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7444
7445 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7446 all the test at once. This makes the output easier to read in the
7447 normal case.
7448
7449 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7450 got from <http://bro-ids.org/download.html>. The bug is that
7451 when two actions appeared in succession, the second one was
7452 scanned before the first one was added to the grammar rule
7453 as a midrule action. Bison then output the incorrect warning
7454 "parse.y:905.17-906.36: warning: unused value: $3".
7455 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7456 associated with a value.
7457 (rhs): Don't invoke grammar_current_rule_action_append.
7458 (action): Invoke it here instead.
7459 * src/reader.c (grammar_midrule_action): Now extern.
7460 (grammar_current_rule_action_append): Don't invoke
7461 grammar_midrule_action; that is now the scanner's job.
7462 * src/reader.h (last_string, last_braced_code_loc):
7463 (grammar_midrule_action): New decls.
7464 * src/scan-gram.l (last_string): Now extern, sigh.
7465 (last_braced_code_loc): New extern variable.
7466 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7467 rule already has an action.
7468 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7469 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7470 Add some tests to check that the above changes fixed the bug.
7471
7472 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7473
7474 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7475 All used changed. Check whether the symbol has a destructor,
7476 not whether it is typed.
7477 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7478 that the values are still reported as unused. All line numbers
7479 adjusted.
7480
7481 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7482
7483 Work around a bug in bro 0.8, which underparenthesizes its
7484 definition of YYLLOC_DEFAULT.
7485 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7486 their arguments.
7487 * data/lalr1.cc: Likewise.
7488 * data/yacc.cc: Likewise.
7489
7490 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7491
7492 Work around a bug in Pike 7.0, and give the Pike folks a
7493 better way to override the usual int widths.
7494 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7495 user can override the types.
7496 (short): #undef, to work around a bug in Pike 7.0.
7497 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7498 (union yyalloc.yyss): Use yytype_int16 rather than short.
7499 All uses changed.
7500 (yysigned_char): Remove.
7501 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7502 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7503 * tests/regression.at (Web2c Actions): Adjust to above changes.
7504
7505 * src/reader.c (check_and_convert_grammar): New function.
7506 (reader): Close the input file even if something went wrong during
7507 parsing. Minor file descriptor leak reported by twlevo.
7508
7509 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7510 to pacify gcc -Wswitch-default.
7511 * src/scan-gram.l (adjust_location): Use a default: break; case
7512 to pacify gcc -Wswitch-default.
7513 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7514 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7515 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7516 Move these decls to scan-skel.l, since they don't need to be
7517 visible elsewhere.
7518 * src/scan-skel.l: Accept the above decls.
7519 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7520 is used.
7521
7522 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7523
7524 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7525 since we don't want to insist on a version number at the start
7526 of the changelog every time.
7527 * Makefile.maint: Sync from coreutils a bit better.
7528 (sc_trailing_blank): Renamed from sc_trailing_space.
7529 All uses changed.
7530 (sc_no_if_have_config_h, sc_require_config_h):
7531 (sc_prohibit_assert_without_use): New rules.
7532 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7533 (sc_dd_max_sym_length): Fix leading spaces in rule.
7534 (sc_system_h_headers): Prefix with @.
7535 (sc_useless_cpp_parens, m4-check): Output line numbers.
7536 (changelog-check): Allow version only in head.
7537 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7538 satisfy new Makefile.maint rule.
7539 * data/glr.c: Likewise.
7540 * data/glr.cc: Likewise.
7541 * data/lalr1.cc: Likewise.
7542 * data/yacc.c: Likewise.
7543 * lib/ebitsetv.c: Likewise.
7544 * lib/lbitset.c: Likewise.
7545 * lib/subpipe.c: Likewise.
7546 * lib/timevar.c: Likewise.
7547 * src/system.h: Likewise.
7548 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7549 * djgpp/Makefile.maint: Add copyright notice.
7550 * djgpp/README.in: Likewise.
7551 * djgpp/config.bat: Likewise.
7552 * djgpp/config.site: Likewise.
7553 * djgpp/config_h.sed: Likewise.
7554 * djgpp/djunpack.bat: Likewise.
7555 * djgpp/config.sed: Fix copyright notice to match standard format.
7556 * djgpp/subpipe.h: Likewise.
7557 * lib/bitsetv-print.c: Likewise.
7558 * lib/bitsetv.c: Likewise.
7559 * lib/subpipe.h: Likewise.
7560 * lib/timevar.c: Likewise.
7561 * lib/timevar.h: Likewise.
7562 * djgpp/subpipe.c: Use standard recipe for config.h.
7563 * lib/abitset.c: Likewise.
7564 * lib/bitset.c: Likewise.
7565 * lib/bitset_stats.c: Likewise.
7566 * lib/bitsetv-print.c: Likewise.
7567 * lib/bitsetv.c: Likewise.
7568 * lib/ebitsetv.c: Likewise.
7569 * lib/get-errno.c: Likewise.
7570 * lib/lbitset.c: Likewise.
7571 * lib/subpipe.c: Likewise.
7572 * lib/timevar.c: Likewise.
7573 * lib/vbitset.c: Likewise.
7574 * tests/local.at: Likewise.
7575 * src/scan-gram.l: Don't include verify.h, since system.h does
7576 that for us.
7577 * .x-sc_require_config_h: New file.
7578 * .x-sc_unmarked_diagnostics: New file.
7579
7580 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7581
7582 Be a bit more systematic about using 'abort'.
7583 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7584 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7585 Put 'default: abort ();' before some other case, to satisfy older
7586 pedantic compilers.
7587 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7588 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7589 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7590 * src/conflicts.c (resolve_sr_conflict): Likewise.
7591 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7592 (get_decision_str, get_orientation_str, get_node_alignment_str):
7593 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7594 (get_linestyle_str, get_arrowstyle_str): Likewise.
7595 * src/conflicts.c (resolve_sr_conflict):
7596 Use a default case rather than one for the one remaining enum
7597 value, to catch invalid enum values as well.
7598 * src/lalr.c (set_goto_map, map_goto):
7599 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7600 * src/nullable.c (nullable_compute, token_definitions_output):
7601 Likewise.
7602 * src/reader.c (packgram, reader): Likewise.
7603 * src/state.c (transitions_to, state_new, state_reduction_find):
7604 Likewise.
7605 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7606 (symbol_pack): Likewise.
7607 * src/tables.c (conflict_row, pack_vector): Likewise.
7608 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7609 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7610 * src/system.h: Don't include <assert.h>.
7611 (assert): New macro.
7612
7613 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7614 (Destructor Decl, Parser Function, Pure Calling):
7615 Describe rules for braces inside C code more carefully.
7616
7617 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7618
7619 Fix some porting glitches found by Nelson H. F. Beebe.
7620 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7621 compilers that don't understand that abort () does not return.
7622 * src/state.c (transitions_to): Likewise.
7623 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7624 that '#include <cstdlib>' works.
7625 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7626 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7627 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7628 for the benefit of some pre-C99 compilers.
7629
7630 * bootstrap: Undo changes to gnulib files that autoreconf made.
7631
7632 Minor fixups to get 'make maintainer-check' to work.
7633 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7634 with the new verify.h implementation.
7635 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7636 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7637 * data/yacc.c (YYUSE): Likewise.
7638 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7639 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7640 * src/parse-gram.y (declaration): Don't pass a string constant
7641 to a function that expects char *, since GCC might complain
7642 about the constant value.
7643 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7644 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7645 before #defining them.
7646 * tests/glr-regression.at
7647 (Incorrectly initialized location for empty right-hand side in GLR):
7648 In yyerror, use the msg arg.
7649 (Corrupted semantic options if user action cuts parse):
7650 (Incorrect lookahead during deterministic GLR):
7651 (Incorrect lookahead during nondeterministic GLR):
7652 Don't name a local var 'index'; it shadows string.h's 'index'.
7653
7654 2006-01-19 Akim Demaille <akim@epita.fr>
7655
7656 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7657 location, not just parts of it.
7658
7659 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7660
7661 * NEWS: Document the fact that multiple %unions are now allowed.
7662 * doc/bison.texinfo (Union Decl): Likewise.
7663 * TODO: This feature is now implemented, so remove it from
7664 the wishlist.
7665
7666 * Makefile.maint: Merge with coreutils Makefile.maint.
7667 (CVS_LIST): Use build-aux version if available.
7668 (VERSION_REGEXP): New macro.
7669 (syntax-check-rules): Add sc_no_if_have_config_h,
7670 sc_prohibit_assert_without_use, sc_require_config_h,
7671 sc_useless_cpp_parens.
7672 (sc_obsolete_symbols): Check for O_NDELAY.
7673 (sc_dd_max_sym_length): Track coreutils.
7674 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7675 (sc_useless_cpp_parens): New rule.
7676 (news-date-check): Look for version or today's date.
7677 (changelog-check): Don't require version number near head.
7678 (copyright-check): Use current year instead of hardwiring 2005.
7679 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7680 (announcement): Add --gpg-key-ID.
7681
7682 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7683 with "file system".
7684
7685 Avoid undefined behavior that addressed just before the start of an
7686 array. Problem reported by twlevo.
7687 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7688 * src/lalr.c (build_relations): Rely on new sentinel.
7689 * src/gram.c (gram_free): Adjust to new sentinel.
7690
7691 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7692
7693 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7694 yylookaheadNeeds. All uses updated.
7695 (yysplitStack): Rename local yynewLookaheadStatuses to
7696 yynewLookaheadNeeds.
7697 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7698 GLR): In comments, change `lookahead status' to `lookahead need'.
7699
7700 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7701
7702 * data/glr.c (yysplitStack): A little stylistic rewrite.
7703
7704 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7705
7706 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7707
7708 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7709
7710 * doc/bison.texinfo: Fix some typos.
7711 (GLR Semantic Actions): New subsection discussing special
7712 considerations because GLR semantic actions might be deferred.
7713 (Actions): Mention look-ahead usage of yylval.
7714 (Actions and Locations): Mention look-ahead usage of yylloc.
7715 (Special Features for Use in Actions): Add YYEOF entry and mention it
7716 in the yychar entry.
7717 In the yychar entry, remove mention of the local yychar case (pure
7718 parser) since this is irrelevant information when writing semantic
7719 actions and since it's already discussed in `Table of Symbols' where
7720 yychar is otherwise described as an external variable.
7721 In the yychar entry, don't call it the `current' look-ahead since it
7722 isn't when semantic actions are deferred.
7723 In the yychar and yyclearin entries, add note about deferred semantic
7724 actions.
7725 Add yylloc and yylval entries discussing look-ahead usage.
7726 (Look-Ahead Tokens): When discussing yychar, don't call it the
7727 `current' look-ahead, and do mention yylval and yylloc.
7728 (Error Recovery): Cross-reference `Action Features' when mentioning
7729 yyclearin.
7730 (Table of Symbols): In the yychar entry, don't call it the `current'
7731 look-ahead.
7732 In the yylloc and yylval entries, mention look-ahead usage.
7733
7734 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7735
7736 * tests/glr-regression.at: Update copyright year to 2006.
7737
7738 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7739
7740 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7741 use during nondeterministic operation to track which stacks have
7742 actually needed the current lookahead.
7743 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7744 Allocate, deallocate, resize, and otherwise shuffle space for
7745 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7746 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7747 appropriately during nondeterministic operation.
7748 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7749 members to store the current lookahead to be used by the deferred
7750 user action.
7751 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7752 from which the RHS is taken. Set the lookahead members of the new
7753 yySemanticOption according to the lookahead status for stack yyk.
7754 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7755 yyaddDeferredAction.
7756 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7757 members of yySemanticOption before invoking yyuserAction, and then set
7758 them back to their current values afterward.
7759 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7760 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7761 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7762 titles for consistency.
7763 (Leaked merged semantic value if user action cuts parse): In order to
7764 suppress lint warnings, use arguments in merge function, and assign
7765 char value < 128 in main.
7766 (Incorrect lookahead during deterministic GLR): New test case.
7767 (Incorrect lookahead during nondeterministic GLR): New test case.
7768
7769 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7770
7771 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
7772 !yyvaluep as signal that no semantic value is available to print.
7773 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7774 to print a semantic value.
7775
7776 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7777
7778 * tests/glr-regression.at: For consistency with my newer test cases,
7779 don't thank myself.
7780
7781 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7782
7783 * data/glr.c (yyresolveValue): When merging semantic options, if at
7784 least one user action succeeds but a later one cuts the parse, then
7785 destroy the semantic value before returning rather than leaking it.
7786 (yyresolveStates): If a user action cuts the parse and thus
7787 yyresolveValue fails, ignore the (unset) semantic value rather than
7788 corrupting the yyGLRState, and empty the semantic options list since
7789 the user actions should have called all necessary destructors.
7790 Simplify code with YYCHK.
7791 * tests/glr-regression.at (Corrupted semantic options if user action
7792 cuts parse): New test case.
7793 (Undesirable destructors if user action cuts parse): New test case.
7794 Before applying any of this patch, this test case never actually failed
7795 for me... but only because the corrupted semantic options usually
7796 masked this bug.
7797 (Leaked merged semantic value if user action cuts parse): New test
7798 case.
7799
7800 2006-01-05 Akim Demaille <akim@epita.fr>
7801
7802 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7803
7804 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7805
7806 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7807 _MSC_VER. Problem reported by Cenzato Marco.
7808 (b4_c_function_def): Use it.
7809 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7810 b4_c_modern.
7811 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7812 than rolling our own.
7813
7814 2006-01-04 Akim Demaille <akim@epita.fr>
7815
7816 Also warn about non-used mid-rule values.
7817 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7818 member.
7819 (symbol_list_new): Adjust.
7820 * src/reader.c (symbol_typed_p): New.
7821 (grammar_rule_check): Use it.
7822 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7823 Check its rule.
7824 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7825 Use it.
7826 * tests/actions.at (Exotic Dollars): Adjust.
7827
7828 2006-01-04 Akim Demaille <akim@epita.fr>
7829
7830 * src/reader.c (grammar_midrule_action): If $$ is set in a
7831 mid-rule, move the `used' bit to its lhs.
7832 * tests/input.at (Unused values): New.
7833 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7834
7835 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7836
7837 * doc/bison.texinfo (Bison Options): Say more accurately what
7838 --yacc does.
7839 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7840 about declarations in the grammar when in Yacc mode, as POSIX does
7841 not require a diagnostic when the grammar uses extensions.
7842
7843 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7844
7845 Warn about dubious constructions like "%token T T".
7846 Reported by twlevo.
7847 * src/symtab.h (struct symbol.declared): New member.
7848 * src/symtab.c (symbol_new): Initialize it to false.
7849 (symbol_class_set): New arg DECLARING, specifying whether
7850 this is a declaration that we want to warn about, if there
7851 is more than one of them. All uses changed.
7852
7853 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7854 Allow multiple %union directives, whose contents concatenate.
7855 * src/parse-gram.y (grammar_declaration): Likewise.
7856 Use muscle_code_grow, so that we don't need stype_line any more.
7857 All uses changed.
7858
7859 * src/muscle_tab.c (muscle_grow): Fix comment.
7860
7861 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7862 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7863 Update copyright year to 2006.
7864
7865 2006-01-03 Akim Demaille <akim@epita.fr>
7866
7867 Have glr.cc pass (some of) the calc.at tests.
7868 * data/glr.cc (b4_parse_param_orig): New.
7869 (b4_parse_param): Improve its definition, and bound it more
7870 clearly in the skeleton.
7871 (b4_epilogue): Append, instead of prepending, in order to keep
7872 #line consistency.
7873 Simplify the generation of auxiliary functions: locations and
7874 purity are mandated.
7875 (b4_global_tokens_and_yystype): Honor it.
7876 * data/location.cc (c++.m4): Don't include it.
7877 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7878 and AT_SKEL_CC_IF.
7879 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7880 AT_LALR1_CC_IF.
7881 Be sure to initialize the first position's filename.
7882 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7883 mandated anyway.
7884 (AT_CHECK_CALC_GLR_CC): New.
7885 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7886
7887 2006-01-02 Akim Demaille <akim@epita.fr>
7888
7889 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7890 c.m4.
7891 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
7892 * data/glr.cc: Do not include stack.hh.
7893
7894 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7895
7896 * data/glr.c: Reformat whitespace with tabs.
7897 (b4_lpure_formals): Remove this unused m4 macro.
7898 * tests/cxx-type.at: Reformat whitespace with tabs.
7899 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7900 since it's a member. Rename type to isNterm for clarity.
7901
7902 2005-12-29 Akim <akim@sulaco.local>
7903
7904 Let glr.cc catch up with symbol_value_print.
7905 * data/glr.cc (b4_yysymprint_generate): Replace by...
7906 (b4_yy_symbol_print_generate): this.
7907 (yy_symbol_print, yy_symbol_value_print): Declare them.
7908
7909 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7910
7911 * src/location.h (boundary): Note that a line or column equal
7912 to INT_MAX indicates an overflow.
7913 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7914 (rule_length_overflow, increment_rule_length, add_column_width):
7915 New functions.
7916 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7917 (<SC_BRACED_CODE>"}"):
7918 Use increment_rule_length rather than incrementing it by hand.
7919 (adjust_location, handle_syncline): Diagnose overflow.
7920 (handle_action_dollar, handle_action_at):
7921 Fix bug with monstrosities like $-2147483648.
7922 Remove now-unnecessary checks.
7923 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7924 (convert_ucn_to_byte): Verify assumptions.
7925 (handle_syncline): New arg LOC. All callers changed.
7926 Don't store through a value derived from char const * pointer.
7927
7928 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7929 GCC warnings.
7930
7931 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7932
7933 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7934 Remove unnecessary forward static decls.
7935
7936 2005-12-27 Akim Demaille <akim@epita.fr>
7937
7938 * src/reader.c (grammar_current_rule_check): Also check that $$
7939 is used.
7940 Take the rule to check as argument, hence rename as...
7941 (grammar_rule_check): this.
7942 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7943 Rename as...
7944 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7945 (grammar_midrule_action, grammar_symbol_append): Now static.
7946 * tests/torture.at (input): Don't rely on the default action
7947 being always performed.
7948 * tests/calc.at: "Set" $$ even when the action is "cut" with
7949 YYERROR or other.
7950 * tests/actions.at (Exotic Dollars): Instead of using unused
7951 values, check that the warning is issued.
7952
7953 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7954
7955 * NEWS: Improve wording for unused-value warnings.
7956
7957 2005-12-22 Akim Demaille <akim@epita.fr>
7958
7959 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7960 (b4_yysymprint_generate): Rename as...
7961 (b4_yy_symbol_print_generate): this.
7962 Generate yy_symbol_print instead of yysymprint.
7963 Generate also yy_symbol_value_print, and use it.
7964
7965 2005-12-22 Akim Demaille <akim@epita.fr>
7966
7967 * NEWS: Warn about unused values.
7968 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7969 a `used' member.
7970 (symbol_list_n_get, symbol_list_n_used_set): New.
7971 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7972 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7973 * src/reader.c (grammar_current_rule_check): Check that values are
7974 used.
7975 * src/symtab.c (symbol_print): Accept 0.
7976 * tests/existing.at: Remove the type information.
7977 Empty the actions.
7978 Remove useless actions (beware of mid-rule actions: perl -000
7979 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7980 * tests/actions.at (Exotic Dollars): Use unused values.
7981 * tests/calc.at: Likewise.
7982 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7983 Likewise.
7984
7985 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7986 rule_useful_p.
7987
7988 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7989
7990 Undo 2005-12-01 tentative license wording change. The wording is
7991 still being reviewed by the lawyers, and we don't want to wait for
7992 them before publishing a test release. For now, revert to the
7993 previous wording.
7994 * NEWS: Undo 2005-12-01 change.
7995 * data/glr.c: Revert to previous license wording.
7996 * data/glr.cc: Likewise.
7997 * data/lalr1.cc: Likewise.
7998 * data/location.cc: Likewise.
7999 * data/yacc.c: Likewise.
8000
8001 * NEWS: Reword %destructor vs YYABORT etc.
8002 * data/glr.c: Use American spacing, for consistency.
8003 * data/glr.cc: Likewise.
8004 * data/lalr1.cc: Likewise.
8005 * data/yacc.c: Likewise.
8006 * data/yacc.c: Reformat comments slightly.
8007 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8008 for consistency. Fix some spelling errors and reword recently-included
8009 text slightly.
8010 * tests/cxx-type.at: Cast results of malloc, for C++.
8011
8012 2005-12-21 Joel E. Denny <address@hidden>
8013
8014 * tests/cxx-type.at: Construct a tree, count the parents of shared
8015 nodes, and free each node once and only once. Previously, the memory
8016 for semantic values was leaked instead.
8017
8018 2005-12-21 Joel E. Denny <address@hidden>
8019
8020 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8021 (yylval, yylloc): If pure, #define to yystackp->yyval and
8022 yystackp->yyloc similar to yychar and yynerrs.
8023 (yyparse): If pure, remove local yylval and yylloc. Add local
8024 yystackp to accommodate pure definitions of yylval and yylloc.
8025 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8026 yylvalp and yyllocp to &yylval and &yylloc.
8027 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8028 namespace. Previously, nerrs and char were missing, but lval and lloc
8029 weren't necessary.
8030 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8031 yylvalp and yyllocp parameters since, if pure, these are now always
8032 accessible through yystackp. If not pure, they are still accessible
8033 globally.
8034 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8035 `if (YYID (N))' to pacify lint.
8036
8037 2005-12-21 Akim Demaille <akim@epita.fr>
8038
8039 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8040 destroy the RHS symbols of a rule.
8041 * data/yacc.c (yylen): Initialize to 0.
8042 Keep its value to the number of items to possibly shift.
8043 In particular, a regular successful parse that ends on YYFINAL by
8044 a (internal) YYACCEPT must not have yylen != 0.
8045 (yyerrorlab, yyreturn): Pop the RHS.
8046 Reorder a bit to emphasize the `shifting' bits of code.
8047 (YYPOPSTACK): Now accept a number of items to pop.
8048 * data/lalr1.cc: Likewise.
8049 * data/glr.c: Formatting changes.
8050 Use goto instead of fall through.
8051 * doc/bison.texinfo (Destructor Decl): Complete.
8052
8053 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8054
8055 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8056 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8057 * djgpp/config.bat: Replace every occurence of the file name
8058 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8059 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8060 * djgpp/config.sed: Replace every occurence of the file name
8061 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8062 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8063 * djgpp/djunpack.bat: DJGPP specific file.
8064 * djgpp/fnchange.lst: DJGPP specific file.
8065 * djgpp/README.in: Add new information about how to unpack the bison
8066 source on MSDOS and other systems which have 8.3 file name restrictions
8067 using djunpack.bat and fnchange.lst.
8068
8069 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8070
8071 * bootstrap (build_cvs_prefix): Remove; unused.
8072 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8073 when getting gnulib.
8074
8075 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8076
8077 * data/glr.c: Reorder typedef declarations for structs to match order
8078 of struct declarations.
8079 Rename yystack everywhere to yystackp except in yyparse where it's not
8080 a pointer.
8081 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8082 consistency.
8083 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8084 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8085 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8086 lint.
8087
8088 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8089
8090 * tests/sets.at (Accept): Fix typos in regular expression used to
8091 sed out the final state number.
8092
8093 Work around portability problem on Solaris 10: flex-generated
8094 files include <stdio.h> before <config.h>, which messes up
8095 because the latter defines __EXTENSIONS__. Address the problem
8096 by creating two new little files that include <config.h> first,
8097 then include the flex-generated files. Rewrite everyone else
8098 to include <config.h> first, as well.
8099 * lib/timevar.c: Always include "config.h".
8100 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8101 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8102 (EXTRA_bison_SOURCES): New macro.
8103 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8104 * src/system.h: Don't include config.h.
8105 * src/LR0.c: Include <config.h> first.
8106 * src/assoc.c: Likewise.
8107 * src/closure.c: Likewise.
8108 * src/complain.c: Likewise.
8109 * src/conflicts.c: Likewise.
8110 * src/derives.c: Likewise.
8111 * src/files.c: Likewise.
8112 * src/getargs.c: Likewise.
8113 * src/gram.c: Likewise.
8114 * src/lalr.c: Likewise.
8115 * src/location.c: Likewise.
8116 * src/main.c: Likewise.
8117 * src/muscle_tab.c: Likewise.
8118 * src/nullable.c: Likewise.
8119 * src/output.c: Likewise.
8120 * src/parse-gram.y: Likewise.
8121 * src/print.c: Likewise.
8122 * src/print_graph.c: Likewise.
8123 * src/reader.c: Likewise.
8124 * src/reduce.c: Likewise.
8125 * src/relation.c: Likewise.
8126 * src/state.c: Likewise.
8127 * src/symlist.c: Likewise.
8128 * src/symtab.c: Likewise.
8129 * src/tables.c: Likewise.
8130 * src/uniqstr.c: Likewise.
8131 * src/vcg.c: Likewise.
8132
8133 * src/parse-gram.y: Fix minor problems uncovered by lint.
8134 (current_lhs, current_lhs_location): Now static.
8135 (current_assoc): Remove unused variable.
8136
8137 Cleanups so that Bison-generated parsers have less lint.
8138 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8139 Prepend /*ARGSUSED*/, for lint's sake.
8140 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8141 definition if 'lint' is defined.
8142 (YYID): New macro (or function, if lint).
8143 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8144 * data/yacc.c: Likewise.
8145 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8146 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8147 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8148 is C++ only.
8149 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8150 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8151 Use YYID(0) rather than 0, for lint.
8152 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8153 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8154
8155 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8156
8157 * tests/glr-regression.at
8158 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8159 Close memory leak reported by twlevo.
8160
8161 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8162
8163 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8164 all stacks.
8165 (yyparse): Iterate another stack in order to call user destructors.
8166 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8167 New test case.
8168 (Duplicated user destructor for lookahead): This test now is expected
8169 to succeed.
8170
8171 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8172
8173 * NEWS: Document the following change.
8174 * data/yacc.c: Say "parser skeleton" rather than "file", since
8175 it's no longer just a file.
8176 * data/glr.c: Grant a special exception for C GLR parsers, that
8177 reads like the already-existing exception for C LALR(1) parsers.
8178 * data/glr.cc: Likewise.
8179 * data/lalr1.cc: Likewise.
8180 * data/location.cc: Likewise.
8181 * data/yacc.c: Reword the "written by" statement to clarify that
8182 it was the parser skeleton, not the entire output file.
8183 * data/glr.c: Written by Paul Hilfinger.
8184 * data/glr.cc: Written by Akim Demaille.
8185 * data/lalr1.cc: Likewise.
8186
8187 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8188
8189 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8190 Fix typos in previous change that broke 'make check'.
8191 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8192 supported in C.
8193 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8194 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8195 We can revert this once things settle down.
8196
8197 * src/conflicts.c (conflicts_print): Don't print file name twice
8198 when %expect fails because there were no conflicts.
8199 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8200 change.
8201 * tests/conflicts.at (%expect not enough, %expect too much):
8202 (%expect with reduce conflicts): Adjust to new behavior.
8203
8204 2005-11-18 Akim Demaille <akim@epita.fr>
8205
8206 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8207 errors.
8208 * NEWS: Document this.
8209 * doc/bison.texinfo (Expect Decl): Likewise.
8210
8211 2005-11-16 Akim Demaille <akim@epita.fr>
8212
8213 Generalize the display of semantic values and locations in traces.
8214 * data/glr.c (yy_reduce_print): Fix indices (again).
8215 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8216 literal integers.
8217 * data/lalr1.cc (yyreduce_print): Rename as...
8218 (yy_reduce_print): this.
8219 Display values and locations.
8220 * data/yacc.c (yy_reduce_print): Likewise.
8221 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8222 (yysymprint): Move higher to be visible from yy_reduce_print).
8223 (yyparse): Adjust.
8224 * tests/calc.at: Adjust the expected length of the traces.
8225
8226 2005-11-14 Akim Demaille <akim@epita.fr>
8227
8228 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8229 from 1 to N, while values and location start at 0.
8230 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8231
8232 2005-11-14 Akim Demaille <akim@epita.fr>
8233
8234 * data/glr.c (yy_reduce_print): Fix the $ number.
8235
8236 2005-11-14 Akim Demaille <akim@epita.fr>
8237
8238 "Use" parse parameters.
8239 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8240 * data/glr.c, data/glr.cc: Use them.
8241 * data/glr.c (YYUSE): Have a C++ definition that supports
8242 non-pointer types.
8243
8244 2005-11-14 Akim Demaille <akim@epita.fr>
8245
8246 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8247
8248 2005-11-14 Akim Demaille <akim@epita.fr>
8249
8250 * data/glr.cc: New.
8251 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8252
8253 2005-11-12 Akim Demaille <akim@epita.fr>
8254
8255 Let position and location be PODs.
8256 * data/location.cc (position::initialize, location::initialize): New.
8257 (position::position, location::location): Define only if
8258 b4_location_constructors is defined.
8259 * data/lalr1.cc (b4_location_constructors): Define it for backward
8260 compatibility.
8261 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8262
8263 2005-11-12 Akim Demaille <akim@epita.fr>
8264
8265 * data/lalr1.cc: Move the body of the ctor and dtor into the
8266 parser file (instead of the header).
8267 Wrap the implementations in a "namespace yy".
8268
8269 2005-11-12 Akim Demaille <akim@epita.fr>
8270
8271 Have glr.c include its header file when created.
8272 * data/glr.c (b4_shared_declarations): New.
8273 Output them verbatim in the parser if !%defines, otherwise
8274 output then in the header file, and include it instead.
8275
8276 2005-11-11 Akim Demaille <akim@epita.fr>
8277
8278 * data/glr.c: Comment changes.
8279
8280 2005-11-11 Akim Demaille <akim@epita.fr>
8281
8282 When yydebug, report semantic and location values for reductions.
8283 * data/glr.c (yy_reduce_print): Report the semantic values and the
8284 locations.
8285 (YY_REDUCE_PRINT): Adjust.
8286 (yyglrReduce): Use them.
8287 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8288 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8289 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8290 traces.
8291
8292 2005-11-10 Akim Demaille <akim@epita.fr>
8293
8294 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8295 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8296 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8297
8298 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8299
8300 * m4/cxx.m4, examples/Makefile.am: Don't build
8301 examples/calc++ if no C++ compiler is available. (trivial change)
8302
8303 2005-11-09 Akim Demaille <akim@epita.fr>
8304
8305 * src/scan-skel.l: Use a couple of asserts.
8306
8307 2005-11-03 Akim Demaille <akim@epita.fr>
8308
8309 In some (weird) cases, the final state number is incorrect.
8310 Reported by Alexandre Duret-Lutz.
8311 * src/LR0.c (state_list_append): Remove the computation of
8312 final_state.
8313 (save_reductions): Do it here.
8314 (get_state): Alpha conversion.
8315 (generate_states): Use a for loop.
8316 * src/gram.h (item_number_is_rule_number)
8317 (item_number_is_symbol_number): New.
8318 * src/state.c: Use assert.
8319 * src/system.h: Include assert.h.
8320 * tests/sets.at (Accept): New.
8321
8322 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8323
8324 * data/glr.c (yyfill): Adjust comment.
8325 (yyresolveAction): Initialize default location properly
8326 for empty right-hand sides.
8327 (yydoAction): Ditto.
8328 Add comment explaining apparently dead code.
8329 * tests/glr-regression.at
8330 (Incorrectly initialized location for empty right-hand side in GLR):
8331 New test.
8332
8333 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8334
8335 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8336 gnulib when interrupted. This fixes some race conditions and
8337 works around some portability problems (one noted by Paul
8338 Hilfinger).
8339
8340 2005-10-22 Akim <akim@epita.fr>
8341
8342 * Makefile.cfg: Adjust to config -> build-aux.
8343 Reported by twledo.
8344
8345 2005-10-21 Akim Demaille <akim@epita.fr>
8346
8347 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8348 the %parse-params.
8349 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8350 * data/yacc.c (b4_Pure_if): Rename as...
8351 (b4_yacc_pure_if): this.
8352 (YY_SYMBOL_PRINT, yyparse): Adjust.
8353 * doc/bison.texinfo: Formatting changes.
8354
8355 2005-10-21 Akim Demaille <akim@epita.fr>
8356
8357 Finish the transition config -> build-aux.
8358 * configure.ac, Makefile.am: Use build-aux.
8359 * config/prev-version, config/announce-gen, config/Makefile.am:
8360 Move to...
8361 * build-aux/prev-version, build-aux/announce-gen,
8362 * build-aux/Makefile.am: here.
8363
8364 2005-10-14 Akim Demaille <akim@epita.fr>
8365
8366 * examples/calc++/test: Use set -x only when VERBOSE.
8367
8368 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8369
8370 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8371 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8372
8373 2005-10-13 Akim Demaille <akim@epita.fr>
8374
8375 * src/scan-skel.l: Output the base name parts of the parser and
8376 header file names.
8377 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8378 additional checks.
8379 Use this to exercise C++ outputs in subdirs.
8380 Reported by Oleg Smolsky.
8381
8382 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8383
8384 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8385 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8386 Problem reported by John P. Hartmann.
8387 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8388 already defined it.
8389
8390 2005-10-12 Akim Demaille <akim@epita.fr>
8391
8392 * src/parse-gram.y (version_check): Exit 63 to please missing
8393 (stands for "version mismatch).
8394 * tests/input.at, doc/bison.texinfo: Adjust.
8395
8396 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8397
8398 Work around portability problems with Visual Age C compiler
8399 (xlc and xlC_r) reported by John P. Hartmann.
8400 * data/location.cc (initial_column, initial_line): Remove.
8401 All uses replaced by 0 and 1.
8402 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8403 that xlc complains about.
8404 * src/scan-skel.l (skel_wrap): Likewise.
8405 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8406 as __STDC__.
8407 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8408 __STDC_VERSION__. Use it everywhere instead of looking at
8409 __STDC__ and __cplusplus.
8410
8411 2005-10-10 Akim Demaille <akim@epita.fr>
8412
8413 * examples/calc++/test: Be quiet unless VERBOSE.
8414
8415 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8416
8417 * data/c.m4 (yydestruct, yysymprint):
8418 Use YYUSE instead of casting to void.
8419 * data/glr.c (YYUSE): New macro.
8420 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8421 Use it instead of rolling our own.
8422 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8423 (YYCHK1):
8424 Use /*CONSTCOND*/ to suppress lint warnings.
8425 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8426 (YY_STACK_PRINT): Use 'false' not '0'.
8427 (YYUSE): New macro.
8428 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8429 * data/yacc.c (YYUSE): New macro.
8430 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8431 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8432 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8433
8434
8435 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8436 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8437
8438 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8439
8440 Undo the parts of the unlocked-I/O change that substituted
8441 putc or puts for printf. This might hurt performance a bit,
8442 but some people prefer the printf style.
8443 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8444 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8445 All uses replaced by YYFPRINTF and YYDPRINTF.
8446 * data/yacc.c: Likewise.
8447 * lib/bitset.c (bitset_print): Likewise.
8448 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8449 putc and puts.
8450 * lib/lbitset.c (debug_lbitset): Likewise.
8451 * src/closure.c (print_firsts, print_fderives): Likewise.
8452 * src/gram.c (grammar_dump): Likewise.
8453 * src/lalr.c (look_ahead_tokens_print): Likewise.
8454 * src/output.c (escaped_output): Likewise.
8455 (user_actions_output): Break apart two printfs.
8456 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8457 * src/reduce.c (reduce_print): Likewise.
8458 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8459 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8460
8461 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8462 Use assignments rather than casts-to-void to suppress
8463 unused-variable warnings. This pacifies 'lint'.
8464 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8465 unused-variable warnings.
8466
8467 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8468
8469 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8470
8471 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8472
8473 Use unlocked I/O for a minor performance improvement on hosts like
8474 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8475 is to use the gnlib unlocked-io module, and to prefer putc and
8476 puts to printf when either will work (since the latter doesn't
8477 come in an unlocked flavor).
8478 * bootstrap (gnulib_modules): Add unlocked-io.
8479 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8480 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8481 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8482 and similarly for puts and putc and printf.
8483 * data/yacc.c: Likewise.
8484 * lib/bitset.c (bitset_print): Likewise.
8485 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8486 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8487 to printf.
8488 * lib/lbitset.c (debug_lbitset): Likewise.
8489 * src/closure.c (print_firsts, print_fderives): Likewise.
8490 * src/gram.c (grammar_dump): Likewise.
8491 * src/lalr.c (look_ahead_tokens_print): Likewise.
8492 * src/output.c (escaped_output): Likewise.
8493 (user_actions_output): Coalesce two printfs.
8494 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8495 * src/reduce.c (reduce_print): Likewise.
8496 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8497 * src/system.h: Include unlocked-io.h rather than stdio.h.
8498
8499 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8500 this confuses xgettext.
8501
8502 2005-10-02 Akim Demaille <akim@epita.fr>
8503
8504 * bootstrap (gnulib_modules): Add strverscmp.
8505 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8506 * m4/.cvsignore: Add strverscmp.m4.
8507 * src/parse-gram.y (%require): New token, new rule.
8508 (version_check): New.
8509 * src/scan-gram.l (%require): Adjust.
8510 * tests/input.at (AT_REQUIRE): New.
8511 Use it.
8512 * doc/bison.texinfo (Require Decl): New.
8513 (Calc++ Parser): Use %require.
8514
8515 2005-10-02 Akim Demaille <akim@epita.fr>
8516
8517 * data/location.cc: New.
8518
8519 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8520 Akim Demaille <akim@epita.fr>
8521
8522 Make sure -odir/foo.cc creates dir/location.hh etc.
8523 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8524 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8525 (spec_defines_file): Now const.
8526 (dir_prefix): New.
8527 (short_base_name): Remove.
8528 * src/files.c: Adjust.
8529 (dirname.h): Include.
8530 (base_name): Don't prototype it.
8531 (finput): Remove, duplicates gram_in.
8532 (full_base_name, short_base_name): Replace by...
8533 (all_but_ext, all_but_tab_ext): these.
8534 (compute_base_names): Rename as...
8535 (compute_file_name_parts): this.
8536 Update to compute the new variables, including dir_prefix.
8537 Adjust dependencies.
8538 * src/output.c (prepare): Output them.
8539 * src/reader.c: Adjust to use gram_in, not finput.
8540 * src/scan-skel.l (@dir_prefix@): New.
8541
8542 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8543
8544 * lib/subpipe.c: New function end_of_output_subpipe() added
8545 to allow support for non-posix systems. This is a no-op function
8546 for posix systems.
8547
8548 * lib/subpipe.h: New function end_of_output_subpipe() added
8549 to allow support for non-posix systems. This is a no-op function
8550 for posix systems.
8551
8552 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8553 handle the lack of pipe/fork functionality on non-posix systems.
8554
8555 * djgpp/Makefile.maint: DJGPP specific file.
8556
8557 * djgpp/README.in: DJGPP specific file.
8558
8559 * djgpp/config.bat: DJGPP specific configuration file.
8560
8561 * djgpp/config.sed: DJGPP specific configuration file.
8562
8563 * djgpp/config.site: DJGPP specific configuration file.
8564
8565 * djgpp/config_h.sed: DJGPP specific configuration file.
8566
8567 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8568
8569 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8570
8571 2005-10-02 Akim Demaille <akim@epita.fr>
8572
8573 * data/location.cc: New, extract from...
8574 * data/lalr1.cc: here.
8575 (location.hh): Include it after the user prologue, in case the
8576 filename type is defined by the user.
8577 Forward declation location and position before the pre-prologue.
8578 (yyresult_): Rename as...
8579 (yyresult): this, it's a local variable, not an attribute.
8580 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8581
8582 2005-10-01 Akim Demaille <akim@epita.fr>
8583
8584 * examples/extexi: Restore the #line generation.
8585
8586 2005-09-30 Akim Demaille <akim@epita.fr>,
8587 Alexandre Duret-Lutz <adl@gnu.org>
8588
8589 Move the token type and YYSTYPE in the parser class.
8590 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8591 (parser::token): New, from the moved free definition of tokens.
8592 (parser::semantic_value): Now a full definition instead of an
8593 indirection to YYSTYPE.
8594 (b4_post_prologue): No longer included in the header file, but
8595 in the implementation file.
8596 * doc/bison.texi (C+ Language Interface): Update.
8597 * src/parse-gram.y: Support unary %define.
8598 * tests/actions.at: Define global_tokens_and_yystype for backward
8599 compatibility until we update the tests.
8600 * tests/calc.at: Idem.
8601 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8602 to simplify the code.
8603
8604 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8605
8606 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8607 Ah, the good old days! Problem reported by Peter Klein.
8608 * bootstrap (gnulib_modules): Add strerror, strtoul.
8609 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8610 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8611
8612 2005-09-29 Akim Demaille <akim@epita.fr>
8613
8614 * data/c.m4 (b4_error_verbose_if): New.
8615 * data/lalr1.cc: Use it.
8616 (YYERROR_VERBOSE_IF): Remove.
8617 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8618 parser members, replaced by...
8619 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8620 local variables.
8621 (yysyntax_error_): Takes the state number as argument.
8622 (yyreduce_print_): Use the argument yyrule, not the former
8623 attribute yyn_.
8624
8625 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8626
8627 * bootstrap (gnulib_modules): Add verify.
8628 * lib/.cvsignore: Add verify.h.
8629 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8630 * src/system.h (verify): Remove.
8631 Include verify.h instead.
8632 * src/tables.c (tables_generate): Use new API for 'verify'.
8633
8634 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8635
8636 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8637 local variables whose names begin with 'yy'.
8638 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8639 Trivial changes from Joel E. Denny.
8640
8641 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8642 it itself.
8643 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8644 don't use alloca any more.
8645
8646 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8647 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8648 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8649 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8650 to match yacc.c, to test more hosts.
8651
8652 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8653
8654 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8655 doesn't affect behavior.
8656 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8657 Solaris, AIX, MSC.
8658 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8659 This works a bit better with glibc, if user code has already included
8660 stdlib.h.
8661 * doc/bison.texinfo (Bison Parser): Document that users can't
8662 arbitrarily use malloc and free for other purposes. Document
8663 that <alloca.h> and <malloc.h> might be included.
8664 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8665 user must declare alloca.
8666
8667 * HACKING (release): Forwarn the Translation Project about
8668 stable releses.
8669
8670 2005-09-20 Akim Demaille <akim@epita.fr>
8671
8672 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8673
8674 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8675
8676 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8677 (YYSTACK_ALLOC_MAXIMUM): Use it.
8678 (yysyntax_error): New function.
8679 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8680 multiple syntax errors are reported, and alloca is being used.
8681 Instead, reallocate buffers twice as big each time, so that
8682 we waste at most half the allocated memory. Start with a small
8683 (128-byte) buffer that will suffice in most cases anyway.
8684 Use yysyntax_error to do most of the work.
8685
8686 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8687 yynerrs is the number of errors reported, not the number of
8688 errors encountered.
8689
8690 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8691 Mark it as expected to fail.
8692 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8693 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8694 Don't start user-code symbols with "yy", to avoid name space problems.
8695
8696 2005-09-19 Akim Demaille <akim@epita.fr>
8697
8698 Remove the traits, failed experiment.
8699 It never proved useful, and anyway because of the current
8700 definition, it was not possible to have several specialization of
8701 this traits, making it useless.
8702 * data/lalr1.cc (yy:traits): Remove.
8703 Inline its definitions in the parser class.
8704
8705 2005-09-19 Akim Demaille <akim@epita.fr>
8706
8707 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8708 least Mac OSX with a /usr/local install of gettext.
8709
8710 2005-09-19 Akim Demaille <akim@epita.fr>
8711
8712 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8713 and yytoken for similarity with the other skeletons.
8714
8715 2005-09-19 Akim Demaille <akim@epita.fr>
8716
8717 * NEWS, configure.ac: update version number to 2.1a.
8718
8719 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8720
8721 * NEWS: Version 2.1.
8722
8723 * NEWS: Remove notice of yytname change, since it was never in an
8724 official release.
8725 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8726 diagnostic.
8727 * src/output.c (prepare): Likewise.
8728 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8729 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8730 is not defined. This is an awful hack, but it's enough for now.
8731 All callers changed.
8732 * tests/glr-regression-at (make_value): Args are const pointers now,
8733 to avoid GCC warning.
8734 (Duplicated user destructor for lookahead): New test. Currently
8735 skipped. It fails on my host but I'm not sure it'll always fail.
8736
8737 2005-09-16 Akim Demaille <akim@epita.fr>
8738
8739 * src/symtab.h (struct symbol): Declare the printer and destructor
8740 as const, to avoid accidental calls to free.
8741 (symbol_destructor_set, symbol_printer_set): Adjust.
8742 * src/symtab.c: Adjust.
8743
8744 2005-09-16 Akim Demaille <akim@epita.fr>
8745
8746 * data/c.m4 (b4_token_enums): New.
8747 (b4_token_defines): Rename as...
8748 (b4_token_enums_defines): this.
8749 (b4_token_defines): New, output only the #defines.
8750 * data/yacc.c, data/glr.c: Adjust.
8751 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8752 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8753 as default values.
8754
8755 2005-09-16 Akim Demaille <akim@epita.fr>
8756
8757 * data/lalr1.cc (yylex_): Remove, inline its code.
8758 (yyreport_syntax_error_): Remove, replaced by...
8759 (yysyntax_error_): this which returns a string and leaves to the
8760 caller the call to the users' error function.
8761 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8762 Move from members of the parser object...
8763 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8764 to local variables of the parse function.
8765
8766 2005-09-16 Akim Demaille <akim@epita.fr>
8767
8768 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8769 since it's in Bison's name space.
8770
8771 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8772
8773 * data/glr.c (yyresolveValue): Add default case to pacify
8774 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8775
8776 * NEWS: Document when yyparse started to return 2.
8777 * doc/bison.texinfo (Parser Function): Document when yyparse
8778 returns 2.
8779
8780 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8781 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8782 changed.
8783 (class position): file_name -> filename (reverting). All uses changed.
8784
8785 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8786
8787 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8788 do anything if $@ exists. This reverts part of the 2005-07-07
8789 patch.
8790
8791 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8792
8793 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8794 contains obsolete information and isn't worth distributing as a
8795 separate file anyway.
8796 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8797 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8798 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8799 (yyparse): Abort if user code uses longjmp to throw an unexpected
8800 value.
8801
8802 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8803
8804 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8805 Suggested by twlevo@xs4all.nl.
8806
8807 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8808 This avoids a diagnostic from gcc -Wswitch-enum.
8809 Problem reported by twlevo@xs4all.nl.
8810
8811 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8812 standards. Use "file name" or "file" or "name", depending on
8813 the context.
8814 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8815 not to hack/foo.tab.c.
8816 (Calc++ Top Level): 2nd arg of main is not const.
8817 * data/glr.c: b4_filename -> b4_file_name.
8818 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8819 All uses changed.
8820 (class position): filename -> file_name. All uses changed.
8821 * data/yacc.c: b4_filename -> b4_file_name.
8822 * lib/bitset.h: filename -> file_name in local vars.
8823 * lib/bitset_stats.c: Likewise.
8824 * src/files.c: Likewise.
8825 * src/scan-skel.l ("@output ".*\n): Likewise.
8826 * src/files.c (file_name_split): Renamed from filename_split.
8827 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
8828
8829 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8830
8831 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8832 to accommodate latest gnulib.
8833
8834 * tests/glr-regression.at (Duplicate representation of merged trees):
8835 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8836
8837 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8838 needed.
8839
8840 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8841
8842 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8843 All uses changed. Invoke user destructor after an error during a
8844 split parse (trivial change from Joel E. Denny).
8845
8846 * tests/glr-regression.at
8847 (User destructor after an error during a split parse): New test case.
8848 Problem reported by Joel E. Denny in:
8849 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8850
8851 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8852
8853 * README-cvs: Give URLs for recommended tools.
8854 Mention Gzip version problem, and bootstrapping issues.
8855 Remove troubleshooting section, as it's somewhat obsolete.
8856
8857 * bootstrap (no_cache): New var, to accommodate different wget
8858 variants. Use it instead of '-C off'. Problem reported by
8859 twlevo@xs4all.nl.
8860
8861 * data/glr.c (yydestroyStackItem): New function.
8862 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8863 debugging information. Problem reported by Joel E. Denny.
8864
8865 2005-08-25 Akim Demaille <akim@epita.fr>
8866
8867 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8868
8869 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8870
8871 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8872 Don't invoke destructor on unresolved entries.
8873 * tests/glr-regression.at
8874 (User destructor for unresolved GLR semantic value): New test case.
8875 Problem reported by Joel E. Denny in:
8876 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8877
8878 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8879
8880 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8881 Add strnlen.c.
8882 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8883 lib-prefix.m4, po.m4.
8884
8885 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8886 in yydestruct diagnostic, since it might not be an error.
8887 Problem reported by Joel Denny near end of
8888 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8889 * data/lalr1.cc (yyerturn): Likewise.
8890 * data/yacc.c (yyreturn): Likewise.
8891 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8892
8893 * src/files.c: Remove obsolete FIXME comment.
8894
8895 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8896 with the other templates, and to fix bogus run-on messages such
8897 as the one reported at the end of
8898 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8899 All callers changed to avoid the newline.
8900 (yyprocessOneStack): Output two lines rather than one, to accommodate
8901 the above change. This changes the debug output format slightly.
8902
8903 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8904 reported by Joel E. Denny in
8905 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8906 (trivial change).
8907 * tests/glr-regression.at (Duplicate representation of merged trees):
8908 New test, from Joel E. Denny in:
8909 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8910 * THANKS: Add Joel E. Denny.
8911
8912 * configure.ac (AC_INIT): Bump to 2.0c.
8913
8914 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8915
8916 * NEWS: Version 2.0b.
8917
8918 * Makefile.am (SUBDIRS): Put examples before tests, so that
8919 "make check" doesn't finish with "All 1 tests passed".
8920
8921 * tests/regression.at (Token definitions): Don't rely on
8922 AT_PARSER_CHECK for data that contains backslashes. It currently
8923 uses 'echo', and 'echo' isn't portable if its argument contains
8924 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8925 that the byte '\0xff' is not printable in the C locale; it is,
8926 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8927 not printable, so use '\0x81' to test.
8928
8929 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8930 version of GCC, since the macro is used with non-GCC compilers.
8931
8932 Fix core dump reported by Pablo De Napoli in
8933 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8934 * tests/regression.at (Invalid inputs with {}): New test.
8935 * src/parse-gram.y (token_name): Translate type before using
8936 it as an index.
8937
8938 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8939 the user's name space. All uses changed to __attribute__
8940 ((__unused__)).
8941 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8942 Add __attribute__ ((__noreturn__)).
8943
8944 * etc/clcommit: Remove. We weren't using it, and it failed
8945 "make maintainer-distcheck".
8946 * Makefile.maint: Merge from coreutils.
8947 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8948 (syntax-check-rules): Change list of rules as described below.
8949 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8950 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8951 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8952 (sc_trailing_space): New rules.
8953 (sc_xalloc_h_in_src): Remove.
8954 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8955 (sc_space_tab, sc_error_exit_success, sc_changelog):
8956 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8957 (makefile-check, po-check, author_mark_check):
8958 (makefile_path_separator_check, copyright-check):
8959 Use grep -n, to make it easier to find violations.
8960 Use CVS_LIST and CVS_LIST_EXCEPT.
8961 (header_regexp, h_re): Remove.
8962 (dd_c): New macro.
8963 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8964 (my-distcheck): Use more-modern GCC flags.
8965 (signatures, %.asc): Remove.
8966 (rel-files, announcement): Remove signatures.
8967 Restore old updating code, even though we don't use it, so
8968 that we're the same as coreutils.
8969 (alpha, beta, major): Depend on news-date-check.
8970 Make the upload commands.
8971
8972 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8973 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8974 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8975 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8976 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8977 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8978 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8979 * tests/sets.at: Likewise.
8980
8981 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8982 we comment out the Autoconf version number.
8983 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8984 it's error-prone and "make maintainer-distcheck" rejects it.
8985
8986 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8987 Indent calls to "error" to pacify "make maintainer-distcheck",
8988 when the calls are not intended to be translated.
8989 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8990
8991 * src/Makefile.am (DEFS): Use +=, to pacify
8992 "make maintainer-distcheck".
8993 (bison_SOURCES): Add scan-skel.h.
8994 (sc_tight_scope): New rule, from coreutils.
8995
8996 * src/files.c (src_extension, header_extension):
8997 Now static, not extern.
8998 * src/getargs.c (short_options): Likewise.
8999 * src/muscle_tab.c (muscle_table): Likewise.
9000 * src/parse-gram.y (current_class, current_type, current_prec):
9001 Likewise.
9002 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9003 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9004 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9005 void, to avoid warning when NLS is disabled.
9006 * src/output.c: Include scan-skel.h.
9007 (scan_skel): Remove decl, since scan-skel.h does this.
9008 (output_skeleton):
9009 Indent calls to "error" to pacify "make maintainer-distcheck".
9010 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9011 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9012 "make maintainer-distcheck".
9013 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9014 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9015 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9016 (skel_lex_destroy, scan_skel): Move these decls to...
9017 * src/scan-skel.h: New file.
9018 * src/uniqstr.c (uniqstr_assert):
9019 Indent calls to "error" to pacify "make maintainer-distcheck".
9020
9021 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9022 not @VAR@.
9023
9024 * tests/torture.at: Revamp to avoid misuse of atoi that
9025 "make maintainer-distcheck" complained about.
9026
9027 * examples/extexi (message): Don't print a message more than once,
9028 and omit line-number decoration that makes Emacs compile think
9029 that informative messages are worth worrying about.
9030
9031 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9032
9033 * configure.ac: Update version number.
9034
9035 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9036 accidentally.
9037 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9038 autogenerated by the maintainer.
9039 * examples/calc++/.cvsignore: Add *.yy.
9040
9041 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9042 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9043 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9044
9045 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9046
9047 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9048 from maintainer-distcheck about casting the argument of 'free'.
9049
9050 * NEWS: Mention recent yytname changes.
9051 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9052
9053 * bootstrap: For translations that have not yet been upgraded to
9054 the new runtime-po domain, prime the pump by extracting the
9055 relevant strings from the obsolete translations. This code can be
9056 removed once the bison-runtime domain has been translated by each
9057 team.
9058
9059 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9060 now that token names are already quoted.
9061
9062 Fix problem reported by Anthony Heading.
9063 * data/glr.c (YYTOKEN_TABLE): New macro.
9064 (yytname): Define if YYTOKEN_TABLE.
9065 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9066 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9067 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9068 * src/output.c (prepare_symbols): Output token_table_flag.
9069
9070 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9071
9072 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9073 again if the first call fails.
9074
9075 * data/glr.c (yytnamerr): New function.
9076 (yyreportSyntaxError): Use it to dequote most string literals.
9077 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9078 with other skeletons. All uses changed.
9079 (yytnameerr_): New function.
9080 (yyreport_syntax_error): Use it to dequote most string literals.
9081 * data/yacc.c (yytnamerr): New function.
9082 (yyerrlab): Use it to decode most string literals.
9083 * doc/bison.texinfo (Decl Summary, Calling Convention):
9084 Clarify quoting convention of yytname.
9085 * src/output.c (prepare_symbols): Quote all names. This undoes
9086 the 2005-04-17 change, which is now accomplished (mostly) via
9087 changes in the parsers as described above.
9088 * tests/regression.at (Token definitions, Web2c Actions):
9089 Undo most 2005-04-17 change here, too.
9090
9091 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9092
9093 Fix more problems reported by twlevo@xs4all.nl.
9094 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9095 remove trailing spaces. This loses the exit status of ./types,
9096 and isn't needed since ./types shouldn't be emitting trailing
9097 spaces.
9098 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9099 as the stack isn't valid in that case.
9100
9101 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9102 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9103 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9104 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9105 is used.
9106 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9107 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9108 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9109 Likewise.
9110
9111 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9112 overly-picky compilers that reject 'char *foo = "bar";'.
9113
9114 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9115 to FILE * parameter, not to stderr. This fixes a typo introduced
9116 in the 2005-07-12 change.
9117
9118 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9119 warnings from GCC 4.
9120
9121 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9122 (yyglrShiftDefer, yysplitStack):
9123 Remove unused parameters b4_pure_formals. All uses changed.
9124 (yyglrShift): Remove unused parameters b4_user_formals.
9125 All uses changed.
9126 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9127
9128 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9129
9130 Destructor cleanups and regularization among the three skeletons.
9131 * NEWS: Document the behavior changes.
9132 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9133 stack before failing, as the cleanup code will do it for us now.
9134 * data/lalr1.cc (yyerrlab): Likewise.
9135 * data/glr.c (yyparse): Pop everything off the stack before
9136 freeing it, so that destructors get called properly.
9137 * data/lalr1.cc (yyreturn): Likewise.
9138 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9139 This is more consistent.
9140 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9141 why destructors might be called. 1.875 -> 2.1.
9142 (Destructor Decl, Decl Summary, Table of Symbols):
9143 Some English-language cleanups for %destructor.
9144 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9145 Add output line for destructor of start symbol.
9146 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9147 because of that same extra output line.
9148
9149 * NEWS: Document minor wording changes in diagnostics of
9150 Bison-generated parsers.
9151 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9152 Remove unused formals. All uses changed.
9153 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9154 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9155 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9156 Rename yyoverflowab to yyexhaustedlab.
9157 When memory exhaustion occurs during syntax-error reporting,
9158 report it separately rather than in a single diagnostic; this
9159 eases translation.
9160 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9161 (Memory Exhausted): Renamed from Parser Stack Overflow.
9162 Revamp wording slightly to prefer "memory exhaustion".
9163 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9164
9165 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9166
9167 Add i18n support to the GLR skeleton. Partially fix the C++
9168 skeleton; a C++ expert needs to finish this. Remove debugging
9169 msgids; there's little point to having them translated, since they
9170 can be understood only by someone who can read the
9171 (English-language) source code.
9172
9173 Generate runtime-po/bison-runtime.pot automatically, so that we
9174 don't have to worry about garbage getting in that file. We'll
9175 make sure after the next official release that old msgids don't
9176 get lost. See
9177 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9178
9179 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9180 Now auto-generated.
9181 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9182 Fix typos in explanations of the runtime file.
9183 * bootstrap: Change gettext keyword from YYI18N to YY_.
9184 Use standard Makefile.in.in in runtime-po, since we'll arrange
9185 for backward-compatible bison-runtime.po files in a different way.
9186 * data/glr.c (YY_): New macro, from yacc.c.
9187 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9188 Translate messages intended for users.
9189 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9190 the wording in the other skeletons. We don't know that the memory
9191 is virtual.
9192 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9193 Use same method that yacc.c uses.
9194 Don't translate debugging messages.
9195 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9196 it doesn't work (yet), and requires C++ expertise to fix.
9197 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9198 Move defn to a more logical place, to be consistent with other
9199 skeletons.
9200 Don't translate debugging messages.
9201 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9202 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9203 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9204 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9205
9206 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9207 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9208 void, not int.
9209 * tests/glr-regression.at (Badly Collapsed GLR States):
9210 Likewise.
9211 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9212 yylex should return 0 at EOF rather than aborting.
9213
9214 Improve tests for stack overflow in GLR parser.
9215 Problem reported by twlevo@xs4all.nl.
9216 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9217 All uses removed.
9218 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9219 can handle the problem.
9220 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9221 (yyparse): New local variable yyresult to record the result.
9222 Use result of setjmp to set it, rather than storing itinto
9223 struct.
9224 (yyDone): Remove label.
9225 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9226 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9227 if YYABORT is used).
9228 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9229 yyparse status; put status > 1 into diagnostic.
9230 Check that status==2 works.
9231 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9232 Use exit status 3 for failure to open (which shouldn't happen).
9233
9234 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9235
9236 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9237 1 on syntax error; just let yyparse do its thing.
9238 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9239 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9240 (Exploding the Stack Size with Alloca):
9241 (Exploding the Stack Size with Malloc):
9242 Expect exit status 2, not 1, since the parser is supposed to blow
9243 its stack. Problem reported by twlevo@xs4all.nl.
9244
9245 * data/glr.c (yyparse): Don't assume that the initial calls
9246 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9247 Print a stack-overflow message and fail instead.
9248 Initialize the line-number information before creating the stack,
9249 so that the stack-overflow message can report line zero safely.
9250
9251 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9252
9253 Fix problems reported by twlevo@xs4all.nl.
9254 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9255 (yyuserMerge): Provide a default case if b4_mergers is empty.
9256 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9257 * tests/glr-regression.at
9258 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9259 Add casts to pacify C++ compilers.
9260 * tests/glr-regression.at (Improper merging of GLR delayed action
9261 sets): Declare yylex before using it.
9262 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9263 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9264 test for valgrind; valgrind is independent of g++.
9265 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9266 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9267 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9268 Use a destructor, so that we can expand the stack. Change
9269 YYSTYPE to char * so that we can free it. Cast result of malloc.
9270
9271 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9272
9273 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9274 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9275
9276 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9277
9278 * PACKAGING: New file, suggested by Bruno Haible and taken from
9279 similar wording in gettext's PACKAGING file.
9280 * NEWS: Mention PACKAGING.
9281 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9282
9283 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9284
9285 * NEWS: Document recent i18n improvements.
9286 * bootstrap: Get runtime translations into runtime-po.
9287 Create runtime-po files automatically, if possible.
9288 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9289 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9290 does not infringe on the user's name space.
9291 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9292 * doc/bison.texinfo (Internationalization): Revamp the English
9293 and Texinfo syntax a bit, to try to make it clearer.
9294 (Bison Options, Option Cross Key): Mention --print-localedir.
9295 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9296 YYENABLE_NLS. Quote a bit more.
9297 * runtime-po/.cvsignore: New file.
9298 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9299 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9300 * runtime-po/quot.sed: Likewise.
9301 * runtime-po/boldquot.sed: Likewise.
9302 * runtime-po/en@quot.header: Likewise.
9303 * runtime-po/en@boldquot.header: Likewise.
9304 * runtime-po/insert-header.sin: Likewise.
9305 * runtime-po/remove-potcdate.sin: Likewise.
9306 * runtime-po/Makevars: Likewise.
9307 * runtime-po/LINGUAS: Likewise.
9308 * runtime-po/de.po: Likewise; we will rely on the translation project
9309 to maintain this, so "bootstrap" should get it.
9310 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9311 its value.
9312 * src/main.c (main): Bind the bison-runtime domain, too.
9313
9314 2005-07-12 Bruno Haible <bruno@clisp.org>
9315
9316 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9317 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9318 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9319 * runtime-po: New directory.
9320 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9321 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9322 * runtime-po/Rules-quot: New file, copied from po/.
9323 * runtime-po/quot.sed: Likewise.
9324 * runtime-po/boldquot.sed: Likewise.
9325 * runtime-po/en@quot.header: Likewise.
9326 * runtime-po/en@boldquot.header: Likewise.
9327 * runtime-po/insert-header.sin: Likewise.
9328 * runtime-po/remove-potcdate.sin: Likewise.
9329 * runtime-po/Makevars: New file.
9330 * runtime-po/POTFILES.in: New file.
9331 * runtime-po/LINGUAS: New file.
9332 * runtime-po/bison-runtime.pot: New file.
9333 * runtime-po/de.po: New file.
9334 * m4/bison.m4: New file.
9335 * Makefile.am (SUBDIRS): Add runtime-po.
9336 (aclocaldir, aclocal_DATA): New variables.
9337 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9338 Define aclocaldir.
9339 * src/getargs.c (usage): Document --print-localedir option.
9340 (PRINT_LOCALEDIR_OPTION): New enum item.
9341 (long_options): Add --print-localedir option.
9342 (getargs): Handle --print-localedir option.
9343 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9344 (Internationalization): New section.
9345
9346 2005-07-12 Akim Demaille <akim@epita.fr>
9347
9348 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9349 for consistency with the rest of the code.
9350 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9351 Add separators.
9352
9353 2005-07-12 Akim Demaille <akim@epita.fr>
9354
9355 * src/parse-gram.y: Use %printer instead of YYPRINT.
9356
9357 2005-07-12 Akim Demaille <akim@epita.fr>
9358
9359 * src/symtab.h, src/symtab.c (symbol_print): New.
9360 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9361 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9362
9363 2005-07-12 Akim Demaille <akim@epita.fr>
9364
9365 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9366 b4_at_dollar and b4_dollar_dollar.
9367
9368 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9369
9370 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9371 and Pennello's paper.
9372
9373 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9374
9375 * data/yacc.c (yyparse): Undo previous patch. Instead,
9376 set yylsp[0] and yyvsp[0] only if the initial action
9377 sets yylloc and yylval, respectively.
9378
9379 * data/yacc.c (yyparse): In the initial action, set
9380 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9381 This avoids the use of undefined variables if the initial
9382 action does not set yylloc and/or yylval.
9383
9384 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9385
9386 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9387 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9388 Remove from CVS. These files are automatically generated.
9389 * examples/extexi: Clarify that this file is now part of Bison,
9390 not GNU M4, and that it works with any POSIX-compatible Awk.
9391 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9392 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9393 so that we also get calc++-parser.yy. Geneate it.
9394 Use $(AWK), not gawk, since any conforming Awk will do.
9395 Put comment before action, since older 'make' can't handle comment
9396 in action.
9397 $(BUILT_SOURCES): List all built sources, not just some of them.
9398 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9399 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9400 $($(calc_sources_generated)): Remove unnecessary test for existence
9401 of target. (This had a shell syntax error anyway; a stray "x".)
9402 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9403 calc++-parser.yy.
9404 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9405
9406 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9407 implied by the other modules.
9408
9409 2005-07-06 Akim Demaille <akim@epita.fr>
9410
9411 Bind examples/calc++ to the package.
9412 * examples/calc++/Makefile: Remove, replaced by...
9413 * examples/calc++/Makefile.am: ... this new file.
9414 * examples/calc++/test: Remove input.
9415 * examples/calc++/compile: Remove.
9416 * examples/Makefile.am: New.
9417 * configure.ac, Makefile.am: Adjust.
9418 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9419
9420 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9421
9422 * data/glr.c (yyFail): Drastically simplify; since the format argument
9423 never had any % directives, we can simply pass it to yyerror.
9424 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9425 be modified later, as that is the usual style in glr.c.
9426 Problems reported by Paul Hilfinger.
9427
9428 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9429 and size overflow errors.
9430 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9431 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9432 (YYSIZEMAX): New macro.
9433 (yystpcpy): New function, taken from yacc.c.
9434 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9435 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9436 so that we don't have to maintain their signatures.
9437 (yyFail): Check for buffer overflow, by using vsnprintf rather
9438 than vsprintf. Allocate a bigger buffer if possible.
9439 Report an error if buffer allocation fails.
9440 (yyStackOverflow): New function.
9441 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9442 the initialization was successful. It might fail if storage was
9443 exhausted.
9444 (yyexpandGLRStack): Add more checks for storage allocation failure.
9445 Use yyStackOverflow to report failures.
9446 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9447 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9448 Don't assume stack number fits in int.
9449 (yysplitStack): Check for storage allocation failure.
9450 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9451 can print diagnostics on storage allocation failure. All callers
9452 changed.
9453 (yyresolveValue): Use yybool for boolean.
9454 (yyreportSyntaxError): Check for size-calculation overflow.
9455 This code is taken from yacc.c.
9456 (yyparse): Check for storage allocation errors when allocating
9457 the initial stack.
9458
9459 2005-07-05 Akim Demaille <akim@epita.fr>
9460
9461 Extract calc++ from the documentation.
9462 * doc/bison.texinfo (Calc++): Add the extraction marks.
9463 * examples/extexi: New, from the aborted GNU Programming 2E.
9464 Separate the different paragraph of a file with empty lines.
9465 * examples/Makefile: Use it to extract the whole calc++ example.
9466
9467 2005-06-24 Akim Demaille <akim@epita.fr>
9468
9469 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9470 class typedefs.
9471
9472 2005-06-22 Akim Demaille <akim@epita.fr>
9473
9474 * doc/bison.texinfo (C++ Language Interface): First stab.
9475 (C++ Parsers): Remove.
9476
9477 2005-06-22 Akim Demaille <akim@epita.fr>
9478
9479 * data/lalr1.cc (yylex_): Honor %lex-param.
9480
9481 2005-06-22 Akim Demaille <akim@epita.fr>
9482
9483 Start a set of simple examples.
9484 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9485 * examples/calc++/calc++-driver.hh,
9486 * examples/calc++/calc++-parser.yy,
9487 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9488 * examples/calc++/compile, examples/calc++/test: New.
9489
9490 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9491
9492 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9493 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9494 which stems from the 2005-05-27 patch.
9495
9496 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9497
9498 * data/glr.c: Modify treatment of unused parameters to permit use
9499 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9500
9501 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9502
9503 Fix infringement on user name space reported by Janos Zoltan Szabo.
9504 * data/yacc.c (yyparse): strlen -> yystrlen.
9505
9506 2005-05-30 Akim Demaille <akim@epita.fr>
9507
9508 * data/lalr1.cc (_): New.
9509 Translate the various messages.
9510
9511 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9512
9513 Fix infringement on user name space reported by Bruno Haible.
9514 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9515 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9516 the user's name space.
9517 (alloca): Include <stdlib.h> to get it, if it's not built in.
9518 (YYMALLOC, YYFREE): Define only if needed.
9519 (malloc, free): Declare, but only if needed, as this infringes on
9520 the user name space.
9521
9522 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9523
9524 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9525 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9526 with %d format.
9527 * lib/ebitset.c (min, max): Undef before defining.
9528 * lib/vbitset.c (min, max): Likewise.
9529 * lib/subpipe.c (create_subpipe): Save local variables in case
9530 vfork clobbers them.
9531
9532 2005-05-24 Bruno Haible <bruno@clisp.org>
9533
9534 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9535 error message syntax used by gcc-4.0.
9536
9537 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9538
9539 * README: Mention m4 1.4.3. Remove obsolete advice about
9540 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9541
9542 * bootstrap: Remove workaround for problem I encountered with
9543 gettext 0.14.1; it seems to be fixed now.
9544
9545 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9546
9547 * NEWS: Version 2.0a.
9548
9549 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9550 the previous change.
9551
9552 Various maintainer cleanups.
9553 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9554 conftest*, for benefit of CVS commands run at the same time as
9555 "configure". Add build-aux, since "bootstrap" now creates it and
9556 its subfiles.
9557 * Makefile.cfg (move_if_change): Remove.
9558 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9559 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9560 (po_repo, do-po-update, po-update, wget_files, get-targets):
9561 (config.guess-url_prefix, config.sub-url_prefix):
9562 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9563 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9564 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9565 Remove.
9566 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9567 this is now the recommended name.
9568 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9569 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9570 ylwrap. These files now go into build-aux.
9571 * config/move-if-change: Remove.
9572 * config/prev-version.txt: Bump from 1.75 to 2.0.
9573
9574 * bootstrap: Add stdio-safer, unistd-safer modules.
9575 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9576 we don't need it).
9577 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9578 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9579 * lib/subpipe.c: Include "unistd-safer.h".
9580 (create_subpipe): Make sure all the newly-created
9581 file descriptors are > 2, so that diagnostics don't
9582 get sent down them (which might cause Bison to hang, in theory).
9583 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9584 * src/files.c (xfopen): Use fopen_safer, not fopen.
9585
9586 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9587 yesterday's yacc.c fix.
9588
9589 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9590
9591 * data/glr.c, data/lalr1.cc: Update copyright date.
9592
9593 Fix a destructor bug reported by Wolfgang Spraul in
9594 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9595 * data/yacc.c (yyabortlab): Don't call destructor, and
9596 don't set yychar to EMPTY.
9597 (yyoverflowlab): Don't call destructor.
9598 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9599 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9600 since we no longer output the message "discarding lookahead token
9601 end of input ()".
9602
9603 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9604
9605 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9606 fix a small glitch in debugging output.
9607 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9608 after YY_SYMBOL_PRINT where needed.
9609
9610 (struct yyGLRState): Add some comments.
9611 (struct yySemanticOption): Add some comments.
9612 (union yyGLRStackItem): Add comment.
9613
9614 (yymergeOptionSets): Correct this to properly perform the union,
9615 avoiding infinite reported by Michael Rosien.
9616 Update comment.
9617
9618 * tests/glr-regression.at: Add test for GLR merging error reported
9619 by M. Rosien.
9620
9621 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9622
9623 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9624 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9625 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9626 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9627 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9628 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9629 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9630 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9631 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9632 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9633 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9634 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9635 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9636 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9637 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9638 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9639 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9640 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9641 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9642 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9643 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9644 src/output.h, src/parse-gram.c, src/parse-gram.h,
9645 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9646 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9647 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9648 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9649 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9650 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9651 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9652 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9653 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9654 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9655 tests/reduce.at, tests/regression.at, tests/sets.at,
9656 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9657 Update FSF postal mail address.
9658
9659 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9660
9661 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9662 Problem reported by Ralf Menzel.
9663
9664 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9665
9666 * tests/actions.at: Test that stack overflow invokes destructors.
9667 From Marcus Holland-Moritz.
9668 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9669 from here....
9670 (yyreturn): to here. That way, destructors are called properly
9671 even if the stack overflows, or the user calls YYACCEPT or
9672 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9673 (yyoverflowlab): Destroy the lookahead.
9674
9675 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9676
9677 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9678
9679 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9680
9681 * NEWS: Bison-generated C parsers no longer quote literal strings
9682 associated with tokens.
9683 * src/output.c (prepare_symbols): Don't escape strings,
9684 since users don't want to see C escapes.
9685 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9686 in diagnostics.
9687 * tests/input.at (Torturing the Scanner): Likewise.
9688 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9689
9690 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9691
9692 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9693 the data size is known to be too small and we can't increase it.
9694 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9695
9696 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9697
9698 * src/parse-gram.y: Include quotearg.h.
9699 (string_as_id): Quote $1 before using it as a key, since the
9700 lexer no longer quotes it for us.
9701 (string_content): Don't strip quotes, since lexer no longer
9702 quotes it for us.
9703 * src/scan-gram.l: Include quotearg.h.
9704 ("\""): Omit quote.
9705 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9706 a key, since the rest of the lexer doesn't quote it.
9707 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9708 * tests/regression.at (Token definitions): Check for backslashes
9709 in token strings.
9710
9711 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9712 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9713 (yyparse): Revamp code to generate long syntax error message, to
9714 make it easier to translate, and to avoid problems with arithmetic
9715 overflow. Change "virtual memory" to "memory" in diagnostic, since
9716 we don't know whether the memory is virtual.
9717
9718 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9719
9720 * NEWS: Bison-generated C parsers now use the _ macro to
9721 translate strings.
9722 * data/yacc.c (_) [!defined _]: New macro.
9723 All English strings wrapped inside this macro.
9724 * doc/bison.texinfo (Bison Parser): Document _.
9725 * po/POTFILES.in: Include src/parse-gram.c, since it now
9726 includes translateable strings that parse-gram.y doesn't.
9727
9728 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9729
9730 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9731 reverting the 2004-10-11 change to this function.
9732 (symbol_check_alias_consistency): Don't call symbol_type_set
9733 if the type name is already correct.
9734 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9735
9736 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9737
9738 * tests/regression.at (Token definitions): Don't use a token named
9739 c, as that generates a "#define c ..." that runs afoul of buggy
9740 stdlib.h that uses the identifier c as a member of struct
9741 drand48_data. Problem reported by Horst Wente.
9742
9743 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9744
9745 * bootstrap: Change translation URL from
9746 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9747 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9748 redirection glitches. Problem reported by twlevo@xs4all.nl.
9749
9750 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9751
9752 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9753 after operands; POSIX says this isn't portable for the c99 command.
9754
9755 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9756
9757 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9758 immediately if a data overrun has occurred; this may help us track
9759 down what may be a spurious failure on MacOS.
9760
9761 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9762
9763 Respond to problems reported by twlevo@xs4all.nl.
9764
9765 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9766
9767 * src/vcg.h: Comment fix.
9768 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9769 (G_CMAX): Change to -1 instead of INT_MAX.
9770
9771 * data/yacc.c (yyparse): Omit spaces before #line.
9772
9773 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9774
9775 * src/tables.c (state_number_to_vector_number): Put it inside an
9776 "#if 0", since it's not currently used. Problem reported by
9777 Roland McGrath.
9778
9779 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9780
9781 * src/output.c (escaped_output): Renamed from
9782 escaped_file_name_output, since we now use it for symbol tags as
9783 well. All uses changed.
9784 (symbol_destructors_output, symbol_printers_output):
9785 Escape symbol tags too.
9786 Problem reported by Matyas Forstner in
9787 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9788
9789 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9790 not needed.
9791 * src/output.c (user_actions_output, token_definitions_output,
9792 symbol_destructors_output, symbol_printers_output): Likewise.
9793 * src/reader.c (prologue_augment): Likewise.
9794 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9795
9796 * src/vcg.c (output_edge): Don't quote linestyle arg.
9797 Problem reported by twlevo@xs4all.nl.
9798
9799 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9800
9801 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9802 example, reported by Derek M Jones. Also, make the example even
9803 more outrageous, to better illustrate how bad the problem is.
9804
9805 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9806
9807 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9808 putsym. Typo reported by Sebastian Piping.
9809
9810 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9811
9812 * doc/bison.texinfo (Language and Grammar): some -> same
9813 (Epilogue): int he -> in the
9814 Typos reported by Sebastian Piping via Justin Pence.
9815
9816 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9817
9818 * tests/glr-regression.at (Improper handling of embedded actions
9819 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9820 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9821 with dollar signs in test names.
9822 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9823 for a similar reason.
9824
9825 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9826
9827 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9828 wants to redefine G_VIEW.
9829
9830 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9831
9832 * src/vcg.c (get_view_str): Remove case for normal_view.
9833 Problem reported by twlevo@xs4all.nl.
9834
9835 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9836
9837 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9838 Problem reported by twlevo@xs4all.nl.
9839
9840 * doc/bison.texinfo: Change @dircategory from "GNU programming
9841 tools" to "Software development". Requested by Richard Stallman
9842 via Karl Berry.
9843
9844 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9845
9846 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9847 Problem reported by twlevo@xs4all.nl.
9848
9849 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9850
9851 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9852 keyword; it's not needed with modern compilers, and it doesn't
9853 affect correctness with older compilers. Suggested by
9854 twlevo@xs4all.nl.
9855
9856 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9857
9858 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9859 gcc -Wswitch-default.
9860 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9861 * data/yacc.c (yyparse): Likewise.
9862
9863 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9864
9865 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9866 already. Let config.h define any nonstandard values.
9867
9868 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9869
9870 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9871 for the benefit of slower hosts. Problem reported by
9872 Nelson H. F. Beebe.
9873
9874 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9875
9876 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9877 being defined and not used.
9878 * data/lalr1.cc (yyparse): Likewise.
9879 Use "if (false)" rather than "if (0)".
9880
9881 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9882
9883 * TODO: Mention that we should allow NUL bytes in tokens.
9884
9885 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9886
9887 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9888 Problem reported by Hans Aberg.
9889
9890 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9891
9892 * src/getargs.c (version): Happy new year; update overall
9893 program copyright date from 2004 to 2005.
9894
9895 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9896 Problem reported by Hans Aberg.
9897 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9898 (Output file names.): Add a test for the case when standard output
9899 is closed.
9900
9901 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9902
9903 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9904 to fix an oversight in the Bison 2.0 manual.
9905
9906 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9907
9908 * NEWS: Version 2.0. Reformat the existing news items since
9909 1.875, so that related items are grouped together.
9910 * configure.ac (AC_INIT): Bump version to 2.0.
9911 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9912
9913 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9914 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9915 otherwise, we're not testing alloca. Unfortunately there's no
9916 simple way to consult HAVE_ALLOCA here.
9917
9918 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9919 for yymsg, too.
9920
9921 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9922 hand. This avoids a warning about comparing int to size_t when
9923 GCC warnings are enabled.
9924
9925 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9926
9927 * NEWS: Bison-generated parsers no longer default to using the
9928 alloca function (when available) to extend the parser stack, due
9929 to widespread problems in unchecked stack-overflow detection.
9930 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9931 responsibility to set it to a positive value. This lets the user
9932 specify a value that is not a preprocessor constant.
9933 * data/yacc.c (YYMAXDEPTH): Likewise.
9934 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9935 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9936 to be a compile-time constant. However, explain the constraints on it.
9937 Also, explain the constraints on YYINITDEPTH.
9938 (Table of Symbols): Explain that alloca is no longer the default.
9939 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9940 to 1.
9941
9942 * doc/bison.texinfo (Location Default Action): Mention that n must
9943 be zero when k is zero. Suggested by Frank Heckenbach.
9944
9945 2004-12-22 Akim Demaille <akim@epita.fr>
9946
9947 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9948 (parser::state_type, parser::semantic_type, parser::location_type):
9949 Private, not public.
9950 (parser::parse): Return ints, not bool.
9951 Returning a bool introduces a problem: 0 corresponds to false, and
9952 it seems weird to return false on success. Returning true changes
9953 the conventions for yyparse.
9954 Alternatively we could return void and send an exception.
9955 There is no clear consensus (yet?).
9956 (state_stack, semantic_stack, location_stack): Rename as...
9957 (state_stack_type, semantic_stack_type, location_stack_type): these.
9958 Private, not public.
9959 * tests/c++.at: New.
9960 * tests/testsuite.at, tests/Makefile.am: Adjust.
9961
9962 2004-12-21 Akim Demaille <akim@epita.fr>
9963
9964 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9965
9966 2004-12-21 Akim Demaille <akim@epita.fr>
9967
9968 Don't impose std::string for filenames.
9969
9970 * data/lalr1.cc (b4_filename_type): New.
9971 (position::filename): Use it.
9972 (parser.hh): Move the inclusion of stack.hh and location.hh below
9973 the user code, so that needed headers for the filename type can be
9974 included first.
9975 Forward declare them before the user code.
9976 * tests/Makefile.am (check-local, installcheck-local): Pass
9977 TESTSUITEFLAGS to the TESTSUITE.
9978
9979 2004-12-20 Akim Demaille <akim@epita.fr>
9980
9981 Use more STL like names: my_class instead of MyClass.
9982
9983 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9984 (SemanticStack, SemanticType, StateStack, StateType)
9985 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9986 (Parser::value): Rename as...
9987 (location_stack, location_type, rhs_number_type, semantic_stack)
9988 (semantic_type, state_stack, state_type, token_number_type, stack)
9989 (slice, traits, parser::yylloc, parser::yylval): these.
9990
9991 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9992
9993 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9994
9995 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9996 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9997
9998 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9999
10000 Remove uses of 'short int' and 'unsigned short int'. This raises
10001 some arbitrary limits. It uses more memory but nowadays that's
10002 not much of an issue.
10003
10004 This change does not affect the generated parsers; that's a different
10005 task, as some users will want to conserve memory there.
10006
10007 Ideally we should use size_t to represent all object counts, and
10008 something like ptrdiff_t to represent signed differences of object
10009 counts; but that will require more code-cleanup than I have the
10010 time to do right now.
10011
10012 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10013 Use size_t, not int or short int, to count objects.
10014 * src/closure.c (nritemset, closure): Likewise.
10015 * src/closure.h (nritemset, closure): Likewise.
10016 * src/nullable.c (nullable_compute): Likewise.
10017 * src/print.c (print_core): Likewise.
10018 * src/print_graph.c (print_core): Likewise.
10019 * src/state.c (state_compare, state_hash): Likewise.
10020 * src/state.h (struct state): Likewise.
10021 * src/tables.c (default_goto, goto_actions): Likewise.
10022
10023 * src/gram.h (rule_number, rule): Use int, not short int.
10024 * src/output.c (prepare_rules): Likewise.
10025 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10026 errs, reductions): Likewise.
10027 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10028 Likewise.
10029 * src/tables.c (vector_number, tally, action_number,
10030 ACTION_NUMBER_MINIMUM): Likewise.
10031 * src/output.c (muscle_insert_short_int_table): Remove.
10032
10033 2004-12-17 Akim Demaille <akim@epita.fr>
10034
10035 * data/lalr1.cc: Extensive Doxygenation.
10036 (error_): Rename as...
10037 (error): this, since it is visible to the user.
10038 Adjust callers.
10039 (Parser::message): Now an automatic variable from...
10040 (Parser::yyreport_syntax_error_): here.
10041 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10042 Parser::error.
10043 * tests/input.at: Escape $.
10044
10045 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10046
10047 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10048 Parenthesize rhs to avoid obscure problems with mistakes like
10049 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10050 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10051 b4_rhs_location): Likewise.
10052 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10053 b4_rhs_location): Likewise.
10054
10055 2004-12-16 Akim Demaille <akim@epita.fr>
10056
10057 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10058 yacc.c: be sure to stay within yycheck_.
10059 * tests/actions.at: Re-enable C++ tests.
10060
10061 2004-12-16 Akim Demaille <akim@epita.fr>
10062
10063 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10064 real.
10065
10066 2004-12-16 Akim Demaille <akim@epita.fr>
10067
10068 Use #define to handle the %name-prefix.
10069
10070 * data/glr.c, data/yacc.c: Comment changes.
10071 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10072 so that one can refer to yylex in the parser file, and have it
10073 renamed, as is the case with other skeletons.
10074
10075 2004-12-16 Akim Demaille <akim@epita.fr>
10076
10077 Move lalr1.cc internals into yy*.
10078
10079 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10080 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10081 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10082 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10083 (empty_, final_, terror_, errcode_, ntokens_)
10084 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10085 (looka_, ilooka_, error_range_, nerrs_):
10086 Rename as...
10087 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10088 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10089 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10090 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10091 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10092 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10093 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10094 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10095 these.
10096
10097 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10098
10099 Fix some problems reported by twlevo at xs4all.
10100 * src/symtab.c (symbol_new): Report an error if the input grammar
10101 contains too many symbols. This is better than calling abort() later.
10102 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10103 (struct node, struct graph):
10104 Rename member expand to stretch. All uses changed.
10105 (struct graph): Remove member layoutalgorithm. All uses removed.
10106 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10107 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10108 All uses changed.
10109 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10110
10111 2004-12-15 Akim Demaille <akim@epita.fr>
10112
10113 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10114 Add more Doxygen comments.
10115 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10116 (report_syntax_error_, translate_): Rename as...
10117 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10118 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10119
10120 2004-12-15 Akim Demaille <akim@epita.fr>
10121
10122 * data/lalr1.cc (lex_): Rename as...
10123 (yylex_): this.
10124 Move the trace here.
10125 Take the %name-prefix into account.
10126 Reported by Alexandre Duret-Lutz.
10127
10128 2004-12-15 Akim Demaille <akim@epita.fr>
10129
10130 Simplify the C++ parser constructor.
10131
10132 * data/lalr1.cc (debug_): Rename as...
10133 (yydebug_): so that the parser's internals are always in the yy*
10134 pseudo namespace.
10135 Adjust uses.
10136 (b4_parse_param_decl): Remove the leading comma as it is now only
10137 called as unique argument list.
10138 (Parser::Parser): Remove the constructor accepting a location and
10139 an initial debugging level.
10140 Remove from the other ctor the argument for the debugging level.
10141 (debug_level_type, debug_level, set_debug_level): New.
10142
10143 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10144 constructor calls.
10145
10146 2004-12-15 Akim Demaille <akim@epita.fr>
10147
10148 Remove b4_root related material: failure experiment
10149 (which goal was to allow to derive from a class).
10150
10151 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10152 definitions and uses.
10153
10154 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10155
10156 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10157 not 2, since it's not portable to subtract 1 from the start of an
10158 array. The new item 0 is never set or used. All uses changed.
10159
10160 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10161 the default definition of YYLLOC_DEFAULT. Problem reported
10162 by Frank Heckenbach.
10163
10164 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10165
10166 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10167 the normal case and one for the error case. Just use the
10168 first one uniformly. Problem reported by Frank Heckenbach.
10169 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10170 use exactly the same macro in both places.
10171 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10172 so that the normal-case YYRHSLOC works for the error case too.
10173 All uses changed.
10174 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10175 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10176 * doc/bison.texinfo (Location Default Action): Don't claim that
10177 we have an array of locations. Use the same macro for both glr
10178 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10179 the index is 0.
10180
10181 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10182
10183 * HACKING: Update email addresses to send announcements to.
10184
10185 * configure.ac (AC_INIT): Bump version to 1.875f.
10186
10187 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10188
10189 * NEWS: Version 1.875e.
10190 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10191
10192 * src/scan-skel.l: Include "complain.h", for "fatal".
10193
10194 * src/relation.h (relation_print, relation_digraph):
10195 Relation sizes are of type relation_node, not size_t (this is
10196 merely a doc fix, since the two types are equivalent).
10197 (relation_transpose): Relation sizes are of type relation_node,
10198 not int.
10199 * src/relation.c: Likewise.
10200 (top, infinity): Now of type relation_node, not int.
10201 (traverse, relation_transpose): Use relation_node, not int.
10202
10203 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10204 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10205 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10206
10207 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10208 specifying whether the test should be skipped. Use it tp
10209 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10210 fail on some hosts, and should be skipped.
10211
10212 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10213
10214 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10215 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10216 unless otherwise specified below.
10217
10218 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10219 to allocate kernel_base, kernel_items, kernel_size, since
10220 they needn't be initialized to 0.
10221 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10222 * src/closure.c (new_closure): Likewise, for itemset.
10223 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10224 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10225 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10226 (build_relations): Likewise for edge, states1, includes.
10227 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10228 * src/reader.c (packgram): Likewise, for ritem, rules.
10229 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10230 * src/relation.c (relation_digraph): Likewise for VERTICES.
10231 (relation_transpose): Likewise for new_R, end_R.
10232 * src/symtab.c (symbols_token_translations_init): Likewise for
10233 token_translations.
10234 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10235 (token_actions): Likewise for yydefact, actrow, conflrow,
10236 conflict_list.
10237 (save_column): Likewise for froms[symno], tos[symno].
10238 (goto_actions): Likewise for state_count.
10239 (pack_table): Likewise for base, pos, check.
10240 (tables_generate): Likewise for width.
10241
10242 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10243 for initial core. Just have a separate core, so we needn't worry
10244 about whether kernel_size and kernel_base are initialized.
10245
10246 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10247 kernel_size, kernel_items): Remove unnecessary initialization.
10248 * src/conflicts.c (conflicts): Likewise.
10249 * src/derives.c (derives): Likewise.
10250 * src/muscle_tablc (muscle_insert): Likewise.
10251 * src/relation.c (relation_digraph): Likewise.
10252 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10253 conflrow, conflict_table, conflict_list, table, check):
10254 Likewise.
10255
10256 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10257 This is because all callers pass unsigned int.
10258 * src/closure.h (new_closure): Likewise.
10259
10260 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10261 (build_relations): Initialize includes[i] in all cases.
10262 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10263 and rules[ruleno].precsym. Initialize members in order.
10264 * src/relation.c (relation_transpose): Always initialize new_R[i]
10265 and end_R[i].
10266 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10267
10268 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10269 conflict_list[0] was always 0, but now it isn't initialized.
10270
10271 * src/table.c (table_grow): When conflict_table grew, the grown
10272 area wasn't cleared. Fix this.
10273
10274 * lib/.cvsignore: Add strdup.c, strdup.h.
10275 * m4/.cvsignore: Add strdup.m4.
10276
10277 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10278
10279 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10280 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10281 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10282 ngotos + 1 without checking for overflow.
10283 (build_relations): Use END_NODE, not -1, to denote end of edges.
10284 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10285 build_relations): Use goto_number, not int, for goto numbers.
10286 * src/tables.c (save_column, default_goto): Likewise.
10287
10288 2004-11-23 Akim Demaille <akim@epita.fr>
10289
10290 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10291 of #defining from yystype.
10292 Don't typedef yystype, C++ does not need it.
10293 This lets it possible to forward declare it as union.
10294
10295 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10296
10297 * bootstrap (gnulib_modules): Add extensions.
10298 Problem reported by Jim Meyering.
10299
10300 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10301
10302 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10303 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10304 src/system.h, src/tables.c: XFREE -> free, to accommodate
10305 recent change to gnulib xalloc.h.
10306 Problem reported by Jim Meyering.
10307
10308 2004-11-17 Akim Demaille <akim@epita.fr>
10309
10310 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10311
10312 2004-11-17 Akim Demaille <akim@epita.fr>,
10313 Alexandre Duret-Lutz <adl@gnu.org>
10314
10315 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10316 changes.
10317 (YYCDEBUG): Adjust.
10318 Use it instead of cdebug_.
10319 (Parser::debug_stream, Parser::set_debug_stream): New.
10320 (Parser::symprint_): Define cdebug_ for temporary backward
10321 compatibility.
10322 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10323 debug_stream ().
10324
10325 2004-11-17 Akim Demaille <akim@epita.fr>
10326
10327 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10328 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10329 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10330 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10331
10332 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10333
10334 * data/glr.c (yyloc_default): Remove; not used.
10335 Problem reported by Frank Heckenbach.
10336
10337 2004-10-25 Akim Demaille <akim@epita.fr>
10338
10339 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10340 Introduce another definition to address simple location arrays.
10341 (yyGLRStack): New member: yyerror_range.
10342 (yyrecoverSyntaxError, yyparse): Update it.
10343 (yyrecoverSyntaxError): Use it when shifting the error token to
10344 have an accurate range, equivalent to the one computed by both
10345 yacc.c and lalr1.cc.
10346 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10347 that column numbers start at column 0, as per GNU Coding
10348 Standards, the others tests, and the doc.
10349 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10350 Adjust to the above change (first column is 0).
10351 And adjust the location of the "<error>", now covering the whole
10352 line.
10353
10354 2004-10-22 Akim Demaille <akim@epita.fr>
10355 and Paul Eggert <eggert@cs.ucla.edu>
10356
10357 Remove some arbitrary limits on goto numbers and relations.
10358 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10359 initial values, since they're never used.
10360 (set_goto_map): ngotos is now unsigned, so test for overflow
10361 by seeing whether it wraps around to zero.
10362 * src/lalr.h (goto_number): Now size_t, not short int.
10363 (GOTO_NUMBER_MAXIMUM): Remove.
10364 * src/relation.c (relation_print, traverse, relation_transpose):
10365 Check for END_NODE rather than looking at sign.
10366 * src/relation.h (END_NODE): New macro.
10367 (relation_node): Now size_t, not short int.
10368
10369 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10370
10371 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10372 keyword, not an identifier. Problem reported by Baron Schwartz in
10373 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10374
10375 2004-10-11 Akim Demaille <akim@epita.fr>
10376
10377 * src/symtab.c (symbol_check_alias_consistency): Also check
10378 type names, destructors, and printers.
10379 Reported by Alexandre Duret-Lutz.
10380 Recode the handling of associativity and precedence in terms
10381 of symbol_precedence_set.
10382 Accept no redeclaration at all, not even equal to the previous
10383 value.
10384 (redeclaration): New.
10385 Use it to factor redeclaration complaints.
10386 (symbol_make_alias): Don't set the type of the alias, let
10387 symbol_check_alias_consistency do it as for other features.
10388 * src/symtab.h (symbol): Add new member prec_location, and
10389 type_location.
10390 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10391 * tests/input.at (Incompatible Aliases): New.
10392
10393 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10394
10395 .cvsignore fixes to accommodate gnulib changes,
10396 and the practice of naming build directories "_build".
10397 * .cvsignore: Add "_*". Sort.
10398 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10399 * m4/.cvsignore: Add "*_gl.m4".
10400
10401 2004-10-06 Akim Demaille <akim@epita.fr>
10402
10403 * src/parse-gram.y (add_param): Fix the truncation of trailing
10404 spaces.
10405
10406 2004-10-05 Akim Demaille <akim@epita.fr>
10407
10408 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10409 whether the reducion was empty or not. This leaves room to
10410 improve the use of YYLLOC_DEFAULT in such a case.
10411 lalr1.cc is still experimental, so changing this is acceptable.
10412 And finally, there are probably not many users who changed the
10413 handling of locations in GLR, so changing is admissible too.
10414
10415 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10416 empty reduction, set @$ to an empty location ending the previously
10417 stacked symbol.
10418 Adjust uses to make sure the code is triggered on empty
10419 reductions.
10420 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10421 expected output: empty reductions have empty locations.
10422
10423 2004-09-29 Akim Demaille <akim@epita.fr>
10424
10425 * data/lalr1.cc: Move towards a more standard C++ coding style
10426 for templates: Class < T > -> Class<T>.
10427
10428 2004-09-29 Akim Demaille <akim@epita.fr>
10429
10430 * data/lalr1.cc: Reinstall the former ctor, for sake of
10431 compatibility, but warn it will be removed.
10432 Move towards a more standard C++ coding style (i.e., type *var ->
10433 type* var).
10434
10435 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10436
10437 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10438 since it's less likely to work if NULs are involved in the future.
10439
10440 2004-09-27 Akim Demaille <akim@epita.fr>
10441
10442 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10443
10444 2004-09-27 Akim Demaille <akim@epita.fr>
10445
10446 * data/lalr1.cc (b4_parse_param_decl_1): New.
10447 (b4_parse_param_decl): Use it to have different names between attribute
10448 and argument names.
10449 (b4_cc_constructor_call): Likewise.
10450
10451 2004-09-24 Akim Demaille <akim@epita.fr>
10452
10453 * src/parse-gram.y (add_param): Strip the leading and trailing
10454 blanks from a formal argument declaration.
10455 (YY_LOCATION_PRINT): New.
10456
10457 2004-09-24 Akim Demaille <akim@epita.fr>
10458
10459 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10460 after the location.
10461
10462 2004-09-24 Akim Demaille <akim@epita.fr>
10463
10464 * doc/bison.texinfo (Table of Symbols): Sort.
10465
10466 2004-09-21 Akim Demaille <akim@epita.fr>
10467
10468 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10469 the useless parentheses.
10470 Suggested by Paul Eggert.
10471
10472 2004-09-20 Akim Demaille <akim@epita.fr>
10473
10474 Let the initial-action act on the look-ahead, and use it for the
10475 "initial push" (corresponding to an hypothetical beginning-of-file).
10476 And let lalr1.cc honor %initial-action.
10477
10478 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10479 example.
10480 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10481 (Parser::Parser): Remove the ctor that used to initialize it.
10482 (Parser::parse): Like in the other skeletons, issue the "starting
10483 parse" message before any action.
10484 Honor %initial-action.
10485 Initialize the stacks with the lookahead.
10486 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10487 look-ahead.
10488 Push them in the stacks.
10489 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10490
10491 2004-09-20 Akim Demaille <akim@epita.fr>
10492
10493 * doc/bison.texinfo (Initial Action Decl): New.
10494
10495 2004-09-20 Akim Demaille <akim@epita.fr>
10496
10497 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10498 clearer criterion to define it.
10499 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10500 When reducing on an empty RHS, use the latest stacked location as
10501 location.
10502 yylloc is not always available.
10503 * data/glr.c: Likewise.
10504 Also, honor initial-actions.
10505
10506 2004-09-20 Akim Demaille <akim@epita.fr>
10507
10508 * data/yacc.c (YY_LOCATION_PRINT): New.
10509 Define when we know YYLTYPE's structure, i.e., when the default
10510 YYLLOC_DEFAULT is used.
10511 * data/c.m4 (b4_yysymprint_generate): Use it.
10512 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10513 value of the result.
10514 (error_start_): Replace with...
10515 (error_range_): this location array.
10516 This allows to replace code relying on the implementation of
10517 locations by portable code.
10518 * data/yacc.c (yylerrsp): Replace with...
10519 (yyerror_range): this.
10520 Every time a token is popped, update yyerror_range[0], to have an
10521 accurate location for the error token.
10522 * data/glr.c (YY_LOCATION_PRINT): New.
10523 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10524 deference a pointer.
10525 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10526 report the location in %printers.
10527
10528 * src/scan-skel.l: Instead of abort, report error messages to ease
10529 understanding skeleton scanning failures.
10530
10531 2004-09-16 Akim Demaille <akim@epita.fr>
10532
10533 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10534 (iterator, const_iterator): these, to be more in the C++ spirit.
10535 Also, return reverse iterators so that when displaying the stack
10536 we display its bottom first.
10537 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10538 from yacc.c.
10539 We should probably use vector here though.
10540
10541 2004-09-16 Akim Demaille <akim@epita.fr>
10542
10543 Have more complete shift traces.
10544
10545 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10546 to report Shifts instead of ad hoc YYDPRINTF invocations,
10547 including for the error token.
10548 * data/lalr1.cc (symprint_): Output the location.
10549 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10550 output the location within the %printer.
10551 Activate GLR tests, at least to make sure they compile properly.
10552 They still don't pass though.
10553 * tests/calc.at: Adjust expect verbose output, since now "Entering
10554 state..." is on a different line than the "Shifting" message.
10555
10556 2004-09-08 Akim Demaille <akim@epita.fr>
10557
10558 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10559 Bison directive from the Bison file to the invocation of this
10560 macro, so that these directives are passed to
10561 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10562 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10563 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10564 the extra Bison directives instead of the whole series.
10565 Change the grammar so that there are recoverable errors, and
10566 unrecoverable errors. Now we can have the parser give up before
10567 consuming the whole input. As a result we now can observe that
10568 the lookahead is freed when needed.
10569 Change the parser source to parse argv[1] instead of a hard coded
10570 string.
10571 Simplify yylex, and give a value and location to EOF.
10572 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10573 passed directives already coded in the file.
10574 Add some tests to check the location of "error".
10575 For some tests, the C++ parser is correct, and not yacc.c.
10576 For other tests, they provide different, but unsatisfying, values,
10577 so keep the C++ value so that at least one parser is "correct"
10578 according to the test suite.
10579 (Actions after errors): Remove, this is subsumed by the
10580 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10581
10582 2004-09-06 Akim Demaille <akim@epita.fr>
10583
10584 * data/lalr1.cc: Adjust the indentation of the labels.
10585 (Parser::pop): New.
10586 Use it.
10587
10588 2004-09-06 Akim Demaille <akim@epita.fr>
10589
10590 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10591 argument, an informative message.
10592 Call YY_SYMBOL_PRINT.
10593 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10594 * data/lalr1.cc (destruct_): Likewise.
10595 In addition, no longer depend on b4_yysymprint_generate and
10596 b4_yydestruct_generate to generate these functions, do it "by
10597 hand".
10598
10599 2004-09-03 Akim Demaille <akim@epita.fr>
10600
10601 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10602 invoked, yydestruct the lookahead.
10603 * tests/calc.at (Calculator $1): Update the expected lengths of
10604 traces: there is an added line for the discarded lookahead.
10605 * doc/bison.texinfo (Destructor Decl): Some rewording.
10606 Define "discarded" symbols.
10607
10608 2004-09-02 Akim Demaille <akim@epita.fr>
10609
10610 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10611
10612 2004-09-02 Akim Demaille <akim@epita.fr>
10613
10614 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10615 (YYDSYMPRINTF): Rename as...
10616 (YY_SYMBOL_PRINT): this.
10617 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10618 two.
10619 Use it instead of direct symprint_ calls.
10620 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10621 one.
10622
10623 2004-09-02 Akim Demaille <akim@epita.fr>
10624
10625 * data/lalr1.cc (b4_yysymprint_generate): New.
10626 (symprint_): New member function, defined when YYDEBUG.
10627 Use it consistently instead of token/nterm debugging output by
10628 hand.
10629 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10630 %printer calls to use cdebug_ when using lalr1.cc.
10631
10632 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10633
10634 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10635 with #ifdef YYDEBUG.
10636
10637 2004-08-26 Akim Demaille <akim@epita.fr>
10638
10639 * doc/bison.texinfo (Implementing Loops): Rename as...
10640 (Implementing Gotos/Loops): this.
10641
10642 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10643
10644 Adjust to latest gnulib.
10645 * bootstrap (gnulib_modules): Add xalloc-die.
10646 Set LC_ALL=C so that file names sort consistently.
10647 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10648 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10649 uintmax_t.m4, ulonglong.m4.
10650 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10651 po.m4 since we are now using _gl.m4 instead.
10652
10653 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10654
10655 * src/scan-action.l: Remove. Scanning of semantic actions is
10656 handled in scan-gram.l.
10657
10658 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10659
10660 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10661
10662 * src/location.h (struct): The file member is a uniqstr.
10663 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10664
10665 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10666
10667 Fix bug with non-%union parsers that have printers or destructors,
10668 which led to a Bison core dump. Reported by Peter Fales in
10669 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
10670
10671 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10672 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10673 not to our own type.
10674 * src/output.c (symbol_destructors_output, symbol_printers_output):
10675 Don't assume %union.
10676 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10677 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10678 UNION-FLAG. All callers changed.
10679 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10680 Use type char, not unsigned int, when declaring an array of char;
10681 this lets us remove a cast.
10682 (Printers and Destructors): Add non-%union test cases.
10683
10684 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10685
10686 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10687 GLR writeups. E.g., avoid frenchspacing and the future tense,
10688 change "lookahead" to "look-ahead", and change "wrt" to "with
10689 respect to".
10690
10691 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10692
10693 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10694 New sections, split off from the GLR Parsers section. Put the new
10695 Simple GLR Parser near the start of the GLR section, for clarity.
10696 Rewrite connective text.
10697
10698 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
10699
10700 * doc/bison.texinfo (Simple GLR Parsers): New section.
10701
10702 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10703
10704 * NEWS, TODO, doc/bison.texinfo:
10705 Use "look-ahead" instead of "lookahead", to be consistent.
10706 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10707 while we're fixing "look-ahead".
10708 * src/conflicts.c (shift_set): Renamed from shiftset.
10709 (look_ahead_set): Renamed from lookaheadset.
10710 * src/print.c: Likewise.
10711 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10712 name for "lookahead".
10713 (report_types, usage): Likewise.
10714 * src/getargs.h (report_look_ahead_tokens): Renamed from
10715 report_lookaheads.
10716 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10717 compute_lookaheads.
10718 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10719 (look_ahead_tokens_print): Renamed from lookaheads_print.
10720 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10721 state_rule_lookaheads_print.
10722 * src/state.h: Likewise.
10723 (reductions.look_ahead_tokens): Renamed from lookaheads.
10724 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10725 AT_DATA_LOOKAHEADS_GRAMMAR.
10726
10727 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10728
10729 * README: Update location of patched M4 distribution.
10730
10731 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10732
10733 Don't assume the C++ compiler takes the same arguments as the C compiler
10734 (trivial change).
10735 * configure.ac (O0CXXFLAGS): New var.
10736 * tests/atlocal.in (CXXFLAGS): Use it.
10737
10738 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10739
10740 Fix some "make check" problems with C++ reported by
10741 Albert Chin-A-Young for Tru64 C++ in this thread:
10742 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10743
10744 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10745 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10746 Output to a .cc file for C++, not to a .c file.
10747 * tests/calc.at (AT_CHECK_CALC): Likewise.
10748 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10749 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10750
10751 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10752
10753 * tests/calc.at, tests/actions.at: Workaround for SGI
10754 C++ compiler. (trivial change)
10755
10756 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10757
10758 Spent a few hours checking out which prerequisite versions the
10759 current sources actually require. I went all the way back to
10760 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10761 a seemingly endless set of combinations of versions more recent
10762 than that. The bottom line is that the current sources require
10763 fairly recent versions of the build tools, and it'll be some work
10764 to change this.
10765 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10766 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10767 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10768 Add comments explaining why those particular versions are
10769 currently needed.
10770
10771 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10772 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
10773 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
10774
10775 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10776 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10777
10778 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10779
10780 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10781 0.11.5. Suggested by Bruno Haible.
10782 * bootstrap: Remove gettext version checking.
10783
10784 * doc/bison.texinfo (Decl Summary): Also mention that %union
10785 can depend on prerequisite types. Problem reported by Tim
10786 Van Holder.
10787
10788 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10789
10790 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10791 * README-alpha: Don't tell people not to package this.
10792
10793 * bootstrap: Don't assume $(...) works; use `...` instead.
10794 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10795 gettext better.
10796
10797 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10798 put into the -d output file, and mention what to do if YYSTYPE is
10799 defined as a macro.
10800
10801 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10802
10803 Undo change made earlier today: it caused autopoint to not bring
10804 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10805 autopoint's.
10806
10807 * bootstrap: Check that gettext version matches what's in
10808 configure.ac. Warn users to ignore robots.txt ERROR 404.
10809 * bootstrap: Undo today's earlier change (logged below).
10810 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
10811
10812 The gettext version checking is causing more trouble than it's
10813 curing; remove it. Problem reported by Paul Hilfinger.
10814
10815 * bootstrap: Issue a warning that one can expect a message
10816 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10817 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10818
10819 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10820
10821 Ensure that the C++ compiler used for testing actually works on a
10822 simple test program; if not, skip the C++-related tests. Problem
10823 reported by Vin Shelton in:
10824 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
10825
10826 * m4/cxx.m4: New file.
10827 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10828 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10829 * tests/local.at (AT_COMPILE_CXX): Use it.
10830
10831 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10832
10833 * data/glr.c (yylloc): Output this macro even if locations are not
10834 being generated, as the GLR parser needs it even in that case.
10835 Problem reported by Troy A. Johnson
10836 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10837
10838 * configure.ac (AC_INIT): Update to 1.875e.
10839
10840 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10841
10842 * NEWS: Version 1.875d.
10843 * configure.ac (AC_INIT): Likewise.
10844 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10845
10846 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10847 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10848 lalr1.cc runs afoul of the first, and the last two are no longer
10849 supported by GCC 3.4.0.
10850 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10851 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10852
10853 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10854
10855 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10856 unsigned int, for compatibility with latest gnulib hash module.
10857 * src/state.c (state_hash, state_hasher): Likewise.
10858 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10859 * src/uniqstr.c (hash_uniqstr): Likewise.
10860
10861 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10862
10863 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10864
10865 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10866 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10867 character and string literals.
10868 (unexpected_end): New function.
10869 (unexpected_eof): Use it.
10870 (unexpected_newline): New function.
10871 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10872 actions.
10873
10874 * NEWS: Document %expect-rr.
10875
10876 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10877 Fix typo by replacing $1 with $option.
10878 Remove more 'intl'-related files.
10879 Don't DEFUN AM_INTL_SUBDIR twice.
10880
10881 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10882 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10883 strtoul.c.
10884 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10885 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10886 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10887 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10888 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10889 * src/.cvsignore: Add *.output.
10890
10891 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10892 gets copied to the output file.
10893
10894 2004-04-28 Paul Eggert <eggert@twinsun.com>
10895
10896 Get files from the gnulib and po repositories, instead of relying
10897 on them being in our CVS. Upgrade to latest versions of gnulib
10898 and Automake.
10899
10900 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10901 * bootstrap: Bootstrap from gnulib and po repositories.
10902 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10903 * README-cvs: Document these changes. Remove version numbers from
10904 mentions of build tools, since they change so often. Mention Flex.
10905
10906 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10907 (gl_USE_SYSTEM_EXTENSIONS): Add.
10908 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10909 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
10910 does this for us.
10911 (AC_ISC_POSIX): Remove; we no longer support this
10912 ancient OS, as it gets in the way of latest Autoconf & gnulib.
10913 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10914 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10915 Do not check for C89 headers, except for locale.h which is used
10916 by the Yacc library and must port to K&R hosts.
10917 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10918 Do not check for C89 functions, except for setlocale which is
10919 used by the Yacc library.
10920 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10921 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10922 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10923 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10924 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10925 AM_GNU_GETTEXT): Remove; now done by:
10926 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10927 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10928 for us.
10929
10930 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10931 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10932 Define to empty, as gnulib.mk will do the rest for us.
10933 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10934 for us.
10935 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10936 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10937
10938 * src/files.c: Include gnulib's xstrndup.h.
10939
10940 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10941 (REALLOC): Use xnrealloc, for likewise.
10942 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10943 (strnlen, memrchr): Remove decls; functions no longer used.
10944 Include <stpcpy.h>.
10945
10946 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10947 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10948 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10949 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10950 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10951 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10952 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10953 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10954 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10955 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10956 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10957 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10958 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10959 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10960 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10961 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10962 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10963 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10964 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10965 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10966 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10967 Remove, as these files are now generated automatically
10968 by bootstrap or automake.
10969
10970 * po/ChangeLog: Remove: all but one entry was a duplicate
10971 of this file, and I moved that 2000-11-02 entry here.
10972
10973 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10974 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10975 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10976 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10977 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10978 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10979 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10980 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10981 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10982 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10983 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10984 xstrndup.h.
10985 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10986 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10987 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10988 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10989 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10990 * src/.cvsignore: Remove *_.c.
10991
10992
10993 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10994 support it. (The latest stable gzip doesn't.)
10995
10996 2004-04-27 Paul Eggert <eggert@twinsun.com>
10997
10998 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10999 case, as stos_ is now used by destructors due to the 2004-02-09
11000 change.
11001
11002 Remove more K&R C support.
11003 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11004 * lib/subpipe.c (errno): Remove decl.
11005 Include <stdlib.h> unconditionally.
11006 (EXIT_FAILURE): Remove macro.
11007 * src/complain.c (vfprintf, strerror): Remove.
11008 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11009 unconditionally.
11010 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11011 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11012 (strchr, strspn, memchr): Remove decls.
11013 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11014 unconditionally. Do not declare perror.
11015 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11016 unconditionally.
11017
11018 * src/complain.c (_): Remove useless defn, as system.h defines this.
11019
11020 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11021 with latest obstack.h.
11022 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11023 to procedure types, as obstack.h now does that for us.
11024 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11025
11026 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11027 so that this include file can stand alone.
11028 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11029 does this now. Include subpipe.h first after config.h, to
11030 test whether it can stand alone.
11031
11032 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11033 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11034 unused declaration.
11035
11036 * tests/synclines.at (%union synch line): Put a dummy member in
11037 the union, because empty unions aren't allowed in C. Caught
11038 by GCC 3.4.0.
11039
11040 2004-04-13 Jim Meyering <jim@meyering.net>
11041
11042 * src/conflicts.c (conflicts_print): Correct format string typo:
11043 use `%%' to produce literal `%'. (trivial change)
11044
11045 2004-03-30 Paul Eggert <eggert@twinsun.com>
11046
11047 * src/getargs.c (version): Update copyright year to 2004.
11048
11049 * data/c.m4 (b4_int_type): Use 'short int' rather than
11050 'short', and similarly for 'long', 'unsigned', etc.
11051 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11052 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11053 yy_yypstack, yydumpstack): Likewise.
11054 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11055 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11056 Likewise.
11057 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11058 yy_stack_print, yyparse): Likewise.
11059 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11060 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11061 * lib/bitset.c (bitset_print): Likewise.
11062 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11063 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11064 * lib/bitsetv.c (bitsetv_dump): Likewise.
11065 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11066 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11067 Likewise.
11068 * src/LR0.c (allocate_itemsets): Likewise.
11069 * src/gram.h (rule_number, rule): Likewise.
11070 * src/lalr.h (goto_number): Likewise.
11071 * src/nullable.c (nullable_compute): Likewise.
11072 * src/output.c (prepare_rules): Likewise.
11073 * src/relation.c (relation_print, relation_digraph): Likewise.
11074 * src/relation.h (relation_node): Likewise.
11075 * src/state.h (state_number, transitions, errs, reductions,
11076 struct state): Likewise.
11077 * src/symtab.h (symbol_number, struct symbol): Likewise.
11078 * src/tables.c (vector_number, tally, action_number,
11079 default_goto, goto_actions): Likewise.
11080 * tests/existing.at (GNU Cim Grammar): Likewise.
11081 * tests/regression.at (Web2c Actions): Likewise.
11082
11083 * src/output.c (muscle_insert_short_int_table): Renamed from
11084 muscle_insert_short_table. All uses changed.
11085
11086 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11087
11088 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11089 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11090 Add %expect-rr rule.
11091
11092 * src/scan-gram.l: Recognize %expect-rr.
11093
11094 * src/conflicts.h (expected_sr_conflicts): Rename from
11095 expected_conflicts.
11096 (expected_rr_conflicts): Declare.
11097
11098 * src/conflicts.c (expected_sr_conflicts): Rename from
11099 expected_conflicts.
11100 (expected_rr_conflicts): Define.
11101 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11102 for GLR parsers.
11103 Use expected_sr_conflicts in place of expected_conflicts.
11104 Warn if expected_rr_conflicts used in non-GLR parser.
11105
11106 * doc/bison.texinfo: Add documentation for %expect-rr.
11107
11108 2004-03-08 Paul Eggert <eggert@gnu.org>
11109
11110 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11111 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11112
11113 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11114 in lalr1.cc.
11115 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11116 * src/scan-gram.l (scan_integer): New function.
11117 ({int}): Use it.
11118 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11119 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11120 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11121 Say "long int", not "long", for uniformity with GNU style.
11122
11123 2004-02-25 Paul Eggert <eggert@twinsun.com>
11124
11125 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11126 compilers. This fixes a problem with Intel's C++ compiler being
11127 chatty, reported by Guido Trentalancia in
11128 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11129
11130 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11131
11132 Support %destructor and merge error locations in lalr1.cc.
11133
11134 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11135 (Parser::stos_): Define unconditionally.
11136 (Parser::destruct_): New method. Generate its body with
11137 b4_yydestruct_generate.
11138 (Parser::error_start_): New attribute.
11139 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11140 token which are discarded.
11141 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11142 error_start_ when erroneous token are discarded.
11143 (Parser::parse) <yyerrlab1>: Compute the location of the error
11144 token so that it covers all the discarded tokens.
11145 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11146 it can be called with `%skeleton "lalr1.cc"', and do that.
11147
11148 2004-02-02 Paul Eggert <eggert@twinsun.com>
11149
11150 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11151 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11152 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11153 There's no need to mention top_builddir since Automake does that
11154 for us.
11155 (INCLUDES): Remove, as Automake says it's obsolescent.
11156 Contents migrated into AM_CPPFLAGS as described above.
11157 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11158
11159 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11160
11161 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11162 (yyreportSyntaxError): Handle case where lookahead token is
11163 YYEMPTY.
11164
11165 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11166
11167 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11168 resulting parsers are compilable with C++.
11169
11170 2003-12-23 Paul Eggert <eggert@twinsun.com>
11171
11172 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11173 * src/output.c (output_skeleton): Rename local var.
11174 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11175 Bison tokens, as this runs afoul of the 2003-10-07 change that
11176 disallowed NUL bytes in character constants or string literals.
11177
11178 * tests/local.at: Require Autoconf 2.59's Autotest.
11179 * tests/testsuite.at: Don't include local.at, since we now assume
11180 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11181 including it.
11182 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11183 multiple inclusion warnings.
11184
11185 2003-12-02 Akim Demaille <akim@epita.fr>
11186
11187 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11188 conditions.
11189 From Bruno Haible.
11190
11191 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11192
11193 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11194
11195 2003-10-07 Paul Eggert <eggert@twinsun.com>
11196
11197 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11198 if testsuite doesn't exist.
11199
11200 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11201 literals, unfortunately.
11202 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11203 Complain about NUL bytes in character constants or string literals.
11204
11205 2003-10-05 Paul Eggert <eggert@twinsun.com>
11206
11207 * NEWS: Don't document %no-default-prec, as it's still
11208 too experimental.
11209 * doc/bison.texinfo: Document %no-default-prec only if
11210 the defaultprec flag is set. Normally it's not.
11211
11212 2003-10-04 Paul Eggert <eggert@twinsun.com>
11213
11214 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11215 non-modifiable lvalue, instead of a modifiable one.
11216 * doc/bison.texinfo (Actions): Document that $$ can
11217 be assigned to. Do not claim that $$ and $N are
11218 array element references: user code should not rely on this.
11219
11220 2003-10-01 Paul Eggert <eggert@twinsun.com>
11221
11222 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11223 (grammar_declaration): Use it.
11224 * src/scan-gram.l: New token %no-default-prec.
11225 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11226 * NEWS, doc/bison.texinfo: Document the above.
11227
11228 2003-10-01 Akim Demaille <akim@epita.fr>
11229
11230 VCG no longer supports long_straight_phase.
11231
11232 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11233 * src/print_graph.c (print_graph): Adjust.
11234
11235 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11236 and Paul Eggert <eggert@twinsun.com>
11237
11238 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11239 Table of Symbols): Document %default-prec.
11240 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11241 (grammar_declaration): Set default_prec on %default-prec.
11242 * src/scan-gram.l (%default-prec): New token.
11243 * src/reader.h (default_prec): New flag.
11244 * src/reader.c: Likewise.
11245 (packgram): Handle it.
11246 * tests/conflicts.at (%default-prec without %prec,
11247 %default-prec with %prec, %default-prec 1): New tests.
11248
11249 2003-09-30 Paul Eggert <eggert@twinsun.com>
11250
11251 * tests/testsuite.at: Include local.at, not input.at, fixing
11252 a typo in the 2003-08-25 patch.
11253
11254 2003-08-27 Akim Demaille <akim@epita.fr>
11255
11256 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11257 GCC warnings.
11258
11259 2003-08-26 Akim Demaille <akim@epita.fr>
11260
11261 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11262 "<\#" to avoid magic from Gnus when posting parts of this script.
11263
11264 2003-08-26 Akim Demaille <akim@epita.fr>
11265
11266 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11267 (Parser::parse): here.
11268 Adjust: nerrs and errstatus is now replaced by...
11269 (Parser::nerrs_, Parser::errstatus_): New.
11270
11271 2003-08-25 Akim Demaille <akim@epita.fr>
11272
11273 * config/announce-gen, Makefile.cfg: New.
11274 * Makefile.am: Adjust.
11275 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11276 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11277
11278 2003-08-25 Akim Demaille <akim@epita.fr>
11279
11280 When reducing initial empty rules, Bison parser read an initial
11281 location that is not defined. This results in garbage, and that
11282 affects Bison's own parser. Therefore we need (i) to extend Bison
11283 to support a means to initialize this location, and (ii) to use
11284 this CVS Bison to fix CVS Bison's parser.
11285
11286 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11287 with...
11288 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11289 * src/parse-gram.y: Adjust.
11290 (%initial-action): New.
11291 (%error-verbose): Since we require CVS Bison, there is no reason
11292 not to use it.
11293 * src/scan-gram.l: Adjust.
11294 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11295 * data/yacc.c (yyparse): Use b4_initial_action.
11296
11297 2003-08-25 Akim Demaille <akim@epita.fr>
11298
11299 * doc/bison.texinfo: Don't promote stdout for error messages.
11300
11301 2003-08-25 Akim Demaille <akim@epita.fr>
11302
11303 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11304 From Alexandre Duret-Lutz.
11305
11306 2003-08-25 Akim Demaille <akim@epita.fr>
11307
11308 Version 1.875c.
11309
11310 2003-08-25 Akim Demaille <akim@epita.fr>
11311
11312 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11313 Use them.
11314
11315 2003-08-25 Akim Demaille <akim@epita.fr>
11316
11317 * data/lalr1.cc (Parser::reduce_print_): New.
11318 Use it.
11319
11320 2003-08-25 Akim Demaille <akim@epita.fr>
11321
11322 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11323 error recovery loops. This patch is based on
11324 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11325 Also, augment the similarity between lalr1.cc and yacc.c.
11326 Note: the locations of error recovery rules are not correct yet.
11327
11328 * data/lalr1.cc: Comment changes to augment the similarity between
11329 lalr1.cc and yacc.c.
11330 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11331 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11332 yyerrlab), when hitting EOF, pop the whole stack here instead of
11333 merely falling thru the default error handling mechanism.
11334 (yyerrorlab): New label, with the old contents of YYERROR,
11335 plus the following change: pop the stack of rhs corresponding
11336 to the production that invoked YYERROR. That is how Yacc
11337 behaves (required by POSIX).
11338 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11339 fail.
11340
11341 2003-08-25 Akim Demaille <akim@epita.fr>
11342
11343 Tune local.at so that people can "autom4te -l autotest calc.at -o
11344 calc" for instance, to extract a sub test suite.
11345
11346 * tests/testsuite.at: Move the initialization, Autotest version
11347 requirement, and AT_TESTED invocation into...
11348 * tests/local.at: here.
11349 * tests/testsuite.at: Include it for compatibility with Autoconf
11350 2.57.
11351 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11352 be ignore.
11353
11354 2003-08-04 Paul Eggert <eggert@twinsun.com>
11355
11356 Rework code slightly to avoid gcc -Wtraditional warnings.
11357 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11358 The returned value is now stored in *YY0. All callers changed.
11359 * src/output.c (merge_output): Adjust to the above change.
11360
11361 2003-07-26 Paul Eggert <eggert@twinsun.com>
11362
11363 * data/glr.c (YYASSERT): New macro.
11364 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11365 yyresolveStates, yyprocessOneStack):
11366 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11367 Derived from a suggestion by Frank Heckenbach.
11368
11369 2003-07-25 Paul Eggert <eggert@twinsun.com>
11370
11371 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11372 for portability to K&R C (after ansi2knr, presumably). See
11373 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11374 by Frank Heckenbach, though I have omitted the structure-initialization
11375 part of his glr-knr.diff patch since I recall that the Portable
11376 C Compiler didn't require that change.
11377
11378 Let the user specify how to allocate and free memory.
11379 Derived from a suggestion by Frank Heckenbach in
11380 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11381 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11382 All uses of free, malloc, realloc changed to use these macros,
11383 and unnecessary casts removed.
11384 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11385
11386 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11387
11388 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11389 use s.empty() rather than s == "" to test for empty string; see
11390 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11391 (trivial change)
11392
11393 2003-06-25 Akim Demaille <akim@epita.fr>
11394
11395 * config/depcomp, config/install-sh: Update from masters.
11396
11397 2003-06-20 Paul Eggert <eggert@twinsun.com>
11398
11399 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11400 and return properly parenthesized result.
11401 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11402 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11403 Remove unnecessary parentheses from uses.
11404 * doc/bison.texinfo (Location Default Action): Describe the
11405 conventions for parentheses.
11406
11407 2003-06-19 Paul Eggert <eggert@twinsun.com>
11408
11409 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11410 yyreportTree): Do not assume that size_t is the same width as int,
11411 when printing sizes. Print sizes using an unsigned format.
11412 Problem reported by Frank Heckenbach in
11413 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11414
11415 Port to Forte Developer 7 C compiler.
11416 * data/glr.c (struct YYLTYPE): If locations are not being used,
11417 declare a single dummy member, as empty structs do not conform
11418 to the C standard.
11419 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11420 the Forte Developer 7 C compiler complains that end-of-loop
11421 code is not reached.
11422
11423 2003-06-17 Paul Eggert <eggert@twinsun.com>
11424
11425 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11426 avoid warnings from picky compilers about redefinition of PARAMS.
11427
11428 2003-06-17 Paul Eggert <eggert@twinsun.com>
11429
11430 Version 1.875b.
11431
11432 * NEWS: Document 1.875b.
11433
11434 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11435 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11436 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11437 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11438 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11439 per recent gettext manual's suggestion.
11440 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11441 Use prototypes, not old-style definitions.
11442 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11443 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11444 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11445 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11446 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11447 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11448 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11449 vbitset_or_and_cmp, vbitset_copy): Likewise.
11450
11451 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11452 Do not include <stdlib.h>.
11453 (PARAMS): Define unconditionally for C89.
11454 (ATTRIBUTE_NORETURN): Remove.
11455 (ATTRIBUTE_UNUSED): Define unconditionally.
11456
11457 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11458 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11459 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11460 * lib/vbitset.c, lib/vbitset.h: New files.
11461 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11462 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11463 from libbitset.
11464
11465 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11466 `How Can I Reset @code{yyparse}', since texinfo does not allow
11467 arbitrary @ in node names.
11468
11469 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11470 shouldn't be needed according to the gettext 0.12.1 documentation
11471 but which seem to be needed anyway: codeset.m4 glibc21.m4
11472 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11473 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11474 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11475
11476 * lib/.cvsignore: Add stdbool.h.
11477 * m4/.cvsignore: Add nls.m4, po.m4.
11478
11479 Upgrade to CVS gnulib.
11480 * stdbool_.h: File renamed from stdbool.h.in.
11481 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11482 AC_HEADER_STDBOOL.
11483 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11484 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11485 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11486 (MOSTLYCLEANFILES): New var.
11487 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11488 (stdbool.h): New rule.
11489 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11490 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11491 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11492 m4/quote.m4: Upgrade to today's gnulib.
11493
11494 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11495 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11496 the tests right now.
11497 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11498 yyerror are declared before use; C99 requires this.
11499
11500 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11501
11502 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11503 first.
11504 (yyrecoverSyntaxError): Correct the logic for setting and testing
11505 yyerrState.
11506 Correct comment on handling EOF.
11507 Allow states with only a default reduction, rather than failing
11508 (I can't quite reconstruct why these were not allowed before).
11509
11510 Fixes to avoid problem that $-N rules in GLR parsers can cause
11511 buffer overruns, corrupting state.
11512
11513 * src/output.c (prepare_rules): Output max_left_semantic_context
11514 definition.
11515 * src/reader.h (max_left_semantic_context): New variable declaration.
11516 * src/scan-gram.l (max_left_semantic_context): Define.
11517 (handle_action_dollar): Update max_left_semantic_context.
11518 * data/glr.c (YYMAXLEFT): New definition.
11519 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11520 (yyresolveAction): Ditto.
11521
11522 Fixes to problems with location handling in GLR parsers reported by
11523 Frank Heckenbach (2003/06/05).
11524
11525 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11526 (YYRHSLOC): Add parentheses, and define only if locations used.
11527 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11528 locations not used.
11529 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11530 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11531
11532 * tests/cxx-type.at: Exercise location information; update tests
11533 to differentiate output with and without locations.
11534 Remove forward declarations of yylex and yyerror---caused errors
11535 because default YYLTYPE not yet defined.
11536 Change semantic actions to compute strings, rather than printing
11537 them directly (to test proper passing of semantics values). Change
11538 output to prefix notation and update test data and expected results.
11539 (yylex): Track locations.
11540 (stmtMerge): Return value rather than printing, and include arguments
11541 in value.
11542
11543 2003-06-03 Paul Eggert <eggert@twinsun.com>
11544
11545 Avoid warnings generated by GCC 2.95.4 when Bison is
11546 configured with --enable-gcc-warnings.
11547 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11548 yy::]b4_parser_class_name[::translate_,
11549 yy::Stack::operator[] (unsigned),
11550 yy::Stack::operator[] (unsigned) const,
11551 yy::Slice::operator[] (unsigned),
11552 yy::Slice::operator[] (unsigned) const):
11553 Rename local vars to avoid warnings.
11554 * tests/glr-regression.at (Improper handling of embedded actions
11555 and $-N in GLR parsers): Remove unused local variable from yylex.
11556 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11557 (void) as arg when not pure, since we now assume C89 when building
11558 Bison. Pacify GCC by using parameter.
11559
11560 2003-06-02 Paul Eggert <eggert@twinsun.com>
11561
11562 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11563 yy::Location::lines, yy::Location::columns): Rename arguments
11564 to avoid shadowing; this removes a warning generated by GCC 3.3.
11565
11566 2003-06-01 Paul Eggert <eggert@twinsun.com>
11567
11568 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11569 to g++, as GCC 3.3 complains if you do it.
11570 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11571 everything that WARNING_CFLAGS has, except omit warnings
11572 not suitable for C++.
11573 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11574 * tests/atlocal.in (CXXFLAGS): New var.
11575 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11576
11577 Fix a GLR parser bug I reported in February; see
11578 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11579 The problem was that GLR parsers did not conform to the C standard,
11580 because actions like { $1 = $2 + $3; } expanded to expressions
11581 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11582 to a local variable. The C standard says that expressions
11583 like (var = f ()) + (var = f ()) have undefined behavior.
11584 Another problem was that GCC sometimes issues warnings that
11585 yyfill and its parameters are unused.
11586
11587 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11588 as possibly unused.
11589 (yyfill): New function.
11590 (YYFILL): Use it.
11591 (yyuserAction): Change type of yynormal to bool, so that it matches
11592 the new yyfill signature. Mark it as possibly unused.
11593
11594
11595 Follow up on a bug I reported in February, where a Bison-generated
11596 parser can loop. Provide a test case and a fix for yacc.c. I
11597 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11598 The original bug report is in:
11599 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11600
11601 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11602 macro's size was becoming unwieldy.
11603 (yyerrlab): Do not discard an empty lookahead symbol, as this
11604 might destroy garbage.
11605 (yyerrorlab): New label, with the old contents of YYERROR,
11606 plus the following change: pop the stack of rhs corresponding
11607 to the production that invoked YYERROR. That is how Yacc
11608 behaves, and POSIX requires this behavior.
11609 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11610 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11611 Define 'alarm' to do nothing if unistd.h is not available.
11612 Add a new rule "exp: '-' error;" to test the above change to
11613 data/yacc.c. Use 'alarm' to abort any test taking longer than
11614 10 seconds, as it's probably looping.
11615 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11616 Also, the new yacc.c generates two fewer diagnostics for an
11617 existing test.
11618
11619 2003-05-24 Paul Eggert <eggert@twinsun.com>
11620
11621 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11622 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11623 This fixes a problem reported by John Bowman when the Compaq/HP
11624 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11625 -ansi -Wall -gall).
11626 * data/yacc.c (union yyalloc): Likewise.
11627 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11628
11629 Switch from 'int' to 'bool' where that makes sense.
11630
11631 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11632 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11633 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11634 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11635 Return or accept bool, not int. All callers changed.
11636 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11637 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11638 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11639 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11640 bitset_or_and_cmp_): Likewise.
11641 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11642 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11643 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11644 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11645 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11646 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11647 bitset_stats_or_and_cmp): Likewise.
11648 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11649 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11650 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11651 ebitset_xor_cmp): Likewise.
11652 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11653 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11654 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11655 lbitset_xor_cmp): Likewise.
11656 * lib/bbitset.h: Include <stdbool.h>.
11657 (struct bitset_vtable): The following members now return bool, not
11658 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11659 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11660 or_and_cmp).
11661 * src/conflicts.c (count_rr_conflicts): Likewise.
11662 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11663 All uses changed.
11664 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11665 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11666 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11667 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11668 graph_flag): Likewise.
11669 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11670 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11671 graph_flag): Likewise.
11672 * src/output.c (error_verbose): Likewise.
11673 * src/output.h (error_verbose): Likewise.
11674 * src/reader.c (start_flag, typed): Likewise.
11675 * src/reader.h (typed): Likewise.
11676 * src/getargs.c (LOCATIONS_OPTION): New constant.
11677 (long_options, getargs): Use it.
11678 * src/lalr.c (build_relations): Use bool, not int.
11679 * src/nullable.c (nullable_compute): Likewise.
11680 * src/print.c (print_reductions): Likewise.
11681 * src/tables.c (action_row, pack_vector): Likewise.
11682 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11683 * src/output.c (prepare): Use it.
11684 * src/output.c (token_definitions_output,
11685 symbol_destructors_output, symbol_destructors_output): Use string,
11686 not boolean integer, to keep track of whether to output separator.
11687 * src/print_graph.c (print_core): Likewise.
11688 * src/state.c (state_rule_lookaheads_print): Likewise.
11689
11690 * config/install-sh: Sync from automake 1.7.5.
11691
11692 2003-05-14 Paul Eggert <eggert@twinsun.com>
11693
11694 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11695 semicolon after a grammar declaration, in the interest of possible
11696 future changes to the Bison input language.
11697 Do not allow a stray semicolon at the start of the grammar.
11698 (rhses.1): Allow one or more semicolons after any rule, including
11699 just before "|" as required by POSIX.
11700 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11701 grammar.
11702
11703 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11704
11705 %parse-param support for lalr1.cc.
11706
11707 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11708 b4_cc_constructor_calls, b4_cc_constructor_call,
11709 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11710 definitions.
11711 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11712 parse-param arguments.
11713 (yy::b4_parser_class_name): Declare instance variables to
11714 hold parse-param arguments.
11715 * tests/calc.at: s/value/semantic_value/ because value clashes
11716 with a member of yy::b4_parser_class_name. Adjust C++ code
11717 to handle %parse-param. Enable %parse-param test in C++.
11718
11719 2003-05-12 Paul Eggert <eggert@twinsun.com>
11720
11721 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11722 English a bit. Fix fclose typo. Change "const char" to "char
11723 const", and use ANSI C rather than K&R for "main". Suggest
11724 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11725 and suggest yy_switch_to_buffer.
11726
11727 2003-05-05 Paul Eggert <eggert@twinsun.com>
11728
11729 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11730 C89. This avoids a diagnostic on compilers that define __STDC__
11731 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
11732 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11733
11734 2003-05-03 Paul Eggert <eggert@twinsun.com>
11735
11736 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11737 Do not overrun array bounds.
11738 This should fix a bug reported today by Olatunji Oluwabukunmi in
11739 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
11740
11741 2003-04-29 Akim Demaille <akim@epita.fr>
11742
11743 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11744 * src/getargs.c, src/getargs.h: here, as bool, not int.
11745 (nondeterministic_parser): New.
11746 * src/parse-gram.y, src/scan-gram.l: Support
11747 %nondeterministic-parser.
11748 * src/output.c (prepare): Use nondeterministic_parser instead
11749 of glr_parser where appropriate.
11750 * src/tables.c (conflict_row, action_row, save_row)
11751 (token_actions, token_actions, pack_vector): Ditto.
11752
11753 2003-04-29 Akim Demaille <akim@epita.fr>
11754
11755 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11756
11757 2003-04-29 Akim Demaille <akim@epita.fr>
11758
11759 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11760 with %pure-parser and %locations to exercise the patch from Yakov
11761 Markovitch below.
11762
11763 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11764
11765 * data/yacc.c: (b4_lex_param): Corrected for the case where
11766 %lex-param is provided and %pure-parser isn't.
11767
11768 2003-04-27 Paul Eggert <eggert@twinsun.com>
11769
11770 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
11771 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
11772 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11773 if it is not defined.
11774 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11775
11776 2003-04-26 Paul Eggert <eggert@twinsun.com>
11777
11778 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11779 Declare to be of type suitable for the ninf value itself, not of
11780 type suitable for the corresponding table, since the latter might
11781 be unsigned but the ninf value might be negative. This fixes a
11782 bug reported by Alexandre Duret-Lutz in
11783 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
11784
11785 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11786 invokes it. We shouldn't invoke it twice because it will attempt
11787 to put error.o in the archive twice. This fixes a glitch reported
11788 by Martin Mokrejs in
11789 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11790
11791 2003-04-21 Paul Eggert <eggert@twinsun.com>
11792
11793 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11794 to gnulib.
11795
11796 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11797
11798 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11799 Fix obvious typo that results in uncompilable GLR parsers
11800 when both %pure-parser and %locations are used. (trivial change)
11801
11802 2003-04-17 Paul Eggert <eggert@twinsun.com>
11803
11804 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11805 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11806 Do not insert the expected token via unput, as this runs afoul
11807 of a POSIX-compatibility bug in flex 2.5.31.
11808 All uses changed to BEGIN the parent state,
11809 since we no longer insert the expected token via unput.
11810 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11811 that is no longer emitted after the above change.
11812
11813 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11814 the first one. This change is from Paul Hilfinger, and it fixes
11815 regression reported by Werner Lemberg in
11816 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
11817
11818 (resolve_sr_conflict): Don't invoke state_errs_set
11819 unless one or more tokens have been explicitly made errors.
11820 Otherwise, the above change causes Bison to abort.
11821
11822 * tests/existing.at (GNU pic Grammar): New test case, taken from
11823 Lemberg's email.
11824
11825 2003-03-31 Akim Demaille <akim@epita.fr>
11826
11827 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11828
11829 2003-03-31 Akim Demaille <akim@epita.fr>
11830
11831 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11832 output.
11833
11834 2003-03-31 Akim Demaille <akim@epita.fr>
11835
11836 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11837 From Paul Hilfinger.
11838
11839 2003-03-29 Akim Demaille <akim@epita.fr>
11840
11841 * m4/error.m4: Do not put under dynamic conditions some code which
11842 expansion is under static control.
11843
11844 2003-03-29 Akim Demaille <akim@epita.fr>
11845
11846 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11847
11848 2003-03-29 Akim Demaille <akim@epita.fr>
11849
11850 * doc/bison.texinfo (Strings are Destroyed): New.
11851
11852 2003-03-13 Paul Eggert <eggert@twinsun.com>
11853
11854 * .cvsignore: Add configure.lineno.
11855 * src/.cvsignore: Add yacc.
11856 * tests/.cvsignore: Add testsuite.log.
11857 * doc/fdl.texi: Sync with latest FSF version.
11858
11859 2003-03-12 Paul Eggert <eggert@twinsun.com>
11860
11861 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11862 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11863 cursor, instead of leaving it undefined. This fixes a bug
11864 reported by Tim Van Holder in
11865 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11866 * tests/input.at (Torturing the Scanner): Test the scanner on
11867 an empty input file, which was Tim Van Holder's test case.
11868
11869 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11870 <sys/resource.h> can be included, include sys/time.h and
11871 sys/times.h first, if available. This works around the SunOS
11872 4.1.4 porting bug reported by Bruce Becker in
11873 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
11874
11875 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11876 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11877 AC_HEADER_SYS_WAIT.
11878
11879 Merge changes from gnulib. This was prompted because the CVS
11880 snapshot didn't build on Solaris 7 due to strnlen problems.
11881
11882 These changes need to be merged back into gnulib:
11883 * lib/hash.c: Include <stdbool.h> unconditionally.
11884 * m4/onceonly.m4 (m4_quote): New macro.
11885 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11886 Quote AC_FOREACH variable-expansions properly.
11887 The 2003-01-03 obstack.h change also needs merging.
11888 {end of changes requiring merging}
11889
11890 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11891 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11892 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11893 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11894 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11895 New files, imported from gnulib.
11896 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11897 above.
11898
11899 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11900 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11901 gnulib sources.
11902
11903 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11904 Add.
11905 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11906 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11907 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11908 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11909 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11910 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11911 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11912 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11913 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11914 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11915 (jm_PREREQ_ARGMATCH): Remove.
11916 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11917 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11918
11919 * src/system.h: Include <stdbool.h> unconditionally.
11920
11921 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11922 assuming at least C89 in the bitset code for some time now.
11923
11924 2003-03-03 Akim Demaille <akim@epita.fr>
11925
11926 * ro.po: New.
11927
11928 2003-03-02 Akim Demaille <akim@epita.fr>
11929
11930 * doc/bison.texinfo (Table of Symbols): Reactivate the
11931 documentation for %lex-param, and %parse-param.
11932
11933 2003-03-02 Akim Demaille <akim@epita.fr>
11934
11935 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11936 generate verbose error messages.
11937 Use the number of tokens as an upper bound in yytname, as it
11938 cannot be a non terminal.
11939
11940 2003-03-02 Akim Demaille <akim@epita.fr>
11941
11942 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11943 message.
11944
11945 2003-03-02 Akim Demaille <akim@epita.fr>
11946
11947 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11948 Use them to exercise yycheck overrun.
11949 Based on Andrew Suffield's grammar.
11950
11951 2003-03-02 Akim Demaille <akim@epita.fr>
11952
11953 Create tests/local.at for Bison generic testing macros.
11954
11955 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11956 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11957 This new file.
11958 * tests/calc.at (AT_CHECK_CALC): Adjust.
11959 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11960 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11961 * tests/local.at: here.
11962 (AT_COMPILE_CXX): Tags the tests using it as c++.
11963 Ignore the test if CXX is not functional.
11964
11965 2003-03-01 Paul Eggert <eggert@twinsun.com>
11966
11967 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11968 not loc->end, since loc->end might contain garbage and this leads
11969 to undefined behavior on some platforms.
11970 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11971 depend on *loc, so that the reader doesn't give the the false
11972 impression that *loc is initialized.
11973 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11974 does not survive the return.
11975
11976 2003-03-01 Akim Demaille <akim@epita.fr>
11977
11978 * src/scan-gram.l (code_start): Always initialize it when entering
11979 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11980 yylex invocation. An alternative would be making it static, but
11981 then it starts with the second %%'s beginning, instead of its end.
11982
11983 2003-02-28 Paul Eggert <eggert@twinsun.com>
11984
11985 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11986 around a UnixWare 7.1.1 porting bug reported by John Hughes in
11987 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
11988
11989 2003-02-26 Paul Eggert <eggert@twinsun.com>
11990
11991 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11992 Remove Sequent/Pyramid discussion (nobody uses them any more).
11993 Merge VMS and MS-DOS discussion; these ports may well be dead
11994 but let's keep mentioning them for now. Put <> around email
11995 addresses. Add copyright notice.
11996
11997 2003-02-24 Paul Eggert <eggert@twinsun.com>
11998
11999 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12000 to avoid collision with flex use of yylineno.
12001 Problem reported by Bruce Lilly in
12002 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12003 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12004 * data/yacc.c (yy_reduce_print): Likewise.
12005
12006 * config/depcomp: Sync with Automake 1.7.3.
12007
12008 2003-02-21 Akim Demaille <akim@epita.fr>
12009
12010 * data/lalr1.cc: Use temporary variables instead of casts to
12011 change integer types.
12012 Suggested by Paul Eggert.
12013
12014 2003-02-21 Akim Demaille <akim@epita.fr>
12015
12016 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12017 to avoid confusions with lalr1.cc's notion of Position.
12018 Suggested by Paul Eggert.
12019
12020 2003-02-20 Akim Demaille <akim@epita.fr>
12021
12022 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12023 before initial_columns.
12024 (location.hh): Use consistent variable names when defining the
12025 operator<<.
12026 Use "last" so that we subtract from Positions, not from unsigned.
12027
12028 2003-02-20 Akim Demaille <akim@epita.fr>
12029
12030 * data/lalr1.cc (position.hh): New subfile, including the extended
12031 and Doxygen'ed documentation of class Position.
12032 (location.hh): Use it.
12033 Document a` la Doxygen.
12034 With the help of Benoit Perrot.
12035
12036 2003-02-20 Akim Demaille <akim@epita.fr>
12037
12038 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12039 AT_YACC_IF.
12040 Redefine AT_YYERROR_SEES_LOC_IF using it.
12041 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12042 not defined.
12043 Don't use the location in yy::Parser::error_ and
12044 yy::Parser::print_ when not %locations.
12045 Activate more lalr1.cc tests.
12046
12047 2003-02-19 Akim Demaille <akim@epita.fr>
12048
12049 * data/lalr1.cc: When displaying a line number, be sure to make it
12050 an int.
12051
12052 2003-02-19 Akim Demaille <akim@epita.fr>
12053
12054 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12055 Remove, useless.
12056 (YYABORT, YYACCEPT, YYERROR): New.
12057 * tests/calc.at: Renable the lalr1.cc test.
12058
12059 2003-02-19 Akim Demaille <akim@epita.fr>
12060
12061 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12062 error recovery, mixing with/without pops and discarding of the
12063 lookahead.
12064 Exercise YYERROR.
12065 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12066
12067 2003-02-17 Paul Eggert <eggert@twinsun.com>
12068
12069 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12070 * tests/testsuite.at (AT_COMPILE): Use them.
12071 This fixes the testsuite problem reported by Robert Lentz in
12072 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12073
12074 2003-02-12 Paul Eggert <eggert@twinsun.com>
12075
12076 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12077 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12078 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12079 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12080 Check for malloc failure, for consistency with yacc.c.
12081 (yytname_size): Remove, for consistency with yacc.c.
12082
12083 The bug still remains in data/lalr1.cc, as I didn't have time
12084 to fix it there.
12085
12086 2003-02-06 Akim Demaille <akim@epita.fr>
12087
12088 * configure.ac (GXX): Rename as...
12089 (CXX): this, to keep the original Autoconf semantics.
12090 Require 2.57.
12091 * data/lalr1.cc: Fix b4_copyright invocations.
12092 If YYDEBUG is not defined, don't depend upon name_ being defined.
12093 (location.hh): Include string and iostream.
12094 (Position::filename): New member.
12095 (Position::Position ()): New.
12096 (operator<< (Position)): New.
12097 (operator- (Position, int)): New.
12098 (Location::first, Location::last): Rename as...
12099 (Location::begin, Location::end): these, to mock the conventional
12100 iterator names.
12101 (operator<< (Location)): New.
12102 * tests/atlocal.in (CXX): New.
12103 * tests/testsuite.at (AT_COMPILE_CXX): New.
12104 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12105 locations in a more synthetic way.
12106 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12107 lalr1.cc is used.
12108 Adjust the C locations to match those from Emacs: first column is
12109 column 0.
12110 Change all the expected results.
12111 Conform to the GCS: simplify the locations when applicable.
12112 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12113 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12114 these CPP macros with the m4 macros new defined by...
12115 (AT_CHECK_PUSHDEFS): this, i.e.:
12116 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12117 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12118 New macros.
12119 (AT_CHECK_POPDEFS): Undefine them.
12120 (AT_CHECK_CALC_LALR1_CC): New.
12121 Use it for the first lalr1.cc test.
12122
12123 2003-02-04 Akim Demaille <akim@epita.fr>
12124
12125 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12126 Location as is defined.
12127
12128 2003-02-04 Akim Demaille <akim@epita.fr>
12129
12130 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12131 name_ being defined.
12132
12133 2003-02-03 Paul Eggert <eggert@twinsun.com>
12134
12135 * src/gram.h (start_symbol): Remove unused decl.
12136
12137 Use more-consistent naming conventions for local vars.
12138
12139 * src/derives.c (derives_compute): Change type of local var from
12140 int to rule_number.
12141 * src/gram.c (grammar_rules_partial_print): Likewise.
12142 * src/print.c (print_core): Likewise.
12143 * src/reduce.c (reduce_grammar_tables): Likewise.
12144
12145 * src/gram.c (grammar_dump): Change name of item_number *
12146 local var from r to rp.
12147 * src/nullable.c (nullable_compute): Likewise.
12148
12149 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12150
12151 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12152 for symbol or symbol_number var.
12153 * src/reader.c (grammar_start_symbol_set): Likewise.
12154 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12155 Likewise.
12156 * src/state.c (transitions_to): Likewise.
12157 * src/state.h: Likewise.
12158 * src/tables.c (symbol_number_to_vector_number): Likewise.
12159
12160 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12161 char * var.
12162
12163 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12164 var.
12165
12166 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12167 var.
12168
12169 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12170 Use str, not s, for char * var. Use ch, not c, for character var.
12171 Use size for size var.
12172
12173 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12174 char * var.
12175 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12176 uniqstr var.
12177 * src/uniqstr.h: Likewise.
12178
12179 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12180 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12181 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12182 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12183 param to have same name as that of enum, so that we don't use
12184 "s" to stand for a non-state.
12185
12186 2003-02-02 Akim Demaille <akim@epita.fr>
12187
12188 * src/scan-skel.l: Scan more than one inert character per yylex
12189 invocation.
12190
12191 2003-02-01 Paul Eggert <eggert@twinsun.com>
12192
12193 Version 1.875a.
12194
12195 * po/LINGUAS: Add ms.
12196
12197 2003-01-30 Akim Demaille <akim@epita.fr>
12198
12199 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12200
12201 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12202
12203 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12204 of $1.
12205
12206 Changes in response to error report by S. Eken: GLR mode does not
12207 handle negative $ indices or $ indices in embedded rules correctly.
12208 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12209
12210 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12211 (b4_rhs_location): Ditto.
12212 (yyfill): New function to copy from stack tree into array
12213 incrementally.
12214 (yyuserAction): Modify to allow incremental move of semantic values
12215 to rhs array when in GLR mode.
12216 Define YYFILL to use in user-defined actions to fill semantic array
12217 as needed.
12218 Remove dummy use of yystack, as there is now a guaranteed use.
12219 (yydoAction): Modify to allow incremental move of semantic values
12220 to rhs array when in GLR mode.
12221 (yyresolveAction): Ditto.
12222 (yyglrShiftDefer): Update comment.
12223 (yyresolveStates): Use X == NULL for pointers, not !X.
12224 (yyglrReduce): Ditto.
12225 (yydoAction): Ditto
12226
12227 * tests/glr-regr1.at: Rename to ...
12228 * tests/glr-regression.at: Add new regression test for the problems
12229 described above (adapted from S. Eken).
12230 Update copyright notice.
12231 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12232 * tests/Makefile.am: Ditto.
12233
12234 2003-01-28 Paul Eggert <eggert@twinsun.com>
12235
12236 * data/lalr1.cc: Do not use @output_header_name@ unless
12237 b4_defines_flag is set. This fixes two bugs reported by
12238 Tim Van Holder in
12239 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12240 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12241
12242 2003-01-21 Paul Eggert <eggert@twinsun.com>
12243
12244 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12245 we don't need to worry about yyerrlab1 being reported as an
12246 "unused label" by non-GCC C compilers. The downside is that if
12247 locations are used then a couple of statements are duplicated each
12248 time YYERROR is invoked, but the upside is that the warnings
12249 should vanish.
12250 (yyerrlab1): Move code to YERROR.
12251 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12252 This reverts some of the 2002-12-27 change.
12253
12254 2003-01-17 Paul Eggert <eggert@twinsun.com>
12255
12256 * src/output.c (symbol_printers_output): Fix typo that led
12257 to core dump. Problem reported by Antonio Rus in
12258 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12259
12260 2003-01-13 Akim Demaille <akim@epita.fr>,
12261 Quoc Peyrot <chojin@lrde.epita.fr>,
12262 Robert Anisko <anisko_r@lrde.epita.fr>
12263
12264 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12265 when the stacks contain one element, as the loop would otherwise
12266 free the last state, and then use the top state (the one we just
12267 popped). This means that the initial elements will not be freed
12268 explicitly, as is the case in yacc.c; it is not a problem, as
12269 these elements have fake values.
12270
12271 2003-01-11 Paul Eggert <eggert@twinsun.com>
12272
12273 * NEWS: %expect-violations are now just warnings, reverting
12274 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12275 bootstrapping problem reported by Matthias Klose; see
12276 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12277 * src/conflicts.c (conflicts_print): Likewise.
12278 * tests/conflicts.at (%expect not enough, %expect too much,
12279 %expect with reduce conflicts): Likewise.
12280 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12281 that the warning is enabled if the number of conflicts changes
12282 (not necessarily increases).
12283
12284 * src/getargs.c (version): Update copyright year.
12285
12286 2003-01-09 Akim Demaille <akim@epita.fr>
12287
12288 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12289
12290 2003-01-08 Paul Eggert <eggert@twinsun.com>
12291
12292 * Makefile.maint (WGETFLAGS):
12293 New macro, containing "-C off" to disable proxy caches.
12294 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12295 (rel-check): Use $(WGET) instead of wget.
12296
12297 2003-01-06 Paul Eggert <eggert@twinsun.com>
12298
12299 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12300 the GLR paper of Scott, Johnstone and Hussain.
12301
12302 2003-01-04 Paul Eggert <eggert@twinsun.com>
12303
12304 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12305 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12306 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12307 (EXTRA_LIBRARIES): New var, for liby.a.
12308 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12309 (EXTRA_SCRIPTS): New var, for yacc.
12310
12311 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12312 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12313 Problem reported by Nelson H. F. Beebe.
12314
12315 2003-01-03 Paul Eggert <eggert@twinsun.com>
12316
12317 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12318 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12319 when compiling Bison 1.875's `bitset bset = obstack_alloc
12320 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12321
12322 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12323 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12324 grow to a huge size with typical invocation.
12325
12326 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12327 Use the pattern recommended by Autoconf 2.57, except also protect
12328 against double-definition.
12329 * src/system.h: Likewise.
12330 Portability issues reported by Nelson H. F. Beebe.
12331
12332 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12333 All uses changed. Provide a definition in both C and C++.
12334 (yytrue, yyfalse): Define even if defined (__cplusplus).
12335
12336 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12337 Reported by Nelson H. F. Beebe.
12338
12339 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12340
12341 2003-01-02 Paul Eggert <eggert@twinsun.com>
12342
12343 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12344 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12345 Bug reported by Nelson H. F. Beebe.
12346
12347 2003-01-01 Paul Eggert <eggert@twinsun.com>
12348
12349 * Version 1.875.
12350
12351 2002-12-30 Paul Eggert <eggert@twinsun.com>
12352
12353 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12354 Moved here from...
12355 (<INITIAL>","): Here. This causes stray "," to be treated
12356 more uniformly.
12357
12358 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12359 last brace in braced code when not in Yacc mode, for compatibility
12360 with Bison 1.35. This resurrects the 2001-12-15 patch to
12361 src/reader.c.
12362
12363 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12364 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12365
12366 2002-12-28 Paul Eggert <eggert@twinsun.com>
12367
12368 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12369 that of SYM's type. This fixes Debian bug 168069, reported by
12370 Thomas Olsson.
12371
12372 2002-12-28 Paul Eggert <eggert@twinsun.com>
12373
12374 Version 1.75f.
12375
12376 Switch back to the Yacc style of conflict reports, undoing some
12377 of the 2002-07-30 change.
12378 * doc/bison.texinfo (Understanding): Use Yacc style for
12379 conflict reports. Also, use new way of locating rules.
12380 * src/conflicts.c (conflict_report):
12381 Renamed from conflict_report_yacc, removing the old
12382 'conflict_report'. Translate the entire conflict report at once,
12383 so that we don't assume that "," has the same interpretation in
12384 all languages.
12385 (conflicts_output): Use Yacc-style conflict report for each state,
12386 instead of our more-complicated style.
12387 (conflicts_print): Use Yacc-style conflict report, except print
12388 the input file name when not emulating Yacc.
12389 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12390 Conflicted Reduction, %expect not enough, %expect too much,
12391 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12392 * tests/existing.at (GNU Cim Grammar): Likewise.
12393 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12394
12395 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12396 fatal): Don't invoke fflush; it's not needed and it might even be
12397 harmful for stdout, as stdout might not be open.
12398 * src/reduce.c (reduce_print): Likewise.
12399
12400 2002-12-27 Paul Eggert <eggert@twinsun.com>
12401
12402 Fix a bug where error locations were not being recorded correctly.
12403 This problem was originally reported by Paul Hilfinger in
12404 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12405
12406 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12407 top of the location stack's error locations.
12408 (yyerrlab): Set it. When discarding a token, push its location
12409 onto yylerrsp so that we don't lose track of the error's end.
12410 (yyerrlab1): Now is only the target of YYERROR, so that we can
12411 properly record the location of the action that failed. For GCC
12412 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12413 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12414 (yyerrlab2): New label, which yyerrlab now falls through to.
12415 Compute the error's location by applying YYLLOC_DEFAULT to
12416 the locations of all the symbols that went into the error.
12417 * doc/bison.texinfo (Location Default Action): Mention that
12418 YYLLOC_DEFAULT is also invoked for syntax errors.
12419 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12420 Error locations include the locations of all the tokens that were
12421 discarded, not just the last token.
12422
12423 2002-12-26 Paul Eggert <eggert@twinsun.com>
12424
12425 * src/files.c: Include quote.h.
12426 (compute_output_file_names): Warn if we detect conflicting
12427 outputs to the same file. This should catch the misunderstanding
12428 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12429
12430 * src/conflicts.c (conflicts_print): If the user specifies
12431 "%expect N", report an error if there are any reduce/reduce
12432 conflicts. This is what the manual says should happen.
12433 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12434 * tests/conflicts.at (%expect with reduce conflicts): New test.
12435
12436 Don't use m4_include on relative file names, as it doesn't work as
12437 desired if there happens to be a file with that name under ".".
12438
12439 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12440 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12441 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12442 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12443 * src/output.c (output_skeleton): Use full path names when
12444 specifying a file to include; don't rely on include path, as
12445 it's unreliable when the working file contains a file with
12446 that name.
12447
12448 2002-12-25 Paul Eggert <eggert@twinsun.com>
12449
12450 Remove obsolete references to bison.simple and bison.hairy.
12451 Problem mentioned by Aubin Mahe in
12452 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12453 * data/glr.c: Comment fix.
12454 * doc/bison.1: Remove references. Also, mention "yacc".
12455
12456 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12457 with -g option.
12458
12459 * src/parse-gram.y (declaration): Use enum "report_states" rather
12460 than its numeric value 1.
12461
12462 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12463 opening a new one. This fixes Debian bug 165349, reported by
12464 Bruce Stephens.
12465
12466 2002-12-24 Paul Eggert <eggert@twinsun.com>
12467
12468 Version 1.75e.
12469
12470 * Makefile.maint (cvs-update): Don't assume that the shell
12471 supports $(...), as Solaris sh doesn't.
12472
12473 * src/parse-gram.y (lloc_default): Remove test for empty
12474 nonterminals at the end, since it didn't change the result.
12475
12476 2002-12-24 Paul Eggert <eggert@twinsun.com>
12477
12478 If the user does not define YYSTYPE as a macro, Bison now declares it
12479 using typedef instead of defining it as a macro. POSIX requires this.
12480 For consistency, YYLTYPE is also declared instead of defined.
12481
12482 %union directives can now have a tag before the `{', e.g., the
12483 directive `%union foo {...}' now generates the C code
12484 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12485 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12486 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12487 instead of `yyltype'.
12488
12489 `yystype' and `yyltype' are now obsolescent macros instead of being
12490 typedefs or tags; they are no longer documented and will be
12491 withdrawn in a future release.
12492
12493 * data/glr.c (b4_location_type): Remove.
12494 (YYSTYPE): Renamed from yystype.
12495 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12496 (struct YYLTYPE): Renamed from struct yyltype.
12497 (YYLTYPE): Renamed from yyltype.
12498 (yyltype, yystype): New (and obsolescent) macros,
12499 for backward compatibility.
12500 * data/yacc.c: Likewise.
12501
12502 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12503 does not specify a union tag. This is for compatibility with
12504 Solaris 9 yacc.
12505
12506 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12507 const *, since it is now modified by stripping surrounding { }.
12508 (current_braced_code): Remove.
12509 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12510 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12511 trailing " {...}". Now of type <chars>.
12512 (grammar_declaration): Adjust to bundled tokens.
12513 (code_content): Remove; stripping is now done by add_param.
12514 (print_token_value): Print contents of bundled tokens.
12515 (token_name): New function.
12516
12517 * src/reader.h (braced_code, current_braced_code): Remove.
12518 (token_name): New decl.
12519
12520 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12521 token_type, not braced_code code_kind. All uses changed.
12522 (SC_PRE_CODE): New state, for scanning after a keyword that
12523 has (or usually has) an immediately-following braced code.
12524 (token_type): New local var, to keep track of which token type
12525 to return when scanning braced code.
12526 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12527 <INITIAL>"%parse-param", <INITIAL>"%printer",
12528 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12529 instead of returning a token type immediately.
12530 (<INITIAL>"{"): Set token type.
12531 (<SC_BRACED_CODE>"}"): Use it.
12532 (handle_action_dollar, handle_action_at): Now returns bool
12533 indicating success. Fail if ! current_rule; this prevents a core dump.
12534 (handle_symbol_code_dollar, handle_symbol_code_at):
12535 Remove; merge body into caller.
12536 (handle_dollar, handle_at): Complain in invalid contexts.
12537
12538 * NEWS, doc/bison.texinfo: Document the above.
12539 * NEWS: Fix years and program names in copyright notice.
12540
12541 2002-12-17 Paul Eggert <eggert@twinsun.com>
12542
12543 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12544 Reporting, Table of Symbols): Omit mentions of %lex-param and
12545 %parse-param from the documentation for now.
12546
12547 2002-12-15 Paul Eggert <eggert@twinsun.com>
12548
12549 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12550 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12551 lookahead symbol, and which sets yychar in parser actions) and it
12552 disagreed with the Bison documentation. Bug
12553 reported by Andrew Walrond.
12554
12555 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12556 as the caller now does that.
12557 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12558 (YYEMPTY): Parenthesize right hand side, since others use it.
12559 (yyparse): Don't assume that our generated code is the only code
12560 that sets yychar.
12561
12562 2002-12-13 Paul Eggert <eggert@twinsun.com>
12563
12564 Version 1.75d.
12565
12566 POSIX requires a "yacc" command.
12567 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12568 (MOSTLYCLEANFILES): Add yacc.
12569 (yacc): New rule.
12570 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12571 as an alias for bison y.
12572
12573 * po/LINGUAS: Add da.
12574
12575 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12576 problem with latest <getopt.h>.
12577 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12578
12579 * doc/fdl.texi: Upgrade to 1.2.
12580 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12581 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12582 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12583 gnulib.
12584 * config/install-sh: Sync with autotools.
12585
12586 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12587 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12588 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12589 locations are requested.
12590 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12591 locations are requested.
12592
12593 2002-12-12 Paul Eggert <eggert@twinsun.com>
12594
12595 Remove unportable casts and storage allocation tricks.
12596 While we're at it, remove almost all casts, since they
12597 usually aren't needed and are a sign of trouble.
12598
12599 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12600
12601 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12602 the pointer DSET returned by malloc; this isn't portable.
12603 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12604 Similarly for DERIVES.
12605 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12606 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12607 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12608
12609 * src/derives.c (derives_compute): Do not bother invoking
12610 int_of_rule_number, since rule numbers are integers.
12611
12612 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12613 rather than XMALLOC (char, N).
12614
12615 * src/files.c (filename_split): Rewrite to avoid cast.
12616
12617 * src/gram.h (symbol_number_as_item_number,
12618 item_number_as_symbol_number, rule_number_as_item_number,
12619 item_number_as_rule_number):
12620 Now inline functions rather than macros, to avoid casts.
12621 * src/state.h (state_number_as_int): Likewise.
12622 * src/tables.c (state_number_to_vector_number,
12623 symbol_number_to_vector_number): Likewise.
12624
12625 * src/gram.h (int_of_rule_number): Remove; no longer used.
12626
12627 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12628 since the resulting storage is always stored into.
12629
12630 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12631 where it's needed.
12632
12633 * src/muscle_tab.c (muscle_m4_output):
12634 Now inline. Return bool, not int.
12635 * src/state.c (state_compare): Likewise.
12636 * src/symtab.c (symbol_check_defined,
12637 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12638 hash_compare_symbol, hash_symbol):
12639 Likewise.
12640 * src/uniqstr.c (uniqstr_print): Likewise.
12641 * src/muscle_tab.c (muscle_m4_output_processor):
12642 New function, to avoid casts.
12643 * src/state.c (state_comparator, stage_hasher): Likewise.
12644 * src/symtab.c (symbol_check_defined_processor,
12645 symbol_check_alias_consistency_processor, symbol_pack_processor,
12646 symbol_translation_processor, hash_symbol_comparator,
12647 hash_symbol_hasher): Likewise.
12648 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12649 * src/muscle_tab.c (muscles_m4_output):
12650 Use new functions instead of casting old functions unportably.
12651 * src/state.c (state_hash_new): Likewise.
12652 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12653 symbols_token_translations_init):
12654 Likewise.
12655 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12656
12657 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12658 var instead of casting to long, to avoid casts.
12659 (prepare_states): Use MALLOC rather than alloca, so that we don't
12660 have to worry about alloca.
12661 * src/state.c (state_hash_lookup): Likewise.
12662
12663 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12664 local var instead of casting to unsigned char, to avoid casts.
12665
12666 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12667 STATE_ALLOC): Remove.
12668 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12669 rather than calloc, and use offsetof to avoid allocating slightly
12670 too much storage.
12671 (state_new): Initialize all members.
12672
12673 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12674
12675 * src/symtab.c (symbol_free): Remove; unused.
12676 (symbol_get): Remove cast in lhs of assignment.
12677 (symbols_do): Now static. Accept generic arguments, not
12678 hashing-related ones.
12679
12680 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12681 (symbol_processor): Remove.
12682 (symbols_do): Remove decl; now static.
12683
12684 * src/system.h (alloca): Remove; decl no longer needed.
12685 (<stddef.h>): Include, for offsetof.
12686 (<inttypes.>, <stdint.h>): Include if available.
12687 (uintptr_t): New type, if system lacks it.
12688 (CALLOC, MALLOC, REALLOC): New macros.
12689 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12690 new macros.
12691
12692 * src/tables.c (table_size): Now int, to pacify GCC.
12693 (table_grow, table_ninf_remap): Use signed table size.
12694 (save_row): Don't bother initializing locals when not needed.
12695 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12696 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12697
12698 * src/vcg.h: Correct misspellings.
12699
12700 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12701
12702
12703 * src/getargs.c (getargs): Don't assume EOF == -1.
12704
12705 2002-12-09 Paul Eggert <eggert@twinsun.com>
12706
12707 Change identifier spellings to avoid collisions with names
12708 that are reserved by POSIX.
12709
12710 Don't use names ending in _t, since POSIX reserves them.
12711 For consistency, remove _e and _s endings -- they're weren't
12712 needed to remove ambiguity. All uses changed.
12713 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12714 turn was just renamed from struniq_t.
12715 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12716 which in turn was just renamed from struniq_processor_t.
12717 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12718 in turn was renamed from hash_compare_struniq_t.
12719 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12720 (state_list): Renamed from state_list_t.
12721 * src/assoc.h (assoc): Renamed from assoc_t.
12722 * src/conflicts.c (enum conflict_resolution): Renamed from
12723 enum conflict_resolution_e.
12724 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12725 (rule_list): Renamed from rule_list_t.
12726 * src/getargs.h (enum trace): Renamed from enum trace_e.
12727 (enum report): Renamed from enum report_e.
12728 * src/gram.h (item_number): Renamed from item_number_t.
12729 (rule_number): Renamed from rule_number_t.
12730 (struct rule_s): Remove the "rule_s" part; not used.
12731 (rule): Renamed from rule_t.
12732 (rule_filter): Renamed from rule_filter_t.
12733 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12734 (goto_list): Renamed from goto_list_t.
12735 * src/lalr.h (goto_number): Renamed from goto_number_t.
12736 * src/location.h (location): Renamed from location_t.
12737 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12738 and moved here from:
12739 * src/muscle_tab.h (muscle_entry_t): here.
12740 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12741 (rule_list): Renamed from rule_list_t.
12742 * src/print_graph.c (static_graph): Renamed from graph.
12743 * src/reader.h (braced_code): Renamed from braced_code_t.
12744 Remove brace_code_e tag.
12745 * src/relation.h (relation_node): Renamed from relation_node_t.
12746 (relation_nodes): Renamed from relation_nodes_t.
12747 (relation): Renamed from relation_t.
12748 * src/state.h (state_number): Renamed from state_number_t.
12749 (struct state): Renamed from struct state_s.
12750 (state): Renamed from state_t.
12751 (transitions): Renamed from transitions_t. Unused (and
12752 misspelled) transtion_s tag removed.
12753 (errs): Renamed from errs_t. Unused errs_s tag removed.
12754 (reductions): Renamed from reductions_t. Unused tag
12755 reductions_s removed.
12756 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12757 (struct symbol_list): Renamed from struct symbol_list_s.
12758 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12759 (struct symbol): Renamed from struct symbol_s.
12760 (symbol): Renamed from symbol_t.
12761 * src/tables.c (vector_number): Renamed from vector_number_t.
12762 (action_number): Renamed from action_t.
12763 * src/tables.h (base_number): Renamed from base_t.
12764 * src/vcg.h (enum color): Renamed from enum color_e.
12765 (enum textmode): Renamed from enum textmode_e.
12766 (enum shape): Renamed from enum shape_e.
12767 (struct colorentry): Renamed from struct colorentry_s.
12768 (struct classname): Renamed from struct classname_s.
12769 (struct infoname): Renamed from struct infoname_s.
12770 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12771 (enum decision): Renamed from enum decision_e.
12772 (enum orientation): Renamed from enum orientation_e.
12773 (enum alignment): Renamed from enum alignment_e.
12774 (enum arrow_mode): Renamed from enum arrow_mode_e.
12775 (enum crossing_type): Renamed from enum crossing_type_e.
12776 (enum view): Renamed from enum view_e.
12777 (struct node): Renamed from struct node_s.
12778 (node): Renamed from node_t.
12779 (enum linestyle): Renamed from enum linestyle_e.
12780 (enum arrowstyle): Renamed from enum arrowstyle_e.
12781 (struct edge): Renamed from struct edge.
12782 (edge): Renamed from edge_t.
12783 (struct graph): Renamed from struct graph_s.
12784 (graph): Renamed from graph_t.
12785 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12786 Rename value_t -> value.
12787 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12788 value_t_as_yystype -> value_as_yystype.
12789
12790 Don't include <errno.h> in the mainstream code, since it
12791 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12792 * lib/get-errno.c, lib/get-errno.h: New files.
12793 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12794 get-errno.c.
12795 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12796 * src/output.c (output_skeleton): Likewise.
12797 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12798 instead of errno.
12799 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12800 Likewise.
12801 (handle_action_dollar, handle_action_at): Likewise.
12802 * src/system.h: Do not include <errno.h>.
12803 (TAB_EXT): Renamed from EXT_TAB.
12804 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12805
12806 Avoid str[a-z]*, since <string.h> reserves that name space.
12807 Change all instances of "struniq" in names to "uniqstr", and
12808 likewise for "STRUNIQ" and "UNIQSTR".
12809 * src/uniqstr.c: Renamed from src/struniq.c.
12810 * src/uniqstr.h: Renamed from src/struniq.h.
12811 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12812 * src/files.c (strsuffix): Remove; unused.
12813 (concat2): Renamed from stringappend. Now static.
12814 * src/files.h (strsuffix, stringappend): Remove; unused.
12815 * src/parse-gram.y (<chars>): Renamed from <string>.
12816 (<uniqstr>): Renamed from <struniq>.
12817 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12818 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12819 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12820 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12821 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12822 (N_EXPAND): Renamed from N_STRETCH.
12823
12824 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12825 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12826 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12827 Remove; unused.
12828 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12829 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12830 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12831 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12832 (BASE_MAXIMUM): Renamed from BASE_MAX.
12833 (BASE_MINIMUM): Renamed from BASE_MIN.
12834 (ACTION_MAX): Remove; unused.
12835 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12836 Unnecessary casts removed from above defines.
12837
12838
12839 Fix misspelling in names.
12840 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12841 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12842 G_NODE_ALIGNEMENT.
12843
12844
12845 * lib/timevar.c (timevar_report): Renamed from time_report,
12846 for consistency with other names.
12847 * lib/timevar.h (timevar_report): New decl.
12848 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12849
12850
12851 Sort include-file uses.
12852
12853 Reorder all include files under src to be in the order "system.h".
12854 then the ../lib include files in angle brackets (alphabetized),
12855 then the . include files in double-quotes (alphabetized). Fix
12856 dependency breakages encountered in this process, as follows:
12857 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12858 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12859 * src/state.h: Include "symtab.h".
12860
12861 2002-12-08 Paul Eggert <eggert@twinsun.com>
12862
12863 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12864 since this causes problems when __file__ contains character
12865 sequences like "@" that are treated specially by src/scan-skel.l.
12866 Instead, just use the file's basename. This fixes the bug
12867 reported by Martin Mokrejs in
12868 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12869
12870 2002-12-06 Paul Eggert <eggert@twinsun.com>
12871
12872 Add support for rules that do not have trailing semicolons, as
12873 POSIX requires. Improve the quality of locations in Bison
12874 diagnostics.
12875
12876 * src/location.c: Include <quotearg.h>.
12877 (empty_location): Now const.
12878 (location_print): New function. Follow the recommendation of the
12879 GNU Coding Standards for locations that span file boundaries.
12880 * src/location.h: Do not include <quotearg.h>; no longer needed.
12881 (boundary): New type.
12882 (location_t): Use it. This allows locations to span file boundaries.
12883 All member uses changed: file -> start.file or end.file (as needed),
12884 first_line -> start.line, first_column -> start.column,
12885 last_line -> end.line, last_column -> end.column.
12886 (equal_boundaries): New function.
12887 (LOCATION_RESET, LOCATION_STEP): Remove.
12888 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12889 (empty_location): Now const.
12890 (location_print): New decl.
12891 * src/parse-gram.y (lloc_default): New function, which handles
12892 empty locations more accurately.
12893 (YYLLOC_DEFAULT): Use it.
12894 (%token COLON): Remove.
12895 (%token ID_COLON): New token.
12896 (rules): Use it.
12897 (declarations, rules): Remove trailing semicolon.
12898 (declaration, rules_or_grammar_declaration):
12899 Allow empty (";") declaration.
12900 (symbol_def): Remove empty actions; no longer needed.
12901 (rules_or_grammar_declaration): Remove trailing semicolon.
12902 (semi_colon.opt): Remove.
12903 * src/reader.h: Include location.h.
12904 (scanner_cursor): New decl.
12905 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12906 rolling our own.
12907 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12908 of *loc.
12909 (STEP): Remove. No longer needed, now that adjust_location does
12910 the work. All uses removed.
12911 (scanner_cursor): New var.
12912 (adjust_location): Renamed from extend_location. It now sets
12913 *loc and adjusts the scanner cursor. All uses changed.
12914 Don't bother testing for CR.
12915 (handle_syncline): Remove location arg; now updates scanner cursor.
12916 All callers changed.
12917 (unexpected_end_of_file): Now accepts start boundary of token or
12918 comment, not location. All callers changed. Update scanner cursor,
12919 not the location.
12920 (SC_AFTER_IDENTIFIER): New state.
12921 (context_state): Renamed from c_context. All uses changed.
12922 (id_loc, code_start, token_start): New local vars.
12923 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12924 processing of Yacc white space and equivalents here.
12925 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12926 instead of returning ID immediately, since we need to search for
12927 a subsequent colon.
12928 (<INITIAL>"'", "\""): Save token_start.
12929 (<INITIAL>"%{", "{", "%%"): Save code_start.
12930 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12931 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12932 BEGIN context_state at end, not INITIAL.
12933 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12934 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12935 Return correct token start.
12936 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12937 the start of a character, string or multiline comment is found.
12938 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12939 Reduction): Adjust reported locations to match the more-precise
12940 results now expected.
12941 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12942 * tests/reduce.at (Useless Rules, Reduced Automaton,
12943 Underivable Rules): Likewise.
12944 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12945 or "|"' now that so many other tokens are allowed by the new grammar.
12946
12947 * src/complain.h (current_file): Remove duplicate decl;
12948 current_file is now owned by files.h.
12949 * src/complain.c, src/scan-gram.l: Include files.h.
12950
12951 2002-12-06 Paul Eggert <eggert@twinsun.com>
12952
12953 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12954 promotes to int; it might be unsigned int.
12955 * data/yacc.c (yy_reduce_print): Likewise.
12956
12957 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12958 be #defined in the prologue, not in the Bison declarations.
12959 This fixes Debian Bug 102878, reported by Shaul Karl.
12960
12961 2002-12-02 Paul Eggert <eggert@twinsun.com>
12962
12963 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12964 * lib/strtoul.c: New file, from gnulib.
12965 This fixes a porting bug reported by Peter Klein in
12966 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
12967
12968 2002-11-30 Paul Eggert <eggert@twinsun.com>
12969
12970 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12971 and put only a forward declaration in the prologue. This is for
12972 consistency with the other scanner helper functions.
12973
12974 Type clashes now generate warnings, not errors, since it
12975 appears that POSIX may allow some grammars with type clashes.
12976 * src/reader.c (grammar_current_rule_check): Warn about
12977 type clashes instead of complaining.
12978 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12979
12980 Add Yacc library, since POSIX requires it.
12981 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12982 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12983 * lib/main.c, lib/yyerror.c: New files.
12984
12985 gram_error can be static; it need not be extern.
12986 * src/reader.h (gram_error): Remove decl.
12987 * src/parse-gram.y (gram_error): Now static. Add static decl.
12988 (print_token_value): Omit parameter names from forward decl,
12989 for consistency.
12990
12991 2002-11-29 Paul Eggert <eggert@twinsun.com>
12992
12993 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12994 be declared before being used. E.g., one should typically
12995 declare them in the prologue. Use GNU coding style in examples.
12996 Put "const" consistently after the type it modifies. Mention
12997 that C99 supports "inline". Mention that yyerror traditionally
12998 returns "int".
12999
13000 %parse-param and %lex-param now take just one argument, the
13001 declaration; the argument name is deduced from the declaration.
13002
13003 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13004 Reporting, Table of Symbols): Document this.
13005 * src/parse-gram.y (add_param): New function.
13006 (COMMA): Remove.
13007 (declaration): Implement new rule for %parse-param and %lex-param.
13008 * src/scan-gram.l: "," now elicits a warning, rather than being
13009 a token; this is more compatible with byacc.
13010 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13011
13012 2002-11-27 Paul Eggert <eggert@twinsun.com>
13013
13014 Rename identifiers to avoid real and potential collisions.
13015
13016 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13017 to avoid collision with lex macro described by Bruce Lilly in
13018 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13019 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13020 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13021 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13022 All uses changed.
13023 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13024 The name "yycontrol" violates the name space rules, and this stuff
13025 wasn't being used anyway.
13026 (input): Remove action; this stuff wasn't being used.
13027 (gram_error): Rename local variable yylloc -> loc.
13028 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13029 (YY_DECL): Don't use "yy" at start of local variables.
13030 All uses changed, e.g., yylloc -> loc.
13031 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13032 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13033 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13034 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13035
13036 * src/parse-gram.y (gram_error): loc is now const *.
13037 * src/reader.h (gram_error): Likewise.
13038
13039 2002-11-24 Paul Eggert <eggert@twinsun.com>
13040
13041 Version 1.75c.
13042
13043 * tests/actions.at (Actions after errors): Use an output format
13044 more similar to that of the Printers and Destructors test.
13045 Test the position of the ';' token too.
13046 (Printers and Destructors): Likewise.
13047 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13048 unnecessarily alarming people when the test fails.
13049
13050 * data/yacc.c (yyerrlab1): Move this label down, so that the
13051 parser does not discard the lookahead token if the user code
13052 invokes YYERROR. This change is required for POSIX conformance.
13053
13054 * lib/error.c: Sync with gnulib.
13055
13056 2002-11-22 Paul Eggert <eggert@twinsun.com>
13057
13058 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13059 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13060 * lib/xmalloc.c: Likewise.
13061
13062 2002-11-20 Paul Eggert <eggert@twinsun.com>
13063
13064 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13065
13066 2002-11-20 Paul Eggert <eggert@twinsun.com>
13067
13068 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13069 should use `if (! x) abort ();' rather than `assert (x);', and
13070 anyway it's one less thing to worry about configuring.
13071
13072 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13073 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13074 and replace all instances of assert with abort.
13075 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13076 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13077
13078 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13079 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13080 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13081 hash_find_entry, hash_rehash, hash_insert): Likewise.
13082 * src/conflicts.c (resolve_sr_conflict): Likewise.
13083 * src/lalr.c (set_goto_map, map_goto): Likewise.
13084 * src/nullable.c (nullable_compute): Likewise.
13085 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13086 * src/reader.c (packgram, reader): Likewise.
13087 * src/state.c (state_new, state_free, state_transitions_set,
13088 state_reduction_find): Likewise.
13089 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13090 symbol_pack): Likewise.
13091 * src/tables.c (conflict_row, pack_vector): Likewise.
13092 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13093 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13094 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13095 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13096
13097 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13098 (ARGMATCH_CONSTRAINT): New macro.
13099 (ARGMATCH_ASSERT): Use it.
13100
13101 * src/system.h (verify): New macro.
13102 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13103 rather than assert.
13104 * src/tables.c (tables_generate): Likewise.
13105
13106 * src/struniq.c (struniq_assert): Now returns void, and aborts
13107 if the assertion is false.
13108 (struniq_assert_p): Remove.
13109 * src/struniq.h: Likewise.
13110
13111 2002-11-18 Paul Eggert <eggert@twinsun.com>
13112
13113 * data/glr.c (yygetLRActions): Replace `yyindex' with
13114 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13115 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13116 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13117
13118 2002-11-18 Akim Demaille <akim@epita.fr>
13119
13120 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13121 space.
13122 From Tim Van Holder.
13123
13124 2002-11-17 Paul Eggert <eggert@twinsun.com>
13125
13126 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13127 to "SyntaxError" for consistency with my 2002-11-15 change.
13128
13129 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13130 not define to {}, since this breaks the common use of `YYDPRINTF
13131 ((...));' if a single statement is desired (e.g. before `else').
13132 Work around GCC warnings by surrounding corresponding calls with
13133 {} if needed.
13134 (yyhasResolvedValue): Remove unused function.
13135 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13136 loop body.
13137 (yyreportSyntaxError): Renamed from yyreportParseError.
13138 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13139 All uses changed.
13140 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13141 extern when possible. Remove unused initializations.
13142
13143 2002-11-16 Akim Demaille <akim@epita.fr>
13144
13145 Augment the similarity between GLR and LALR traces.
13146
13147 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13148 (YY_REDUCE_PRINT): New.
13149 (yyparse): Use them.
13150 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13151 YYDPRINT here.
13152 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13153 state reached after the reduction/recovery, since...
13154 (yyparse, yyprocessOneStack): Report the state we are entering in.
13155
13156 2002-11-16 Akim Demaille <akim@epita.fr>
13157
13158 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13159 Add support for --trace=skeleton.
13160 * src/scan-skel.l: %option debug.
13161 Scan strings of non-@ or \n instead of character by character.
13162 (scan_skel): Handle trace_skeleton.
13163 (QPUTS): New.
13164 (@output_parser_name@, @output_header_name@): ``Restore'' their
13165 support (used to be M4 macros).
13166 * data/yacc.c: Quote larger chunks, a la glr.c.
13167 * data/lalr1.cc: Likewise.
13168 The header guards are no longer available, so use some other
13169 string than `YYLSP_NEEDED'.
13170
13171 2002-11-16 Akim Demaille <akim@epita.fr>
13172
13173 Make the ``Printers and Destructors'' test more verbose, taking
13174 `yacc.c''s behavior as (possibly wrong) reference.
13175
13176 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13177 instead of fprint on stdout.
13178 Set and report the last_line of the symbols.
13179 Consistently display values and locations.
13180
13181 2002-11-16 Paul Eggert <eggert@twinsun.com>
13182
13183 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13184
13185 2002-11-15 Paul Eggert <eggert@twinsun.com>
13186
13187 * tests/actions.at (Actions after errors): New test case.
13188
13189 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13190 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13191 tests/action.at, tests/calc.at, tests/conflicts.at,
13192 tests/cxx-type.at, tests/regression.at:
13193 "parse error" -> "syntax error" for POSIX compatibility.
13194 "parsing stack overflow..." -> "parser stack overflow" so
13195 that code matches Bison documentation.
13196
13197 2002-11-15 Akim Demaille <akim@epita.fr>
13198
13199 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13200 take two BRACED_CODE, not two string_content.
13201 Free the scanner's obstack when we are done.
13202 (code_content): New.
13203 * tests/calc.at: Adjust.
13204 * doc/bison.texinfo: Adjust.
13205 Also, make sure to include the `,' for these declarations.
13206
13207 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13208
13209 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13210 definition; avoids potential autoreconf problems.
13211
13212 2002-11-15 Akim Demaille <akim@epita.fr>
13213
13214 Always check the value returned by yyparse.
13215
13216 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13217 returned by yyparse.
13218 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13219 Adjust calls.
13220 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13221 returned by yyparse.
13222
13223 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13224
13225 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13226 on input.at test.
13227
13228 2002-11-14 Paul Eggert <eggert@twinsun.com>
13229
13230 * src/output.c (output_skeleton): Call xfopen instead of
13231 duplicating xfopen's body.
13232
13233 Fix bugs reported by Nelson H. F. Beebe in
13234 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13235
13236 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13237 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13238 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13239 file twice in the grammar, as an extra check.
13240
13241 * tests/input.at (Torturing the Scanner): Surround the
13242 backslash-newline tests with "#if 0", to make it less likely that
13243 we'll run into compiler bugs. Bring back solitary \ inside
13244 comment, but add a closing comment to work around HP C bug. Don't
13245 test backslash-newline in C character constant.
13246
13247 2002-11-14 Akim Demaille <akim@epita.fr>
13248
13249 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13250 status of the compiler.
13251 Calling `exit 1' is no longer needed.
13252 Reported by Nelson H. F. Beebe.
13253
13254 2002-11-14 Akim Demaille <akim@epita.fr>
13255
13256 * tests/atlocal.in (CPPFLAGS): We have config.h.
13257 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13258 New.
13259 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13260 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13261 * tests/regression.at, tests/torture.at: Use them for all the
13262 grammars that are to be compiled.
13263 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13264 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13265 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13266
13267 2002-11-14 Akim Demaille <akim@epita.fr>
13268
13269 * doc/bison.texinfo: Various formatting changes (alignments in
13270 samples, additional @group/@end group, GCS in samples.
13271 Use @deffn instead of simple @table to define the directives,
13272 macros, variables etc.
13273
13274 2002-11-13 Paul Eggert <eggert@twinsun.com>
13275
13276 Fix some bugs reported by Albert Chin-A-Young in
13277 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13278
13279 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13280 -o c"; the HP C compiler chatters during compilation.
13281 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13282 * tests/headers.at (export YYLTYPE): Likewise.
13283
13284 * tests/input.at (Torturing the Scanner): Remove lines containing
13285 solitary backslashes, as they tickle a bug in the HP C compiler.
13286
13287 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13288 comments, since they're not portable. Use GNU coding style.
13289
13290 2002-11-13 Akim Demaille <akim@epita.fr>
13291
13292 * data/yacc.c: Leave bigger chunks of quoted text.
13293 (YYDSYMPRINTF): New.
13294 Use it to report symbol activities.
13295 * data/glr.c (YYDSYMPRINTF): New.
13296 Use it.
13297
13298 2002-11-12 Paul Eggert <eggert@twinsun.com>
13299
13300 Version 1.75b.
13301
13302 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13303 (yyglrReduce): Return yyok, not 0.
13304 This should avoid the enumerated-type warnings reported
13305 by Nelson H. F. Beebe in
13306 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13307
13308 * lib/bbitset.h (BITSET_INLINE): Remove.
13309 * lib/bitset.h [! BITSET_INLINE]: Remove.
13310 (bitset_set, bitset_reset, bitset_test): Rename local vars
13311 to avoid shadowing warnings by GCC.
13312
13313 * data/glr.c (inline): Remove #define. It's the user's
13314 responsibility to #define it away, just like 'const'.
13315 This fixes one of the bugs reported by Nelson H. F. Beebe in
13316 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13317
13318 * Makefile.maint (po-check): Scan .l and .y files instead of the
13319 .c and the .h files that they generate. This fixes the bug
13320 reported by Tim Van Holder in:
13321 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13322 Look for N_ as well as for _. Try to avoid matching #define for
13323 N_ and _.
13324 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13325 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13326 * src/scan-gram.l: Revamp regular expressions so that " and '
13327 do not confuse xgettext.
13328
13329 * src/struniq.h (struniq_new): Do not declare the return type
13330 to be 'const'; this violates the C standard.
13331 * src/struniq.c (struniq_new): Likewise.
13332
13333 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13334
13335 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13336 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13337 linker.
13338
13339 2002-11-12 Akim Demaille <akim@epita.fr>
13340
13341 * Makefile.maint: Sync with Autoconf:
13342 (local_updates): New.
13343
13344 2002-11-12 Akim Demaille <akim@epita.fr>
13345
13346 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13347
13348 2002-11-12 Akim Demaille <akim@epita.fr>
13349
13350 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13351 locations.
13352
13353 2002-11-12 Akim Demaille <akim@epita.fr>
13354
13355 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13356 not yyvalue.
13357
13358 2002-11-12 Akim Demaille <akim@epita.fr>
13359
13360 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13361 Use it to test the GLR parser.
13362
13363 2002-11-12 Akim Demaille <akim@epita.fr>
13364
13365 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13366 defines it.
13367 * data/glr.c (yystos): New.
13368 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13369 (YYDSYMPRINT): New.
13370 (yyval): Don't define it, it is handled via M4.
13371 (yyrecoverParseError): Free verbosely the discarded symbols.
13372 * data/yacc.c (yysymprint): Remove, rather...
13373 (b4_yysymprint_generate): invoke.
13374 * data/c.m4 (b4_yysymprint_generate): New.
13375 Accept pointers as arguments, as opposed to the version from
13376 yacc.c.
13377 (b4_yydestruct_generate): Likewise.
13378 * tests/cations.at (Printers and Destructors): Use Bison directives
13379 instead of CPP macros.
13380 Don't rely on internal details.
13381
13382 2002-11-12 Akim Demaille <akim@epita.fr>
13383
13384 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13385 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13386 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13387 it against YYEMPTY and so forth), work on yytoken (i.e., set
13388 it to YYEMPTY etc.).
13389 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13390 (b4_symbol_actions): Remove.
13391 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13392 for 0, end-of-input.
13393
13394 2002-11-12 Akim Demaille <akim@epita.fr>
13395
13396 * doc/bison.texinfo (Destructor Decl): New.
13397
13398 2002-11-12 Akim Demaille <akim@epita.fr>
13399
13400 * src/tables.c (tables_generate): Use free for pointers that
13401 cannot be NULL, not XFREE.
13402 (pack_vector): Use assert, not fatal, for bound violations.
13403 * src/state.c (state_new): Likewise.
13404 * src/reader.c (reader): Likewise.
13405 * src/lalr.c (set_goto_map): Likewise.
13406 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13407 the file name.
13408
13409 2002-11-12 Akim Demaille <akim@epita.fr>
13410
13411 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13412 Restore.
13413 * src/scan-gram.l (last_string): Is global to the file, not to
13414 yylex.
13415 * src/parse-gram.y (input): Don't append the epilogue here,
13416 (epilogue.opt): do it here, and free the scanner's obstack.
13417 * src/reader.c (epilogue_set): Rename as...
13418 (epilogue_augment): this.
13419 * data/c.m4 (b4_epilogue): Defaults to empty.
13420
13421 2002-11-12 Akim Demaille <akim@epita.fr>
13422
13423 * src/getargs.c (long_options): Remove duplicates.
13424 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13425 Remove.
13426 * doc/bison.rnh: Remove.
13427 * doc/bison.texinfo (VMS Invocation): Remove.
13428
13429 2002-11-12 Akim Demaille <akim@epita.fr>
13430
13431 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13432 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13433
13434 Use struniq for symbols.
13435
13436 * src/symtab.h (symbol_t): The tag member is a struniq.
13437 (symbol_type_set): Adjust.
13438 * src/symtab.c (symbol_new): Takes a struniq.
13439 (symbol_free): Don't free the tag member.
13440 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13441 (hash_compare_symbol, hash_symbol): these.
13442 Use the fact that tags as struniqs.
13443 (symbol_get): Use struniq_new.
13444 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13445 Returns a strniq.
13446 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13447 and type members are struniqs.
13448 * src/reader.c (get_merge_function)
13449 (grammar_current_rule_merge_set): Adjust.
13450 (TYPE, current_type): Are struniq.
13451
13452 Use struniq for file names.
13453
13454 * src/files.h, src/files.c (infile): Split into...
13455 (grammar_file, current_file): these.
13456 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13457 * src/reduce.c (reduce_print): Likewise.
13458 * src/getargs.c (getargs): Likewise.
13459 * src/complain.h, src/complain.c: Likewise.
13460 * src/main.c (main): Call struniqs_new early enough to use it for
13461 file names.
13462 Don't free the input file name.
13463
13464 2002-11-12 Akim Demaille <akim@epita.fr>
13465
13466 * src/symtab.c (symbol_free): Remove dead deactivated code:
13467 type_name are properly removed.
13468 Don't use XFREE to free items that cannot be NULL.
13469 * src/struniq.h, src/struniq.c: New.
13470 * src/main.c (main): Initialize/free struniqs.
13471 * src/parse-gram.y (%union): Add astruniq member.
13472 (yyprint): Adjust.
13473 * src/scan-gram.l (<{tag}>): Return a struniq.
13474 Free the obstack bit that used to store it.
13475 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13476
13477 2002-11-11 Paul Eggert <eggert@twinsun.com>
13478
13479 Revamp to fix many (but not all) of the C- and M4-related quoting
13480 problems. Among other things, this fixes the Bison bug reported
13481 by Jan Hubicka when processing the Bash grammar; see:
13482 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13483
13484 Use new @ escapes consistently. Represent brackets with @{ and @}
13485 rather than @<:@ and @:>@, since this works a bit better with dumb
13486 editors like vi. Represent @ with @@, since @ is now consistently
13487 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13488 __ofile__, to avoid unexpected expansions. Similarly, use @output
13489 rather than #output.
13490
13491 * data/c.m4 (b4_copyright): Omit file name from comment, since
13492 the file name could contain "*/".
13493 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13494 be quoted. All uses changed.
13495
13496 * data/glr.c: Use new @ escapes consistently.
13497 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13498 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13499 Remove, since they couldn't handle arbitrary characters in file
13500 names.
13501 * data/lalr1.cc: Likewise.
13502 * data/yacc.c: Likewise.
13503
13504 * src/files.c (output_infix): Remove; all uses removed.
13505 * src/files.h: Likewise.
13506
13507 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13508 mishandled funny characters in file names, and anyway it isn't
13509 needed any more.
13510 * data/yacc.c: Likewise.
13511 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13512
13513 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13514 * data/yacc.c: Likewise.
13515
13516 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13517 strings now.
13518 (muscle_init): Quote filename as a C string.
13519 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13520 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13521 * src/output.c (escaped_file_name_output): New function.
13522 (prepare_symbols): Quote tokens for M4.
13523 (prepare): Don't insert output_infix, output_prefix,
13524 output_parser_name, output_header_name; this is now down by scan-skel.
13525 Insert skeleton as a C string.
13526
13527 * src/output.c (user_actions_output, symbol_destructors_output,
13528 symbol_printers_output): Quote filenames for C and M4.
13529 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13530
13531 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13532 escapes other than \\ and \'; this simplifies the code.
13533 (<SC_STRING>): Likewise, for \\ and \".
13534 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13535 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13536 Use new escapes @{ and @} for [ and ].
13537
13538 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13539 them with auto vars.
13540 Switch to new escape scheme, where @ is the escape character uniformly.
13541 Abort if a stray escape character is found. Avoid unbounded input
13542 buffer when parsing non-escaped text.
13543
13544 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13545 __oline__, #output, $@, and @{ do not have unintended meanings.
13546
13547 2002-11-09 Paul Eggert <eggert@twinsun.com>
13548
13549 Fix the test failure due to GCC warnings described in
13550 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13551 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13552 evaluate to 0 if it's impossible for NINF to be in the respective
13553 table.
13554 (yygetLRActions, yyrecoverParseError): Use them.
13555
13556 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13557 counted in the token inserted at end of file. Now takes
13558 location_t *, not location_t, so that the location can be
13559 adjusted. All uses changed.
13560
13561 * tests/regression.at (Invalid inputs): Adjust wording in
13562 diagnostic to match the new behavior.
13563
13564 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13565 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13566 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13567 abort ();'. This reduces the runtime of the "Many lookaheads"
13568 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13569 GCC 3.2.
13570
13571 2002-11-07 Paul Eggert <eggert@twinsun.com>
13572
13573 * src/parse-gram.y (CHARACTER): Remove unused token.
13574 All uses removed.
13575
13576 * src/scan-gram.l: Remove stack option. We no longer use the
13577 stack, since the stack was never deeper than 1; instead, use the
13578 new auto var c_context to record the stacked value.
13579
13580 Remove nounput option. At an unexpected end of file, we now unput
13581 the minimal input necessary to end cleanly; this simplifies the
13582 code.
13583
13584 Avoid unbounded token sizes where this is easy.
13585
13586 (unexpected_end_of_file): New function.
13587 Use it to systematize the error message on unexpected EOF.
13588 (last-string): Now auto, not static.
13589 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13590 (scanner_last_string_free): Remove; not used.
13591 (percent_percent_count): Move decl to just before use.
13592 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13593 not the (never otherwised-used) CHARACTER.
13594
13595 2002-11-07 Akim Demaille <akim@epita.fr>
13596
13597 Let yyerror always receive the msg as last argument, so that
13598 yyerror can be variadic.
13599
13600 * data/yacc.c (b4_yyerror_args): New.
13601 Use it when calling yyerror.
13602 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13603 Use it when calling yyerror.
13604 * doc/bison.texinfo (Error Reporting): Adjust.
13605 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13606 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13607
13608 2002-11-06 Akim Demaille <akim@epita.fr>
13609
13610 #line should have quoted strings.
13611 Ideally, this should be done by m4_quotearg.
13612
13613 * src/scan-skel.l: Include quotearg.h.
13614 Quote __ofile__.
13615 * src/output.c (symbol_printers_output)
13616 (symbol_destructors_output): Quote the file name.
13617
13618 2002-11-06 Akim Demaille <akim@epita.fr>
13619
13620 * tests/regression.at (Invalid inputs): Adjust to the recent
13621 messages.
13622
13623 2002-11-06 Akim Demaille <akim@epita.fr>
13624
13625 Restore --no-lines.
13626 Reported by Jim Kent.
13627
13628 * data/c.m4 (b4_syncline): New.
13629 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13630 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13631 * src/output.c (user_actions_output): Likewise.
13632 (prepare): Define 'b4_synclines_flag'.
13633 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13634
13635 2002-11-06 Akim Demaille <akim@epita.fr>
13636
13637 * src/main.c (main): Free `infile'.
13638 * src/scan-gram.l (handle_syncline): New.
13639 Recognize `#line'.
13640 * src/output.c (user_actions_output, symbol_destructors_output)
13641 (symbol_printers_output): Use the location's file name, not
13642 infile.
13643 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13644
13645 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13646
13647 * src/tables.c (matching_state): Don't allow states to match if
13648 either has GLR conflict entries.
13649
13650 2002-11-05 Paul Eggert <eggert@twinsun.com>
13651
13652 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13653 "integer out of range" rather than "invalid value".
13654 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13655 accordingly.
13656
13657 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13658 Also, remove one static variable in the scanner.
13659
13660 * src/scan-gram.l (braces_level): Now auto, not static.
13661 Initialize to zero if the compiler is being picky.
13662 (INITIAL): Clear braces_level instead of incrementing it.
13663 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13664 as POSIX 1003.1-2001 requires.
13665 * src/system.h (IF_LINT): New macro, taken from coreutils.
13666 * configure.ac: Define "lint" if --enable-gcc-warnings.
13667
13668 2002-11-05 Akim Demaille <akim@epita.fr>
13669
13670 * src/scan-gram.l: When it starts with `%', complain about the
13671 whole directive, not just that `invalid character: %'.
13672
13673 2002-11-04 Akim Demaille <akim@epita.fr>
13674
13675 * Makefile.maint: Update from Autoconf.
13676 (update, cvs-update, po-update, do-po-update): New.
13677
13678 2002-11-04 Akim Demaille <akim@epita.fr>
13679
13680 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13681 and yyerror.
13682 Have yyerror `use' its arguments.
13683 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13684 returns true when location & yacc & pure & parse-param.
13685 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13686
13687 2002-11-04 Akim Demaille <akim@epita.fr>
13688
13689 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13690 clashes.
13691 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13692 font-lock-mode.
13693 Use complain_at.
13694 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13695 slot 0.
13696
13697 2002-11-03 Paul Eggert <eggert@twinsun.com>
13698
13699 * src/reader.c (get_merge_function, grammar_current_rule_check):
13700 Use consistent diagnostics for reporting type name clashes.
13701 Quote the types with <>, for consistency with Yacc.
13702 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13703
13704 2002-11-03 Akim Demaille <akim@epita.fr>
13705
13706 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13707 New.
13708 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13709 (b4_parse_param): Remove.
13710 Use b4_identification.
13711 Propagate b4_pure_args where needed to pass them to yyerror.
13712 * data/glr.m4 (b4_parse_param): Remove.
13713 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13714 (b4_lpure_formals): New.
13715 Use b4_identification.
13716 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13717 b4_user_formals and b4_user_args.
13718 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13719 (yyreportAmbiguity): When using a pure parser, also need
13720 the location, and the parse-params.
13721 Adjust callers.
13722 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13723 When using a pure parser, also need the parse-params.
13724 Adjust callers.
13725 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13726 (%pure-parser + %parse-param) LALR and GLR parsers.
13727 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13728 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13729 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13730 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13731 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13732 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13733 * doc/bison.texinfo: Untabify the whole file.
13734 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13735 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13736 (Error Reporting): Adjust to these new directives.
13737 Document %error-verbose, deprecate YYERROR_VERBOSE.
13738
13739 2002-11-03 Akim Demaille <akim@epita.fr>
13740
13741 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13742 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13743 command line options.
13744 * tests/cxx-type.at: Formatting changes.
13745
13746 2002-11-03 Paul Eggert <eggert@twinsun.com>
13747
13748 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13749 to count columns correctly, and to check for invalid inputs.
13750
13751 Use mbsnwidth to count columns correctly. Account for tabs, too.
13752 Include mbswidth.h.
13753 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13754 (extend_location): New function.
13755 (YY_LINES): Remove.
13756
13757 Handle CRLF in C code rather than in Lex code.
13758 (YY_INPUT): New macro.
13759 (no_cr_read): New function.
13760
13761 Scan UCNs, even though we don't fully handle them yet.
13762 (convert_ucn_to_byte): New function.
13763
13764 Handle backslash-newline correctly in C code.
13765 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13766 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13767 all uses changed.
13768 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13769 Use {splice} wherever C allows backslash-newline.
13770 YY_STEP after space, newline, vertical-tab.
13771 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
13772
13773 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13774
13775 ({int}, handle_action_dollar, handle_action_at): Check for integer
13776 overflow.
13777
13778 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13779
13780 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13781 as well as \000. Check for UCHAR_MAX, not 255.
13782 Allow \x with an arbitrary positive number of digits, as in C.
13783 Check for overflow here.
13784 Allow \? and UCNs, for compatibility with C.
13785
13786 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13787 with quote slot used by complain_at.
13788
13789 * tests/input.at: Add tests for backslash-newline, m4 quotes
13790 in symbols, long literals, and funny escapes in strings.
13791
13792 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13793 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13794 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13795 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13796 * m4/mbswidth.m4: New file, from GNU coreutils.
13797
13798 * doc/bison.texinfo (Grammar Outline): Document // comments.
13799 (Symbols): Document that trigraphs have no special meaning in Bison,
13800 nor is backslash-newline allowed.
13801 (Actions): Document that trigraphs have no special meaning.
13802
13803 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13804 no longer used.
13805
13806 2002-11-02 Paul Eggert <eggert@twinsun.com>
13807
13808 * src/reader.c: Don't include quote.h; not needed.
13809 (get_merge_function): Reword warning to be consistent with
13810 type clash diagnostic in grammar_current_rule_check.
13811
13812 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13813 bug in trigraph handling.
13814
13815 * src/output.c (prepare_symbols): When printing token names,
13816 escape "[" as "@<:@" and likewise for "]".
13817
13818 * src/system.h (errno): Remove declaration, as we are now
13819 assuming C89 or better, and C89 guarantees errno.
13820
13821 2002-10-30 Paul Eggert <eggert@twinsun.com>
13822
13823 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13824 Check for close failures.
13825 * src/files.h (xfclose): Return void, not int, since it always
13826 returned zero.
13827 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13828 indicates one.
13829 * src/output.c (output_skeleton): Use xfclose rather than fclose
13830 and ferror. xfclose now checks ferror.
13831
13832 * data/glr.c (YYLEFTMOST_STATE): Remove.
13833 (yyreportTree): Use a stack-based leftmost state. This avoids
13834 our continuing battles with bogus warnings about initializers.
13835
13836 2002-10-30 Akim Demaille <akim@epita.fr>
13837
13838 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13839 #if.
13840
13841 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13842
13843 * tests/glr-regr1.at: New test for reported regressions.
13844 * tests/testsuite.at: Add glr-regr1.at test.
13845 * tests/Makefile.am: Add glr-regr1.at test.
13846
13847 2002-10-24 Paul Eggert <eggert@twinsun.com>
13848
13849 Version 1.75a.
13850
13851 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13852 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13853 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13854 Don't assume strdup exists; POSIX says its an XSI extension.
13855 Check for buffer overflow on input.
13856
13857 2002-10-24 Akim Demaille <akim@epita.fr>
13858
13859 * src/output.c (output_skeleton): Don't disable M4sugar comments
13860 too soon: it results in comments being expanded.
13861 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13862 first output.
13863
13864 2002-10-24 Akim Demaille <akim@epita.fr>
13865
13866 * data/yacc.c (m4_int_type): New.
13867 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13868 char' as only yacc.c wants K&R portability.
13869 * data/glr.c (yysigned_char): Remove.
13870 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13871 Reported by Quoc Peyrot.
13872
13873 2002-10-23 Paul Eggert <eggert@twinsun.com>
13874
13875 * src/main.c (main): With --trace=time, report times even if a
13876 non-fatal error occurs. Formerly, the times were reported in some
13877 such cases but not in others.
13878 * src/reader.c (reader): Just return if a complaint has been issued,
13879 instead of exiting, so that 'main' can report times.
13880
13881 2002-10-22 Akim Demaille <akim@epita.fr>
13882
13883 * src/system.h: Include sys/types.
13884 Reported by Bert Deknuydt.
13885
13886 2002-10-23 Paul Eggert <eggert@twinsun.com>
13887
13888 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13889 Suggested by Art Haas.
13890
13891 2002-10-22 Paul Eggert <eggert@twinsun.com>
13892
13893 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13894 decl; not needed any more.
13895 * src/main.c (main): Use return to exit, undoing yesterday's change.
13896 The last OS that we could find where this wouldn't work is
13897 SunOS 3.5, and that's too old to worry about now.
13898
13899 * data/glr.c (struct yyltype): Define members even when not
13900 doing locations. This is more consistent with yacc.c, and it
13901 works around the following bug reports:
13902 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13903 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
13904
13905 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13906 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13907 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13908
13909 2002-10-22 Akim Demaille <akim@epita.fr>
13910
13911 * data/README: New.
13912
13913 2002-10-21 Paul Eggert <eggert@twinsun.com>
13914
13915 Be consistent about 'bool'; the old code used an enum in one
13916 module and an int in another, and this violates the C standard.
13917 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13918 * configure.ac (AC_HEADER_STDBOOL): Add.
13919 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13920 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13921 * src/symtab.c (hash_compare_symbol_t): Likewise.
13922 * src/system.h (bool, false, true): Use a definition consistent
13923 with ../lib/hash.c. All uses changed.
13924
13925 * src/complain.c (warning_issued): Renamed from warn_message_count,
13926 so that we needn't worry about integer overflow (!).
13927 Now of type bool. All uses changed.
13928 (complaint_issued): Renamed from complain_message_count; likewise.
13929
13930 * src/main.c (main): Use exit to exit with failure.
13931
13932 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13933 rather than 1 and 0.
13934 * src/main.c (main): Likewise.
13935 * src/getargs.c (getargs): Likewise.
13936 * src/reader.c (reader): Likewise.
13937
13938 * src/getarg.c (getargs): Remove duplicate code for
13939 "Try `bison --help'".
13940
13941 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13942 What was that "2" for?
13943
13944 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13945 * src/getargs.c (usage): Likewise.
13946
13947 * src/getargs.c (getargs): When there are too few operands, report
13948 the last one. When there are too many, report the first extra
13949 one. This is how diffutils does it.
13950
13951 2002-10-20 Paul Eggert <eggert@twinsun.com>
13952
13953 Remove K&R vestiges.
13954 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13955 * src/complain.c (VA_START): Remove. Assume prototypes.
13956 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13957 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13958 fatal): Assume prototypes.
13959 * src/complain.h: Assume prototypes.
13960 * src/system.h (PARAMS): Remove.
13961 Include <limits.h> unconditionally, since it's guaranteeed even
13962 for a freestanding C89 compiler.
13963 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13964 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
13965
13966 2002-10-20 Akim Demaille <akim@epita.fr>
13967
13968 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13969 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13970 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13971 (yyresolveStates, yyresolveAction, yyresolveStack)
13972 (yyprocessOneStack): Use them.
13973 (yy_reduce_print): New.
13974 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13975
13976 2002-10-20 Akim Demaille <akim@epita.fr>
13977
13978 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13979 arguments and output `void'.
13980 (b4_c_function): Rename as...
13981 (b4_c_function_def): this.
13982 (b4_c_function_decl, b4_c_ansi_function_def)
13983 (b4_c_ansi_function_decl): New.
13984 Change the interpretation of the arguments: before `int, foo', now
13985 `int foo, foo'.
13986 * data/yacc.c (yyparse): Prototype and define thanks to these.
13987 Adjust b4_c_function_def uses.
13988 * data/glr.c (yyparse): Likewise, but ANSI only.
13989
13990 2002-10-20 Akim Demaille <akim@epita.fr>
13991
13992 * src/output.c (prepare): Move the definition of `tokens_number',
13993 `nterms_number', `undef_token_number', `user_token_number_max'
13994 to...
13995 (prepare_tokens): Here.
13996 (prepare_tokens): Rename as...
13997 (prepare_symbols): this.
13998 (prepare): Move the definition of `rules_number' to...
13999 (prepare_rules): here.
14000 (prepare): Move the definition of `last', `final_state_number',
14001 `states_number' to...
14002 (prepare_states): here.
14003 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14004
14005 2002-10-20 Akim Demaille <akim@epita.fr>
14006
14007 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14008
14009 2002-10-20 Akim Demaille <akim@epita.fr>
14010
14011 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14012 * data/c.m4: here.
14013
14014 2002-10-20 Akim Demaille <akim@epita.fr>
14015
14016 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14017 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14018 `pair'.
14019 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14020 `name' to...
14021 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14022 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14023 These.
14024
14025 2002-10-19 Paul Eggert <eggert@twinsun.com>
14026
14027 Do not create a temporary file, as that involves security and
14028 cleanup headaches. Instead, use a pair of pipes.
14029 Derived from a suggestion by Florian Krohm.
14030 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14031 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14032 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14033 (BISON_PREREQ_SUBPIPE): Add.
14034 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14035 Add subpipe.h, subpipe.c.
14036 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14037 * po/POTFILES.in: Add lib/subpipe.c.
14038 * src/output.c: Include "subpipe.h".
14039 (m4_invoke): Remove decl.
14040 (scan_skel): New decl.
14041 (output_skeleton): Use pipe rather than temporary file for m4 input.
14042 Check that m4sugar.m4 is readable, to avoid deadlock.
14043 Check for pipe I/O error.
14044 * src/scan-skel.l (readpipe): Remove decl.
14045 (scan_skel): New function, to be used in place of m4_invoke.
14046 Read from stream rather than file.
14047
14048 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14049 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14050 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14051 this generates a more-accurate value anyway.
14052
14053 * lib/timevar.c (timervar_accumulate): Rename locals to
14054 avoid confusion with similarly-named more-global.
14055 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14056
14057 * src/output.c (prepare): Use xstrdup to convert char const *
14058 to char *, to avoid GCC warning.
14059
14060 2002-10-19 Akim Demaille <akim@epita.fr>
14061
14062 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14063 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14064 Use them to have `calc.y' ready for %pure-parser.
14065 * data/yacc.c (YYLEX): Pass a yylex return type to
14066 b4_c_function_call.
14067
14068 2002-10-19 Akim Demaille <akim@epita.fr>
14069
14070 Prototype support of %lex-param and %parse-param.
14071
14072 * src/parse-gram.y: Add the definition of the %lex-param and
14073 %parse-param tokens, plus their rules.
14074 Drop the `_' version of %glr-parser.
14075 Add the "," token.
14076 * src/scan-gram.l (INITIAL): Scan them.
14077 * src/muscle_tab.c: Comment changes.
14078 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14079 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14080 (muscle_entry_s): The `value' member is no longer const.
14081 Adjust all dependencies.
14082 * src/muscle_tab.c (muscle_init): Adjust: use
14083 MUSCLE_INSERT_STRING.
14084 Initialize the obstack earlier.
14085 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14086 (muscle_pair_list_grow): New.
14087 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14088 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14089 * tests/calc.at: Use %locations, not --locations.
14090 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14091
14092 2002-10-19 Akim Demaille <akim@epita.fr>
14093
14094 * src/getargs.c (usage): Take status as argument and exit
14095 accordingly.
14096 Report the traditional `Try ... --help' message when status != 0.
14097 (usage, version): Don't take a FILE * as arg, it is pointless.
14098 (getargs): When there is an incorrect number of arguments, make it
14099 an error, and report it GNUlically thanks to `usage ()'.
14100
14101 2002-10-18 Paul Eggert <eggert@twinsun.com>
14102
14103 * data/glr.c (yyreportParseError): Don't assume that sprintf
14104 yields the length of the printed string, as this is not true
14105 on SunOS 4.1.4. Reported by Peter Klein.
14106
14107 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14108 * tests/conflicts.at (%nonassoc and eof): Likewise.
14109 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14110
14111 2002-10-17 Akim Demaille <akim@epita.fr>
14112
14113 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14114 * src/getargs.c (trace_types, trace_args): Adjust.
14115 * src/reader.c (grammar_current_rule_prec_set)
14116 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14117 Standardize error messages.
14118 And s/@prec/%prec/!
14119 (reader): Use trace_flag to enable scanner/parser debugging,
14120 instead of an adhoc scheme.
14121 * src/scan-gram.l: Remove trailing debugging code.
14122
14123 2002-10-16 Paul Eggert <eggert@twinsun.com>
14124
14125 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14126 MUSCLE_TAB_H.
14127
14128 * NEWS: Officially drop support for building Bison with K&R C,
14129 since it didn't work anyway and it's not worth worrying about.
14130 * Makefile.maint (wget_files): Remove ansi2knr.c.
14131 (ansi2knr.c-url_prefix): Remove.
14132 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14133 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14134 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14135
14136 2002-10-15 Paul Eggert <eggert@twinsun.com>
14137
14138 Stop using the "enum_" trick for K&R-style function definitions;
14139 it confused me, and I was the author! Instead, assume that people
14140 who want to use K&R C compilers (when using these modules in GCC,
14141 perhaps?) will run ansi2knr.
14142
14143 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14144 All uses of "enum_" changed to "enum ".
14145 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14146 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14147
14148 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14149 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14150 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14151 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14152 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14153 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14154 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14155 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14156 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14157 Use function prototypes; this removes the need for declaring
14158 static functions simply to provide their prototypes.
14159 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14160 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14161 bitset_count_, bitset_create, bitset_dump, bitset_first,
14162 bitset_free, bitset_init, bitset_last, bitset_next,
14163 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14164 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14165 bitset_print, bitset_release_memory, bitset_toggle_,
14166 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14167 debug_bitset): Likewise.
14168 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14169 * lib/bitset_stats.c (bitset_log_histogram_print,
14170 bitset_percent_histogram_print, bitset_stats_and,
14171 bitset_stats_and_cmp, bitset_stats_and_or,
14172 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14173 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14174 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14175 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14176 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14177 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14178 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14179 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14180 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14181 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14182 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14183 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14184 bitset_stats_zero): Likewise.
14185 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14186 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14187 bitsetv_dump, debug_bitsetv): Likewise.
14188 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14189 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14190 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14191 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14192 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14193 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14194 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14195 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14196 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14197 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14198 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14199 Likewise.
14200 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14201 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14202 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14203 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14204 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14205 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14206 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14207 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14208 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14209 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14210 lbitset_xor_cmp, lbitset_zero): Likewise.
14211
14212 2002-10-14 Akim Demaille <akim@epita.fr>
14213
14214 Version 1.75.
14215
14216 2002-10-14 Akim Demaille <akim@epita.fr>
14217
14218 * tests/Makefile.am (maintainer-check-posix): New.
14219
14220 2002-10-14 Akim Demaille <akim@epita.fr>
14221
14222 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14223 member.
14224
14225 2002-10-14 Akim Demaille <akim@epita.fr>
14226
14227 * src/tables.c (table_ninf_remap): base -> tab.
14228 Reported by Matt Rosing.
14229
14230 2002-10-14 Paul Eggert <eggert@twinsun.com>
14231
14232 * tests/action.at, tests/calc.at, tests/conflicts.at,
14233 tests/cxx-type.at, tests/headers.at, tests/input.at,
14234 tests/regression.at, tests/synclines.at, tests/torture.at:
14235 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14236 so that the tests still work even if POSIXLY_CORRECT is set.
14237 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14238
14239 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14240 for portability to K&R hosts. Fix typo: signed char is guaranteed
14241 only to 127, not to 128.
14242 * data/glr.c (yysigned_char): New type.
14243 * data/yacc.c (yysigned_char): Likewise.
14244 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14245
14246 2002-10-13 Paul Eggert <eggert@twinsun.com>
14247
14248 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14249 true due to limited range of data type" warning from GCC.
14250
14251 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14252 by wrapping enum yytokentype's definition inside #ifndef
14253 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14254
14255 2002-10-13 Akim Demaille <akim@epita.fr>
14256
14257 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14258 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14259
14260 2002-10-13 Akim Demaille <akim@epita.fr>
14261
14262 * Makefile.maint: Update from Autoconf 2.54.
14263 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14264
14265 2002-10-13 Akim Demaille <akim@epita.fr>
14266
14267 * src/print.c (print_state): Separate the list of solved conflicts
14268 from the other items.
14269 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14270
14271 2002-10-13 Akim Demaille <akim@epita.fr>
14272
14273 Let nondeterministic skeletons be usable with deterministic
14274 tables.
14275
14276 With the patch, GAWK compiled by GCC without -O2 passes its test
14277 suite using a GLR parser driven by LALR tables. It fails with -O2
14278 because `struct stat' gives two different answers on my machine:
14279 88 (definition of an auto var) and later 96 (memset on this var).
14280 Hence the stack is badly corrumpted. The headers inclusion is to
14281 blame: if I move the awk.h inclusion before GLR's system header
14282 inclusion, the two struct stat have the same size.
14283
14284 * src/tables.c (pack_table): Always create conflict_table.
14285 (token_actions): Always create conflict_list.
14286 * data/glr.c (YYFLAG): Remove, unused.
14287
14288 2002-10-13 Akim Demaille <akim@epita.fr>
14289
14290 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14291 (O0FLAGS): New.
14292 (VALGRIND, GXX): New.
14293 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14294 * tests/bison.in: Run $PREBISON a pre-command.
14295 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14296 (maintainer-check-g++): New.
14297 * Makefile.am (maintainer-check): New.
14298
14299 2002-10-13 Akim Demaille <akim@epita.fr>
14300
14301 * data/glr.c: Formatting changes.
14302 Tweak some trace messages to match yacc.c's.
14303
14304 2002-10-13 Akim Demaille <akim@epita.fr>
14305
14306 GLR parsers sometimes raise parse errors instead of performing the
14307 default reduction.
14308 Reported by Charles-Henry de Boysson.
14309
14310 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14311 check the length of the traces when %glr.
14312 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14313 GLR's traces.
14314 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14315 Test GLR parsers.
14316 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14317 (yyltype): Remove the yy prefix from the member names.
14318 (yytable): Complete its comment.
14319 (yygetLRActions): Map error action number from YYTABLE from
14320 YYTABLE_NINF to 0.
14321 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14322 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14323 not satisfying as we could compare an YYACTION computed from
14324 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14325 only value for error actions.
14326 (yyreportParseError): In verbose parse error messages, don't issue
14327 `error' in the list of expected tokens.
14328 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14329 next action to perform to match glr.c's decoding.
14330 (yytable): Complete its comment.
14331
14332 2002-10-13 Paul Eggert <eggert@twinsun.com>
14333
14334 Fix problem reported by Henrik Grubbstroem in
14335 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14336 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14337 because the Bison parser reads the second action before reducing
14338 the first one.
14339 * src/scan-gram.l (rule_length): New static var.
14340 Use it to keep track of the rule length in the scanner, since
14341 we can't expect the parser to be in lock-step sync with the scanner.
14342 (handle_action_dollar, handle_action_at): Use this var.
14343 * tests/actions.at (Exotic Dollars): Test for the problem.
14344
14345 2002-10-12 Paul Eggert <eggert@twinsun.com>
14346
14347 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14348 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14349 Include <sys/time.h> when checking for clock_t and struct tms.
14350 Use same include order as source.
14351 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14352 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14353
14354 * lib/timevar.c: Update copyright date and clarify comments.
14355 (get_time) [IN_GCC]: Keep the GCC version for reference.
14356
14357 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14358 GCC version as of today, then merge Bison's changes.
14359 Change "GCC" to "Bison" in copyright notice. timevar.def's
14360 author is Akim, so change that too.
14361
14362 * src/reader.c (grammar_current_rule_check):
14363 Don't worry about the default action if $$ is untyped.
14364 Prevents bogus warnings reported by Jim Gifford in
14365 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14366
14367 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14368 * data/glr.c, data/lalr1.cc, data/yacc.c:
14369 Output token definitions before the first part of user declarations.
14370 Fixes compatibility problem reported by Jim Gifford for kbd in
14371 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14372
14373 2002-10-11 Paul Eggert <eggert@twinsun.com>
14374
14375 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14376 (yyparse): here. This undoes some of the 2002-07-25 change.
14377 Compatibility problem reported by Ralf S. Engelschall with
14378 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14379
14380 2002-10-11 Akim Demaille <akim@epita.fr>
14381
14382 * tests/regression.at Characters Escapes): New.
14383 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14384 characters.
14385 Reported by Jan Nieuwenhuizen.
14386
14387 2002-10-11 Akim Demaille <akim@epita.fr>
14388
14389 * po/id.po: New.
14390
14391 2002-10-10 Paul Eggert <eggert@twinsun.com>
14392
14393 Portability fixes for bitsets; this also avoids several GCC
14394 warnings.
14395
14396 * lib/abitset.c: Include <stddef.h>, for offsetof.
14397 * lib/lbitset.c: Likewise.
14398
14399 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14400 properly for vectors of objects. Do not assume that adding a
14401 header size to a multiple of a word size yields a value that is
14402 properly aligned for the whole union.
14403 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14404
14405 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14406 unique names for structures.
14407 * lib/ebitset.c (ebitset_bytes): Likewise.
14408 * lib/lbitset.c (lbitset_bytes): Likewise.
14409
14410 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14411 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14412 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14413 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14414 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14415 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14416 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14417 to improve the type-checking that GCC can do.
14418 * lib/bitset.c (bitset_op4_cmp): Likewise.
14419 * lib/bitset_stats.c (bitset_stats_count,
14420 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14421 bitset_stats_copy, bitset_stats_disjoint_p,
14422 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14423 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14424 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14425 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14426 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14427 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14428 bitset_stats_or_and_cmp): Likewise.
14429 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14430 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14431 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14432 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14433
14434 * lib/abitset.h: Include bitset.h, not bbitset.h.
14435 * lib/ebitset.h: Likewise.
14436 * lib/lbitset.h: Likewise.
14437
14438 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14439 All instances of parameters of type enum bitset_opts are now of
14440 type enum_bitset_opts, to conform to the C Standard, and similarly
14441 for enum_bitset_type.
14442 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14443 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14444
14445 Do not use "struct bitset_struct" to mean different things in
14446 different modules. Not only is this confusing, it violates
14447 the C Standard, which requires that structure types in different
14448 modules must be compatible if one is to be passed to the other.
14449 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14450 All instances of "struct bitset_struct *" replaced with "bitset".
14451 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14452 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14453 struct lbitset_struct, struct bitset_stats_struct): New types.
14454 All uses of struct bitset_struct changed to union bitset_union,
14455 etc.
14456 * lib/abitset.c (struct abitset_struct, abitset,
14457 struct bitset_struct): Remove.
14458 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14459 struct bitset_struct): Remove.
14460 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14461 bitset_struct): Remove.
14462 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14463 Likewise.
14464
14465 Do not call a function of type T using a call that assumes the
14466 function is of a different type U. Standard C requires that a
14467 function must be called with a type that is compatible with its
14468 definition.
14469 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14470 New decls.
14471 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14472 New functions.
14473 * lib/ebitset.c (PFV): Remove.
14474 * lib/lbitset.c (PFV): Likewise.
14475 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14476 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14477 decls.
14478 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14479 (ebitset_vtable): Use them.
14480 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14481 lbitset_xor): New functions.
14482 (lbitset_vtable): Use them.
14483
14484 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14485 Declare.
14486
14487 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14488 GCC warning.
14489 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14490 Use offsetof, for simplicity.
14491
14492 2002-10-06 Paul Eggert <eggert@twinsun.com>
14493
14494 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14495 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14496 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14497 which was inadvertently undone by the 2002-09-30 patch.
14498 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14499 the same width as int.
14500
14501 2002-10-04 Paul Eggert <eggert@twinsun.com>
14502
14503 Version 1.50.
14504
14505 * configure.ac (AC_INIT), NEWS: Increment version number.
14506
14507 * doc/bison.texinfo: Minor spelling, grammar, and white space
14508 fixes.
14509 (Symbols): Mention that any negative value returned from yylex
14510 signifies end-of-input. Warn about negative chars. Mention
14511 the portable Standard C character set.
14512
14513 The GNU coding standard says CFLAGS and YFLAGS are reserved
14514 for the installer to set.
14515 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14516 * src/Makefile.am (AM_CFLAGS): Likewise.
14517 (AM_YFLAGS): Renamed from YFLAGS.
14518
14519 Fix some MAX and MIN problems.
14520 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14521 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14522 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14523 * src/reader.c (reader): Use it.
14524
14525 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14526 POSIX 1003.1-2001 has removed fgrep.
14527
14528 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14529
14530 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14531 interpreted as signed.
14532 * lib/ebitset.c (ebitset_list): Fix bug.
14533
14534 2002-10-01 Paul Eggert <eggert@twinsun.com>
14535
14536 More fixes for 64-bit hosts and large bitsets.
14537
14538 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14539 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14540 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14541 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14542 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14543 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14544 bitset_count_): Likewise.
14545 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14546 bitset_first, bitset_last): Likewise.
14547 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14548 bitset_stats_list_reverse, bitset_stats_size,
14549 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14550 Likewise.
14551 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14552 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14553 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14554 bitsetv_reflexive_transitive_closure): Likewise.
14555 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14556 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14557 Likewise.
14558 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14559 Likewise.
14560
14561 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14562 Use size_t, not unsigned int, to count bytes.
14563 * lib/abitset.h (abitset_bytes): Likewise.
14564 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14565 Likewise.
14566 * lib/bitset.h (bitset_bytes): Likewise.
14567 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14568 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14569 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14570 * lib/ebitset.c (ebitset_bytes): Likewise.
14571 * lib/ebitset.h (ebitset_bytes): Likewise.
14572 * lib/lbitset.c (lbitset_bytes): Likewise.
14573 * lib/lbitset.h (lbitset_bytes): Likewise.
14574
14575 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14576 abitset_subset_p, abitset_disjoint_p, abitset_and,
14577 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14578 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14579 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14580 abitset_or_and, abitset_or_and_cmp):
14581 Use bitset_windex instead of unsigned int.
14582 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14583 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14584 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14585 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14586 Likewise.
14587 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14588
14589 * lib/bitset.c (bitset_print):
14590 Use proper printf formats for widths of integer types.
14591 * lib/bitset_stats.c (bitset_percent_histogram_print,
14592 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14593 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14594 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14595 * lib/lbitset.c (lbitset_bytes): Likewise.
14596
14597 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14598 BITSET_SIZE_MAX): New macros.
14599 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14600 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14601 to BITSET_WINDEX_MAX.
14602
14603 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14604 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14605 since we now return the bitset_bindex type (not int).
14606
14607 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14608 when computing sizes.
14609 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14610
14611 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14612 and avoid cast to unsigned.
14613
14614 2002-09-30 Akim Demaille <akim@epita.fr>
14615
14616 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14617 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14618 Updates from Michael Hayes.
14619
14620 2002-09-30 Art Haas <ahaas@neosoft.com>
14621
14622 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14623 invocations.
14624 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14625 defined.
14626
14627 2002-09-27 Akim Demaille <akim@epita.fr>
14628
14629 Version 1.49c.
14630
14631 2002-09-27 Akim Demaille <akim@epita.fr>
14632
14633 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14634 (Because of AC_LIBSOURCE).
14635
14636 2002-09-27 Akim Demaille <akim@epita.fr>
14637
14638 Playing with Autoscan.
14639
14640 * configure.ac: Remove the old LIBOBJ tweaks.
14641 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14642 * lib/strrchr.c: New.
14643 * lib/strtol.c: New, from the Coreutils 4.5.1.
14644
14645 2002-09-27 Akim Demaille <akim@epita.fr>
14646
14647 Playing with Autoscan.
14648
14649 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14650 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14651 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14652 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14653 Coreutils 4.5.1.
14654
14655 2002-09-24 Akim Demaille <akim@epita.fr>
14656
14657 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14658 (Frequently Asked Questions, Parser Stack Overflow): New.
14659
14660 2002-09-13 Akim Demaille <akim@epita.fr>
14661
14662 Playing with autoscan.
14663
14664 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14665 * src/files.c (skeleton_find): Remove, unused.
14666 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14667 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14668
14669 2002-09-13 Akim Demaille <akim@epita.fr>
14670
14671 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14672 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14673
14674 2002-09-13 Akim Demaille <akim@epita.fr>
14675
14676 * configure.ac: Require 2.54.
14677 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14678 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14679 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14680 Remove, provided by Autoconf macros.
14681
14682 2002-09-12 Akim Demaille <akim@epita.fr>
14683
14684 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14685
14686 2002-09-12 Akim Demaille <akim@epita.fr>
14687
14688 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14689 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14690 Reported by Martin Mokrejs.
14691
14692 2002-09-10 Akim Demaille <akim@epita.fr>
14693
14694 * src/parse-gram.y: Associate a human readable string to each
14695 token type.
14696 * tests/regression.at (Invalid inputs): Adjust.
14697
14698 2002-09-10 Gary V. Vaughan <gary@gnu.org>
14699
14700 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14701 with an Autoconf-2.5x style configure.ac.
14702
14703 2002-09-06 Paul Eggert <eggert@twinsun.com>
14704
14705 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14706 exception applies only to yacc.c. This is a modification of a
14707 patch originally suggested by Akim Demaille.
14708
14709 2002-09-06 Akim Demaille <akim@epita.fr>
14710
14711 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14712 here to...
14713 * data/yacc.c: here.
14714
14715 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14716 LocationType.
14717 (b4_ltype): Default to yy::Location from location.hh.
14718
14719 2002-09-04 Jim Meyering <jim@meyering.net>
14720
14721 * data/yacc.c: Guard the declaration of yytoknum also with
14722 `#ifdef YYPRINT', so it is declared only when used.
14723
14724 2002-09-04 Akim Demaille <akim@epita.fr>
14725
14726 * configure.in: Rename as...
14727 * configure.ac: this.
14728 Bump to 1.49c.
14729
14730 2002-09-04 Akim Demaille <akim@epita.fr>
14731
14732 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14733 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14734 translate maintainer only messages.
14735
14736 2002-08-12 Paul Eggert <eggert@twinsun.com>
14737
14738 Version 1.49b.
14739
14740 * Makefile.am (SUBDIRS): Remove intl.
14741 (DISTCLEANFILES): Remove.
14742 * NEWS: Mention that GNU M4 is now required. Clarify what is
14743 meant by "larger grammars". Mention the pt_BR translation.
14744 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14745 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14746 Bump version from 0.11.2 to 0.11.5.
14747 (BISON_PREREQ_STAGE): Remove.
14748 (AM_GNU_GETTEXT): Use external gettext.
14749 (AC_OUTPUT): Remove intl/Makefile.
14750
14751 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14752
14753 * data/glr.c: Include string.h, for strlen.
14754 (yyreportParseError): Use size_t for yysize.
14755 (yy_yypstack): No longer nested inside yypstates, as nested
14756 functions are not portable. Do not assume size_t is the
14757 same width as int.
14758 (yypstates): Do not assume that ptrdiff_t is the same width
14759 as int, and similarly for yyposn and YYINDEX.
14760
14761 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14762
14763 * lib/Makefile.am (INCLUDES): Do not include from the intl
14764 directory, which has been removed.
14765 * src/Makefile.am (INCLUDES): Likewise.
14766
14767 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14768 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14769 New vars.
14770
14771 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14772 * tests/Makefile.am (EXTRA_DIST): Likewise.
14773
14774 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14775 Do not assume that bitset_windex is the same width as unsigned.
14776
14777 * lib/abitset.c (abitset_unused_clear): Do not assume that
14778 bitset_word is the same width as int.
14779 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14780 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14781 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14782 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14783 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14784
14785 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14786 portability to one's complement hosts!).
14787 * lib/ebitset.c (ebitset_op1): Likewise.
14788 * lib/lbitset.c (lbitset_op1): Likewise.
14789
14790 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14791 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14792 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14793 Sync with fileutils.
14794 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14795 lib/gettext.h: Sync with diffutils.
14796
14797 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14798 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14799
14800 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14801 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14802 check for void *.
14803
14804 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14805 size_t; the old version tried to do this but casted improperly.
14806 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14807 (bitset_test): Now returns int, not unsigned long.
14808
14809 * lib/bitset_stats.c: Include "gettext.h".
14810 (_): New macro.
14811 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14812 name locals "index", as it generates unnecessary warnings on some
14813 hosts that have an "index" function.
14814
14815 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14816 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14817 they need translation.
14818 * src/LR0.c (state_list_append, new_itemsets, get_state,
14819 append_states, generate_states): Likewise.
14820 * src/assoc.c (assoc_to_string): Likewise.
14821 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14822 * src/gram.c (grammar_dump): Likewise.
14823 * src/injections.c (injections_compute): Likewise.
14824 * src/lalr.c (lookaheads_print): Likewise.
14825 * src/relation.c (relation_transpose): Likewise.
14826 * src/scan-gram.l: Likewise.
14827 * src/tables.c (table_grow, pack_vector): Likewise.
14828
14829 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14830 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14831 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14832 * m4/mbstate_t.m4: Sync with fileutils.
14833 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14834
14835 * po/LINGUAS: Add pt_BR.
14836 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14837 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14838 lib/timevar.c.
14839 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14840 manual recommends.
14841 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14842
14843 * src/complain.c (strerror_r): Remove decl; not needed.
14844 (strerror): Use same pattern as ../lib/error.c.
14845
14846 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14847
14848 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14849
14850 * src/main.c (main): Cast result of bindtextdomain and textdomain
14851 to void, to avoid a GCC warning when --disable-nls is in effect.
14852
14853 * src/scan-gram.l: Use strings rather than escapes when possible,
14854 to minimize the number of warnings from xgettext.
14855 (handle_action_dollar, handle_action_at): Don't use isdigit,
14856 as it mishandles negative chars and it may not work as expected
14857 outside the C locale.
14858
14859 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14860 this is a GCC extension and is not portable to other compilers.
14861
14862 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14863 Do not include <ctype.h>; no longer needed.
14864 Do not include <malloc.h>; no longer needed (and generates
14865 warnings on OpenBSD 3.0).
14866
14867 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14868 it's not portable.
14869
14870 * tests/regression.at: Do not use 'cc -c input.c -o input';
14871 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14872
14873 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14874 exit status as failure, not just exit status 1. Sun C exits
14875 with status 2 sometimes.
14876
14877 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14878 Use it for the two large tests.
14879
14880 2002-08-02 Akim Demaille <akim@epita.fr>
14881
14882 * src/conflicts.c (conflicts_output): Don't output rules never
14883 reduced here, since anyway that computation doesn't work.
14884 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14885 (rule_useless_p, rule_never_reduced_p): New.
14886 (grammar_rules_partial_print): Use a filter instead of a range.
14887 Display the title only if needed.
14888 (grammar_rules_print): Adjust.
14889 (grammar_rules_never_reduced_report): New.
14890 * src/tables.c (action_row): Move the computation of rules never
14891 reduced to...
14892 (token_actions): here.
14893 * src/main.c (main): Make the parser before making the report, so
14894 that rules never reduced are computed.
14895 Call grammar_rules_never_reduced_report.
14896 * src/print.c (print_results): Report rules never reduced.
14897 * tests/conflicts.at, tests/reduce.at: Adjust.
14898
14899 2002-08-01 Akim Demaille <akim@epita.fr>
14900
14901 Instead of attaching lookaheads and duplicating the rules being
14902 reduced by a state, attach the lookaheads to the reductions.
14903
14904 * src/state.h (state_t): Remove the `lookaheads',
14905 `lookaheads_rule' member.
14906 (reductions_t): Add a `lookaheads' member.
14907 Use a regular array for the `rules'.
14908 * src/state.c (reductions_new): Initialize the lookaheads member
14909 to 0.
14910 (state_rule_lookaheads_print): Adjust.
14911 * src/state.h, src/state.c (state_reductions_find): New.
14912 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14913 (count_rr_conflicts): Adjust.
14914 * src/lalr.c (LArule): Remove.
14915 (add_lookback_edge): Adjust.
14916 (state_lookaheads_count): New.
14917 (states_lookaheads_initialize): Merge into...
14918 (initialize_LA): this.
14919 (lalr_free): Adjust.
14920 * src/main.c (main): Don't free nullable and derives too early: it
14921 is used by --verbose.
14922 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14923
14924 2002-08-01 Akim Demaille <akim@epita.fr>
14925
14926 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14927 `rule_number_t**'.
14928 (set_derives, free_derives): Rename as...
14929 (derives_compute, derives_free): this.
14930 Adjust all dependencies.
14931 * src/nullable.c (set_nullable, free_nullable): Rename as...
14932 (nullable_compute, nullable_free): these.
14933 (rule_list_t): Store rule_t *, not rule_number_t.
14934 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14935 pointers, instead of their numbers.
14936 * src/main.c (main): Call nullable_free, and derives_free earlier,
14937 as they were lo longer used.
14938
14939 2002-08-01 Akim Demaille <akim@epita.fr>
14940
14941 * lib/timevar.c (get_time): Include children time.
14942 * src/lalr.h (LA, LArule): Don't export them: used with the
14943 state_t.
14944 * src/lalr.c (LA, LArule): Static.
14945 * src/lalr.h, src/lalr.c (lalr_free): New.
14946 * src/main.c (main): Call it.
14947 * src/tables.c (pack_vector): Check whether loc is >= to the
14948 table_size, not >.
14949 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14950 (tables_generate): do it, since that's also it which allocates
14951 them.
14952 Don't free LA and LArule, main does.
14953
14954 2002-07-31 Akim Demaille <akim@epita.fr>
14955
14956 Separate parser tables computation and output.
14957
14958 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14959 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14960 (yydefgoto, yydefact, high): Move to...
14961 * src/tables.h, src/tables.c: here.
14962 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14963 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14964 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14965 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14966 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14967 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14968 (action_row, save_row, token_actions, save_column, default_goto)
14969 (goto_actions, sort_actions, matching_state, pack_vector)
14970 (table_ninf_remap, pack_table, prepare_actions): Move to...
14971 * src/tables.c: here.
14972 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14973 * src/output.c (token_actions, output_base, output_conflicts)
14974 (output_check): Merge into...
14975 (prepare_actions): this.
14976 (actions_output): Rename as...
14977 (user_actions_output): this.
14978 * src/main.c (main): Call tables_generate and tables_free.
14979
14980 2002-07-31 Akim Demaille <akim@epita.fr>
14981
14982 Steal GCC's --time-report support.
14983
14984 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14985 stolen/adjusted from GCC.
14986 * m4/stage.m4: Remove time related checks.
14987 * m4/timevar.m4: New.
14988 * configure.in: Adjust.
14989 * src/system.h: Adjust to using timevar.h.
14990 * src/getargs.h, src/getargs.c: Support trace_time for
14991 --trace=time.
14992 * src/main.c (stage): Remove.
14993 (main): Replace `stage' invocations with timevar calls.
14994 * src/output.c: Insert pertinent timevar calls.
14995
14996 2002-07-31 Akim Demaille <akim@epita.fr>
14997
14998 Let --trace have arguments.
14999
15000 * src/getargs.h (enum trace_e): New.
15001 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15002 (long_options, short_options): --trace/-T takes an optional
15003 argument.
15004 Change all the uses of trace_flag to reflect the new flags.
15005 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15006
15007 Strengthen `stage' portability.
15008
15009 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15010 * configure.in: Use it.
15011 Don't check for malloc.h and sys/times.h.
15012 * src/system.h: Include them when appropriate.
15013 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15014 times and struct tms are available.
15015
15016 2002-07-30 Akim Demaille <akim@epita.fr>
15017
15018 In verbose parse error message, don't report `error' as an
15019 expected token.
15020 * tests/actions.at (Printers and Destructors): Adjust.
15021 * tests/calc.at (Calculator $1): Adjust.
15022 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15023 error message, do not report the parser accepts the error token in
15024 that state.
15025
15026 2002-07-30 Akim Demaille <akim@epita.fr>
15027
15028 Normalize conflict related messages.
15029
15030 * src/complain.h, src/complain.c (warn, complain): New.
15031 * src/conflicts.c (conflicts_print): Use them.
15032 (conflict_report_yacc): New, extracted from...
15033 (conflicts_print): here.
15034 * tests/conflicts.at, tests/existing.at: Adjust.
15035
15036 2002-07-30 Akim Demaille <akim@epita.fr>
15037
15038 Report rules which are never reduced by the parser: those hidden
15039 by conflicts.
15040
15041 * src/LR0.c (save_reductions): Don't make the final state too
15042 different: save its reduction (accept) instead of having a state
15043 without any action (no shift or goto, no reduce).
15044 Note: the final state is now a ``regular'' state, i.e., the
15045 parsers now contain `reduce 0' as default reduction.
15046 Nevertheless, since they decide to `accept' when yystate =
15047 final_state, they still will not reduce rule 0.
15048 * src/print.c (print_actions, print_reduction): Adjust.
15049 * src/output.c (action_row): Track reduced rules.
15050 (token_actions): Report rules never reduced.
15051 * tests/conflicts.at, tests/regression.at: Adjust.
15052
15053 2002-07-30 Akim Demaille <akim@epita.fr>
15054
15055 `stage' was accidently included in a previous patch.
15056 Initiate its autoconfiscation.
15057
15058 * configure.in: Look for malloc.h and sys/times.h.
15059 * src/main.c (stage): Adjust.
15060 Report only when trace_flag.
15061
15062 2002-07-29 Akim Demaille <akim@epita.fr>
15063
15064 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15065 state_number_t.
15066 (errs_t): symbol_t*, not symbol_number_t.
15067 (reductions_t): rule_t*, not rule_number_t.
15068 (FOR_EACH_SHIFT): New.
15069 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15070 * src/print.c, src/print_graph.c: Adjust.
15071
15072 2002-07-29 Akim Demaille <akim@epita.fr>
15073
15074 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15075
15076 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15077 (endtoken, accept): these.
15078 * src/reader.c (reader): Set endtoken's default tag to "$end".
15079 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15080 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15081 Adjust.
15082
15083 2002-07-29 Akim Demaille <akim@epita.fr>
15084
15085 * src/reduce.c (reduce_grammar): When the language is empty,
15086 complain about the start symbol, not the axiom.
15087 Use its location.
15088 * tests/reduce.at (Empty Language): New.
15089
15090 2002-07-26 Akim Demaille <akim@epita.fr>
15091
15092 * src/reader.h, src/reader.c (gram_error): ... can't get
15093 yycontrol without making too strong assumptions on the parser
15094 itself.
15095 * src/output.c (prepare_tokens): Use the real 0th value of
15096 token_translations instead of `0'.
15097 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15098 visible here.
15099 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15100 for the time being: %locations ought to provide it to yyerror.
15101
15102 2002-07-25 Akim Demaille <akim@epita.fr>
15103
15104 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15105 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15106 * tests/regression.at (Web2c Actions): Adjust.
15107
15108 2002-07-25 Akim Demaille <akim@epita.fr>
15109
15110 Stop storing rules from 1 to nrules + 1.
15111
15112 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15113 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15114 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15115 Iterate from 0 to nrules.
15116 Use rule_number_as_item_number and item_number_as_rule_number.
15117 Adjust to `derive' now containing possibly 0.
15118 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15119 Handle the `- 1' part in rule numbers from/to item numbers.
15120 * src/conflicts.c (log_resolution): Fix the message which reversed
15121 shift and reduce.
15122 * src/output.c (action_row): Initialize default_rule to -1.
15123 (token_actions): Adjust.
15124 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15125 expected output.
15126 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15127
15128 2002-07-25 Akim Demaille <akim@epita.fr>
15129
15130 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15131 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15132 (b4_c_knr_arg_decl): New.
15133 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15134 yyreport_parse_error.
15135
15136 2002-07-25 Akim Demaille <akim@epita.fr>
15137
15138 * data/yacc.c (yyreport_parse_error): New, extracted from...
15139 (yyparse): here.
15140 (yydestruct, yysymprint): Move above yyparse.
15141 Be K&R compliant.
15142
15143 2002-07-25 Akim Demaille <akim@epita.fr>
15144
15145 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15146 replace...
15147 (b4_sint_type, b4_uint_type): these.
15148 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15149 * tests/regression.at (Web2c Actions): Adjust.
15150
15151 2002-07-25 Akim Demaille <akim@epita.fr>
15152
15153 * src/gram.h (TIEM_NUMBER_MAX): New.
15154 (item_number_of_rule_number, rule_number_of_item_number): Rename
15155 as...
15156 (rule_number_as_item_number, item_number_as_rule_number): these.
15157 Adjust dependencies.
15158 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15159 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15160 (symbol_number_to_vector_number): New.
15161 (order): Of vector_number_t* type.
15162 (base_t, BASE_MAX, BASE_MIN): New.
15163 (froms, tos, width, pos, check): Of base_t type.
15164 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15165 (actrow): Of action_number_t type.
15166 (conflrow): Of unsigned int type.
15167 (table_ninf, base_ninf): New.
15168 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15169 (muscle_insert_int_table, muscle_insert_base_table)
15170 (muscle_insert_rule_number_table): New.
15171 (prepare_tokens): Output `toknum' as int_table.
15172 (action_row): Returns a rule_number_t.
15173 Use ACTION_MIN, not SHRT_MIN.
15174 (token_actions): yydefact is rule_number_t*.
15175 (table_ninf_remap): New.
15176 (pack_table): Use it for `base' and `table'.
15177 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15178 replaced with...
15179 (YYPACT_NINF, YYTABLE_NINF): these.
15180 (yypact, yytable): Compute their types instead of hard-coded
15181 `short'.
15182 * tests/regression.at (Web2c Actions): Adjust.
15183
15184 2002-07-19 Akim Demaille <akim@epita.fr>
15185
15186 * src/scan-gram.l (id): Can start with an underscore.
15187
15188 2002-07-16 Akim Demaille <akim@epita.fr>
15189
15190 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15191 Adjust all former `associativity' dependencies.
15192 * src/symtab.c (symbol_new): Default associativity is `undef', not
15193 `right'.
15194 (symbol_check_alias_consistence): Adjust.
15195
15196 2002-07-09 Akim Demaille <akim@epita.fr>
15197
15198 * doc/bison.texinfo: Properly set the ``header'' part.
15199 Use @dircategory ``GNU programming tools'' as per Texinfo's
15200 documentation.
15201 Use @copying.
15202
15203 2002-07-09 Akim Demaille <akim@epita.fr>
15204
15205 * lib/quotearg.h: Protect against multiple inclusions.
15206 * src/location.h (location_t): Add a `file' member.
15207 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15208 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15209 `error_one_per_line' support.
15210
15211 2002-07-09 Akim Demaille <akim@epita.fr>
15212
15213 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15214 * src/reader.c (lineno): Remove.
15215 Adjust all dependencies.
15216 (get_merge_function): Take a location and use complain_at.
15217 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15218 * tests/regression.at (Invalid inputs, Mixing %token styles):
15219 Adjust.
15220
15221 2002-07-09 Akim Demaille <akim@epita.fr>
15222
15223 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15224 recovery rule, and forbid extensions when --yacc.
15225 (gram_error): Use complain_at.
15226 * src/reader.c (reader): Exit if there were parse errors.
15227
15228 2002-07-09 Akim Demaille <akim@epita.fr>
15229
15230 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15231 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15232 Reported by R Blake <blakers@mac.com>.
15233
15234 2002-07-09 Akim Demaille <akim@epita.fr>
15235
15236 * data/yacc.c: Output the copyright notive in the header.
15237
15238 2002-07-03 Akim Demaille <akim@epita.fr>
15239
15240 * src/output.c (froms, tos): Are state_number_t.
15241 (save_column): sp, sp1, and sp2 are state_number_t.
15242 (prepare): Rename `final' as `final_state_number', `nnts' as
15243 `nterms_number', `nrules' as `rules_number', `nstates' as
15244 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15245 unused.
15246 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15247 * data/lalr1.cc (nsym_): Remove, unused.
15248
15249 2002-07-03 Akim Demaille <akim@epita.fr>
15250
15251 * src/lalr.h, src/lalr.c (goto_number_t): New.
15252 * src/lalr.c (goto_list_t): New.
15253 Propagate them.
15254 * src/nullable.c (rule_list_t): New.
15255 Propagate.
15256 * src/types.h: Remove.
15257
15258 2002-07-03 Akim Demaille <akim@epita.fr>
15259
15260 * src/closure.c (print_fderives): Use rule_rhs_print.
15261 * src/derives.c (print_derives): Use rule_rhs_print.
15262 (rule_list_t): New, replaces `shorts'.
15263 (set_derives): Add comments.
15264 * tests/sets.at (Nullable, Firsts): Adjust.
15265
15266 2002-07-03 Akim Demaille <akim@epita.fr>
15267
15268 * src/output.c (prepare_actions): Free `tally' and `width'.
15269 (prepare_actions): Allocate and free `order'.
15270 * src/symtab.c (symbols_free): Free `symbols'.
15271 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15272 * src/output.c (m4_invoke): Move to...
15273 * src/scan-skel.l: here.
15274 (<<EOF>>): Close yyout, and free its name.
15275
15276 2002-07-03 Akim Demaille <akim@epita.fr>
15277
15278 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15279
15280 * src/LR0.c (new_state): Merge into...
15281 (state_list_append): this.
15282 (new_states): Merge into...
15283 (generate_states): here.
15284 (set_states): Don't ensure a proper `errs' state member here, do it...
15285 * src/conflicts.c (conflicts_solve): here.
15286 * src/state.h, src/state.c: Comment changes.
15287 (state_t): Rename member `shifts' as `transitions'.
15288 Adjust all dependencies.
15289 (errs_new): For consistency, also take the values as argument.
15290 (errs_dup): Remove.
15291 (state_errs_set): New.
15292 (state_reductions_set, state_transitions_set): Assert that no
15293 previous value was assigned.
15294 (state_free): New.
15295 (states_free): Use it.
15296 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15297 temporary storage: use `errs' and `nerrs' as elsewhere.
15298 (set_conflicts): Allocate and free this `errs'.
15299
15300 2002-07-02 Akim Demaille <akim@epita.fr>
15301
15302 * lib/libiberty.h: New.
15303 * lib: Update the bitset implementation from upstream.
15304 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15305 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15306 * src/main.c: Adjust bitset stats calls.
15307
15308 2002-07-01 Paul Eggert <eggert@twinsun.com>
15309
15310 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15311 char, so that negative chars don't collide with $.
15312
15313 2002-06-30 Akim Demaille <akim@epita.fr>
15314
15315 Have the GLR tests be `warning' checked, and fix the warnings.
15316
15317 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15318 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15319 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15320 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15321 (yyaddDeferredAction): static.
15322 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15323 (yyreportParseError): yyprefix is const.
15324 yytokenp is used only when verbose.
15325 (yy__GNUC__): Replace with __GNUC__.
15326 (yypdumpstack): yyi is size_t.
15327 (yypreference): Un-yy local variables and arguments, to avoid
15328 clashes with `yyr1'. Anyway, we are not in the user name space.
15329 (yytname_size): be an int, as is compared with ints.
15330 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15331 Use them.
15332 * tests/cxx-gram.at: Use quotation to protect $1.
15333 Use AT_COMPILE to enable warnings hunts.
15334 Prototype yylex and yyerror.
15335 `Use' argc.
15336 Include `string.h', not `strings.h'.
15337 Produce and prototype stmtMerge only when used.
15338 yylex takes a location.
15339
15340 2002-06-30 Akim Demaille <akim@epita.fr>
15341
15342 We spend a lot of time in quotearg, in particular when --verbose.
15343
15344 * src/symtab.c (symbol_get): Store a quoted version of the key.
15345 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15346 Adjust all callers.
15347
15348 2002-06-30 Akim Demaille <akim@epita.fr>
15349
15350 * src/state.h (reductions_t): Rename member `nreds' as num.
15351 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15352 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15353
15354 2002-06-30 Akim Demaille <akim@epita.fr>
15355
15356 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15357 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15358 (shifts_to): Rename as...
15359 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15360 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15361 (TRANSITION_IS_DISABLED, transitions_to): these.
15362
15363 2002-06-30 Akim Demaille <akim@epita.fr>
15364
15365 * src/print.c (print_shifts, print_gotos): Merge into...
15366 (print_transitions): this.
15367 (print_transitions, print_errs, print_reductions): Align the
15368 lookaheads columns.
15369 (print_core, print_transitions, print_errs, print_state,
15370 print_grammar): Output empty lines separator before, not after.
15371 (state_default_rule_compute): Rename as...
15372 (state_default_rule): this.
15373 * tests/conflicts.at (Defaulted Conflicted Reduction),
15374 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15375 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15376
15377 2002-06-30 Akim Demaille <akim@epita.fr>
15378
15379 Display items as we display rules.
15380
15381 * src/gram.h, src/gram.c (rule_lhs_print): New.
15382 * src/gram.c (grammar_rules_partial_print): Use it.
15383 * src/print.c (print_core): Likewise.
15384 * tests/conflicts.at (Defaulted Conflicted Reduction),
15385 (Unresolved SR Conflicts): Adjust.
15386 (Unresolved SR Conflicts): Adjust and rename as...
15387 (Resolved SR Conflicts): this, as was meant.
15388 * tests/regression.at (Web2c Report): Adjust.
15389
15390 2002-06-30 Akim Demaille <akim@epita.fr>
15391
15392 * src/print.c (state_default_rule_compute): New, extracted from...
15393 (print_reductions): here.
15394 Pessimize, but clarify the code.
15395 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15396
15397 2002-06-30 Akim Demaille <akim@epita.fr>
15398
15399 * src/output.c (action_row): Let default_rule be always a rule
15400 number.
15401
15402 2002-06-30 Akim Demaille <akim@epita.fr>
15403
15404 * src/closure.c (print_firsts, print_fderives, closure):
15405 Use BITSET_EXECUTE.
15406 * src/lalr.c (lookaheads_print): Likewise.
15407 * src/state.c (state_rule_lookaheads_print): Likewise.
15408 * src/print_graph.c (print_core): Likewise.
15409 * src/print.c (print_reductions): Likewise.
15410 * src/output.c (action_row): Likewise.
15411 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15412
15413 2002-06-30 Akim Demaille <akim@epita.fr>
15414
15415 * src/print_graph.c: Use report_flag.
15416
15417 2002-06-30 Akim Demaille <akim@epita.fr>
15418
15419 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15420 to...
15421 * src/relation.h, src/relation.c (traverse, relation_digraph)
15422 (relation_print, relation_transpose): New.
15423
15424 2002-06-30 Akim Demaille <akim@epita.fr>
15425
15426 * src/state.h, src/state.c (shifts_to): New.
15427 * src/lalr.c (build_relations): Use it.
15428
15429 2002-06-30 Akim Demaille <akim@epita.fr>
15430
15431 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15432 (item_number_of_rule_number, rule_number_of_item_number): New.
15433 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15434 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15435 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15436 Propagate their use.
15437 Much remains to be done, in particular wrt `shorts' from types.h.
15438
15439 2002-06-30 Akim Demaille <akim@epita.fr>
15440
15441 * src/symtab.c (symbol_new): Initialize the `printer' member.
15442
15443 2002-06-30 Akim Demaille <akim@epita.fr>
15444
15445 * src/LR0.c (save_reductions): Remove, replaced by...
15446 * src/state.h, src/state.c (state_reductions_set): New.
15447 (reductions, errs): Rename as...
15448 (reductions_t, errs_t): these.
15449 Adjust all dependencies.
15450
15451 2002-06-30 Akim Demaille <akim@epita.fr>
15452
15453 * src/LR0.c (state_list_t, state_list_append): New.
15454 (first_state, last_state): Now symbol_list_t.
15455 (this_state): Remove.
15456 (new_itemsets, append_states, save_reductions): Take a state_t as
15457 argument.
15458 (set_states, generate_states): Adjust.
15459 (save_shifts): Remove, replaced by...
15460 * src/state.h, src/state.c (state_shifts_set): New.
15461 (shifts): Rename as...
15462 (shifts_t): this.
15463 Adjust all dependencies.
15464 * src/state.h (state_t): Remove the `next' member.
15465
15466 2002-06-30 Akim Demaille <akim@epita.fr>
15467
15468 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15469 escaped in slot 0.
15470
15471 2002-06-30 Akim Demaille <akim@epita.fr>
15472
15473 Use hash.h for the state hash table.
15474
15475 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15476 (allocate_storage): Use state_hash_new.
15477 (free_storage): Use state_hash_free.
15478 (new_state, get_state): Adjust.
15479 * src/lalr.h, src/lalr.c (states): Move to...
15480 * src/states.h (state_t): Remove the `link' member, no longer
15481 used.
15482 * src/states.h, src/states.c: here.
15483 (state_hash_new, state_hash_free, state_hash_lookup)
15484 (state_hash_insert, states_free): New.
15485 * src/states.c (state_table, state_compare, state_hash): New.
15486 * src/output.c (output_actions): Do not free states now, since we
15487 still need to know the final_state number in `prepare', called
15488 afterwards. Do it...
15489 * src/main.c (main): here: call states_free after `output'.
15490
15491 2002-06-30 Akim Demaille <akim@epita.fr>
15492
15493 * src/state.h, src/state.c (state_new): New, extracted from...
15494 * src/LR0.c (new_state): here.
15495 * src/state.h (STATE_ALLOC): Move to...
15496 * src/state.c: here.
15497 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15498 * src/state.h, src/state.c: here.
15499
15500 2002-06-30 Akim Demaille <akim@epita.fr>
15501
15502 * src/reader.c (gensym): Rename as...
15503 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15504 (getsym): Rename as...
15505 (symbol_get): this.
15506
15507 2002-06-30 Akim Demaille <akim@epita.fr>
15508
15509 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15510 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15511 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15512 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15513
15514 2002-06-30 Akim Demaille <akim@epita.fr>
15515
15516 Make the test suite pass with warnings checked.
15517
15518 * tests/actions.at (Printers and Destructors): Improve.
15519 Avoid unsigned vs. signed issues.
15520 * tests/calc.at: Don't exercise the scanner here, do it...
15521 * tests/input.at (Torturing the Scanner): here.
15522
15523 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15524
15525 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15526 reorganize first lines parallel to yacc.c.
15527
15528 2002-06-28 Akim Demaille <akim@epita.fr>
15529
15530 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15531 (b4_token_enum, b4_token_defines): New, factored from...
15532 * data/lalr1.cc, data/yacc.c, glr.c: here.
15533
15534 2002-06-28 Akim Demaille <akim@epita.fr>
15535
15536 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15537 unused variables.
15538 * src/output.c (merger_output): static.
15539
15540 2002-06-28 Akim Demaille <akim@epita.fr>
15541
15542 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15543 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15544 pacify GCC.
15545 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15546
15547 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15548
15549 Accumulated changelog for new GLR parsing features.
15550
15551 * src/conflicts.c (count_total_conflicts): Change name to
15552 conflicts_total_count.
15553 * src/conflicts.h: Ditto.
15554 * src/output.c (token_actions): Use the new name.
15555 (output_conflicts): Change conflp => conflict_list_heads, and
15556 confl => conflict_list for better readability.
15557 * data/glr.c: Use the new names.
15558 * NEWS: Add self to GLR announcement.
15559
15560 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15561
15562 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15563 Akim Demaille.
15564
15565 * data/bison.glr: Change name to glr.c
15566 * data/glr.c: Renamed from bison.glr.
15567 * data/Makefile.am: Add glr.c
15568
15569 * src/getargs.c:
15570
15571 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15572 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15573
15574 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15575
15576 * data/bison.glr: Be sure to restore the
15577 current #line when returning to the skeleton contents after having
15578 exposed the input file's #line.
15579
15580 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15581
15582 * data/bison.glr: Bring up to date with changes to bison.simple.
15583
15584 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15585
15586 * data/bison.glr: Correct definitions that use b4_prefix.
15587 Various reformatting.
15588 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15589 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15590 yytokenp argument; now part of stack.
15591 (yychar): Define to behave as documented.
15592 (yyclearin): Ditto.
15593
15594 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15595
15596 * src/reader.h: Add declaration for free_merger_functions.
15597
15598 * src/reader.c (merge_functions): New variable.
15599 (get_merge_function): New function.
15600 (free_merger_functions): New function.
15601 (readgram): Check for %prec that is not followed by a symbol.
15602 Handle %dprec and %merge declarations.
15603 (packgram): Initialize dprec and merger fields in rules array.
15604
15605 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15606 conflict_list_cnt, conflict_list_free): New variables.
15607 (table_grow): Also grow conflict_table.
15608 (prepare_rules): Output dprec and merger tables.
15609 (conflict_row): New function.
15610 (action_row): Output conflict lists for GLR parser. Don't use
15611 default reduction in conflicted states for GLR parser so that there
15612 are spaces for the conflict lists.
15613 (save_row): Also save conflict information.
15614 (token_actions): Allocate conflict list.
15615 (merger_output): New function.
15616 (pack_vector): Pack conflict table, too.
15617 (output_conflicts): New function to output yyconflp and yyconfl.
15618 (output_check): Allocate conflict_tos.
15619 (output_actions): Output conflict tables, also.
15620 (output_skeleton): Output b4_mergers definition.
15621 (prepare): Output b4_max_rhs_length definition.
15622 Use 'bison.glr' as default skeleton for GLR parsers.
15623
15624 * src/gram.c (glr_parser): New flag.
15625 (grammar_free): Call free_merger_functions.
15626
15627 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15628 all pairs of conflicting reductions, rather than just all tokens
15629 causing conflicts. Needed to size conflict tables.
15630 (conflicts_output): Modify call to count_rr_conflicts for new
15631 interface.
15632 (conflicts_print): Ditto.
15633 (count_total_conflicts): New function.
15634
15635 * src/reader.h (merger_list): New type.
15636 (merge_functions): New variable.
15637
15638 * src/lex.h (tok_dprec, tok_merge): New token types.
15639
15640 * src/gram.h (rule_s): Add dprec and merger fields.
15641 (glr_parser): New flag.
15642
15643 * src/conflicts.h (count_total_conflicts): New function.
15644
15645 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15646
15647 * doc/bison.texinfo (Generalized LR Parsing): New section.
15648 (GLR Parsers): New section.
15649 (Language and Grammar): Mention GLR parsing.
15650 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15651 Correct typo ("tge" -> "the").
15652
15653 * data/bison.glr: New skeleton for GLR parsing.
15654
15655 * tests/cxx-gram.at: New tests for GLR parsing.
15656
15657 * tests/testsuite.at: Include cxx-gram.at.
15658
15659 * tests/Makefile.am: Add cxx-gram.at.
15660
15661 * src/parse-gram.y:
15662
15663 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15664
15665 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
15666
15667 2002-06-27 Akim Demaille <akim@epita.fr>
15668
15669 * src/options.h, src/options.c: Remove.
15670 * src/getargs.c (short_options, long_options): New.
15671
15672 2002-06-27 Akim Demaille <akim@epita.fr>
15673
15674 * data/bison.simple, data/bison.c++: Rename as...
15675 * data/yacc.c, data/lalr1.cc: these.
15676 * doc/bison.texinfo (Environment Variables): Remove.
15677
15678 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15679
15680 * src/getargs.c (report_argmatch): Initialize strtok().
15681
15682 2002-06-20 Akim Demaille <akim@epita.fr>
15683
15684 * data/bison.simple (b4_symbol_actions): New, replaces...
15685 (b4_symbol_destructor, b4_symbol_printer): these.
15686 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15687 user token numbers.
15688
15689 2002-06-20 Akim Demaille <akim@epita.fr>
15690
15691 * data/bison.simple (yydestructor): Rename as...
15692 (yydestruct): this.
15693
15694 2002-06-20 Akim Demaille <akim@epita.fr>
15695
15696 * src/symtab.h, src/symtab.c (symbol_type_set)
15697 (symbol_destructor_set, symbol_precedence_set): The location is
15698 the last argument.
15699 Adjust all callers.
15700
15701 2002-06-20 Akim Demaille <akim@epita.fr>
15702
15703 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15704 internals.
15705 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15706 Takes a location.
15707 * src/symtab.h, src/symtab.c (symbol_class_set)
15708 (symbol_user_token_number_set): Likewise.
15709 Adjust all callers.
15710 Promote complain_at.
15711 * tests/input.at (Type Clashes): Adjust.
15712
15713 2002-06-20 Akim Demaille <akim@epita.fr>
15714
15715 * data/bison.simple (YYLEX): Fix the declaration when
15716 %pure-parser.
15717
15718 2002-06-20 Akim Demaille <akim@epita.fr>
15719
15720 * data/bison.simple (yysymprint): Don't print the token number,
15721 just its name.
15722 * tests/actions.at (Destructors): Rename as...
15723 (Printers and Destructors): this.
15724 Also exercise %printer.
15725
15726 2002-06-20 Akim Demaille <akim@epita.fr>
15727
15728 * data/bison.simple (YYDSYMPRINT): New.
15729 Use it to remove many of the #if YYDEBUG/if (yydebug).
15730
15731 2002-06-20 Akim Demaille <akim@epita.fr>
15732
15733 * src/symtab.h, src/symtab.c (symbol_t): printer and
15734 printer_location are new members.
15735 (symbol_printer_set): New.
15736 * src/parse-gram.y (PERCENT_PRINTER): New token.
15737 Handle its associated rule.
15738 * src/scan-gram.l: Adjust.
15739 (handle_destructor_at, handle_destructor_dollar): Rename as...
15740 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15741 * src/output.c (symbol_printers_output): New.
15742 (output_skeleton): Call it.
15743 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15744 since there are already many grammar files with a user `yyprint'.
15745 Replace the calls to YYPRINT to calls to yysymprint.
15746 * tests/calc.at: Adjust.
15747 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15748 taking advantage of parser very internal details (stack size!).
15749
15750 2002-06-20 Akim Demaille <akim@epita.fr>
15751
15752 * src/scan-gram.l: Complete the scanner with the missing patterns
15753 to pacify Flex.
15754 Use `quote' and `symbol_tag_get' where appropriate.
15755
15756 2002-06-19 Akim Demaille <akim@epita.fr>
15757
15758 * tests/actions.at (Destructors): Augment to test locations.
15759 * data/bison.simple (yydestructor): Pass it the current location
15760 if locations are enabled.
15761 Prototype only when __STDC__ or C++.
15762 Change the argument names to move into the yy name space: there is
15763 user code here.
15764
15765 2002-06-19 Akim Demaille <akim@epita.fr>
15766
15767 * data/bison.simple (b4_pure_if): New.
15768 Use it instead of #ifdef YYPURE.
15769
15770 2002-06-19 Akim Demaille <akim@epita.fr>
15771
15772 * data/bison.simple (b4_location_if): New.
15773 Use it instead of #ifdef YYLSP_NEEDED.
15774
15775 2002-06-19 Akim Demaille <akim@epita.fr>
15776
15777 Prepare @$ in %destructor, but currently don't bind it in the
15778 skeleton, as %location use is not cleaned up yet.
15779
15780 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15781 (handle_action_at): New.
15782 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15783 a braced_code_t and a location as additional arguments.
15784 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15785 unquote one when outputting `b4_dollar_dollar'.
15786 Adjust callers.
15787 * data/bison.simple (b4_eval): Remove.
15788 (b4_symbol_destructor): Adjust.
15789 * tests/input.at (Invalid @n): Adjust.
15790
15791 2002-06-19 Zack Weinberg <zack@codesourcery.com>
15792
15793 * doc/bison.texinfo: Document ability to have multiple
15794 prologue sections.
15795
15796 2002-06-18 Akim Demaille <akim@epita.fr>
15797
15798 * src/files.c (compute_base_names): When computing the output file
15799 names from the input file name, strip the directory part.
15800
15801 2002-06-18 Akim Demaille <akim@epita.fr>
15802
15803 * data/bison.simple.new: Comment changes.
15804 Reported by Andreas Schwab.
15805
15806 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15807
15808 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15809 there are no `label `yyoverflowlab' defined but not used' warnings
15810 when yyoverflow is defined.
15811
15812 2002-06-18 Akim Demaille <akim@epita.fr>
15813
15814 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15815 new member.
15816 (symbol_destructor_set): Adjust.
15817 * src/output.c (symbol_destructors_output): Output the destructor
15818 locations.
15819 Output the symbol name.
15820 * data/bison.simple (b4_symbol_destructor): Adjust.
15821
15822 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15823 and Akim Demaille <akim@epita.fr>
15824
15825 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15826 what's left on the stack when the error recovery hits EOF.
15827 * tests/actions.at (Destructors): Complete to exercise this case.
15828
15829 2002-06-17 Akim Demaille <akim@epita.fr>
15830
15831 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15832 arguments is really empty, not only equal to `[]'.
15833 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15834 member.
15835 (symbol_destructor_set): New.
15836 * src/output.c (symbol_destructors_output): New.
15837 * src/reader.h (brace_code_t, current_braced_code): New.
15838 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15839 (handle_dollar): Rename as...
15840 (handle_action_dollar): this.
15841 (handle_destructor_dollar): New.
15842 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15843 (grammar_declaration): Use it.
15844 * data/bison.simple (yystos): Is always defined.
15845 (yydestructor): New.
15846 * tests/actions.at (Destructors): New.
15847 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15848
15849 2002-06-17 Akim Demaille <akim@epita.fr>
15850
15851 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15852 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15853 rule_length only when needed.
15854 * src/output.c (actions_output, token_definitions_output): Output
15855 the full M4 block.
15856 * src/symtab.c: Don't access directly to the symbol tag, use
15857 symbol_tag_get.
15858 * src/parse-gram.y: Use symbol_list_free.
15859
15860 2002-06-17 Akim Demaille <akim@epita.fr>
15861
15862 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15863 (symbol_list_prepend, get_type_name): Move to...
15864 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15865 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15866 Adjust all callers.
15867 (symbol_list_free): New.
15868 * src/scan-gram.l (handle_dollar): Takes a location.
15869 * tests/input.at (Invalid $n): Adjust.
15870
15871 2002-06-17 Akim Demaille <akim@epita.fr>
15872
15873 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15874 (symbol_list_prepend): New.
15875 * src/parse-gram.y (%union): `list' is a new member.
15876 (symbols.1): New, replaces...
15877 (terms_to_prec.1, nterms_to_type.1): these.
15878 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15879 Take a location as additional argument.
15880 Adjust all callers.
15881
15882 2002-06-15 Akim Demaille <akim@epita.fr>
15883
15884 * src/parse-gram.y: Move %token in the declaration section so that
15885 we don't depend upon CVS Bison.
15886
15887 2002-06-15 Akim Demaille <akim@epita.fr>
15888
15889 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15890 * src/print.c (print_core): Use it.
15891
15892 2002-06-15 Akim Demaille <akim@epita.fr>
15893
15894 * src/conflicts.c (log_resolution): Accept the rule involved in
15895 the sr conflicts instead of the lookahead number that points to
15896 that rule.
15897 (flush_reduce): Accept the current lookahead vector as argument,
15898 instead of the index in LA.
15899 (resolve_sr_conflict): Accept the current number of lookahead
15900 bitset to consider for the STATE, instead of the index in LA.
15901 (set_conflicts): Adjust.
15902 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15903
15904 2002-06-15 Akim Demaille <akim@epita.fr>
15905
15906 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15907 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15908 Adjust all dependencies.
15909 * src/lalr.c (initialize_lookaheads): Split into...
15910 (states_lookaheads_count, states_lookaheads_initialize): these.
15911 (lalr): Adjust.
15912
15913 2002-06-15 Akim Demaille <akim@epita.fr>
15914
15915 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15916 out of...
15917 (grammar_rules_print): here.
15918 * src/reduce.c (reduce_output): Use it.
15919 * tests/reduce.at (Useless Rules, Reduced Automaton)
15920 (Underivable Rules): Adjust.
15921
15922 2002-06-15 Akim Demaille <akim@epita.fr>
15923
15924 Copy BYacc's nice way to report the grammar.
15925
15926 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15927 New.
15928 Don't print the rules' location, it is confusing and useless.
15929 (rule_print): Use grammar_rhs_print.
15930 * src/print.c (print_grammar): Use grammar_rules_print.
15931
15932 2002-06-15 Akim Demaille <akim@epita.fr>
15933
15934 Complete and rationalize `useless thing' warnings.
15935
15936 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15937 (symbol_tag_print): New.
15938 Use them everywhere in place of accessing directly the tag member.
15939 * src/gram.h, src/gram.c (rule_print): New.
15940 Use it where a rule used to be printed `by hand'.
15941 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15942 (reduce_grammar_tables): Report the useless rules.
15943 (reduce_print): Useless things are a warning, not an error.
15944 Report it as such.
15945 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15946 (Reduced Automaton, Underivable Rules): Adjust.
15947 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15948 * tests/conflicts.at (Unresolved SR Conflicts)
15949 (Solved SR Conflicts): Adjust.
15950
15951 2002-06-15 Akim Demaille <akim@epita.fr>
15952
15953 Let symbols have a location.
15954
15955 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15956 (getsym): Adjust.
15957 Adjust all callers.
15958 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15959 Use location_t, not int.
15960 * src/symtab.c (symbol_check_defined): Take advantage of the
15961 location.
15962 * tests/regression.at (Invalid inputs): Adjust.
15963
15964 2002-06-15 Akim Demaille <akim@epita.fr>
15965
15966 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15967 (input): Don't try to initialize yylloc here, do it in the
15968 scanner.
15969 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15970 * src/gram.h (rule_t): Change line and action_line into location
15971 and action_location, of location_t type.
15972 Adjust all dependencies.
15973 * src/location.h, src/location.c (empty_location): New.
15974 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15975 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15976 (grammar_current_rule_symbol_append)
15977 (grammar_current_rule_action_append): Expect a location as argument.
15978 * src/reader.c (grammar_midrule_action): Adjust to attach an
15979 action's location as dummy symbol location.
15980 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15981 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15982 the line numbers.
15983
15984 2002-06-14 Akim Demaille <akim@epita.fr>
15985
15986 Grammar declarations may be found in the grammar section.
15987
15988 * src/parse-gram.y (rules_or_grammar_declaration): New.
15989 (declarations): Each declaration may end with a semicolon, not
15990 just...
15991 (grammar_declaration): `"%union"'.
15992 (grammar): Branch to rules_or_grammar_declaration.
15993
15994 2002-06-14 Akim Demaille <akim@epita.fr>
15995
15996 * src/main.c (main): Invoke scanner_free.
15997
15998 2002-06-14 Akim Demaille <akim@epita.fr>
15999
16000 * src/output.c (m4_invoke): Extracted from...
16001 (output_skeleton): here.
16002 Free tempfile.
16003
16004 2002-06-14 Akim Demaille <akim@epita.fr>
16005
16006 * src/parse-gram.y (directives, directive, gram)
16007 (grammar_directives, precedence_directives, precedence_directive):
16008 Rename as...
16009 (declarations, declaration, grammar, grammar_declaration)
16010 (precedence_declaration, precedence_declarator): these.
16011 (symbol_declaration): New.
16012
16013 2002-06-14 Akim Demaille <akim@epita.fr>
16014
16015 * src/files.c (action_obstack): Remove, unused.
16016 (output_obstack): Remove it, and all its dependencies, as it is no
16017 longer needed.
16018 * src/reader.c (epilogue_set): Build the epilogue in the
16019 muscle_obstack.
16020 * src/output.h, src/output.c (muscle_obstack): Move to...
16021 * src/muscle_tab.h, src/muscle_tab.h: here.
16022 (muscle_init): Initialize muscle_obstack.
16023 (muscle_free): New.
16024 * src/main.c (main): Call it.
16025
16026 2002-06-14 Akim Demaille <akim@epita.fr>
16027
16028 * src/location.h: New, extracted from...
16029 * src/reader.h: here.
16030 * src/Makefile.am (noinst_HEADERS): Merge into
16031 (bison_SOURCES): this.
16032 Add location.h.
16033 * src/parse-gram.y: Use location_t instead of Bison's.
16034 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16035 Use location_t instead of ints.
16036
16037 2002-06-14 Akim Demaille <akim@epita.fr>
16038
16039 * data/bison.simple, data/bison.c++: Be sure to restore the
16040 current #line when returning to the skeleton contents after having
16041 exposed the input file's #line.
16042
16043 2002-06-12 Akim Demaille <akim@epita.fr>
16044
16045 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16046 eager.
16047 * tests/actions.at (Exotic Dollars): New.
16048
16049 2002-06-12 Akim Demaille <akim@epita.fr>
16050
16051 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16052 ['"/] too eagerly.
16053 * tests/input.at (Torturing the Scanner): New.
16054
16055 2002-06-11 Akim Demaille <akim@epita.fr>
16056
16057 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16058 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16059 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16060 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16061 * src/reader.c (reader): Use it.
16062
16063 2002-06-11 Akim Demaille <akim@epita.fr>
16064
16065 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16066 Adjust all callers.
16067 (scanner_last_string_free): New.
16068
16069 2002-06-11 Akim Demaille <akim@epita.fr>
16070
16071 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16072 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16073 (last_string, YY_OBS_FREE): New.
16074 Use them when returning an ID.
16075
16076 2002-06-11 Akim Demaille <akim@epita.fr>
16077
16078 Have Bison grammars parsed by a Bison grammar.
16079
16080 * src/reader.c, src/reader.h (prologue_augment): New.
16081 * src/reader.c (copy_definition): Remove.
16082
16083 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16084 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16085 (grammar_current_rule_prec_set, grammar_current_rule_check)
16086 (grammar_current_rule_symbol_append)
16087 (grammar_current_rule_action_append): Export.
16088 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16089 (symbol_list_action_append): Remove.
16090 Hook the routines from reader.
16091 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16092 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16093
16094 * src/reader.c (read_declarations): Remove, unused.
16095
16096 * src/parse-gram.y: Handle the epilogue.
16097 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16098 (grammar_start_symbol_set): this.
16099 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16100 * src/reader.c (readgram): Remove, unused.
16101 (reader): Adjust to insert eoftoken and axiom where appropriate.
16102
16103 * src/reader.c (copy_dollar): Replace with...
16104 * src/scan-gram.h (handle_dollar): this.
16105 * src/parse-gram.y: Remove `%thong'.
16106
16107 * src/reader.c (copy_at): Replace with...
16108 * src/scan-gram.h (handle_at): this.
16109
16110 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16111 New.
16112
16113 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16114 time being.
16115
16116 * src/reader.h, src/reader.c (grammar_rule_end): New.
16117
16118 * src/parse.y (current_type, current_class): New.
16119 Implement `%nterm', `%token' support.
16120 Merge `%term' into `%token'.
16121 (string_as_id): New.
16122 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16123 type name.
16124
16125 * src/parse-gram.y: Be sure to handle properly the beginning of
16126 rules.
16127
16128 * src/parse-gram.y: Handle %type.
16129 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16130
16131 * src/parse-gram.y: More directives support.
16132 * src/options.c: No longer handle source directives.
16133
16134 * src/parse-gram.y: Fix %output.
16135
16136 * src/parse-gram.y: Handle %union.
16137 Use the prologue locations.
16138 * src/reader.c (parse_union_decl): Remove.
16139
16140 * src/reader.h, src/reader.c (epilogue_set): New.
16141 * src/parse-gram.y: Use it.
16142
16143 * data/bison.simple, data/bison.c++: b4_stype is now either not
16144 defined, then default to int, or to the contents of %union,
16145 without `union' itself.
16146 Adjust.
16147 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16148
16149 * src/output.c (actions_output): Don't output braces, as they are
16150 already handled by the scanner.
16151
16152 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16153 characters to themselves.
16154
16155 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16156 that the epilogue has a proper #line.
16157
16158 * src/parse-gram.y: Handle precedence/associativity.
16159
16160 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16161 a terminal.
16162 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16163 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16164 at all to define terminals that cannot be emitted.
16165
16166 * src/scan-gram.l: Escape M4 characters.
16167
16168 * src/scan-gram.l: Working properly with escapes in user
16169 strings/characters.
16170
16171 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16172 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16173 grammar.
16174 Use more modest sizes, as for the time being the parser does not
16175 release memory, and therefore the process swallows a huge amount
16176 of memory.
16177
16178 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16179 stricter %token grammar.
16180
16181 * src/symtab.h (associativity): Add `undef_assoc'.
16182 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16183 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16184
16185 * tests/regression.at (Invalid %directive): Remove, as it is now
16186 meaningless.
16187 (Invalid inputs): Adjust to the new error messages.
16188 (Token definitions): The new grammar doesn't allow too many
16189 eccentricities.
16190
16191 * src/lex.h, src/lex.c: Remove.
16192 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16193 (copy_character, copy_string2, copy_string, copy_identifier)
16194 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16195 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16196 (parse_action): Remove.
16197 * po/POTFILES.in: Adjust.
16198
16199 2002-06-11 Akim Demaille <akim@epita.fr>
16200
16201 * src/reader.c (parse_action): Don't store directly into the
16202 rule's action member: return the action as a string.
16203 Don't require `rule_length' as an argument: compute it.
16204 (grammar_current_rule_symbol_append)
16205 (grammar_current_rule_action_append): New, eved out from
16206 (readgram): here.
16207 Remove `action_flag', `rulelength', unused now.
16208
16209 2002-06-11 Akim Demaille <akim@epita.fr>
16210
16211 * src/reader.c (grammar_current_rule_prec_set).
16212 (grammar_current_rule_check): New, eved out from...
16213 (readgram): here.
16214 Remove `xaction', `first_rhs': useless.
16215 * tests/input.at (Type clashes): New.
16216 * tests/existing.at (GNU Cim Grammar): Adjust.
16217
16218 2002-06-11 Akim Demaille <akim@epita.fr>
16219
16220 * src/reader.c (grammar_midrule_action): New, Eved out from
16221 (readgram): here.
16222
16223 2002-06-11 Akim Demaille <akim@epita.fr>
16224
16225 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16226 New.
16227 (readgram): Use them as replacement of inlined code, crule and
16228 crule1.
16229
16230 2002-06-11 Akim Demaille <akim@epita.fr>
16231
16232 * src/reader.c (grammar_end, grammar_symbol_append): New.
16233 (readgram): Use them.
16234 Make the use of `p' as local as possible.
16235
16236 2002-06-10 Akim Demaille <akim@epita.fr>
16237
16238 GCJ's parser requires the tokens to be defined before the prologue.
16239
16240 * data/bison.simple: Output the token definition before the user's
16241 prologue.
16242 * tests/regression.at (Braces parsing, Duplicate string)
16243 (Mixing %token styles): Check the output from bison.
16244 (Early token definitions): New.
16245
16246 2002-06-10 Akim Demaille <akim@epita.fr>
16247
16248 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16249 assigning twice the same user number to a token, so that we can
16250 use it in...
16251 * src/lex.c (lex): here.
16252 Also use `symbol_class_set' instead of hand written code.
16253 * src/reader.c (parse_assoc_decl): Likewise.
16254
16255 2002-06-10 Akim Demaille <akim@epita.fr>
16256
16257 * src/symtab.c, src/symtab.c (symbol_class_set)
16258 (symbol_user_token_number_set): New.
16259 * src/reader.c (parse_token_decl): Use them.
16260 Use a switch instead of ifs.
16261 Use a single argument.
16262
16263 2002-06-10 Akim Demaille <akim@epita.fr>
16264
16265 Remove `%thong' support as it is undocumented, unused, duplicates
16266 `%token's job, and creates useless e-mail traffic with people who
16267 want to know what it is, why it is undocumented, unused, and
16268 duplicates `%token's job.
16269
16270 * src/reader.c (parse_thong_decl): Remove.
16271 * src/options.c (option_table): Remove "thong".
16272 * src/lex.h (tok_thong): Remove.
16273
16274 2002-06-10 Akim Demaille <akim@epita.fr>
16275
16276 * src/symtab.c, src/symtab.c (symbol_type_set)
16277 (symbol_precedence_set): New.
16278 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16279 (value_components_used): Remove, unused.
16280
16281 2002-06-09 Akim Demaille <akim@epita.fr>
16282
16283 Move symbols handling code out of the reader.
16284
16285 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16286 (axiom): Move to...
16287 * src/symtab.h, src/symtab.c: here.
16288
16289 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16290 * src/reader.c (startval): Rename as...
16291 * src/symtab.h, src/symtab.c (startsymbol): this.
16292 * src/reader.c: Adjust.
16293
16294 * src/reader.c (symbol_check_defined, symbol_make_alias)
16295 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16296 (token_translations_init)
16297 Move to...
16298 * src/symtab.c: here.
16299 * src/reader.c (packsymbols): Move to...
16300 * src/symtab.h, src/symtab.c (symbols_pack): here.
16301 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16302 argument.
16303
16304 2002-06-03 Akim Demaille <akim@epita.fr>
16305
16306 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16307 then statements.
16308
16309 2002-06-03 Akim Demaille <akim@epita.fr>
16310
16311 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16312 structs with non literals.
16313 * src/scan-skel.l: never-interactive.
16314 * src/conflicts.c (enum conflict_resolution_e): No trailing
16315 comma.
16316 * src/getargs.c (usage): Split long literal strings.
16317 Reported by Hans Aberg.
16318
16319 2002-05-28 Akim Demaille <akim@epita.fr>
16320
16321 * data/bison.c++: Use C++ ostreams.
16322 (cdebug_): New member.
16323
16324 2002-05-28 Akim Demaille <akim@epita.fr>
16325
16326 * src/output.c (output_skeleton): Be sure to allocate enough room
16327 for `/' _and_ for `\0' in full_skeleton.
16328
16329 2002-05-28 Akim Demaille <akim@epita.fr>
16330
16331 * data/bison.c++: Catch up with bison.simple:
16332 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16333 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16334 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16335 and popping traces.
16336
16337 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16338
16339 * src/output.c (output_skeleton): Put an explicit path in front of
16340 the skeleton file name, rather than relying on the -I directory,
16341 to partially alleviate effects of having a skeleton file lying around
16342 in the current directory.
16343
16344 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16345
16346 * src/conflicts.c (log_resolution): Correct typo:
16347 obstack_printf should be obstack_fgrow1.
16348
16349 2002-05-26 Akim Demaille <akim@epita.fr>
16350
16351 * src/state.h (state_t): `solved_conflicts' is a new member.
16352 * src/LR0.c (new_state): Set it to 0.
16353 * src/conflicts.h, src/conflicts.c (print_conflicts)
16354 (free_conflicts, solve_conflicts): Rename as...
16355 (conflicts_print, conflicts_free, conflicts_solve): these.
16356 Adjust callers.
16357 * src/conflicts.c (enum conflict_resolution_e)
16358 (solved_conflicts_obstack): New, used by...
16359 (log_resolution): this.
16360 Adjust to attach the conflict resolution to each state.
16361 Complete the description with the precedence/associativity
16362 information.
16363 (resolve_sr_conflict): Adjust.
16364 * src/print.c (print_state): Output its solved_conflicts.
16365 * tests/conflicts.at (Unresolved SR Conflicts)
16366 (Solved SR Conflicts): Exercise --report=all.
16367
16368 2002-05-26 Akim Demaille <akim@epita.fr>
16369
16370 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16371 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16372 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16373 (token_number_t, item_number_as_token_number)
16374 (token_number_as_item_number, muscle_insert_token_number_table):
16375 Rename as...
16376 (symbol_number_t, item_number_as_symbol_number)
16377 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16378 these, since it is more appropriate.
16379
16380 2002-05-26 Akim Demaille <akim@epita.fr>
16381
16382 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16383 `Error:' lines.
16384 * data/bison.simple (yystos) [YYDEBUG]: New.
16385 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16386 error recovery.
16387 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16388
16389 2002-05-25 Akim Demaille <akim@epita.fr>
16390
16391 * doc/bison.texinfo (Debugging): Split into...
16392 (Tracing): this new section, its former contents, and...
16393 (Understanding): this new section.
16394 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16395 by...
16396 (report_flag): this.
16397 Adjust all dependencies.
16398 (report_args, report_types, report_argmatch): New.
16399 (usage, getargs): Report/support -r, --report.
16400 * src/options.h
16401 (struct option_table_struct): Rename as..,
16402 (struct option_table_s): this.
16403 Rename the `set_flag' member to `flag' to match with getopt_long's
16404 struct.
16405 * src/options.c (option_table): Split verbose into an entry for
16406 %verbose, and another for --verbose.
16407 Support --report/-r, so remove -r from the obsolete --raw.
16408 * src/print.c: Attach full item sets and lookaheads reports to
16409 report_flag instead of trace_flag.
16410 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16411
16412 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16413 and Paul Eggert <eggert@twinsun.com>
16414
16415 * data/bison.simple (yyparse): Correct error handling to conform to
16416 POSIX and yacc. Specifically, after syntax error is discovered,
16417 do not reduce further before shifting the error token.
16418 Clean up the code a bit by removing the labels yyerrdefault,
16419 yyerrhandle, yyerrpop.
16420 * NEWS: Document the above.
16421
16422 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16423
16424 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16425 type; it isn't always big enough, since it doesn't necessarily
16426 include non-terminals.
16427 (yytranslate): Expand definition of yy_token_number_type, so that
16428 the latter can be removed.
16429 (yy_token_number_type): Remove, only one use.
16430 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16431 don't use TokenNumberType as element type.
16432
16433 * tests/regression.at: Modify expected output to agree with change
16434 to yyr1 and yytranslate.
16435
16436 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16437
16438 * src/reader.c (parse_action): Use copy_character instead of
16439 obstack_1grow.
16440
16441 2002-05-13 Akim Demaille <akim@epita.fr>
16442
16443 * tests/regression.at (Token definitions): Prototype yylex and
16444 yyerror.
16445
16446 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16447
16448 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16449 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16450 32-bit arithmetic.
16451 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16452
16453 2002-05-07 Akim Demaille <akim@epita.fr>
16454
16455 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16456 avoid GCC warnings.
16457
16458 2002-05-07 Akim Demaille <akim@epita.fr>
16459
16460 Kill GCC warnings.
16461
16462 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16463 over the RHS of each rule.
16464 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16465 * src/state.h (state_t): Member `nitems' is unsigned short.
16466 * src/LR0.c (get_state): Adjust.
16467 * src/reader.c (packgram): Likewise.
16468 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16469 `Type'.
16470 (muscle_insert_int_table): Remove, unused.
16471 (prepare_rules): Remove `max'.
16472
16473 2002-05-06 Akim Demaille <akim@epita.fr>
16474
16475 * src/closure.c (print_firsts): Display of the symbol tags.
16476 (bitmatrix_print): Move to...
16477 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16478 here.
16479 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16480
16481 2002-05-06 Akim Demaille <akim@epita.fr>
16482
16483 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16484 hash_do_for_each.
16485
16486 2002-05-06 Akim Demaille <akim@epita.fr>
16487
16488 * src/LR0.c (new_state, get_state): Instead of using the global
16489 `kernel_size' and `kernel_base', have two new arguments:
16490 `core_size' and `core'.
16491 Adjust callers.
16492
16493 2002-05-06 Akim Demaille <akim@epita.fr>
16494
16495 * src/reader.c (packgram): No longer end `ritem' with a 0
16496 sentinel: it is not used.
16497
16498 2002-05-05 Akim Demaille <akim@epita.fr>
16499
16500 New experimental feature: display the lookaheads in the report and
16501 graph.
16502
16503 * src/print (print_core): When --trace-flag, display the rules
16504 lookaheads.
16505 * src/print_graph.c (print_core): Likewise.
16506 Swap the arguments.
16507 Adjust caller.
16508
16509 2002-05-05 Akim Demaille <akim@epita.fr>
16510
16511 * tests/torture.at (Many lookaheads): New test.
16512
16513 2002-05-05 Akim Demaille <akim@epita.fr>
16514
16515 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16516 (GENERATE_MUSCLE_INSERT_TABLE): this.
16517 (output_int_table, output_unsigned_int_table, output_short_table)
16518 (output_token_number_table, output_item_number_table): Replace with...
16519 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16520 (muscle_insert_short_table, muscle_insert_token_number_table)
16521 (muscle_insert_item_number_table): these.
16522 Adjust all callers.
16523 (prepare_tokens): Don't free `translations', since...
16524 * src/reader.h, src/reader.c (grammar_free): do it.
16525 Move to...
16526 * src/gram.h, src/gram.c (grammar_free): here.
16527 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16528 b4_translate_max.
16529
16530 2002-05-05 Akim Demaille <akim@epita.fr>
16531
16532 * src/output.c (output_unsigned_int_table): New.
16533 (prepare_rules): `i' is unsigned.
16534 `prhs', `rline', `r2' are unsigned int.
16535 Rename muscle `rhs_number_max' as `rhs_max'.
16536 Output muscles `prhs_max', `rline_max', and `r2_max'.
16537 Free rline and r1.
16538 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16539 to compute types instead of constant types.
16540 * tests/regression.at (Web2c Actions): Adjust.
16541
16542 2002-05-04 Akim Demaille <akim@epita.fr>
16543
16544 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16545 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16546 Adjust dependencies.
16547 * src/output.c (token_definitions_output): Be sure not to output a
16548 `#define 'a'' when fed with `%token 'a' "a"'.
16549 * tests/regression.at (Token definitions): New.
16550
16551 2002-05-03 Paul Eggert <eggert@twinsun.com>
16552
16553 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16554 for K&R C.
16555
16556 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16557
16558 * Makefile.am (SUBDIRS): Remove intl.
16559 (EXTRA_DIST): Add config/config.rpath.
16560
16561 2002-05-03 Akim Demaille <akim@epita.fr>
16562
16563 * data/bison.simple (m4_if): Don't output empty enums.
16564 And actually, output valid enum definitions :(.
16565
16566 2002-05-03 Akim Demaille <akim@epita.fr>
16567
16568 * configure.bat: Remove, completely obsolete.
16569 * Makefile.am (EXTRA_DIST): Adjust.
16570 Don't distribute config.rpath...
16571 * config/Makefile.am (EXTRA_DIST): Do it.
16572
16573 2002-05-03 Akim Demaille <akim@epita.fr>
16574
16575 * configure.in (GETTEXT_VERSION): New.
16576 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16577
16578 2002-05-03 Akim Demaille <akim@epita.fr>
16579
16580 * data/bison.simple (b4_token_enum): New.
16581 (b4_token_defines): Use it to output tokens both as #define and
16582 enums.
16583 Suggested by Paul Eggert.
16584 * src/output.c (token_definitions_output): Don't output spurious
16585 white spaces.
16586
16587 2002-05-03 Akim Demaille <akim@epita.fr>
16588
16589 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16590
16591 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16592
16593 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16594 Update the stack class, give a try to deque as the default container.
16595
16596 2002-05-02 Akim Demaille <akim@epita.fr>
16597
16598 * data/bison.simple (yyparse): Do not implement @$ = @1.
16599 (YYLLOC_DEFAULT): Adjust to do it.
16600 * doc/bison.texinfo (Location Default Action): Fix.
16601
16602 2002-05-02 Akim Demaille <akim@epita.fr>
16603
16604 * src/reader.c (parse_braces): Merge into...
16605 (parse_action): this.
16606
16607 2002-05-02 Akim Demaille <akim@epita.fr>
16608
16609 * configure.in (ALL_LINGUAS): Remove.
16610 * po/LINGUAS, hr.po: New.
16611
16612 2002-05-02 Akim Demaille <akim@epita.fr>
16613
16614 Remove the so called hairy (semantic) parsers.
16615
16616 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16617 * src/gram.h, src/gram.c (semantic_parser): Remove.
16618 (rule_t): Remove the guard and guard_line members.
16619 * src/lex.h (token_t): remove tok_guard.
16620 * src/options.c (option_table): Remove %guard and %semantic_parser
16621 support.
16622 * src/output.c, src/output.h (guards_output): Remove.
16623 (prepare): Adjust.
16624 (token_definitions_output): Don't output the `T'
16625 tokens (???).
16626 (output_skeleton): Don't output the guards.
16627 * src/files.c, src/files.c (attrsfile): Remove.
16628 * src/reader.c (symbol_list): Remove the guard and guard_line
16629 members.
16630 Adjust dependencies.
16631 (parse_guard): Remove.
16632 * data/bison.hairy: Remove.
16633 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16634 BISON_HAIRY.
16635
16636 2002-05-02 Akim Demaille <akim@epita.fr>
16637
16638 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16639 (parse_guard): Rename the formal argument `stack_offset' as
16640 `rule_length', which is more readable.
16641 Adjust callers.
16642 (copy_at, copy_dollar): Instead of outputting the hard coded
16643 values of $$, $n and so forth, output invocation to b4_lhs_value,
16644 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16645 Note: this patch partially drops `semantic-parser' support: it
16646 always does `rule_length - n', where semantic parsers ought to
16647 always use `-n'.
16648 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16649 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16650
16651 2002-05-02 Akim Demaille <akim@epita.fr>
16652
16653 * configure.in (AC_INIT): Bump to 1.49b.
16654 (AM_INIT_AUTOMAKE): Short invocation.
16655
16656 2002-05-02 Akim Demaille <akim@epita.fr>
16657
16658 Version 1.49a.
16659
16660 2002-05-01 Akim Demaille <akim@epita.fr>
16661
16662 * src/skeleton.h: Remove.
16663
16664 2002-05-01 Akim Demaille <akim@epita.fr>
16665
16666 * src/skeleton.h: Fix the #endif.
16667 Reported by Magnus Fromreide.
16668
16669 2002-04-26 Paul Eggert <eggert@twinsun.com>
16670
16671 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16672 Define if we define YYSTYPE and YYLTYPE, respectively.
16673 (YYCOPY): Fix [] quoting problem in the non-GCC case.
16674
16675 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
16676
16677 * src/scan-skel.l: Postprocess quadrigraphs.
16678
16679 * src/reader.c (copy_character): New function, used to output
16680 single characters while replacing `[' and `]' with quadrigraphs, to
16681 avoid troubles with M4 quotes.
16682 (copy_comment): Output characters with copy_character.
16683 (read_additionnal_code): Likewise.
16684 (copy_string2): Likewise.
16685 (copy_definition): Likewise.
16686
16687 * tests/calc.at: Exercise M4 quoting.
16688
16689 2002-04-25 Akim Demaille <akim@epita.fr>
16690
16691 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16692 between `!' and the command.
16693 Reported by Paul Eggert.
16694
16695 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
16696
16697 * tests/calc.at: Exercise prologue splitting.
16698
16699 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16700 `b4_post_prologue' instead of `b4_prologue'.
16701
16702 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16703 muscles.
16704 (output): Free pre_prologue_obstack and post_prologue_obstack.
16705 * src/files.h, src/files.c (attrs_obstack): Remove.
16706 (pre_prologue_obstack, post_prologue_obstack): New.
16707 * src/reader.c (copy_definition): Add a parameter to specify the
16708 obstack to fill, instead of using attrs_obstack unconditionally.
16709 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16710 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16711
16712 2002-04-23 Paul Eggert <eggert@twinsun.com>
16713
16714 * data/bison.simple: Remove unnecessary commentary and white
16715 space differences from 1_29-branch.
16716 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16717
16718 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16719 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16720 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16721 constructors or destructors.
16722
16723 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16724
16725 2002-04-23 Akim Demaille <akim@epita.fr>
16726
16727 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16728 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16729 location with columns.
16730 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16731 All reported by Paul Eggert.
16732
16733 2002-04-22 Akim Demaille <akim@epita.fr>
16734
16735 * src/reduce.c (dump_grammar): Move to...
16736 * src/gram.h, src/gram.c (grammar_dump): here.
16737 Be sure to separate long item numbers.
16738 Don't read the members of a rule's prec if its nil.
16739
16740 2002-04-22 Akim Demaille <akim@epita.fr>
16741
16742 * src/output.c (table_size, table_grow): New.
16743 (MAXTABLE): Remove, replace uses with table_size.
16744 (pack_vector): Instead of dying when the table is too big, grow it.
16745
16746 2002-04-22 Akim Demaille <akim@epita.fr>
16747
16748 * data/bison.simple (yyr1): Its type is that of a token number.
16749 * data/bison.c++ (r1_): Likewise.
16750 * tests/regression.at (Web2c Actions): Adjust.
16751
16752 2002-04-22 Akim Demaille <akim@epita.fr>
16753
16754 * src/reader.c (token_translations_init): 256 is now the default
16755 value for the error token, i.e., it will be assigned another
16756 number if the user assigned 256 to one of her tokens.
16757 (reader): Don't force 256 to error.
16758 * doc/bison.texinfo (Symbols): Adjust.
16759 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16760 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16761 etc. instead of 10, 20, 30 (which was used to `jump' over error
16762 (256) and undefined (2)).
16763
16764 2002-04-22 Akim Demaille <akim@epita.fr>
16765
16766 Propagate more token_number_t.
16767
16768 * src/gram.h (token_number_as_item_number)
16769 (item_number_as_token_number): New.
16770 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16771 Use it to create output_item_number_table and
16772 output_token_number_table.
16773 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16774 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16775 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16776 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16777
16778 2002-04-22 Akim Demaille <akim@epita.fr>
16779
16780 * src/output.h, src/output.c (get_lines_number): Remove.
16781
16782 2002-04-19 Akim Demaille <akim@epita.fr>
16783
16784 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16785 as Lex/Flex'.
16786 (Debugging): More details about enabling the debugging features.
16787 (Table of Symbols): Describe $$, $n, @$, and @n.
16788 Suggested by Tim Josling.
16789
16790 2002-04-19 Akim Demaille <akim@epita.fr>
16791
16792 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16793
16794 2002-04-10 Akim Demaille <akim@epita.fr>
16795
16796 * src/system.h: Rely on HAVE_LIMITS_H.
16797 Suggested by Paul Eggert.
16798
16799 2002-04-09 Akim Demaille <akim@epita.fr>
16800
16801 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16802 full stderr, and strip it according to the bison options, instead
16803 of composing the error message from different bits.
16804 This makes it easier to check for several error messages.
16805 Adjust all the invocations.
16806 Add an invocation exercising the error token.
16807 Add an invocation demonstrating a stupid error message.
16808 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16809 Adjust the tests.
16810 Error message are for stderr, not stdout.
16811
16812 2002-04-09 Akim Demaille <akim@epita.fr>
16813
16814 * src/gram.h, src/gram.c (error_token_number): Remove, use
16815 errtoken->number.
16816 * src/reader.c (reader): Don't specify the user token number (2)
16817 for $undefined, as it uselessly prevents using it.
16818 * src/gram.h (token_number_t): Move to...
16819 * src/symtab.h: here.
16820 (state_t.number): Is a token_number_t.
16821 * src/print.c, src/reader.c: Use undeftoken->number instead of
16822 hard coded 2.
16823 (Even though this 2 is not the same as above: the number of the
16824 undeftoken remains being 2, it is its user token number which
16825 might not be 2).
16826 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16827 `user_token_number_max'.
16828 Output `undef_token_number'.
16829 * data/bison.simple, data/bison.c++: Use them.
16830 Be sure to map invalid yylex return values to
16831 `undef_token_number'. This saves us from gratuitous SEGV.
16832
16833 * tests/conflicts.at (Solved SR Conflicts)
16834 (Unresolved SR Conflicts): Adjust.
16835 * tests/regression.at (Web2c Actions): Adjust.
16836
16837 2002-04-08 Akim Demaille <akim@epita.fr>
16838
16839 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16840 Adding #line.
16841 Remove the duplicate `typedefs'.
16842 (RhsNumberType): Fix the declaration and various other typos.
16843 Use __ofile__.
16844 * data/bison.simple: Use __ofile__.
16845 * src/scan-skel.l: Handle __ofile__.
16846
16847 2002-04-08 Akim Demaille <akim@epita.fr>
16848
16849 * src/gram.h (item_number_t): New, the type of item numbers in
16850 RITEM. Note that it must be able to code symbol numbers as
16851 positive number, and the negation of rule numbers as negative
16852 numbers.
16853 Adjust all dependencies (pretty many).
16854 * src/reduce.c (rule): Remove this `short *' pointer: use
16855 item_number_t.
16856 * src/system.h (MINSHORT, MAXSHORT): Remove.
16857 Include `limits.h'.
16858 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16859 (shortcpy): Remove.
16860 (MAXTABLE): Move to...
16861 * src/output.c (MAXTABLE): here.
16862 (prepare_rules): Use output_int_table to output rhs.
16863 * data/bison.simple, data/bison.c++: Adjust.
16864 * tests/torture.at (Big triangle): Move the limit from 254 to
16865 500.
16866 * tests/regression.at (Web2c Actions): Ajust.
16867
16868 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16869 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16870 passes, but produces negative #line number, once fixed, GCC is
16871 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16872 C), it passes.
16873 * src/state.h (state_h): Code input lines on ints, not shorts.
16874
16875 2002-04-08 Akim Demaille <akim@epita.fr>
16876
16877 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16878 and then the grammar.
16879
16880 2002-04-08 Akim Demaille <akim@epita.fr>
16881
16882 * src/system.h: No longer using strndup.
16883
16884 2002-04-07 Akim Demaille <akim@epita.fr>
16885
16886 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16887 * src/output.c (output_table_data): Return the longest number.
16888 (prepare_tokens): Output `token_number_max').
16889 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16890 New.
16891 Use them to define yy_token_number_type/TokenNumberType.
16892 Use this type for yytranslate.
16893 * tests/torture.at (Big triangle): Push the limit from 124 to
16894 253.
16895 * tests/regression.at (Web2c Actions): Adjust.
16896
16897 2002-04-07 Akim Demaille <akim@epita.fr>
16898
16899 * tests/torture.at (Big triangle): New.
16900 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16901 * tests/existing.at: here.
16902
16903 2002-04-07 Akim Demaille <akim@epita.fr>
16904
16905 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16906 nritems.
16907 Adjust dependencies.
16908
16909 2002-04-07 Akim Demaille <akim@epita.fr>
16910
16911 * src/reader.c: Normalize increments to prefix form.
16912
16913 2002-04-07 Akim Demaille <akim@epita.fr>
16914
16915 * src/reader.c, symtab.c: Remove debugging code.
16916
16917 2002-04-07 Akim Demaille <akim@epita.fr>
16918
16919 Rename all the `bucket's as `symbol_t'.
16920
16921 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16922 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16923 * src/symtab.c, src/symtab.h (bucket): Rename as...
16924 (symbol_t): this.
16925 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16926 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16927 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16928 (buckets_new, buckets_free, buckets_do): Rename as...
16929 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16930 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16931 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16932 (symbols_new, symbols_free, symbols_do): these.
16933
16934 2002-04-07 Akim Demaille <akim@epita.fr>
16935
16936 Use lib/hash for the symbol table.
16937
16938 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16939 EOF.
16940 * src/lex.c (lex): Set the `number' member of new terminals.
16941 * src/reader.c (bucket_check_defined, bucket_make_alias)
16942 (bucket_check_alias_consistence, bucket_translation): New.
16943 (reader, grammar_free, readgram, token_translations_init)
16944 (packsymbols): Adjust.
16945 (reader): Number the predefined tokens.
16946 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16947 for predefined tokens.
16948 * src/symtab.h (bucket): Remove all the hash table related
16949 members.
16950 * src/symtab.c (symtab): Replace by...
16951 (bucket_table): this.
16952 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16953 (buckets_new, buckets_do): New.
16954
16955 2002-04-07 Akim Demaille <akim@epita.fr>
16956
16957 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16958 (start_symbol, max_user_token_number, semantic_parser)
16959 (error_token_number): Initialize.
16960 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16961 Initialize.
16962 (reader): Don't.
16963 (errtoken, eoftoken, undeftoken, axiom): Extern.
16964
16965 2002-04-07 Akim Demaille <akim@epita.fr>
16966
16967 * src/gram.h (rule_s): prec and precsym are now pointers
16968 to the bucket giving the priority/associativity.
16969 Member `associativity' removed: useless.
16970 * src/reduce.c, src/conflicts.c: Adjust.
16971
16972 2002-04-07 Akim Demaille <akim@epita.fr>
16973
16974 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16975 Properly escape the symbols' TAG when outputting them.
16976
16977 2002-04-07 Akim Demaille <akim@epita.fr>
16978
16979 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16980
16981 2002-04-07 Akim Demaille <akim@epita.fr>
16982
16983 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16984 (LArule): this, which is an array to rule_t*.
16985 * src/print.c, src/conflicts.c: Adjust.
16986
16987 2002-04-07 Akim Demaille <akim@epita.fr>
16988
16989 * src/gram.h (rule_t): Rename `number' as `user_number'.
16990 `number' is a new member.
16991 Adjust dependencies.
16992 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16993
16994 2002-04-07 Akim Demaille <akim@epita.fr>
16995
16996 As a result of the previous patch, it is no longer needed
16997 to reorder ritem itself.
16998
16999 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17000
17001 2002-04-07 Akim Demaille <akim@epita.fr>
17002
17003 Be sure never to walk through RITEMS, but use only data related to
17004 the rules themselves. RITEMS should be banished.
17005
17006 * src/output.c (output_token_translations): Rename as...
17007 (prepare_tokens): this.
17008 In addition to `translate', prepare the muscles `tname' and
17009 `toknum', which were handled by...
17010 (output_rule_data): this.
17011 Remove, and move the remainder of its outputs into...
17012 (prepare_rules): this new routines, which also merges content from
17013 (output_gram): this.
17014 (prepare_rules): Be sure never to walk through RITEMS.
17015 (output_stos): Rename as...
17016 (prepare_stos): this.
17017 (output): Always invoke prepare_states, after all, just don't use it
17018 in the output if you don't need it.
17019
17020 2002-04-07 Akim Demaille <akim@epita.fr>
17021
17022 * src/LR0.c (new_state): Display `nstates' as the name of the
17023 newly created state.
17024 Adjust to initialize first_state and last_state if needed.
17025 Be sure to distinguish the initial from the final state.
17026 (new_states): Create the itemset of the initial state, and use
17027 new_state.
17028 * src/closure.c (closure): Now that the initial state has its
17029 items properly set, there is no need for a special case when
17030 creating `ruleset'.
17031
17032 As a result, now the rule 0, reducing to $axiom, is visible in the
17033 outputs. Adjust the test suite.
17034
17035 * tests/conflicts.at (Solved SR Conflicts)
17036 (Unresolved SR Conflicts): Adjust.
17037 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17038 * tests/conflicts.at (S/R in initial): New.
17039
17040 2002-04-07 Akim Demaille <akim@epita.fr>
17041
17042 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17043 the RHS of the rules.
17044 * src/output.c (output_gram): Likewise.
17045
17046 2002-04-07 Akim Demaille <akim@epita.fr>
17047
17048 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17049 bucket.
17050 Adjust all dependencies.
17051 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17052 `number' of the buckets too.
17053 * src/gram.h: Include `symtab.h'.
17054 (associativity): Move to...
17055 * src/symtab.h: here.
17056 No longer include `gram.h'.
17057
17058 2002-04-07 Akim Demaille <akim@epita.fr>
17059
17060 * src/gram.h, src/gram.c (rules_rhs_length): New.
17061 (ritem_longest_rhs): Use it.
17062 * src/gram.h (rule_t): `number' is a new member.
17063 * src/reader.c (packgram): Set it.
17064 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17065 the end of `rules', and count them out of `nrules'.
17066 (reduce_output, dump_grammar): Adjust.
17067 * src/print.c (print_grammar): It is no longer needed to check for
17068 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17069 * tests/reduce.at (Reduced Automaton): New test.
17070
17071 2002-04-07 Akim Demaille <akim@epita.fr>
17072
17073 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17074 lacking `+ 1' to nrules, Bison reported as useless a token if it
17075 was used solely to set the precedence of the last rule...
17076
17077 2002-04-07 Akim Demaille <akim@epita.fr>
17078
17079 * data/bison.c++, data/bison.simple: Don't output the current file
17080 name in #line, to avoid useless diffs between two identical
17081 outputs under different names.
17082
17083 2002-04-07 Akim Demaille <akim@epita.fr>
17084
17085 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17086 Normalize loops to using `< nrules + 1', not `<= nrules'.
17087
17088 2002-04-07 Akim Demaille <akim@epita.fr>
17089
17090 * TODO: Update.
17091
17092 2002-04-07 Akim Demaille <akim@epita.fr>
17093
17094 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17095 bucket.value as bucket.number.
17096
17097 2002-04-07 Akim Demaille <akim@epita.fr>
17098
17099 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17100 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17101 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17102 RHS, instead of being an index in RITEMS.
17103
17104 2002-04-04 Paul Eggert <eggert@twinsun.com>
17105
17106 * doc/bison.texinfo: Update copyright date.
17107 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17108 (Symbols): Warn about running Bison in one character set,
17109 but compiling and/or running in an incompatible one.
17110 Warn about character code 256, too.
17111
17112 2002-04-03 Paul Eggert <eggert@twinsun.com>
17113
17114 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17115 YYERROR_VERBOSE is nonzero, not whether it is defined.
17116
17117 Merge changes from bison-1_29-branch.
17118
17119 2002-03-20 Paul Eggert <eggert@twinsun.com>
17120
17121 Merge fixes from Debian bison_1.34-1.diff.
17122
17123 * configure.in (AC_PREREQ): 2.53.
17124
17125 2002-03-20 Akim Demaille <akim@epita.fr>
17126
17127 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17128
17129 2002-03-19 Paul Eggert <eggert@twinsun.com>
17130
17131 * src/bison.simple (YYCOPY): New macro.
17132 (YYSTACK_RELOCATE): Use it.
17133 Remove Type arg; no longer needed. All callers changed.
17134 (yymemcpy): Remove; no longer needed.
17135
17136 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17137 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17138
17139 2002-03-19 Akim Demaille <akim@epita.fr>
17140
17141 Test and fix the #line outputs.
17142
17143 * tests/atlocal.at (GCC): New.
17144 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17145 (Prologue synch line, %union synch line, Postprologue synch line)
17146 (Action synch line, Epilogue synch line): New tests.
17147 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17148 * data/bison.simple, data/bison.c++: Use it.
17149
17150 2002-03-19 Akim Demaille <akim@epita.fr>
17151
17152 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17153 (Solved SR Conflicts, %expect not enough, %expect right)
17154 (%expect too much): Move to...
17155 * tests/conflicts.at: this new file.
17156
17157 2002-03-19 Akim Demaille <akim@epita.fr>
17158
17159 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17160 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17161 that we can move to enums for instance.
17162 * src/output.c (token_definitions_output): Output a list of
17163 `token-name, token-number' instead of the #define.
17164 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17165
17166 2002-03-14 Akim Demaille <akim@epita.fr>
17167
17168 Use Gettext 0.11.1.
17169
17170 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17171
17172 * data/bison.c++: Make the user able to add members to the generated
17173 parser by subclassing.
17174
17175 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17176
17177 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17178 a character.
17179 Reported by Nicolas Tisserand and Nicolas Burrus.
17180
17181 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17182
17183 * src/reader.c: Warn about lacking semi-colons, do not complain.
17184
17185 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17186
17187 * data/bison.c++: Remove a debug line.
17188
17189 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17190
17191 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17192 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17193 provide a default implementation.
17194
17195 2002-03-04 Akim Demaille <akim@epita.fr>
17196
17197 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17198 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17199 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17200 * tests/semantic.at (Parsing Guards): Similarly.
17201 * src/reader.at (readgram): Complain if the last rule is not ended
17202 with a semi-colon.
17203
17204 2002-03-04 Akim Demaille <akim@epita.fr>
17205
17206 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17207 * src/closure.c: here.
17208 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17209 RTC.
17210 * src/warshall.h, src/warshall.c: Remove.
17211 * tests/sets.at (Broken Closure): Adjust.
17212
17213 2002-03-04 Akim Demaille <akim@epita.fr>
17214
17215 * src/output.c (output_skeleton): tempdir is const.
17216 bytes_read is unused.
17217
17218 2002-03-04 Akim Demaille <akim@epita.fr>
17219
17220 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17221 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17222 Update.
17223 From Michael Hayes.
17224
17225 2002-03-04 Akim Demaille <akim@epita.fr>
17226
17227 * src/closure.c (closure): `r' is unused.
17228
17229 2002-03-04 Akim Demaille <akim@epita.fr>
17230
17231 * tests/sets.at (Broken Closure): Add the ending `;'.
17232 * src/reader.at (readgram): Complain if a rule is not ended with a
17233 semi-colon.
17234
17235 2002-03-04 Akim Demaille <akim@epita.fr>
17236
17237 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17238 (count_sr_conflicts): Use bitset_count.
17239 * src/reduce.c (inaccessable_symbols): Ditto.
17240 (bits_size): Remove.
17241 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17242
17243 2002-03-04 Akim Demaille <akim@epita.fr>
17244
17245 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17246 * src/reduce.c: Remove the `bitset_zero's following the
17247 `bitset_create's, as now it is performed by the latter.
17248
17249 2002-03-04 Akim Demaille <akim@epita.fr>
17250
17251 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17252 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17253 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17254 latest sources from Michael.
17255
17256 2002-03-04 Akim Demaille <akim@epita.fr>
17257
17258 * src/output.c (output): Don't free the grammar.
17259 * src/reader.c (grammar_free): New.
17260 * src/main.c (main): Call it and don't free symtab here.
17261
17262 2002-03-04 Akim Demaille <akim@epita.fr>
17263
17264 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17265 before returning.
17266 Reported by Benoit Perrot.
17267
17268 2002-03-04 Akim Demaille <akim@epita.fr>
17269
17270 Use bitset operations when possible, not loops over bits.
17271
17272 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17273 bitset_or.
17274 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17275 * src/reduce.c (useless_nonterminals): Formatting changes.
17276 * src/warshall.c (TC): Use bitset_or.
17277
17278 2002-03-04 Akim Demaille <akim@epita.fr>
17279
17280 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17281 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17282 Ditto.
17283
17284 2002-03-04 Akim Demaille <akim@epita.fr>
17285
17286 * src/lalr.c (F): Now a bitset*.
17287 Adjust all dependencies.
17288
17289 2002-03-04 Akim Demaille <akim@epita.fr>
17290
17291 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17292 Adjust all dependencies.
17293
17294 2002-03-04 Akim Demaille <akim@epita.fr>
17295
17296 * src/L0.c, src/LR0.h (nstates): Be size_t.
17297 Adjust comparisons (signed vs unsigned).
17298 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17299 bitset*.
17300 Adjust all dependencies.
17301
17302 2002-03-04 Akim Demaille <akim@epita.fr>
17303
17304 * src/closure.c (firsts): Now, also a bitset.
17305 Adjust all dependencies.
17306 (varsetsize): Remove, now unused.
17307 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17308
17309 2002-03-04 Akim Demaille <akim@epita.fr>
17310
17311 * src/print.c: Convert to use bitset.h, not hand coded iterations
17312 over ints.
17313
17314 2002-03-04 Akim Demaille <akim@epita.fr>
17315
17316 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17317
17318 2002-03-04 Akim Demaille <akim@epita.fr>
17319
17320 * src/closure.c (ruleset): Be a bitset.
17321 (rulesetsize): Remove.
17322
17323 2002-03-04 Akim Demaille <akim@epita.fr>
17324
17325 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17326 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17327 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17328 * src/closure.c (fderives): Be an array of bitsets.
17329
17330 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17331
17332 * data/bison.c++: Merge the two generated headers. Insert a copyright
17333 notice in each output file.
17334
17335 2002-02-28 Akim Demaille <akim@epita.fr>
17336
17337 * data/bison.c++: Copy the prologue of bison.simple to fetch
17338 useful M4 definitions, such as b4_header_guard.
17339
17340 2002-02-25 Akim Demaille <akim@epita.fr>
17341
17342 * src/getargs.c (version): Give the name of the authors, and use a
17343 translator friendly scheme for the bgr
17344 copyright notice.
17345
17346 2002-02-25 Akim Demaille <akim@epita.fr>
17347
17348 * src/output.c (header_output): Remove, now handled completely via
17349 M4.
17350
17351 2002-02-25 Akim Demaille <akim@epita.fr>
17352
17353 * m4/m4.m4: New, from CVS Autoconf.
17354 * configure.in: Invoke it.
17355 * src/output.c (output_skeleton): Use its result instead of the
17356 hard coded name.
17357
17358 2002-02-25 Akim Demaille <akim@epita.fr>
17359
17360 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17361 Fileutils 4.1.5.
17362 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17363 * src/output.c (output_skeleton): Use mkstemp to create a real
17364 temporary file.
17365 Move the filling of `skeleton' and its muscle to...
17366 (prepare): here.
17367 (output): Move the definition of the prologue muscle to...
17368 (prepare): here.
17369 * src/system.h (DEFAULT_TMPDIR): New.
17370
17371 2002-02-14 Paul Eggert <eggert@twinsun.com>
17372
17373 Remove the support for C++ namespace cleanliness; it was
17374 causing more problems than it was curing, since it didn't work
17375 properly on some nonstandard C++ compilers. This can wait
17376 for a proper C++ parser.
17377
17378 * NEWS: Document this.
17379 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17380 of C++, as it's treated like C now.
17381 * src/bison.simple (YYSTD): Remove.
17382 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17383 Treat C++ just like Standard C instead of trying to support
17384 namespace cleanliness.
17385
17386 2002-02-14 Akim Demaille <akim@epita.fr>
17387
17388 * tests/regression.at (else): Adjust to Andreas' change.
17389
17390 2002-02-14 Akim Demaille <akim@epita.fr>
17391
17392 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17393
17394 2002-02-13 Andreas Schwab <schwab@suse.de>
17395
17396 * src/output.c (output_rule_data): Don't output NULL, it might
17397 not be defined yet.
17398
17399 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17400
17401 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17402 (Copyright notice): Update.
17403
17404 2002-02-11 Akim Demaille <akim@epita.fr>
17405
17406 * tests/regression.at (%nonassoc and eof): Don't include
17407 nonportable headers.
17408
17409 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17410
17411 * data/bison.c++: Correct error recovery. Make the user able to
17412 initialize the starting location.
17413
17414 2002-02-07 Akim Demaille <akim@epita.fr>
17415
17416 * tests/input.at: New.
17417
17418 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17419
17420 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17421 more consistent when naming methods and variables. Put preprocessor
17422 directives around tables only needed for debugging.
17423
17424 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17425
17426 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17427 C++ parsers.
17428 (yy::b4_name::parse): Use print_.
17429
17430 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17431
17432 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17433
17434 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17435
17436 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17437 C++ parsers.
17438 (yy::b4_name::parse): Build verbose error messages, and use error_.
17439
17440 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17441
17442 * data/bison.c++: Fix m4 quoting in comments.
17443
17444 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17445
17446 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17447 not expanded by m4.
17448
17449 2002-02-05 Akim Demaille <akim@epita.fr>
17450
17451 * data/bison.c++: Adjust to the M4 back end.
17452 More is certainly needed.
17453
17454 2002-02-05 Akim Demaille <akim@epita.fr>
17455
17456 Give a try to M4 as a back end.
17457
17458 * lib/readpipe.c: New, from wdiff.
17459 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17460 BISON_HAIRY.
17461 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17462 specific values. Now it is m4 that performs the lookup.
17463 * src/parse-skel.y: Remove.
17464 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17465 * src/output.c (actions_output, guards_output)
17466 (token_definitions_output): No longer keeps track of the output
17467 line number, hence remove the second argument.
17468 (guards_output): Check against the guard member of a rule, not the
17469 action member.
17470 Adjust callers.
17471 (output_skeleton): Don't look for the skeleton location, let m4 do
17472 that.
17473 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17474 file will be used.
17475 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17476 (prepare): Given that for the time being changesyntax is not
17477 usable in M4, rename the muscles using `-' to `_'.
17478 Define `defines_flag', `output_parser_name' and `output_header_name'.
17479 * src/output.h (actions_output, guards_output)
17480 (token_definitions_output): Adjust prototypes.
17481 * src/scan-skel.l: Instead of scanning the skeletons, it now
17482 processes the output of m4: `__oline__' and `#output'.
17483 * data/bison.simple: Adjust to be used by M4(sugar).
17484 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17485 to date.
17486 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17487 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17488 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17489 shamelessly stolen from CVS Autoconf.
17490
17491 2002-02-05 Akim Demaille <akim@epita.fr>
17492
17493 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17494 * configure.in: Check for the declarations of free and malloc.
17495 * src/muscle_tab.c: Adjust.
17496
17497 2002-02-05 Akim Demaille <akim@epita.fr>
17498
17499 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17500 which have no values.
17501
17502 2002-02-05 Akim Demaille <akim@epita.fr>
17503
17504 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17505 * data/: here.
17506
17507 2002-01-29 Paul Eggert <eggert@twinsun.com>
17508
17509 * src/bison.simple (YYSIZE_T): Do not define merely because
17510 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17511 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17512
17513 2002-01-27 Akim Demaille <akim@epita.fr>
17514
17515 Fix `%nonassoc and eof'.
17516
17517 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17518 which were not properly copied! Replace
17519 memcpy (res->errs, src->errs, src->nerrs);
17520 with
17521 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17522 !!!
17523 * tests/regression.at (%nonassoc and eof): Adjust to newest
17524 Autotest: `.' is not in the PATH.
17525
17526 2002-01-27 Akim Demaille <akim@epita.fr>
17527
17528 * tests/sets.at (AT_EXTRACT_SETS): New.
17529 (Nullable): Use it.
17530 (Firsts): New.
17531
17532 2002-01-26 Akim Demaille <akim@epita.fr>
17533
17534 * tests/actions.at, tests/calc.at, tests/headers.at,
17535 * tests/torture.at: Adjust to the newest Autotest which no longer
17536 forces `.' in the PATH.
17537
17538 2002-01-25 Akim Demaille <akim@epita.fr>
17539
17540 * tests/regression.at (%nonassoc and eof): New.
17541 Suggested by Robert Anisko.
17542
17543 2002-01-24 Akim Demaille <akim@epita.fr>
17544
17545 Bison dumps core when trying to complain about broken input files.
17546 Reported by Cris van Pelt.
17547
17548 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17549 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17550 into...
17551 (Invalid inputs): Strengthen: exercise parse_percent_token.
17552
17553 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17554
17555 * src/Makefile.am: Add bison.c++.
17556 * src/bison.c++: New skeleton.
17557
17558 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17559
17560 * po/it.po: New.
17561
17562 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17563
17564 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17565
17566 2002-01-20 Marc Autret <marc@gnu.org>
17567
17568 * src/files.c (compute_output_file_names): Fix
17569
17570 2002-01-20 Marc Autret <marc@gnu.org>
17571
17572 * tests/output.at: New test.
17573 * src/files.c (compute_base_names): Don't map extensions when
17574 the YACC flag is set, use defaults.
17575 Reported by Evgeny Stambulchik.
17576
17577 2002-01-20 Marc Autret <marc@gnu.org>
17578
17579 * src/system.h: Need to define __attribute__ away for non-GCC
17580 compilers as well (i.e., the vendor C compiler).
17581 Suggested by Albert Chin-A-Young.
17582
17583 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17584
17585 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17586 canonical definition.
17587 * src/system.h: Use the canonical definition for PARAMS (avoids
17588 a conflict with the macro from lib/hash.h).
17589
17590 2002-01-11 Akim Demaille <akim@epita.fr>
17591
17592 * configure.in: Use AC_FUNC_STRNLEN.
17593 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17594
17595 2002-01-09 Akim Demaille <akim@epita.fr>
17596
17597 * src/files.c, src/files.h (output_infix): New.
17598 (tab_extension): Remove.
17599 (compute_base_names): Compute the former, drop the latter.
17600 * src/output.c (prepare): Insert the muscles `output-infix', and
17601 `output-suffix'.
17602 * src/parse-skel.y (string, string.1): New.
17603 (section.header): Use it.
17604 (section.yacc): Remove.
17605 (prefix): Remove too.
17606 * src/scan-skel.l: Adjust.
17607 * src/bison.simple, src/bison.hairy: Adjust.
17608
17609 2002-01-09 Akim Demaille <akim@epita.fr>
17610
17611 * configure.in (WERROR_CFLAGS): Compute it.
17612 * src/Makefile.am (CFLAGS): Pass it.
17613 * tests/atlocal.in (CFLAGS): Idem.
17614 * src/files.c: Fix a few warnings.
17615 (get_extension_index): Remove, unused.
17616
17617 2002-01-08 Akim Demaille <akim@epita.fr>
17618
17619 * src/getargs.c (AS_FILE_NAME): New.
17620 (getargs): Use it to convert DOSish file names.
17621 * src/files.c (base_name): Rename as full_base_name to avoid
17622 clashes with `base_name ()'.
17623 (filename_split): New.
17624 (compute_base_names): N-th rewrite, using filename_split.
17625
17626 2002-01-08 Akim Demaille <akim@epita.fr>
17627
17628 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17629 New, stolen from the Fileutils 4.1.
17630 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17631 * configure.in: Check for the presence of memrchr, and of its
17632 prototype.
17633
17634 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17635
17636 * lib/hash.h (__P): Added definition for this macro.
17637 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17638 BUILT_SOURCES, to ensure they are generated first.
17639 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17640 %error-verbose to allow bootstrapping with bison 1.30x.
17641
17642 2002-01-06 Akim Demaille <akim@epita.fr>
17643
17644 * src/reader.c (parse_braces): Don't fetch the next char, the
17645 convention is to fetch on entry.
17646 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17647 'switch' without a following semicolon.
17648 * tests/regression.at (braces parsing): New.
17649
17650 2002-01-06 Akim Demaille <akim@epita.fr>
17651
17652 Bison is dead wrong in its RR conflict reports.
17653
17654 * tests/torture.at (GNU Cim Grammar): New.
17655 * src/conflicts.c (count_rr_conflicts): Fix.
17656
17657 2002-01-06 Akim Demaille <akim@epita.fr>
17658
17659 Creating package.m4 from configure.ac causes too many problems.
17660
17661 * tests/Makefile.am (package.m4): Create it by hand,
17662 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17663
17664 2002-01-06 Akim Demaille <akim@epita.fr>
17665
17666 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17667 skeleton.h.
17668
17669 2002-01-04 Paul Eggert <eggert@twinsun.com>
17670
17671 * doc/bison.texinfo (Debugging):
17672 Remove YYSTDERR; it's no longer defined or used.
17673 Also, s/cstdio.h/cstdio/.
17674
17675 2002-01-03 Akim Demaille <akim@epita.fr>
17676
17677 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17678
17679 2002-01-03 Akim Demaille <akim@epita.fr>
17680
17681 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17682 tracing code to --trace, wait for a better --trace option, with
17683 args.
17684
17685 2002-01-03 Akim Demaille <akim@epita.fr>
17686
17687 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17688 The ISO C++ standard is extremely clear about it: stderr is
17689 considered a macro, not a regular symbol (see table 94 `Header
17690 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17691 Therefore std:: does not apply to it. It still does with fprintf.
17692 Also, s/cstdio.h/cstdio/.
17693
17694 2002-01-03 Akim Demaille <akim@epita.fr>
17695
17696 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17697 for non system headers.
17698
17699 2002-01-02 Akim Demaille <akim@epita.fr>
17700
17701 Equip the skeleton chain with location tracking, runtime trace,
17702 pure parser and scanner.
17703
17704 * src/parse-skel.y: Request a pure parser, locations, and prefix
17705 renaming.
17706 (%union): Having several members with the same type does not help
17707 type mismatches, simplify.
17708 (YYPRINT, yyprint): New.
17709 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17710 (skel_error): this.
17711 Handle locations.
17712 * src/scan-skel.l: Adjust to these changes.
17713 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17714 (LOCATION_PRINT, skel_control_t): New.
17715
17716 2001-12-30 Akim Demaille <akim@epita.fr>
17717
17718 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17719 replace `gb' with BLANKS.
17720 * src/scan-skel.l: Adjust.
17721
17722 2001-12-30 Akim Demaille <akim@epita.fr>
17723
17724 * src/system.h: We don't need nor want bcopy.
17725 Throw away MS-DOS crap: we don't need getpid.
17726 * configure.in: We don't need strndup. It was even causing
17727 problems: because Flex includes the headers *before* us,
17728 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17729 not visible.
17730 * lib/xstrndup.c: New.
17731 * src/scan-skel.l: Use it.
17732 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17733 * src/parse-skel.y: Use %directives instead of #defines.
17734
17735 2001-12-30 Akim Demaille <akim@epita.fr>
17736
17737 * src/skeleton.h: New.
17738 * src/output.c (output_parser, output_master_parser): Remove, dead
17739 code.
17740 * src/output.h (get_lines_number, actions_output, guards_output)
17741 (token_definitions_output): Prototype them.
17742 * src/parse-skel.y: Add the license notice.
17743 Include output.h and skeleton.h.
17744 (process_skeleton): Returns void, and takes a single parameter.
17745 * src/scan-skel.l: Add the license notice.
17746 Include skeleton.h.
17747 Don't use %option yylineno: it seems that then Flex imagines
17748 REJECT has been used, and therefore it won't reallocate its
17749 buffers (which makes no other sense to me than a bug). It results
17750 in warnings for `unused: yy_flex_realloc'.
17751
17752 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
17753
17754 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17755 (MUSCLE_INSERT_PREFIX): ...to there.
17756 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17757 (MUSCLE_INSERT_PREFIX): Move from here...
17758
17759 * src/bison.hairy: Add a section directive. Put braces around muscle
17760 names. This parser skeleton is still broken, but Bison should not
17761 choke on a bad muscle 'syntax'.
17762 * src/bison.simple: Add a section directive. Put braces around muscle
17763 names.
17764
17765 * src/files.h (strsuffix, stringappend): Add declarations.
17766 (tab_extension): Add declaration.
17767 (short_base_name): Add declaration.
17768
17769 * src/files.c (strsuffix, stringappend): No longer static. These
17770 functions are used in the skeleton parser.
17771 (tab_extension): New.
17772 (compute_base_names): Use the computations done in this function
17773 to guess if the generated parsers should have '.tab' in their
17774 names.
17775 (short_base_name): No longer static.
17776
17777 * src/output.c (output_skeleton): New.
17778 (output): Disable call to output_master_parser, and give a try to
17779 a new skeleton handling system.
17780 (guards_output, actions_output): No longer static.
17781 (token_definitions_output, get_lines_number): No longer static.
17782
17783 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17784
17785 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
17786 parse-skel.y.
17787
17788 * src/parse-skel.y: New file.
17789 * src/scan-skel.l: New file.
17790
17791 2001-12-29 Akim Demaille <akim@epita.fr>
17792
17793 %name-prefix is broken.
17794
17795 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17796 Adjust all dependencies.
17797 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17798 %name-prefix.
17799
17800 Renaming yylval but not yylloc is not consistent. Now we do.
17801
17802 * src/bison.simple: Prefix yylloc if used.
17803 * doc/bison.texinfo (Decl Summary): Document that.
17804
17805 2001-12-29 Akim Demaille <akim@epita.fr>
17806
17807 * doc/bison.texinfo: Promote `%long-directive' over
17808 `%long_directive'.
17809 Remove all references to fixed-output-files, yacc is enough.
17810
17811 2001-12-29 Akim Demaille <akim@epita.fr>
17812
17813 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17814 user prologue. These are defaults.
17815 * tests/actions.at (Mid-rule actions): Make sure the user can
17816 define YYDEBUG and YYERROR_VERBOSE.
17817
17818 2001-12-29 Akim Demaille <akim@epita.fr>
17819
17820 * src/output.c (header_output): Don't forget to export YYLTYPE and
17821 yylloc.
17822 * tests/headers.at (export YYLTYPE): New, make sure it does.
17823 * tests/regression.at (%union and --defines, Invalid CPP headers):
17824 Move to...
17825 * tests/headers.at: here.
17826
17827 2001-12-29 Akim Demaille <akim@epita.fr>
17828
17829 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17830
17831 2001-12-29 Akim Demaille <akim@epita.fr>
17832
17833 * tests/actions.at (Mid-rule actions): Output on a single line
17834 instead of several.
17835
17836 2001-12-29 Akim Demaille <akim@epita.fr>
17837
17838 * doc/bison.texinfo: Formatting changes.
17839
17840 2001-12-29 Akim Demaille <akim@epita.fr>
17841
17842 Don't store the token defs in a muscle, just be ready to output it
17843 on command. Now possible via `symbols'. Fixes a memory leak.
17844
17845 * src/output.c (token_definitions_output): New.
17846 (output_parser, header_output): Use it.
17847 * src/reader.c (symbols_save): Remove.
17848
17849 2001-12-29 Akim Demaille <akim@epita.fr>
17850
17851 * src/bison.simple: Do not provide a default for YYSTYPE and
17852 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17853 default.
17854
17855 2001-12-29 Akim Demaille <akim@epita.fr>
17856
17857 Mid-rule actions are simply... ignored!
17858
17859 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17860 the empty-rule associated to the dummy symbol, not to the host
17861 rule.
17862 * tests/actions.at (Mid-rule actions): New.
17863
17864 2001-12-29 Akim Demaille <akim@epita.fr>
17865
17866 Memory leak.
17867
17868 * src/reader.c (reader): Free grammar.
17869
17870 2001-12-29 Akim Demaille <akim@epita.fr>
17871
17872 Memory leak.
17873
17874 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17875 since it allocates it for each state, although only one is needed.
17876 (allocate_storage): Do it here.
17877
17878 2001-12-29 Akim Demaille <akim@epita.fr>
17879
17880 * src/options.h, src/options.c (create_long_option_table): Rename
17881 as...
17882 (long_option_table_new): this, with a clearer prototype.
17883 (percent_table): Remove, unused,
17884 * src/getargs.c (getargs): Adjust.
17885
17886 2001-12-29 Akim Demaille <akim@epita.fr>
17887
17888 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17889 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17890 as states.
17891
17892 2001-12-29 Akim Demaille <akim@epita.fr>
17893
17894 * src/lalr.c (build_relations): Rename `states' as `states1'.
17895 Sorry, I don't understand exactly what it is, no better name...
17896
17897 2001-12-29 Akim Demaille <akim@epita.fr>
17898
17899 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17900 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17901 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17902 as rules.
17903
17904 2001-12-29 Akim Demaille <akim@epita.fr>
17905
17906 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17907 ago.
17908
17909 2001-12-29 Akim Demaille <akim@epita.fr>
17910
17911 * src/reader.c, src/reader.h (user_toknums): Remove.
17912 Adjust all users to use symbols[i]->user_token_number.
17913
17914 2001-12-29 Akim Demaille <akim@epita.fr>
17915
17916 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17917 Adjust all users to use symbols[i]->prec or ->assoc.
17918
17919 2001-12-29 Akim Demaille <akim@epita.fr>
17920
17921 * src/reader.c, src/reader.h (tags): Remove.
17922 Adjust all users to use symbols[i]->tag.
17923
17924 2001-12-29 Akim Demaille <akim@epita.fr>
17925
17926 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17927 and rule_table.
17928 * src/reader.c (packsymbols): Fill this table.
17929 Drop sprec.
17930 * src/conflicts.c (resolve_sr_conflict): Adjust.
17931 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17932 single table.
17933 Use symbols[i]->tag instead of tags[i].
17934
17935 2001-12-29 Akim Demaille <akim@epita.fr>
17936
17937 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17938 In addition, put a comment in there, to replace...
17939 * tests/regression.at (%union and C comments): Remove.
17940
17941 2001-12-29 Akim Demaille <akim@epita.fr>
17942
17943 * tests/regression.at (Web2c Actions): Blindly move the actual
17944 output as expected output. The contents *seem* right to me, but I
17945 can't pretend reading perfectly parser tables... Nonetheless, all
17946 the other tests pass correctly, the table look OK, even though the
17947 presence of `$axiom' is to be noted: AFAICS it is useless (but
17948 harmless).
17949
17950 2001-12-29 Akim Demaille <akim@epita.fr>
17951
17952 * src/reader.c (readgram): Don't add the rule 0 if there were no
17953 rules read. In other words, add it _after_ having performed
17954 grammar sanity checks.
17955 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17956
17957 2001-12-29 Akim Demaille <akim@epita.fr>
17958
17959 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17960 visible, and some states have now a different number.
17961
17962 2001-12-29 Akim Demaille <akim@epita.fr>
17963
17964 * src/reader.c (readgram): Bind the initial rule's lineno to that
17965 of the first rule.
17966 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17967 (Solved SR Conflicts): Adjust rule 0's line number.
17968
17969 2001-12-29 Akim Demaille <akim@epita.fr>
17970
17971 Fix the `GAWK Grammar' failure.
17972
17973 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17974 the reductions of the first state which was mistakenly confused
17975 with the final state because precisely final_state was initialized
17976 to 0.
17977 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17978 now noticed by Bison.
17979 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17980 have a reduction on $default.
17981
17982 2001-12-29 Akim Demaille <akim@epita.fr>
17983
17984 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17985 rule line numbers.
17986 * src/closure.c (print_closure): Likewise.
17987 * src/derives.c (print_derives): Likewise.
17988 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17989 now.
17990
17991 2001-12-29 Akim Demaille <akim@epita.fr>
17992
17993 * src/lalr.c (lookaheads_print): New.
17994 (lalr): Call it when --trace-flag.
17995 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17996 are dumped.
17997
17998 2001-12-29 Akim Demaille <akim@epita.fr>
17999
18000 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18001 when walking through ritem, even via rule->rhs.
18002 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18003 (useful_production, useless_nonterminals): Likewise.
18004 (reduce_grammar_tables): Likewise, plus update nritems.
18005 * src/nullable.c (set_nullable): Likewise.
18006 * src/lalr.c (build_relations): Likewise.
18007 * tests/sets.at (Nullable): Adjust.
18008 Fortunately, now, the $axiom is no longer nullable.
18009
18010 2001-12-29 Akim Demaille <akim@epita.fr>
18011
18012 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18013 the 0-sentinel.
18014 * src/gram.c (ritem_longest_rhs): Likewise.
18015 * src/reduce.c (nonterminals_reduce): Likewise.
18016 * src/print_graph.c (print_graph): Likewise.
18017 * src/output.c (output_rule_data): Likewise.
18018 * src/nullable.c (set_nullable): Likewise.
18019
18020 2001-12-29 Akim Demaille <akim@epita.fr>
18021
18022 * src/output.c: Comment changes.
18023
18024 2001-12-27 Paul Eggert <eggert@twinsun.com>
18025
18026 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18027 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18028 Sparc, as they were causing more porting problems than the
18029 (minor) performance improvement was worth.
18030
18031 Also, catch up with 1.31's YYSTD.
18032
18033 2001-12-27 Akim Demaille <akim@epita.fr>
18034
18035 * src/output.c (output_gram): Rely on nritems, not the
18036 0-sentinel. See below.
18037 Use -1 as separator, not 0.
18038 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18039 Rely on -1 as separator in yyrhs, instead of 0.
18040 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18041 twice `Now at end of input', therefore there are two lines less to
18042 expect.
18043
18044 2001-12-27 Akim Demaille <akim@epita.fr>
18045
18046 * tests/regression.at (Unresolved SR Conflicts):
18047 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18048 below.
18049
18050 2001-12-27 Akim Demaille <akim@epita.fr>
18051
18052 * src/LR0.c (new_state): Recognize the final state by the fact it
18053 is reached by eoftoken.
18054 (insert_start_shifting_state, insert_eof_shifting_state)
18055 (insert_accepting_state, augment_automaton): Remove, since now
18056 these states are automatically computed from the initial state.
18057 (generate_states): Adjust.
18058 * src/print.c: When reporting a rule number to the user, substract
18059 1, so that the axiom rule is rule 0, and the first user rule is 1.
18060 * src/reduce.c: Likewise.
18061 * src/print_graph.c (print_core): For the time being, just as for
18062 the report, depend upon --trace-flags to dump the full set of
18063 items.
18064 * src/reader.c (readgram): Once the grammar read, insert the rule
18065 0: `$axiom: START-SYMBOL $'.
18066 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18067 number of the states has changed (the final state is no longer
18068 necessarily the last), catch up.
18069
18070 2001-12-27 Akim Demaille <akim@epita.fr>
18071
18072 Try to make the use of the eoftoken valid. Given that its value
18073 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18074 is used instead of > 0 where appropriate, (ii), depend upon nritems
18075 instead of the 0-sentinel.
18076
18077 * src/gram.h, src/gram.c (nritems): New.
18078 Expected to be duplication of nitems, but for the time being...
18079 * src/reader.c (packgram): Assert nritems and nitems are equal.
18080 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18081 * src/closure.c (print_closure, print_fderives): Likewise.
18082 * src/gram.c (ritem_print): Likewise.
18083 * src/print.c (print_core, print_grammar): Likewise.
18084 * src/print_graph.c: Likewise.
18085
18086 2001-12-27 Akim Demaille <akim@epita.fr>
18087
18088 * src/main.c (main): If there are complains after grammar
18089 reductions, then output the report anyway if requested, then die.
18090 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18091 * src/reader.c (eoftoken): New.
18092 (parse_token_decl): If the token being defined has value `0', it
18093 is the eoftoken.
18094 (packsymbols): No longer hack `tags' to insert `$' by hand.
18095 Be sure to preserve the value of the eoftoken.
18096 (reader): Make sure eoftoken is defined.
18097 Initialize nsyms to 0: now eoftoken is created just like the others.
18098 * src/print.c (print_grammar): Don't special case the eof token.
18099 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18100 lie anyway, albeit pleasant.
18101 * tests/calc.at: Exercise error messages with eoftoken.
18102 Change the grammar so that empty input is invalid.
18103 Adjust expectations.
18104 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18105
18106 2001-12-27 Akim Demaille <akim@epita.fr>
18107
18108 * configure.in: Check the protos of strchr ans strspn.
18109 Replace strchr if needed.
18110 * src/system.h: Provide the protos of strchr, strspn and memchr if
18111 missing.
18112 * lib/strchr.c: New.
18113 * src/reader.c (symbols_save): Use strchr.
18114
18115 2001-12-27 Akim Demaille <akim@epita.fr>
18116
18117 * src/print.c, src/print_graph.c (escape): New.
18118 Use it to quote the TAGS outputs.
18119 * src/print_graph.c (print_state): Now errors are in red, and
18120 reductions in green.
18121 Prefer high to wide: output the state number on a line of its own.
18122
18123 2001-12-27 Akim Demaille <akim@epita.fr>
18124
18125 * src/state.h, src/state.c (reductions_new): New.
18126 * src/LR0.c (set_state_table): Let all the states have a
18127 `reductions', even if reduced to 0.
18128 (save_reductions): Adjust.
18129 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18130 * src/print.c (print_reductions, print_actions): Adjust.
18131 * src/output.c (action_row): Adjust.
18132
18133 2001-12-27 Akim Demaille <akim@epita.fr>
18134
18135 * src/state.h, src/state.c (errs_new, errs_dup): New.
18136 * src/LR0.c (set_state_table): Let all the states have an errs,
18137 even if reduced to 0.
18138 * src/print.c (print_errs, print_reductions): Adjust.
18139 * src/output.c (output_actions, action_row): Adjust.
18140 * src/conflicts.c (resolve_sr_conflict): Adjust.
18141
18142 2001-12-27 Akim Demaille <akim@epita.fr>
18143
18144 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18145
18146 2001-12-27 Akim Demaille <akim@epita.fr>
18147
18148 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18149 * src/print.c: here.
18150 (lookaheadset, shiftset): New, used as additional storage by
18151 print_reductions.
18152 (print_results): Adjust.
18153 (print_shifts, print_gotos, print_errs): New, extracted from...
18154 (print_actions): here.
18155 * src/print_graph.c (print_actions): Remove dead code.
18156
18157 2001-12-27 Akim Demaille <akim@epita.fr>
18158
18159 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18160 `$n' and `@n'.
18161
18162 2001-12-27 Akim Demaille <akim@epita.fr>
18163
18164 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18165 (build_relations): Adjust.
18166
18167 2001-12-27 Akim Demaille <akim@epita.fr>
18168
18169 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18170 duplication.
18171
18172 2001-12-27 Akim Demaille <akim@epita.fr>
18173
18174 * src/reader.c (packgram): Catch nitems overflows.
18175
18176 2001-12-27 Akim Demaille <akim@epita.fr>
18177
18178 * src/files.c, src/files.h (guard_obstack): Remove.
18179 * src/output.c (output): Adjust.
18180 * src/reader.c (parse_braces): New, factoring...
18181 (copy_action, copy_guard): these two which are renamed as...
18182 (parse_action, parse_guard): these.
18183 As a voluntary consequence, using braces around guards is now
18184 mandatory.
18185
18186 2001-12-27 Akim Demaille <akim@epita.fr>
18187
18188 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18189 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18190 members.
18191 (symbol_list_new): Adjust.
18192 (copy_action): action_line is the first line, not the last.
18193 (copy_guard): Just as for actions, store the `action' only, not
18194 the switch/case/break flesh.
18195 Don't parse the user action that might follow the guard, let...
18196 (readgram): do it, i.e., now, there can be an action after a
18197 guard.
18198 In other words the guard is just explicitly optional.
18199 (packgram): Adjust.
18200 * src/output.c (guards_output): New.
18201 (output_parser): Call it when needed.
18202 (output): Also free the guard and attrs obstacks.
18203 * src/files.c, src/files.h (obstack_save): Remove.
18204 (output_files): Remove.
18205 As a result, if one needs the former `.act' file, using an
18206 appropriate skeleton which requires actions and guards is now
18207 required.
18208 * src/main.c (main): Adjust.
18209 * tests/semantic.at: New.
18210 * tests/regression.at: Use `input.y' as input file name.
18211 Avoid 8+3 problems by requiring input.c when the test needs the
18212 parser.
18213
18214 2001-12-27 Akim Demaille <akim@epita.fr>
18215
18216 * src/reader.c (symbol_list_new): Be sure to initialize all the
18217 fields.
18218
18219 2001-12-27 Akim Demaille <akim@epita.fr>
18220
18221 All the hacks using a final pseudo state are now useless.
18222
18223 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18224 * src/lalr.c (nLA): New.
18225 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18226 instead of lookaheadsp from the pseudo state (nstate + 1).
18227
18228 2001-12-27 Akim Demaille <akim@epita.fr>
18229
18230 * src/output.c (action_row, token_actions): Use a state_t instead
18231 of a integer, and nlookaheads instead of the following state's
18232 lookaheadsp.
18233
18234 2001-12-27 Akim Demaille <akim@epita.fr>
18235
18236 * src/conflicts.c (log_resolution, flush_shift)
18237 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18238 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18239 (conflicts_print, print_reductions): Use a state_t instead of an
18240 integer when referring to a state.
18241 As much as possible, depend upon nlookaheads, instead of the
18242 `lookaheadsp' member of the following state (since lookaheads of
18243 successive states are successive, the difference between state n + 1
18244 and n served as the number of lookaheads for state n).
18245 * src/lalr.c (add_lookback_edge): Likewise.
18246 * src/print.c (print_core, print_actions, print_state)
18247 (print_results): Likewise.
18248 * src/print_graph.c (print_core, print_actions, print_state)
18249 (print_graph): Likewise.
18250 * src/conflicts.h: Adjust.
18251
18252 2001-12-27 Akim Demaille <akim@epita.fr>
18253
18254 * src/bison.hairy: Formatting/comment changes.
18255 ANSIfy.
18256 Remove `register' indications.
18257 Add plenty of `static'.
18258
18259 2001-12-27 Akim Demaille <akim@epita.fr>
18260
18261 * src/output.c (prepare): Drop the muscle `ntbase' which
18262 duplicates ntokens.
18263 * src/bison.simple: Formatting/comment changes.
18264 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18265 is an undocumented synonym.
18266
18267 2001-12-22 Akim Demaille <akim@epita.fr>
18268
18269 * src/output.c (output_table_data): Change the prototype to use
18270 `int' for array ranges: some invocations do pass an int, not a
18271 short.
18272 Reported by Wayne Green.
18273
18274 2001-12-22 Akim Demaille <akim@epita.fr>
18275
18276 Some actions of web2c.y are improperly triggered.
18277 Reported by Mike Castle.
18278
18279 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18280 * tests/regression.at (Web2c): Rename as...
18281 (Web2c Report): this.
18282 (Web2c Actions): New.
18283
18284 2001-12-22 Akim Demaille <akim@epita.fr>
18285
18286 Reductions in web2c.y are improperly reported.
18287 Reported by Mike Castle.
18288
18289 * src/conflicts.c (print_reductions): Fix.
18290 * tests/regression.at (Web2c): New.
18291
18292 2001-12-18 Akim Demaille <akim@epita.fr>
18293
18294 Some host fail on `assert (!"foo")', which expands to
18295 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18296 Reported by Nelson Beebee.
18297
18298 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18299 `#define it_succeeded 0' and `assert (it_succeeded)'.
18300
18301 2001-12-17 Marc Autret <autret_m@epita.fr>
18302
18303 * src/bison.simple: Don't hard code the skeleton line and filename.
18304 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18305 New line counter 'skeleton_line' (skeleton-line muscle).
18306
18307 2001-12-17 Paul Eggert <eggert@twinsun.com>
18308
18309 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18310 YYDEBUG must be defined to a nonzero value.
18311
18312 * src/bison.simple (yytname): Do not assume that the user defines
18313 YYDEBUG to a properly parenthesized expression.
18314
18315 2001-12-17 Akim Demaille <akim@epita.fr>
18316
18317 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18318 nlookaheads is a new member.
18319 Adjust all users.
18320 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18321 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18322 state.
18323
18324 2001-12-17 Akim Demaille <akim@epita.fr>
18325
18326 * src/files.h, src/files.c (open_files, close_files): Remove.
18327 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18328 let...
18329 * src/reader.c (reader): Do it.
18330
18331 2001-12-17 Akim Demaille <akim@epita.fr>
18332
18333 * src/conflicts.c (print_reductions): Formatting changes.
18334
18335 2001-12-17 Akim Demaille <akim@epita.fr>
18336
18337 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18338 (flush_reduce): New.
18339 (resolve_sr_conflict): Adjust.
18340
18341 2001-12-17 Akim Demaille <akim@epita.fr>
18342
18343 * src/output.c (output_obstack): Be static and rename as...
18344 (format_obstack): this, to avoid any confusion with files.c's
18345 output_obstack.
18346 * src/reader.h (muscle_obstack): Move to...
18347 * src/output.h: here, since it's defined in output.c.
18348
18349 2001-12-17 Akim Demaille <akim@epita.fr>
18350
18351 * src/output.c (action_row, save_column, default_goto)
18352 (sort_actions, matching_state, pack_vector): Better variable
18353 locality.
18354
18355 2001-12-17 Akim Demaille <akim@epita.fr>
18356
18357 * src/output.c: Various formatting changes.
18358
18359 2001-12-17 Akim Demaille <akim@epita.fr>
18360
18361 * src/files.c (output_files): Free the output_obstack.
18362 * src/main.c (main): Call print and print_graph conditionally.
18363 * src/print.c (print): Work unconditionally.
18364 * src/print_graph.c (print_graph): Work unconditionally.
18365 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18366
18367 2001-12-16 Marc Autret <autret_m@epita.fr>
18368
18369 * src/output.c (actions_output): Fix. When we use %no-lines,
18370 there is one less line per action.
18371
18372 2001-12-16 Marc Autret <autret_m@epita.fr>
18373
18374 * src/bison.simple: Remove a useless #line directive.
18375 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18376 * src/output.c (get_lines_number): New.
18377 (output_parser): Adjust, now takes care about the lines of a
18378 output muscles.
18379 Fix line numbering.
18380 (actions_output): Computes the number of lines taken by actions.
18381 (output_master_parser): Insert new skeleton which is the name of
18382 the output parser file name.
18383
18384 2001-12-15 Marc Autret <autret_m@epita.fr>
18385
18386 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18387
18388 2001-12-15 Marc Autret <autret_m@epita.fr>
18389
18390 * src/output.c (output_gram): Keep track of the hairy one.
18391
18392 2001-12-15 Akim Demaille <akim@epita.fr>
18393
18394 Make `make distcheck' work.
18395
18396 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18397 system.h which uses libgettext.h.
18398
18399 2001-12-15 Akim Demaille <akim@epita.fr>
18400
18401 * src/nullable.c (set_nullable): Useless rules must be skipped,
18402 otherwise, since we range over their symbols, we might look at a
18403 nonterminal which no longer ``exists'', i.e., it is not counted in
18404 `nvars', hence we overflow our arrays.
18405
18406 2001-12-15 Akim Demaille <akim@epita.fr>
18407
18408 The header can also be produced directly, without any obstack!
18409 Yahoo!
18410
18411 * src/files.c, src/files.h (defines_obstack): Remove.
18412 (compute_header_macro): Global.
18413 (defines_obstack_save): Remove.
18414 * src/reader.c (parse_union_decl): No longer output to
18415 defines_obstack: its content can be found in the `stype' muscle
18416 anyway.
18417 (output_token_translations): Merge into...
18418 (symbols_output): this.
18419 Rename as...
18420 (symbols_save): this.
18421 (reader): Adjust.
18422 * src/output.c (header_output): New.
18423 (output): Call it.
18424
18425 2001-12-15 Akim Demaille <akim@epita.fr>
18426
18427 * src/reader.c (parse_union_decl): Instead of handling two obstack
18428 simultaneously, use one to define the `stype' muscle, and use the
18429 value of the latter to fill defines_obstack.
18430 (copy_comment): Remove.
18431 (copy_comment2): Work for a single obstack.
18432 Rename as...
18433 (copy_comment): this.
18434
18435 2001-12-15 Akim Demaille <akim@epita.fr>
18436
18437 * src/lex.c, src/lex.h (xgetc): No longer static.
18438 * src/reader.c (parse_union_decl): Revamp.
18439
18440 2001-12-15 Akim Demaille <akim@epita.fr>
18441
18442 Still making progress in separating Bison into (i) input, (ii)
18443 process, (iii) output: now we can directly output the parser file
18444 without using table_obstack at all.
18445
18446 * src/files.c, src/files.h (table_obstack): Bye bye.
18447 (parser_file_name): New.
18448 * src/files.c (compute_output_file_names): Compute it.
18449 * src/output.c (actions_output, output_parser)
18450 (output_master_parser): To a file instead of an obstack.
18451
18452 2001-12-15 Akim Demaille <akim@epita.fr>
18453
18454 Attach actions to rules, instead of pre-outputting them to
18455 actions_obstack.
18456
18457 * src/gram.h (rule_t): action and action_line are new members.
18458 * src/reader.c (symbol_list): Likewise.
18459 (copy_action): Save the actions within the rule.
18460 (packgram): Save them in rule_table.
18461 * src/output.c (actions_output): New.
18462 (output_parser): Use it on `%%actions'.
18463 (output_rule_data): Don't free rule_table.
18464 (output): Do it.
18465 (prepare): Don't save the `action' muscle.
18466 * src/bison.simple: s/%%action/%%actions/.
18467
18468 2001-12-15 Akim Demaille <akim@epita.fr>
18469
18470 * src/reader.c (copy_action): When --yacc, don't append a `;'
18471 to the user action: let it fail if lacking.
18472 Suggested by Arnold Robbins and Tom Tromey.
18473
18474 2001-12-14 Akim Demaille <akim@epita.fr>
18475
18476 * src/lex.c (literalchar): Simply return the char you decoded, non
18477 longer mess around with obstacks and int pointers.
18478 Adjust all callers.
18479
18480 2001-12-14 Akim Demaille <akim@epita.fr>
18481
18482 * src/lex.c (literalchar): Don't escape the special characters,
18483 just decode them, and keep them as char (before, eol was output as
18484 the 2 char string `\n' etc.).
18485 * src/output.c (output_rule_data): Use quotearg to output the
18486 token strings.
18487
18488 2001-12-13 Paul Eggert <eggert@twinsun.com>
18489
18490 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18491 Do not infringe on the global user namespace when using C++.
18492 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18493 All uses of `fprintf' and `stderr' changed.
18494
18495 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18496
18497 2001-12-13 Akim Demaille <akim@epita.fr>
18498
18499 The computation of nullable is broken: it doesn't handle empty
18500 RHS's properly.
18501
18502 * tests/torture.at (GNU AWK Grammar): New.
18503 * tests/sets.at (Nullable): New.
18504 * src/nullable.c (set_nullable): Instead of blindly looping over
18505 `ritems', loop over the rules, and then over their rhs's.
18506
18507 Work around Autotest bugs.
18508
18509 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18510 frame, because Autotest understand lines starting with a `+' as
18511 traces from the shell. Then, they are not processed properly.
18512 Admittedly an Autotest bug, but we don't have time to wait for
18513 Autotest to catch up.
18514 * tests/regression.at (Broken Closure): Adjust to the new table
18515 frames.
18516 Move to...
18517 * tests/sets.at: here.
18518
18519 2001-12-13 Akim Demaille <akim@epita.fr>
18520
18521 * src/closure.c (closure): Use nrules instead of playing tricks
18522 with BITS_PER_WORD.
18523
18524 2001-12-13 Akim Demaille <akim@epita.fr>
18525
18526 * src/print.c (print_actions): Output the handling of `$' as the
18527 traces do: shifting the token EOF. Before EOF was treated as a
18528 nonterminal.
18529 * tests/regression.at: Adjust some tests.
18530 * src/print_graph.c (print_core): Complete the set of items via
18531 closure. The next-to-final and final states are still unsatisfying,
18532 but that's to be addressed elsewhere.
18533 No longer output the rule numbers, but do output the state number.
18534 A single loop for the shifts + gotos is enough, but picked a
18535 distinct color for each.
18536 (print_graph): Initialize and finalize closure.
18537
18538 2001-12-13 Akim Demaille <akim@epita.fr>
18539
18540 * src/reader.c (readgram): Remove dead code, an strip useless
18541 braces.
18542 (get_type): Remove, unused.
18543
18544 2001-12-12 Akim Demaille <akim@epita.fr>
18545
18546 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18547 on that of lib/error.c.
18548
18549 2001-12-12 Akim Demaille <akim@epita.fr>
18550
18551 Some hosts don't like `/' in includes.
18552
18553 * src/system.h: Include libgettext.h without qualifying the path.
18554 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18555 $(top_srcdir).
18556
18557 2001-12-11 Marc Autret <autret_m@epita.fr>
18558
18559 * src/output.c (output_parser): Remove useless muscle.
18560
18561 2001-12-11 Marc Autret <autret_m@epita.fr>
18562
18563 * src/bison.simple: Remove #line just before %%epilogue. It
18564 is now handled in ...
18565 * src/reader.c (read_additionnal_code): Add the output of a
18566 #line for the epilogue.
18567
18568 2001-12-10 Marc Autret <autret_m@epita.fr>
18569
18570 * src/reader.c (copy_definition): Re-use CPP-outed code which
18571 replace precedent remove.
18572 * src/bison.simple: Remove #line before %%prologue because
18573 %%input-line is wrong at this time.
18574
18575 2001-12-10 Marc Autret <autret_m@epita.fr>
18576
18577 * src/reader.c (symbols_output): Clean up.
18578 * src/output.c (output_gram, output): Clean up.
18579
18580 2001-12-10 Akim Demaille <akim@epita.fr>
18581
18582 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18583 * src/LR0.c (set_state_table): here.
18584 * src/lalr.c (lalr): Call it.
18585
18586 2001-12-10 Akim Demaille <akim@epita.fr>
18587
18588 * src/state.h (shifts): Remove the `number' member: shifts are
18589 attached to state, hence no longer need to be labelled with a
18590 state number.
18591
18592 2001-12-10 Akim Demaille <akim@epita.fr>
18593
18594 Now that states have a complete set of members, the linked list of
18595 shifts is useless: just fill directly the state's shifts member.
18596
18597 * src/state.h (shifts): Remove the `next' member.
18598 * src/LR0.c (first_state, last_state): Remove.
18599 Adjust the callers.
18600 (augment_automaton): Don't look for the shifts that must be added
18601 a shift on EOF: it is those of the state we looked for! But now,
18602 since shifts are attached, it is no longer needed to looking
18603 merely by its id: its number.
18604
18605 2001-12-10 Akim Demaille <akim@epita.fr>
18606
18607 * src/LR0.c (augment_automaton): Better variable locality.
18608 Remove an impossible branch: if there is a state corresponding to
18609 the start symbol being shifted, then there is shift for the start
18610 symbol from the initial state.
18611
18612 2001-12-10 Akim Demaille <akim@epita.fr>
18613
18614 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18615 only when appropriate: when insert_start_shifting_state' is not
18616 invoked.
18617 * tests/regression.at (Rule Line Numbers): Adjust.
18618
18619 2001-12-10 Akim Demaille <akim@epita.fr>
18620
18621 * src/LR0.c (augment_automaton): Now that all states have shifts,
18622 merge the two cases addition shifts to the initial state.
18623
18624 2001-12-10 Akim Demaille <akim@epita.fr>
18625
18626 * src/lalr.c (set_state_table): Move to...
18627 * src/LR0.c: here.
18628 * src/lalr.c (lalr): Don't call it...
18629 * src/LR0.c (generate_states): do it.
18630 * src/LR0.h (first_state): Remove, only the table is used.
18631
18632 2001-12-10 Akim Demaille <akim@epita.fr>
18633
18634 * src/LR0.h (first_shift, first_reduction): Remove.
18635 * src/lalr.c: Don't use first_shift: find shifts through the
18636 states.
18637
18638 2001-12-10 Akim Demaille <akim@epita.fr>
18639
18640 * src/LR0.c: Attach shifts to states as soon as they are
18641 computed.
18642 * src/lalr.c (set_state_table): Instead of assigning shifts to
18643 state, just assert that the mapping was properly done.
18644
18645 2001-12-10 Akim Demaille <akim@epita.fr>
18646
18647 * src/LR0.c (insert_start_shift): Rename as...
18648 (insert_start_shifting_state): this.
18649 (insert_eof_shifting_state, insert_accepting_state): New.
18650 (augment_automaton): Adjust.
18651 Better locality of the variables.
18652 When looking if the start_symbol is shifted from the initial
18653 state, using `while (... symbol != start_symbol ...)' sounds
18654 better than `while (... symbol < start_symbol ...)': If fail
18655 to see how the order between symbols could be relevant!
18656
18657 2001-12-10 Akim Demaille <akim@epita.fr>
18658
18659 * src/getargs.h: Don't declare `spec_name_prefix' and
18660 `spec_file_prefix', declared by src/files.h.
18661 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18662 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18663 * src/output.c (prepare): Adjust.
18664 * src/reader.c (symbols_output): Likewise.
18665 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18666
18667 2001-12-10 Akim Demaille <akim@epita.fr>
18668
18669 * src/muscle_tab.c (muscle_init): NULL is a better default than
18670 `"0"'.
18671
18672 2001-12-10 Akim Demaille <akim@epita.fr>
18673
18674 * src/reader.c (reader): Calling symbols_output once is enough.
18675
18676 2001-12-10 Akim Demaille <akim@epita.fr>
18677
18678 Now that states have a complete set of members, the linked list of
18679 reductions is useless: just fill directly the state's reductions
18680 member.
18681
18682 * src/state.h (struct reductions): Remove member `number' and
18683 `next'.
18684 * src/LR0.c (first_reduction, last_reduction): Remove.
18685 (save_reductions): Don't link the new reductions, store them in
18686 this_state.
18687 * src/lalr.c (set_state_table): No need to attach reductions to
18688 states, it's already done.
18689 * src/output.c (output_actions): No longer free the shifts, then
18690 the reductions, then the states: free all the states and their
18691 members.
18692
18693 2001-12-10 Akim Demaille <akim@epita.fr>
18694
18695 * src/options.c (OPTN, DRTV, BOTH): New.
18696 (option_table): Use them.
18697
18698 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18699 the job of system.h.
18700 * src/options.c: Don't include stdio.h and xalloc.h for the same
18701 reasons.
18702
18703 2001-12-10 Akim Demaille <akim@epita.fr>
18704
18705 * src/output.c (output, prepare): Make sure the values of the
18706 muscles `action' and `prologue' are 0-terminated.
18707
18708 2001-12-10 Akim Demaille <akim@epita.fr>
18709
18710 Clean up GCC warnings.
18711
18712 * src/reader.c (copy_action): `buf' is not used.
18713 (parse_skel_decl): Be static.
18714 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18715 * src/options.h (create_long_option_table): Have a real prototype.
18716 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18717 (hash_delete_at): Return const void *.
18718 Adjust casts to preserve the const.
18719
18720 2001-12-10 Akim Demaille <akim@epita.fr>
18721
18722 * configure.in: Require 2.52g.
18723 M4 is not needed, but AUTOM4TE is.
18724 * m4/m4.m4: Remove.
18725 * tests/Makefile.am: Adjust.
18726
18727 2001-12-10 Akim Demaille <akim@epita.fr>
18728
18729 One structure for states is enough, even though theoretically
18730 there are LR(0) states and LALR(1) states.
18731
18732 * src/lalr.h (state_t): Remove.
18733 (state_table): Be state_t **, not state_t *.
18734 * src/state.h (core, CORE_ALLOC): Rename as...
18735 (state_t, STATE_ALLOC): this.
18736 Add the LALR(1) members: shifts, reductions, errs.
18737 * src/LR0.c (state_table): Rename as...
18738 (state_hash): this, to avoid name clashes with the global
18739 `state_table'.
18740 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18741 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18742
18743 2001-12-10 Akim Demaille <akim@epita.fr>
18744
18745 Bison dumps core on bash.y.
18746 Reported by Pascal Bart.
18747
18748 * src/warshall.c (bitmatrix_print): New.
18749 (TC): Use it.
18750 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
18751 j must be the outer loop.
18752 * tests/regression.at (Broken Closure): New.
18753
18754 2001-12-05 Akim Demaille <akim@epita.fr>
18755
18756 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18757 its argument.
18758 Reported by Peter Hamorsky.
18759
18760 2001-12-05 Akim Demaille <akim@epita.fr>
18761
18762 * src/conflicts.c (err_table): Remove.
18763 (resolve_sr_conflict): Adjust.
18764 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18765 Rename as...
18766 (state_t.reductions, state_t.shifts): this.
18767
18768 2001-12-05 Akim Demaille <akim@epita.fr>
18769
18770 * src/reduce.c (reduce_grammar_tables): No longer disable the
18771 removal of useless rules via CPP but via `if (0)', so that the
18772 compiler still check the code is valid.
18773 For instance, it should have noticed `rline' no longer exists: use
18774 the `line' member of rule_t.
18775 * src/gram.c (dummy, rline): Remove, unused.
18776
18777 2001-12-05 Akim Demaille <akim@epita.fr>
18778
18779 * src/output.c (pack_vector): Use assert, not berror.
18780 * src/main.c (berror): Remove, unused.
18781
18782 2001-12-05 Akim Demaille <akim@epita.fr>
18783
18784 New experimental feature: if --verbose --trace output all the
18785 items of a state, not only its kernel.
18786
18787 * src/print.c (print_core): If `trace_flag', then invoke closure
18788 before outputting the items of the state (print_core is no longer
18789 a correct name them).
18790 (print_results): Invoke new_closure/free_closure if needed.
18791
18792 2001-12-05 Akim Demaille <akim@epita.fr>
18793
18794 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18795 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18796 (nitemset): for consistency with the rest of the project.
18797
18798 2001-12-05 Akim Demaille <akim@epita.fr>
18799
18800 * src/closure.c (print_closure): Improve.
18801 (closure): Use it for printing input and output.
18802
18803 2001-12-05 Akim Demaille <akim@epita.fr>
18804
18805 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18806 indexed by nonterminals.
18807
18808 2001-12-05 Akim Demaille <akim@epita.fr>
18809
18810 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18811 what it was!).
18812 * src/warshall.h: Remove accidental duplication of the content.
18813
18814 2001-12-05 Akim Demaille <akim@epita.fr>
18815
18816 * src/closure.c (set_fderives): De-obfuscate.
18817
18818 2001-12-05 Akim Demaille <akim@epita.fr>
18819
18820 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18821
18822 2001-12-05 Akim Demaille <akim@epita.fr>
18823
18824 * src/closure.c (set_firsts): De-obfuscate.
18825
18826 2001-12-05 Akim Demaille <akim@epita.fr>
18827
18828 * src/output.c (action_row): De-obfuscate
18829 using the good o' techniques: arrays not pointers, variable
18830 locality, BITISSET, RESETBIT etc.
18831
18832 2001-12-05 Akim Demaille <akim@epita.fr>
18833
18834 Pessimize the code to simplify it: from now on, all the states
18835 have a valid SHIFTS, which NSHIFTS is possibly 0.
18836
18837 * src/LR0.c (shifts_new): Be global and move to..
18838 * src/state.c, src/state.h: here.
18839 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18840 * src/print_graph: Adjust.
18841
18842 2001-12-05 Akim Demaille <akim@epita.fr>
18843
18844 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18845 * src/conflicts.c: Use it.
18846 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18847 incorrectly ``simplified''.
18848
18849 2001-12-05 Akim Demaille <akim@epita.fr>
18850
18851 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18852 using the good o' techniques: arrays not pointers, variable
18853 locality, BITISSET, RESETBIT etc.
18854
18855 2001-12-05 Akim Demaille <akim@epita.fr>
18856
18857 * src/state.h (SHIFT_SYMBOL): New.
18858 * src/conflicts.c: Use it to deobfuscate.
18859
18860 2001-12-05 Akim Demaille <akim@epita.fr>
18861
18862 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18863 (print_reductions): De-obfuscate using the good o' techniques:
18864 arrays not pointers, variable locality, BITISSET.
18865
18866 2001-12-05 Akim Demaille <akim@epita.fr>
18867
18868 * src/conflicts.c (print_reductions): Arrays, not pointers.
18869 Use BITISSET.
18870
18871 2001-12-05 Akim Demaille <akim@epita.fr>
18872
18873 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18874
18875 2001-12-05 Akim Demaille <akim@epita.fr>
18876
18877 * src/conflicts.c (print_reductions): Improve variable locality.
18878
18879 2001-12-05 Akim Demaille <akim@epita.fr>
18880
18881 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18882
18883 2001-12-05 Akim Demaille <akim@epita.fr>
18884
18885 * src/conflicts.c (print_reductions): Improve variable locality.
18886
18887 2001-12-05 Akim Demaille <akim@epita.fr>
18888
18889 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18890 * src/lalr.c: Use them.
18891
18892 2001-12-05 Akim Demaille <akim@epita.fr>
18893
18894 * src/LR0.c (augment_automaton): Formatting changes.
18895 Better variable locality.
18896
18897 2001-12-05 Akim Demaille <akim@epita.fr>
18898
18899 * src/lalr.c (matrix_print): New.
18900 (transpose): Use it.
18901 Use arrays instead of pointers.
18902
18903 2001-12-05 Akim Demaille <akim@epita.fr>
18904
18905 * src/lalr.c (maxrhs): Move to...
18906 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18907 * src/lalr.c (build_relations): Adjust.
18908
18909 2001-12-05 Akim Demaille <akim@epita.fr>
18910
18911 * src/lalr.c (transpose): Free the memory allocated to the
18912 argument, as it is replaced by the results by the unique caller.
18913 (build_relations): Merely invoke transpose: it handles the memory
18914 deallocation.
18915 Improve variable locality.
18916 Avoid variables used as mere abbreviations.
18917 (compute_lookaheads): Use arrays instead of pointers.
18918
18919 2001-12-05 Akim Demaille <akim@epita.fr>
18920
18921 * src/lalr.c (initialize_F): Improve variable locality.
18922 Avoid variables used as mere abbreviations.
18923
18924 2001-12-05 Akim Demaille <akim@epita.fr>
18925
18926 * src/derives.c (print_derives): Display the ruleno.
18927 * src/lalr.c (initialize_F, transpose): Better variable locality
18928 to improve readability.
18929 Avoid variables used as mere abbreviations.
18930
18931 2001-12-05 Akim Demaille <akim@epita.fr>
18932
18933 * src/lalr.c (traverse): Use arrays instead of pointers.
18934
18935 2001-12-05 Akim Demaille <akim@epita.fr>
18936
18937 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18938 the handling of squeue.
18939 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18940
18941 2001-12-05 Akim Demaille <akim@epita.fr>
18942
18943 Because useless nonterminals are now kept alive (instead of being
18944 `destroyed'), we now sometimes examine them, and store information
18945 related to them. Hence we need to know their number, and adjust
18946 memory allocations.
18947
18948 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18949 static.
18950 * src/LR0.c (allocate_itemsets): The memory allocated to
18951 `symbol_count' was used for two different purpose: once to count
18952 the number of occurrences of each symbol, and later reassigned to
18953 `shift_symbol', containing the symbol that can be shifted from a
18954 given state.
18955 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18956 only, and...
18957 (new_itemsets): Allocate `shift_symbol' here.
18958 (allocate_itemsets): symbol_count includes useless nonterminals.
18959 Make room for them.
18960 (free_storage): Use `free', not `XFREE', for pointers that cannot
18961 be null.
18962
18963 2001-12-05 Akim Demaille <akim@epita.fr>
18964
18965 * src/nullable.c (set_nullable): Deobfuscate the handling of
18966 ritem.
18967 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18968
18969 2001-12-05 Akim Demaille <akim@epita.fr>
18970
18971 * src/gram.c, src/gram.h (ritem_print): New.
18972 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18973 (This useless function was defined only to work around VMS linkers
18974 that can't handle compilation units with variables only).
18975 * src/reduce.c (dump_grammar): Use it to trace the construction of
18976 ritem.
18977
18978 2001-12-04 Paul Eggert <eggert@twinsun.com>
18979
18980 * src/bison.simple (union yyalloc): Change member names
18981 to be the same as the stack names.
18982 (yyparse): yyptr is now union yyalloc *, not char *.
18983 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18984 and may generate better code on some machines.
18985 (yystpcpy): Use prototype if __STDC__ is defined, not just
18986 if __cplusplus is defined.
18987
18988 2001-11-30 Akim Demaille <akim@epita.fr>
18989
18990 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18991 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18992 Gettext doesn't compile cleanly, and dies with -Werror.
18993 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18994 Include WARNING_CFLAGS here.
18995 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18996 before being defined.
18997
18998 2001-11-27 Paul Eggert <eggert@twinsun.com>
18999
19000 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19001 First arg is int, not unsigned.
19002 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19003 (SIZE_MAX, UINT_MAX): New macros.
19004 (quotearg_n_options): Abort if N is negative.
19005 Avoid overflow check on hosts where size_t is 64 bits and int
19006 is 32 bits, as overflow is impossible there.
19007 Fix off-by-one typo that caused unnecessary reallocation.
19008
19009 2001-11-29 Paul Eggert <eggert@twinsun.com>
19010
19011 Name space cleanup in generated parser.
19012
19013 * doc/bison.texinfo (Bison Parser): Discuss system headers
19014 and their effect on the user name space.
19015
19016 * src/bison.simple:
19017 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19018 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19019 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19020
19021 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19022 on user names when possible.
19023
19024 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19025 Simplify test for whather <alloca.h> exists.
19026
19027 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19028
19029 (<stdio.h>): Include if YYDEBUG.
19030
19031 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19032 ! defined (yyoverflow) && ! defined (yymemcpy).
19033
19034 (yymemcpy, yyparse): Rename local variables as needed so that
19035 they all begin with 'yy'.
19036
19037 (yystrlen, yystpcpy): New functions.
19038
19039 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19040 All uses changed.
19041
19042 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19043 instead of relying on string.h functions. Use YYSTACK_ALLOC
19044 and YYSTACK_FREE instead of malloc and free.
19045
19046 2001-11-30 Akim Demaille <akim@epita.fr>
19047
19048 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19049 before their first uses.
19050 (YYBISON, YYPURE): Move to the top of the output.
19051
19052 2001-11-30 Akim Demaille <akim@epita.fr>
19053
19054 * tests/reduce.at (Useless Nonterminals): Fix.
19055
19056 2001-11-30 Akim Demaille <akim@epita.fr>
19057
19058 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19059 if body instead of `;' to pacify GCC's warnings.
19060
19061 2001-11-30 Akim Demaille <akim@epita.fr>
19062
19063 Instead of mapping the LHS of unused rules to -1, keep the LHS
19064 valid, but flag the rules as invalid.
19065
19066 * src/gram.h (rule_t): `useful' is a new member.
19067 * src/print.c (print_grammar): Adjust.
19068 * src/derives.c (set_derives): Likewise.
19069 * src/reader.c (packgram, reduce_output): Likewise.
19070 * src/reduce.c (reduce_grammar_tables): Likewise.
19071 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19072
19073 2001-11-30 Akim Demaille <akim@epita.fr>
19074
19075 * src/reduce.c (reduce_output): Formatting changes.
19076 * src/print.c (print_results, print_grammar): Likewise.
19077 * tests/regression.at (Rule Line Numbers)
19078 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19079
19080 2001-11-30 Akim Demaille <akim@epita.fr>
19081
19082 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19083 useless nonterminals, move them at the end of the symbol arrays.
19084 (reduce_output): Adjust.
19085 * tests/reduce.at (Useless Nonterminals): Adjust.
19086
19087 2001-11-30 Akim Demaille <akim@epita.fr>
19088
19089 * src/reduce.c: Various comment/formatting changes.
19090 (nonterminals_reduce): New, extracted from...
19091 (reduce_grammar_tables): here.
19092 (reduce_grammar): Call nonterminals_reduce.
19093
19094 2001-11-29 Paul Eggert <eggert@twinsun.com>
19095
19096 * src/bison.simple (YYSTACK_REALLOC): Remove.
19097 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19098 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19099 New macros.
19100 (union yyalloc): New type.
19101 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19102 an arbitrary restriction on hosts where size_t is wider than int.
19103
19104 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19105 a parser stack overflow. Allocate just one block of memory for all
19106 three stacks, instead of allocating three blocks; this typically is
19107 faster and reduces fragmentation.
19108
19109 Do not limit the number of items in the stack to a value that fits
19110 in 'int', as this is an arbitrary limit on hosts with 64-bit
19111 size_t and 32-bit int.
19112
19113 2001-11-29 Marc Autret <autret_m@epita.fr>
19114
19115 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19116 of defining YYERROR_VERBOSE.
19117 [AT_DATA]: $4 is now out of C declarations in the prologue.
19118
19119 2001-11-28 Marc Autret <autret_m@epita.fr>
19120
19121 * src/reader.c (parse_dquoted_param): New.
19122 (parse_skel_decl): Use it.
19123 * src/lex.h: Add its prototype.
19124 * src/lex.c (literalchar): Become not static.
19125
19126 2001-11-28 Marc Autret <autret_m@epita.fr>
19127
19128 * src/output.h: And put its extern declaration here.
19129 * src/output.c (error_verbose): Define here.
19130 (prepare): Echo name modification.
19131 * src/getargs.h: Clean its extern declaration.
19132 * src/getargs.c (error_verbose_flag): Remove.
19133 (getargs): Remove case 'e'.
19134 * src/options.c (option_table): 'error-verbose' is now seen as simple
19135 percent option.
19136 Include output.h.
19137
19138 * src/reader.c (read_declarations): Remove case tok_include.
19139 (parse_include_decl): Remove.
19140 * src/lex.h (token_t): Remove tok_include.
19141 * src/options.c (option_table): 'include' is now a simple command line
19142 option.
19143
19144 2001-11-28 Marc Autret <autret_m@epita.fr>
19145
19146 * src/bison.simple: Adjust muscle names.
19147 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19148 * src/output.c (prepare): s/_/-/ for the muscles names.
19149 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19150
19151 2001-11-28 Marc Autret <autret_m@epita.fr>
19152
19153 * src/bison.simple: Fix debug.
19154 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19155
19156 2001-11-28 Akim Demaille <akim@epita.fr>
19157
19158 * src/LR0.c (shifts_new): New.
19159 (save_shifts, insert_start_shift, augment_automaton): Use it.
19160
19161 2001-11-28 Akim Demaille <akim@epita.fr>
19162
19163 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19164 keep ruleno only.
19165
19166 2001-11-28 Akim Demaille <akim@epita.fr>
19167
19168 * src/closure.c (closure): Instead of looping over word in array
19169 then bits in words, loop over bits in array.
19170
19171 2001-11-28 Akim Demaille <akim@epita.fr>
19172
19173 * src/closure.c (closure): No longer optimize the special case
19174 where all the bits of `ruleset[r]' are set to 0, to make the code
19175 clearer.
19176
19177 2001-11-28 Akim Demaille <akim@epita.fr>
19178
19179 * src/closure.c (closure): `r' and `c' are new variables, used to
19180 de-obfuscate accesses to RULESET and CORE.
19181
19182 2001-11-28 Akim Demaille <akim@epita.fr>
19183
19184 * src/reduce.c (reduce_print): Use ngettext.
19185 (dump_grammar): Improve the trace accuracy.
19186
19187 2001-11-28 Akim Demaille <akim@epita.fr>
19188
19189 * src/reduce.c (dump_grammar): Don't translate trace messages.
19190
19191 2001-11-28 Akim Demaille <akim@epita.fr>
19192
19193 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19194 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19195 as all tags are free'ed afterwards.
19196 From Enrico Scholz.
19197
19198 2001-11-27 Paul Eggert <eggert@twinsun.com>
19199
19200 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19201 use alloca when we didn't want to, and vice versa.
19202
19203 2001-11-27 Marc Autret <autret_m@epita.fr>
19204
19205 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19206 initialization.
19207 * src/output.c (prepare): Remove its update.
19208
19209 2001-11-27 Marc Autret <autret_m@epita.fr>
19210
19211 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19212 Use %error-verbose.
19213
19214 2001-11-27 Marc Autret <autret_m@epita.fr>
19215
19216 * src/bison.simple: Remove YYERROR_VERBOSE using.
19217 Use %%error_verbose.
19218 (yyparse): Likewise.
19219 * src/output.c (prepare): Give its final value.
19220 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19221 * src/getargs.h: Add its extern declaration.
19222 * src/getargs.c (error_verbose_flag): New int.
19223 (getargs): Update to catch new case.
19224 * src/options.c (option_table): 'error-verbose' is a new option.
19225 (shortopts): Update.
19226
19227 2001-11-27 Akim Demaille <akim@epita.fr>
19228
19229 * src/system.h: Use intl/libgettext.h.
19230 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19231
19232 2001-11-27 Akim Demaille <akim@epita.fr>
19233
19234 * tests/torture.at (Exploding the Stack Size with Malloc):
19235 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19236
19237 2001-11-27 Akim Demaille <akim@epita.fr>
19238
19239 * src/files.c: Include error.h.
19240 Reported by Hans Aberg.
19241
19242 2001-11-26 Marc Autret <autret_m@epita.fr>
19243
19244 * src/reader.c (parse_include_decl): New, not yet implemented.
19245 (read_declarations): Add case tok_include.
19246 * src/getargs.h (include): Add its extern definition.
19247 * src/getargs.c (include): New const char *.
19248 (getargs): Add case '-I'.
19249 * src/options.c (option_table): Add include as command line and
19250 percent option.
19251 * src/lex.h (token_t): Add tok_include.
19252
19253 2001-11-26 Akim Demaille <akim@epita.fr>
19254
19255 * src/reader.c (readgram): Make sure rules for mid-rule actions
19256 have a lineno equal to that of their host rule.
19257 Reported by Hans Aberg.
19258 * tests/regression.at (Rule Line Numbers): New.
19259
19260 2001-11-26 Akim Demaille <akim@epita.fr>
19261
19262 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19263 size_ts.
19264
19265 2001-11-26 Akim Demaille <akim@epita.fr>
19266
19267 * src/complain.c, src/complain.h (error): Remove, provided by
19268 lib/error.[ch].
19269
19270 2001-11-26 Akim Demaille <akim@epita.fr>
19271
19272 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19273 issue an error message.
19274 * tests/regression.at (Invalid %directive): New.
19275 Reported by Hans Aberg.
19276
19277 2001-11-26 Akim Demaille <akim@epita.fr>
19278
19279 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19280 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19281
19282 2001-11-26 Akim Demaille <akim@epita.fr>
19283
19284 * src/conflicts.c (conflicts_print): Don't complain at all when
19285 there are no reduce/reduce conflicts, and as many shift/reduce
19286 conflicts as expected.
19287 * tests/regression.at (%expect right): Adjust.
19288
19289 2001-11-23 Akim Demaille <akim@epita.fr>
19290
19291 * lib/alloca.c: Update, from fileutils.
19292
19293 2001-11-23 Akim Demaille <akim@epita.fr>
19294
19295 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19296
19297 2001-11-23 Akim Demaille <akim@epita.fr>
19298
19299 * src/system.h: Include alloca.h.
19300 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19301
19302 2001-11-23 Akim Demaille <akim@epita.fr>
19303
19304 * src/print_graph.c (print_actions): Remove `rule', unused.
19305 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19306 pacify GCC's signed < unsigned warnings.
19307 * src/closure.c (itemsetsize): Likewise.
19308 * src/reader.c (symbol_list_new): Static.
19309
19310 2001-11-23 Akim Demaille <akim@epita.fr>
19311
19312 Attaching lineno to buckets is stupid, since only one copy of each
19313 symbol is kept, only the line of the first occurrence is kept too.
19314
19315 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19316 * src/reader.c (rline_allocated): Remove, unused.
19317 (symbol_list): Have a `line' member.
19318 (symbol_list_new): New.
19319 (readgram): Use it.
19320 * src/print.c (print_grammar): Output the rule line numbers.
19321 * tests/regression.at (Solved SR Conflicts)
19322 (Unresolved SR Conflicts): Adjust.
19323 Reported by Hans Aberg.
19324
19325 2001-11-22 Marc Autret <autret_m@epita.fr>
19326
19327 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19328
19329 2001-11-22 Marc Autret <autret_m@epita.fr>
19330
19331 * src/muscle_tab.c (muscle_init): Remove initialization of
19332 skeleton muscle.
19333 * src/output.c (output_master_parser): Do it here.
19334
19335 2001-11-20 Akim Demaille <akim@epita.fr>
19336
19337 * po/sv.po: New.
19338 * configure.in (ALL_LINGUAS): Adjust.
19339 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19340 longer contains strings to translate.
19341
19342 2001-11-19 Akim Demaille <akim@epita.fr>
19343
19344 * src/conflicts.c (conflicts_print): Add a missing \n.
19345
19346 2001-11-19 Akim Demaille <akim@epita.fr>
19347
19348 * src/nullable.c (nullable_print): New.
19349 (set_nullable): Call it when tracing.
19350 Better locality of variables.
19351
19352 2001-11-19 Akim Demaille <akim@epita.fr>
19353
19354 * src/print.c (print_actions): Better locality of variables.
19355
19356 2001-11-19 Akim Demaille <akim@epita.fr>
19357
19358 * src/derives.c (print_derives): Fix and enrich.
19359 * src/closure.c (print_fderives): Likewise.
19360
19361 2001-11-19 Akim Demaille <akim@epita.fr>
19362
19363 * src/closure.c (itemsetend): Remove, replaced with...
19364 (itemsetsize): new.
19365
19366 2001-11-19 Akim Demaille <akim@epita.fr>
19367
19368 * src/LR0.c (kernel_end): Remove, replaced with...
19369 (kernel_size): new.
19370
19371 2001-11-19 Akim Demaille <akim@epita.fr>
19372
19373 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19374 to clarify.
19375
19376 2001-11-19 Akim Demaille <akim@epita.fr>
19377
19378 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19379
19380 2001-11-19 Akim Demaille <akim@epita.fr>
19381
19382 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19383 trace messages.
19384 * src/LR0.c: Likewise.
19385 (allocate_itemsets): Use arrays instead of pointers to clarify.
19386
19387 2001-11-19 Akim Demaille <akim@epita.fr>
19388
19389 * src/getargs.c (statistics_flag): Replace with...
19390 (trace_flag): New.
19391 (longopts): Accept --trace instead of --statistics.
19392 * src/getargs.h, src/options.c: Adjust.
19393 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19394 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19395
19396 2001-11-19 Akim Demaille <akim@epita.fr>
19397
19398 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19399 pointers to clarify the code.
19400 (save_reductions, save_shifts): Factor common parts of alternatives.
19401
19402 2001-11-19 Akim Demaille <akim@epita.fr>
19403
19404 * src/LR0.c (new_state, get_state): Complete TRACE code.
19405 * src/closure.c: Include `reader.h' to get `tags', needed by the
19406 trace code.
19407 Rename the conditional DEBUG as TRACE.
19408 Output consistently TRACEs to stderr, not stdout.
19409 * src/derives.c: Likewise.
19410 * src/reduce.c: (inaccessable_symbols): Using if is better style
19411 than goto.
19412 Use `#if TRACE' instead of `#if 0' for tracing code.
19413
19414 2001-11-19 Akim Demaille <akim@epita.fr>
19415
19416 * src/system.h (LIST_FREE, shortcpy): New.
19417 * src/LR0.c: Use them.
19418 * src/output.c (free_itemsets, free_reductions, free_shifts):
19419 Remove, replaced by LIST_FREE.
19420
19421 2001-11-19 Akim Demaille <akim@epita.fr>
19422
19423 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19424 (REDUCTIONS_ALLOC): New.
19425 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19426 allocation.
19427
19428 2001-11-19 Akim Demaille <akim@epita.fr>
19429
19430 * src/LR0.c (new_state): Complete trace code.
19431 * src/nullable.c (set_nullable): Don't translate traces.
19432
19433 2001-11-19 Akim Demaille <akim@epita.fr>
19434
19435 * src/print_graph.c (print_core): Better locality of variables.
19436 * src/print.c (print_core): Likewise.
19437
19438 2001-11-19 Akim Demaille <akim@epita.fr>
19439
19440 * src/vcg.c: You do the output, so you are responsible of the
19441 handling of VCG syntax, in particular: use quotearg.
19442 * src/print_graph.c: Don't.
19443 (print_actions): Don't output the actions as part of the nodes,
19444 since that's the job of the edges.
19445 (print_state): Don't output by hand: fill the node description,
19446 and ask for its output.
19447
19448 2001-11-19 Akim Demaille <akim@epita.fr>
19449
19450 * src/bison.simple (yyparse): When verbosely reporting an error,
19451 no longer put additional quotes around token names.
19452 * tests/calc.at: Adjust.
19453
19454 2001-11-19 Akim Demaille <akim@epita.fr>
19455
19456 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19457 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19458 * src/output.c: Adjust.
19459
19460 2001-11-19 Akim Demaille <akim@epita.fr>
19461
19462 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19463 (rule_t): this.
19464 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19465
19466 2001-11-19 Akim Demaille <akim@epita.fr>
19467
19468 * src/gram.h (rule_t): New.
19469 (rule_table): New.
19470 (rrhs, rlhs): Remove, part of state_t.
19471 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19472 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19473 * src/reader.c, src/reduce.c: Adjust.
19474
19475 2001-11-19 Akim Demaille <akim@epita.fr>
19476
19477 * src/reader.c (symbols_output): New, extracted from...
19478 (packsymbols): Here.
19479 (reader): Call it.
19480
19481 2001-11-19 Akim Demaille <akim@epita.fr>
19482
19483 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19484 (maxrhs): this new function.
19485
19486 2001-11-19 Akim Demaille <akim@epita.fr>
19487
19488 * src/lalr.c (F): New macro to access the variable F.
19489 Adjust.
19490
19491 2001-11-19 Akim Demaille <akim@epita.fr>
19492
19493 * src/lalr.h (LA): New macro to access the variable LA.
19494 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19495 * src/lalr.c: Adjust.
19496
19497 2001-11-19 Akim Demaille <akim@epita.fr>
19498
19499 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19500 (set_state_table): handle the `lookaheads' members.
19501
19502 2001-11-19 Akim Demaille <akim@epita.fr>
19503
19504 * src/lalr.h (lookaheads): Removed array, whose contents is now
19505 a member of...
19506 (state_t): this structure.
19507 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19508 Adjust.
19509
19510 2001-11-19 Akim Demaille <akim@epita.fr>
19511
19512 * src/lalr.h (consistent): Removed array, whose contents is now
19513 a member of...
19514 (state_t): this structure.
19515 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19516 Adjust.
19517
19518 2001-11-19 Akim Demaille <akim@epita.fr>
19519
19520 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19521 contents are now members of...
19522 (state_t): this structure.
19523 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19524 Adjust.
19525
19526 2001-11-19 Akim Demaille <akim@epita.fr>
19527
19528 * src/lalr.h (state_t): New.
19529 (state_table): Be a state_t * instead of a core **.
19530 (accessing_symbol): Remove, part of state_t.
19531 * src/lalr.c: Adjust.
19532 (set_accessing_symbol): Merge into...
19533 (set_state_table): this.
19534 * src/print_graph.c, src/conflicts.c: Adjust.
19535
19536 2001-11-14 Akim Demaille <akim@epita.fr>
19537
19538 * tests/calc.at, tests/output.at, tests/regression.at,
19539 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19540 now the tests are run in private dirs, therefore AC_CLEANUP and
19541 family can be simplified to 0-ary.
19542 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19543 use abs. path to find config.h.
19544 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19545 stderr, there can be way too much random noise.
19546 Instead pass -Werror to GCC and rely on the exit status.
19547 Reported by Wolfram Wagner.
19548
19549 2001-11-14 Akim Demaille <akim@epita.fr>
19550
19551 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19552 defined only if yyoverflow is defined, to avoid `warning: unused
19553 variable `yyvs1''.
19554 Reported by The Test Suite.
19555
19556 2001-11-14 Akim Demaille <akim@epita.fr>
19557
19558 * src/print.c: Include reduce.h.
19559 Reported by Hans Aberg.
19560
19561 2001-11-14 Akim Demaille <akim@epita.fr>
19562
19563 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19564 Revert a previous patch: these are really const.
19565 * src/conflicts.c (conflict_report): Additional useless pair of
19566 braces to pacify GCC's warnings for `if () if () {} else {}'.
19567 * src/lex.c (parse_percent_token): Replace equal_offset with
19568 arg_offset.
19569 arg is const.
19570 Be sure to strdup `arg' when used, since there is no reason for
19571 token_buffer not to change.
19572
19573 2001-11-14 Akim Demaille <akim@epita.fr>
19574
19575 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19576 definition.
19577 * src/main.c (main): Use them.
19578 Suggested by Hans Aberg.
19579
19580 2001-11-12 Akim Demaille <akim@epita.fr>
19581
19582 * src/system.h (ngettext): Now that we use ngettext, be sure to
19583 provide a default definition when NLS are not used.
19584
19585 2001-11-12 Akim Demaille <akim@epita.fr>
19586
19587 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19588 Use @kbd to denote user input.
19589 (Language and Grammar): ANSIfy the example.
19590 Adjust its layout for info/notinfo.
19591 (Location Tracking Calc): Output error messages to stderr.
19592 Output locations in a more GNUtically correct way.
19593 Fix a couple of Englishos.
19594 Adjust @group/@end group pairs.
19595
19596 2001-11-12 Akim Demaille <akim@epita.fr>
19597
19598 %expect was not functioning at all.
19599
19600 * src/conflicts.c (expected_conflicts): Set to -1.
19601 (conflict_report): Use ngettext.
19602 (conflicts_print): Check %expect and make its violation an error.
19603 * doc/bison.texinfo (Expect Decl): Adjust.
19604 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19605 * tests/regression.at (%expect not enough, %expect right)
19606 (%expect too much): New.
19607
19608 2001-11-12 Akim Demaille <akim@epita.fr>
19609
19610 * tests/regression.at (Conflicts): Rename as...
19611 (Unresolved SR Conflicts): this.
19612 (Solved SR Conflicts): New.
19613
19614 2001-11-12 Akim Demaille <akim@epita.fr>
19615
19616 * src/reduce.c (print_results): Rename as...
19617 (reduce_output): This.
19618 Output to OUT, passed as argument, instead of output_obstack.
19619 (dump_grammar): Likewise.
19620 (reduce_free): New.
19621 Also free V1.
19622 (reduce_grammar): No longer call reduce_output, since...
19623 * src/print.c (print_results): do it.
19624 * src/main.c (main): Call reduce_free;
19625
19626 2001-11-12 Akim Demaille <akim@epita.fr>
19627
19628 * src/conflicts.c (print_reductions): Accept OUT as argument.
19629 Output to it, not to output_obstack.
19630 * src/print.c (print_actions): Adjust.
19631
19632 2001-11-12 Akim Demaille <akim@epita.fr>
19633
19634 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19635 the result instead of using...
19636 (src_total, rrc_total, src_count, rrc_count): Remove.
19637 (any_conflicts): Remove.
19638 (print_conflicts): Split into...
19639 (conflicts_print, conflicts_output): New.
19640 * src/conflicts.h: Adjust.
19641 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19642 * src/print.c (print_grammar): Issue `\n' between two rules.
19643 * tests/regression.at (Conflicts): New.
19644 Reported by Tom Lane.
19645
19646 2001-11-12 Akim Demaille <akim@epita.fr>
19647
19648 * tests/regression.at (Invalid input): Remove, duplicate with
19649 ``Invalid input: 1''.
19650
19651 2001-11-12 Akim Demaille <akim@epita.fr>
19652
19653 * tests/torture.at (AT_DATA_STACK_TORTURE)
19654 (Exploding the Stack Size with Alloca)
19655 (Exploding the Stack Size with Malloc): New.
19656
19657 2001-11-12 Akim Demaille <akim@epita.fr>
19658
19659 * src/bison.simple (YYSTACK_REALLOC): New.
19660 (yyparse) [!yyoverflow]: Use it and free the old stack.
19661 Reported by Per Allansson.
19662
19663 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19664
19665 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19666 define CPP macro, which substitute YYSTYPE by yystype.
19667 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19668 with yyltype/YYLTYPE. This allows inclusion of the generated
19669 header within the parser if the compiler, such as GGC, accepts
19670 multiple equivalent #defines.
19671 From Akim.
19672
19673 2001-11-05 Akim Demaille <akim@epita.fr>
19674
19675 * src/reader.c (symbols_output): New, extracted from...
19676 (packsymbols): here.
19677 (reader): Adjust.
19678
19679 2001-11-05 Akim Demaille <akim@epita.fr>
19680
19681 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19682
19683 2001-11-05 Akim Demaille <akim@epita.fr>
19684
19685 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19686 pattern.
19687
19688 2001-11-05 Akim Demaille <akim@epita.fr>
19689
19690 * src/options.h (struct option_table_struct): set_flags is void*.
19691 * src/options.c (longopts): Support `--output' and `%output'.
19692 (usage): Adjust.
19693 * src/lex.h (tok_setopt): Remove, replaced with...
19694 (tok_intopt, tok_stropt): these new guys.
19695 * src/lex.c (getopt.h): Not needed.
19696 (token_buffer, unlexed_token_buffer): Not const.
19697 (percent_table): Promote `-' over `_' in directive names.
19698 Active `%name-prefix', `file-prefix', and `output'.
19699 (parse_percent_token): Accept possible arguments to directives.
19700 Promote `-' over `_' in directive names.
19701
19702 2001-11-04 Akim Demaille <akim@epita.fr>
19703
19704 * doc/bison.texinfo (Decl Summary): Split the list into
19705 `directives for grammars' and `directives for bison'.
19706 Sort'em.
19707 Add description of `%name-prefix', `file-prefix', and `output'.
19708 Promote `-' over `_' in directive names.
19709 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19710 Simplify the description of `--name-prefix'.
19711 Promote `-' over `_' in directive names.
19712 Promote `--output' over `--output-file'.
19713 Fix the description of `--defines'.
19714 * tests/output.at: Exercise %file-prefix and %output.
19715
19716 2001-11-02 Akim Demaille <akim@epita.fr>
19717
19718 * doc/refcard.tex: Update.
19719
19720 2001-11-02 Akim Demaille <akim@epita.fr>
19721
19722 * src/symtab.h (SUNDEF): New.
19723 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19724 stand for `uninitialized', instead of 0.
19725 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19726 * src/lex.c (lex): Adjust.
19727
19728 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19729 Number it 0.
19730 Let yylex return it instead of a plain 0.
19731 Reported by Dick Streefland.
19732
19733 2001-11-02 Akim Demaille <akim@epita.fr>
19734
19735 * tests/regression.at (Mixing %token styles): New test.
19736
19737 2001-11-02 Akim Demaille <akim@epita.fr>
19738
19739 * src/reader.c (parse_thong_decl): Formatting changes.
19740 (token_translations_init): New, extracted from...
19741 (packsymbols): Here.
19742 Adjust.
19743
19744 2001-11-01 Akim Demaille <akim@epita.fr>
19745
19746 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19747 Check that `9foo.y' produces correct cpp guards.
19748 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19749 guards.
19750 Reported by Wwp.
19751
19752 2001-11-01 Akim Demaille <akim@epita.fr>
19753
19754 * tests/regression.at (Invalid input: 2): New.
19755 * src/lex.c (unlexed_token_buffer): New.
19756 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19757 too.
19758 Reported by Wwp.
19759
19760 2001-11-01 Akim Demaille <akim@epita.fr>
19761
19762 * tests/calc.at: Catch up with 1.30.
19763 * configure.in: Bump to 1.49a.
19764 Adjust to newer Autotest.
19765
19766 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
19767
19768 * src/conflicts.c: Move global variables rrc_total and src_total ...
19769 (print_conflicts): here.
19770 * src/output.c (output): Free global variable user_toknums.
19771 * src/lex.c (token_obstack): Become static.
19772
19773 2001-10-18 Akim Demaille <akim@epita.fr>
19774
19775 * tests/atlocal.in (GCC): Add.
19776 * tests/calc.at: s/m4_match/m4_bmatch/.
19777 s/m4_patsubst/m4_bpatsubst/.
19778 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19779 * configure.in: AC_SUBST(GCC).
19780
19781 2001-10-14 Marc Autret <autret_m@epita.fr>
19782
19783 * src/options.c (create_long_option_table): Fix.
19784
19785 2001-10-10 Akim Demaille <akim@epita.fr>
19786
19787 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19788
19789 2001-10-04 Akim Demaille <akim@epita.fr>
19790
19791 * src/reader.c (parse_union_decl): Push the caracters in
19792 union_obstack, not attrs_obstack.
19793
19794 2001-10-04 Akim Demaille <akim@epita.fr>
19795
19796 Merge in the branch 1.29.
19797
19798 * src/reader.c (packsymbols): Use a temporary obstack for
19799 `%%tokendef', since output_stack is already used elsewhere.
19800
19801 2001-10-02 Akim Demaille <akim@epita.fr>
19802
19803 Bump 1.29d.
19804
19805 2001-10-02 Akim Demaille <akim@epita.fr>
19806
19807 Version 1.29c.
19808
19809 2001-10-02 Akim Demaille <akim@epita.fr>
19810
19811 * tests/regression.at (Invalid CPP headers): New.
19812 From Alexander Belopolsky.
19813 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19814
19815 2001-10-02 Akim Demaille <akim@epita.fr>
19816
19817 * tests/regression.at (Invalid input): New.
19818 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19819 Reported by Shura.
19820
19821 2001-10-02 Akim Demaille <akim@epita.fr>
19822
19823 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19824
19825 2001-10-02 Akim Demaille <akim@epita.fr>
19826
19827 * src/output.c (output_parser): Assert `skeleton'.
19828 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19829 systems.
19830 From Shura.
19831
19832 2001-10-01 Marc Autret <autret_m@epita.fr>
19833
19834 * src/lex.h: Echo modifications.
19835 * src/lex.c (unlex): Parameter is now token_t.
19836 From Hans Aberg.
19837
19838 2001-10-01 Marc Autret <autret_m@epita.fr>
19839
19840 * src/main.c: Include lex.h.
19841 From Hans Aberg.
19842
19843 2001-09-29 Akim Demaille <akim@epita.fr>
19844
19845 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19846
19847 2001-09-28 Akim Demaille <akim@epita.fr>
19848
19849 * tests/testsuite.at: Update to newer Autotest.
19850 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19851
19852 2001-09-27 Akim Demaille <akim@epita.fr>
19853
19854 Position independent wrapper.
19855
19856 * tests/bison: Remove.
19857 * tests/bison.in: New.
19858 * configure.in: Adjust.
19859
19860 2001-09-27 Paul Eggert <eggert@twinsun.com>
19861
19862 Port quotearg fixes from tar 1.13.24.
19863
19864 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19865 tm to be declared.
19866 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19867 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19868
19869 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19870 * m4/mbrtowc.m4: New file.
19871 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19872 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19873
19874 2001-09-27 Akim Demaille <akim@epita.fr>
19875
19876 Bump to 1.29c.
19877
19878 2001-09-27 Akim Demaille <akim@epita.fr>
19879
19880 Version 1.29b.
19881
19882 2001-09-25 Akim Demaille <akim@epita.fr>
19883
19884 * src/system.h: Include `xalloc.h'.
19885 Remove it from the C files.
19886 * src/files.c (output_files): Free the obstacks.
19887 * src/lex.c (init_lex): Rename as...
19888 (lex_init): this.
19889 (lex_free): New.
19890 * src/main.c (main): Use it.
19891
19892 2001-09-24 Marc Autret <autret_m@epita.fr>
19893
19894 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19895 to output informations in fout (FILE*).
19896 (open_graph, close_graph): Likewise.
19897 (output_graph, output_edge, output_node): Likewise.
19898 * src/vcg.h: Update function prototypes.
19899 * src/print_graph.c (print_graph): Open output graph file.
19900 (print_actions): Adjust.
19901 * src/files.h: Remove extern declaration.
19902 * src/files.c: Remove graph_obstack declaration.
19903 (open_files): Remove graph_obstack initialization.
19904 (output_files): Remove graph_obstack saving.
19905
19906 2001-09-24 Marc Autret <autret_m@epita.fr>
19907
19908 * src/files.c (compute_output_file_names): Fix.
19909
19910 2001-09-24 Marc Autret <autret_m@epita.fr>,
19911 Akim Demaille <akim@epita.fr>
19912
19913 * src/reader.c (reader): Remove call to free_symtab ().
19914 * src/main.c (main): Call it here.
19915 Include symtab.h.
19916 * src/conflicts.c (initialize_conflicts): Rename as...
19917 (solve_conflicts): this.
19918 * src/print.c (print_core, print_actions, print_state)
19919 (print_grammar): Dump to a file instead a `output_obstack'.
19920 (print_results): Dump `output_obstack', and then proceed with the
19921 FILE *.
19922 * src/files.c (compute_output_file_names, close_files): New.
19923 (output_files): Adjust.
19924 * src/main.c (main): Adjust.
19925
19926 2001-09-23 Marc Autret <autret_m@epita.fr>
19927
19928 * src/files.c (compute_header_macro): Computes header macro name
19929 from spec_defines_file when given.
19930
19931 2001-09-23 Marc Autret <autret_m@epita.fr>
19932
19933 * src/files.c (output_files): Add default extensions.
19934
19935 2001-09-22 Akim Demaille <akim@epita.fr>
19936
19937 * src/conflicts.c (finalize_conflicts): Rename as...
19938 (free_conflicts): this.
19939
19940 2001-09-22 Akim Demaille <akim@epita.fr>
19941
19942 * src/gram.c (gram_free): Rename back as...
19943 (dummy): this.
19944 (output_token_translations): Free `token_translations'.
19945 * src/symtab.c (free_symtab): Free the tag field.
19946
19947 2001-09-22 Akim Demaille <akim@epita.fr>
19948
19949 Remove `translations' as it is always set to true.
19950
19951 * src/gram.h: Adjust.
19952 * src/reader.c (packsymbols, parse_token_decl): Adjust
19953 * src/print.c (print_grammar): Adjust.
19954 * src/output.c (output_token_translations): Adjust.
19955 * src/lex.c (lex): Adjust.
19956 * src/gram.c: Be sure the set pointers to NULL.
19957 (dummy): Rename as...
19958 (gram_free): this.
19959
19960 2001-09-22 Akim Demaille <akim@epita.fr>
19961
19962 * configure.in: Invoke AM_LIB_DMALLOC.
19963 * src/system.h: Use dmalloc.
19964 * src/LR0.c: Be sure to have pointers initialized to NULL.
19965 (allocate_itemsets): Allocate kernel_items only if needed.
19966
19967 2001-09-22 Akim Demaille <akim@epita.fr>
19968
19969 * configure.in: Bump to 1.29b.
19970 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19971 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19972 need xmalloc.c in calc.y.
19973 From Pascal Bart.
19974
19975 2001-09-21 Akim Demaille <akim@epita.fr>
19976
19977 Version 1.29a.
19978 * Makefile.maint, config/config.guess, config/config.sub,
19979 * config/missing: Update from masters.
19980 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19981 upon package.m4.
19982 * configure.in (ALL_LINGUAS): Add `tr'.
19983
19984 2001-09-21 Akim Demaille <akim@epita.fr>
19985
19986 * tests/Makefile.am (package.m4): Move to...
19987 ($(srcdir)/$(TESTSUITE)): here.
19988
19989 2001-09-20 Akim Demaille <akim@epita.fr>
19990
19991 * src/complain.c: No longer try to be standalone: use system.h.
19992 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19993 * src/complain.h: Likewise.
19994 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19995 Remove the unused variable `n'.
19996 From Albert Chin-A-Young.
19997
19998 2001-09-18 Marc Autret <autret_m@epita.fr>
19999
20000 * doc/bison.1: Update.
20001 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20002 descriptions.
20003 (Option Cross Key): Update.
20004 Add --graph.
20005
20006 2001-09-18 Marc Autret <autret_m@epita.fr>
20007
20008 * tests/regression.at: New test (comment in %union).
20009
20010 2001-09-18 Marc Autret <autret_m@epita.fr>
20011
20012 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20013 do that.
20014 Reported by Keith Browne.
20015
20016 2001-09-18 Marc Autret <autret_m@epita.fr>
20017
20018 * tests/output.at: Add tests for --defines and --graph.
20019
20020 2001-09-18 Marc Autret <autret_m@epita.fr>
20021
20022 * tests/output.at: Removes tests of %{header,src}_extension features.
20023
20024 2001-09-18 Akim Demaille <akim@epita.fr>
20025
20026 * tests/Makefile.am (package.m4): New.
20027 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20028 (_AT_CHECK_CALC_ERROR): Likewise.
20029 Factor the `, ' part of verbose error messages.
20030
20031 2001-09-18 Marc Autret <autret_m@epita.fr>
20032
20033 * src/getargs.c (longopts): Declare --defines and --graph as options
20034 with optional arguments.
20035 * src/files.h: Add extern declarations.
20036 * src/files.c (spec_graph_file, spec_defines_file): New.
20037 (output_files): Update.
20038 Remove CPP-outed code.
20039
20040 2001-09-18 Marc Autret <autret_m@epita.fr>
20041
20042 Turn off %{source,header}_extension feature.
20043
20044 * src/files.c (compute_exts_from_gf): Update.
20045 (compute_exts_from_src): Update.
20046 (output_files): CPP-out useless code.
20047 * src/files.h: Remove {header,source}_extension extern declarations.
20048 * src/reader.c (parse_dquoted_param): CPP-out.
20049 (parse_header_extension_decl): Remove.
20050 (parse_source_extension_decl): Remove.
20051 (read_declarations): Remove cases tok_{hdrext,srcext}.
20052 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20053 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20054
20055 2001-09-10 Akim Demaille <akim@epita.fr>
20056
20057 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20058 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20059 (AT_CHECK_OUTPUT): this.
20060 Merely check ls' exit status, its output is useless.
20061
20062 2001-09-10 Akim Demaille <akim@epita.fr>
20063
20064 * tests/calc.at: Use m4_match.
20065 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20066
20067 2001-09-10 Marc Autret <autret_m@epita.fr>,
20068 Akim Demaille <akim@epita.fr>
20069
20070 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20071 enum color_e.
20072 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20073 to `normal'.
20074 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20075 * src/lex.h: Adjust prototype.
20076 (token_t): Add `tok_undef'.
20077 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20078 (parse_percent_token): Now returns token_t.
20079 Add default statement in switch.
20080 (lex): Separate `c' as an input variable, from the token_t result
20081 part.
20082 (unlexed): Is a token_t.
20083
20084 2001-09-10 Akim Demaille <akim@epita.fr>
20085
20086 * configure.in: Bump to 1.29a.
20087
20088 2001-09-07 Akim Demaille <akim@epita.fr>
20089
20090 Version 1.29.
20091
20092 2001-08-30 Akim Demaille <akim@epita.fr>
20093
20094 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20095 * m4/atconfig.m4: Remove.
20096 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20097 * tests/bison: New.
20098 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20099 m4_if, m4_patsubst, and m4_regexp.
20100 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20101 `input' file instead of echo.
20102
20103 2001-08-29 Akim Demaille <akim@epita.fr>
20104
20105 Bump to 1.28e.
20106
20107 2001-08-29 Akim Demaille <akim@epita.fr>
20108
20109 Version 1.28d.
20110
20111 2001-08-29 Paul Eggert <eggert@twinsun.com>
20112
20113 * src/bison.simple (yyparse): Don't take the address of an
20114 item before the start of an array, as that doesn't conform to
20115 the C Standard.
20116
20117 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20118
20119 * doc/bison.texinfo (Location Tracking Calc): New node.
20120
20121 2001-08-29 Paul Eggert <eggert@twinsun.com>
20122
20123 * src/output.c (output): Do not define const, as this now
20124 causes more problems than it cures.
20125
20126 2001-08-29 Akim Demaille <akim@epita.fr>
20127
20128 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20129 the nodes.
20130 Be sure to tag the `detailmenu'.
20131
20132 2001-08-29 Akim Demaille <akim@epita.fr>
20133
20134 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20135 download in a tmp dir.
20136
20137 2001-08-28 Marc Autret <autret_m@epita.fr>
20138
20139 * config/depcomp: New file.
20140
20141 2001-08-28 Marc Autret <autret_m@epita.fr>
20142
20143 * doc/bison.1 (mandoc): Adjust.
20144 From Juan Manuel Guerrero.
20145
20146 2001-08-28 Marc Autret <autret_m@epita.fr>
20147
20148 * src/print_graph.c (print_state): Fix.
20149
20150 2001-08-27 Marc Autret <autret_m@epita.fr>
20151
20152 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20153 char * members.
20154 Echo modifications to the functions prototypes.
20155 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20156
20157 2001-08-27 Marc Autret <autret_m@epita.fr>
20158
20159 * src/vcg.c: Include `xalloc.h'.
20160 (add_colorentry): New.
20161 (add_classname): New.
20162 (add_infoname): New.
20163 * src/vcg.h: Add new prototypes.
20164
20165 2001-08-27 Akim Demaille <akim@epita.fr>
20166
20167 * Makefile.maint: Sync. again with CVS Autoconf.
20168
20169 2001-08-27 Akim Demaille <akim@epita.fr>
20170
20171 * Makefile.maint: Formatting changes.
20172 (po-update, cvs-update, update): New targets.
20173 (AMTAR): Remove.
20174
20175 2001-08-27 Akim Demaille <akim@epita.fr>
20176
20177 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20178 * Makefile.maint: Sync. with CVS Autoconf.
20179
20180 2001-08-27 Marc Autret <autret_m@epita.fr>
20181
20182 * src/vcg.h (struct infoname_s): New.
20183 (struct colorentry_s): New.
20184 (graph_s): New fields {vertical,horizontal}_order in structure.
20185 Add `infoname' field.
20186 Add `colorentry' field;
20187 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20188 (G_HORIZONTAL_ORDER): New.
20189 (G_INFONAME): New.
20190 (G_COLORENTRY): New.
20191 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20192 Add output of `infoname'.
20193 Add output of `colorentry'.
20194
20195 2001-08-27 Marc Autret <autret_m@epita.fr>
20196
20197 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20198 This one shadowed a global parameter.
20199
20200 2001-08-24 Marc Autret <autret_m@epita.fr>
20201
20202 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20203 instead of `unsigned'.
20204 (print_state): Do not call obstack_object_size () in obstack_grow ()
20205 to avoid macro variables shadowing.
20206
20207 2001-08-23 Marc Autret <autret_m@epita.fr>
20208
20209 * src/lex.c (percent_table): Typo: s/naem/name/.
20210 Add graph option.
20211 Normalize new options declarations.
20212
20213 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20214
20215 * tests/suite.at: Exercise %header_extension and %source_extension.
20216
20217 2001-08-16 Marc Autret <autret_m@epita.fr>
20218
20219 * src/reader.c (parse_dquoted_param): New.
20220 (parse_header_extension_decl): Use it.
20221 (parse_source_extension_decl): Likewise.
20222
20223 2001-08-16 Marc Autret <autret_m@epita.fr>
20224
20225 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20226 (get_xxxx_str): Use assert () instead of complain ().
20227 Remove return invokations in default cases.
20228 (get_decision_str): Modify default behaviour. Remove second argument.
20229 Echo modifications on calls.
20230 (output_graph): Fix.
20231
20232 2001-08-16 Marc Autret <autret_m@epita.fr>
20233
20234 * src/getargs.c (usage): Update with ``-g, --graph''.
20235
20236 2001-08-16 Marc Autret <autret_m@epita.fr>
20237
20238 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20239 (Option Cross Key): Likewise.
20240 * doc/bison.1: Update.
20241
20242 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20243
20244 * src/output.c (output_master_parser): Don't finish action_obstack.
20245 (output_parser): Don't care about the muscle action, here.
20246 (prepare): Copy the action_obstack in the action muscle.
20247 (output): Free action_obstack.
20248
20249 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20250
20251 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20252 will contain `%union' declaration.
20253 (parse_union_decl): Delete #line directive output.
20254 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20255 informations about %union.
20256 (parse_union_decl): Copy the union_obstack in the muscle stype.
20257 * src/bison.simple: Add new #line directive.
20258 Add typdef %%stype YYSTYPE.
20259
20260 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20261
20262 * src/bison.simple: Add new `#line' directive.
20263
20264 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20265
20266 * src/bison.simple: New `#line' directive.
20267 * src/output.c (output_parser): Support new dynamic muscle input_line.
20268
20269 2001-09-22 Marc Autret <autret_m@epita.fr>
20270
20271 * src/output.c (output_master_parser): New.
20272 (output_parser): Be more re-entrant.
20273
20274 2001-09-21 Marc Autret <autret_m@epita.fr>
20275
20276 * src/reader.c (copy_definition, parse_union_decl): Update and use
20277 `linef' muscle.
20278 (copy_action): Likewise.
20279 Use obstack_1grow ().
20280 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20281
20282 2001-09-21 Marc Autret <autret_m@epita.fr>
20283
20284 * src/options.c (option_table): Adjust.
20285 * src/lex.c (parse_percent_token): Fix.
20286
20287 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20288
20289 * src/options.c (symtab.h): Include it, need by lex.h.
20290
20291 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20292
20293 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20294 is now an option_table_struct*.
20295 (option_strcmp): New function option_strcmp.
20296 (parse_percent_token): Call option_strcmp.
20297 * src/getargs.c (xalloc.h, options.h): Include it.
20298 (getargs): Call create_long_option_table.
20299 (getargs): Free longopts at the end of the function.
20300 (shortopts): Move in options.c.
20301 * src/options.c (create_long_option_table): New function. Convert
20302 information from option_table to option structure.
20303 * src/reader.c (options.h): Include it.
20304
20305 * src/Makefile.am: Adjust.
20306 * src/options.c (option_table): Create from longopts and percent_table.
20307 * src/getargs.c (longopts): Delete.
20308 * src/lex.c (struct percent_table_struct): Delete.
20309 (percent_table): Delete.
20310 (options.h): Include it.
20311 * src/options.c: Create.
20312 * src/options.h: Create.
20313 Declare enum opt_access_e.
20314 Define struct option_table_struct.
20315
20316 2001-09-20 Marc Autret <autret_m@epita.fr>
20317
20318 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20319 sections of Bison.
20320
20321 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20322
20323 * src/bison.simple: s/%%filename/%%skeleton.
20324 * src/muscle_tab.c (getargs.h): Include it.
20325 (muscle_init): Insert new muscle skeleton.
20326
20327 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20328
20329 * src/output.c (output_parser): Delete unused variable actions_dumped.
20330
20331 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20332
20333 * src/output.c (output): Delete call to reader_output_yylsp.
20334 * src/reader.c (reader): Likewise.
20335 * src/reader.h: Delete declaration of reader_output_yylsp.
20336
20337 2001-09-02 Marc Autret <autret_m@epita.fr>
20338
20339 * src/reader.c: Include muscle_tab.h.
20340 (parse_union_decl): Update.
20341 (parse_macro_decl): Rename parse_muscle_decl.
20342 Update to use renamed functions and variable.
20343 (read_declarations, copy_action, read_additionnal_code, : Updated
20344 with correct variables and functions names.
20345 (packsymbols, reader): Likewise.
20346
20347 * src/reader.h (muscle_obstack): Extern declaration update.
20348
20349 * src/output.c: Include muscle_tab.h
20350 In all functions using macro_insert, change by using muscle_insert ().
20351 (macro_obstack): Rename muscle_obstack.
20352 Echo modifications in the whole file.
20353 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20354 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20355 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20356
20357 * src/muscle_tab.h: Update double inclusion macros.
20358 (macro_entry_s): Rename muscle_entry_s.
20359 Update prototypes.
20360
20361 * src/muscle_tab.c: Include muscle_tab.h.
20362 Rename macro_tabble to muscle_table.
20363 (mhash1, mhash2, mcmp): Use muscle_entry.
20364 (macro_init): Rename muscle_init. Update.
20365 (macro_insert): Rename muscle_insert. Update.
20366 (macro_find): Rename muscle_find. Update.
20367
20368 * src/main.c: Include muscle_tab.h.
20369 (main): Call muscle_init ().
20370 * src/Makefile.am (bison_SOURCES): Echo modifications.
20371
20372 2001-09-02 Marc Autret <autret_m@epita.fr>
20373
20374 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20375
20376 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20377
20378 2001-09-02 Marc Autret <autret_m@epita.fr>
20379
20380 * src/macrotab.c, src/macrotab.h: Remove.
20381
20382 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20383
20384 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20385 filename.
20386
20387 2001-09-01 Marc Autret <autret_m@epita.fr>
20388
20389 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20390 to an explicit value to activate the feature. We do it here.
20391
20392 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20393
20394 * src/output.c (prepare): Delete the `filename' muscule insertion.
20395 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20396 (parse_union_decl): Likewise.
20397 * src/macrotab.c (macro_init): Initialize filename by infile.
20398
20399 2001-08-31 Marc Autret <autret_m@epita.fr>
20400
20401 * src/bison.simple (YYLSP_NEEDED): New definition.
20402 * src/output.c (prepare): Add macro insertion of `locations_flag'
20403
20404 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20405
20406 * src/output.c (prepare): Delete insertion of previous muscles,
20407 and insert the `prefix' muscles.
20408 * src/macrotab.c (macro_init): Likewise.
20409 (macro_init): Initialization prefix directive by `yy'.
20410 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20411 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20412 yylval, yydebug, yyerror, yynerrs and yyparse.
20413 New directive `#define' to substitute yydebug, ... with option
20414 name_prefix.
20415
20416 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20417
20418 * src/main.c (main): Standardize.
20419 * src/output.c (output_table_data, output_parser): Likewise.
20420 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20421
20422 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20423
20424 * src/reader.c (read_additionnal_code): Rename %%user_code to
20425 %%epilogue.
20426 * src/output.c (output): Rename %%declarations to %%prologue.
20427 * src/bison.simple: Echo modifications.
20428
20429 2001-08-31 Marc Autret <autret_m@epita.fr>
20430
20431 * src/reader.c (readgram): CleanUp.
20432 (output_token_defines): Likewise.
20433 (packsymbols): Likewise.
20434 (reader): Likewise.
20435 * src/output.c (output): CPP-out useless code.
20436
20437 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20438
20439 * src/reader.c (reader): Delete obsolete call to function
20440 output_trailers and output_headers.
20441 * src/output.h: Remove obsolete functions prototypes of output_headers
20442 and output_trailers.
20443
20444 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20445
20446 * src/main.c: Include macrotab.h.
20447 * src/macrotab.h (macro_entry_s): Constify fields.
20448 Adjust functions prototypes.
20449 * src/macrotab.c (macro_insert): Constify key and value.
20450 (macro_find): Constify key.
20451 (macro_insert): Include 'xalloc.h'
20452 (macro_insert): Use XMALLOC.
20453 (macro_find): Constify return value.
20454 * src/output.c (output_table_data): Rename table to table_data.
20455 (output_parser): Constify macro_key, macro_value.
20456
20457 2001-08-30 Marc Autret <autret_m@epita.fr>
20458
20459 * src/reader.c (parse_skel_decl): New.
20460 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20461 * src/lex.h (token_t): New token `tok_skel'.
20462 * src/lex.c (percent_table): Add skeleton option entry.
20463 Standardize.
20464
20465 2001-08-29 Marc Autret <autret_m@epita.fr>
20466
20467 * src/bison.simple: Add %%user_code directive at the end.
20468 * src/reader.c (read_additionnal_code): New.
20469 (reader): Use it.
20470 * src/output.c (output_program): Remove.
20471 (output): Update.
20472
20473 2001-08-28 Marc Autret <autret_m@epita.fr>
20474
20475 * src/output.c (output_actions): Clean up.
20476 (output_gram): CPP-out useless code.
20477 * src/reader.c (reader): Clean up, CPP-out useless code.
20478
20479 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20480
20481 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20482 directive.
20483 * src/bison.simple: Add `%%definitions'.
20484
20485 2001-08-28 Marc Autret <autret_m@epita.fr>
20486
20487 * config/depcomp: New file.
20488
20489 2001-08-27 Paul Eggert <eggert@twinsun.com>
20490
20491 * src/bison.simple (yyparse): Don't take the address of an
20492 item before the start of an array, as that doesn't conform to
20493 the C Standard.
20494
20495 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20496
20497 * src/output.c (output): Remove the initialization of the macro
20498 obstack. It was done too late here.
20499
20500 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20501 completely wrong.
20502 (reader): Initialize the macro obstack here, since we need it to grow
20503 '%define' directives.
20504
20505 * src/reader.h: Declare the macro obstack as extern.
20506
20507 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20508
20509 * src/output.c (output_parser): Fix. Store single '%' characters in
20510 the output obstack instead of throwing them away.
20511
20512 2001-08-27 Akim Demaille <akim@epita.fr>
20513
20514 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20515
20516 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20517
20518 * lib/Makefile.am: Adjust.
20519
20520 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20521
20522 * src/bison.simple: Update and add '%%' directives.
20523
20524 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20525
20526 * src/reader.c (reader): Remove calls to 'output_headers' and
20527 'output_trailers'. Remove some C output.
20528 (readgram): Disable a piece of code that was writing a default
20529 definition for 'YYSTYPE'.
20530 (reader_output_yylsp): Remove.
20531 (packsymbols): Output token defintions to a macro.
20532 (copy_definition): Disable C output.
20533
20534 * src/reader.c (parse_macro_decl): New function used to parse macro
20535 declarations.
20536 (copy_string2): Put the body of copy_string into this new function.
20537 Add a parameter to let the caller choose whether he wants to copy the
20538 string delimiters or not.
20539 (copy_string): Be a simple call to copy_string2 with the last argument
20540 bound to true.
20541 (read_declarations): Add case for macro definition.
20542 (copy_identifier): New.
20543 (parse_macro_decl): Read macro identifiers using copy_identifier
20544 rather than lex.
20545
20546 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20547
20548 * src/output.c (prepare): Add prefixed names.
20549 (output_parser): Output semantic actions.
20550 (output_parser): Fix bug on '%%line' directives.
20551
20552 * src/output.c (output_headers): Remove. The C code printed by this
20553 function should now be in the skeletons.
20554 (output_trailers): Remove.
20555 (output): Disable call to 'reader_output_yylsp'.
20556 (output_rule_data): Do not output tables to the table obstack.
20557
20558 * src/output.c: Remove some C dedicated output.
20559 Improve the use of macro and output obstacks.
20560 (output_defines): Remove.
20561
20562 * src/output.c (output_token_translations): Associate 'translate'
20563 table with a macro. No output to the table obstack.
20564 (output_gram): Same for 'rhs' and 'prhs'.
20565 (output_stos): Same for 'stos'.
20566 (output_rule_data): Same for 'r1' and 'r2'.
20567 (token_actions): Same for 'defact'.
20568 (goto_actions): Same for 'defgoto'.
20569 (output_base): Same for 'pact' and 'pgoto'.
20570 (output_table): Same for 'table'.
20571 (output_check): Same for 'check'.
20572
20573 * src/output.c (output_table_data): New function.
20574 (output_short_table): Remove.
20575 (output_short_or_char_table): Remove.
20576
20577 * src/output.c (output_parser): Replace most of the skeleton copy code
20578 with something new. Skeletons are now processed character by character
20579 rather than line by line, and Bison looks for '%%' macros. This is the
20580 first step in making Bison's output process (a lot) more flexible.
20581 (output_parser): Use the macro table.
20582
20583 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20584
20585 * src/main.c (main): Initialize the macro table.
20586
20587 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20588
20589 * src/lex.c (percent_table): Add tok_define.
20590 * src/lex.h: Add tok_define.
20591
20592 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20593
20594 * src/macrotab.c: New file.
20595 * src/macrotab.h: New file.
20596 * src/Makefile.am: Update.
20597
20598 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20599
20600 * lib/hash.c: New file.
20601 * lib/hash.h: New file.
20602 * lib/Makefile.am: Update.
20603
20604 2001-08-15 Akim Demaille <akim@epita.fr>
20605
20606 Version 1.28c.
20607
20608 2001-08-15 Marc Autret <autret_m@epita.fr>
20609
20610 * src/reader.c (readgram): Indent output macro YYSTYPE.
20611 (packsymbols): Likewise.
20612 (output_token_defines): Likewise.
20613 * src/files.c: Standardize.
20614 (compute_header_macro): New.
20615 (defines_obstack_save): New. Use compute_header_macro.
20616 (output_files): Update. Use defines_obstack_save.
20617
20618 2001-08-15 Akim Demaille <akim@epita.fr>
20619
20620 * doc/bison.texinfo (Table of Symbols): Document
20621 YYSTACK_USE_ALLOCA.
20622
20623 2001-08-15 Akim Demaille <akim@epita.fr>
20624
20625 * missing: Update from CVS Automake.
20626 * config/config.guess, config/config.sub, config/texinfo.tex:
20627 Update from gnu.org.
20628
20629 2001-08-15 Akim Demaille <akim@epita.fr>
20630
20631 * Makefile.maint: Sync with CVS Autoconf.
20632
20633 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20634
20635 * doc/bison.texinfo: Include GNU Free Documentation License from
20636 `fdl.texi'.
20637 * doc/fdl.texi: Add to package.
20638
20639 2001-08-14 Marc Autret <autret_m@epita.fr>
20640
20641 Turn on %{source,header}_extension features.
20642
20643 * src/lex.c (percent_table): Un-CPP out header_extension and
20644 source_extension.
20645 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20646 (compute_exts_from_src): Remove conditions. It restores priorities
20647 between options.
20648
20649 2001-08-14 Marc Autret <autret_m@epita.fr>
20650
20651 * src/files.c (compute_base_names): Add extensions computing when
20652 `--file-prefix' used.
20653 Standardize function calls.
20654
20655 2001-08-13 Marc Autret <autret_m@epita.fr>
20656
20657 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20658 defining it (defined but null disables alloca).
20659
20660 2001-08-13 Marc Autret <autret_m@epita.fr>
20661
20662 * src/bison.simple (_yy_memcpy): CPP reformat.
20663
20664 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20665
20666 * tests/atconfig.in (CPPFLAGS): Fix.
20667
20668 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
20669
20670 * doc/bison.texinfo: Include GNU General Public License from
20671 `gpl.texi'.
20672 * doc/gpl.texi: Add to package.
20673
20674 2001-08-10 Marc Autret <autret_m@epita.fr>
20675
20676 * src/print_graph.h: Fix.
20677 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20678
20679 2001-08-10 Akim Demaille <akim@epita.fr>
20680
20681 * src/system.h: Provide default declarations for stpcpy, strndup,
20682 and strnlen.
20683
20684 2001-08-10 Robert Anisko <anisko_r@epita.fr>
20685
20686 * doc/bison.texinfo (Locations): Update @$ stuff.
20687
20688 2001-08-09 Robert Anisko <anisko_r@epita.fr>
20689
20690 * src/bison.simple (YYLLOC_DEFAULT): Update.
20691 (yyparse): Adjust.
20692
20693 2001-08-08 Marc Autret <autret_m@epita.fr>
20694
20695 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
20696 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20697 Reported by Fabrice Bauzac.
20698
20699 2001-08-08 Marc Autret <autret_m@epita.fr>
20700
20701 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20702 * src/vcg.c (output_node): Fix.
20703 * src/vcg.h: Cleanup.
20704 * src/print_graph.c: Add comments.
20705 (node_output_size): New global variable. Simplify the formatting of
20706 the VCG graph output.
20707 (print_actions): Unused code is now used. It notifies the final state
20708 and no action states in the VCG graph. It also give the reduce actions.
20709 The `shift and goto' edges are red and the `go to state' edges are
20710 blue.
20711 Get the current node name and node_obstack by argument.
20712 (node_obstack): New variable.
20713 (print_state): Manage node_obstack.
20714 (print_core): Use node_obstack given by argument.
20715 A node is not only computed here but in print_actions also.
20716 (print_graph): CPP out useless code instead of commenting it.
20717
20718 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
20719
20720 * tests/atconfig.in (CPPFLAGS): Fix.
20721
20722 2001-08-07 Akim Demaille <akim@epita.fr>
20723
20724 * src/print_graph.c (quote): New.
20725 (print_core): Use it.
20726
20727 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
20728
20729 * src/vcg.c (complain.h): Include it.
20730 Unepitaize `return' invocations.
20731 [NDEBUG] (main): Remove.
20732 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
20733 * src/files.c (open_files): Initialize graph_obstack.
20734 * src/print_graph.c (print_actions): CPP out useless code.
20735 (print_core): Don't output the last `\n' in labels.
20736 Use `quote'.
20737 * src/files.c (output_files): Output the VCG file.
20738 * src/main.c (main): Invoke print_graph ();
20739
20740 2001-08-06 Marc Autret <autret_m@epita.fr>
20741
20742 Automaton VCG graph output.
20743 Using option ``-g'' or long option ``--graph'', you can generate
20744 a gram_filename.vcg file containing a VCG description of the LALR (1)
20745 automaton of your grammar.
20746
20747 * src/main.c: Call to print_graph() function.
20748 * src/getargs.h: Update.
20749 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20750 (graph_flag): New flag.
20751 (longopts): Update.
20752 (getargs): Add case `g'.
20753 * src/files.c (graph_obstack): New obstack struct.
20754 (open_files): Initialize new obstack.
20755 (output_files): Saves graph_obstack if required.
20756 * src/files.h (graph_obstack): New extern declaration.
20757 * src/Makefile.am: Add new source files.
20758
20759 2001-08-06 Marc Autret <autret_m@epita.fr>
20760
20761 * src/print_graph.c, src/print_graph.h (graph): New.
20762 * src/vcg.h: New file.
20763 * src/vcg.c: New file, VCG graph handling.
20764
20765 2001-08-06 Marc Autret <autret_m@epita.fr>
20766
20767 Add of %source_extension and %header_extension which specify
20768 the source or/and the header output file extension.
20769
20770 * src/files.c (compute_base_names): Remove initialisation of
20771 src_extension and header_extension.
20772 (compute_exts_from_gf): Update.
20773 (compute_exts_from_src): Update.
20774 (output_files): Update.
20775 * src/reader.c (parse_header_extension_decl): New.
20776 (parse_source_extension_decl): New.
20777 (read_declarations): New case statements for the new tokens.
20778 * src/lex.c (percent_table): Add entries for %source_extension
20779 and %header_extension.
20780 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20781
20782 2001-08-06 Marc Autret <autret_m@epita.fr>
20783
20784 * configure.in: Bump to 1.28c.
20785 * doc/bison.texinfo: Texinfo thingies.
20786
20787 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
20788
20789 * tests/atconfig.in (CPPFLAGS): Add.
20790 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20791
20792 2001-08-03 Akim Demaille <akim@epita.fr>
20793
20794 Version 1.28b.
20795
20796 2001-08-03 Akim Demaille <akim@epita.fr>
20797
20798 * tests/Makefile.am (check-local): Ship testsuite.
20799 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20800 Include `string.h'.
20801
20802 2001-08-03 Akim Demaille <akim@epita.fr>
20803
20804 * configure.in: Try using -Wformat when compiling.
20805
20806 2001-08-03 Akim Demaille <akim@epita.fr>
20807
20808 * configure.in: Bump to 1.28b.
20809
20810 2001-08-03 Akim Demaille <akim@epita.fr>
20811
20812 * src/complain.c: Adjust strerror_r portability issues.
20813
20814 2001-08-03 Akim Demaille <akim@epita.fr>
20815
20816 Version 1.28a.
20817
20818 2001-08-03 Akim Demaille <akim@epita.fr>
20819
20820 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20821 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20822 * src/getargs.c: Include complain.h.
20823 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20824 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20825
20826 2001-08-03 Akim Demaille <akim@epita.fr>
20827
20828 * src/reader.c (readgram): Display hidden chars in error messages.
20829
20830 2001-08-03 Akim Demaille <akim@epita.fr>
20831
20832 Update to gettext 0.10.39.
20833
20834 2001-08-03 Akim Demaille <akim@epita.fr>
20835
20836 * lib/strspn.c: New.
20837
20838 2001-08-01 Marc Autret <autret_m@epita.fr>
20839
20840 * doc/bison.texinfo: Update.
20841 * doc/bison.1 (mandoc): Update.
20842 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20843 * src/files.c: Support output files extensions computing.
20844 (src_extension): New static variable.
20845 (header_extension): New static variable.
20846 (tr): New function.
20847 (get_extension_index): New function, gets the index of an extension
20848 filename in a string.
20849 (compute_exts_from_gf): New function, computes extensions from the
20850 grammar file extension.
20851 (compute_exts_from_src): New functions, computes extensions from the
20852 C source file extension, file given by ``-o'' option.
20853 (compute_base_names): Update.
20854 (output_files): Update.
20855
20856 2001-08-01 Robert Anisko <anisko_r@epita.fr>
20857
20858 * doc/bison.texi: Document @$.
20859 (Locations): New section.
20860
20861 2001-07-18 Akim Demaille <akim@epita.fr>
20862
20863 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20864 * config/prev-version.txt, config/move-if-change: New.
20865 * Makefile.am: Adjust.
20866
20867 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20868
20869 * src/bison.simple (yyparse): Suppress warning `comparaison
20870 between signed and unsigned'.
20871
20872 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
20873
20874 * src/getargs.h (raw_flag): Remove.
20875 * src/getargs.c: Die on `-r'/`--raw'.
20876 * src/lex.c (parse_percent_token): Die on `%raw'.
20877 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20878 * tests/calc.at: Suppress test with option `--raw'.
20879
20880 2001-07-14 Akim Demaille <akim@epita.fr>
20881
20882 * config/: New.
20883 * configure.in: Require Autoconf 2.50.
20884 Update to gettext 0.10.38.
20885
20886 2001-03-16 Akim Demaille <akim@epita.fr>
20887
20888 * doc/bison.texinfo: ANSIfy the examples.
20889
20890 2001-03-16 Akim Demaille <akim@epita.fr>
20891
20892 * getargs.c (skeleton): New variable.
20893 (longopts): --skeleton is a new option.
20894 (shortopts, getargs): -S is a new option.
20895 * getargs.h: Declare skeleton.
20896 * output.c (output_parser): Use it.
20897
20898 2001-03-16 Akim Demaille <akim@epita.fr>
20899
20900 * m4/strerror_r.m4: New.
20901 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20902 * lib/error.h, lib/error.c: Update.
20903
20904 2001-03-16 Akim Demaille <akim@epita.fr>
20905
20906 * src/getargs.c (longopts): Clean up.
20907
20908 2001-02-21 Akim Demaille <akim@epita.fr>
20909
20910 * src/reader.c (gensym): `gensym_count' is your own.
20911 Use a static buf to create the symbol name, as token_buffer is no
20912 longer a buffer.
20913
20914 2001-02-08 Akim Demaille <akim@epita.fr>
20915
20916 * src/conflicts.c (conflict_report): Be sure not to append to res
20917 between two calls, which could happen if both first sprintf were
20918 skipped, but not the first cp += strlen.
20919
20920 2001-02-08 Akim Demaille <akim@epita.fr>
20921
20922 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20923 New, from fileutils 4.0.37.
20924 * configure.in: Require Autoconf 2.49c. I took some time before
20925 making this decision. This is the only way out for portability
20926 issues in Bison, it would mean way too much duplicate effort to
20927 import in Bison features implemented in 2.49c since 2.13.
20928 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20929
20930 2001-02-02 Akim Demaille <akim@epita.fr>
20931
20932 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
20933 * lib/xalloc.h, lib/xmalloc.c: Update.
20934
20935 2001-01-19 Akim Demaille <akim@epita.fr>
20936
20937 Get rid of the ad hoc handling of token_buffer in the scanner: use
20938 the obstacks.
20939
20940 * src/lex.c (token_obstack): New.
20941 (init_lex): Initialize it. No longer call...
20942 (grow_token_buffer): this. Remove it.
20943 Adjust all the places which used it to use the obstack.
20944
20945 2001-01-19 Akim Demaille <akim@epita.fr>
20946
20947 * src/lex.h: Rename all the tokens:
20948 s/\bENDFILE\b/tok_eof/g;
20949 s/\bIDENTIFIER\b/tok_identifier/g;
20950 etc.
20951 Let them be enums, not #define, to ease debugging.
20952 Adjust all the code.
20953
20954 2001-01-18 Akim Demaille <akim@epita.fr>
20955
20956 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20957 * src/lex.c (maxtoken, grow_token_buffer): Static.
20958
20959 2001-01-18 Akim Demaille <akim@epita.fr>
20960
20961 Since we now use obstacks, more % directives can be enabled.
20962
20963 * src/lex.c (percent_table): Also accept `%yacc',
20964 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20965 `%debug'.
20966 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20967 instead of returning a token.
20968 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20969 * src/reader.c (read_declarations): Adjust.
20970 * src/files.c (open_files): Don't call `compute_base_names', don't
20971 compute `attrsfile' since they depend upon data which might be
20972 *in* the input file now.
20973 (output_files): Do it here.
20974 * src/output.c (output_headers): Document the fact that this patch
20975 introduces a guaranteed SEGV for semantic parsers.
20976 * doc/bison.texinfo: Document them.
20977 * tests/suite.at: Exercise these %options.
20978
20979 2000-12-20 Akim Demaille <akim@epita.fr>
20980
20981 Also handle the output file (--verbose) with obstacks.
20982
20983 * files.c (foutput): Remove.
20984 (output_obstack): New.
20985 Adjust all dependencies.
20986 * src/conflicts.c: Return a string.
20987 * src/system.h (obstack_grow_string): Rename as...
20988 (obstack_sgrow): this. Be ready to work with non literals.
20989 (obstack_fgrow4): New.
20990
20991 2000-12-20 Akim Demaille <akim@epita.fr>
20992
20993 * src/files.c (open_files): Fix the computation of short_base_name
20994 in the case of `-o foo.tab.c'.
20995
20996 2000-12-20 Akim Demaille <akim@epita.fr>
20997
20998 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20999 (copy_dollar): Now that everything uses obstacks, get rid of the
21000 FILE * parameters.
21001
21002 2000-12-20 Akim Demaille <akim@epita.fr>
21003
21004 * src/files.c (open_files): Actually the `.output' file is based
21005 on the short_base_name, not base_name.
21006 * tests/suite.at (Checking output file names): Adjust.
21007
21008 2000-12-20 Akim Demaille <akim@epita.fr>
21009
21010 * src/bison.s1: Remove, we now use directly...
21011 * src/bison.simple: this.
21012 * src/Makefile.am: Use pkgdata instead of data.
21013
21014 2000-12-20 Akim Demaille <akim@epita.fr>
21015
21016 * src/files.c (guard_obstack): New.
21017 (open_files): Initialize it.
21018 (output_files): Dump it...
21019 * src/files.h: Export it.
21020 * src/reader.c (copy_guard): Use it.
21021
21022 2000-12-19 Akim Demaille <akim@epita.fr>
21023
21024 * src/files.c (outfile, defsfile, actfile): Removed as global
21025 vars.
21026 (open_files): Don't compute them.
21027 (output_files): Adjust.
21028 (base_name, short_base_name): Be global.
21029 Adjust dependencies.
21030
21031 2000-12-19 Akim Demaille <akim@epita.fr>
21032
21033 * src/files.c (strsuffix): New.
21034 (stringappend): Be just like strcat but allocate.
21035 (base_names): Eve out from open_files.
21036 Try to simplify the rather hairy computation of base_name and
21037 short_base_name.
21038 (open_files): Use it.
21039 * tests/suite.at (Checking output file names): New test.
21040
21041 2000-12-19 Akim Demaille <akim@epita.fr>
21042
21043 * src/system.h (obstack_grow_literal_string): Rename as...
21044 (obstack_grow_string): this.
21045 * src/output.c (output_parser): Recognize `%% actions' instead of
21046 `$'.
21047 * src/bison.s1: s/$/%% actions/.
21048 * src/bison.hairy: Likewise.
21049
21050 2000-12-19 Akim Demaille <akim@epita.fr>
21051
21052 * src/output.c (output_parser): Compute the `#line' lines when
21053 there are.
21054 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21055 Suggested by Hans Aberg.
21056
21057 2000-12-19 Akim Demaille <akim@epita.fr>
21058
21059 Let the handling of the skeleton files be local to the procedures
21060 that use it.
21061
21062 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21063 longer static.
21064 (fparser, open_extra_files): Remove.
21065 (open_files, output_files): Don't take care of fparser.
21066 * src/files.h: Adjust.
21067 * src/output.c (output_parser): Open and close the file to the
21068 skeleton.
21069 * src/reader.c (read_declarations): When %semantic_parser, open
21070 fguard.
21071
21072 2000-12-19 Akim Demaille <akim@epita.fr>
21073
21074 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21075 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21076
21077 2000-12-19 Akim Demaille <akim@epita.fr>
21078
21079 * src/files.c (open_files): Yipee! We no longer need all the code
21080 looking for `/tmp' since we have no tmp file.
21081
21082 2000-12-19 Akim Demaille <akim@epita.fr>
21083
21084 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21085 New macros.
21086 * src/files.c (open_files): Less dependency on MSDOS etc.
21087
21088 2000-12-14 Akim Demaille <akim@epita.fr>
21089
21090 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21091 Provide a default definition.
21092 Use it when executing the default @ action.
21093 * src/reader.c (reader_output_yylsp): No longer include
21094 `timestamp' and `text' in the default YYLTYPE.
21095
21096 2000-12-12 Akim Demaille <akim@epita.fr>
21097
21098 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21099 (copy_guard): Quote the file names.
21100 Reported by Laurent Mascherpa.
21101
21102 2000-12-12 Akim Demaille <akim@epita.fr>
21103
21104 * src/output.c (output_headers, output_program, output): Be sure
21105 to escape special characters when outputting filenames.
21106 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21107 (output_headers): Don't depend on them, Use ACTSTR.
21108
21109 2000-11-17 Akim Demaille <akim@epita.fr>
21110
21111 * lib/obstack.h: Formatting changes.
21112 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21113 prevents type checking.
21114 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21115 cast the value to (void *): assigning a `foo *' to a `void *'
21116 variable is valid.
21117 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21118 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21119 append characters.
21120
21121 2000-11-17 Akim Demaille <akim@epita.fr>
21122
21123 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21124 as...
21125 (suite.m4, regression.m4, calc.m4): these.
21126 * tests/atgeneral.m4: Update from CVS Autoconf.
21127
21128 2000-11-17 Akim Demaille <akim@epita.fr>
21129
21130 * tests/regression.m4 (%union and --defines): New test,
21131 demonstrating a current bug in the obstack implementation.
21132
21133 2000-11-17 Akim Demaille <akim@epita.fr>
21134
21135 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21136 macros.
21137 Use them to declare the variables which are global or local to
21138 `yyparse'.
21139
21140 2000-11-17 Akim Demaille <akim@epita.fr>
21141
21142 * acconfig.h: Remove, no longer used.
21143
21144 2000-11-07 Akim Demaille <akim@epita.fr>
21145
21146 * src: s/Copyright (C)/Copyright/g.
21147
21148 2000-11-07 Akim Demaille <akim@epita.fr>
21149
21150 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21151 defining.
21152 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21153
21154 2000-11-07 Akim Demaille <akim@epita.fr>
21155
21156 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21157 Merge in a single CPP if/else.
21158
21159 2000-11-07 Akim Demaille <akim@epita.fr>
21160
21161 * src/output.c (output): Remove useless variables.
21162 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21163 argument `data' for consistency with the prototypes.
21164 Qualify it `const'.
21165 (obstack_copy, obstack_copy0): Rename the second argument as
21166 `address' for consistency. Qualify it `const'.
21167 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21168 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21169 `const' their input argument (`data' or `address').
21170 Adjust the corresponding macros to include `const' in casts.
21171
21172 2000-11-03 Akim Demaille <akim@epita.fr>
21173
21174 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21175 s/PFILE1/BISON_HAIRY/.
21176 Adjust dependencies.
21177
21178 2000-11-03 Akim Demaille <akim@epita.fr>
21179
21180 For some reason, this was not applied.
21181
21182 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21183 `unlink': it's no longer used.
21184
21185 2000-11-03 Akim Demaille <akim@epita.fr>
21186
21187 * src/files.c (skeleton_find): New function, eved out of...
21188 (open_files, open_extra_files): here.
21189
21190 2000-11-03 Akim Demaille <akim@epita.fr>
21191
21192 Don't use `atexit'.
21193
21194 * src/files.c (obstack_save): New function.
21195 (done): Rename as...
21196 (output_files): this.
21197 Use `obstack_save'.
21198 * src/main.c (main): Don't use `atexit' to register `done', since
21199 it no longer has to remove tmp files, just call `output_files'
21200 when there are no errors.
21201
21202 2000-11-02 Akim Demaille <akim@epita.fr>
21203
21204 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21205 `unlink': it's no longer used.
21206 * src/files.h: Formatting changes.
21207
21208 2000-11-02 Akim Demaille <akim@epita.fr>
21209
21210 Remove the last uses of mktemp and unlink/delete.
21211
21212 * src/files.c (fdefines, ftable): Removed.
21213 (defines_ostack, table_obstack): New.
21214 Adjust dependencies of the former into uses of the latter.
21215 * src/output.c (output_short_or_char_table, output_short_table):
21216 Convert to using obstacks.
21217 * src/reader.c (copy_comment2): Accept one FILE * and two
21218 obstacks.
21219 (output_token_defines, reader_output_yylsp): Use obstacks.
21220 * src/system.h (obstack_fgrow3): New.
21221 * po/POTFILES.in: Adjust.
21222
21223 2000-11-01 Akim Demaille <akim@epita.fr>
21224
21225 Change each use of `fattrs' into a use of `attrs_obstack'.
21226
21227 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21228 * src/files.c (fattrs): Remove.
21229 (attrs_obstack): New.
21230 Adjust all dependencies.
21231 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21232
21233 2000-11-01 Akim Demaille <akim@epita.fr>
21234
21235 Introduce obstacks.
21236 Change each use of `faction' into a use of `action_obstack'.
21237
21238 * lib/obstack.h, lib/obstack.c: New files.
21239 * src/files.c (faction): Remove.
21240 (action_obstack): New.
21241 Adjust all dependencies.
21242
21243 2000-10-20 Akim Demaille <akim@epita.fr>
21244
21245 * lib/quote.h (PARAMS): New macro. Use it.
21246
21247 2000-10-16 Akim Demaille <akim@epita.fr>
21248
21249 * src/output.c (output_short_or_char_table): New function.
21250 (output_short_table, output_token_translations): Use it.
21251 (goto_actions): Use output_short_table.
21252
21253 2000-10-16 Akim Demaille <akim@epita.fr>
21254
21255 * src/symtab.c (bucket_new): New function.
21256 (getsym): Use it.
21257
21258 * src/output.c (output_short_table): New argument to display the
21259 comment associated with the table.
21260 Adjust dependencies.
21261 (output_gram): Use it.
21262 (output_rule_data): Nicer output layout for YYTNAME.
21263
21264 2000-10-16 Akim Demaille <akim@epita.fr>
21265
21266 * src/lex.c (read_typename): New function.
21267 (lex): Use it.
21268 * src/reader.c (copy_dollar): Likewise.
21269
21270 2000-10-16 Akim Demaille <akim@epita.fr>
21271
21272 * src/reader.c (copy_comment2): Expect the input stream to be on
21273 the `/' which is suspected to open a comment, instead of being
21274 called after `//' or `/*' was read.
21275 (copy_comment, copy_definition, parse_union_decl, copy_action)
21276 (copy_guard): Adjust.
21277
21278 2000-10-16 Akim Demaille <akim@epita.fr>
21279
21280 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21281 `read_signed_integer'.
21282
21283 2000-10-16 Akim Demaille <akim@epita.fr>
21284
21285 * src/reader.c (copy_dollar): New function.
21286 (copy_guard, copy_action): Use it.
21287
21288 2000-10-16 Akim Demaille <akim@epita.fr>
21289
21290 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21291 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21292 New files, from Fileutils 4.0.27.
21293 * src/main.c (printable_version): Remove.
21294 * src/lex.c, src/reader.c: Use `quote'.
21295
21296 2000-10-04 Akim Demaille <akim@epita.fr>
21297
21298 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21299
21300 2000-10-04 Akim Demaille <akim@epita.fr>
21301
21302 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21303
21304 2000-10-04 Akim Demaille <akim@epita.fr>
21305
21306 When a literal string is used to define two different tokens,
21307 `bison -v' segfaults.
21308 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21309
21310 * tests/regression.m4: New file.
21311 Include the core of the sample provided by Piotr Gackiewicz.
21312 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21313 properly.
21314
21315 2000-10-04 Akim Demaille <akim@epita.fr>
21316
21317 * src/reader.c (parse_expect_decl): Keep `count' within the size
21318 of `buffer'.
21319 From Neil Booth.
21320
21321 2000-10-02 Paul Eggert <eggert@twinsun.com>
21322
21323 * bison.s1 (yyparse): Assign the default value
21324 unconditionally, to avoid a GCC warning and make the parser a
21325 tad smaller.
21326
21327 2000-10-02 Akim Demaille <akim@epita.fr>
21328
21329 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21330 options.
21331
21332 2000-10-02 Akim Demaille <akim@epita.fr>
21333
21334 * src/derives.c, src/print.c, src/reduce.c: To ease the
21335 translation, move some `\n' out of the translated strings.
21336
21337 2000-10-02 Akim Demaille <akim@epita.fr>
21338
21339 The location tracking mechanism is precious for parse error
21340 messages. Nevertheless, it is enabled only when `@n' is used in
21341 the grammar, which is a different issue (you can use it in error
21342 message, but not in the grammar per se). Therefore, there should
21343 be another means to enable it.
21344
21345 * src/getargs.c (getargs): Support `--locations'.
21346 (usage): Report it.
21347 * src/getargs.h (locationsflag): Export it.
21348 * src/lex.c (percent_table): Support `%locations'.
21349 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21350 with `locationsflag'.
21351 * doc/bison.texinfo: Document `--locations' and `%locations'.
21352 Sort the options.
21353 * tests/calc.m4: Test it.
21354
21355 For regularity of the names, replace each
21356 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21357 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21358 In addition replace each `flag' with `_flag'.
21359
21360 2000-10-02 Akim Demaille <akim@epita.fr>
21361
21362 Also test parse error messages, including with YYERROR_VERBOSE.
21363
21364 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21365 associative).
21366 Use it to check the computations.
21367 Use it to check `nonassoc' is honored.
21368 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21369 `--yyerror-verbose'.
21370 (_AT_CHECK_CALC): Adjust to this option.
21371 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21372
21373 2000-10-02 Akim Demaille <akim@epita.fr>
21374
21375 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21376 the latter demonstrates a flaw in the handling of non debugging
21377 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21378 was used in order to simplify:
21379
21380 #if YYDEBUG
21381 if (yydebug)
21382 {
21383 ...
21384 }
21385 #endif
21386
21387 into
21388
21389 if (yydebug)
21390 {
21391 ...
21392 }
21393
21394 unfortunately this leads to a CPP conflict when
21395 `--name-prefix=foo' is used since it produces `#define yydebug
21396 foodebug'.
21397
21398 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21399 (YYDPRINTF): New macro.
21400 Spread its use.
21401 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21402 the bison options.
21403 Also test `--verbose', `--defines' and `--name-prefix'.
21404
21405 2000-10-02 Akim Demaille <akim@epita.fr>
21406
21407 Improve the readability of the produced parsers.
21408
21409 * src/bison.s1: Formatting changes.
21410 Improve the comment related to the `$' mark.
21411 (yydefault): Don't fall through to `yyresume': `goto' there.
21412 * src/output.c (output_parser): When the `$' is met, skip the end
21413 of its line.
21414 New variable, `number_of_dollar_signs', to check there's exactly
21415 one `$' in the parser skeleton.
21416
21417 2000-10-02 Akim Demaille <akim@epita.fr>
21418
21419 * lib/xstrdup.c: New file, from the fileutils.
21420 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21421 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21422 instead of strlen + xmalloc + strcpy.
21423 * src/symtab.c (copys): Remove, use xstrdup instead.
21424
21425 2000-10-02 Akim Demaille <akim@epita.fr>
21426
21427 * src/gram.h (associativity): New enum type which replaces the
21428 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21429 `right_assoc', `left_assoc' and `non_assoc'.
21430 Adjust all dependencies.
21431 * src/reader.c: Formatting changes.
21432 (LTYPESTR): Don't define it, use it as a literal in
21433 `reader_output_yylsp'.
21434 * src/symtab.h (symbol_class): New enum type which replaces the
21435 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21436 `sunknown', `stoken and `snterm'.
21437
21438 2000-10-02 Akim Demaille <akim@epita.fr>
21439
21440 * src/getargs.c (fixed_outfiles): Rename as...
21441 (yaccflag): for consistency and accuracy.
21442 Adjust dependencies.
21443
21444 2000-10-02 Akim Demaille <akim@epita.fr>
21445
21446 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21447 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21448 difficult and introduced a lot of core dump. It turns out that
21449 Bison used an implementation of `xmalloc' based on `calloc', and
21450 at various places it does depend upon the initialization to 0. I
21451 have not tried to isolate the pertinent places, and all the former
21452 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21453 someone should address this issue.
21454
21455 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21456 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21457 files.
21458 Adjust dependencies.
21459 * src/warshall.h: New file.
21460 Propagate.
21461
21462 2000-10-02 Akim Demaille <akim@epita.fr>
21463
21464 Various anti-`extern in *.c' changes.
21465
21466 * src/system.h: Include `assert.h'.
21467
21468 2000-10-02 Akim Demaille <akim@epita.fr>
21469
21470 * src/state.h (nstates, final_state, first_state, first_shift)
21471 (first_reduction): Move their exportation from here...
21472 * src/LR0.h: to here.
21473 Adjust dependencies.
21474 * src/getargs.c (statisticsflag): New variable.
21475 Add support for `--statistics'.
21476 Adjust dependencies.
21477
21478 Remove a lot of now useless `extern' statements in most files.
21479
21480 2000-10-02 Akim Demaille <akim@epita.fr>
21481
21482 * src/LR0.h: New file.
21483 Propagate its use.
21484
21485 2000-10-02 Akim Demaille <akim@epita.fr>
21486
21487 * src/print.h: New file.
21488 Propagate its use.
21489 * src/print.c: Formatting and ordering changes.
21490 (verbose, terse): Replace with...
21491 (print_results): this new function.
21492 Adjust dependencies.
21493
21494 2000-10-02 Akim Demaille <akim@epita.fr>
21495
21496 * src/conflicts.c (conflict_report): New function.
21497 (conflict_log, verbose_conflict_log): Replace with...
21498 (print_conflicts): this function.
21499 Adjust dependencies.
21500 * src/conflicts.h: New file.
21501 Propagate its inclusion.
21502
21503 2000-10-02 Akim Demaille <akim@epita.fr>
21504
21505 * src/nullable.h: New file.
21506 Propagate its inclusion.
21507 * src/nullable.c: Formatting changes.
21508
21509 2000-10-02 Akim Demaille <akim@epita.fr>
21510
21511 * src/reduce.h: New file.
21512 Propagate its inclusion.
21513 * src/reduce.c: Topological sort and other formatting changes.
21514 (bool, TRUE, FALSE): Move their definition to...
21515 * src/system.h: here.
21516
21517 2000-10-02 Akim Demaille <akim@epita.fr>
21518
21519 * src/files.c: Formatting changes.
21520 (tryopen, tryclose, openfiles): Rename as...
21521 (xfopen, xfclose, open_files): this.
21522 (stringappend): static.
21523 * src/files.h: Complete the list of exported symbols.
21524 Propagate its use.
21525
21526 2000-10-02 Akim Demaille <akim@epita.fr>
21527
21528 * src/reader.h: New file.
21529 Propagate its use instead of tedious list of `extern' and
21530 prototypes.
21531 * src/reader.c: Formatting changes, topological sort,
21532 s/register//.
21533
21534 2000-10-02 Akim Demaille <akim@epita.fr>
21535
21536 * src/lex.h: Prototype `lex.c' exported functions.
21537 * src/reader.c: Adjust.
21538 * src/lex.c: Formatting changes.
21539 (safegetc): Rename as...
21540 (xgetc): this.
21541
21542 2000-10-02 Akim Demaille <akim@epita.fr>
21543
21544 * src/lalr.h: New file.
21545 Propagate its inclusion instead of prototypes and `extern'.
21546 * src/lalr.c: Formatting changes, topological sorting etc.
21547
21548 2000-10-02 Akim Demaille <akim@epita.fr>
21549
21550 * src/output.c (token_actions): Introduce a temporary array,
21551 YYDEFACT, that makes it possible for this function to use
21552 output_short_table.
21553
21554 2000-10-02 Akim Demaille <akim@epita.fr>
21555
21556 `user_toknums' is output as a `short[]' in `output.c', while it is
21557 defined as a `int[]' in `reader.c'. For consistency with the
21558 other output tables, `user_toknums' is now defined as a table of
21559 shorts.
21560
21561 * src/reader.c (user_toknums): Be a short table instead of an int
21562 table.
21563 Adjust dependencies.
21564
21565 Factor the short table outputs.
21566
21567 * src/output.c (output_short_table): New function.
21568 * src/output.c (output_gram, output_stos, output_rule_data)
21569 (output_base, output_table, output_check): Use it.
21570
21571 2000-10-02 Akim Demaille <akim@epita.fr>
21572
21573 * src/output.c (output): Topological sort of the functions, in
21574 order to get rid of the `static' prototypes.
21575 No longer use `register'.
21576 * src/output.h: New file.
21577 Propagate its inclusion in files explicitly prototyping functions
21578 from output.c.
21579
21580 2000-09-21 Akim Demaille <akim@epita.fr>
21581
21582 * src/atgeneral.m4: Update from Autoconf.
21583
21584 2000-09-21 Akim Demaille <akim@epita.fr>
21585
21586 * src/closure.h: New file.
21587 * src/closure.c: Formatting changes, topological sort over the
21588 functions, use of closure.h.
21589 (initialize_closure, finalize_closure): Rename as...
21590 (new_closure, free_closure): these. Adjust dependencies.
21591 * src/LR0.c: Formatting changes, topological sort, use of
21592 cloture.h.
21593 (initialize_states): Rename as...
21594 (new_states): this.
21595 * src/Makefile.am (noinst_HEADERS): Adjust.
21596
21597 2000-09-20 Akim Demaille <akim@epita.fr>
21598
21599 * src/acconfig.h: Don't protect config.h against multiple
21600 inclusion.
21601 Don't define PARAMS.
21602 * src/system.h: Define PARAMS.
21603 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21604 purpose of config.h. system.h must not try to fix wrong
21605 definitions in config.h.
21606
21607 2000-09-20 Akim Demaille <akim@epita.fr>
21608
21609 * src/derives.h: New file.
21610 * src/main.c, src/derives.h: Use it.
21611 Formatting changes.
21612 * src/Makefile.am (noinst_HEADERS): Adjust.
21613
21614 2000-09-20 Akim Demaille <akim@epita.fr>
21615
21616 * tests/atgeneral.m4: Update from Autoconf.
21617 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21618 (AT_CHECK_CALC): New macros.
21619 Use these macros to test bison with options `', `--raw',
21620 `--debug', `--yacc', `--yacc --debug'.
21621
21622 2000-09-19 Akim Demaille <akim@epita.fr>
21623
21624 * src/output.c: Formatting changes.
21625 * src/machine.h: Remove, leaving its contents in...
21626 * src/system.h: here.
21627 Include stdio.h.
21628 Adjust all dependencies on stdio.h and machine.h.
21629 * src/getargs.h: New file.
21630 Let all `extern' declarations about getargs.c be replaced with
21631 inclusion of `getargs.h'.
21632 * src/Makefile.am (noinst_HEADERS): Adjust.
21633
21634 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21635 scope.
21636 (yyerror): Returns void, not int.
21637 * doc/bison.texinfo: Formatting changes.
21638
21639 2000-09-19 Akim Demaille <akim@epita.fr>
21640
21641 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21642 portable.
21643
21644 2000-09-18 Akim Demaille <akim@epita.fr>
21645
21646 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21647 * src/Makefile.am (INCLUDES): Don't.
21648 Be ready to fetch headers in lib/.
21649
21650 2000-09-18 Akim Demaille <akim@epita.fr>
21651
21652 * doc/bison.texinfo: Update the copyright.
21653 ANSIfy and GNUify the examples.
21654 Remove the old menu.
21655
21656 2000-09-18 Akim Demaille <akim@epita.fr>
21657
21658 First set of tests: use the `calc' example from the documentation.
21659
21660 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21661 is defined only when YYDEBUG is.
21662 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21663 * src/files.c (tryopen, tryclose): Formatting changes.
21664 Move to the top and be static.
21665 * src/reader.c (read_signed_integer): Likewise.
21666 * tests/calc.m4: New file.
21667 * Makefile.am, suite.m4: Adjust.
21668 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21669
21670 2000-09-18 Akim Demaille <akim@epita.fr>
21671
21672 Add support for an Autotest test suite for Bison.
21673
21674 * m4/m4.m4, m4/atconfig.m4: New files.
21675 * m4/Makefile.am (EXTRA_DIST): Adjust.
21676 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21677 files.
21678 * src/getargs.c: Display a more standard --version message.
21679 * src/reader.c (reader): Formatting changes.
21680 No longer depend upon VERSION_STRING.
21681 * configure.in: No longer use `dnl'.
21682 Set up the test suite and the new directory `tests/.
21683 (VERSION_STRING): Remove.
21684
21685 2000-04-14 Akim Demaille <akim@epita.fr>
21686
21687 * src/reader.c (copy_comment2): New function, same as former
21688 `copy_comment', but outputs into two FILE *.
21689 (copy_comment): Use it.
21690 (parse_union_decl): Use it.
21691 (get_type, parse_start_decl): Use the same `invalid' message.
21692 (parse_start_decl, parse_union_decl): Use the same `multiple'
21693 message.
21694 (parse_union_decl, copy_guard, copy_action): Use the same
21695 `unmatched' message.
21696 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21697
21698 2000-03-31 Akim Demaille <akim@epita.fr>
21699
21700 * src/files.c (tryopen, tryclose): Move to the top.
21701 Be static.
21702
21703 2000-03-31 Akim Demaille <akim@epita.fr>
21704
21705 * src/main.c (main): Don't call `done', exit does it.
21706
21707 2000-03-31 Akim Demaille <akim@epita.fr>
21708
21709 * allocate.c: s/return (foo)/return foo/.
21710 * lalr.c: Likewise.
21711 * LR0.c: Likewise.
21712 * output.c: Likewise.
21713 * reader.c: Likewise.
21714 * symtab.c: Likewise.
21715 * vmsgetargs.c: Likewise.
21716
21717 2000-03-31 Akim Demaille <akim@epita.fr>
21718
21719 Clean up the error reporting functions.
21720
21721 * src/report.c: New file.
21722 * src/report.h: Likewise.
21723 * src/Makefile.am: Adjust.
21724 * m4/error.m4: New file.
21725 * m4/Makefile.am: Adjust.
21726 * configure.in (jm_PREREQ_ERROR): Call it.
21727 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21728 Remove.
21729 (fatal, fatals): Remove. All callers use complain.c::fatal.
21730 (warn, warni, warns, warnss, warnss): Remove. All callers use
21731 complain.c::complain.
21732 (toomany): Remove, use fatal instead.
21733 * src/files.c (done): No argument, use complain_message_count.
21734 * src/main.c (main): Register `done' to `atexit'.
21735
21736 * src/getargs.c (usage): More `fputs', less `fprintf'.
21737
21738 2000-03-28 Akim Demaille <akim@epita.fr>
21739
21740 * lib/: New directory.
21741 * Makefile.am (SUBDIRS): Adjust.
21742 * configure.in: Adjust.
21743 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21744 useless.
21745 * src/alloca.c: Moved to lib/.
21746 * src/getopt.c: Likewise.
21747 * src/getopt1.c: Likewise.
21748 * src/getopt.h: Likewise.
21749 * src/ansi2knr.c: Likewise.
21750 * src/ansi2knr.1: Likewise.
21751 * src/Makefile.am: Adjust.
21752 * lib/Makefile.am: New file.
21753
21754 2000-03-28 Akim Demaille <akim@epita.fr>
21755
21756 * src/getargs.c (usage): Refresh the help message.
21757
21758 2000-03-17 Akim Demaille <akim@epita.fr>
21759
21760 * src/getopt1.c: Updated from textutils 2.0e
21761 * src/getopt.c: Likewise.
21762 * src/getopt.h: Likewise.
21763
21764 2000-03-17 Akim Demaille <akim@epita.fr>
21765
21766 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21767 the file name, not the whole `#line LINE FILE'.
21768
21769 2000-03-17 Akim Demaille <akim@epita.fr>
21770
21771 On syntax errors, report the token on which we choked.
21772
21773 * src/bison.s1 (yyparse): In the label yyerrlab, when
21774 YYERROR_VERBOSE, add yychar in msg.
21775
21776 2000-03-17 Akim Demaille <akim@epita.fr>
21777
21778 * src/reader.c (copy_at): New function.
21779 (copy_guard): Use it.
21780 (copy_action): Use it.
21781
21782 2000-03-17 Akim Demaille <akim@epita.fr>
21783
21784 Be kind to translators, save some useless translations.
21785
21786 * src/main.c (banner): New function.
21787 (fatal_banner): Use it.
21788 (warn_banner): Use it.
21789
21790 2000-03-17 Akim Demaille <akim@epita.fr>
21791
21792 * src/reader.c (copy_definition): Use copy_string and
21793 copy_comment. Removed now unused `match', `ended',
21794 `cplus_comment'.
21795 (copy_comment, copy_string): Moved, to be visible from
21796 copy_definition.
21797
21798 2000-03-17 Akim Demaille <akim@epita.fr>
21799
21800 * src/reader.c (copy_string): Declare `static inline'. No
21801 problems with inline, since it is checked by configure.
21802 (copy_comment): Likewise.
21803
21804 2000-03-17 Akim Demaille <akim@epita.fr>
21805
21806 * src/reader.c (packsymbols): Formatting changes.
21807
21808 2000-03-17 Akim Demaille <akim@epita.fr>
21809
21810 * src/reader.c (copy_comment): New function, factored out from:
21811 (copy_action): Use it. Removed now unused `match', `ended',
21812 `cplus_comment'.
21813 (copy_guard): Likewise.
21814
21815 2000-03-17 Akim Demaille <akim@epita.fr>
21816
21817 * src/reader.c (copy_string): New function, factored out from:
21818 (copy_action): Use it.
21819 (copy_guard): Likewise.
21820
21821 2000-03-17 Akim Demaille <akim@epita.fr>
21822
21823 Change the handling of @s so that they behave exactly like $s.
21824 There is now a pseudo variable @$ (readble and writable), location
21825 of the lhs of the rule (by default ranging from the location of
21826 the first symbol of the rhs, to the location of the last symbol,
21827 or, if the rhs is empty, YYLLOC).
21828
21829 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21830 yyval.
21831 (yyparse): When providing a default semantic action, provide a
21832 default location action.
21833 (after the $): No longer change `*YYLSP', just stack YYLOC the
21834 same way you stack YYVAL.
21835 * src/reader.c (read_declarations): Use warns.
21836 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21837 (copy_action, case '@'): Likewise.
21838 Use a standard error message, to save useless work from
21839 translators.
21840
21841 2000-03-17 Akim Demaille <akim@epita.fr>
21842
21843 * src/bison.s1: Formatting and cosmetics changes.
21844 * src/reader.c: Likewise.
21845 Update the Copyright notice.
21846
21847 2000-03-17 Akim Demaille <akim@epita.fr>
21848
21849 * src/bison.s1 (#line): All set to `#line' only, since the
21850 Makefile now handles them.
21851
21852 2000-03-16 Akim Demaille <akim@epita.fr>
21853
21854 * src/output.c (output_rule_data): Output the documentation of
21855 some of the tables.
21856 (Copyright notice): Update.
21857 Formatting changes.
21858
21859 2000-03-16 Akim Demaille <akim@epita.fr>
21860
21861 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21862 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21863 One `#if YYDEBUG' remains, since it uses variables which are
21864 defined only if `YYDEBUG != 0'.
21865
21866 2000-03-16 Akim Demaille <akim@epita.fr>
21867
21868 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21869 and related variables so that the similarities are highlighted.
21870
21871 2000-03-16 Akim Demaille <akim@epita.fr>
21872
21873 * src/bison.s1: Properly indent CPP directives.
21874
21875 2000-03-16 Akim Demaille <akim@epita.fr>
21876
21877 * src/bison.s1: Properly indent the `alloca' CPP section.
21878
21879 2000-03-16 Akim Demaille <akim@epita.fr>
21880
21881 Do not hard code values of directories in `configure.in'.
21882 Update the `configure' tool chain.
21883
21884 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21885 src/makefile.am.
21886 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21887 (AC_OUTPUT): Add m4/Makefile.
21888 Bump to bison 1.28a, 1.29 has never been released.
21889 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21890 handled via src/Makefile.am.
21891 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21892 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21893 autoheader.
21894 * Makefile.am (SUBDIRS): Add m4.
21895 (ACLOCAL_AM_FLAGS): New variable.
21896 (AUTOMAKE_OPTIONS): Add check-news.
21897 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21898 the proper line number and file name.
21899 (DEFS): Propagate the location of bison library files and of the
21900 locale files.
21901 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21902 builddir.
21903 * acinclude.m4: Remove, replaced by the directory m4.
21904 * m4/Makefile.am (EXTRA_DIST): New variable.
21905 * m4/gettext.m4: New file, from the fileutils.
21906 * m4/lcmessage.m4: Likewise
21907 * m4/progtest.m4: Likewise.
21908 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21909
21910 2000-03-10 Akim Demaille <akim@epita.fr>
21911
21912 * src/closure.c:
21913 Formatting changes of various comments.
21914 Respect the GNU coding standards at various places.
21915 Don't use `_()' when no translation is needed.
21916
21917 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21918
21919 * src/files.c:
21920 OS/2 honors TMPDIR environment variable.
21921
21922 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21923
21924 * doc/bison.texinfo: Tweaked spelling and grammar.
21925 Updated ISBN.
21926 Removed reference to price of printed copy.
21927 Mention BISON_SIMPLE and BISON_HAIRY.
21928
21929 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21930
21931 * configure.in, NEWS:
21932 Bison 1.29 released.
21933
21934 1999-10-27 Jesse Thilo <jthilo@gnu.org>
21935
21936 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21937 Added reference card.
21938
21939 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21940
21941 * po/ru.po: Added Russian translation.
21942
21943 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21944
21945 * configure.in: Added Russian translation.
21946
21947 1999-07-06 Jesse Thilo <jthilo@gnu.org>
21948
21949 * configure.in, NEWS, README:
21950 Released version 1.28.
21951
21952 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21953
21954 * src/system.h:
21955 Squashed redefinition warning on some systems.
21956
21957 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21958 Have configure build version string instead of relying on ANSI string
21959 concatentation.
21960
21961 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21962
21963 * po/POTFILES.in: Got rid of version.c.
21964
21965 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21966
21967 * acconfig.h, configure.in:
21968 Have configure build version string instead of relying on ANSI string
21969 concatentation.
21970
21971 1999-06-08 Jesse Thilo <jthilo@gnu.org>
21972
21973 * doc/bison.1:
21974 Dropped mention of `+' for long-named options.
21975
21976 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21977
21978 * src/files.c: Added <unistd.h> for unlink().
21979
21980 * src/Makefile.am, src/system.h:
21981 I18n fixes.
21982
21983 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21984
21985 * README: Added a FAQ list.
21986
21987 * configure.in, acconfig.h:
21988 I18n fixes.
21989
21990 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21991
21992 * doc/FAQ, doc/Makefile.am:
21993 Added a FAQ list.
21994
21995 1999-05-19 Jesse Thilo <jthilo@gnu.org>
21996
21997 * src/alloc.h, src/symtab.h, src/version.c:
21998 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21999
22000 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22001
22002 * src/.cvsignore, src/Makefile.am:
22003 Reorganized: sources in `src', documentation in `doc'.
22004
22005 * src/lex.c (literalchar):
22006 fixed the code for escaping double quotes (thanks
22007 Jonathan Czisny.)
22008
22009 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22010
22011 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22012 Adjusted paths to reflect directory reorganization.
22013
22014 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22015
22016 * doc/.cvsignore, doc/Makefile.am:
22017 Reorganized: sources in `src', documentation in `doc'.
22018
22019 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22020
22021 * configure.in:
22022 Updated AC_INIT file to reflect directory reorganization.
22023
22024 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22025 Reorganized: sources in `src', documentation in `doc'.
22026
22027 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22028
22029 * src/allocate.c:
22030 Don't declare calloc() and realloc() if not necessary.
22031
22032 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22033
22034 * configure.in, acconfig.h, acinclude.m4:
22035 Don't declare calloc() and realloc() if not necessary.
22036
22037 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22038
22039 * po/.cvsignore: Added i18n support.
22040
22041 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22042
22043 * acconfig.h, configure.in, Makefile.am:
22044 Added i18n support.
22045
22046 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22047
22048 * src/bison.s1: Fixed #line numbers.
22049
22050 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22051
22052 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22053 Added PO files from Translation Project.
22054
22055 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22056
22057 * Makefile.am:
22058 Added support for non-ANSI compilers (ansi2knr).
22059
22060 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22061
22062 * configure.in: Bumped version number to 1.27.
22063
22064 * Makefile.am:
22065 Added `bison.simple' to list of files removed by `make distclean'.
22066
22067 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22068
22069 * src/files.c, src/files.h:
22070 Defined locations of parser files in config.h instead of Makefile.
22071
22072 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22073
22074 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22075 Defined locations of parser files in config.h instead of Makefile.
22076
22077 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22078
22079 * Makefile.am:
22080 Removed inappropriate use of $< macro.
22081
22082 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22083
22084 * po/Makefile.in.in, po/POTFILES.in:
22085 Add `po' directory skeleton.
22086
22087 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22088
22089 * README: Document help-bison list.
22090
22091 * configure.in: Add check for mkstemp().
22092
22093 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22094
22095 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22096 Hush a few compiler warnings.
22097
22098 * src/files.c:
22099 Add tryclose(), which verifies that fclose was successful.
22100 Hush a couple of compiler warnings.
22101
22102 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22103
22104 * Makefile.am, OChangeLog:
22105 ChangeLog is now automatically generated. Include the old version as
22106 OChangeLog.
22107
22108 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22109
22110 * 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:
22111 Update FSF address.
22112
22113 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22114
22115 * doc/bison.texinfo: Fix formatting glitch.
22116
22117 * doc/bison.texinfo: Update FSF address.
22118
22119 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22120
22121 * acconfig.h: Update FSF address.
22122
22123 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22124
22125 * src/system.h:
22126 Don't define PACKAGE here, since config.h defines it.
22127
22128 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22129
22130 * src/reader.c: Update copyright date.
22131
22132 * src/main.c:
22133 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22134 favor of output directly to stderr (avoids buffer overruns).
22135
22136 * src/reader.c: Some checks for premature EOF.
22137
22138 * 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:
22139 Use prototypes if the compiler understands them.
22140
22141 * src/files.c: Honor TMPDIR on Unix hosts.
22142 Use prototypes if the compiler understands them.
22143
22144 * src/reader.c:
22145 Fix a couple of buffer overrun bugs.
22146 Use prototypes if the compiler understands them.
22147
22148 * src/system.h: Include unistd.h and ctype.h.
22149 Use #ifdef instead of #if for NLS symbols.
22150
22151 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22152
22153 * doc/bison.texinfo:
22154 Delete comment "consider using @set for edition number, etc..." since
22155 we now are doing so.
22156
22157 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22158
22159 * configure.in:
22160 Use prototypes if the compiler understands them.
22161
22162 * NEWS: Document 1.26 highlights.
22163
22164 * Makefile.am: Require Automake 1.3 or later.
22165
22166 * acconfig.h:
22167 Use prototypes if the compiler understands them.
22168
22169 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22170
22171 * src/version.c:
22172 Use VERSION symbol from automake for version number.
22173
22174 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22175
22176 * acconfig.h, configure.in, version.cin:
22177 Use VERSION symbol from automake for version number.
22178
22179 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22180
22181 * Makefile.am:
22182 Distribute original version of simple parser (bison.s1), not built
22183 version (bison.simple).
22184
22185 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22186
22187 * doc/bison.texinfo: Add info dir entry.
22188
22189 * doc/bison.texinfo:
22190 Let automake put version number into documentation.
22191
22192 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22193
22194 * src/bison.cld, src/build.com, src/vmshlp.mar:
22195 Add non-RCS files from /gd/gnu/bison.
22196
22197 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22198
22199 * doc/bison.1:
22200 Document the BISON_HAIRY and BISON_SIMPLE variables.
22201
22202 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22203
22204 * src/version.c: Build version.c automatically.
22205
22206 * src/reader.c:
22207 Fix token numbering (used to start at 258, not 257).
22208
22209 * src/system.h: Include config.h.
22210
22211 * src/getargs.c: Update bug report address.
22212
22213 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22214 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22215
22216 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22217
22218 * Makefile.am:
22219 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22220
22221 * configure.in, version.cin:
22222 Build version.c automatically.
22223
22224 * AUTHORS: Add AUTHORS file.
22225
22226 * README: Update bug report address.
22227
22228 * bison.simple:
22229 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22230
22231 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22232 Add automake stuff.
22233
22234 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22235
22236 * doc/bison.texinfo: Clean up some formatting.
22237
22238 1998-05-05 Richard Stallman <rms@gnu.org>
22239
22240 * doc/bison.texinfo:
22241 Explain better why to make a pure parser.
22242
22243 1998-01-05 Richard Stallman <rms@gnu.org>
22244
22245 * src/files.c (openfiles):
22246 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22247 find a temporary directory, if possible. Do not unlink files while
22248 they are open.
22249
22250 1997-08-25 Richard Stallman <rms@gnu.org>
22251
22252 * src/reader.c (stack_offset;):
22253 Change some warni to warns.
22254
22255 * src/lex.c (literalchar): Use warns, not warni.
22256
22257 1997-06-28 Richard Stallman <rms@gnu.org>
22258
22259 * src/bison.s1: Add a Bison version comment.
22260
22261 * src/main.c (fatal, warn, berror):
22262 Use program_name.
22263
22264 1997-06-28 Richard Stallman <rms@gnu.org>
22265
22266 * Makefile.in (bison_version): New variable.
22267 (dist): Use that variable.
22268 (bison.s1): Substitute the Bison version into bison.simple.
22269
22270 * bison.simple: Add a Bison version comment.
22271
22272 1997-06-18 Richard Stallman <rms@gnu.org>
22273
22274 * src/main.c (fatal, warn, berror):
22275 Make error messages standard.
22276 (toomany): Improve error message text.
22277
22278 * 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:
22279 new.h renamed to alloc.h.
22280
22281 1997-06-18 Richard Stallman <rms@gnu.org>
22282
22283 * Makefile.in: new.h renamed to alloc.h.
22284
22285 1997-05-24 Richard Stallman <rms@gnu.org>
22286
22287 * src/lex.c (literalchar):
22288 Fix the code for escaping \, " and '.
22289
22290 (lex): Avoid trouble when there are many chars
22291 to discard in a char literal with just several chars in it.
22292
22293 1997-05-17 Richard Stallman <rms@gnu.org>
22294
22295 * src/bison.s1:
22296 Use malloc, if using alloca is troublesome.
22297 (YYSTACK_USE_ALLOCA): New flag macro.
22298 Define it for some systems and compilers.
22299 (YYSTACK_ALLOC): New macro.
22300 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22301 If it was malloc'd, free it.
22302
22303 1997-05-17 Richard Stallman <rms@gnu.org>
22304
22305 * bison.simple:
22306 Use malloc, if using alloca is troublesome.
22307 (YYSTACK_USE_ALLOCA): New flag macro.
22308 Define it for some systems and compilers.
22309 (YYSTACK_ALLOC): New macro.
22310 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22311 If it was malloc'd, free it.
22312
22313 1997-04-23 Richard Stallman <rms@gnu.org>
22314
22315 * src/bison.s1:
22316 (alloca) [__hpux]: Always define as __builtin_alloca.
22317
22318 1997-04-23 Richard Stallman <rms@gnu.org>
22319
22320 * bison.simple:
22321 (alloca) [__hpux]: Always define as __builtin_alloca.
22322
22323 1997-04-22 Richard Stallman <rms@gnu.org>
22324
22325 * src/bison.s1:
22326 [__hpux]: Include alloca.h (right for HPUX 10)
22327 instead of declaring alloca (right for HPUX 9).
22328
22329 * src/bison.s1 (__yy_memcpy):
22330 Declare arg `count' as unsigned int.
22331 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22332
22333 1997-04-22 Richard Stallman <rms@gnu.org>
22334
22335 * bison.simple:
22336 [__hpux]: Include alloca.h (right for HPUX 10)
22337 instead of declaring alloca (right for HPUX 9).
22338
22339 * bison.simple (__yy_memcpy):
22340 Declare arg `count' as unsigned int.
22341 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22342
22343 1997-01-03 Richard Stallman <rms@gnu.org>
22344
22345 * src/allocate.c: [__STDC__ or _MSC_VER]:
22346 Declare calloc and realloc to return void *.
22347
22348 1997-01-02 Richard Stallman <rms@gnu.org>
22349
22350 * src/system.h:
22351 [_MSC_VER]: Include stdlib.h and process.h.
22352 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22353
22354 * src/main.c (main): Return FAILURE as a value.
22355 (printable_version): Declare arg as int, not char.
22356
22357 1997-01-02 Richard Stallman <rms@gnu.org>
22358
22359 * Makefile.in (dist):
22360 Explicitly check for symlinks, and copy them.
22361
22362 1996-12-19 Richard Stallman <rms@gnu.org>
22363
22364 * src/files.c:
22365 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22366
22367 1996-12-18 Paul Eggert <eggert@gnu.org>
22368
22369 * src/bison.s1 (yyparse):
22370 If __GNUC__ and YYPARSE_PARAM are both defined,
22371 declare yyparse to have a void * argument.
22372
22373 1996-12-18 Paul Eggert <eggert@gnu.org>
22374
22375 * bison.simple (yyparse):
22376 If __GNUC__ and YYPARSE_PARAM are both defined,
22377 declare yyparse to have a void * argument.
22378
22379 1996-12-17 Richard Stallman <rms@gnu.org>
22380
22381 * src/reduce.c (nbits): Add some casts.
22382
22383 1996-08-12 Richard Stallman <rms@gnu.org>
22384
22385 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22386
22387 1996-08-12 Richard Stallman <rms@gnu.org>
22388
22389 * bison.simple: Test _MSDOS as well as _MSDOS_.
22390
22391 1996-07-31 Richard Stallman <rms@gnu.org>
22392
22393 * src/bison.s1:
22394 [__sun && __i386]: Include alloca.h.
22395
22396 1996-07-31 Richard Stallman <rms@gnu.org>
22397
22398 * bison.simple:
22399 [__sun && __i386]: Include alloca.h.
22400
22401 1996-07-30 Richard Stallman <rms@gnu.org>
22402
22403 * src/bison.s1: Comment change.
22404
22405 * src/bison.s1: Test _MSDOS_, not MSDOS.
22406
22407 1996-07-30 Richard Stallman <rms@gnu.org>
22408
22409 * bison.simple: Comment change.
22410
22411 * bison.simple: Test _MSDOS_, not MSDOS.
22412
22413 1996-06-01 Richard Stallman <rms@gnu.org>
22414
22415 * 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:
22416 Insert `_' macro around many string constants.
22417
22418 * src/main.c:
22419 Insert `_' macro around many string constants.
22420
22421 (main): Call setlocale, bindtextdomain and textdomain.
22422
22423 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22424 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22425 [ENABLE_NLS]: Include libintl.h.
22426 [ENABLE_NLS] (gettext): Define.
22427 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22428 (N_, PACKAGE, LOCALEDIR): New macros.
22429
22430 1996-06-01 Richard Stallman <rms@gnu.org>
22431
22432 * POTFILES.in: New file.
22433
22434 * Makefile.in (allocate.o):
22435 Define target explicitly.
22436
22437 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22438 (LDFLAGS): Set to @LDFLAGS@.
22439 (configure): Run autoconf only if preceding `cd' succeeds.
22440 (bison.s1): Redirect output to temporary file then move the
22441 temporary to the target, rather than redirecting directly to bison.s1.
22442 (clean): Remove config.status and config.log.
22443 (distclean): Don't remove config.status here.
22444
22445 1996-05-12 Richard Stallman <rms@gnu.org>
22446
22447 * src/bison.s1:
22448 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22449
22450 1996-05-12 Richard Stallman <rms@gnu.org>
22451
22452 * bison.simple:
22453 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22454
22455 1996-05-11 Richard Stallman <rms@gnu.org>
22456
22457 * src/bison.s1 (__yy_memcpy):
22458 Really reorder the args, as was supposedly done on Feb 14 1995.
22459 (yyparse): Calls changed accordingly.
22460
22461 1996-05-11 Richard Stallman <rms@gnu.org>
22462
22463 * Makefile.in (dist): Don't use $(srcdir).
22464
22465 * bison.simple (__yy_memcpy):
22466 Really reorder the args, as was supposedly done on Feb 14 1995.
22467 (yyparse): Calls changed accordingly.
22468
22469 1996-01-27 Richard Stallman <rms@gnu.org>
22470
22471 * src/output.c (output_rule_data):
22472 Test YYERROR_VERBOSE in the conditional
22473 around the definition of ttyname.
22474
22475 1995-12-29 Richard Stallman <rms@gnu.org>
22476
22477 * src/bison.s1:
22478 Fix line numbers in #line commands.
22479
22480 1995-12-29 Richard Stallman <rms@gnu.org>
22481
22482 * bison.simple:
22483 Fix line numbers in #line commands.
22484
22485 1995-12-27 Richard Stallman <rms@gnu.org>
22486
22487 * src/bison.s1 (YYPARSE_PARAM_DECL):
22488 In C++, make it always null.
22489 (YYPARSE_PARAM_ARG): New macro.
22490 (yyparse): Use YYPARSE_PARAM_ARG.
22491
22492 1995-12-27 Richard Stallman <rms@gnu.org>
22493
22494 * bison.simple (YYPARSE_PARAM_DECL):
22495 In C++, make it always null.
22496 (YYPARSE_PARAM_ARG): New macro.
22497 (yyparse): Use YYPARSE_PARAM_ARG.
22498
22499 1995-11-29 Richard Stallman <rms@gnu.org>
22500
22501 * doc/bison.texinfo:
22502 Describe literal string tokens, %raw, %no_lines, %token_table.
22503
22504 1995-11-29 Daniel Hagerty <hag@gnu.org>
22505
22506 * doc/bison.texinfo: Fixed update date
22507
22508 1995-10-16 Richard Stallman <rms@gnu.org>
22509
22510 * src/version.c: Version 1.25.
22511
22512 1995-10-16 Richard Stallman <rms@gnu.org>
22513
22514 * NEWS: *** empty log message ***
22515
22516 1995-10-16 Richard Stallman <rms@gnu.org>
22517
22518 * doc/bison.1, doc/bison.rnh:
22519 Add new options.
22520
22521 1995-10-15 Richard Stallman <rms@gnu.org>
22522
22523 * src/vmsgetargs.c, src/getargs.c:
22524 Added -n, -k, and -raw switches.
22525 (noparserflag, toknumflag, rawtoknumflag): New variables.
22526
22527 * src/symtab.h (SALIAS):
22528 New #define for adding aliases to %token.
22529 (struct bucket): Added `alias' field.
22530
22531 * src/reduce.c (reduce_grammar):
22532 Revise error message.
22533 (print_notices): Remove final `.' from error message.
22534
22535 * src/reader.c (reader_output_yylsp):
22536 New function.
22537 (readgram): Use `#if 0' around code that accepted %command
22538 inside grammar rules: The documentation doesn't allow it,
22539 and it will fail since the %command processors scan for the next %.
22540 (parse_token_decl): Extended the %token
22541 declaration to allow a multi-character symbol as an alias.
22542 (parse_thong_decl): New function.
22543 (read_declarations): Added %thong declarations.
22544 (read_declarations): Handle NOOP to deal with allowing
22545 % declarations as another means to specify the flags.
22546 (readgram): Allow %prec prior to semantics embedded in a rule.
22547 (skip_to_char, read_declarations, copy_definition)
22548 (parse_token_decl, parse_start_decl, parse_type_decl)
22549 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22550 (get_type_name, copy_guard, copy_action, readgram)
22551 (get_type, packsymbols): Revised most error messages.
22552 Changed `fatal' to `warnxxx' to avoid aborting for error.
22553 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22554 (read_declarations): Improve the error message for
22555 an invalid character. Do not abort.
22556 (read_declarations, copy_guard, copy_action): Use
22557 printable_version to avoid unprintable characters in printed output.
22558 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22559 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22560 Allow the type of a non-terminal can be given
22561 more than once, as long as all specifications give the same type.
22562
22563 * src/output.c:
22564 (output_headers, output_trailers, output, output_gram)
22565 (output_rule_data): Implement noparserflag variable.
22566 Implement toknumflag variable.
22567 (output): Call reader_output_yylsp to output LTYPESTR.
22568
22569 * src/main.c (main):
22570 If reader sees an error, don't process the grammar.
22571 (fatals): Updated to not use VARARGS1.
22572 (printable_version, int_to_string, warn, warni, warns, warnss)
22573 (warnsss): New error reporting functions. Avoid abort for error.
22574
22575 * src/lex.h:
22576 Added THONG and NOOP for alias processing.
22577 Added SETOPT for the new code that allows setting options with %flags.
22578
22579 * src/lex.c:
22580 Include getopt.h. Add some extern decls.
22581 (safegetc): New function to deal with EOF gracefully.
22582 (literalchar); new function to deal with reading \ escapes.
22583 (lex): Use literalchar.
22584 (lex): Implemented "..." tokens.
22585 (literalchar, lex, parse_percent_token): Made tokenbuffer
22586 always contain the token. This includes growing the token
22587 buffer while reading an integer.
22588 (parse_percent_token): Replaced if-else statement with percent_table.
22589 (parse_percent_token): Added % declarations as another
22590 way to specify the flags -n, -l, and -r. Also added hooks for
22591 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22592 major changes to files.c.
22593 (lex) Retain in the incoming stream a character following
22594 an incorrect '/'.
22595 (skip_white_space, lex): Revised most error messages
22596 and changed fatal to warn to avoid aborting.
22597 (percent_table): Added %thong declarations.
22598
22599 * src/gram.h: Comment changes.
22600
22601 * src/files.c (openfiles, open_extra_files, done):
22602 Add faction flag
22603 and actfile file. Handle noparserflag. Both for -n switch.
22604
22605 * src/conflicts.c (resolve_sr_conflict):
22606 Remove use of alloca.
22607
22608 1995-06-01 Jim Meyering <meyering@gnu.org>
22609
22610 * doc/bison.texinfo: *** empty log message ***
22611
22612 1995-05-06 Richard Stallman <rms@gnu.org>
22613
22614 * src/bison.s1: Comment change.
22615
22616 1995-05-06 Richard Stallman <rms@gnu.org>
22617
22618 * bison.simple: Comment change.
22619
22620 1995-05-03 Richard Stallman <rms@gnu.org>
22621
22622 * src/version.c: Version now 1.24.
22623
22624 * src/bison.s1: Change distribution terms.
22625
22626 * src/version.c: Version now 1.23.
22627
22628 1995-05-03 Richard Stallman <rms@gnu.org>
22629
22630 * doc/bison.texinfo:
22631 Rewrite "Conditions for Using Bison".
22632 Update version to 1.24.
22633
22634 1995-05-03 Richard Stallman <rms@gnu.org>
22635
22636 * bison.simple: Change distribution terms.
22637
22638 1995-02-23 Richard Stallman <rms@gnu.org>
22639
22640 * src/files.c: Test __VMS_POSIX as well as VMS.
22641
22642 1995-02-14 Jim Meyering <meyering@gnu.org>
22643
22644 * src/bison.s1 (__yy_memcpy):
22645 Renamed from __yy_bcopy to avoid
22646 confusion. Reverse FROM and TO arguments to be consistent with
22647 those of memcpy.
22648
22649 1995-02-14 Jim Meyering <meyering@gnu.org>
22650
22651 * bison.simple (__yy_memcpy):
22652 Renamed from __yy_bcopy to avoid
22653 confusion. Reverse FROM and TO arguments to be consistent with
22654 those of memcpy.
22655
22656 1994-11-10 David J. MacKenzie <djm@gnu.org>
22657
22658 * NEWS: reformat
22659
22660 * NEWS: New file.
22661
22662 * Makefile.in (DISTFILES): Include NEWS.
22663
22664 * Makefile.in (DISTFILES):
22665 Include install-sh, not install.sh.
22666
22667 * configure.in: Update to Autoconf v2 macro names.
22668
22669 1994-10-05 David J. MacKenzie <djm@gnu.org>
22670
22671 * Makefile.in: fix typo
22672
22673 * Makefile.in (prefix, exec_prefix):
22674 Let configure set them.
22675
22676 1994-09-28 David J. MacKenzie <djm@gnu.org>
22677
22678 * Makefile.in: Set datadir to $(prefix)/share.
22679
22680 1994-09-15 Richard Stallman <rms@gnu.org>
22681
22682 * src/bison.s1:
22683 Update copyright notice and GPL version.
22684
22685 1994-09-15 Richard Stallman <rms@gnu.org>
22686
22687 * bison.simple:
22688 Update copyright notice and GPL version.
22689
22690 1994-07-12 Richard Stallman <rms@gnu.org>
22691
22692 * src/reduce.c, src/reader.c:
22693 entered into RCS
22694
22695 1994-05-05 David J. MacKenzie <djm@gnu.org>
22696
22697 * Makefile.in: entered into RCS
22698
22699 1994-03-26 Richard Stallman <rms@gnu.org>
22700
22701 * src/bison.s1: entered into RCS
22702
22703 1994-03-26 Richard Stallman <rms@gnu.org>
22704
22705 * bison.simple: entered into RCS
22706
22707 1994-03-25 Richard Stallman <rms@gnu.org>
22708
22709 * src/main.c: entered into RCS
22710
22711 1994-03-24 Richard Stallman <rms@gnu.org>
22712
22713 * src/conflicts.c: entered into RCS
22714
22715 1994-01-02 Richard Stallman <rms@gnu.org>
22716
22717 * Makefile.in: *** empty log message ***
22718
22719 1993-11-21 Richard Stallman <rms@gnu.org>
22720
22721 * src/bison.s1: *** empty log message ***
22722
22723 1993-11-21 Richard Stallman <rms@gnu.org>
22724
22725 * doc/bison.texinfo: entered into RCS
22726
22727 * doc/bison.texinfo: *** empty log message ***
22728
22729 1993-11-21 Richard Stallman <rms@gnu.org>
22730
22731 * bison.simple: *** empty log message ***
22732
22733 1993-10-25 David J. MacKenzie <djm@gnu.org>
22734
22735 * doc/bison.texinfo: *** empty log message ***
22736
22737 1993-10-19 Richard Stallman <rms@gnu.org>
22738
22739 * src/bison.s1: *** empty log message ***
22740
22741 1993-10-19 Richard Stallman <rms@gnu.org>
22742
22743 * bison.simple: *** empty log message ***
22744
22745 1993-10-14 Richard Stallman <rms@gnu.org>
22746
22747 * src/bison.s1: *** empty log message ***
22748
22749 1993-10-14 Richard Stallman <rms@gnu.org>
22750
22751 * bison.simple: *** empty log message ***
22752
22753 1993-09-14 David J. MacKenzie <djm@gnu.org>
22754
22755 * doc/bison.texinfo: *** empty log message ***
22756
22757 1993-09-13 Noah Friedman <friedman@gnu.org>
22758
22759 * Makefile.in: *** empty log message ***
22760
22761 1993-09-10 Richard Stallman <rms@gnu.org>
22762
22763 * src/conflicts.c: *** empty log message ***
22764
22765 * src/system.h: entered into RCS
22766
22767 1993-09-10 Richard Stallman <rms@gnu.org>
22768
22769 * doc/bison.1: entered into RCS
22770
22771 1993-09-06 Noah Friedman <friedman@gnu.org>
22772
22773 * src/version.c: entered into RCS
22774
22775 1993-09-06 Noah Friedman <friedman@gnu.org>
22776
22777 * Makefile.in: *** empty log message ***
22778
22779 1993-07-30 David J. MacKenzie <djm@gnu.org>
22780
22781 * Makefile.in: *** empty log message ***
22782
22783 1993-07-24 Richard Stallman <rms@gnu.org>
22784
22785 * src/bison.s1: *** empty log message ***
22786
22787 1993-07-24 Richard Stallman <rms@gnu.org>
22788
22789 * bison.simple: *** empty log message ***
22790
22791 1993-07-08 David J. MacKenzie <djm@gnu.org>
22792
22793 * Makefile.in: *** empty log message ***
22794
22795 1993-07-04 Richard Stallman <rms@gnu.org>
22796
22797 * src/bison.s1: *** empty log message ***
22798
22799 1993-07-04 Richard Stallman <rms@gnu.org>
22800
22801 * bison.simple: *** empty log message ***
22802
22803 1993-06-26 David J. MacKenzie <djm@gnu.org>
22804
22805 * src/getargs.c: entered into RCS
22806
22807 1993-06-26 David J. MacKenzie <djm@gnu.org>
22808
22809 * doc/bison.texinfo: *** empty log message ***
22810
22811 * doc/bison.1: New file.
22812
22813 1993-06-25 Richard Stallman <rms@gnu.org>
22814
22815 * src/getargs.c: New file.
22816
22817 1993-06-16 Richard Stallman <rms@gnu.org>
22818
22819 * src/bison.s1: *** empty log message ***
22820
22821 1993-06-16 Richard Stallman <rms@gnu.org>
22822
22823 * bison.simple: *** empty log message ***
22824
22825 1993-06-03 Richard Stallman <rms@gnu.org>
22826
22827 * src/bison.s1: New file.
22828
22829 1993-06-03 Richard Stallman <rms@gnu.org>
22830
22831 * doc/bison.texinfo: *** empty log message ***
22832
22833 1993-06-03 Richard Stallman <rms@gnu.org>
22834
22835 * bison.simple: New file.
22836
22837 1993-05-19 Richard Stallman <rms@gnu.org>
22838
22839 * doc/bison.texinfo: New file.
22840
22841 1993-05-07 Noah Friedman <friedman@gnu.org>
22842
22843 * Makefile.in: *** empty log message ***
22844
22845 1993-04-28 Noah Friedman <friedman@gnu.org>
22846
22847 * src/reader.c: *** empty log message ***
22848
22849 1993-04-23 Noah Friedman <friedman@gnu.org>
22850
22851 * src/alloc.h: entered into RCS
22852
22853 1993-04-20 David J. MacKenzie <djm@gnu.org>
22854
22855 * src/version.c: *** empty log message ***
22856
22857 * src/files.c, src/allocate.c:
22858 entered into RCS
22859
22860 * src/reader.c: *** empty log message ***
22861
22862 * src/lex.c: entered into RCS
22863
22864 * src/conflicts.c: New file.
22865
22866 * src/symtab.c: entered into RCS
22867
22868 * src/alloc.h: New file.
22869
22870 * src/LR0.c: entered into RCS
22871
22872 1993-04-18 Noah Friedman <friedman@gnu.org>
22873
22874 * src/reader.c: New file.
22875
22876 * src/version.c: *** empty log message ***
22877
22878 1993-04-18 Noah Friedman <friedman@gnu.org>
22879
22880 * Makefile.in: *** empty log message ***
22881
22882 1993-04-17 Noah Friedman <friedman@gnu.org>
22883
22884 * Makefile.in: *** empty log message ***
22885
22886 1993-04-15 Richard Stallman <rms@gnu.org>
22887
22888 * src/main.c, src/files.c:
22889 New file.
22890
22891 1993-04-15 Noah Friedman <friedman@gnu.org>
22892
22893 * configure.in: entered into RCS
22894
22895 * configure.in: *** empty log message ***
22896
22897 * configure.in: New file.
22898
22899 1993-04-14 Richard Stallman <rms@gnu.org>
22900
22901 * Makefile.in: New file.
22902
22903 1993-04-13 Richard Stallman <rms@gnu.org>
22904
22905 * src/version.c: New file.
22906
22907 1993-03-25 Richard Stallman <rms@gnu.org>
22908
22909 * src/output.c: entered into RCS
22910
22911 1992-09-25 Richard Stallman <rms@gnu.org>
22912
22913 * configure.bat: entered into RCS
22914
22915 1992-06-22 Richard Stallman <rms@gnu.org>
22916
22917 * src/vmsgetargs.c: entered into RCS
22918
22919 1992-06-22 Richard Stallman <rms@gnu.org>
22920
22921 * doc/bison.rnh: entered into RCS
22922
22923 1992-04-20 David J. MacKenzie <djm@gnu.org>
22924
22925 * README: entered into RCS
22926
22927 1992-01-22 Richard Stallman <rms@gnu.org>
22928
22929 * src/machine.h: entered into RCS
22930
22931 1991-12-21 Richard Stallman <rms@gnu.org>
22932
22933 * src/lalr.c, src/closure.c:
22934 entered into RCS
22935
22936 1991-12-20 Richard Stallman <rms@gnu.org>
22937
22938 * src/state.h: entered into RCS
22939
22940 1991-12-18 Richard Stallman <rms@gnu.org>
22941
22942 * src/print.c, src/nullable.c, src/derives.c:
22943 entered into RCS
22944
22945 1991-11-03 David J. MacKenzie <djm@gnu.org>
22946
22947 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22948 entered into RCS
22949
22950 1988-09-09 Richard Stallman <rms@gnu.org>
22951
22952 * src/bison.hairy: entered into RCS
22953
22954 1987-12-16 Richard Stallman <rms@gnu.org>
22955
22956 * REFERENCES: entered into RCS
22957
22958
22959 -----
22960
22961 Copyright (C) 1987-1988, 1991-2010 Free Software Foundation,
22962 Inc.
22963
22964 Copying and distribution of this file, with or without
22965 modification, are permitted provided the copyright notice and this
22966 notice are preserved.