]> git.saurik.com Git - bison.git/blob - ChangeLog
POSIX: warn if %prec's token was not defined.
[bison.git] / ChangeLog
1 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
2
3 POSIX: warn if %prec's token was not defined.
4 Reported by Florian Krohm at
5 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
6 * NEWS (2.4.2): Document.
7 * src/reader.c (grammar_rule_check): Implement.
8 (grammar_current_rule_prec_set): Add comments explaining that we
9 here assume a %prec identifier is a token, but we still manage
10 to support POSIX.
11 * tests/input.at (%prec's token must be defined): New test
12 group.
13
14 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
15
16 * HACKING (Release Procedure): Recommend a secure automake.
17
18 2008-12-11 Akim Demaille <demaille@gostai.com>
19
20 Propagate i18n changes into glr.c.
21 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
22 building the error message format dynamically.
23 * data/lalr1.java: Formatting changes.
24
25 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
26
27 Port small part of master's 11707b2b so future ports are easier.
28 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
29
30 2008-12-11 Akim Demaille <demaille@gostai.com>
31
32 Simplify the i18n of the error messages.
33 * data/lalr1.cc: Comment changes.
34
35 2008-11-11 Akim Demaille <demaille@gostai.com>
36
37 Prefer M4 to CPP.
38 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
39 YYERROR_VERBOSE.
40
41 2008-11-11 Akim Demaille <demaille@gostai.com>
42
43 Support i18n of the parse error messages.
44 * TODO (lalr1.cc/I18n): Remove.
45 * data/lalr1.cc (yysyntax_error_): Support the translation of the
46 error messages, as done in yacc.c.
47 Stay within the yy* pseudo namespace.
48
49 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
50
51 Port small part of master's 8901f32e so future ports are easier.
52 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
53 argument, but name it in the function definition only when
54 verbose error messages are enabled and it'll thus be used.
55 (yy::parser::parse): Update use of yysyntax_error_.
56
57 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
58
59 portability: `<' and `>' are not always defined on addresses.
60 Specifically, don't sort objects by their memory addresses when
61 they're not allocated in the same array or other object. Though
62 I haven't found a test case where that fails on my platform, C
63 says the behavior is undefined.
64 * src/AnnotationList.c (AnnotationList__insertInto): Remove
65 FIXME. Use new id field of InadequacyList nodes rather than
66 their memory addresses when sorting.
67 (AnnotationList__compute_from_inadequacies): Add
68 inadequacy_list_node_count argument to pass to
69 InadequacyList__new_conflict.
70 * src/AnnotationList.h
71 (AnnotationList__compute_from_inadequacies): Update prototype
72 and documentation for new argument.
73 * src/InadequacyList.c (InadequacyList__new_conflict): Add
74 node_count argument and use it to assign a unique ID.
75 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
76 (InadequacyList): Add id field.
77 (InadequacyList__new_conflict): Update prototype and
78 documentation for new argument.
79 * src/ielr.c (ielr_compute_annotation_lists): Update
80 AnnotationList__compute_from_inadequacies invocation.
81
82 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
83
84 Fix handling of yychar manipulation in user semantic actions.
85 The problem was that yacc.c didn't always update the yychar
86 translation afterwards. However, other skeletons appear to be
87 fine. glr.c appears to already translate yychar before every
88 use. lalr1.cc does not define yychar and does not document its
89 replacement, yyla, for users. It does provide yyclearin, but
90 that does not manipulate yyla and thus requires no translation
91 update. In lalr1.java, yychar is out of scope during semantic
92 actions.
93 * NEWS (2.5): Document.
94 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
95 yytoken here.
96 (yyparse, yypush_parse): Instead, translate before every use of
97 yytoken, and add comments explaining this approach.
98 * tests/actions.at (Destroying lookahead assigned by semantic
99 action): New test group checking that translation happens before
100 lookahead destructor calls at parser return. Previously,
101 incorrect destructors were called.
102 * tests/conflicts.at (%error-verbose and consistent
103 errors): New test group checking that translation happens at
104 syntax error detection before the associated verbose error
105 message and the associated lookahead destructor calls. While
106 the destructor call is fixed by this patch, the verbose error
107 message is currently incorrect due to another bug (see
108 comments in test group), so this is an expected failure for now.
109
110 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
111
112 YYFAIL: warn about uses and remove from lalr1.java.
113 * NEWS (2.5): Document.
114 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
115 and make it private. Update all uses.
116 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
117
118 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
119
120 YYFAIL: deprecate.
121 * NEWS (2.4.2): Document deprecation and the phase-out plan.
122 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
123 deprecation.
124 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
125 YYFAIL from GCC cpp's -Wunused-macros.
126 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
127 documentation.
128 (LocalWords): Remove YYFAIL.
129
130 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
131
132 Code cleanup.
133 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
134 function, which is no longer used.
135
136 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
137
138 Add gcc's -Wundef to test suite and fix another warning from it.
139 * NEWS (2.4.2): Update description of -Wundef fix.
140 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
141 (WARN_CFLAGS_TEST): New substitution.
142 * data/glr.c: Avoid warning about __STRICT_ANSI__.
143 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
144 WARN_CFLAGS.
145 (NO_WERROR_CFLAGS): Likewise.
146 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
147
148 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
149
150 * data/yacc.c: Reformat m4 a little.
151
152 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
153
154 Document gcc -Wundef fix.
155 * NEWS (2.4.2): Here.
156 * THANKS (Jonathan Nieder): Add.
157
158 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
159
160 Simplify y.tab.c when location tracking is disabled.
161 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
162 tracking is not enabled. Instead, unconditionally define
163 YY_LOCATION_PRINT as a no-op for backward compatibility.
164
165 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
166
167 Avoid warnings from gcc -Wundef y.tab.c.
168 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
169 defined before using them.
170 * data/lalr1.cc: Likewise.
171 * data/yacc.c: Likewise.
172
173 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
174
175 autoconf: update to latest for fix of M4 detection.
176 Reported by Eric Blake.
177 * submodules/autoconf: Update.
178
179 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
180
181 portability: use -DGNULIB_POSIXCHECK.
182 Reported by Eric Blake. See discussions at
183 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
184 and
185 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
186 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
187 * bootstrap.conf (gnulib_modules): Add all the printf modules
188 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
189 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
190 (excluded_files): Remove m4/printf-posix.m4.
191 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
192 lib/libbison.a so gnulib libraries can be linked.
193
194 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
195
196 Enable assertion output and --disable-assert for configure.
197 * bootstrap.conf (gnulib_modules): Add assert module.
198 * src/system.h (aver): Define as assert, and summarize the
199 discussion on this issue.
200
201 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
202
203 Expand GLR acronym in summary of Bison.
204 Based on discussion with Akim Demaille starting at
205 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
206 * doc/bison.texinfo (Introduction): Here.
207 * src/getargs.c (usage): Here.
208
209 2009-10-03 Alex Rozenman <rozenman@gmail.com>
210
211 Document named references.
212 * doc/bison.texinfo (Actions): Add new example and xref to
213 Using Named References node.
214 (Using Named References): New node.
215
216 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
217
218 cleanup.
219 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
220 of char*.
221 (Sbitset__isEmpty): Use Sbitset instead of char*.
222 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
223 instead of char. This helps to avoid casting errors.
224 (Sbitset__or): Use Sbitset instead of char*.
225
226 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
227
228 portability: don't assume 8-bit bytes.
229 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
230 * src/Sbitset.h (Sbitset__nbytes): Here.
231 (Sbitset__byteAddress): Here.
232 (Sbitset__bit_mask): Here.
233 (Sbitset__last_byte_mask): Here.
234 (Sbitset__ones): Here.
235 (SBITSET__FOR_EACH): Here.
236
237 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
238
239 portability: use va_start and va_end in the same function.
240 * src/complain.c (error_message): Move va_end from here...
241 (ERROR_MESSAGE): ... to here.
242
243 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
244
245 * data/bison.m4: Update comments for rename to muscle-tab.h.
246
247 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
248
249 Rename muscle_tab.* to muscle-tab.* for consistency with master.
250 * src/Makefile.am (bison_SOURCES): Update.
251 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
252 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
253 src/tables.c: Update include.
254 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
255 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
256 include.
257
258 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
259
260 Minor code cleanup.
261 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
262 replace all uses with UNIQSTR_CONCAT.
263 * src/uniqstr.c (uniqstr_vsprintf): New function.
264 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
265 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
266 macros.
267
268 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
269
270 Minor code cleanup.
271 * src/parse-gram.y: Clean up sorting of declarations.
272 Use types to simplify %printer declarations where possible.
273 Provide %printer for BRACKETED_ID and symbol.prec.
274 * src/symtab.c: Whitespace change.
275
276 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
277
278 tests: skip tests of file names that platform does not support.
279 Reported by Michael Raskin at
280 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
281 * THANKS (Michael Raskin): Add.
282 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
283 to fail at least for file names containing ":" or "\".
284
285 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
286
287 yysyntax_error: avoid duplicate lookahead collection.
288 Except when memory reallocation is required, this change
289 eliminates the need to invoke yysyntax_error twice and thus to
290 repeat the collection of lookaheads. It also prepares for
291 future extensions that will make those repetitions more
292 expensive and that will require additional memory management in
293 yysyntax_error. Finally, it fixes an obscure bug already
294 exercised in the test suite.
295 * data/yacc.c (yysyntax_error): Add arguments for message
296 buffer variables stored in the parser. Instead of size, return
297 status similar to yyparse status but indicating success of
298 message creation. Other than the actual reallocation of the
299 message buffer, import and clean up memory management code
300 from...
301 (yyparse, yypush_parse): ... here.
302 * tests/regression.at (%error-verbose overflow): No longer an
303 expected failure.
304
305 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
306
307 yysyntax_error: test memory management more.
308 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
309 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
310 New test group.
311 (%error-verbose overflow): New test group that reveals an
312 obscure bug. Expected fail for now.
313
314 2008-12-11 Akim Demaille <demaille@gostai.com>
315
316 Pass the token type to yysyntax_error.
317 * data/yacc.c (yysyntax_error): Take the transated token instead
318 of the raw number.
319 Adjust callers.
320
321 2008-12-11 Akim Demaille <demaille@gostai.com>
322
323 Simplify the i18n of the error messages.
324 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
325 of building dynamically the format string.
326
327 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
328
329 Remove dead code.
330 * src/symtab.c (symbol_pack): Here because every symbol's number
331 is always defined by this time.
332
333 2009-10-03 Alex Rozenman <rozenman@gmail.com>
334
335 Add additional space after periods in NEWS.
336 * NEWS (2.5): here.
337
338 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
339
340 Use the correct conversion specifier for size_t.
341 Reported by Jim Meyering.
342 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
343 because Sbitset__Index is size_t.
344 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
345
346 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
347
348 tests: don't abuse AT_BISON_CHECK.
349 * tests/regression.at (parse-gram.y: LALR = IELR): Move
350 additional shell commands outside of AT_BISON_CHECK.
351
352 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
353
354 tests: check that parse-gram.y's IELR and LALR are identical.
355 * tests/atlocal.in (abs_top_srcdir): New shell variable.
356 * tests/regression.at (parse-gram.y: LALR = IELR): New test
357 group.
358
359 2009-09-16 Akim Demaille <demaille@gostai.com>
360
361 doc: comment changes.
362 * doc/bison.texinfo: Comment changes.
363
364 2009-09-16 Akim Demaille <demaille@gostai.com>
365
366 doc: spell checking.
367 * doc/bison.texinfo: here.
368
369 2009-09-19 Alex Rozenman <rozenman@gmail.com>
370
371 Keep sub-messages aligned. Fix strings for translation.
372 * src/location.h (location_print): Add return value.
373 * src/location.c (location_print): Return number of printed
374 characters.
375 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
376 new functions.
377 * src/complain.cpp (indent_ptr): New static variable.
378 (error_message, complain_at_indent, warn_at_indent): Implement
379 the alignment mechanism.
380 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
381 for translations. Use new alignment mechanism.
382 * tests/named-ref.at: Adjust test-cases.
383 * NEWS (2.5): Add an announcement about named references.
384
385 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
386
387 tests: clean up push.at test group titles.
388 * tests/push.at: Remove "Push Parsing: " from test group titles
389 because these are already under the banner "Push Parsing Tests".
390
391 2009-09-12 Alex Rozenman <rozenman@gmail.com>
392
393 Provide an additional sub-message for clarity.
394 Add "symbol not found in production" error message when
395 an "invalid reference" is detected in named references
396 resolution.
397 * src/scan-code.l: Update "invalid reference" case.
398 * tests/named-ref.at: Adjust test-cases.
399
400 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
401
402 Clean up yacc.c a little.
403 * data/yacc.c: Clean up M4 for readability, and make output
404 whitespace more consistent. For the main parse function
405 comment, instead of saying "yyparse or yypush_parse", say either
406 "yyparse" or "yypush_parse" depending on which it actually is.
407
408 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
409
410 Complain about unused %define variables and %code qualifiers.
411 * NEWS (2.5): Document.
412 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
413 * doc/bison.texinfo (Decl Summary): Document complaint, and
414 improve %define documentation a little otherwise.
415 * tests/input.at (Reject unused %code qualifiers): Update.
416 (%define errors): Update.
417 (%define, --define, --force-define): Update.
418 (%define backward compatibility): Update.
419 (Unused %define api.pure): Update.
420 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
421
422 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
423
424 Use aver not assert.
425 * src/output.c: Don't include assert.h.
426 (output_skeleton): Use aver not assert.
427 * src/system.h (aver): In documentation of why, add links to
428 Paul Eggert's explanations in the mailing lists.
429
430 2009-09-05 Alex Rozenman <rozenman@gmail.com>
431
432 Use "Unresolved reference" error message when no symbols were found
433 in a symbolic reference resolution. Remove .expr and -expr from
434 the shown reference when the reference is unresolved.
435 * src/scan-code.l: Change the error message, adjust location columns,
436 rename variable "exact_mode" to "explicit_bracketing".
437 * tests/named-ref.at: Adjust existing tests and add a new one.
438
439 2009-09-03 Akim Demaille <demaille@gostai.com>
440
441 * NEWS (2.4.2): Add "Internationalization" item.
442
443 2009-09-03 Akim Demaille <demaille@gostai.com>
444
445 bootstrap: fix/improve find_tool.
446 * bootstrap (find_tool): Improve error messages.
447 Fix typo about find_tool_names.
448
449 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
450
451 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
452 See
453 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
454 * src/scan-code.h (code_props_rule_action_init): Rename
455 named_ref arg to name so it doesn't shadow named_ref type. This
456 makes it consistent with the function definition in scan-code.l
457 anyway.
458
459 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
460
461 %define: accept unquoted values.
462 * NEWS (2.5): Group all %define changes together, and document
463 this one. Remove quotes in IELR and canonical LR entry.
464 * doc/bison.texinfo: Remove quotes in most examples throughout.
465 (Decl Summary): Update %define documentation.
466 (Table of Symbols): Likewise.
467 * src/ielr.c (LrType): Update documentation.
468 * src/parse-gram.y (content.opt): Add production for ID.
469 * tests/calc.at: Remove quotes in most tests.
470 * tests/existing.at: Likewise.
471 * tests/input.at: Likewise.
472 * tests/local.at: Likewise.
473 * tests/push.at: Likewise.
474 * tests/reduce.at: Likewise.
475 * tests/torture.at: Likewise.
476
477 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
478
479 %define lr.type: make values lowercase IDs.
480 That is, "LALR" => "lalr", "IELR" => "ielr", and
481 "canonical LR" => "canonical-lr".
482 * NEWS (2.5): Update documentation.
483 * doc/bison.texinfo (Decl Summary): Likewise.
484 * src/ielr.c (ielr): Use new values.
485 * src/ielr.h (ielr): Update documentation.
486 * src/reader.c (prepare_percent_define_front_end_variables): Use
487 and validate new values.
488 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
489 grammars.
490 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
491
492 2009-08-27 Eric Blake <ebb9@byu.net>
493
494 scan-gram: avoid portability trap with ctype usage.
495 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
496 Avoid compiler warning.
497
498 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
499
500 tests: use perl for printing special sequences to files.
501 And skip tests if perl is not available. This is better than
502 playing tricks with shell portability. Suggested by Akim
503 Demaille.
504 * tests/input.at (Bad character literals): Use it here for
505 omitting final newlines.
506 (Bad escapes in literals): Use it here for special characters.
507
508 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
509
510 tests: show a use of %define lr.default-reductions "consistent"
511 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
512 prevents the omission of expected tokens for %error-verbose.
513
514 2009-08-26 Akim Demaille <demaille@gostai.com>
515
516 tests: portability fix.
517 * tests/input.at (Bad escapes in literals): Don't expect "echo
518 '\0'" to output \ then 0.
519
520 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
521
522 Actually handle the yytable zero value correctly this time.
523 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
524 mention zero values in the YYTABLE comments.
525 * data/glr.c (yytable_value_is_error): Don't check for zero
526 value.
527 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
528 * data/yacc.c (yytable_value_is_error): Likewise.
529 * data/lalr1.java (yy_table_value_is_error_): Likewise.
530 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
531 * src/tables.h: In header comments, explain why it's useless to
532 check for a zero value in yytable.
533
534 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
535
536 More fixes related to last two patches.
537 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
538 defined.
539 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
540 yytable comments: zero indicates syntax error not default
541 action.
542 * data/glr.c (yyis_pact_ninf): Rename to...
543 (yypact_value_is_default): ... this.
544 (yyisDefaultedState): Update for rename.
545 (yyis_table_ninf): Rename to...
546 (yytable_value_is_error): ... this, and check for value zero
547 besides just YYTABLE_NINF.
548 (yygetLRActions): Check for default value from yypact. It
549 appears that this check is always performed before this function
550 is invoked, and so adding the check here is probably redundant.
551 However, the code may evolve after this subtlety is forgotten.
552 Also, update for rename to yytable_value_is_error. Because that
553 macro now checks for zero, a different but equivalent branch of
554 the if-then-else here is evaluated.
555 (yyreportSyntaxError): Update for rename to
556 yytable_value_is_error. The zero condition was mishandled
557 before.
558 (yyrecoverSyntaxError): Update for renames. No behavioral
559 changes.
560 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
561 New function.
562 (yy_table_value_is_error_): New function.
563 (parse): Use new functions where possible. No behavioral
564 changes.
565 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
566 The zero condition was mishandled before.
567 * data/yacc.c (yyis_pact_ninf): Rename to...
568 (yypact_value_is_default): ... this.
569 (yyis_table_ninf): Rename to...
570 (yytable_value_is_error): ... this, and check for value zero
571 besides just YYTABLE_NINF.
572 (yysyntax_error): Update for rename to yytable_value_is_error.
573 The zero condition was mishandled before.
574 (yyparse): Update for renames. No behavioral changes.
575 * src/tables.h: Improve comments about yypact, yytable, etc.
576 more. Most importantly, say yytable value of zero means syntax
577 error not default action.
578
579 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
580
581 Fix %error-verbose for conflicts resolved by %nonassoc.
582 * NEWS (2.5): Document.
583 * data/glr.c (yyreportSyntaxError): Fix this by checking
584 yyis_table_ninf.
585 * data/yacc.c (yysyntax_error): Likewise.
586 * data/lalr1.cc (yysyntax_error_): Fix this by checking
587 yytable_ninf_.
588 * data/lalr1.java (yysyntax_error): Likewise.
589 * tests/conflicts.at (%nonassoc and eof): Update expected output
590 and remove FIXME.
591
592 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
593
594 Some code and documentation improvements.
595 * data/c.m4 (b4_table_value_equals): New macro to capture
596 some repeated code.
597 * data/glr.c (yyis_pact_ninf): Use it here.
598 (yyis_table_ninf): Likewise.
599 (yyreportSyntaxError): Improve internal comments.
600 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
601 Use it everywhere possible.
602 (yyis_table_ninf): Likewise.
603 (yysyntax_error): Improve internal comments.
604 * data/lalr1.cc (yysyntax_error_): Likewise.
605 * data/lalr1.java (yysyntax_error): Likewise.
606 * src/tables.h: Improve comments about yypact, yytable, etc.
607
608 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
609
610 Use locale when quoting.
611 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
612 quote rather than implementing quoting here.
613
614 2009-08-20 Eric Blake <ebb9@byu.net>
615
616 Make previous patch more robust.
617 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
618 argmatch.h.
619 (output_skeleton): Use it.
620 Suggested by Akim Demaille.
621
622 Import latest m4/m4.m4.
623 * submodules/autoconf: Update to autoconf 2.64.
624 * configure.ac (M4_GNU_OPTION): New define.
625 * src/output.c (output_skeleton): Use it to resolve FIXME.
626 * NEWS: Mention this.
627
628 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
629
630 Fix complaints about escape sequences.
631 Discussed starting at
632 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
633 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
634 For a \0 and similar escape sequences meaning the null
635 character, report an invalid escape sequence instead of an
636 invalid null character because the latter does not actually
637 appear in the user's input.
638 In all escape sequence complaints, don't escape the initial
639 backslash, and don't quote when the sequence appears at the end
640 of the complaint line unless there's whitespace that quotearg
641 won't escape.
642 Consistently say "invalid" not "unrecognized".
643 Consistently prefer "empty character literal" over "extra
644 characters in character literal" warning for invalid escape
645 sequences; that is, consistently discard those sequences.
646 * tests/input.at (Bad escapes in literals): New.
647
648 2009-08-19 Akim Demaille <demaille@gostai.com>
649
650 doc: fixes.
651 * doc/bison.texinfo: Fix minor Texinfo errors.
652
653 2009-08-19 Akim Demaille <demaille@gostai.com>
654
655 doc: %initial-action to initialize yylloc.
656 Reported by Bill Allombert.
657 * doc/bison.texinfo: Set fill-column to 76.
658 (Location Type): Document the use of %initial-action to initialize
659 yylloc.
660
661 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
662
663 maint: update for gnulib's recent update-copyright changes
664 * gnulib: Update.
665 * .x-update-copyright (COPYING): Add as it's no longer implied
666 when .x-update-copyright is present.
667 * cfg.mk (update-copyright-local): Remove, now ignored.
668 (update-copyright): Declare update-b4-copyright as a dependency.
669
670 2009-08-17 Akim Demaille <demaille@gostai.com>
671
672 build: require gettext 0.17.
673
674 Suggested by Bruno Haible.
675 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
676 * configure.ac: require gettext 0.17 to ensure compatibility with
677 gnulib.
678
679 2009-08-17 Akim Demaille <demaille@gostai.com>
680
681 build: lower gettext requirements.
682
683 Bison was uselessly requiring the formatstring macros from
684 gettext, which resulted in mo files not being installed on systems
685 that perfectly supported Bison mo files. Lower the requirement.
686 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
687
688 * configure.ac: Require need-ngettext instead of
689 need-formatstring-macros.
690 Reported by Martin Jabocs.
691 Suggested by Bruno Haible.
692 * INSTALL: Restructure.
693 (Internationalization): New.
694
695 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
696
697 maint: fix use of copyright year intervals.
698 * gnulib: Update.
699 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
700 as now recommended in gnulib/NEWS.
701 * build-aux/update-b4-copyright: Fix.
702 * cfg.mk (update-copyright-env): Configure update-copyright.
703
704 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
705
706 Make it easier to write deterministic tests.
707 Continues Akim's work from his 2009-06-10 commits.
708 * src/reader.c (check_and_convert_grammar): Don't add any
709 symbols after the first symbols_do invocation.
710 * src/symtab.c (symbols_sorted): New static global.
711 (user_token_number_redeclaration): Update comments.
712 (symbol_from_uniqstr): If a new symbol is being created, assert
713 that symbols_sorted hasn't been allocated yet.
714 (symbols_free): Free symbols_sorted.
715 (symbols_cmp, symbols_cmp_qsort): New functions.
716 (symbols_do): Sort symbol_table into symbols_sorted on first
717 invocation.
718 * tests/input.at (Numbered tokens): Recombine tests now that the
719 output should be deterministic across multiple numbers.
720
721 2009-08-12 Akim Demaille <demaille@gostai.com>
722
723 distcheck: fix.
724
725 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
726
727 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
728
729 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
730
731 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
732
733 Miscellaneous code readability improvements.
734
735 * src/reader.c (reader): Move %define front-end variable
736 defaults and checking into...
737 (prepare_percent_define_front_end_variables): ... this new
738 function.
739
740 * src/scan-gram.l (INITIAL): For consistency with string
741 literals, don't store open quote on character literal. It's
742 discarded before returning anyway.
743 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
744 Make length test more readable, and make the character stored
745 for an empty literal more obvious while consistent with the
746 previous behavior.
747
748 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
749 USER_NUMBER_HAS_STRING_ALIAS throughout.
750 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
751 that is repeated in symtab.h. Improve argument names to make it
752 clear which side of the symbol-string alias pair is which.
753 (symbol_check_alias_consistency): Improve local variable names
754 for the same purpose.
755 * src/symtab.h (struct symbol): Make comments about aliases
756 clearer.
757 (symbol_make_alias): Improve comments and argument name.
758 * src/output.c (token_definitions_output): Update for rename to
759 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
760
761 2009-08-08 Alex Rozenman <rozenman@gmail.com>
762
763 Convert "misleading reference" messages to warnings.
764 * src/scan-code.l: New function 'show_sub_messages', more
765 factoring.
766 * tests/named-ref.at: Adjust tests.
767
768 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
769
770 maint: run "make update-copyright"
771
772 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
773
774 maint: make update-b4-copyright easier to use
775 * build-aux/update-b4-copyright: In warnings, report line
776 numbers rather than character positions.
777 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
778 that update-copyright runs it.
779 * gnulib: Update.
780
781 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
782
783 maint: clean up update-b4-copyright code
784 * build-aux/update-b4-copyright: Do not accept 2-digit
785 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
786 Don't accept a `[' in a b4_copyright argument.
787 Format code more consistently.
788 Don't assume b4*copyright never occurs.
789
790 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
791
792 maint: automate b4_copyright updates.
793 * Makefile.am (update-b4-copyright): New target rule.
794 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
795 * build-aux/update-b4-copyright: New.
796 * data/yacc.c: Remove stray characters around b4_copyright
797 invocations.
798
799 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
800
801 maint: automate annual package-wide copyright-year update.
802 * .x-update-copyright: New.
803 * Makefile.am (EXTRA_DIST): Remove maint.mk.
804 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
805 update-copyright. Remove gnumakefile, which is implied by
806 maintainer-makefile.
807 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
808 * gnulib: Update.
809 * maint.mk: Remove, now copied from gnulib.
810 * examples/extexi: Add missing "(C)" in copyright statement so
811 update-copyright can recognize it.
812 * src/LR0.h: Likewise.
813 * src/print.h: Likewise.
814 * src/print_graph.h: Likewise.
815 * src/gram.c: Add missing comma in copyright statement.
816 * src/gram.h: Likewise.
817
818 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
819
820 Fix "make distcheck".
821 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
822 of just calc.stamp.
823
824 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
825
826 Pacify "gcc -Wunused" for the input function from Flex.
827 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
828 and later.
829 * src/scan-code.l: Add "%option noinput", which I cannot find in
830 the Flex manual, but which Flex has supported since at least as
831 far back as 2.5.4. However, if any of our developers still use
832 Flex 2.5.4, they'll need to stop configuring with
833 --enable-gcc-warnings because "%option noinput" didn't work
834 correctly until Flex 2.5.6.
835 * src/scan-gram.l: Likewise.
836 * src/scan-skel.l: Likewise.
837
838 2009-07-31 Alex Rozenman <rozenman@gmail.com>
839
840 Fix --enable-gcc-warnings problems.
841 * src/reader.c: Adjust variable names.
842 * src/scan-code.l: Fix prototypes and adjust names.
843 * src/named-ref.c: Remove redundant "if".
844
845 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
846
847 Fix a --enable-gcc-warnings problem.
848 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
849 variable.
850
851 2009-07-24 Alex Rozenman <rozenman@gmail.com>
852
853 Fix some memory leaks.
854 * src/named-ref.c: Add a pointer check (named_ref_free).
855 * src/scan-code.l: New function (variant_table_free). Called in
856 code_scanner_free.
857 * src/symlist.c: Call to named_ref_free (symbol_list_free).
858
859 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
860
861 Warn about character literals not of length one.
862 * NEWS (2.5): Document.
863 * src/scan-gram.l (INITIAL): Remove comment that we don't check
864 the length.
865 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
866 * tests/input.at (Bad character literals): New test group.
867
868 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
869
870 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
871
872 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
873
874 Some M4 cleanup in the testsuite.
875 Suggested by Eric Blake at
876 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
877 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
878 complicate the code by distinguishing between a missing value
879 and an empty string value for an optional argument. This fix is
880 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
881 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
882 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
883 arguments are not needed because of the following changes.
884 Fix stale comments.
885 Bison developers should use GNU M4 and should not use
886 POSIXLY_CORRECT when building the test suite, so do not
887 complicate the code by avoiding $10 and above.
888 Do not quote an empty string value for an optional argument, and
889 do not distinguish between a missing value and an empty string
890 value.
891
892 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
893
894 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
895
896 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
897
898 Revert unnecessary column realignment in --help output.
899 Reported by Akim Demaille at
900 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
901 * src/getargs.c (usage): Here.
902
903 2009-07-04 Alex Rozenman <rozenman@gmail.com>
904
905 Alphabetical order in src/Makefile.am.
906 * src/Makefile.am: Adjust.
907
908 2009-07-04 Alex Rozenman <rozenman@gmail.com>
909
910 Style changes and factoring.
911 * src/named-ref.h: Add comments.
912 * src/parse-gram.y: Readability and style changes.
913 * src/reader.c: Factoring: assign_named_ref function.
914 * src/scan-code.l: Factoring and style changes. Rename
915 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
916 Use "unsigned" type for variant index. Improve readablity.
917 * src/scan-gram.l: Change error messages and add comments.
918 * src/symlist.h: symbol_list_null: New function decl.
919 * src/symlist.c: symbol_list_null: Implement here.
920 * tests/named-refs.at: Adjust for new error messages.
921
922 2009-06-29 Eric Blake <ebb9@byu.net>
923
924 scan-code: avoid compiler warnings
925 * src/scan-code.l (parse_named_ref): Use correct specifiers.
926
927 2009-06-29 Akim Demaille <demaille@gostai.com>
928
929 build: avoid concurrent extraction of calc++.
930 * examples/calc++/Makefile.am (calc.stamp): New.
931 Depend on it to create the sources of calc++ so that concurrent
932 builds don't launch several "extexi" in parallel.
933 Not only this is inefficient, this also builds incorrect sources
934 with several extractions mixed together.
935
936 2009-06-27 Alex Rozenman <rozenman@gmail.com>
937
938 Implement support for named symbol references.
939 * src/parse-gram.y: Add new syntax (named_ref.opt).
940 * src/reader.c: Store named refs in symbol lists.
941 * src/reader.h: New argument for symbol_append and
942 action_append functions.
943 * src/scan-code.h: Add new field (named_ref) into
944 code_props data structure. Keeps named ref of midrule
945 actions.
946 * src/scan-code.l: Support for named refs in semantic
947 action code. New function 'parse_named_ref'.
948 * src/scan-gram.l: Support bracketed id.
949 * src/symlist.c: Store named refs in symbol lists.
950 * src/symlist.h: New field in symbol list: named_ref.
951 * src/named-ref.h: New file, a struct for named_ref.
952 * src/named-ref.cp: New file, named_ref_new function.
953 * src/local.mk: Add two new files.
954 * tests/testsuite.at: Include new test group:
955 * tests/named-refs.at: this new file.
956
957 2009-06-25 Akim Demaille <demaille@gostai.com>
958
959 hash: check insertion for memory exhaustion.
960 * src/uniqstr.c (uniqstr_new): New.
961
962 2009-06-11 Akim Demaille <demaille@gostai.com>
963
964 style changes.
965 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
966 * src/print-xml.c: Style changes.
967 * tests/conflicts.at: Comment changes.
968
969 2009-06-11 Akim Demaille <demaille@gostai.com>
970
971 xml: beware of user strings used to give a %prec to rules.
972 * tests/conflicts.at (%prec with user strings): New.
973 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
974 XML output.
975
976 2009-06-11 Akim Demaille <demaille@gostai.com>
977
978 hash: check insertion for memory exhaustion.
979 * src/muscle-tab.c (muscle_insert, muscle_grow)
980 * src/state.c (state_hash_insert): Check the return value of
981 hash_insert.
982
983 2009-06-10 Akim Demaille <demaille@gostai.com>
984
985 deterministic test suite.
986 Some consistency checks on symbols are performed after all the
987 symbols were read, by an iteration over the symbol table. This
988 traversal is nondeterministic, which can be a problem for test
989 cases.
990 Avoid this.
991 Addresses another form of nondeterminism reported by Joel E. Denny.
992 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
993
994 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
995 test in two.
996 Use different file names for the three tests to make the
997 maintenance easier.
998
999 2009-06-10 Akim Demaille <demaille@gostai.com>
1000
1001 deterministic user-token-number redeclaration errors.
1002 Address nondeterminism reported by Joel E. Denny.
1003 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1004
1005 * src/uniqstr.h: Comment changes.
1006 * src/location.h (boundary_cmp, location_cmp): New.
1007 * src/symtab.c (user_token_number_redeclaration): New.
1008 (symbol_translation): Use it.
1009 * tests/input.at (Numbered tokens): Adjust the expected output.
1010
1011 2009-05-25 Akim Demaille <demaille@gostai.com>
1012
1013 gnulib: update.
1014 * gnulib: Update to latest.
1015 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1016 * m4/.gitignore: Regen.
1017 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1018 Call xalloc_die on hash_insert failures.
1019 Requested by the new __warn_unused_result__ attribute of
1020 hash_insert.
1021
1022 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1023
1024 Convert multiple variable definition warnings to complaints.
1025 * NEWS (2.5): Add a new entry for that change.
1026 * doc/bison.texinfo (Decl Summary): Update %define entry.
1027 (Bison Options): Update -D/--define/-F/--force-define entry.
1028 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
1029 * src/muscle_tab.h (muscle_percent_define_insert): Update
1030 comments.
1031 * tests/input.at (`%define errors'): Update.
1032 (`%define, --define, --force-define'): Update.
1033
1034 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1035
1036 -F/--force-define and relative %define/-D/--define priorities.
1037 * NEWS (2.5): Add documentation to -D/--define entry.
1038 * build-aux/cross-options.pl: Hard-code association of
1039 --force-define with %define.
1040 * doc/bison.texinfo (Decl Summary): In %define entry,
1041 cross-reference command-line options.
1042 (Bison Options): Add documentation to -D/--define entry.
1043 (Option Cross Key): Widen column for --force-define row.
1044 * src/getargs.c (usage): Document -F/--force-define. Realign
1045 options in output.
1046 (short_options, long_options, getargs): Parse -F/--force-define,
1047 and update muscle_percent_define_insert invocation.
1048 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
1049 (muscle_percent_define_insert): Add argument with that type.
1050 * src/muscle_tab.c (muscle_percent_define_insert): Implement
1051 -F/--force-define behavior and priorities.
1052 * src/parse-gram.y (prologue_declaration): Update
1053 muscle_percent_define_insert invocations.
1054 * tests/input.at (`%define, --define'): Rename to...
1055 (`%define, --define, --force-define'): ... this and extend.
1056
1057 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1058
1059 Update some comments to make sense for -D.
1060 * data/bison.m4 (b4_check_user_names): In header comments, say
1061 "user occurrence" instead of "grammar occurrence".
1062 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
1063 (muscle_percent_code_grow): Likewise just for consistency.
1064
1065 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1066
1067 * data/c++.m4: Update copyright year.
1068
1069 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1070
1071 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1072
1073 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1074
1075 Handle a trailing `:' in a user-supplied C++ namespace better.
1076 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1077 among the closing braces here. This fix might make the
1078 generated code easier to debug, but otherwise it should be
1079 insignificant because a trailing `:' is a C++ error already.
1080
1081 2009-05-19 Akim Demaille <demaille@gostai.com>
1082
1083 remove useless variable.
1084 * src/getargs.c (skeleton_arg): Remove now useless variable.
1085 Should help the compiler see that this printf-like call is sane.
1086
1087 2009-05-11 Akim Demaille <demaille@gostai.com>
1088
1089 doc: use C++ headers.
1090 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1091 headers.
1092
1093 2009-05-05 Akim Demaille <demaille@gostai.com>
1094
1095 fix hexadecimal token number support.
1096 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
1097
1098 2009-05-05 Akim Demaille <demaille@gostai.com>
1099
1100 tests: check token numbers.
1101 * tests/input.at (Numbered tokens): New.
1102
1103 2009-05-04 Akim Demaille <demaille@gostai.com>
1104
1105 bison: catch bad symbol names.
1106 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1107 * tests/input.at: Adjust.
1108
1109 2009-05-04 Akim Demaille <demaille@gostai.com>
1110
1111 space changes.
1112 * src/scan-gram.l: Untabify to be robust to zealous editors.
1113
1114 2009-05-04 Akim Demaille <demaille@gostai.com>
1115
1116 identifiers: dashes are letters.
1117 Dashes can now start identifiers (symbols and directives).
1118
1119 * src/scan-gram.l ({letter}): Add dash.
1120 ({id}): Remove it.
1121 * tests/input.at (Symbols): Adjust.
1122 Remove stray comment.
1123 * tests/regression.at (Invalid inputs): Adjust error message.
1124 * doc/bison.texinfo (Symbols): Update.
1125
1126 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1127
1128 Declare %code to be a permanent feature.
1129 * NEWS (2.4.2): Here.
1130 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1131 experimental.
1132 (Decl Summary): Likewise.
1133
1134 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1135
1136 Convert underscores to dashes in some %define variable names.
1137 For now, just api.push-pull and lr.keep-unreachable-states.
1138 Maintain old names for backward compatibility.
1139 * NEWS (2.5): Document.
1140 * data/c.m4 (b4_identification): Update comment.
1141 * data/yacc.c: Update access.
1142 * doc/bison.texinfo: Update.
1143 * etc/bench.pl.in (bench_grammar): Update use.
1144 * src/files.c (tr): Move to...
1145 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1146 think of a better place to expose it. My logic is that, for all
1147 uses of tr so far, command-line arguments can be involved, and
1148 getargs.h is already included.
1149 * src/main.c (main): Update access.
1150 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1151 variable names to new variable names before assigning value.
1152 * src/reader.c (reader): Update setting default.
1153 * tests/calc.at: Update uses.
1154 * tests/conflicts.at (Unreachable States After Conflict
1155 Resolution): Update use.
1156 * tests/input.at (%define enum variables): Update use.
1157 (%define backward compatibility): New test group.
1158 * tests/push.at: Update uses.
1159 * tests/reduce.at: Update uses.
1160 * tests/torture.at: Update uses.
1161
1162 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1163
1164 Set all front-end %define defaults in one place.
1165 * src/main.c (main): Move lr.keep_unreachable_states default...
1166 * src/reader.c (reader): ... to here.
1167
1168 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1169
1170 Rename lr.default_reductions to lr.default-reductions.
1171 * NEWS (2.5): Here.
1172 * doc/bison.texinfo: Here.
1173 * src/lalr.c (initialize_LA): Here.
1174 * src/print.c (print_reductions): Here.
1175 * src/reader.c (reader): Here.
1176 * src/tables.c (action_row): Here.
1177 * tests/input.at (%define enum variables): Here.
1178 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1179
1180 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1181
1182 Pacify ./configure --enable-gcc-warnings.
1183 * tests/input.at (Symbols): Prototype yyerror and yylex.
1184
1185 2009-04-21 Akim Demaille <demaille@gostai.com>
1186
1187 tests: check the use of dashes and periods in symbols.
1188 * tests/input.at (Symbol): New test group.
1189
1190 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1191
1192 Document how `%define "var" "value"' is not M4-friendly.
1193 * src/parse-gram.y (variable): In comments here.
1194
1195 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1196
1197 Add copyright updates missed during previous cherry pick.
1198 * src/output.c: Here.
1199 * src/parse-gram.y: Here.
1200 * src/scan-gram.l: Here.
1201
1202 2009-04-20 Akim Demaille <demaille@gostai.com>
1203
1204 variables: accept dashes.
1205 * src/scan-gram.l ({id}): Also accept dashes after the initial
1206 letter.
1207 ({directive}): Use {id}.
1208 * src/parse-gram.y: Comment and formatting changes.
1209 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1210 symbols.
1211 * src/complain.h, src/complain.c (yacc_at): New.
1212 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1213 symbol names.
1214 * src/output.c (token_definitions_output): Do not #define token
1215 names with dashes.
1216
1217 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1218
1219 Clean up recent patches a little.
1220 Reported by Akim Demaille.
1221 * doc/bison.texinfo (Understanding): Fix typos.
1222 * src/print.c (print_reductions): Don't use negated variable.
1223
1224 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1225
1226 List accepted values for a %define enum variable with an invalid value.
1227 Suggested by Akim Demaille at
1228 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1229 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1230 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
1231 * tests/input.at (%define lr.default_reductions invalid values): Merge
1232 into...
1233 (%define enum variables): ... here, and update output.
1234
1235 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1236
1237 Rename "default rule" to "default reduction".
1238 This includes changing variable names in code, changing
1239 comments, and renaming %define lr.default_rules to %define
1240 lr.default_reductions.
1241 * NEWS (2.5): Update IELR documentation.
1242 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
1243 Adjust YYDEFACT and yydefact_ documentation.
1244 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1245 and lr.type documentation. Make some other wording
1246 improvements.
1247 (Glossary): Adjust cross-references and Default Reduction
1248 definition.
1249 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1250 Remove a confusing comment pointed out by Akim Demaille.
1251 (initialize_LA): Adjust code.
1252 * src/print-xml.c (print_reductions): Adjust code.
1253 * src/print.c (print_reductions): Adjust code.
1254 * src/reader.c (reader): Adjust code.
1255 * src/tables.c (action_row): Adjust code.
1256 (token_actions): Adjust code.
1257 * src/tables.h: Adjust YYDEFACT documentation.
1258 * tests/input.at (%define lr.default_rules invalid values):
1259 Rename test group to...
1260 (%define lr.default_reductions invalid values): ... this, and
1261 update grammar file and expected output.
1262 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1263 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1264
1265 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1266
1267 Document %define lr.type and lr.default_rules.
1268 * NEWS (2.5): Add an entry.
1269 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1270 besides just LALR(1) and GLR(1).
1271 * doc/bison.texinfo (Introduction): Likewise.
1272 (Language and Grammar): Bison is no longer limited to LALR(1)
1273 restrictions.
1274 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1275 when trying to distinguish from GLR. Talk about LR(1) grammars
1276 rather than LALR(1) grammars.
1277 (Decl Summary): In %define api.push_pull entry, say it applies
1278 to deterministic parsers in C rather than LALR(1) parsers in C.
1279 Add lr.default_rules entry.
1280 Add lr.type entry.
1281 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1282 restrictions.
1283 (Generalized LR Parsing): Same changes as for the previous GLR
1284 section.
1285 (Memory Management): Say deterministic rather than LALR(1).
1286 (Understanding): Correct some bison output.
1287 Index discussion of "accepting state".
1288 Say deterministic rather than LALR(1).
1289 (Bison Options): In --yacc entry, say deterministic rather than
1290 LALR(1).
1291 In --report, --graph, and --xml entries, just don't mention
1292 LALR(1).
1293 (C++ Parsers): Say deterministic rather than LALR(1).
1294 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1295 (Glossary): Add Accepting State, Consistent State, Default Rule,
1296 and IELR(1) definitions.
1297 In Generalized LR (GLR) definition, make same changes as in
1298 previous GLR sections.
1299 In LALR(1) definition, say Bison uses LALR(1) by default rather
1300 than implying Bison is limited to LALR(1).
1301 (LocalWords): Add IELR.
1302
1303 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1304
1305 Finish implementing %define lr.type.
1306 Its value can be "LALR", "IELR", or "canonical LR".
1307 * lib/timevar.def (TV_IELR_PHASE1): New var.
1308 (TV_IELR_PHASE2): New var.
1309 (TV_IELR_PHASE3): New var.
1310 (TV_IELR_PHASE4): New var.
1311 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1312 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1313 Sbitset.h, ielr.h, and ielr.c.
1314 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1315 trace_types): Add trace_ielr.
1316 * src/lalr.h, src/lalr.c (ngotos): Export it.
1317 (F): Rename to...
1318 (goto_follows): ... this, update all uses, and export it.
1319 (set_goto_map): Export it.
1320 (map_goto): Export it.
1321 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1322 handled in ielr.
1323 (initialize_LA): Export it. Move lookback allocation to...
1324 (lalr): ... here because, for canonical LR, initialize_LA must
1325 be invoked but lookback and much of the rest of LALR isn't
1326 needed.
1327 * main.c (main): Instead of lalr, invoke ielr, which invokes
1328 lalr.
1329 * src/reader.c (reader): Default lr.type to "LALR".
1330 Default lr.default_rules to "accepting" if lr.type is "canonical
1331 LR". Leave the default as "all" otherwise.
1332 Check for a valid lr.type value.
1333 * src/state.h, src/state.c (struct state_list): Add state_list
1334 member.
1335 (state_new): Initialize state_list member to NULL.
1336 (state_new_isocore): New function, exported.
1337 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1338 exercises all values of lr.type.
1339 (GNU AWK Grammar): Rename test group to...
1340 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1341 AT_TEST_EXISTING_GRAMMAR.
1342 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1343 (GNU pic Grammar): Rename test group to...
1344 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1345 AT_TEST_EXISTING_GRAMMAR.
1346 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1347 all values of lr.type.
1348 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1349 (Lane Split): Likewise.
1350 (Complex Lane Split): Likewise.
1351 (Split During Added Lookahead Propagation): Likewise.
1352
1353 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1354
1355 Add new files for IELR and canonical LR implementation.
1356 * src/AnnotationList.c: New.
1357 * src/AnnotationList.h: New.
1358 * src/InadequacyList.c: New.
1359 * src/InadequacyList.h: New.
1360 * src/Sbitset.c: New.
1361 * src/Sbitset.h: New.
1362 * src/ielr.c: New.
1363 * src/ielr.h: New.
1364
1365 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1366
1367 Implement %define lr.default_rules.
1368 Its value describes the states that are permitted to contain
1369 default rules: "all", "consistent", or "accepting".
1370 * src/reader.c (reader): Default lr.default_rules to "all".
1371 Check for a valid lr.default_rules value.
1372 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1373 is "accepting", then only mark the accepting state as
1374 consistent.
1375 (initialize_LA): Tell state_lookahead_tokens_count whether
1376 lr.default_rules is "accepting".
1377 * src/tables.c (action_row): If lr.default_rules is not "all",
1378 then disable default rules in inconsistent states.
1379 * src/print.c (print_reductions): Use this opportunity to
1380 perform some assertions about whether lr.default_rules was
1381 obeyed correctly.
1382 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1383 helps with checking the parser tables for a grammar.
1384 * tests/input.at (%define lr.default_rules invalid values): New
1385 test group.
1386 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1387 AT_TEST_TABLES_AND_PARSE.
1388 (`no %define lr.default_rules'): New test group generated by
1389 AT_TEST_LR_DEFAULT_RULES.
1390 (`%define lr.default_rules "all"'): Likewise.
1391 (`%define lr.default_rules "consistent"'): Likewise.
1392 (`%define lr.default_rules "accepting"'): Likewise.
1393
1394 2009-04-20 Akim Demaille <demaille@gostai.com>
1395
1396 Consistently refer to Yacc, not YACC.
1397 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1398
1399 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1400
1401 Pacify make maintainer-check-posix.
1402 * tests/input.at (%define, --define): Move bison command-line
1403 options before grammar file name.
1404
1405 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1406
1407 Document semicolon warnings.
1408 * NEWS (2.5): Here.
1409
1410 2008-12-08 Akim Demaille <demaille@gostai.com>
1411
1412 Fix portability issue in the test suite.
1413 * tests/local.at (AT_MATCHES_CHECK): New.
1414 Based on Perl instead of Sed. Sed has too many portability
1415 pitfalls, not ever Sed is GNU Sed.
1416 * tests/actions.at (Fix user actions without a trailing semicolon):
1417 Use it.
1418
1419 2008-12-07 Di-an Jan <dianj@freeshell.org>
1420
1421 Implement the FIXME that ends an user action with a semicolon
1422 if it seems necessary.
1423 * src/scan-code.l (flex rules section): Flag cpp directive from
1424 any `#' to the first unescaped end-of-line. Semicolon is not
1425 needed after `;', `{', '}', or cpp directives and is needed after
1426 any other token (whitespaces and comments have no effect).
1427 * tests/actions.at (Fix user actions without a trailing semicolon):
1428 New test.
1429 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1430 to make user actions complete statements.
1431 Adjust column numbers in error messages.
1432 * tests/regression.at (Fix user actions without a trailing semicolon):
1433 Remove. Covered by new test.
1434
1435 2009-04-14 Akim Demaille <demaille@gostai.com>
1436
1437 doc: minor fixes.
1438 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1439 (Table of Symbols): Remove duplicate entry for %debug.
1440
1441 2009-04-10 Eric Blake <ebb9@byu.net>
1442
1443 submodules: update to latest
1444 * submodules/autoconf: Use latest upstream Autoconf.
1445
1446 2009-04-06 Eric Blake <ebb9@byu.net>
1447
1448 Work around autoconf 2.63b bug in testsuite.
1449 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1450 autoconf bug related to # in test.
1451
1452 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1453
1454 * NEWS (2.5): Describe new -D/--define feature.
1455
1456 2008-11-10 Akim Demaille <demaille@gostai.com>
1457
1458 --trace=muscles
1459 * src/getargs.h, src/getargs.c (trace_muscle): New.
1460 (trace_types, trace_args): Support it.
1461 * src/output.c (output_skeleton): Use it.
1462
1463 2008-11-10 Akim Demaille <demaille@gostai.com>
1464
1465 muscles_output.
1466 * src/output.c (muscles_output): New, extracted from...
1467 (output_skeleton): here.
1468 Adjust.
1469
1470 2008-11-21 Akim Demaille <demaille@gostai.com>
1471
1472 Display the changes in cross-options.texi.
1473 * build-aux/cross-options.pl ($sep): New, to separate items.
1474 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
1475 the changes.
1476
1477 2008-11-20 Di-an Jan <dianj@freeshell.org>
1478
1479 Improves options in the manual.
1480 * doc/bison.texinfo (-g, -x): Add space before argument.
1481 (Option Cross Key): Implement FIXME: listing directives also.
1482 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1483 (Short Option): Special case -d. Put arguments inside @option.
1484 (Bison Directive): Add column, automatically extracted from
1485 src/scan-gram.l (actual name passed as the first argument)
1486 with special case for %define.
1487 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
1488 to build-aux/cross-options.pl.
1489 * src/getargs.c (usage): Document limitations of cross-options.pl.
1490 * src/scan-gram.l: Likewise.
1491
1492 2009-02-25 Akim Demaille <demaille@gostai.com>
1493
1494 Copyright years.
1495 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1496
1497 2008-12-08 Akim Demaille <demaille@gostai.com>
1498
1499 Install autoconf as a submodule to get m4sugar.
1500 * .gitmodules: Add submodules/autoconf.
1501 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1502 submodules/autoconf.
1503
1504 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1505
1506 Simplify last patch slightly.
1507 * src/getargs.c (getargs): Here.
1508
1509 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1510
1511 Fix last warning from --enable-gcc-warnings.
1512 * src/getargs.c (getargs): Don't assign const address to non-const
1513 pointer.
1514
1515 2008-11-17 Di-an Jan <dianj@freeshell.org>
1516
1517 Handle --enable-gcc-warnings.
1518 * src/getargs.c (command_line_location): Set parameters to void.
1519
1520 2008-11-11 Akim Demaille <demaille@gostai.com>
1521
1522 AT_FULL_COMPILE.
1523 * tests/actions.at, tests/regression.at: Use it.
1524
1525 2008-11-07 Akim Demaille <demaille@gostai.com>
1526
1527 Pass command line location to skeleton_arg and language_argmatch.
1528 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1529 The location argument is now mandatory.
1530 Adjust all dependencies.
1531 (getargs): Use command_line_location.
1532
1533 2008-11-07 Akim Demaille <demaille@gostai.com>
1534
1535 -D, --define.
1536 * src/getargs.c (usage): Document -D.
1537 Fix help string for --locations.
1538 (command_line_location): New.
1539 (short_options, long_options, getargs): Support -D, --define.
1540 (getargs): Move -d support at the right place.
1541 * doc/bison.texinfo (Bison Options): Update.
1542 * tests/input.at (%define, --define): New.
1543
1544 2008-11-07 Akim Demaille <demaille@gostai.com>
1545
1546 Initialize the muscle table before parsing the command line.
1547 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1548 (getargs): Define file_name.
1549 * src/main.c (main): Initialize muscle_tab before calling
1550 getargs.
1551 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1552 its value is not available yet.
1553
1554 2008-11-09 Akim Demaille <demaille@gostai.com>
1555
1556 Require the generation of parse-gram.output.
1557 * src/Makefile.am (YACC): Pass --report=all.
1558
1559 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1560
1561 * NEWS (2.5): New stub.
1562
1563 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1564
1565 Fix options documentation.
1566 * build-aux/cross-options.pl: As in --help output, write optional
1567 arguments as [=ARG] not =[ARG].
1568 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1569
1570 2008-11-07 Akim Demaille <demaille@gostai.com>
1571
1572 Fix --help.
1573 * src/getargs.c (usage): Fix help string for -W.
1574
1575 2008-11-07 Akim Demaille <demaille@gostai.com>
1576
1577 Handle more general types of option arguments.
1578 * build-aux/cross-options.pl: The argument ends at the first
1579 space, not the first non-symbol character.
1580 Use @var for each word appearing the argument description.
1581
1582 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1583
1584 Remove spurious initial empty lines.
1585 * data/location.cc: End the @output lines with an @.
1586
1587 2008-11-04 Akim Demaille <demaille@gostai.com>
1588
1589 Remove spurious initial empty lines.
1590 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1591 * data/yacc.c: End the @output lines with an @.
1592
1593 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1594
1595 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1596 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1597 requirements for a correct m4 are stricter.
1598 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
1599 * configure.ac: Update to use AC_PROG_GNU_M4.
1600 Reported by Eric Blake.
1601
1602 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1603
1604 Help with updating web manual.
1605 * HACKING: Incorporate instructions from gnulib/doc/README.
1606 * bootstrap.conf (gnulib_modules): Add gendocs.
1607
1608 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1609
1610 Fix strange %define locations for default values.
1611 Reported by Akim Demaille at
1612 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1613 and discussed again starting at
1614 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1615 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1616 because location information is bogus.
1617 Use angle brackets to delimit fake file name because square brackets
1618 look like underexpanded m4. Choose a better fake file name.
1619 Use negative line numbers.
1620 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1621 * src/location.c (location_print): If line for a boundary is negative,
1622 only print that boundary's file name.
1623 * src/location.h: Document that.
1624 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1625 defaults): Update output.
1626
1627 2008-11-07 Akim Demaille <demaille@gostai.com>
1628
1629 Locations without columns for command line arguments.
1630 * src/location.c (location_print): Don't display negative columns.
1631 * src/location.h: Document this.
1632
1633 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1634
1635 Add reminder about uploading public key to keys.gnupg.net.
1636 * HACKING (Release Procedure): Here.
1637
1638 2009-03-31 Akim Demaille <demaille@gostai.com>
1639
1640 bootstrap: --help to stdout.
1641 * bootstrap (usage): Don't send --help to stderr.
1642 Use a here doc instead of a long string.
1643
1644 2009-03-31 Akim Demaille <demaille@gostai.com>
1645
1646 bootstrap: README-hacking no longer exists
1647 * bootstrap (checkout_only_file): Set to HACKING.
1648
1649 2009-03-26 Akim Demaille <demaille@gostai.com>
1650
1651 doc: merge HACKING and README-hacking.
1652 Two files is confusing.
1653 Reported by Alexandre Duret-Lutz.
1654
1655 * README-hacking: Merge into...
1656 * HACKING (Working from the repository): here.
1657
1658 2009-03-26 Akim Demaille <demaille@gostai.com>
1659
1660 doc: update README-hacking.
1661 * README-hacking: We now use git and git submodules.
1662 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1663
1664 2009-03-26 Akim Demaille <demaille@gostai.com>
1665
1666 lalr1.cc: avoid GCC 4.3 warnings.
1667 GCC 4.3 now warns about "a || b && c" and asks for explicit
1668 parentheses.
1669 Reported by Alexandre Duret-Lutz.
1670 * data/location.cc: Update copyright years.
1671 (Position::operator==): Use parens to make precedence explicit.
1672 Compare lines and columns first, as they are more likely to be
1673 different, and they are faster to compare.
1674
1675 2009-03-26 Akim Demaille <demaille@gostai.com>
1676
1677 gnulib: update.
1678 * gnulib: Update to latest.
1679 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
1680 use +=.
1681
1682 2009-01-08 Akim Demaille <demaille@gostai.com>
1683
1684 Fix grep portability issues.
1685 Grep on Solaris does not support -q.
1686 Reported by Summum Bonum.
1687
1688 * NEWS: Add a stub for 2.4.2.
1689 * THANKS: Add Summum Bonum.
1690 * tests/atlocal.in (EGREP): New.
1691 (CC, CXX, XSLTPROC): Make it possible to override them via
1692 envvars.
1693 * tests/java.at: Use $EGREP instead of egrep.
1694 Use AT_CHECK's ignore instead of grep's -q.
1695
1696 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1697
1698 Version 2.4.1.
1699 * NEWS: Set version and date.
1700 * lib/Makefile.am: Update copyright year.
1701 * tests/atlocal.in: Update copyright year.
1702
1703 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1704
1705 Semicolon feature removal is not about future language support.
1706 * NEWS: The semicolon feature is no longer active for newer languages,
1707 so don't claim that it causes trouble for them.
1708
1709 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1710
1711 * gnulib: Update submodule to HEAD.
1712
1713 2008-12-09 Akim Demaille <demaille@gostai.com>
1714
1715 Update data/README.
1716 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1717
1718 2008-12-05 Eric Blake <ebb9@byu.net>
1719
1720 Build testsuite with newer autoconf.
1721 * tests/output.at (m4_expand): Don't override in newer autoconf,
1722 where the underlying implementation changed.
1723 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1724 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1725 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1726 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1727 since some of them contain unbalanced ')'.
1728
1729 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1730
1731 * NEWS: Clarify a little.
1732
1733 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1734
1735 * NEWS: Update for recent changes.
1736
1737 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1738
1739 Fix unexpanded macros in GLR defines file.
1740 Reported by Csaba Raduly at
1741 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1742 * THANKS (Csaba Raduly): Add.
1743 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1744 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1745 lexer in a separate module that includes the defines file.
1746 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
1747 source.
1748 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1749 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1750 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1751 (AT_DATA_SOURCE_PROLOGUE): New.
1752 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1753 (AT_DATA_SOURCE): New.
1754 (AT_FULL_COMPILE): New, copied from master branch and extended to
1755 support an additional source file.
1756
1757 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1758
1759 Don't let maintainer-*-check targets force a version update.
1760 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1761 handled.
1762
1763 2008-11-17 Di-an Jan <dianj@freeshell.org>
1764
1765 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1766 Align menus. Adjust word wrapping. Use node names for menu names.
1767 (Examples): Don't abbreviate node names.
1768 (LocalWords): Remove abbreviations.
1769 (Copying): Make description a sentence.
1770 (Java Action Features): Remove period to match the rest of menu.
1771
1772 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1773
1774 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1775 * configure.ac: Adjust usage.
1776 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1777 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1778 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1779
1780 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1781
1782 Don't add a semicolon to actions for %skeleton or %language.
1783 It breaks Java test cases as reported by Akim Demaille.
1784 * src/scan-code.l: Implement.
1785
1786 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1787
1788 Clean up %skeleton and %language priority implementation.
1789 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1790 remove static qualifier because others will soon need to see it.
1791 (language_prio): Likewise.
1792 (getargs): Use command_line_prio rather than 0.
1793 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1794 enum fields.
1795 (skeleton_prio): Extern it.
1796 (language_prio): Extern it.
1797 * src/parse-gram.y: Use grammar_prio rather than 1.
1798
1799 2008-11-04 Akim Demaille <demaille@gostai.com>
1800
1801 * NEWS: Mention the trailing semicolon in action.
1802
1803 2008-11-04 Akim Demaille <demaille@gostai.com>
1804
1805 Reformat NEWS.
1806 * NEWS: Use more outline-mode markup.
1807 Suggested by Jim Meyering.
1808
1809 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1810
1811 Fix user actions without a trailing semicolon.
1812 Reported by Sergei Steshenko at
1813 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1814 * THANKS (Sergei Steshenko): Add.
1815 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1816 * tests/regression.at (Fix user actions without a trailing semicolon):
1817 New test case.
1818
1819 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1820
1821 Initiate further development.
1822 * NEWS: Create an empty section for new entries.
1823 * gnulib: Update submodule to HEAD.
1824
1825 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1826
1827 * NEWS: Version 2.4.
1828
1829 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1830
1831 Prepare for next release.
1832 * NEWS: Briefly mention changes since 2.3b.
1833 * README: Say GNU m4 1.4.6, which we've been requiring in release
1834 announcements already, not 1.4.3, which breaks the build.
1835
1836 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1837
1838 Say %language is experimental.
1839 We're thinking of extending it's effect on output file naming. See the
1840 thread at
1841 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1842 * NEWS: Say it's experimental.
1843 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1844 recommend it over %skeleton for now.
1845 (Bison Options): Likewise.
1846 (C++ Bison Interface): Use %skeleton not %language.
1847 (Calc++ Parser): Use %skeleton not %language.
1848 * src/getargs.c (usage): Say it's experimental.
1849
1850 2008-11-01 Di-an Jan <dianj@freeshell.org>
1851 Paolo Bonzini <bonzini@gnu.org>
1852
1853 Support all Java parser class modifiers.
1854 * data/java.m4 (b4_percent_define_get3): New.
1855 (b4_final_if, b4_strictfp_if): New.
1856 * data/lalr1.java (final, strictfp, extends, implements): Support.
1857 * doc/bison.texinfo (final, strictfp, extends, implements): Add
1858 documentation.
1859 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
1860 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
1861 (AT_CHECK_JAVA_GREP): New.
1862 (Java parser class modifiers): New test.
1863 (Java parser class extends and implements): New test.
1864
1865 Model exception propagation better with throws and lex_throws.
1866 * data/java.m4 (b4_list2): New.
1867 (throws): Change default.
1868 * data/lalr1.java (yyaction): Add throws.
1869 (parse): Add lex_throws in addition to throws.
1870 * doc/bison.texinfo (throws, lex_throws): Add documentation.
1871 * tests/java.at (Java throws specifications): New test.
1872
1873 Improve documentation for Java parsers.
1874 * doc/bison.texinfo (Java Parsers): Add subsections.
1875 Don't quote first argument of %define.
1876 (Java Bison Interface): Document output files. Move documentation
1877 of parser class and merge into Java Parser Interface. Document
1878 features that error out. Document directives with no effect.
1879 Move note about Javadoc higher.
1880 (Java Semantic Values): Explicitly mention stype.
1881 Document that generic types cannot be used.
1882 (Java Location Values): Use @deftypeivar. Document constructors.
1883 Correct return value for toString.
1884 (Java Parser Interface): List undocumented constants/fields.
1885 Move documentation of fields added by %parse-param closer to list
1886 of members. Document that token names are added as fields.
1887 Document constructors accurately. Remove error method.
1888 (Java Scanner Interface): Move note on %pure-parser to Java Bison
1889 Interface. Describe %code lexer and yylex accutately.
1890 Remove documentation that does not match the code.
1891 (Java Action Features): New.
1892 (Java Differences): Add reference. Add item on semantic values.
1893 Add note about @{ ... @}. Clarify %% epilogue placement.
1894 (Java Declarations Summary): New.
1895
1896 Fix Java skeleton.
1897 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
1898 (b4_remove_comma): Quote test argument.
1899 (b4_identification): Remove "bison" field.
1900 * tests/java.at (Java parser class and package names): New test.
1901 (Java %parse-param and %lex-param): New test.
1902 (Java stype, position_class and location_class): New test.
1903
1904 2008-10-31 Di-an Jan <dianj@freeshell.org>
1905
1906 * data/lalr1.jave: Update copyright years.
1907 (YYParser): Correct name of "generated from" file in Javadoc:
1908 use b4_file_name instead of @ofile@.
1909 (Location constructor): Correct Javadoc parameter name.
1910 (yylloc): Add missing opening m4 quote after b4_location_if.
1911 This removes a stray [ in the Javadoc of Lexer.getStartPos.
1912 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
1913 (YYParser constructor): Correct Javadoc parameter name.
1914
1915 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
1916
1917 Always put auxiliary code files in the same dir as other output files.
1918 * src/files.c (compute_file_name_parts): When the user specifies
1919 --output but not --file-prefix, extract the directory prefix from the
1920 file prefix not from the grammar file name. This affects the location
1921 of files like location.hh generated by the C++ skeleton. The includes
1922 in the other output files require this fix.
1923 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
1924 for expected output files.
1925 (Output files): Add a test for the above.
1926
1927 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
1928
1929 * gnulib: Update submodule to HEAD.
1930
1931 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1932
1933 Update copyright year.
1934 * src/files.c: Here.
1935
1936 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
1937
1938 Don't overwrite the input file.
1939 * src/files.c (output_file_name_check): Fatal error if using input file
1940 for output.
1941 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
1942 argument.
1943 (Conflicting output files): Add test.
1944
1945 2008-10-28 Akim Demaille <demaille@gostai.com>
1946
1947 Space changes.
1948 * data/lalr1.cc: Formatting changes.
1949
1950 2008-10-28 Akim Demaille <demaille@gostai.com>
1951
1952 Don't define debugging functions when !YYDEBUG.
1953 * data/lalr1.cc (debug_stream, set_debug_stream)
1954 (debug_level_type, debug_level, set_debug_level): Don't
1955 declare them when YYDEBUG is not defined.
1956 The implementation are already YYDEBUG-aware.
1957
1958 2008-10-28 Akim Demaille <demaille@gostai.com>
1959
1960 Prefer "continue" for empty loop bodies.
1961 * etc/bench.pl.in: Use "continue" instead of {}.
1962
1963 2008-10-28 Akim Demaille <demaille@gostai.com>
1964
1965 Space and comments changes.
1966 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
1967 * data/c.m4, data/lalr1.cc: Space changes.
1968
1969 2008-10-28 Akim Demaille <demaille@gostai.com>
1970
1971 Make gnulib a submodule.
1972 * gnulib: New.
1973 * .gitmodules (gnulib): New.
1974
1975 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1976
1977 Fix yyerror_range for user-defined location type in C++. Reported by
1978 Georg Sauthoff at
1979 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
1980 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
1981 * THANKS (Georg Sauthoff): Add.
1982
1983 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1984
1985 Update several administrative files mainly to facilitate releasing.
1986 * HACKING (Administrivia): Make the git-merge-changelog notes more
1987 helpful.
1988 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
1989 (Release Procedure): Update for git and add numerous details that were
1990 previously missing.
1991 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
1992 * maint.mk (announcement): Don't list bison as a bootstrap tool so
1993 that announcements don't claim we bootstrapped with whatever bison
1994 happened to be in PATH. Add flex as a bootstrap tool.
1995 * Makefile.maint: Remove, previously replaced by maint.mk.
1996 * Makefile.cfg: Remove, and migrate settings to...
1997 * cfg.mk: ... here for the sake of `make announcement'.
1998 * bootstrap.conf (gnulib_modules): Add announce-gen.
1999 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2000 Berry.
2001
2002 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2003
2004 Small but important bugfixes for the Java skeleton.
2005 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2006 (yy_symbol_print): Call toString on yyvaluep.
2007
2008 2008-08-29 Akim Demaille <demaille@gostai.com>
2009
2010 Clarify UPDATED use.
2011 * doc/bison.texinfo: It refers to the last edition of this file,
2012 not to the release date of Bison.
2013 Reported by Joel E. Denny.
2014
2015 2008-08-29 Akim Demaille <demaille@gostai.com>
2016
2017 * README: Update FAQ pointer.
2018 Reported by Joel E. Denny.
2019
2020 2008-08-27 Eric Blake <ebb9@byu.net>
2021
2022 Resync m4sugar from autoconf.
2023 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2024 (m4_init): Adjust to latest m4.git changes.
2025 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2026 effects.
2027 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2028 (_m4_list_cmp): Reduce side effects.
2029
2030 2008-08-27 Akim Demaille <demaille@gostai.com>
2031
2032 Check yyerrok in calc.at.
2033 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2034 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2035 expected.
2036
2037 2008-08-27 Akim Demaille <demaille@gostai.com>
2038
2039 Support yyerrok in lalr1.cc.
2040 YYBACKUP is still to import back into lalr1.cc.
2041 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2042
2043 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2044
2045 For maintainer-check*, don't recompile for a $(VERSION) update.
2046 * cfg.mk: New file.
2047 (_is-dist-target): Override the one in GNUmakefile.
2048 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2049
2050 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2051
2052 Update for recent change to gnulib.
2053 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2054 string.h now.
2055
2056 2008-08-15 Eric Blake <ebb9@byu.net>
2057
2058 Remaining m4sugar merge from autoconf.
2059 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2060 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2061 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2062 * src/output.c (output_skeleton): Tell m4 how to find it.
2063
2064 Partial m4sugar merge from autoconf: m4_map.
2065 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2066 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2067 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2068 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2069 for empty list.
2070 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2071 Likewise.
2072 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2073 declares it.
2074
2075 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2076
2077 Keep .version and PACKAGE_VERSION in sync.
2078 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2079 dependency, and add comments justifying this in more detail. Discussed
2080 starting at
2081 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2082
2083 2008-08-06 Eric Blake <ebb9@byu.net>
2084
2085 Partial m4sugar merge from autoconf: m4_shiftn.
2086 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2087 (m4_shift2, m4_shift3): New macros.
2088 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2089 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2090 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2091 * data/java.m4 (b4_remove_comma): Likewise.
2092
2093 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2094 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2095 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2096 (m4_init): Consolidate wrapped text into single m4_wrap.
2097 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2098 in wrapped text.
2099
2100 2008-08-05 Eric Blake <ebb9@byu.net>
2101
2102 Partial m4sugar merge from autoconf: builtins, version.m4.
2103 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2104 (m4_prepend): Remove, as it is unused and inherently quadratic,
2105 whereas m4_append is linear in newer m4.
2106 (m4_mkstemp): New builtin.
2107 (m4_symbols): Make rename conditional.
2108 (m4_version_prereq): Ensure fatal error if used in bison, which
2109 intentionally lacks version.m4.
2110
2111 Fix comments in m4sugar.
2112 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2113
2114 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2115
2116 Update for recent .gitignore fix in Gnulib.
2117 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2118 anchored .gitignore entries.
2119
2120 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2121
2122 Set gnu or gnits strictness.
2123 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2124 development and gnits strictness for releases. Based on Eric Blake's
2125 suggestion at
2126 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2127
2128 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2129
2130 * NEWS: Clarify documentation of %language.
2131
2132 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2133
2134 Support usage of git-merge-changelog.
2135 * .gitattributes: New.
2136 * HACKING: Document usage of git-merge-changelog.
2137 * bootstrap: Install git-merge-changelog entries in .git/config
2138 if appropriate.
2139
2140 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2141
2142 Remove remaining dependence on CVS Id keyword.
2143 * ChangeLog: For the sake of people still using CVS, don't use dollars
2144 when mentioning Id.
2145 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2146 unusual anyway.
2147 * data/xslt/xml2dot.xsl: Likewise.
2148 * data/xslt/xml2text.xsl: Likewise.
2149 * data/xslt/xml2xhtml.xsl: Likewise.
2150 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2151 * doc/Makefile.am (neutralize): Remove, no longer needed.
2152 (.x.1): Don't use neutralize.
2153 (edit): Don't substitute for ID.
2154 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2155
2156 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2157
2158 Fix dependence on computed configure variables.
2159 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2160 $(top_srcdir)/configure.ac so that changes to computed variables, such
2161 as PACKAGE_VERSION, are seen.
2162 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2163
2164 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2165
2166 Update copyright dates for recent changes.
2167 * Makefile.am: Here.
2168 * src/Makefile.am: Here.
2169 * src/reduce.c: Here.
2170 * tests/reduce.at: Here.
2171
2172 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2173
2174 Use git-version-gen for version names between releases.
2175 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2176 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2177 * .prev-version: New.
2178 * .version.in: Remove.
2179 * ChangeLog: Remove the Id previously used for capturing the CVS
2180 revision.
2181 * GNUmakefile: Remove, now copied from Gnulib.
2182 * Makefile.am: Add code suggested by comments in
2183 build-aux/git-version-gen.
2184 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2185 .prev-version, and .version.
2186 * NEWS (2.3b+): Rename to...
2187 (?.?): ... this because we're dropping the "+" version naming scheme,
2188 but, in general, we still can't be sure of our next release name.
2189 * bootstrap: Add a quick hack to remove from .gitignore the
2190 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2191 entry. This should really be fixed in gnulib instead.
2192 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2193 * configure.ac (AC_INIT): Set version name by invoking
2194 build-aux/git-version-gen.
2195 (AC_CONFIG_FILES): Remove .version, now generated by
2196 build-aux/git-version-gen.
2197 * maint.mk: New, copied from coreutils.
2198 * doc/.cvsignore (bison.1): Add.
2199 * doc/.gitignore (/bison.1): Add.
2200 * doc/bison.1: Remove, generated.
2201 * src/.cvsignore (revision.c): Remove.
2202 * src/.gitignore (/revision.c): Remove.
2203 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2204 (BUILT_SOURCES): Remove revision.c.
2205 (revision.c): Remove.
2206 * src/getargs.c (version): Don't print revision after the VERSION.
2207 * src/revision.h: Remove.
2208
2209 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2210
2211 Fix untranslatable composition of sentences. Reported by Goran
2212 Uddeborg at
2213 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2214 * THANKS (Goran Uddeborg): Add.
2215 * src/reduce.c (reduce_print): Report the number of nonterminals and
2216 rules useless in the grammar in separate sentences.
2217 * tests/reduce.at (Useless Rules): Update output.
2218 (Reduced Automaton): Likewise.
2219 (Underivable Rules): Likewise.
2220 (Empty Language): Likewise.
2221
2222 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2223
2224 Fix some .gitignore and .cvsignore problems.
2225 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2226 (insert_vc_ignore): ... this new function, which prepends `/' to all
2227 .gitignore entries before passing them to insert_sorted_if_absent.
2228 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2229 .cvsignore files are maintained even though Bison developers run
2230 bootstrap while using Git.
2231 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2232 unneeded by Bison.
2233 (gnulib): Add.
2234 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2235 unneeded. Reported by Eric Blake.
2236 * lib/.gitignore (/*~): Add.
2237 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2238 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2239 Blake.
2240 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2241
2242 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2243
2244 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2245 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2246 * bootstrap.conf (gnulib_modules): Add unsetenv.
2247 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2248 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2249 (/setenv.m4): Add.
2250 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2251 the first argument because it may become position-dependent, and unset
2252 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2253 Add comments explaining these issues in more detail.
2254
2255 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2256
2257 Add .gitignore everywhere based on .cvsignore.
2258 * .gitignore: New.
2259 * build-aux/.gitignore: New.
2260 * data/.gitignore: New.
2261 * doc/.gitignore: New.
2262 * etc/.gitignore: New.
2263 * examples/.gitignore: New.
2264 * examples/calc++/.gitignore: New.
2265 * lib/.gitignore: New.
2266 * m4/.gitignore: New.
2267 * po/.gitignore: New.
2268 * runtime-po/.gitignore: New.
2269 * src/.gitignore: New.
2270 * tests/.gitignore: New.
2271
2272 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2273
2274 * NEWS (2.3b+): New section, empty for now.
2275 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2276
2277 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2278
2279 * NEWS (2.3b): Update release date since there has been a delay in
2280 getting the announcements and tarballs out.
2281
2282 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2283
2284 * NEWS: Version 2.3b.
2285 * configure.ac (AC_INIT): Likewise.
2286 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2287
2288 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2289
2290 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2291 been doing it for years.
2292 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2293 (Release Procedure): Add FIXME about make alpha being unmaintained.
2294
2295 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2296
2297 * data/yacc.c: Reformat m4 a little for readability.
2298 * src/lalr.c (build_relations): Correct comment.
2299
2300 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2301
2302 DJGPP specific issue.
2303 * djgpp/config.sed: Fixes required to run configure scripts generated
2304 by autoconf 2.62.
2305
2306 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2307
2308 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2309 coordinator@translationproject.org.
2310
2311 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2312
2313 * THANKS: Add Eric Blake.
2314
2315 2008-04-23 Eric Blake <ebb9@byu.net>
2316
2317 Revert prior patch, by working around autoconf regression.
2318 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2319 ("Output file name: ("): Uncomment test.
2320 ("Output file name: )"): Likewise.
2321 Based on an idea from Noah Misch.
2322
2323 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2324
2325 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2326 2.61. Reported by Juan Manuel Guerrero at
2327 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2328 * tests/output.at ("Output file name: ("): Comment out test case for
2329 now.
2330 ("Output file name: )"): Likewise.
2331
2332 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2333
2334 * GNUmakefile: Update git-version-gen invocation so make dist
2335 succeeds.
2336
2337 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2338
2339 Update to the current gnulib CVS repository, and fix trigraph handling
2340 in Bison.
2341 * bootstrap: Update gnulib CVS repository URL.
2342 (symlink_to_dir): Encapsulate the code that guarantees the destination
2343 directory exists into...
2344 (check_dst_dir): ... this new function, and...
2345 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2346 fail when copying files into lib/uniwidth/.
2347 * src/output.c (prepare_symbols): When writing yytname muscles, where
2348 symbol names will be encoded in C-string literals, tell quotearg to
2349 escape trigraphs. This used to be the default in gnulib.
2350 * tests/regression.at (Token definitions): Because of the change in
2351 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2352 escapes trigraphs in symbol names. Thus, yytname no longer has
2353 trigraphs unnecessarily doubly escaped. Update test case output.
2354 Extend test case to be sure Bison's own error messages will no longer
2355 have trigraphs in symbol names unnecessarily escaped once.
2356
2357 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2358
2359 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2360 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2361 * .cvsignore: Add .version.
2362 * .version.in: New.
2363 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2364 * configure.ac (AC_CONFIG_FILES): Add .version.
2365 * build-aux/.cvsignore: Add git-version-gen.
2366
2367 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2368
2369 * NEWS (2.3a+): Mention that -g now takes an argument.
2370 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2371 consistency. Update the -g and -x entries now that they take
2372 arguments. Use brackets to indicate optional arguments.
2373 * src/getargs.c (usage): Explain the relationship between arguments of
2374 long and short options more completely. Document --defines and -d
2375 separately since the former takes an argument but, for POSIX Yacc, the
2376 latter does not.
2377 (short_options): Let -W take an optional argument like --warnings.
2378 (getargs): Sort cases.
2379
2380 2008-02-28 Akim Demaille <demaille@gostai.com>
2381
2382 * doc/bison.texinfo: Fix a few typos.
2383
2384 2008-02-28 Akim Demaille <akim@epita.fr>
2385
2386 * doc/bison.texinfo (Bison Options): Document -W.
2387 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2388
2389 2008-02-28 Akim Demaille <akim@epita.fr>
2390
2391 * src/getargs.c (short_options): Split and sort for readability.
2392 -g and -x take optional arguments, just like their long options.
2393 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2394 understand.
2395 Fix the handling of $opt which resulted in all the argument to be
2396 considered as optional.
2397
2398 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2399
2400 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2401 say its interface is experimental.
2402 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2403 Java.
2404 (Bison Options): In the -L and --language entry, mention Java.
2405 (Java Bison Interface): Say the interface is experimental.
2406 * src/getargs.c (usage): Mention -L and --language.
2407
2408 * NEWS (2.3a+): Say the push parsing interface is experimental.
2409 * doc/bison.texinfo (Push Decl): Likewise.
2410 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2411 (Push Parser Function): Likewise.
2412 (Pull Parser Function): Likewise.
2413 (Parser Create Function): Likewise.
2414 (Parser Delete Function): Likewise.
2415 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2416 yypull_parse, and yypush_parse entries.
2417
2418 * NEWS (2.3a+): Mention XML support, and say the schema is
2419 experimental.
2420 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2421 * src/getargs.c (usage): Say the XML schema is experimental.
2422
2423 * NEWS (2.3a+): Say option instead of flag.
2424
2425 2008-02-21 Wojciech Polak <polak@gnu.org>
2426
2427 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2428 text.
2429
2430 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2431
2432 Fix impure push parser compile error reported by Bob Rossi at
2433 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2434 * data/yacc.c: Clean up whitespace in the output a little.
2435 (yypstate_allocated): Define for impure push parsers regardless of
2436 whether the pull interface is also requested.
2437 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2438 check impure push parsers without the pull interface.
2439
2440 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2441 yyerror takes arguments specified by %parse-param while yypstate_new
2442 does not.
2443 * doc/bison.texinfo (Parser Create Function): Document that
2444 yypstate_new returns 0 for multiple impure parser instances.
2445 * tests/push.at (Push Parsing: Multiple impure instances): Update
2446 expected stderr output.
2447
2448 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2449
2450 * runtime-po/POTFILES.in (push.c): Remove.
2451
2452 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2453
2454 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2455 * data/push.c: Rename to...
2456 * data/yacc.c: ... this, overwriting it.
2457 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2458 `%push-pull-parser' -> `%define api.push_pull "both"'.
2459 Remove old yacc.c tests, and update push.c tests to yacc.c.
2460
2461 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2462
2463 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2464 `"%code top" blocks' instead of `%code "top" blocks'.
2465 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2466 Clean up whitespace in the output a little.
2467
2468 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2469
2470 Fix documentation problems reported by Tim Josling at
2471 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2472 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2473 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2474 integers. Explain the effect of literal string aliases on error
2475 messages. Copy token 0 documentation from the C++ skeleton
2476 documentation.
2477
2478 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2479
2480 Accept a token number in a %left, %right, or %nonassoc for POSIX
2481 conformance. Reported by Tim Josling at
2482 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2483 * NEWS (2.3a+): Mention.
2484 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2485 and code numbers are treated by precedence declarations.
2486 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2487 of symbols.1.
2488 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2489 of symbol.
2490 (symbol.prec): New, just like symbol but allows INT.
2491 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2492 longer holds.
2493 * tests/regression.at (Token number in precedence declaration): New
2494 test case.
2495
2496 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2497
2498 DJGPP specific issues.
2499 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2500 be changed. Copyright timestamp adjusted.
2501 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2502 be changed. Copyright timestamp adjusted.
2503 * djgpp/config.site: Copyright timestamp adjusted.
2504 * djgpp/config_h.sed: Copyright timestamp adjusted.
2505 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2506 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2507 filename translation list.
2508 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2509 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2510 files shall be created. Before trying to use the temp dir where the
2511 environment variable points to check that the dir really exists. If
2512 not default to the cwd as temp dir. Copyright timestamp adjusted.
2513 * djgpp/subpipe.h: Copyright timestamp adjusted.
2514 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2515
2516 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2517
2518 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2519
2520 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2521
2522 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2523 Problem reported by Claudio Saavedra in
2524 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2525
2526 2008-01-05 Wojciech Polak <polak@gnu.org>
2527
2528 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2529 document's title with the input grammar file name.
2530
2531 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2532
2533 Automate regression testing of the XML/XSLT implementation. Discussed
2534 starting at
2535 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2536 * configure.ac (XSLTPROC): New substitution.
2537 * Makefile.am (maintainer-xml-check): New phony target invoking...
2538 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2539 invoking make maintainer-check with BISON_TEST_XML=1.
2540 * tests/atlocal.in (XSLTPROC): New.
2541 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2542 not to report reachable memory when Bison is expected to have a
2543 non-zero exit status and (2) to compare XML/XSLT output with --graph
2544 and --report=all output for every working grammar when
2545 BISON_TEST_XML=1.
2546 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2547 (AT_BISON_CHECK_XML): New.
2548 (AT_QUELL_VALGRIND): New.
2549 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2550 (AT_CHECK): ... don't redefine this since this was the old way to
2551 quell Valgrind.
2552 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2553 AT_BISON_CHECK invocations.
2554 * tests/c++.at: Likewise.
2555 * tests/calc.at: Likewise.
2556 * tests/conflicts.at: Likewise.
2557 * tests/cxx-type.at: Likewise.
2558 * tests/existing.at: Likewise.
2559 * tests/glr-regression.at: Likewise.
2560 * tests/headers.at: Likewise.
2561 * tests/input.at: Likewise.
2562 * tests/java.at: Likewise.
2563 * tests/output.at: Likewise.
2564 * tests/push.at: Likewise.
2565 * tests/reduce.at: Likewise.
2566 * tests/regression.at: Likewise.
2567 * tests/sets.at: Likewise.
2568 * tests/skeletons.at: Likewise.
2569 * tests/synclines.at: Likewise.
2570 * tests/torture.at: Likewise.
2571 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2572 tends to hang xsltproc.
2573 (Big horizontal): Likewise.
2574
2575 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2576
2577 In XML output, remove redundant class attribute on symbol element.
2578 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2579 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2580 look up a symbol to determine whether it's a nonterminal or terminal.
2581 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2582 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2583
2584 Add prec/assoc information to XML output.
2585 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2586 %prec, add a percent_prec attribute.
2587 * src/print-xml.c (print_grammar): For each terminal that has a
2588 precedence or associativity, add a prec or assoc attribute.
2589 (xml_indent): New.
2590 (xml_puts): Use xml_indent.
2591 (xml_printf): Use xml_indent.
2592 * src/print-xml.h (xml_indent): Prototype.
2593
2594 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2595 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2596
2597 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2598
2599 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2600 (bison:ruleByNumber): ... this for clarity.
2601 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2602 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2603 (xsl:template match="reduction"): Update.
2604 (xsl:template match="item"): Update.
2605 (xsl:template match="reduction"): Update.
2606
2607 In the XML output, don't print the list of rules where symbols appear.
2608 Compute it in XSLT instead. Discussed at
2609 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2610 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2611 (bison:ruleByRhs): New.
2612 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2613 bison:ruleByRhs.
2614 (xsl:template match="terminal/rule"): Remove.
2615 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2616 bison:ruleByRhs.
2617 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2618 Remove.
2619 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2620 bison:ruleByRhs and mode="number-link" for rule template.
2621 (xsl:template match="terminal/rule"): Remove.
2622 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2623 bison:ruleByRhs and mode="number-link" for rule template.
2624 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2625 Rewrite as...
2626 (xsl:template match="rule" mode="number-link"): ... this.
2627 * src/print-xml.c (print_grammar): Don't print the list of rules.
2628
2629 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2630
2631 Don't let --report affect XML output; always print all information.
2632 Discussed at
2633 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2634 * src/conflicts.c (log_resolution): Implement.
2635 * src/print-xml.c (print_core): Implement.
2636 (print_state): Implement.
2637 (print_xml): Implement.
2638
2639 * NEWS (2.3a+): Fix quotes.
2640 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2641 don't let %verbose clear the list specified by --report.
2642
2643 2007-11-26 Akim Demaille <akim@epita.fr>
2644
2645 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2646
2647 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2648
2649 In the XML output, list useless and unused symbols and rules with the
2650 useful ones and add a "usefulness" attribute. Discussed starting at
2651 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2652 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2653 (grammar_rules_print_xml): Print all rules instead of just those
2654 useful in the grammar, and add a "usefulness" attribute.
2655 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2656 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2657 (print_grammar): Print all nonterminals instead of just useful ones,
2658 and add a "usefulness" attribute to nonterminals and terminals.
2659 (print_xml): Don't print a separate "reductions" or
2660 "rules-useless-in-parser" element.
2661 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2662 (reduce_xml): Remove.
2663 (reduce_token_unused_in_grammar): New.
2664 (reduce_nonterminal_useless_in_grammar): New.
2665 * src/reduce.h (reduce_xml): Remove prototype.
2666 (reduce_token_unused_in_grammar): Add prototype.
2667 (reduce_nonterminal_useless_in_grammar): Add prototype.
2668 * data/xslt/xml2text.xsl: Update for XML changes.
2669 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2670 * tests/reduce.at (Useless Terminals): Update output.
2671 (Useless Rules): Update output.
2672 (Reduced Automaton): Update output.
2673
2674 Say "Terminals unused in grammar" instead of "Unused terminals".
2675 * NEWS (2.3a+): Update.
2676 * doc/bison.texinfo (Understanding): Update example output.
2677 * src/reduce.c (reduce_output): Implement.
2678 * data/xslt/xml2text.xsl: Implement.
2679 * data/xslt/xml2xhtml.xsl: Implement.
2680
2681 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2682
2683 Accept --report-file=FILE to override the default `.output' filename.
2684 * NEWS (2.3a+): Mention.
2685 * doc/bison.texinfo (Bison Options): Add an entry.
2686 * src/files.c (compute_output_file_names): Don't override
2687 spec_verbose_file if already set.
2688 * src/getargs.c (usage): Document --report-file.
2689 (REPORT_FILE_OPTION): New anonymous enum member.
2690 (long_options): Add entry for it.
2691 (getargs): Add case for it setting spec_verbose_file.
2692
2693 * build-aux/cross-options.pl: Don't record a short option just because
2694 there's an arg.
2695 * doc/.cvsignore: Add yacc.1.
2696
2697 2007-11-14 Akim Demaille <akim@epita.fr>
2698
2699 * doc/yacc.1.in: New.
2700 * configure.ac, doc/Makefile.am: Adjust.
2701 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2702 config.h symbol.
2703 Use AC_SUBST for assignments too.
2704 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2705
2706 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2707
2708 * src/gram.c: Remove comments that duplicate comments in gram.h.
2709
2710 When reporting useless rules and nonterminals, say "useless in grammar"
2711 instead of "useless", and say "useless in parser" instead of "never
2712 reduced". Discussed starting at
2713 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2714 * NEWS (2.3a+): Mention this change.
2715 * data/xslt/xml2text.xsl: Update output text and expected input XML
2716 element names to match changes below.
2717 * data/xslt/xml2xhtml.xsl: Likewise.
2718 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2719 Contents: "Rules useless in parser due to conflicts".
2720 * doc/bison.texinfo (Decl Summary): Reword a little.
2721 (Understanding): Update example output for changes below.
2722 * src/gram.c: (rule_useful_p): Rename to...
2723 (rule_useful_in_grammar_p): ... this.
2724 (rule_useless_p): Rename to...
2725 (rule_useless_in_grammar_p): ... this.
2726 (rule_never_reduced_p): Rename to...
2727 (rule_useless_in_parser_p): ... this.
2728 (grammar_rules_print): Update for renames.
2729 (grammar_rules_print_xml): Update for renames.
2730 (grammar_rules_never_reduced_report): Rename to...
2731 (grammar_rules_useless_report): ... this since it is used for either
2732 kind of useless rule.
2733 * src/gram.h: Reword comments and update function names in prototypes.
2734 * src/main.c (main): Say "rule useless in parser due to conflicts".
2735 * src/print-xml.c (print_rules_never_reduced): Rename to...
2736 (print_rules_useless_in_parser): ... this, and rename output XML
2737 element "rules-never-reduced" to "rules-useless-in-parser".
2738 (print_xml): Update for rename.
2739 * src/print.c (print_results): Say "Rules useless in parser due to
2740 conflicts".
2741 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2742 (nonterminals_reduce): Say "nonterminal useless in grammar".
2743 (reduce_output): Say "Nonterminals useless in grammar".
2744 Say "Rules useless in grammar".
2745 (reduce_xml): Rename output XML element "useless" to
2746 "useless-in-grammar".
2747 (reduce_print): Don't report the count of grammatically useless rules
2748 as "rules never reduced" just because %yacc is specified.
2749 In the correct report of this count, say nonterminal(s) and rule(s)
2750 "useless in grammar".
2751 * tests/conflicts.at (S/R in initial): Update expected output.
2752 (Defaulted Conflicted Reduction): Likewise.
2753 (Unreachable States After Conflict Resolution): Likewise.
2754 * tests/existing.at (GNU pic Grammar): Likewise.
2755 * tests/reduce.at (Useless Nonterminals): Likewise.
2756 (Useless Rules): Likewise.
2757 (Reduced Automaton): Likewise.
2758 (Underivable Rules): Likewise.
2759 (Empty Language): Likewise.
2760
2761 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2762
2763 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2764 here document and before the EOF so that BSD's implementation of Bourne
2765 shell doesn't parse the delimiter as part of the here document.
2766 * doc/.cvsignore: Add cross-options.texi.
2767 * src/getargs.c (usage): Add a blank line after the warning categories.
2768
2769 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
2770
2771 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2772
2773 2007-11-05 Akim Demaille <akim@epita.fr>
2774
2775 Remove Id: from bison.1.
2776 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2777 (perl -0777 -pi -e 's/\.PP\nId): New.
2778 (.x.1): Use it to ignore the version control revision.
2779
2780 2007-11-05 Akim Demaille <demaille@gostai.com>
2781
2782 * build-aux/Makefile.am: Ship cross-options.pl.
2783 * doc/Makefile.am: Always refer to cross-options.texi with
2784 $(srcdir).
2785 (MAINTAINERCLEANFILES): Add it.
2786
2787 2007-11-04 Akim Demaille <demaille@gostai.com>
2788
2789 Generate the long/short option cross-table.
2790 * build-aux/cross-options.pl: New.
2791 * doc/Makefile.am (cross-options.texi): New.
2792 * doc/bison.texinfo: Use it.
2793
2794 2007-11-04 Akim Demaille <demaille@gostai.com>
2795
2796 Generate bison.1 using help2man.
2797 * doc/common.x, doc/bison.x: New.
2798 * doc/Makefile.am (bison.1, .x.1): New.
2799 The code is taken from autoconf-2.61/man/Makefile.am.
2800 * configure.ac: Look for help2man.
2801
2802 2007-11-04 Akim Demaille <demaille@gostai.com>
2803
2804 Complete --help.
2805 * src/getargs.c (usage): Document -W, make it clear that -d,
2806 -g and -x have optional arguments.
2807
2808 2007-11-04 Akim Demaille <demaille@gostai.com>
2809
2810 Find sha1sum when named gsha1sum.
2811 * bootstrap (find_tool): New.
2812 ($SHA1SUM): New.
2813
2814 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2815
2816 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2817 at
2818 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2819 * NEWS (2.3a+): Mention.
2820 * data/bison.m4 (b4_pure_if): Don't define it here.
2821 * data/c.m4 (b4_identification): Depend on individual skeletons to
2822 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2823 values of the %define variables api.pure or api.push_pull. Define
2824 YYPURE, YYPUSH, and YYPULL accordingly.
2825 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2826 glr.cc has already defined b4_pure_flag.
2827 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2828 Remove YYPUSH and YYPULL since they're back in b4_identification again.
2829 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
2830 * doc/bison.texinfo (Pure Decl): Update.
2831 (Push Decl): Update.
2832 (Decl Summary): Add api.pure to %define entry.
2833 In %pure-parser entry, say it's deprecated and reference %define.
2834 (Pure Calling): Update.
2835 (Error Reporting): Update.
2836 (C++ Scanner Interface): Update.
2837 (How Can I Reset the Parser): Update.
2838 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2839 reference %define.
2840 * src/getargs.c (pure_parser): Remove global variable.
2841 * src/getargs.h (pure_parser): Remove extern.
2842 * src/output.c (prepare): Don't define pure_flag muscle.
2843 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2844 wrapper around `%define api.pure'.
2845 * tests/calc.at (Simple LALR Calculator): Update.
2846 (Simple GLR Calculator): Update.
2847 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
2848 Update.
2849 (GLR: Resolve ambiguity, pure, locations): Update.
2850 (GLR: Merge conflicting parses, pure, no locations): Update.
2851 (GLR: Merge conflicting parses, pure, locations): Update.
2852 * tests/glr-regression.at (Uninitialized location when reporting
2853 ambiguity): Update
2854 * tests/input.at (Unused %define api.pure): New test case.
2855 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
2856 AT_PURE_IF and AT_PURE_AND_LOC_IF.
2857 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2858
2859 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2860
2861 %define push_pull -> %define api.push_pull. Discussed starting at
2862 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
2863 * data/push.c: Expect the new name.
2864 * data/yacc.c: Likewise.
2865 * doc/bison.texinfo (Push Decl): Update.
2866 (Decl Summary): Update %define entry.
2867 (Push Parser Function): Update.
2868 (Pull Parser Function): Update.
2869 (Parser Create Function): Update.
2870 (Parser Delete Function): Update.
2871 * tests/calc.at (Simple LALR Calculator): Update.
2872 * tests/input.at (%define enum variables): Update.
2873 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2874 (Push Parsing: Multiple impure instances): Update.
2875 (Push Parsing: Unsupported Skeletons): Update.
2876 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
2877 (Exploding the Stack Size with Malloc): Update.
2878
2879 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
2880 other entries some.
2881
2882 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
2883
2884 For the XML output's terminal element, rename @number to @token-number,
2885 and add @symbol-number. In the nonterminal element, rename @number to
2886 @symbol-number. Discussed starting at
2887 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
2888 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
2889 renames.
2890 (xsl:template match="nonterminal"): Likewise.
2891 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
2892 (xsl:template match="nonterminal"): Likewise.
2893 * src/print-xml.c (print_grammar): Implement.
2894
2895 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2896
2897 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
2898 2007-10-11 change, the child elements here are items not rules.
2899 (xsl:template match="item"): New.
2900 (xsl:template match="rule"): Update for new reduced itemset.
2901 (xsl:template match="point"): Remove.
2902 (xsl:template match="empty"): For consistency with --graph, don't
2903 output "/* empty */".
2904 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
2905 line-wrap, don't pass a negative value as first-line-length since this
2906 won't work with the following changes.
2907 (xsl:template name="line-wrap"): Simplify slightly.
2908 (xsl:template name="ws-search"): Eliminate recursion.
2909 * src/print_graph.c (print_core): Don't print a reduction's lookahead
2910 set next to an item whose dot is not at the end of the RHS even if it
2911 happens to be associated with the same rule.
2912
2913 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2914
2915 Add %define lr.keep_unreachable_states.
2916 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
2917 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
2918 * src/main.c (main): Implement it.
2919 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2920 Extend to test it, and fix a typo.
2921
2922 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2923
2924 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
2925 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
2926 the example .output text.
2927 * tests/regression.at (Extra lookahead sets in report): Improve wording
2928 of comments.
2929
2930 2007-10-17 Wojciech Polak <polak@gnu.org>
2931
2932 * src/print-xml.c (print_grammar): Renamed
2933 <terminal> and <nonterminal> attributes:
2934 "type" to "number" and "symbol" to "name".
2935 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
2936 Use new attribute names.
2937 (xsl:template match="nonterminal"): Likewise.
2938 * data/xslt/xml2xhtml.xsl: Likewise.
2939
2940 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
2941
2942 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
2943 (Option Cross Key): Likewise.
2944
2945 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
2946 next to an item whose dot is not at the end of the RHS even if it
2947 happens to be associated with the same rule.
2948 * src/print.c (print_core): Likewise.
2949 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
2950 (Resolved SR Conflicts): Update output.
2951 * tests/regression.at (Extra lookahead sets in report): New test case.
2952
2953 2007-10-11 Wojciech Polak <polak@gnu.org>
2954
2955 * src/print-xml.c (print_core): Remove item set
2956 redundancy.
2957 * data/xslt/bison.xsl (bison:ruleNumber): New key.
2958 Improve processing time. Suggested by Joel E. Denny.
2959 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
2960 Write xsl:param "required" attribute as comment.
2961 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
2962 (xsl:template match="rule"): Support new reduced itemset.
2963 (xsl:template match="point"): Remove.
2964 * data/xslt/xml2xhtml.xsl: Likewise.
2965
2966 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2967
2968 * src/getargs.c (version): Update copyright year.
2969
2970 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2971
2972 Make xml2dot.xsl and --graph produce the same output.
2973 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
2974 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
2975 escaped later.
2976 (xsl:template name="output-node"): Use the new escape template instead
2977 of the string-replace template directly.
2978 (xsl:template name="output-edge"): Likewise.
2979 (xsl:template name="escape"): New, escapes backslashes and newlines in
2980 addition to quotation marks.
2981 * src/graphviz.c (start_graph, output_node, output_edge): Add
2982 whitespace to output for legibility.
2983
2984 Make xml2text.xsl and --report produce the same output, and remove the
2985 XML "conflicts" element since a conflict summary is easily extracted
2986 from the automaton.
2987 * data/xslt/bison.xsl: New.
2988 (xsl:template match="state" mode="bison:count-conflicts): New.
2989 * data/xslt/xml2text.xsl: Import bison.xsl.
2990 (xsl:template match="bison-xml-report"): Instead of styling the
2991 "conflicts" element, style the "automaton" element with mode
2992 "conflicts". Unlike the former, the latter lists S/R and R/R
2993 conflicts for a state on the same line.
2994 (xsl:template match="conflicts"): Remove.
2995 (xsl:template match="conflict"): Remove.
2996 (xsl:template match="terminal"): Line-wrap the list of rules in which
2997 the terminal is used.
2998 (xsl:template match="nonterminal"): Likewise for nonterminals.
2999 (xsl:template match="automaton" mode="conflicts"): New.
3000 (xsl:template match="state" mode="conflicts"): New.
3001 (xsl:template name="line-wrap"): New.
3002 (xsl:template name="ws-search"): New.
3003 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3004 (xsl:template match="bison-xml-report"): Instead of styling the
3005 "conflicts" element, style the "automaton" element with mode
3006 "conflicts."
3007 (xsl:template match="conflicts"): Remove.
3008 (xsl:template match="conflict"): Remove.
3009 (xsl:template match="automaton" mode="conflicts"): New.
3010 (xsl:template match="state" mode="conflicts): New.
3011 * src/conflicts.c (conflicts_output_xml): Remove.
3012 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3013 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3014 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3015 the corresponding XSLT is easier. Also, never wrap between a word and
3016 the comma that follows it.
3017
3018 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3019
3020 Improve C++ namespace support. Discussed starting at
3021 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3022 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3023 b4_namespace_close): New macros that interpret the %define variable
3024 "namespace" so its value can contain "::" to indicate nested
3025 namespaces.
3026 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3027 the above macros.
3028 * data/lalr1.cc (b4_namespace): Likewise.
3029 * data/location.cc (b4_namespace): Likewise.
3030 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3031 inside a new table in the general %define entry. Document `%define
3032 namespace' there as well. Point the %name-prefix entry to it since it
3033 explains it more completely in the case of C++.
3034 (C++ Bison Interface): Mention `%define namespace' instead of
3035 %name-prefix.
3036 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3037 entry suffices.
3038 * tests/c++.at (Relative namespace references): New test case.
3039 (Absolute namespace references): New test case.
3040 (Syntactically invalid namespace references): New test case.
3041 * tests/input.at (C++ namespace reference errors): New test case.
3042
3043 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3044
3045 Add syncline support and location accessor to internal %define
3046 interfaces.
3047 * data/bison.m4 (b4_percent_define_get_loc): New.
3048 (b4_percent_define_get_syncline): New.
3049 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3050 (b4_percent_define_default): Record defining location as line 1 rather
3051 than 0 for the sake of synchronizing #line's, and define
3052 b4_percent_define_syncline(VARIABLE).
3053 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3054 * src/muscle_tab.c (muscle_syncline_grow): New.
3055 (muscle_code_grow): Use muscle_syncline_grow.
3056 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3057 define b4_percent_define_syncline(VARIABLE).
3058 (muscle_percent_define_get_loc): New.
3059 (muscle_percent_define_get_syncline): New.
3060 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3061 remove some unused variables.
3062 (muscle_percent_define_default): Record defining location as line 1
3063 rather than 0 for the sake of synchronizing #line's, and define
3064 b4_percent_define_syncline(VARIABLE).
3065 (muscle_percent_define_check_values): Use
3066 muscle_percent_define_get_loc.
3067 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3068 (muscle_percent_define_get_syncline): Prototype.
3069 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3070 defaults): Update output for location change.
3071 (Complaining during macro argument expansion): Extend to test
3072 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3073
3074 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3075
3076 Fix some error-reporting macro bugs.
3077 * data/bison.m4 (b4_cat): New.
3078 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3079 to stdout so they don't become arguments to other macros. Update
3080 comments and add examples.
3081 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3082 add examples.
3083 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3084 after printing the error directive so that M4 doesn't report subsequent
3085 problems that are induced by this problem.
3086 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3087 instead of just in them. Recognize @\n in both places. Both expand to
3088 the empty string. Needed by b4_cat.
3089 * tests/skeletons.at (Complaining during macro argument expansion):
3090 New test case.
3091 (Fatal errors make M4 exit immediately): New test case.
3092
3093 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3094
3095 Implement --print-datadir.
3096 * src/getargs.c (usage): Mention.
3097 (PRINT_DATADIR_OPTION): New anonymous enum member.
3098 (long_options): Add entry for it.
3099 (getargs): Add case for it calling compute_pkgdatadir.
3100 * src/output.c (output_skeleton): Encapsulate data directory
3101 computation from here...
3102 (prepare): ... and from here...
3103 (compute_pkgdatadir): ... into this new function.
3104 * src/output.h (compute_pkgdatadir): Prototype.
3105
3106 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3107
3108 * src/print-xml.c (escape_bufs): New static global variable
3109 replacing...
3110 (xml_escape_n): ... the static local variable buf here.
3111 (print_xml): Free memory for escape_bufs.
3112 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3113
3114 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3115
3116 Replace `%push-parser' and `%push-pull-parser' with
3117 `%define push_pull "push"' and `%define push_pull "both"'.
3118 `%define push_pull "pull"' is the default.
3119 * doc/bison.texinfo (Push Decl, Push Parser Function,
3120 Pull Parser Function, Parser Create Function, Parser Delete Function):
3121 Update declarations.
3122 (Decl Summary, Table of Symbols): Replace %push-parser and
3123 %push-pull-parser entries with a %define push_pull entry.
3124 * data/bison.m4 (b4_percent_define_check_values): New macro.
3125 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3126 definitions...
3127 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3128 definitions...
3129 * data/push.c: ... to here and compute them from the value of the
3130 %define variable push_pull.
3131 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3132 parsing requests here...
3133 * data/yacc.c: ... hack this to switch to push.c any time
3134 b4_use_push_pull_flag or the %define variable push_pull is set. This
3135 will go away when we mv push.c yacc.c.
3136 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3137 push parsing is not supported since unused %define variables are
3138 reported anyway.
3139 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3140 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3141 comments for consistency with b4_percent_define_check_values.
3142 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3143 muscles.
3144 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3145 Remove.
3146 (prologue_declaration): Remove %push-parser and %push-pull-parser
3147 rules.
3148 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3149 * tests/calc.at: Update declarations.
3150 * tests/input.at (%define enum variables): New test case.
3151 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3152 declaration.
3153 (Push Parsing: Multiple impure instances): Update declaration.
3154 (Push Parsing: Unsupported Skeletons): New test case.
3155 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3156 declaration.
3157 (Exploding the Stack Size with Malloc): Update declaration.
3158
3159 2007-09-24 Wojciech Polak <polak@gnu.org>
3160
3161 Add XSLT transformations.
3162
3163 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3164 * data/xslt/xml2text.xsl: Transform XML into plain text.
3165 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3166 * data/Makefile.am (xsltdir): New variable.
3167 (dist_xslt_DATA): Add xslt/*.xsl files.
3168
3169 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3170
3171 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3172 Problem reported by Wojciech Polak.
3173 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3174 (xml_printf): Undo change I made on 21 September; that is,
3175 indent 2 spaces, not 1.
3176
3177 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3178
3179 Pacify ./configure --enable-gcc-warnings.
3180 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3181 `char const *' instead of `char *'.
3182 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3183 local variable `sep'.
3184
3185 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3186
3187 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3188 elsewhere.
3189 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3190 (xml_printf): Indent just 1 space for level.
3191 (e_char, xlate_char): Remove.
3192 (xml_escape_string): Rewrite to avoid undefined behavior (used
3193 storage that was freed from the stack).
3194 (xml_escape_n): Don't bother checking for subscript error.
3195
3196 2007-09-21 Wojciech Polak <polak@gnu.org>
3197
3198 Add Bison XML Automaton Report.
3199
3200 Add support for an -x option to generate an XML report.
3201 It is not documented yet.
3202 * src/print-xml.c: New file.
3203 * src/print-xml.h: Likewise.
3204 * lib/timevar.def (TV_XML): New var.
3205 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3206 * src/conflicts.c: Include print-xml.h.
3207 (solved_conflicts_xml_obstack): New var.
3208 (log_resolution, conflicts_solve, conflicts_free):
3209 Add support for XML report.
3210 (conflicts_output_val): New function.
3211 * src/conflicts.h (conflicts_output_val): New decl.
3212 * src/files.c (spec_xml_file): New var.
3213 (compute_output_file_names, output_file_names_free): Add XML support.
3214 * src/files.h (spec_xml_file): New decl.
3215 * src/getargs.c (xml_flag): New var.
3216 (usage, short_options, long_options, getargs): Add XML support.
3217 * src/getargs.h (xml_flag): New decl.
3218 * src/gram.c: Include print-xml.h.
3219 (rule_lhs_print_xml, rule_rhs_print_xml):
3220 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3221 New functions.
3222 * src/gram.h: Declare external ones.
3223 * src/main.c: Include print-xml.h.
3224 (main): Add XML support.
3225 * src/reduce.c: Include print-xml.h.
3226 (reduce_xml): New function.
3227 * src/reduce.h: Declare it.
3228 * src/state.c: Include print-xml.h.
3229 (state_new): Add XML support.
3230 (state_rule_lookahead_tokens_print_xml): New function.
3231 * src/state.h: Declare it.
3232 (struct state): New member solved_conflicts_xml.
3233 * src/symtab.c (symbol_class_get_string): New function.
3234 * src/symtab.h: Declare it.
3235
3236 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3237
3238 * GNUmakefile: Switch to coreutils's version.
3239 * bootstrap: Likewise.
3240 * Makefile.cfg: Adjust to new GNUmakefile.
3241 * README-hacking: Likewise.
3242
3243 Import from gnulib:
3244
3245 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3246 Bruno Haible <bruno@clisp.org>
3247
3248 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3249 and is a script that invokes bison. Tighten the code. Add comments.
3250
3251 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3252
3253 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3254 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3255 * doc/bison.texinfo (Decl Summary): Fix.
3256 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3257 * tests/input.at (Boolean %define variables): Update output.
3258 * tests/skeletons.at (%define boolean variables: invalid skeleton
3259 defaults): Rename to...
3260 (%define Boolean variables: invalid skeleton defaults): ... this and
3261 update output.
3262
3263 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3264
3265 In impure push mode, don't allow more than one yypstate to be allocated
3266 since multiple impure parsers would corrupt yynerrs.
3267 * data/push.c (yypstate_allocated): New static global variable
3268 initialized to 0.
3269 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3270 exhaustion if yypstate_allocated is 1, but still return 2.
3271 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3272 already 1. Otherwise, set it to 1.
3273 (yypstate_delete): Set it to 0.
3274 * tests/push.at (Push Parsing: Multiple impure instances): New test
3275 case.
3276
3277 2007-08-17 Bob Rossi <bob@brasko.net>
3278
3279 * doc/bison.texinfo (Push Decl): Document the push parser.
3280 (Table of Symbols): Ditto.
3281 (Pure Decl): Ditto.
3282 (Decl Summary): Ditto.
3283 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3284 Parser Create Function, Parser Delete Function):
3285 Add new push parser symbols.
3286 (Table of Symbols): Document push-parser, push-pull-parser,
3287 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3288
3289 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3290
3291 Update to GPLv3.
3292 * doc/gpl-3.0.texi: New file.
3293 * doc/gpl.texi: Remove.
3294 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3295 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3296 * README-hacking, TODO, bootstrap, bootstrap.conf:
3297 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3298 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3299 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3300 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3301 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3302 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3303 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3304 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3305 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3306 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3307 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3308 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3309 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3310 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3311 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3312 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3313 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3314 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3315 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3316 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3317 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3318 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3319 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3320 * src/complain.c, src/complain.h, src/conflicts.c:
3321 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3322 * src/files.h, src/flex-scanner.h, src/getargs.c:
3323 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3324 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3325 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3326 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3327 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3328 * src/print.c, src/print.h, src/print_graph.c:
3329 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3330 * src/reduce.h, src/relation.c, src/relation.h:
3331 * src/revision.h, src/scan-code.h, src/scan-code.l:
3332 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3333 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3334 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3335 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3336 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3337 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3338 * tests/existing.at, tests/glr-regression.at:
3339 * tests/headers.at, tests/input.at, tests/java.at:
3340 * tests/local.at, tests/output.at, tests/push.at:
3341 * tests/reduce.at, tests/regression.at, tests/sets.at:
3342 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3343 * tests/torture.at:
3344 Update to GPLv3.
3345
3346 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3347
3348 Get rid of broken %no-parser, -n, and --no-parser implementation and
3349 documentation.
3350 * TODO: Don't mention them.
3351 * doc/bison.1: Likewise.
3352 * doc/bison.texinfo (Decl Summary): Likewise.
3353 (Bison Options): Likewise.
3354 (Option Cross Key): Likewise.
3355 * src/getargs.c (no_parser_flag): Remove global variable.
3356 (usage): Don't print description of -n and --no-parser.
3357 (long_options): Remove --no-parser entry here.
3358 (getargs): Remove -n case in the switch here.
3359 * src/getargs.h (no_parser_flag): Remove extern.
3360 * tests/regression.at (Web2c Actions): Remove comment that mentions
3361 --no-parser.
3362
3363 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3364
3365 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3366 name user variables starting with `yy'. Just pass NULL instead of a
3367 dummy local &yylval to yypush_parse.
3368 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3369 starting with `yy'.
3370
3371 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3372
3373 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3374 true since it's then always used regardless of whether yyoverflow is
3375 defined. Reported by Christian Burger at
3376 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3377 * THANKS: Add Christian Burger.
3378
3379 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3380 node names: say "Decl Summary" not "Bison Declaration Summary".
3381
3382 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3383
3384 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3385 determine whether this function has already complained about an invalid
3386 value for a %define boolean variable, don't check whether Bison has
3387 ever examined the value. As written, the check was a tautology.
3388 Instead, record and check for this complaint using a separate muscle.
3389
3390 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3391
3392 Fix push parsing memory leak reported by Brandon Lucia at
3393 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3394 * THANKS: Add Brandon Lucia.
3395 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3396 but the parse never completed and thus freed it.
3397 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3398 * tests/testsuite.at: Include push.at.
3399 * test/push.at: New.
3400 (Push Parsing: Memory Leak for Early Deletion): New test case.
3401
3402 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3403
3404 Improve handling of multiple S/R conflicts in the same state and of S/R
3405 conflicts involving multiple reductions.
3406 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3407 set for a state here or Bison will abort if it is reassigned on a
3408 later conflicted reduction in the same state.
3409 Similarly, don't finalize and assign the solved conflicts report here
3410 or it will be lost if it is reassigned on a later conflicted reduction
3411 in the same state.
3412 (set_conflicts): Instead, assign them both here after all S/R conflicts
3413 in the state have been fully examined.
3414 * src/print.c (shift_set): Rename to...
3415 (no_reduce_set): ... this.
3416 (print_reductions): Update for rename, and add %nonassoc error action
3417 tokens to no_reduce_set so that, when printing the first remaining
3418 reduction on an error action token, the reduction is enclosed in
3419 brackets.
3420 (print_results): Update for rename.
3421 * tests/conflicts.at (Solved conflicts report for multiple reductions
3422 in a state): New test case.
3423 (%nonassoc error actions for multiple reductions in a state): New test
3424 case.
3425
3426 * src/main.c (main): Don't depend on C99 features.
3427
3428 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3429
3430 * build-aux/.cvsignore: Add compile.
3431 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3432 uniwidth.
3433
3434 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3435
3436 * bootstrap (slurp): Create target directories that don't exist.
3437 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3438
3439 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3440
3441 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3442 than item number.
3443 * closure.c (closure): Likewise.
3444 * state.h (reductions): Comment sorting of rules.
3445 (state): Comment sorting of items.
3446
3447 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3448
3449 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3450 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3451 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3452 definition in order to avoid Gnulib headers since we don't use config.h
3453 here.
3454 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3455 rather than AT_DATA so that config.h is included.
3456
3457 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3458
3459 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3460 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3461 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3462 and so that YYFPRINTF is guaranteed to be defined here.
3463
3464 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3465
3466 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3467 with...
3468 (muscle_percent_define_check_values): ... this more helpful function.
3469 Again, it's not used yet, but it will be.
3470 * src/muscle_tab.h: Likewise.
3471
3472 Improve some comments in parser table construction.
3473 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3474 (generate_states): Don't mention ruleset, which is internal to closure.
3475 * src/closure.c (closure): Explain sorting of core and itemset, which
3476 is required for this function to behave correctly.
3477 * src/closure.h (closure): Mention sorting.
3478
3479 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3480
3481 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3482 move the check for disabled transitions to an aver since conflict
3483 resolution hasn't happened yet.
3484
3485 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3486 labels a state as inconsistent just because it has error transitions.
3487 The original form of this check appeared in revision 1.1 of lalr.c,
3488 which was committed on 1991-12-21. Now (at least), changing the
3489 consistency label on such a state appears to have no useful effect in
3490 any of the places it is examined, which I enumerate below. The key
3491 point to understanding each item in this enumeration is that a state
3492 with an error transition is labelled consistent in the first place only
3493 if it has no rules, so the check cannot matter for states that have
3494 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3495 to try to identify its conflicts, and a state must have *rules* to have
3496 conflicts. (2) Labelling a state as inconsistent will affect how
3497 action_row sets the default *rule* for the state. (3) Labelling a
3498 state as inconsistent will cause build_relations to add lookback edges
3499 to *rules* in that state.
3500 * src/state.h (struct state): Word the comment for member consistent
3501 more carefully.
3502
3503 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3504
3505 Don't depend on C99 features.
3506 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3507 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3508 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3509 * src/state.c (state_mark_reachable_states): Fix for-loop.
3510 (state_remove_unreachable_states): Fix for-loop.
3511
3512 Don't widen struct state with member reachable just to temporarily
3513 record reachability. Instead, use a local bitset.
3514 * src/state.h (struct state): Remove member.
3515 * src/state.c (state_new): Don't initialize it.
3516 (state_mark_reachable_states): Rename to...
3517 (state_record_reachable_states): ... this, and use bitset.
3518 (state_remove_unreachable_states): Use bitset.
3519
3520 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3521
3522 * src/Makefile.am (yacc): Quote target action commands properly so
3523 that the yacc script isn't corrupt. Reported by Hans Aberg at
3524 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3525
3526 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3527 the case of pure parsers. Reported by Frans Englich at
3528 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3529 * THANKS: Add Frans Englich.
3530
3531 * NEWS (2.3a+): In the %code entry, reference section `Bison
3532 Declaration Summary' from the manual now since the %code summary has
3533 moved there.
3534 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3535 in the rules section must be terminated by semicolons.
3536
3537 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3538
3539 Extend the front-end API for %define variables to more completely
3540 mirror the back-end. This will be useful in the future.
3541 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3542 Update comments to mention the new front-end counterparts of these
3543 macros.
3544 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3545 for muscle_string_decode and muscle_location_decode.
3546 (muscle_string_decode): New static function.
3547 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3548 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3549 functions.
3550 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3551 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3552 implementation more closely.
3553 (muscle_percent_define_invalid_value): New function.
3554 * src/muscle_tab.h (muscle_percent_define_get,
3555 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3556 Prototype.
3557
3558 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3559
3560 * NEWS (2.3a+): Mention yesterday's state-removal change.
3561 (2.3a): Remove the %language entry, which was added after 2.3a.
3562 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3563 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3564 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3565 tests/existing.at: Update copyright date.
3566
3567 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3568
3569 If conflict resolution makes states unreachable, remove those states,
3570 report rules that are then unused, and don't report conflicts in those
3571 states.
3572 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3573 New global function.
3574 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3575 function.
3576 * src/main.c (main): After conflict resolution, remove the unreachable
3577 states and update all data structures that reference states by number.
3578 * src/state.c (state_new): Initialize each state's reachable member to
3579 false.
3580 (state_mark_reachable_states): New static function.
3581 (state_remove_unreachable_states): New global function.
3582 * src/state.h (struct state): Add member bool reachable.
3583 (state_remove_unreachable_states): Prototype.
3584 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3585 New test case.
3586 * tests/existing.at (GNU pic Grammar): Update test case output now that
3587 an unused rule is discovered.
3588
3589 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3590
3591 Minor code cleanup in parser table construction.
3592 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3593 (new_itemsets, save_reductions): Update for rename to nitemset.
3594 * src/closure.c (nritemset): Rename to...
3595 (nitemset): ... this since the "r" appears to meaningless and isn't
3596 used in the comments.
3597 (closure): Update for rename.
3598 * src/closure.h (nritemset): Update extern to...
3599 (nitemset): ... this.
3600 * src/lalr.c (LA): Fix a typo in comments.
3601 * src/print.c (print_core): Update for rename to nitemset.
3602 * src/print_graph.c (print_graph): Likewise.
3603 * src/state.h: Fix some typos in header comments.
3604
3605 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3606
3607 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3608 still sticks to ASCII. Sorry!
3609
3610 * README-hacking: New file, taken mostly from coreutils, with changes
3611 for Bison. Contains much of the contents of:
3612 * README-cvs: Remove.
3613 * bootstrap: Sync from gnulib.
3614 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3615 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3616
3617 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3618
3619 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3620 Setzer.
3621 (Java Differences): Fix some typos.
3622 * THANKS: Add Sebastian Setzer.
3623
3624 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
3625
3626 * data/java.m4 (b4_single_class_if): Remove.
3627 (b4_abstract_if): Look at "%define abstract".
3628 (b4_lexer_if): New.
3629 (b4_union_name): Rename...
3630 (b4_yystype): ... to this. Map to "%define stype".
3631 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3632 b4_maybe_throws): Fix quoting.
3633 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3634 * data/lalr1.java (Lexer interface): Always define.
3635 (Lexer interface within parser class): Remove.
3636 (YYLexer class): New, used when "%code lexer" is present.
3637 (constructor): When "%code lexer" is used, pass %lex-param
3638 to the lexer constructor.
3639 (yylex, yyparse): Remove %lex-param from method invocations
3640 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3641
3642 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3643 abstract". Rename "%define union_name" to "%define stype".
3644 Rename method names according to previous patch.
3645 (Java Scanner Interface): Describe "%code lexer" instead of
3646 "%pure-parser" and "%define single_class".
3647 (Java Differences): Mention "%code lexer".
3648
3649 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3650 Include scanner here, using macros from tests/local.at.
3651 (AT_DATA_CALC_Y): Remove final argument.
3652 (_AT_CHECK_JAVA_CALC): Likewise.
3653 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3654 of %locations and %error-verbose.
3655 (main): Test with and without %lex-param.
3656 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3657 (AT_BISON_OPTION_POPDEFS): Pop it.
3658
3659 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3660
3661 DJGPP spefic issue. Inhibit the use of disallowed characters for
3662 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3663 and concern testsuite case 46.
3664 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3665 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3666 * djgpp/config.bat: Inhibit the use of disallowed characters.
3667
3668 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3669
3670 Miscellaneous %define and %code cleanup.
3671 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3672 values are interpreted.
3673 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3674 documentation a little more.
3675 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3676 muscle_percent_define_insert, muscle_percent_code_grow): New
3677 functions/macros.
3678 * src/muscle_tab.h (muscle_percent_define_insert,
3679 muscle_percent_code_grow): Prototype.
3680 * src/parse-gram.y (prologue_declaration): Use
3681 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3682 %define and %code directives.
3683
3684 Make it easy to share %define boolean variables between the front-end
3685 and back-end. Though not used yet, this will be useful in the future.
3686 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3687 Bison uses of names rather than just skeleton uses of names.
3688 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3689 b4_percent_define_skeleton_variables(VARIABLE) to
3690 b4_percent_define_bison_variables(VARIABLE).
3691 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3692 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3693 b4_percent_code_bison_qualifiers(QUALIFIER).
3694 (b4_check_user_names_wrap): Update for renames.
3695 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3696 muscle_percent_define_default): New functions mimicking
3697 b4_percent_define_flag_if and b4_percent_define_default.
3698
3699 For %define variables, report locations for invalid values and
3700 redefinitions.
3701 * data/bison.m4 (b4_percent_define_flag_if): Read
3702 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3703 value for VARIABLE.
3704 (b4_percent_define_default): Save a special location in
3705 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3706 must later be reported as invalid.
3707 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3708 functions.
3709 (muscle_percent_define_insert): Record the location of VARIABLE in
3710 muscle percent_define_loc(VARIABLE), and use it to report the previous
3711 location for a redefinition.
3712 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3713 (muscle_percent_define_default): Update like b4_percent_define_default.
3714 (muscle_grow_user_name_list): Rename to...
3715 (muscle_user_name_list_grow): ... this for consistency and use
3716 muscle_location_grow.
3717 * src/muscle_tab.h (muscle_location_grow): Prototype.
3718 * tests/input.at (%define errors): Update expected output.
3719 * tests/skeletons.at (%define boolean variables: invalid skeleton
3720 defaults): New test case.
3721
3722 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3723
3724 * src/print.c (lookahead_set, state_default_rule): Remove.
3725 (print_reductions): Replace state_default_rule invocation with
3726 equivalent use of yydefact, which was computed in token_actions in
3727 tables.c.
3728 (print_results): Don't allocate lookahead_set.
3729
3730 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
3731
3732 * data/lalr1.java: Prefix all private members with yy.
3733
3734 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3735
3736 Use YYFPRINTF instead of fprintf where appropriate. Reported by
3737 Sebastien Fricker at
3738 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
3739 * THANKS: Add Sebastien Fricker.
3740 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3741 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3742 accept a variable number of arguments.
3743
3744 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3745
3746 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3747
3748 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3749
3750 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3751 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3752 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3753
3754 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3755
3756 Undo my 2007-02-07 change, switching back to the c-strcase module
3757 introduced in the 2007-02-03 change. Bruno Haible reported that
3758 the 2007-02-07 change would be dangerous in Turkish if we add a
3759 language whose name contains "i", since "i" is not lowercase "I"
3760 in Turkish.
3761 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3762 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3763 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3764 * m4/.cvsignore: Remove strcase.m4.
3765 * src/getargs.c: Revert 2007-02-07 change, as follows.
3766 Include c-strcase.h.
3767 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3768
3769 2007-02-11 Bruno Haible <bruno@clisp.org>
3770
3771 Enable the Java related testsuite tests when the only Java compiler
3772 found is a gcj < 4.3. Discussed at
3773 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3774 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3775
3776 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3777
3778 * data/Makefile.am: Update copyright date.
3779 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3780 yypstate_new returns NULL.
3781 (yypstate_new): Return NULL if malloc does.
3782 * src/reader.c (packgram): Move translation of rule actions from the
3783 beginning of packgram to...
3784 (check_and_convert_grammar): ... here right before packgram is invoked
3785 so it's easier to write more complete comments, and remove redundant
3786 code.
3787
3788 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3789
3790 As in semantic actions, make @$ in %initial-action, %destructor, and
3791 %printer imply %locations.
3792 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3793 scanning @$.
3794 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3795 (@$ in %initial-action implies %locations,
3796 @$ in %destructor implies %locations,
3797 @$ in %printer implies %locations): ... these new test cases.
3798
3799 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3800
3801 Undo most of the 2007-02-03 change, switching to the strcase module
3802 now that gnulib strcase has been fixed.
3803 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3804 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3805 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3806 * m4/.cvsignore: Add strcase.m4.
3807 * src/getargs.c: Revert 2007-02-03 change, as follows.
3808 Don't include c-strcase.h.
3809 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3810 strcasecmp has "unspecified behavior" outside the POSIX locale,
3811 but it works fine in practice if at least one argument is ASCII,
3812 as is the case in Bison.
3813
3814 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
3815
3816 * tests/java.at: Skip tests if only one of javac/java is present.
3817 Reported by Joel E. Denny.
3818 * tests/atlocal.in: Adjust copyright years.
3819
3820 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3821
3822 * data/lalr1.java (Stack): Work around old verifiers that disallow
3823 access to the private fields of an inner class, from the outer class.
3824 We can make Stack's fields public because user code doesn't have access
3825 to the instance of Stack used by parse(). Reported by Paul Eggert.
3826
3827 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3828
3829 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3830 the right spot for these files?
3831 * bootstrap.conf (gnulib_modules): Add c-strcase.
3832 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3833 c-strncasecmp.c.
3834 * src/getargs.c: Include c-strcase.h.
3835 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3836 to avoid unspecified behavior.
3837
3838 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3839
3840 * doc/bison.texinfo (Decl Summary): Correct typo.
3841
3842 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
3843
3844 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3845 Complain if the value does not match empty, "true" or "false".
3846 * data/c++.m4: Adjust default definitions of %define variables.
3847 * data/java.m4: Adjust default definitions of %define variables.
3848 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
3849 to above behavior.
3850 * tests/input.at (Boolean %define variables): Test new behavior.
3851
3852 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
3853
3854 * NEWS: Mention java.
3855 * TODO: Remove things that are done.
3856 * bootstrap.conf: Add javacomp-script and javaexec-script.
3857 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
3858
3859 * data/Makefile.am: Add new files.
3860 * data/java-skel.m4: New.
3861 * data/java.m4: New.
3862 * data/lalr1.java: New.
3863
3864 * doc/bison.texinfo: Put "A Complete C++ Example" under
3865 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
3866 under Other Languages.
3867
3868 * src/getargs.c (valid_languages): Add Java.
3869 * src/getargs.h (struct bison_language): Update size of string fields.
3870
3871 * tests/Makefile.am: Add java.at.
3872 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
3873 * tests/java.at: New.
3874 * tests/testsuite.at: Include it.
3875
3876 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
3877
3878 Clean up.
3879 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
3880 at_directive_argv arguments so these no longer have to be global
3881 variables. Also, update the implementation for the following changes.
3882 (fail_for_at_directive_too_many_args,
3883 fail_for_at_directive_too_few_args): Add at_directive_name argument.
3884 (at_directive_name): Remove as at_directive_argv[0] will be used for
3885 this now.
3886 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
3887 for the directive name.
3888 (at_directive_argc, at_directive_argv): Make these local within
3889 skel_lex instead of global.
3890 (INITIAL): Update directive start action for above changes.
3891 (SC_AT_DIRECTIVE_ARG): Rename to...
3892 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
3893 (SC_AT_DIRECTIVE_SKIP_WS): Update.
3894 (scan_skel): Move yylex_destroy to...
3895 (skel_scanner_free): ... here.
3896 * tests/skeletons.at (installed skeleton file name): Rename to...
3897 (installed skeleton file names): ... this.
3898
3899 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
3900
3901 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3902 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
3903 Summary" not "Directives".
3904 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
3905 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
3906 since the former is now the more complete one.
3907 (Prologue Alternatives): Likewise and do the same for %defines.
3908 (Table of Symbols): Add summary of %code, add summary of %define, and
3909 move full %code documentation to...
3910 (Decl Summary): ... here for consistency with other entries in these
3911 sections.
3912 Move %define entry in order to keep this list alphabetized.
3913 Reword %define entry a little to put less emphasis on the skeleton
3914 concept, which most users shouldn't have to think about.
3915
3916 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3917
3918 Adjust to recent gnulib changes.
3919 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
3920 Add string.h, string_.h, unistd_.h, wchar_.h.
3921 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
3922 * src/system.h: Don't include <stpcpy.h>; this is now done by
3923 <string.h>.
3924
3925 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
3926
3927 Simplify implementation of unqualified %code, implement macros for
3928 uniform treatment of boolean %define flags. Document %define.
3929 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
3930 b4_percent_code_ifdef): New.
3931 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
3932 * data/c++.m4: Define default value for global_tokens_and_yystype.
3933 * data/glr.cc: Likewise.
3934 * data/location.cc: Use b4_percent_define_flag_if.
3935
3936 * doc/bison.texinfo (Decl Summary): Document %define.
3937
3938 * src/parse-gram.y (Unqualified %code): Change muscle name to
3939 b4_percent_code().
3940 (content.opt): Default to empty.
3941
3942 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3943
3944 Implement support for relative and absolute skeleton file names.
3945 Discussed starting at
3946 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
3947 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
3948 (Bison Options): Document in --skeleton entry.
3949 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
3950 full_skeleton can't necessarily hold all of pkgdatadir.
3951 If the specified skeleton file name contains a `/', don't prepend
3952 pkgdatadir.
3953 * src/parse-gram.y (prologue_declaration): If the specified skeleton
3954 file name contains a `/', prepend the grammar file directory.
3955 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
3956 * skeletons.at: New file.
3957 (relative skeleton file names): New test case.
3958 (installed skeleton file names): New test case.
3959 * tests/testsuite.at: Include skeletons.at.
3960
3961 * bootstrap: Update copyright to 2007.
3962
3963 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
3964
3965 * bootstrap: Remove occurrences of .#bootmp from the files.
3966
3967 2007-01-17 Akim Demaille <akim@epita.fr>
3968
3969 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
3970 nonterminals.
3971 Use per-type %printer.
3972
3973 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3974
3975 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
3976 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3977 djgpp/config.site, src/files.c, src/files.h, src/main.c,
3978 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
3979 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
3980 tests/glr-regression.at, tests/input.at, tests/local.at,
3981 tests/output.at, tests/torture.at: Update copyright to 2007.
3982
3983 2007-01-16 Akim Demaille <akim@epita.fr>
3984
3985 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
3986 error code.
3987 (Calc++ Scanner): Exit with failure if we can't open the input
3988 file.
3989 Accept "-" standing for stdin.
3990 (Calc++ Top Level): Print the result only if the parsing was
3991 successful.
3992
3993 2007-01-16 Akim Demaille <akim@epita.fr>
3994
3995 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
3996
3997 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
3998 and Joel E. Denny <jdenny@ces.clemson.edu>
3999
4000 Clean up %define and %code implementation in M4 some. Most
4001 importantly, rename all related macros to be in the b4_percent_define
4002 and b4_percent_code namespaces. Also, complete support for `.' in
4003 %define variable names and %code qualifiers.
4004 * data/bison.m4 (b4_check_user_names): Check for special
4005 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4006 m4_foreach loops.
4007 (b4_get_percent_define, b4_get_percent_code): Rename to...
4008 (b4_percent_define_get, b4_percent_code_get): ... these.
4009 Extend documentation with examples.
4010 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4011 b4_percent_define_skeleton_variables and
4012 b4_percent_code_skeleton_qualifiers.
4013 Expect any value for the %define variable `foo' to be stored in the
4014 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4015 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4016 expect any unqualified %code blocks to be stored in a macro named
4017 `b4_percent_code_unqualified'.
4018 Use m4_indir so that %define variable names and %code qualifiers can
4019 contain `.', which is allowed by the grammar parser.
4020 (b4_percent_define_default): New macro to set a default value for a
4021 %define variable.
4022 (m4_wrap): Update wrapped code, and fix some underquoting.
4023 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4024 Expect grammar uses of %define variables and %code qualifiers to be
4025 defined in b4_percent_define_user_variables and
4026 b4_percent_code_user_qualifiers.
4027 * data/c++.m4: Use b4_percent_define_default rather than
4028 m4_define_default. Fix some underquoting. Skeleton usage of %define
4029 variable define_location_comparison now implies skeleton usage of
4030 %define variable filename_type.
4031 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4032 data/push.c, data/yacc.c: Update macro names.
4033 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4034 muscle names.
4035
4036 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4037
4038 DJGPP specific issues.
4039
4040 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4041 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4042
4043 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4044
4045 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4046 run parsers in all tests so that Valgrind is invoked during
4047 maintainer-check-valgrind.
4048 (Duplicate representation of merged trees): Free all semantic values.
4049 (Duplicated user destructor for lookahead): Likewise.
4050
4051 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4052
4053 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4054 command-line prefix.
4055 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4056 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4057 miss Valgrind messages.
4058 (Exploding the Stack Size with Malloc): Likewise.
4059
4060 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4061
4062 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4063 locals. Reported by Juan Manuel Guerrero at
4064 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4065 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4066 Fix some indentation also.
4067 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4068 explaining this issue.
4069
4070 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4071 and Joel E. Denny <jdenny@ces.clemson.edu>
4072
4073 Simplify union and prologue handling, and escape union and lex/parse
4074 params with digraphs.
4075 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4076 values to the empty string since these are no longer guaranteed
4077 initialized by the front-end.
4078 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4079 braces around b4_user_stype since this is no longer done by the
4080 front-end.
4081 * src/files.c, src/files.h (pre_prologue_obstack,
4082 post_prologue_obstack): Remove.
4083 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4084 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4085 with digraphs. This fixes lex params and parse params.
4086 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4087 * src/output.c (prepare): Remove muscle insertion of the prologues.
4088 (output): Remove freeing of pre_prologue_obstack and
4089 post_prologue_obstack.
4090 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4091 than prologue_augment for prologue parsing so you don't need prologue
4092 obstacks.
4093 (grammar_declaration): For %union RHS, use `braceless' instead of
4094 "{...}" so that braces are already stripped and code is escaped with
4095 digraphs.
4096 * src/reader.c (prologue_augment): Remove.
4097 (reader): Remove initialization of pre_prologue_obstack and
4098 post_prologue_obstack.
4099 * src/reader.h (prologue_augment): Remove.
4100
4101 * data/c.m4: Remove stray parenthesis.
4102
4103 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4104
4105 Remove quotes from variables names in %define directives and from
4106 qualifiers in %code directives, and restrict the characters that are
4107 allowed in them to M4-friendly ones. For %define, continue to support
4108 the quoted form as a deprecated feature. Discussed starting at
4109 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4110 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4111 %code.
4112 * doc/bison.texinfo (Prologue Alternatives): Update.
4113 (Decl Summary): In %defines entry, update mention of `%code requires'
4114 and `%code provides'.
4115 (C++ Location Values): Update %define uses.
4116 (Calc++ Parser Interface): Likewise.
4117 (Calc++ Parser): Likewise, and update `%code requires' uses.
4118 (Table of Symbols): Update %code documentation.
4119 * src/parse-gram.y (prologue_declaration): For %define variables, use
4120 `variable' instead of `STRING'.
4121 (grammar_declaration): For %code qualifiers, use `ID' instead of
4122 `STRING'.
4123 (variable): New nonterminal that takes an `ID' or a `STRING'.
4124 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4125 and %define uses.
4126 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4127 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4128 (%define errors): Update %define uses.
4129
4130 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4131
4132 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4133 instead of muscle_insert for %define values so that M4-special
4134 characters are replaced with digraphs.
4135 * tests/input.at (%define errors): Extend to check weird values.
4136
4137 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4138
4139 Instead of having skeletons declare all valid %define variables and
4140 %code qualifiers, provide macros that retrieve the associated values
4141 and build these lists automatically. Thus Bison will now warn when a
4142 variable or qualifier is not used by the skeleton in the current
4143 invocation regardless of whether it might sometimes be used by that
4144 skeleton in other invocations. Also, move all %define value macros to
4145 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4146 form, which is replaced by %code.
4147 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4148 (b4_check_user_names): ... this, and change the series of valid name
4149 arguments to a single list argument for names used in the skeleton
4150 similar to the existing list argument for names used in the grammar.
4151 Warn instead of complaining.
4152 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4153 values and %code code, to format %code code properly, and to build
4154 lists of all %define variables and %code qualifiers used in the
4155 skeleton: b4_skeleton_percent_define_variables and
4156 b4_skeleton_percent_code_qualifiers.
4157 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4158 Remove, and...
4159 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4160 the skeleton names lists can finish building first. In place of
4161 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4162 expect the lists b4_user_percent_define_variables and
4163 b4_user_percent_code_qualifiers.
4164 * data/c++.m4: Where setting default values for b4_parser_class_name,
4165 b4_location_type, b4_filename_type, b4_namespace, and
4166 b4_define_location_comparison, update their names to the
4167 b4_percent_define_ namespace.
4168 * data/glr.c: Don't use b4_check_percent_define_variables and
4169 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4170 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4171 (b4_parser_class_name, b4_namespace): Define these using
4172 b4_get_percent_define for parser_class_name and namespace.
4173 * data/location.cc: Use b4_get_percent_define.
4174 * data/push.c: Don't use b4_check_percent_define_variables and
4175 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4176 * data/yacc.c: Likewise, and don't call m4_exit in
4177 b4_use_push_for_pull_if or m4_wrap code will never execute.
4178 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4179 Rename to...
4180 (muscle_grow_user_name_list): ... this for consistency with the
4181 terminology used in bison.m4.
4182 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4183 %define variable names, and rename muscle used_percent_define_variables
4184 to user_percent_define_variables.
4185 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4186 user_percent_code_qualifiers.
4187 (content): Remove.
4188 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4189 {CODE} form is no longer accepted.
4190 * tests/input.at (Reject bad %code qualifiers): Rename to...
4191 (Reject unused %code qualifiers): ... this, and update test output.
4192 (%define error): Update test output.
4193
4194 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4195
4196 Check for unrecognized %define variables similar to checking for
4197 unrecognized %code qualifiers. Check for redefined %define variables.
4198 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4199 generalizes...
4200 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4201 (b4_check_percent_define_variables): New, also wraps it.
4202 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4203 variables using b4_check_percent_define_variables.
4204 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4205 all those exercised in the test suite and all those listed in the
4206 `Default values' section of c++.m4. Are there others?
4207 * data/push.c, data/yacc.c: Declare no valid %define variables.
4208 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4209 similar to muscle_find, but it works even when the muscle stores a
4210 const value.
4211 (muscle_grow_used_name_list): New function for constructing the used
4212 name list muscles that b4_check_for_unrecognized_names requires.
4213 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4214 %define'd more than once. Define the b4_used_percent_define_variables
4215 muscle with muscle_grow_used_name_list.
4216 (grammar_declaration): Abbreviate %code code with
4217 muscle_grow_used_name_list.
4218 * tests/input.at (%define errors): New.
4219
4220 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4221
4222 Provide warn_at, complain_at, and fatal_at function callbacks to the
4223 skeletons, and use this for %code qualifier complaints.
4224 * data/bison.m4 (b4_error_at): New, invoked by...
4225 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4226 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4227 @fatal_at(...@) directives.
4228 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4229 qualifiers in b4_used_percent_code_qualifiers and to use
4230 b4_complain_at.
4231 * src/location.c, src/location.h (boundary_set_from_string): New global
4232 function.
4233 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4234 function.
4235 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4236 to b4_used_percent_code_qualifiers.
4237 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4238 function.
4239 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4240 (lineno): Rename to...
4241 (out_lineno): ... this so I don't misunderstand it again.
4242 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4243 here; these newlines are in the input but not the output file.
4244 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4245 (at_directive_perform): ... this new static function, and add handling
4246 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4247 directives.
4248 * tests/input.at (Reject bad %code qualifiers): Update test output with
4249 locations and extend.
4250
4251 * tests/output.at (Output file name: [, Output file name: ]): Remove
4252 bogus comment about these tests failing.
4253
4254 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4255
4256 Clean up b4_check_percent_code_qualifiers a little.
4257 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4258 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4259 documentation and add examples.
4260 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4261 qualifiers here.
4262
4263 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4264
4265 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4266 unreliable -- especially when they're hidden inside another macro.
4267 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4268 data/c.m4: Remove m4_divert(-1).
4269 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4270 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4271 m4_divert_push(0) and m4_divert_pop(0).
4272 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4273 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4274 pushed and popped by m4sugar, should be first on the stack.
4275
4276 Provide warn, complain, and fatal function callbacks to the skeletons.
4277 This provides more flexibility than m4_fatal, improves the error
4278 message format, and captures messages for translation. Discussed
4279 starting at
4280 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4281 * data/bison.m4 (b4_error): New, invoked by...
4282 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4283 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4284 directives. Because these M4 macros might be called when the current
4285 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4286 the previous removal of uses of m4_divert, which caused trouble.
4287 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4288 m4_fatal to report unrecognized %code qualifiers.
4289 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4290 push parser requests.
4291 * data/glr.c: Use b4_complain instead of m4_fatal to report
4292 non-deterministic push parser requests.
4293 Update @output usage to @output(...@) form.
4294 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4295 report missing %defines. Update @output usage to @output(...@) form.
4296 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4297 @output(...@) form.
4298 * src/main.c (main): Invoke skel_scanner_free.
4299 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4300 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4301 obstack_for_string from flex-scanner.h.
4302 (YY_DECL): Use to declare skel_lex static.
4303 (decode_at_digraphs): Remove; now handled in the new
4304 SC_AT_DIRECTIVE_ARG start condition.
4305 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4306 functions.
4307 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4308 at_directive_argv): New static globals.
4309 (INITIAL): Use fail_for_invalid_at.
4310 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4311 recognize the start of a generalized `@directive(...@)' form and
4312 start...
4313 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4314 directive args (using the new obstack_for_string), to decode the
4315 contained @ diagraphs, and to perform the directive. It recognizes
4316 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4317 @output(...@).
4318 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4319 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4320 `@,'.
4321 (scan_skel): Initialize obstack_for_string on the first call.
4322 (skel_scanner_free): New function to free obstack_for_string.
4323 * tests/input.at (Reject bad %code qualifiers): Update test output.
4324
4325 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4326
4327 Consolidate the 4 prologue alternative directives (%code, %requires,
4328 %provides, and %code-top) into a single %code directive with an
4329 optional qualifier field. Discussed at
4330 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4331 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4332 alternatives.
4333 * doc/bison.texinfo (Prologue Alternatives): Update.
4334 (Decl Summary): Update to %code "requires" and %code "provides".
4335 (Calc++ Parser): Update to %code "requires".
4336 (Table of Symbols): Remove entries for %requires, %provides, and
4337 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4338 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4339 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4340 which are skeleton-specific.
4341 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4342 declare what %code qualifiers it supports and to complain if any other
4343 qualifiers were used in the grammar.
4344 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4345 and b4_user_code([b4_percent_code_provides]) in place of
4346 b4_user_requires and b4_user_provides.
4347 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4348 Add b4_user_code([b4_percent_code_top]) and
4349 b4_user_code([b4_percent_code]).
4350 Invoke b4_check_percent_code_qualifiers.
4351 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4352 PERCENT_REQUIRES): Remove.
4353 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4354 %requires. Rewrite the %code RHS as the unqualified form defining the
4355 muscle b4_percent_code. Add another RHS for the qualified %code form,
4356 which defines muscles of the form b4_percent_code_QUALIFIER and the
4357 b4_used_percent_code_qualifiers muscle.
4358 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4359 PERCENT_REQUIRES): Remove.
4360 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4361 %code "requires" and %code "provides".
4362 * tests/input.at (Reject bad %code qualifiers): New.
4363
4364 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4365
4366 Use the new code_props interface for destructors and printers.
4367 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4368 printer_location members, and change the type of the destructor and
4369 printer members to code_props.
4370 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4371 symbol_printer_get, semantic_type_destructor_set,
4372 semantic_type_printer_set, default_tagged_destructor_set,
4373 default_tagless_destructor_set, default_tagged_printer_set,
4374 default_tagless_printer_set): Use code_props in arguments and return
4375 types in place of char const * and location.
4376 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4377 since the locations are now contained in the return of
4378 symbol_destructor_get and symbol_printer_get.
4379 * src/output.c (symbol_destructors_output, symbol_printers_output):
4380 Replace with...
4381 (symbol_code_props_output): ... this to eliminate duplicate code.
4382 (output_skeleton): Update to use symbol_code_props_output.
4383 * src/reader.c (symbol_should_be_used): Update use of
4384 symbol_destructor_get.
4385 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4386 Update uses of the various _destructor_set and _printer_set functions.
4387 * src/symtab.c: (default_tagged_destructor_location,
4388 default_tagless_destructor_location, default_tagged_printer_location,
4389 default_tagless_printer_location): Remove since we...
4390 (default_tagged_destructor, default_tagless_destructor,
4391 default_tagged_printer, default_tagless_printer): ... change the type
4392 of these to code_props.
4393 (symbol_new, semantic_type_new, symbol_destructor_set,
4394 semantic_type_destructor_set, symbol_destructor_get,
4395 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4396 symbol_check_alias_consistency, default_tagged_destructor_set,
4397 default_tagless_destructor_set, default_tagged_printer_set,
4398 default_tagless_printer_set): Update.
4399 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4400 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4401 code_props members.
4402 (symbol_print): Use SYMBOL_CODE_PRINT.
4403
4404 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4405
4406 Use the new code_props interface for rule actions.
4407 * src/symlist.h (symbol_list): Replace action, action_location, and
4408 used members with a code_props action_props member.
4409 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4410 grammar_midrule_action, grammar_current_rule_merge_set,
4411 grammar_current_rule_symbol_append, packgram): Update.
4412 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4413 * src/scan-code.l (handle_action_dollar): Update.
4414 (translate_rule_action): Remove, no longer used.
4415 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4416
4417 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4418
4419 Use the new code_props interface in parse-gram.y.
4420 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4421 Update all uses of translate_* functions to use the new code_props
4422 interface and to use gram_scanner_last_string_free and
4423 code_scanner_last_string_free where possible.
4424 (grammar_declaration): symbol_list_destructor_set and
4425 symbol_list_printer_set now perform the translation, so don't do it
4426 here. Use gram_scanner_last_string_free where possible.
4427 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4428 translate_code): Remove, no longer used.
4429 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4430 symbol_list_printer_set): Perform code translation here rather than
4431 depending on the caller to do so.
4432
4433 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4434 * src/scan-gram.h (gram_last_string): Remove declaration.
4435 * src/scan-gram.l (last_string): Declare it static.
4436
4437 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4438
4439 Encapsulate code properties and related functionality for the various
4440 destructors, printers, and actions into a code_props structure and
4441 interface. This patch merely implements code_props in scan-code.h and
4442 scan-code.l. Future patches will rewrite other modules to use it.
4443 Discussed starting at
4444 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4445 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4446 consistently initialize const structs that have an empty location
4447 field.
4448 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4449 to ensure consistency.
4450 * src/scan-code.h (code_props): New structure.
4451 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4452 function, macro, and const global variable for initializing a
4453 code_props with no code.
4454 (code_props_plain_init, code_props_symbol_action_init,
4455 code_props_rule_action_init, code_props_translate_code): The rest of
4456 the new code_props functional interface. Among other things, the init
4457 functions set the code_props kind field so that
4458 code_props_translate_code will know whether to behave like
4459 translate_symbol_action, translate_rule_action, or translate_code.
4460 These old translate functions must remain until all other modules are
4461 updated to use the new code_props interface.
4462 (code_scanner_last_string_free): New function similar to
4463 gram_scanner_last_string_free.
4464 (code_scanner_free): Add documentation.
4465 * src/scan-code.l: Implement the new interface.
4466 (code_lex): Make it static, add a code_props* argument, and remove the
4467 rule argument.
4468 (last_string): New static global similar to the one in scan-gram.l.
4469 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4470 instead of rule.
4471 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4472 code_props since Bison may one day use this information for destructors
4473 and printers.
4474 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4475 (handle_action_dollar): Use symbol_list_n_get and set used flag
4476 directly since symbol_list_n_used_set is removed.
4477 (translate_action): Add a code_props* argument and remove the rule,
4478 action, and location arguments. Pass the code_props* on to code_lex.
4479 (translate_rule_action, translate_symbol_action, translate_code):
4480 Rewrite as wrappers around the new code_props interface.
4481 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4482 it would eventually need to break the encapsulation of code_props.
4483
4484 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4485
4486 * etc/.cvsignore: New.
4487
4488 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4489
4490 Add maintainer-push-check to run maintainer-check using push parsing in
4491 place of pull parsing where available.
4492 * Makefile.am (maintainer-push-check): New.
4493 * data/bison.m4 (b4_use_push_for_pull_if): New.
4494 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4495 appropriately based on their existing values.
4496 (yypush_parse): Don't print push-parser-specific diagnostics if push
4497 parsing is being used in place of pull parsing.
4498 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4499 push.c.
4500 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4501 variable, and insert b4_use_push_for_pull_flag into muscles.
4502 * tests/Makefile.am (maintainer-push-check): New.
4503
4504 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4505
4506 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4507 (whether successful or failed) so that yypush_parse can be invoked
4508 again to start a new parse using the same yypstate.
4509 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4510 check multiple yypull_parse invocations on the same yypstate. For pull
4511 mode, extend to check multiple yyparse invocations.
4512 (Exploding the Stack Size with Alloca): Extend to try with
4513 %push-pull-parser.
4514 (Exploding the Stack Size with Malloc): Likewise.
4515
4516 * tests/calc.at (Simple LALR Calculator): Don't specify
4517 %skeleton "push.c" since %push-pull-parser implies that now.
4518 * tests/headers.at (export YYLTYPE): Don't check for the push
4519 declarations. Otherwise, this test case can't be used to see if push
4520 mode can truly emulate pull mode.
4521 * tests/input.at (Torturing the Scanner): Likewise.
4522 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4523 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4524 AT_YACC_IF, which now includes the case of push mode since %skeleton
4525 need not be used for push mode. This will be more intuitive once
4526 push.c is renamed to yacc.c.
4527
4528 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4529
4530 For push mode, convert yyparse from a macro to a function, invoke yylex
4531 instead of passing a yylexp argument to yypull_parse, and don't
4532 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4533 Discussed starting at
4534 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4535 * data/bison.m4 (b4_pull_if): New.
4536 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4537 * data/push.c: Improve M4 quoting a little.
4538 (b4_generate_macro_args, b4_parenthesize): Remove.
4539 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4540 any time a pull parser is requested.
4541 Don't #define this as a wrapper around yypull_parse. Instead, when
4542 both push and pull are requested, make it a function that does that
4543 same thing.
4544 (yypull_parse): If there's a b4_prefix, #define this to
4545 b4_prefix[pull_parse] when both push and pull are requested.
4546 Don't define this as a function unless both push and pull are
4547 requested.
4548 Remove the yylexp argument and hard-code yylex invocation instead.
4549 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4550 %push-parser.
4551 * src/getargs.c (pull_parser): New global initialized to true.
4552 * getargs.h (pull_parser): extern it.
4553 * src/output.c (prepare): Insert pull_flag muscle.
4554 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4555 (prologue_declaration): Set both push_parser and pull_parser = true for
4556 %push-pull-parser. Set push_parser = true and pull_parser = false for
4557 %push-parser.
4558 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4559 %push-parser since there's no backward-compatibility concern here.
4560 Scan %push-pull-parser.
4561 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4562 instead of %push-parser.
4563 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4564 prototype it in the module that calls yyparse.
4565 * tests/input.at (Torturing the Scanner): Likewise.
4566 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4567
4568 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4569
4570 Update etc/bench.pl. Optimize push mode a little (the yyn change
4571 deserves most of the credit).
4572 * Makefile.am (SUBDIRS): Add etc subdirectory.
4573 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4574 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4575 yytoken, yyval, and yyloc declarations to...
4576 (yyparse or yypush_parse): ... here to improve performance. For
4577 yypush_parse invocations after the first, be sure to assign yyn its old
4578 value again.
4579 (yypstate_new): Don't bother initializing the yyresult field since the
4580 initial value isn't used.
4581 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4582 remove the #define that, in push mode, set it to yyps->NAME.
4583 * etc/Makefile.am: New.
4584 * etc/bench.pl: Remove and build it instead from...
4585 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4586 "tests/bison" from the build directory by default rather than just
4587 invoking "bison" from $PATH.
4588 (calc_grammar): Update push parser code: don't declare yylval globally,
4589 don't define yyparse_wrapper, and don't #define yyparse.
4590 (bench_grammar): Update to check all working combinations of yacc.c,
4591 push.c, impure, pure, pull, and push.
4592
4593 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4594
4595 For push mode, add pull wrappers around yypush_parse.
4596 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4597 (yypull_parse): New function wrapping yypush_parse.
4598 (yyparse): New #define wrapping yypull_parse.
4599 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4600 is declared.
4601 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4602 prototype yylex in the module that calls yyparse, and don't prototype
4603 yyparse there. Otherwise, the yyparse expansion won't compile.
4604 * tests/input.at (Torturing the Scanner): Likewise.
4605
4606 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4607
4608 Enable push parsers to operate in impure mode. Thus, %push-parser no
4609 longer implies %pure-parser. The point of this change is to move
4610 towards being able to test the push parser code by running the entire
4611 test suite as if %push-parser had been declared.
4612 * data/push.c (yypush_parse): For impure mode, remove the
4613 yypushed_char, yypushed_val, and yypushed_loc arguments.
4614 Instead, declare these as local variables initialized to the global
4615 yychar, yylval, and yylloc.
4616 For the first yypush_parse invocation only, restore the initial values
4617 of these global variables when it's time to read a token since they
4618 have been overwritten.
4619 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4620 %push-parser.
4621 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4622 %pure-parser along with %push-parser since this test case was designed
4623 for pure push parsers.
4624 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4625 (AT_YACC_OR_PUSH_IF): New.
4626 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4627 add a note that it's still wrong for some cases (as it has been for a
4628 while).
4629 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4630 %push-parser no longer implies %pure-parser.
4631
4632 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4633
4634 Remove some unnecessary differences between the pull parser code and
4635 the push parser code. This patch enables yynerrs in push mode.
4636 * data/push.c: Reformat M4 a little.
4637 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4638 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4639 because push mode is on. Instead, if pure mode is on, move yynerrs
4640 to...
4641 (b4_declare_parser_state_variables): ... here.
4642 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4643 to yyps->NAME so it can be used in yypush_parse.
4644 (yypush_parse): Don't omit uses of yynerrs in push mode.
4645
4646 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4647
4648 Fix bug such that the first pushed token's value and location are
4649 sometimes overwritten (sometimes by %initial-action) before being used.
4650 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4651 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4652 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4653 more closely mimic the pull parser logic.
4654 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4655 time to read a token, which is after any initialization of yylval and
4656 yylloc.
4657 (gottoken): Rename label to...
4658 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4659 user namespace.
4660
4661 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4662
4663 Rearrange initialization of the parser state variables so that the
4664 skeleton doesn't have to have a copy for pull mode and another for push
4665 mode. This patch also fixes at least a bug such that yylloc was not
4666 initialized (with b4_location_initial_line and
4667 b4_location_initial_column) upon calling yypush_parse. However, that
4668 initialization now overwrites the first token's location;
4669 %initial-action assigning @$ already did the same thing, and both bugs
4670 will be fixed in a later patch.
4671 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4672 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4673 yyss, yyvs, yyls, and yystacksize.
4674 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4675 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4676 yylsp.
4677 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4678 yyps->NAME so it can be used in yypush_parse.
4679 (yyparse or yypush_parse): For yypush_parse, don't print the
4680 "Starting parse" diagnostic for invocations after the first.
4681 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4682 yypush_parse, only do it for the first invocation.
4683 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4684 initialization to occur in yypush_parse but only on the first
4685 invocation.
4686
4687 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4688
4689 * data/push.c: Add CPP guards around push parser declarations in both
4690 the header and the code file.
4691 In the code file, move the push parser declarations to the same place
4692 they appear in the header file.
4693 Clean up the M4 some, especially the inconsistent underquoting in
4694 some b4_c_function_def and b4_c_function_decl uses.
4695
4696 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4697
4698 Encapsulate the push parser state variables into an M4 macro so the
4699 push skeleton doesn't have to list them again for pull mode's yyparse.
4700 For push mode, remove yypush_parse's local equivalents of these
4701 variables to eliminate unnecessary copying between the two sets at
4702 run-time. This patch also fixes at least a bug related to multiple
4703 %initial-action invocations in push mode.
4704 * data/push.c (b4_declare_parser_variables): Rename to...
4705 (b4_declare_scanner_communication_variables): ... this for clarity and
4706 update both uses.
4707 (b4_declare_yyparse_variables): Remove and move its contents to the one
4708 spot where it was invoked.
4709 (b4_declare_parser_state_variables): New macro containing the parser
4710 state variables required by push mode.
4711 (struct yypstate): Replace all fields but yynew with
4712 b4_declare_parser_state_variables.
4713 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4714 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4715 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4716 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4717 parser state variable declarations with
4718 b4_declare_parser_state_variables.
4719 Don't initialize parser state variables when calling yypush_parse since
4720 yypstate_new already does that.
4721 Invoke the user's initial action only upon the first yypush_parse
4722 invocation.
4723 Remove all code that copies between the local parser state variables
4724 and the yypstate.
4725
4726 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4727
4728 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4729 prevent a name collision in a future patch where these names will
4730 sometimes be #define'd.
4731 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4732 since it no longer has the same name as the existing argument.
4733 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4734
4735 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
4736 and Joel E. Denny <jdenny@ces.clemson.edu>
4737
4738 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4739 that the argument is case-insensitive, and there's no `=' here.
4740 For the %skeleton entry, mention that %language is better.
4741 (Bison Options): Likewise for --language and --skeleton. Move the
4742 --skeleton entry so that the `Tuning the parser' section is sorted
4743 alphabetically on long options.
4744 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4745 %language directive in detail here; cross-reference the %language
4746 documentation instead.
4747 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4748 `%require "2.3b"' so that the example is always up-to-date.
4749 (Table of Symbols): Add entries for %language and %skeleton.
4750 * examples/extexi (normalize): Instead of replacing every %require
4751 argument with the current Bison version, just substitute for
4752 `@value{VERSION}'. This guarantees that we're testing what actually
4753 appears in the documentation.
4754 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4755 rather than `@VERSION@'.
4756
4757 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4758
4759 * NEWS: Reword the %language news a bit, and put it earlier.
4760
4761 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4762 Rewrite to simplify the logic.
4763 (language_argmatch): Likewise.
4764 (program_name): We now own this var.
4765 * src/getargs.h (struct bison_language): Use char[] rather than
4766 const char *.
4767
4768 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4769 Java is supported.
4770 * src/complain.c (program_name): Remove decl; no longer needed.
4771 * src/main.c (program_name): Remove; now belongs to getargs.
4772
4773 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
4774
4775 * NEWS: Document %language.
4776
4777 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4778
4779 * data/c-skel.m4, data/c++-skel.m4: New files.
4780 * data/glr.c: Complain on push parsers.
4781
4782 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4783 over %skeleton.
4784 (Decl Summary): Document %language and %skeleton.
4785 (Command line): Document -L.
4786
4787 * examples/extexi: Rewrite %require directive.
4788 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4789
4790 * src/files.c (compute_exts_from_gc): Look in language structure
4791 for .y extension.
4792 (compute_file_name_parts): Check whether .tab should be added.
4793 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4794 (language, skeleton_arg, language_argmatch): New.
4795 (long_options): Add --language.
4796 (getargs): Use skeleton_arg, add -L/--language.
4797 * src/getargs.h: Include location.h.
4798 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4799 * src/output.c (prepare): Pick default skeleton from struct language.
4800 Don't dispatch C skeletons here.
4801 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4802 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4803 * src/scan-gram.l ("%language"): New rule.
4804
4805 * tests/calc.at: Test %skeleton and %language.
4806 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4807 (AT_GLR_IF): Look for %skeleton "glr.cc".
4808 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4809 (AT_YACC_IF): Reject %language.
4810
4811 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4812
4813 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4814 since it wasn't used; only the typedef name 'semantic_type' is needed.
4815 Also, omit trailing white space.
4816
4817 * bootstrap: Sync from coreutils.
4818 (gnulib_extra_files): Add build-aux/announce.gen.
4819 (slurp): Adjust .gitignore files like .cvsignore files.
4820 * build-aux/announce-gen: Remove from CVS, since bootstrap
4821 now creates this.
4822
4823 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4824
4825 Make %push-parser imply %pure-parser. This fixes several bugs; see
4826 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4827 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4828 pure_parser = true.
4829 * data/push.c: Don't bother testing b4_push_if when deciding whether
4830 to expand b4_declare_parser_variables globally.
4831 (yypush_parse): Likewise in here.
4832
4833 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4834 (yy_reduce_print): Reformat M4 for readability.
4835
4836 2006-12-15 Bob Rossi <bob@brasko.net>
4837 and Joel Denny <jdenny@ces.clemson.edu>
4838
4839 * data/push.c (yypstate): Add typedef, and update all uses of
4840 struct yypstate to just yypstate.
4841 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4842
4843 2006-12-14 Bob Rossi <bob@brasko.net>
4844
4845 * data/push.c (yypush_parse): Declare prototype regardless of
4846 %locations option.
4847
4848 2006-12-14 Bob Rossi <bob@brasko.net>
4849
4850 * data/push.c (yyparse): Remove the prototype and the #define when in
4851 push-parser mode.
4852
4853 2006-12-13 Bob Rossi <bob@brasko.net>
4854
4855 * data/push.c (yypstate_init): Rename to...
4856 (yypstate_new): ... this and use b4_c_function_def.
4857 (yypstate_delete): New.
4858 (yypush_parse): Change parameters yynval and yynlloc to be const.
4859 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
4860 yypstate_delete functions.
4861
4862 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
4863
4864 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
4865 strange test case titles. Reported by Bob Rossi.
4866
4867 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
4868
4869 * TODO: Add pointer to Sylvain Schmitz's work on static detection
4870 of potential ambiguities in GLR grammers.
4871
4872 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
4873
4874 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
4875 `bison ', use m4_index instead of m4_substr since chopping up a string
4876 containing M4-special characters causes problems here.
4877
4878 Fix a couple of bugs related to special characters in user-specified
4879 file names, and make it easier for skeletons to compute output file
4880 names with the same file name prefix as Bison-computed output file
4881 names.
4882 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
4883 b4_parser_file_name and b4_spec_defines_file instead of
4884 @output_parser_name@ and @output_header_name@, which are now redundant.
4885 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
4886 b4_parser_file_name, b4_spec_defines_file, and the new
4887 @basename(FILENAME@) instead of @output_parser_name@ and
4888 @output_header_name@, which inappropriately escaped the file names as
4889 C string literals.
4890 * src/files.c (all_but_ext): Remove static qualifier.
4891 (compute_output_file_names): Move `free (all_but_ext)' to...
4892 (output_file_names_free): ... here since all_but_ext is needed later.
4893 * src/files.h (all_but_ext): Extern.
4894 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
4895 exactly what MUSCLE_INSERT_STRING used to do.
4896 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
4897 characters are escaped properly.
4898 * src/output.c (prepare): Define muscle file_name_all_but_ext as
4899 all_but_ext.
4900 For pkgdatadir muscle, maintain previous functionality by using
4901 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
4902 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
4903 digraphs would never be expanded. Hopefully no one has M4-special
4904 characters in his Bison installation path.
4905 * src/scan-skel.l: Don't parse @output_header_name@ and
4906 @output_parser_name@ anymore since they're now redundant.
4907 In @output, use decode_at_digraphs.
4908 Parse a new @basename command that invokes last_component.
4909 (decode_at_digraphs): New.
4910 (BASE_QPUTS): Remove unused.
4911 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
4912 (Output file name): New tests.
4913
4914 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
4915
4916 Warn about output files that are generated by the skeletons and that
4917 conflict with other output files.
4918 * data/glr.c: Don't generate the header file here when glr.cc does.
4919 * src/files.c (file_names, file_names_count): New static globals.
4920 (compute_output_file_names): Invoke output_file_name_check for files
4921 not generated by the skeletons and remove existing checks.
4922 (output_file_name_check): New function that warns about conflicting
4923 output file names.
4924 (output_file_names_free): Free file_names.
4925 * src/files.h (output_file_name_check): Declare.
4926 * src/scan-skel.l: Invoke output_file_name_check for files generated by
4927 the skeletons.
4928 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
4929 (Conflicting output files): New tests.
4930
4931 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4932
4933 * doc/bison.texinfo: Fix a couple of typos.
4934
4935 2006-12-08 Bob Rossi <bob@brasko.net>
4936
4937 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
4938 Rename to...
4939 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
4940 update all uses.
4941 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
4942 (yypush_parse): Rename yypvars argument to yyps and remove redundant
4943 local pv.
4944 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
4945 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
4946
4947 2006-12-07 Bob Rossi <bob@brasko.net>
4948 and Joel Denny <jdenny@ces.clemson.edu>
4949
4950 * data/push.c (yypvarsinit): Change return type from void* to struct
4951 yypvars*. No longer cast to void* on return.
4952 (struct yypvars): Remove yylen since it need not be remembered between
4953 yypushparse invocations.
4954 (yypushparse): Don't copy between yylen and pv->yylen.
4955
4956 2006-12-05 Bob Rossi <bob@brasko.net>
4957
4958 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
4959 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
4960 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
4961 (struct yypvars): Remove b4_declare_parser_variables.
4962 (yypvarsinit): Remove init code for removed variables.
4963 (global scope): Do not declare b4_declare_parser_variables if
4964 push or pure mode.
4965 (yypushparse): Add b4_declare_parser_variables.
4966 Init new local variables, and remove init code for removed
4967 yypvars variables.
4968 (yyparse): Delete.
4969 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
4970 and yyparse for other modes.
4971 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
4972 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
4973 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
4974 (AT_PURE_LEX_IF): True if pure or push parser.
4975
4976 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
4977
4978 Document Yacc prologue alternatives and default %destructor's and
4979 %printer's as experimental. Don't mention Java yet. Discussed at
4980 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
4981 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
4982 (2.3a): Annotate this entry to say the old forms of these features were
4983 also experimental.
4984 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
4985 Table of Symbols): Say they're experimental. Comment out any mention
4986 of Java (we'll want this back eventually).
4987
4988 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4989
4990 Support a file name argument to %defines. Deprecate `=' in
4991 %file-prefix, %name-prefix, and %output. Discussed at
4992 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
4993 * NEWS (2.3a+): Mention.
4994 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
4995 form of %defines, and remove `=' from entries for %file-prefix,
4996 %name-prefix, and %output.
4997 * src/parse-gram.y (prologue_declaration): Implement.
4998 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
4999 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5000 all but one occurrence of %name-prefix.
5001 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5002 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5003 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5004 occurrence of each of %file-prefix and %output. Add check for %defines
5005 with argument.
5006 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5007 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5008 Remove the `=' from %output.
5009
5010 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5011
5012 Don't escape $ in test case titles since Autoconf 2.61 now does that
5013 correctly.
5014 * tests/actions.at (Default %printer and %destructor are not for error
5015 or $undefined): Here.
5016 (Default %printer and %destructor are not for $accept): Here.
5017 * tests/input.at (Invalid $n and @n): Here.
5018
5019 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5020
5021 Rename <!> to <>. Discussed starting at
5022 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5023 * NEWS (2.3a+): Update.
5024 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5025 Update.
5026 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5027 * src/scan-gram.l (INITIAL): Implement.
5028 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5029 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5030 comment.
5031 * tests/actions.at (Default tagless %printer and %destructor,
5032 Default tagged and per-type %printer and %destructor,
5033 Default %printer and %destructor are not for error or $undefined,
5034 Default %printer and %destructor are not for $accept,
5035 Default %printer and %destructor for mid-rule values): Update.
5036 * tests/input.at (Default %printer and %destructor redeclared,
5037 Unused values with default %destructor): Update.
5038
5039 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5040
5041 Don't let %prec take a nonterminal.
5042 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5043 token.
5044 * tests/input.at (%prec takes a token): New test checking that %prec
5045 won't take a nonterminal.
5046
5047 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5048
5049 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5050 it was double-quoted.
5051 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5052 grammar is maintained with Bison's highest standards.
5053 * src/getargs.c: Fix some typos in Doxygen comments.
5054
5055 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5056
5057 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5058 later. Reported by Paul Eggert in
5059 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5060 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5061 * src/scan-code.l (translate_action): Don't bother invoking
5062 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5063 (code_scanner_free): Instead of invoking
5064 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5065 which frees more.
5066 * src/scan-gram.l (gram_scanner_free): Likewise.
5067 * src/scan-skel.l (scan_skel): Likewise.
5068
5069 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5070
5071 * src/files.c (tr): Change return type to void.
5072 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5073 has been called previously for the same key.
5074 (muscle_find): Return storage instead of value so that
5075 --enable-gcc-warnings doesn't produce warnings that the return discards
5076 const. aver that the value and storage are the same since storage
5077 could potentially be NULL when value is not.
5078 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5079 same as 0.
5080
5081 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5082
5083 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5084 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5085 us a slightly cleaner distribution, and also works.
5086 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5087 gnulib changes.
5088
5089 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5090 and Paul Eggert <eggert@cs.ucla.edu>
5091
5092 Don't let Bison leak memory except when it complains.
5093 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5094 (spec_defines_file, dir_prefix): Now char *, not const char *,
5095 since they are freed.
5096 * src/files.c: Likewise.
5097 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5098 Likewise.
5099 (tr): Now operates in-place. All uses changed.
5100 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5101 values.
5102 (compute_file_name_parts, compute_output_file_names): Don't store
5103 read-only data in variables that will be freed.
5104 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5105 src_extension, and header_extension.
5106 (output_file_names_free): New public function to free
5107 spec_verbose_file, spec_graph_file, spec_defines_file,
5108 parser_file_name, and dir_prefix.
5109 * src/getargs.c (getargs): Don't store read-only data in variables that
5110 will be freed.
5111 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5112 (which previously existed but was unused), and quotearg_free.
5113 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5114 * src/muscle_tab.c: Likewise.
5115 (muscle_entry): Make the value char const *,
5116 and add a new storage member that is char * and can be freed.
5117 (muscle_entry_free): New private function.
5118 (muscle_init): Use it instead of free.
5119 (muscle_insert, muscle_grow): Update and use new storage member.
5120 (muscle_code_grow): Free the string passed to muscle_grow
5121 since it's not needed anymore.
5122 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5123 add a new `char *code' member.
5124 ("{...}"): Declare semantic type as code.
5125 * src/scan-code.h (translate_rule_action):
5126 (translate_symbol_action, translate_code, translate_action): Return
5127 `char const *' rather than `char *' since external code should not free
5128 these strings.
5129 * src/scan-code.l: Likewise.
5130 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5131 which is "{...}" in the parser.
5132 * tests/Makefile.am (maintainer-check-valgrind): Set
5133 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5134 Valgrind.
5135 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5136 complain.
5137 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5138 expecting a non-zero exit status sets --leak-check=summary and
5139 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5140 this case, and we don't want to hear about it.
5141
5142 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5143
5144 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5145 instead of from the template, to simplify configuration a bit.
5146 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5147 and m4/wint_t.m4, as they are needed with the latest gnulib.
5148
5149 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5150
5151 Disable unset/unused mid-rule value warnings by default, and recognize
5152 --warnings=midrule-values to enable them. Discussed starting at
5153 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5154 * NEWS (2.3a+): Mention.
5155 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5156 warnings): Add entry for midrule-values subargument.
5157 * src/reader.c (symbol_should_be_used): Don't return true just because
5158 the value is a set/used mid-rule value unless
5159 --warnings=midrule-values was specified.
5160 * tests/input.at (Unused values, Unused values before symbol
5161 declarations): Run tests with and without --warnings=midrule-values.
5162
5163 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5164 than LIST_FREE directly.
5165
5166 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5167
5168 Finish implementing --warnings=error, which should not be implied by
5169 --warnings=all (or by its synonyms -W and --warnings without
5170 subarguments).
5171 * src/complain.c (set_warning_issued): New function to report that
5172 warnings are being treated as errors and to record an error if so.
5173 Invoke...
5174 (warn_at, warn): ... here.
5175 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5176 "error - warnings are errors" does not appear above "all - all of the
5177 above".
5178 (getargs): For -W and --warnings without subarguments, don't let
5179 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5180 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5181
5182 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5183
5184 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5185 empty subargument list. For example: `bison --warnings= parser.y'.
5186
5187 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5188
5189 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5190 the parser header file so that gcc doesn't warn.
5191
5192 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5193
5194 Split the default %destructor/%printer into two kinds: <*> and <!>.
5195 Discussed starting at
5196 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5197 * NEWS (2.3a+): Mention.
5198 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5199 previous change today related to mid-rules.
5200 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5201 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5202 (TYPE_TAG_ANY): Add as <*>.
5203 (TYPE_TAG_NONE): Add as <!>.
5204 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5205 for <*> and <!>.
5206 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5207 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5208 * src/symlist.c (symbol_list_default_new): Split into tagged and
5209 tagless versions.
5210 (symbol_list_destructor_set, symbol_list_printer_set): Split
5211 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5212 SYMLIST_DEFAULT_TAGLESS.
5213 * src/symlist.h: Update symbol_list_default*_new prototypes.
5214 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5215 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5216 * src/symtab.c (default_destructor, default_destructor_location,
5217 default_printer, default_printer_location): Split each into tagged and
5218 tagless versions.
5219 (symbol_destructor_get, symbol_destructor_location_get,
5220 symbol_printer_get, symbol_printer_location_get): Implement tagged
5221 default and tagless default cases.
5222 (default_destructor_set, default_printer_set): Split each into tagged
5223 and tagless versions.
5224 * src/symtab.h: Update prototypes.
5225 * tests/actions.at (Default %printer and %destructor): Rename to...
5226 (Default tagless %printer and %destructor): ... this, and extend.
5227 (Per-type %printer and %destructor): Rename to...
5228 (Default tagged and per-type %printer and %destructor): ... this, and
5229 extend.
5230 (Default %printer and %destructor for user-defined end token): Extend.
5231 (Default %printer and %destructor are not for error or $undefined):
5232 Update.
5233 (Default %printer and %destructor are not for $accept): Update.
5234 (Default %printer and %destructor for mid-rule values): Extend.
5235 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5236 (Unused values with default %destructor): Extend.
5237
5238 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5239
5240 Don't apply the default %destructor/%printer to an unreferenced midrule
5241 value. Mentioned at
5242 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5243 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5244 like $@n instead of just @n so that the default %destructor/%printer
5245 logic doesn't see them as user-defined symbols.
5246 (symbol_is_dummy): Check for both forms of the name.
5247 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5248 name for which the midrule value is referenced in any action.
5249 * tests/actions.at (Default %printer and %destructor for mid-rule
5250 values): New test.
5251 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5252 for change to dummy symbol names.
5253
5254 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5255
5256 Warn about unset midrule $$ if the corresponding $n is used.
5257 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5258 $n usage.
5259 (packgram): Before invoking grammar_rule_check on any rule, make sure
5260 all actions have already been scanned in order to set `used' flags.
5261 Otherwise, checking that a midrule's $$ is set will not always work
5262 properly because the midrule check must forward-reference the midrule's
5263 parent rule.
5264 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5265 warning.
5266
5267 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5268
5269 More improvements to the documentation of the prologue alternatives:
5270 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5271 Bison manual.
5272 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5273 some text to clarify the relative importance of the new directives and
5274 to show how these directives may be viewed as code labels.
5275
5276 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5277
5278 Similar to the recently removed %before-header, add %code-top as the
5279 alternative to the pre-prologue. Mentioned at
5280 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5281 Also, let the prologue alternatives appear in the grammar section.
5282 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5283 (prologue_declaration): Move the existing prologue alternatives to...
5284 (grammar_declaration): ... here and add %code-top.
5285 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5286
5287 Clean up and extend documentation for the prologue alternatives.
5288 * NEWS (2.3a+): Describe prologue alternatives.
5289 * doc/bison.texinfo (Prologue): Move discussion of prologue
5290 alternatives to...
5291 (Prologue Alternatives): ... this new section, and extend it to discuss
5292 all 4 directives in detail.
5293 (Table of Symbols): Clean up discussion of prologue alternatives and
5294 add %code-top.
5295
5296 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5297
5298 DJGPP specific issues.
5299
5300 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5301 config.bat accordingly.
5302 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5303 * djgpp/config.site: Likewise.
5304
5305 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5306
5307 Replace %*-header with %provides, %requires, %code. See discussion at
5308 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5309
5310 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5311 (b4_user_start_header): Remove.
5312 * data/glr.c: Use new macros instead of b4_*start_header
5313 and b4_*end_header.
5314 * data/glr.cc: Likewise.
5315 * data/lalr1.cc: Likewise.
5316 * data/push.c: Likewise.
5317 * data/yacc.c: Likewise.
5318
5319 * doc/bison.texinfo: Remove %before-header, rename
5320 %{start,end,after}-header to %requires, %provides, %code.
5321
5322 * src/parse-gram.y: Likewise (also rename token names accordingly).
5323 * src/scan-gram.l: Likewise.
5324 * tests/actions.at: Likewise.
5325
5326 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5327
5328 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5329 Problem reported by Joel E. Denny.
5330
5331 2006-10-14 Jim Meyering <jim@meyering.net>
5332
5333 (Sync from coreutils.)
5334 Work also when the working directory (with e.g. coreutils sources)
5335 is version controlled with git, rather than CVS.
5336 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5337 rather than CVS.
5338 In messages and comments, say e.g., "checked-out sources",
5339 rather than "CVS sources".
5340 (version_controlled_file): New function. Work for git as well as
5341 for CVS. Don't use grep's -q option.
5342 (slurp): Call it here, in place of CVS-specific code.
5343
5344 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5345
5346 Fix testsuite for ./configure --enable-gcc-warnings:
5347 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5348 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5349 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5350 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5351 * test/regression.at (Diagnostic that expects two alternatives):
5352 Likewise.
5353
5354 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5355
5356 * bootstrap.conf (gnulib_modules): Add config-h.
5357 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5358 worry about HAVE_CONFIG_H.
5359 * lib/abitset.c: Likewise.
5360 * lib/bitset.c: Likewise.
5361 * lib/bitset_stats.c: Likewise.
5362 * lib/bitsetv-print.c: Likewise.
5363 * lib/bitsetv.c: Likewise.
5364 * lib/ebitset.c: Likewise.
5365 * lib/get-errno.c: Likewise.
5366 * lib/lbitset.c: Likewise.
5367 * lib/subpipe.c: Likewise.
5368 * lib/timevar.c: Likewise.
5369 * lib/vbitset.c: Likewise.
5370 * lib/bitset.c: Include "bitset.h" first, to test interface.
5371 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5372 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5373 * lib/bitsetv.c: Include "bitsetv.h" first.
5374 * lib/get-errno.c: Include "get-errno.h" first.
5375 * m4/.cvsignore: Add config-h.m4.
5376 * tests/actions.at (Default %printer and %destructor for ...):
5377 Adjust expected line numbers in output to reflect removal of #if
5378 HAVE_CONFIG_H lines.
5379 * tests/glr-regression.at (Missed %merge type warnings when ...):
5380 Likewise.
5381 * tests/regression.at (Braced code in declaration in rules section):
5382 Likewise.
5383 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5384 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5385 Include <config.h> unconditionally.
5386
5387 * bootstrap: Sync from coreutils, as follows:
5388
5389 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5390
5391 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5392 variable was sometimes used without being initialized. This
5393 messed up the installation of the INSTALL file in some cases.
5394
5395 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5396
5397 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5398 --copy. Inspired by a suggestion from Bruno Haible.
5399
5400 2006-10-03 Jim Meyering <jim@meyering.net>
5401
5402 * bootstrap: Undo last change to this file, since now gnulib-tool
5403 sticks with the automake default in generating dependencies.
5404
5405 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5406
5407 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5408 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5409
5410 * doc/bison.1: Add copyright notice.
5411
5412 * data/glr.c: Don't include <stdarg.h>; not used.
5413
5414 * NEWS: The -g and --graph options now output graphs in Graphviz
5415 DOT format, not VCG format.
5416 * doc/bison.1: Likewise.
5417 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5418 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5419 of this change in
5420 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5421 * TODO: Remove Graphviz entry.
5422 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5423 remove vcg.c, vcg.h, vcg_defaults.h.
5424 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5425 * src/graphviz.c, src/graphviz.h: New files.
5426 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5427 * src/files.h: Make comment more generic.
5428 * src/main.c (main): Likewise.
5429 * src/print_graph.h: Likewise.
5430 * src/getargs.c (usage): Make usage description more generic.
5431 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5432 (static_graph, fgraph): Remove. All uses changed to pass
5433 arguments instead of sharing a static var.
5434 (print_core, print_actions, print_state, print_graph):
5435 Output graphviz format rather than VCG format.
5436 * tests/.cvsignore: Remove *.vcg; add *.dot.
5437 * tests/output.at: Expect *.dot files, not *.vcg files.
5438
5439 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5440 accommodates the 2006-10-08 change.
5441
5442 2006-10-11 Bob Rossi <bob@brasko.net>
5443
5444 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5445 (b4_yyssa, b4_yyerror_range): New macros.
5446 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5447 (yypvarsinit): Remove init of removed fields.
5448 (yypushparse): Remove use of removed fields; use new macros instead.
5449
5450 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5451
5452 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5453 in a push parser. Reindent slightly to match yacc.c better.
5454
5455 2006-10-11 Bob Rossi <bob@brasko.net>
5456
5457 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5458 yymsg_alloc fields.
5459 (yypvarsinit, yypushparse): Remove init of removed fields.
5460 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5461
5462 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5463
5464 * THANKS: Add Paolo Bonzini and Bob Rossi.
5465
5466 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5467
5468 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5469 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5470 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5471 b4_define_user_cde and uses): Remove.
5472 (b4_comment, b4_prefix, b4_sync_start): New.
5473 * data/bison.m4: New file, with most of the content removed from c.m4.
5474 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5475 * src/output.c (output_skeleton): Pass bison.m4.
5476 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5477 only if specified.
5478
5479 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5480
5481 Fix test failure reported by Tom Lane in
5482 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5483 and try to make such failures easier to catch in the future.
5484 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5485 that's now the caller's responsibility.
5486 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5487 Set yychar = YYEOF if it's negative.
5488 * tests/actions.at (yylex): Abort if asked to read past EOF.
5489 * tests/conflicts.at (yylex): Likewise.
5490 * tests/cxx-type.at (yylex): Likewise.
5491 * tests/glr-regression.at (yylex): Likewise.
5492 * tests/input.at (yylex): Likewise.
5493 * tests/regression.at (yylex): Likewise.
5494 * tests/torture.at (yylex): Likewise.
5495
5496 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5497
5498 Fix problems with translating English-language diagnostics.
5499 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5500 respect to bison-runtime pot generation. The YY_ stuff
5501 wasn't being captured.
5502 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5503 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5504 * runtime-po/POTFILES.in: Add data/push.c.
5505
5506 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5507
5508 Merge bootstrap changes from coreutils.
5509
5510 2006-09-28 Jim Meyering <jim@meyering.net>
5511
5512 Automatically generated dependencies are important even
5513 when all of the sources in a directory come from gnulib.
5514 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5515 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5516
5517 2006-09-23 Jim Meyering <jim@meyering.net>
5518
5519 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5520
5521 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5522
5523 * bootstrap: Add support for --force.
5524 (usage): New function. Describe usage less tersely.
5525 (CVS_only_file): New var.
5526
5527 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5528
5529 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5530 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5531 Adjust white space and comments to match GNU style better.
5532
5533 2006-09-20 Bob Rossi <bob@brasko.net>
5534
5535 * data/push.c (yyresult_get): Remove function.
5536 (YYPUSH_MORE): Add #define.
5537 (yypushparse): Modify return value.
5538
5539 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5540
5541 * stamp-h.in: Remove; no longer needed.
5542 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5543 Remove config.h, config.hin, intl (no longer created).
5544 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5545 stamp-h1.
5546
5547 Sync bootstrap from coreutils, as follows:
5548
5549 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5550
5551 * bootstrap (symlink_to_gnulib): New function.
5552 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5553 to copies-of-gnulib.
5554 (cp_mark_as_generated, slurp, gnulib_files):
5555 Avoid making a copy if it's the same as the old version.
5556 (gnulib_files): Add support for this variable (used by Bison).
5557
5558 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5559
5560 * src/getargs.c (usage): Rework to use conventions similar to
5561 coreutils, to make translation a bit easier and the code a bit
5562 smaller. Problem reported by Tim Van Holder.
5563
5564 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5565
5566 Use some of gnulib's new modules, taken from coreutils.
5567
5568 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5569 * bootstrap.conf: New file.
5570 (gnulib_modules): Add configmake, inttypes, unistd.
5571 (XGETTEXT_OPTIONS): Add complain, complain_at,
5572 fatal, fatal_at, warn, warn_at, unexpected_end.
5573 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5574 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5575 (gl_EARLY): Add.
5576 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5577 (gl_INIT): Add
5578 (GNULIB_AUTOCONF_SNIPPET): Remove.
5579 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5580 the pickiest.
5581 * lib/.cvsignore: Add inttypes_.h.
5582 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5583 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5584 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5585 no-longer-necessary initializations.
5586 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5587 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5588 use the unistd module.
5589 * src/system.h: Likewise.
5590 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5591 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5592 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5593 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5594 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5595 * src/system.h: Include inttypes.h unconditionally, now that we
5596 use the inttypes module. Don't bother to include stdint.h, since
5597 inttypes.h now does that for us.
5598 (LOCALEDIR): Remove, now that we use the configmake module.
5599 * src/getargs.c: Include configmake.h.
5600 * src/main.c: Likewise.
5601 * src/output.c: Likewise.
5602 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5603 not from $abs_top_builddir, since config.h moved.
5604
5605
5606 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5607 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5608
5609 * src/parse-gram.y (symbol_declaration): Don't put statements
5610 before declarations; it's not portable to C89.
5611 * src/scan-code.l (handle_action_at): Likewise.
5612
5613 * src/scan-code.l: Always initialize braces_level; the old code
5614 left it uninitialized and therefore had undefined behavior.
5615
5616 Don't attempt to redefine 'assert', since it runs afoul of
5617 systems where standard headers (mistakenly) include <assert.h>.
5618 Instead, define and use our own alternative, called 'aver'.
5619 * src/reader.c: Don't include assert.h, since we no longer
5620 use assert.
5621 * src/scan-code.l: Likewise.
5622 * src/system.h (assert): Remove, replacing with....
5623 (aver): New function, taking a bool arg. All uses changed.
5624 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5625 not merely an integer.
5626
5627 2006-09-15 Bob Rossi <bob@brasko.net>
5628
5629 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5630 * data/c.m4 (YYPUSH): New.
5631 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5632 * src/getargs.c (push_parser): New var.
5633 * src/getargs.h (push_parser): New declaration.
5634 * src/output.c (prepare): Add macro insertion of `push_flag'.
5635 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5636 (prologue_declaration): Parse %push-parser.
5637 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5638 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5639 list of removed lines from the traces observed.
5640 (AT_CHECK_CALC_LALR): Added push parser tests.
5641
5642 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5643
5644 * NEWS: Version 2.3a.
5645 * configure.ac (AC_INIT): Likewise.
5646
5647 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5648 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5649 due to header ordering dependencies. I don't know why the #define
5650 was there.
5651
5652 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5653 runtime cost when YYDEBUG is not defined, and so that some tests
5654 that used to fail now work. Problem and initial suggestion by
5655 Paolo Bonzini.
5656 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5657 * data/glr.cc (b4_parser_class_name):
5658 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5659 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5660 (yydebug_) [YYDEBUG]: New member.
5661 (yycdebug_): Now defined only if YYDEBUG.
5662 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5663 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5664 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5665 if YYYDEBUG.
5666 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5667 Define only if YYDEBUG.
5668 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5669 set_debug_level.
5670 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5671 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5672 AT_CHECK_CALC_GLR_CC that are working now.
5673
5674 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5675
5676 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5677 We don't need them in glr.cc, and glr.c defines them.
5678 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5679 assumes that defining it to anything is the same as defining
5680 it to 1. Problem reported by Paolo Bonzini.
5681
5682 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5683
5684 * data/c.m4 (b4_null, b4_case): Define.
5685 * src/output.c (prepare_symbols): Use b4_null.
5686 (user_actions_output): Use b4_case.
5687
5688 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5689
5690 * data/glr.c (b4_shared_declarations): Put start-header first,
5691 before any #includes that we generate, so that feature-test
5692 macros work. Problem reported by Michael Deutschmann in
5693 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5694 * data/lalr1.cc: Likewise.
5695 * doc/bison.texinfo (Prologue): Document that feature-test macros
5696 should be defined before any Bison declarations.
5697 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5698 that depend on location.hh after, not before, Bison decls, since
5699 we now include location.hh after the first user prologue.
5700
5701 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5702 Sander Brandenburg in
5703 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5704 Also, fix minor white space and comment issues.
5705 (Prologue): Mention that it's better to define feature-test macros
5706 before Bison declarations. Problem reported by Michael Deutschmann.
5707
5708 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5709 by Jim Meyering.
5710 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5711 This adjusts to recent gnulib changes.
5712
5713 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5714
5715 Finish implementation of per-type %destructor/%printer. Discussed
5716 starting at
5717 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5718 and
5719 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5720 * NEWS (2.3+): Add a description of this feature to the default
5721 %destructor/%printer description.
5722 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5723 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5724 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5725 list node contains a semantic type.
5726 * src/symtab.c, src/symtab.h: Extend with a table that associates
5727 semantic types with their %destructor's and %printer's.
5728 (semantic_type_from_uniqstr, semantic_type_get,
5729 semantic_type_destructor_set, semantic_type_printer_set): New functions
5730 composing the public interface of that table.
5731 (symbol_destructor_get, symbol_destructor_location_get,
5732 symbol_printer_get, symbol_printer_location_get): If there's no
5733 per-symbol %destructor/%printer, look up the per-type before trying
5734 the default.
5735 * tests/actions.at (Per-type %printer and %destructor): New test case.
5736 * tests/input.at (Default %printer and %destructor redeclared):
5737 Extend to check that multiple occurrences of %symbol-default in a
5738 single %destructor/%printer declaration is an error.
5739 (Per-type %printer and %destructor redeclared, Unused values with
5740 per-type %destructor): New test cases.
5741
5742 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5743
5744 Require default %destructor/%printer to be declared using
5745 %symbol-default instead of an empty symbol list, and start working on
5746 new per-type %destructor/%printer. Discussed at
5747 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5748 * NEWS (2.3+): Add %symbol-default to example.
5749 * bison.texinfo (Freeing Discarded Symbols): Likewise.
5750 (Table of Symbols): Add entry for %symbol-default.
5751 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5752 (generic_symlist, generic_symlist_item): New nonterminals for creating
5753 a list in which each item is a symbol, semantic type, or
5754 %symbol-default.
5755 (grammar_declaration): Use generic_symlist in %destructor and %printer
5756 declarations instead of symbols.1 or an empty list.
5757 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5758 for changes to symbol_list.
5759 * src/reader.c: Update for changes to symbol_list.
5760 * src/scan-code.l: Likewise.
5761 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5762 * src/symlist.c, src/symlist.h: Extend such that a list node may
5763 represent a semantic type or a %symbol-default in addition to just an
5764 ordinary symbol. Add switched functions for setting %destructor's and
5765 %printer's.
5766 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5767 %destructor/%printer declarations.
5768
5769 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5770
5771 Whether the default %destructor/%printer applies to a particular symbol
5772 isn't a question of whether the user *declares* that symbol (in %token,
5773 for example). It's a question of whether the user by any means
5774 *defines* the symbol at all (by simply using a char token, for
5775 example). $end is defined by Bison whereas any other token with token
5776 number 0 is defined by the user. The error token is always defined by
5777 Bison regardless of whether the user declares it with %token, but we
5778 may one day let the user define error as a nonterminal instead.
5779 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5780 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5781 the meaning of "user-defined".
5782 * tests/actions.at (Default %printer and %destructor for user-declared
5783 end token): Rename to...
5784 (Default %printer and %destructor for user-defined end token): ...
5785 this.
5786
5787 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5788 computation of whether to apply the default, don't maintain a list of
5789 every Bison-defined symbol. Instead, just check for a first character
5790 of '$', which a user symbol cannot have, and check for the error token.
5791
5792 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5793
5794 Don't apply the default %destructor or %printer to the error token,
5795 $undefined, or $accept. This change fits the general rule that the
5796 default %destructor and %printer are only for user-declared symbols,
5797 and it solves several difficulties that are described in the new test
5798 cases listed below.
5799 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5800 * tests/actions.at (Default %printer and %destructor are not for error
5801 or $undefined, Default %printer and %destructor are not for $accept):
5802 New test cases.
5803
5804 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5805
5806 Allow %start after the first rule.
5807 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5808 when parsing the first rule.
5809 (check_and_convert_grammar): Search for it here after all grammar
5810 declarations have been parsed. Skip midrules, which have dummy LHS
5811 nonterminals.
5812 * src/symtab.c (symbol_is_dummy): New function.
5813 * src/symtab.h (symbol_is_dummy): Declare it.
5814 * tests/input.at (%start after first rule): New test.
5815
5816 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5817
5818 Redo some of the previous commit: add back the ability to use
5819 non-aliased/undeclared string literals since it might be useful to
5820 those declaring %token-table.
5821 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5822 commit: don't worry about complaints from symbols_pack.
5823 * src/symtab.c (symbol_new, symbol_class_set,
5824 symbol_check_alias_consistency): Undo changes in previous commit: count
5825 each string literal as a new symbol and token, assign it a symbol
5826 number, and don't complain about non-aliased string literals.
5827 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5828 and token counts but does still set aliased tokens to the same number,
5829 symbol_pack_processor now leaves empty slots in the symbols array.
5830 Remove those slots.
5831 * tests/regression.at (Undeclared string literal): Remove test case
5832 added in previous commit since non-aliased string literals are allowed
5833 again.
5834 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5835 remove unnecessary string literal declarations.
5836 * tests/sets.at (Firsts): Likewise.
5837
5838 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5839
5840 Don't allow an undeclared string literal, but allow a string literal to
5841 be used before its declaration.
5842 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
5843 symbols_pack complained.
5844 * src/symtab.c (symbol_new): Don't count a string literal as a new
5845 symbol.
5846 (symbol_class_set): Don't count a string literal as a new token, and
5847 don't assign it a symbol number since symbol_make_alias does that.
5848 (symbol_make_alias): It's not necessary to decrement the symbol and
5849 token counts anymore. Don't assume that an alias declaration occurs
5850 before any uses of the identifier or string, and thus don't assert that
5851 one of them has the highest symbol number so far.
5852 (symbol_check_alias_consistency): Complain if there's a string literal
5853 that wasn't declared as an alias.
5854 (symbols_pack): Bail if symbol_check_alias_consistency failed since
5855 symbol_pack asserts that every token has been assigned a symbol number
5856 although undeclared string literals have not.
5857 * tests/regression.at (String alias declared after use, Undeclared
5858 string literal): New test cases.
5859 (Characters Escapes, Web2c Actions): Declare string literals as
5860 aliases.
5861 * tests/sets.at (Firsts): Likewise.
5862
5863 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
5864
5865 In the grammar scanner, STRING_FINISH unclosed constructs and return
5866 them to the parser in order to improve error messages.
5867 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
5868 SC_BRACED_CODE, SC_PROLOGUE): Implement.
5869 * tests/input.at (Unclosed constructs): New test case.
5870 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
5871 seen.
5872
5873 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
5874 unused global.
5875
5876 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
5877
5878 Handle string aliases for character tokens correctly.
5879 * src/symtab.c (symbol_user_token_number_set): If the token has an
5880 alias, check and set its alias's user token number instead of its own,
5881 which is set to indicate the alias. Previously, every occurrence of
5882 the character token in the grammar overwrote that alias indicator with
5883 the character code.
5884 * tests/input.at (String aliases for character tokens): New test.
5885
5886 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
5887
5888 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
5889
5890 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5891
5892 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
5893 to prevent failures when building on older platforms.
5894 Check for autopoint failure.
5895 Set XGETTEXT_OPTIONS to values that check for C format strings,
5896 so that translators are warned about them (this also helps
5897 prevent core dumps).
5898
5899 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
5900 function, since it simplifies our code a bit.
5901
5902 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
5903 rather than -W, so we don't get bogus warnings about sign comparisons.
5904 Add -Wpointer-arith, since that warning is useful (it reports code
5905 that does not conform to C89 and that some compilers reject).
5906 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
5907 since it's no longer needed.
5908
5909 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
5910
5911 Clean up scanners a bit.
5912 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5913 definitions so gcc won't warn when obstack_for_string is unused.
5914 * src/scan-code.l: config.h and system.h are already #include'd by
5915 scan-code-c.c, so get rid of them here.
5916 * src/scan-gram.l: Likewise.
5917 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
5918 definitions rather than duplicating the rest of it.
5919 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
5920
5921 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
5922
5923 Suppress signed/unsigned comparison warnings for yycheck.
5924 * data/c.m4 (b4_safest_int_type): New macro.
5925 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
5926 a signed int type, cast it to b4_safest_int_type first.
5927 * data/yacc.c: Likewise.
5928 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
5929 also overwritten.
5930
5931 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
5932
5933 * doc/bison.texinfo: Fix some typos.
5934
5935 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
5936
5937 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
5938 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
5939
5940 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
5941 the latest gnulib does this a different way.
5942 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
5943 translation was patched, so stop omitting it.
5944
5945 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5946
5947 Enable declaration of default %printer/%destructor. Make the parser
5948 use these for all user-declared grammar symbols for which the user does
5949 not declare a specific %printer/%destructor. Thus, the parser uses it
5950 for token 0 if the user declares it but not if Bison generates it as
5951 $end. Discussed starting at
5952 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
5953 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
5954 and
5955 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
5956 * NEWS (2.3+): Mention.
5957 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
5958 declare a %destructor for a mid-rule's semantic value. It's just
5959 impossible to declare one specific to it.
5960 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
5961 code. Describe default %destructor form.
5962 * src/parse-gram.y (grammar_declaration): Parse default
5963 %printer/%destructor declarations.
5964 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
5965 and symbol_destructor_location_get rather than accessing the destructor
5966 and destructor_location members of struct symbol.
5967 (symbol_printers_output): Likewise but for %printer's.
5968 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
5969 again.
5970 * src/symtab.c (default_destructor, default_destructor_location,
5971 default_printer, default_printer_location): New static global
5972 variables to record the default %destructor and %printer.
5973 (symbol_destructor_get, symbol_destructor_location_get,
5974 symbol_printer_get, symbol_printer_location_get): New functions to
5975 compute the appropriate %destructor and %printer for a symbol.
5976 (default_destructor_set, default_printer_set): New functions to set the
5977 default %destructor and %printer.
5978 * src/symtab.h: Prototype all those new functions.
5979 * tests/actions.at (Default %printer and %destructor): New test to
5980 check that the right %printer and %destructor are called, that they're
5981 not called for $end, and that $$ and @$ work correctly.
5982 (Default %printer and %destructor for user-declared end token): New
5983 test to check that the default %printer and %destructor are called for
5984 a user-declared end token.
5985 * tests/input.at (Default %printer and %destructor redeclared, Unused
5986 values with default %destructor): New tests to check related grammar
5987 warnings and errors.
5988
5989 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5990
5991 Clean up handling of %destructor for the end token (token 0).
5992 Discussed starting at
5993 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
5994 and
5995 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
5996
5997 Make the skeletons consistent in how they pop the end token and invoke
5998 its %destructor.
5999 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6000 state, which has token number 0, since this would invoke the
6001 %destructor for the end token.
6002 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6003 until after shifting the end token, or else it won't be popped.
6004 * data/yacc.c (yyparse): Likewise.
6005
6006 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6007 it's the end token. Upon termination, destroy an unshifted lookahead
6008 even when it's the end token.
6009 * data/lalr1.cc (yy::parser::parse): Likewise.
6010 * data/yacc.c (yyparse): Likewise.
6011
6012 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6013 value warnings for the end token when the user gives the end token a
6014 %destructor.
6015
6016 * tests/actions.at (Printers and Destructors): Test all the above.
6017
6018 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6019
6020 Update to latest gnulib and gettext versions.
6021 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6022 Add fopen-safer.
6023 (gnulib_files): Add m4/warning.m4. Don't worry about files
6024 overwritten by autopoint.
6025 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6026 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6027 rejects them.
6028 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6029 so that we can remove the intl files at a better time.
6030 (intl_files_to_remove): Remove aclocal.m4, since it gets
6031 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6032 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6033 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6034 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6035 Remove datarootdir hack; no longer needed.
6036 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6037 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6038 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6039 strdup.h.
6040 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6041 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6042
6043 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6044
6045 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6046 it with --assume-autoconf='latest-stable'.
6047
6048 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6049
6050 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6051 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6052 YYSTYPE' and `{'.
6053 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6054 those from muscle_tab.c since the old ones are misleading.
6055
6056 2006-07-13 Akim Demaille <akim@epita.fr>
6057
6058 Support %define "KEY" {VALUE}.
6059 * src/scan-code.h, src/scan-code.l (translate_action)
6060 (translate_rule_action, translate_symbol_action, translate_code):
6061 Return char *, not const char *.
6062 * src/parse-gram.y (declaration): Rename as...
6063 (prologue_declaration): this.
6064 (string_content): Remove this nonterminal, use STRING.
6065 (braceless, content, content.opt): New nonterminal.
6066 Use them.
6067 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6068 as value.
6069 * src/scan-gram.l (getargs.h): Don't include it.
6070
6071 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6072
6073 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6074 rather than a for-loop that declares a local bool variable. This
6075 should work around a compatibility problem with a Cray x1e C++
6076 compiler reported by Hung Nguyen in
6077 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6078 The for-loop was introduced in the 2004-11-17 change but I don't
6079 know why it was needed.
6080
6081 2006-07-12 Akim Demaille <akim@epita.fr>
6082
6083 * data/c.m4: Comment changes.
6084
6085 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6086
6087 * src/complain.c (error_message, ERROR_MESSAGE): New.
6088 To factor...
6089 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6090 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6091
6092 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6093
6094 * NEWS: Instead of %union, you can define and use your own union type
6095 YYSTYPE if your grammar contains at least one <type> tag.
6096 Your YYSTYPE need not be a macro; it can be a typedef.
6097 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6098 (Union Decl, Decl Summary): Document this.
6099 * data/glr.c (YYSTYPE): Implement this.
6100 * data/glr.cc (YYSTYPE): Likewise.
6101 * data/lalr1.cc (YYSTYPE): Likewise.
6102 * data/yacc.c (YYSTYPE): Likewise.
6103 * src/output.c (prepare): Output tag_seen_flag.
6104 * src/parse-gram.y (declaration, grammar_declaration):
6105 Use 'union_seen' rather than 'typed' to determine whether
6106 %union has been seen, since grammars can now be typed without
6107 %union.
6108 (symbol_declaration, type.opt, symbol_def):
6109 Keep track of whether a tag has been seen.
6110 * src/reader.c (union_seen, tag_seen): New vars.
6111 (typed): remove.
6112 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6113 * src/scan-code.l (untyped_var_seen): New variable.
6114 (handle_action_dollar): Adjust to above changes.
6115 (handle_action_dollar, handle_action_at):
6116 Improve overflow checking for outlandish numbers.
6117 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6118 avoid new diagnostics generated by above changes.
6119 * tests/regression.at (YYSTYPE typedef): Add test to check
6120 for type tags without %union.
6121
6122 * src/symlist.c (symbol_list_length): Return int, not unsigned
6123 int, since callers expect int. This may need to get revisited
6124 once we have proper integer overflow checking.
6125
6126 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6127 object is now static.
6128
6129 * src/getargs.c (flags_argmatch): Return void, not int,
6130 to pacify ./configure --enable-gcc-warnings.
6131
6132 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6133 since last_string is already defined to FLEX_PREFIX (last_string).
6134
6135 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6136
6137 Implement --warnings/-W.
6138 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6139 replaced by...
6140 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6141 Adjust callers.
6142 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6143 (warnings_args, warnings_types): New.
6144 (getargs, short_options, long_options): Accept -W/--warnings.
6145 Sort the options by alphabetical order, upper case letter right
6146 before its lower case.
6147
6148 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6149
6150 Change %merge result type clash warnings to errors. Discussed at
6151 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6152 * src/reader.c (record_merge_function_type): Use complain_at.
6153 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6154 declared later): Update test case results.
6155
6156 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6157
6158 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6159 to be in alphabetical order.
6160 (trace_args): Spelling fixes.
6161
6162 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6163
6164 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6165 so they don't collide with user-defined macros.
6166 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6167 this was never guaranteed, and now that we're using gnulib stdint,
6168 which defines int_fast16_t to long int, the problem is exposed.
6169
6170 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6171
6172 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6173 need the full POSIX semantics (and weren't implementing them
6174 anyway).
6175
6176 Adjust to Autoconf 2.60 and today's gnulib.
6177 * bootstrap (gnulib_modules): Add stdint.
6178 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6179 no longer copies it.
6180 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6181 since stdint needs the former and wcwidth (which is now required
6182 by mbswidth) needs the latter.
6183 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6184 work around a compatibility glitch between gettext 0.14.6 and
6185 Autoconf 2.60.
6186 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6187 Do not check for uintptr_t, since new stdint module does the right
6188 thing.
6189 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6190 Add stdint.h, stdint_.h, wcwidth.h.
6191 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6192 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6193 stdint.m4, wchar_t.m4, wcwidth.m4.
6194 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6195 usual order for ../lib/*.h files.
6196 (file_name_split): Use last_component, not base_name, to adjust
6197 to gnulib changes.
6198 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6199 for ../lib/*.h files.
6200 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6201 Define unconditionally, since we now assume the stdint module.
6202 * src/scan-skel.l: Include <dirname.h>.
6203 (BASE_QPUTS): Use last_component, not base_name.
6204 * src/system.h: Include <unlocked-io.h> in the usual order
6205 for ../lib/*.h files. Include <stdint.h> unconditionally,
6206 since we now use the stdint module.
6207 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6208 HAVE_UINTPTR_T, since we now use the stdint module.
6209 (base_name): Remove decl, since files now include <dirname.h>
6210 to get the decl.
6211
6212 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6213
6214 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6215 New, default to 1.
6216 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6217 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6218 default.
6219 * tests/calc.at: Adjust.
6220
6221 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6222
6223 * data/c.m4 (b4_basename): New.
6224 (b4_syncline): Also output the location of its invocation (from
6225 the skeleton).
6226 (b4_user_action, b4_define_user_action, b4_user_actions)
6227 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6228 (b4_user_stype): New.
6229 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6230
6231 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6232
6233 In the grammar file, the first column is 1 not 0 on the first line as
6234 on every other line.
6235 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6236 * tests/input.at (Torturing the Scanner): Update output.
6237
6238 * src/scan-gram.l (scanner_cursor): Declare it static.
6239
6240 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6241
6242 In warnings, say "previous declaration" rather than "first
6243 declaration".
6244 * src/symtab.c (redeclaration): Do that here.
6245 * src/reader.c (record_merge_function_type): In the case of a result
6246 type clash, report the previous declaration rather than the very first
6247 one in the grammar file.
6248 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6249 declared later): Add a third declaration to check this behavior.
6250 * tests/input.at (Incompatible Aliases): Update output.
6251
6252 2006-06-27 Akim Demaille <akim@epita.fr>
6253
6254 * doc/Doxyfile.in: New.
6255 * doc/Makefile.am: Use it.
6256 * src/lalr.h, src/symtab.h: Initial doxygenation.
6257
6258 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6259
6260 Don't miss %merge result type warnings just because the LHS types are
6261 declared after the %merge. This continues the effort of the previous
6262 patch.
6263 * src/reader.c (get_merge_function): Don't set the merger type yet.
6264 (record_merge_function_type): New function for setting the merger type
6265 and checking for clashes.
6266 (grammar_current_rule_merge_set): Set the location of the %merge for
6267 the current rule.
6268 (packgram): Invoke record_merge_function_type for each rule now that
6269 all symbol type declarations have been parsed.
6270 * src/reader.h (merger_list.type_declaration_location): New member
6271 storing the location of the first %merge from which the type for this
6272 merging function was derived.
6273 * src/symlist.h (symbol_list.merger_declaration_location): New member
6274 storing the location of a rule's %merge, if any.
6275 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6276 declared later): New test to catch the error fixed by the above patch.
6277
6278 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6279
6280 Get action warnings (grammar_rule_check) right even when symbol
6281 declarations appear after the rules. Discussed at
6282 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6283 and
6284 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6285 Don't mistake the type of $$ in a midrule to be that of its parent
6286 rule's $$.
6287 * src/reader.c (grammar_current_rule_end): Don't invoke
6288 grammar_rule_check yet since not all symbol declarations may have been
6289 parsed yet.
6290 (grammar_midrule_action): Likewise.
6291 Don't record whether the midrule's $$ has been used yet since actions
6292 haven't been translated yet.
6293 Record the midrule's parent rule and its RHS index within the parent
6294 rule.
6295 (grammar_current_rule_action_append): Don't translate the action yet
6296 since not all symbol declarations may have been parsed yet and, thus,
6297 warnings about types for $$, $n, @$, and @n can't be reported yet.
6298 (packgram): Translate the action and invoke grammar_rule_check now that
6299 all symbol declarations have been parsed.
6300 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6301 after parsing the entire grammar file, the symbol list here in the case
6302 of a midrule is actually the midrule's empty RHS, so reference its
6303 parent rule's RHS where necessary.
6304 On the other hand, now that you can already know it's a midrule, you
6305 aren't forced to think $$ has the same type as its parent rule's $$.
6306 (handle_action_at): In the case of a midrule, reference the parent rule
6307 where necessary.
6308 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6309 members.
6310 (symbol_list_length): Now that this is invoked after all rules have
6311 been parsed, a NULL symbol (rather than a NULL symbol list node)
6312 terminates a rule. symbol_list_print already does this correctly.
6313 * src/symlist.h (symbol_list.midrule_parent_rule,
6314 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6315 remember their relationships with their parents.
6316 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6317 fixed by the above patch.
6318 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6319 implementing...
6320 (Unused values): ... this old test case and...
6321 (Unused values before symbol declarations): ... this new test case.
6322 This one is the same as `Unused values' except that all symbol
6323 declarations appear after the rules in order to catch the rest of the
6324 errors fixed by the above patch.
6325
6326 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6327
6328 More cleanup.
6329 * src/reader.c (current_rule): Declare it static since it's no longer
6330 used outside this file.
6331 (grammar_current_rule_action_append): Remove redundant arguments from
6332 translate_rule_action invocation.
6333 * src/reader.h (current_rule): Remove this unused extern.
6334 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6335 * src/scan-code.l (translate_rule_action): Likewise.
6336
6337 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6338
6339 Clean up yesterday's patch.
6340 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6341 to...
6342 * src/reader.c (grammar_current_rule_action_append): ... here for
6343 consistency with grammar_current_rule_symbol_append.
6344 * tests/regression.at (Braced code in declaration in rules section):
6345 Make yyerror and yylex static as usual.
6346
6347 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6348
6349 Fix bug that mistakes braced code in a declaration in the rules section
6350 to be a rule action. Mentioned at
6351 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6352 * src/scan-gram.l: Move midrule action detection from the start of the
6353 scanning of any braced code to...
6354 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6355 action. For readability, use $2 and @2 rather than the equivalent
6356 global variables.
6357 * tests/regression.at (Braced code in declaration in rules section):
6358 New test to catch the error fixed by the above patch.
6359
6360 Work on code readability some.
6361 * src/scan-code.l (current_rule): Get rid of this misleading and
6362 redundant declaration: it's actually extern'ed in reader.h.
6363 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6364 translate_action): Add a rule argument and use it instead of the global
6365 current_rule.
6366 (translate_rule_action): This already receives current_rule through an
6367 argument, so pass it on to translate_action instead of assigning
6368 current_rule to current_rule.
6369 (translate_symbol_action, translate_code): Pass rule = NULL to
6370 translate_action.
6371
6372 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6373
6374 Rename %before-definitions to %start-header and %after-definitions to
6375 %end-header. Don't use these declarations to separate pre-prologue
6376 blocks from post-prologue blocks. Add new order-independent
6377 declarations %before-header and %after-header as alternatives to the
6378 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6379 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6380 * NEWS (2.3+): Update for these changes.
6381 * data/glr.c (b4_before_definitions): Update to...
6382 (b4_start_header): ... this.
6383 (b4_after_definitions): Update to...
6384 (b4_end_header): ... this.
6385 * data/glr.cc: Likewise.
6386 * data/lalr1.cc: Likewise.
6387 * data/yacc.c: Likewise.
6388 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6389 prologue blocks with %*-header declarations.
6390 (Calc++ Parser): Likewise.
6391 (Decl Summary): Update names.
6392 (Table of Symbols): Update description.
6393 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6394 (PERCENT_END_HEADER): ... this.
6395 (PERCENT_BEFORE_DEFINITIONS): Update to...
6396 (PERCENT_START_HEADER): ... this.
6397 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6398 (declaration): Update token names and m4 macro names.
6399 When parsing %end-header and %start-header, invoke translate_code
6400 before muscle_code_grow, and no longer set global booleans to remember
6401 whether these declarations have been seen.
6402 Parse new %after-header and %before-header.
6403 * src/reader.c (before_definitions, after_definitions): Remove.
6404 (prologue_augment): Accept a new bool argument to specify whether to
6405 augment the pre-prologue or post-prologue.
6406 * src/reader.h (before_definitions, after_definitions): Remove these
6407 extern's.
6408 (prologue_augment): Add new bool argument.
6409 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6410 (PERCENT_END_HEADER): ... this.
6411 (PERCENT_BEFORE_DEFINITIONS): Update to...
6412 (PERCENT_START_HEADER): ... this.
6413 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6414 * tests/actions.at (Printers and Destructors): Update names.
6415
6416 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6417
6418 Add comparison operators for C++ location classes. Discussed at
6419 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6420 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6421 declaration indicating whether filename_type has an operator==. If
6422 filename_type is `std::string', it defaults to `1', `0' otherwise.
6423 * data/location.cc: Iff b4_define_location_comparison is `1', add
6424 operator== and operator!= for class position and for class location.
6425
6426 Some minor fixes.
6427 * src/scan-action.l: Remove unused file.
6428 * src/symtab.c (symbol_printer_set): Use printer_location not
6429 destructor_location.
6430 * src/symtab.h (struct symbol): Replace incorrect source comment for
6431 printer members.
6432 * tests/input.at (Incompatible Aliases): Update output with correct
6433 printer location.
6434
6435 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6436
6437 Don't put the pre-prologue in the header file. For the yacc.c code
6438 file and the glr.c header and code files, move the pre-prologue before
6439 the token definitions. Add new %before-definitions and
6440 %after-definitions to declare code that will go in both the header file
6441 and code file. Discussed at
6442 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6443 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6444 and
6445 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6446 * NEWS (2.3+): Describe these changes.
6447 * data/glr.c (b4_pre_prologue): Move from within to before...
6448 (b4_shared_declarations): ... this.
6449 Add new b4_before_definitions before b4_token_enums.
6450 Add new b4_after_definitions at the end.
6451 * data/glr.cc (b4_pre_prologue): Replace with...
6452 (b4_before_definitions): ... this in the header file.
6453 (b4_after_definitions): New near the end of the header file.
6454 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6455 code file right before including the header file.
6456 (b4_before_definitions): New in the previous position of
6457 b4_pre_prologue in the header file.
6458 (b4_after_definitions): New near the end of the header file.
6459 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6460 (b4_token_enums_defines): In the code file, move to right before
6461 YYSTYPE for consistency with the header file.
6462 (b4_before_definitions): New right before b4_token_enums_defines in
6463 both the header and code file.
6464 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6465 header and code file.
6466 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6467 of prologues for %union dependencies.
6468 (Decl Summary): In %defines description, mention the effect of
6469 %before-definitions and %after-definitions on the header file.
6470 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6471 than in the pre-prologue so that make check succeeds.
6472 (Table of Symbols): Add entries for %before-definitions and
6473 %after-definitions.
6474 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6475 %before-definitions.
6476 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6477 (declaration): Parse those declarations and append to
6478 b4_before_definitions and b4_after_definitions, respectively.
6479 * src/reader.c (before_definitions, after_definitions): New bools to
6480 track whether those declarations have been seen.
6481 (prologue_augment): Add to the post-prologue if %union,
6482 %before-definitions, or %after-definitions has been seen.
6483 * src/reader.h (before_definitions, after_definitions): New extern's.
6484 * src/scan-gram.l: Scan the new declarations.
6485 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6486 prologue block in a %before-definitions or a %after-definitions based
6487 on whether the %union is declared.
6488 * tests/regression.at (Early token definitions with --yacc, Early token
6489 definitions without --yacc): Move tests for token definitions into the
6490 post-prologue since token names are no longer defined in the
6491 pre-prologue.
6492
6493 2006-06-20 Akim Demaille <akim@epita.fr>
6494
6495 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6496 (symbol_get): Use it.
6497 * src/parse-gram.y: Use it.
6498
6499 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6500
6501 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6502 build succeeds when configured with --enable-gcc-warnings.
6503
6504 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6505
6506 * src/parse-gram.y (char_name): New function.
6507 (CHAR, STRING, string_content): For %printer, properly escape.
6508 (ID): Prefer fputs to fprintf.
6509 (id): Reindent to be consistent with other rules.
6510 Properly quote char.
6511
6512 The Translation Project changed its way of publishing translations
6513 to maintainers. I haven't received any responses to my request
6514 for supporting the old way, or for documenting the new way. I
6515 have modified 'bootstrap' to use screen scraping
6516 (in this case, HTML scraping). This is unreliable and inelegant,
6517 but I don't see any better way. Yuck.
6518 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6519 (get_translations): New function, which uses HTML scraping to
6520 deduce locations of latest translations.
6521 Use this function to grab both bison and bison-runtime .po files.
6522 Don't bother priming the pump for the runtime-po domain any more,
6523 as it's now translated better than bison is.
6524
6525 2006-06-19 Akim Demaille <akim@epita.fr>
6526
6527 * src/scan-gram.l: No longer "parse" things after `%union' until
6528 `{'. Rather, return a single "%union" token.
6529 No longer make symbols: return strings, and leave the conversion
6530 to symbols to the parser.
6531 (SC_PRE_CODE, token_type): Remove.
6532 * src/parse-gram.y (%union): New field `character'.
6533 Sort tokens.
6534 (CHAR): New token.
6535 (ID, ID_COLON): Now that the scanner no longer makes them
6536 identifiers, adjust all uses to invoke symbol_get.
6537 (id_colon): New, wraps the conversion from string to symbol.
6538 (%union): Accept a possible union_name.
6539 (symbol): Now can be a char.
6540 * data/c.m4 (b4_union_name): Leave a default value.
6541 * data/glr.c, data/yacc.c: Use it.
6542
6543 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6544
6545 For associating token numbers with token names for "yacc.c", don't use
6546 #define statements unless `--yacc' is specified; always use enum
6547 yytokentype. Most important discussions start at:
6548 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6549 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6550 and
6551 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6552 * NEWS (2.3+): Mention.
6553 * data/c.m4 (b4_yacc_if): New.
6554 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6555 token #define's.
6556 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6557 on token name definitions.
6558 * src/getargs.c (usage): Capitalize `Yacc' in English.
6559 * src/output.c (prepare): Define b4_yacc_flag.
6560 * tests/regression.at (Early token definitions): Test that tokens names
6561 are defined before the pre-prologue not just before the post-prologue.
6562 Remove this test case and copy to...
6563 (Early token definitions with --yacc): ... this to test #define's.
6564 (Early token definitions without --yacc): ... and this to test enums.
6565
6566 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6567
6568 * NEWS: Reword the post-2.3 change to not be so optimistic about
6569 removing the old "look-ahead" spelling.
6570 Update previous look-ahead/lookahead change reports.
6571 * REFERENCES: look-ahead -> lookahead (since that's
6572 what he actually wrote).
6573 * doc/refcard.tex: look ahead -> lookahead,
6574 look-ahead -> lookahead
6575
6576 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6577
6578 For consistency, use `lookahead' instead of `look-ahead' or
6579 `look_ahead'. Discussed starting at
6580 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6581 and then at
6582 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6583 * NEWS: For the next release, note the change to `--report'.
6584 * TODO, doc/bison.1: Update English.
6585 * doc/bison.texinfo: Update English.
6586 (Understanding Your Parser, Bison Options): Document as
6587 `--report=lookahead' rather than `--report=look-ahead'.
6588 * src/conflicts.c: Update English in comments.
6589 (lookahead_set): Rename from look_ahead_set.
6590 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6591 (resolve_sr_conflict): Rename local look_ahead_tokens to
6592 lookahead_tokens, and update other uses.
6593 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6594 count_rr_conflicts, conflicts_free): Update uses.
6595 * src/getargs.c (report_args): Move "lookahead" before alternate
6596 spellings.
6597 (report_types): Update uses.
6598 (usage): For `--report' usage description, state `lookahead' spelling
6599 rather than `look-ahead'.
6600 * src/getargs.h (report.report_lookahead_tokens): Rename from
6601 report_look_ahead_tokens.
6602 * src/lalr.c: Update English in comments.
6603 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6604 (state_lookahead_tokens_count): Rename from
6605 state_look_ahead_tokens_count.
6606 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6607 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6608 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6609 Update other uses.
6610 Update English in output.
6611 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6612 * src/print.c: Update English in comments.
6613 (lookahead_set): Rename from look_ahead_set.
6614 (print_reduction): Rename argument lookahead_token from
6615 look_ahead_token.
6616 (print_core, state_default_rule, print_reductions, print_results):
6617 Update uses.
6618 * src/print_graph.c: Update English in comments.
6619 (print_core): Update uses.
6620 * src/state.c: Update English in comments.
6621 (reductions_new): Update uses.
6622 (state_rule_lookahead_tokens_print): Rename from
6623 state_rule_look_ahead_tokens_print, and update other uses.
6624 * src/state.h: Update English in comments.
6625 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6626 (state_rule_lookahead_tokens_print): Rename from
6627 state_rule_look_ahead_tokens_print.
6628 * src/tables.c: Update English in comments.
6629 (conflict_row, action_row): Update uses.
6630 * tests/glr-regression.at
6631 (Incorrect lookahead during deterministic GLR,
6632 Incorrect lookahead during nondeterministic GLR): Rename
6633 print_look_ahead to print_lookahead.
6634 * tests/torture.at: Update English in comments.
6635 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6636 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6637 (Many lookahead tokens): Update uses.
6638 * data/glr.c: Update English in comments.
6639 * lalr1.cc: Likewise.
6640 * yacc.c: Likewise.
6641 * src/conflicts.h: Likewise.
6642 * src/lalr.h: Likewise.
6643 * src/main.c: Likewise.
6644 * src/output.c: Likewise.
6645 * src/parse-gram.c: Likewise.
6646 * src/tables.h: Likewise.
6647 * tests/calc.at: Likewise.
6648
6649 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6650
6651 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6652
6653 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6654
6655 * TODO: Add request from Nelson H. F. Beebe to be able to install
6656 Bison without installing the yacc script.
6657
6658 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6659
6660 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6661 and yytext if they're already #define'd.
6662 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6663 * src/scan-code-c.c: ... here.
6664 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6665 <config.h>.
6666
6667 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6668
6669 Get Bison to build again when configured with --enable-gcc-warnings.
6670 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6671 missing #include's.
6672 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6673 loc argument as it shadows a global.
6674 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6675 invocation.
6676
6677 * src/.cvsignore: Add scan-code.c.
6678
6679 2006-06-07 Akim Demaille <akim@epita.fr>
6680
6681 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6682 to...
6683 * src/scan-code.l: here.
6684 * tests/input.at (Torturing the Scanner): Fix another location
6685 error.
6686
6687 2006-06-07 Akim Demaille <akim@epita.fr>
6688
6689 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6690
6691 2006-06-06 Akim Demaille <akim@epita.fr>
6692
6693 Extract the parsing of user actions from the grammar scanner.
6694 As a consequence, the relation between the grammar scanner and
6695 parser is much simpler. We can also split "composite tokens" back
6696 into simple tokens.
6697 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6698 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6699 rename as...
6700 * src/location.h, src/location.c (add_column_width)
6701 (location_compute): these.
6702 Fix the column count: the initial column is 0.
6703 (location_print): Be robust to ending column being 0.
6704 * src/location.h (boundary_set): New.
6705 * src/main.c: Adjust to scanner_free being renamed as
6706 gram_scanner_free.
6707 * src/output.c: Include scan-code.h.
6708 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6709 Use boundary_set.
6710 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6711 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6712 which is now, again, a separate token.
6713 Adjust all dependencies.
6714 Whereever actions with $ and @ are used, use translate_code.
6715 (action): Remove this nonterminal which is now useless.
6716 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6717 (grammar_current_rule_action_append): Use translate_code.
6718 (packgram): Bound check ruleno, itemno, and rule_length.
6719 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6720 (last_string, last_braced_code_loc, max_left_semantic_context)
6721 (scanner_initialize, scanner_free, scanner_last_string_free)
6722 (gram_out, gram_lineno, YY_DECL_): Move to...
6723 * src/scan-gram.h: this new file.
6724 (YY_DECL): Rename as...
6725 (GRAM_DECL): this.
6726 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6727 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6728 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6729 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6730 Move these declarations, and...
6731 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6732 these to...
6733 * src/flex-scanner.h: this new file.
6734 * src/scan-gram.l (rule_length, rule_length_overflow)
6735 (increment_rule_length): Remove.
6736 (last_braced_code_loc): Rename as...
6737 (gram_last_braced_code_loc): this.
6738 Adjust to the changes of the parser.
6739 Move all the handling of $ and @ into...
6740 * src/scan-code.l: here.
6741 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6742 (handle_action_dollar, handle_action_at): Move to...
6743 * src/scan-code.l: here.
6744 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6745 scan-code.h, scan-code-c.c, scan-gram.h.
6746 (EXTRA_bison_SOURCES): Add scan-code.l.
6747 (BUILT_SOURCES): Add scan-code.c.
6748 (yacc): Be robust to white spaces.
6749
6750 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6751 * tests/regression.at: Adjust the column numbers.
6752 * tests/regression.at: Adjust the error message.
6753
6754 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6755
6756 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6757 Use Akim's wording from
6758 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6759
6760 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6761
6762 Between Bison releases, manually append `+' to the previous Bison
6763 release number, and use that as a signal to automatically print the
6764 ChangeLog's CVS Id keyword from --version. Discussed starting at
6765 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6766 * ChangeLog: Add Id header.
6767 * configure.ac (AC_INIT): Append `+' to `2.3'.
6768 * src/.cvsignore: Add revision.c.
6769 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6770 (BUILT_SOURCES): Add revision.c.
6771 (revision.c): New target rule. This file defines a new global variable
6772 named revision. It initializes it with either the Id from ChangeLog
6773 or, if VERSION doesn't contain `+', with the empty string.
6774 * src/getargs.c (version): Print the value of revision.
6775 * src/revision.h: Extern revision.
6776
6777 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6778
6779 * NEWS: Version 2.3.
6780 * configure.ac (AC_INIT): Likewise.
6781
6782 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6783
6784 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6785 with no arguments, not as an object-like macro. This is for
6786 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6787 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6788 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6789 Document this.
6790
6791 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6792
6793 * src/getargs.c (usage): Back out yesterday's modification of the
6794 --help output so that we don't have to wait for translation before
6795 releasing 2.3.
6796
6797 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6798
6799 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6800 Problem reported by Akim Demaille.
6801
6802 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6803
6804 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6805
6806 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6807
6808 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6809 generated source code. Problem reported by Frans Englich in
6810 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6811
6812 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6813
6814 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6815 shell, not within 'make', so that 'make' by an ordinary builder
6816 (using GNU make) does not worry about configuring gzip. This also
6817 works around a bug reported independently by Keith Thompson and by
6818 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6819 stderr rather than stdout, messing up the build logs.
6820
6821 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6822
6823 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6824 to make sure that YYID will never be unused. This fixes a 'make
6825 maintainer-check' failure caused by the recent changes to the 'Trivial
6826 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6827 not used.
6828 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6829
6830 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6831
6832 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6833 state before an empty RHS is always resolved here. Only the location
6834 of that state is guaranteed to be resolved, and that's enough. This
6835 fixes the remaining bug reported by Derek M. Jones in
6836 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6837 * tests/glr-regression.at (Uninitialized location when reporting
6838 ambiguity): Test the above case.
6839 Also, the embedded comments in this test case claim it checks the case
6840 of an empty RHS that has inherited the initial location. However, the
6841 corresponding LHS was already resolved, so yyresolveLocations didn't
6842 actually have reason to modify it. Fix this by forcing
6843 nondeterministic operation at the beginning of the parse.
6844
6845 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
6846
6847 * data/c.m4 (b4_yy_symbol_print_generate):
6848 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
6849 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
6850 of the bugs reported today by Derek M Jones in
6851 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6852 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
6853 defined to be a type name without parens or brackets.
6854 (Location Type): Similarly for YYLTYPE.
6855 * tests/regression.at (Trivial grammars): Put in a test for this
6856 bug that will be caught by 'make maintainer-check' (though not,
6857 alas, by 'make check' unless your compiler is picky).
6858
6859 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
6860
6861 * NEWS: Version 2.2.
6862 * configure.ac (AC_INIT): Likewise.
6863
6864 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
6865
6866 * data/glr.c (yyreportTree): Make room in yystates for the state
6867 preceding the RHS. This fixes the segmentation fault reported by Derek
6868 M. Jones in
6869 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
6870 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
6871 to the user. Reported for yyreportTree by Derek M. Jones later in the
6872 same thread.
6873 * THANKS: Add Derek M. Jones.
6874 Update my email address.
6875 Fix typo in Steve Murphy's name.
6876
6877 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
6878
6879 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
6880 checking against YYLAST that caused the parser to miss a potential
6881 alternative in its diagnostic.
6882 Problem reported by Maria Jose Moron Fernandez in
6883 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
6884 * data/lalr1.cc (yysyntax_error_): Likewise.
6885 * data/yacc.c (yysyntax_error): Likewise.
6886 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
6887 tokens, in case we run into an older C compiler.
6888 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
6889 Use them to check for the off-by-one error fixed above.
6890
6891 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
6892 YYSIZE_T, not size_t.
6893 * tests/regression.at (Trivial grammars): New test, to catch
6894 the error fixed by the above patch.
6895
6896 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6897
6898 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
6899 scheme.
6900 Reported by Steve Murphy.
6901
6902 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6903
6904 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
6905 * data/glr.cc: b4_location_flag is now b4_locations_flag.
6906
6907 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6908
6909 Implement --trace=m4.
6910 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
6911 * src/output.c (output_skeleton): When set, pass -dV to m4.
6912
6913 Factor the handling of flags in m4.
6914 * src/output.c (prepare): Rename the muscle names debug, defines,
6915 error_verbose to debug_flag, defines_flag, error_verbose_flag.
6916 * data/c.m4: Adjust.
6917 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
6918 Use b4_define_flag_if to define other b4_FLAG_if macros.
6919 (b4_location_if): As a consequence, rename as...
6920 (b4_locations_if): this, for consistency.
6921 Adjust all the skeletons.
6922
6923 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6924
6925 * etc/bench.pm: Shorten bench names.
6926
6927 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6928
6929 * src/output.h, src/output.c (error_verbose): Move to...
6930 * src/getargs.h, src/getargs.c: here.
6931 Sort the flags.
6932 Adjust dependencies.
6933
6934 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
6935
6936 * data/c.m4 (b4_copyright): Put the special exception for Bison
6937 skeletons here, so we don't have to put it in each skeleton. All
6938 uses changed. Suggested by Akim Demaille. Also, wrap the
6939 copyright notice, in case it is longer than 80 columns. Replace
6940 comma by newline after title.
6941
6942 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
6943
6944 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
6945 incompatibility, not a bug. Mention that it wasn't fixed as of
6946 flex 2.5.33.
6947
6948 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6949
6950 * examples/extexi: Enforce the precedence of concatenation over
6951 >>.
6952 Reported by Tommy Nordgren.
6953
6954 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6955
6956 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
6957 with the member "token".
6958 Reported by Martin Nylin.
6959
6960 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
6961
6962 * data/glr.c: Switch to Bison 2.2 special-exception language in
6963 the copyright notice. Use more-regular format for titles and
6964 copyright notices.
6965 * data/glr.cc: Likewise.
6966 * data/location.cc: Likewise.
6967 * data/yacc.cc: Likewise.
6968 * doc/bison.texinfo (Conditions): Document this.
6969 * NEWS: likewise. Upgrade version to 2.2.
6970
6971 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
6972
6973 * data/glr.cc: Remove dead code.
6974
6975 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
6976
6977 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
6978 that variable and the line breaks the bootstrap. Problem reported
6979 by Juan M. Guerrero.
6980
6981 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6982
6983 * doc/bison.texinfo (Multiple start-symbols): New.
6984
6985 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6986
6987 * etc/README, etc/bench.pl: New.
6988
6989 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
6990
6991 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
6992 rule.
6993 Reported by Mickael Labau.
6994 * tests/input.at (Torturing the Scanner): Test it.
6995
6996 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
6997
6998 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
6999 Problem reported by Bob Rossi.
7000
7001 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7002
7003 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7004 and didn't really work.
7005 For the index, use @ifnotinfo, not @iftex.
7006 Minor cleanups of spacing and terminology.
7007
7008 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7009
7010 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7011 of AT_NAME_PREFIX when %name-prefix is not used.
7012
7013 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7014
7015 Apply --prefix to C++ skeletons too: they change the namespace.
7016 The test suite already exercize these cases.
7017 * data/c++.m4 (b4_namespace): New.
7018 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7019 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7020 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7021 * doc/bison.texinfo: Document it.
7022 (Option Cross Key): Use @multitable in all formats. It looks
7023 nicer, even in TeX outputs.
7024 (Rules): Use the same code whatever the output type is.
7025 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7026 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7027 * tests/calc.at: Use it, instead of hard coding `yy'.
7028
7029 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7030
7031 * TODO: Remove dead items.
7032
7033 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7034
7035 * doc/FAQ: Remove, merged into...
7036 * doc/bison.texinfo (FAQ): this.
7037 * doc/Makefile.am (EXTRA_DIST): Adjust.
7038
7039 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7040
7041 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7042 even if empty.
7043 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7044 * doc/bison.texinfo (Calc++ Scanner): Use it.
7045
7046 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7047
7048 Fix two nits reported by twlevo, plus one more that I discovered.
7049
7050 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7051 this is the usual Bison style.
7052 * src/location.h (location_print): Likewise.
7053
7054 * src/reader.h (token_name): Likewise.
7055
7056 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7057
7058 Fix some nits reported by twlevo.
7059 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7060 and "POSIX". Use more-modern syntax for URLs. Mention C++
7061 and ask for Java. Don't hardwire OS version numbers. Add
7062 copyright notice.
7063 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7064 * src/conflicts.c (solved_conflicts_obstack): Now static.
7065
7066 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7067
7068 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7069 page. Say "you can use it" not "you may use it" as on the web page;
7070 we're describing capabilities not granting permission.
7071
7072 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7073
7074 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7075 shadowing warnings. Use usual patter for iterating through RHS.
7076 * tests/glr-regression.at
7077 (Uninitialized location when reporting ambiguity):
7078 Modify yylex so that it uses its argument, rather than trying
7079 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7080 const char -> char const.
7081
7082 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7083 Don't use tabs inside commands; it messes up 'ps'.
7084 Problem reported by twlevo.
7085
7086 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7087
7088 * tests/glr-regression.at (Uninitialized location when reporting
7089 ambiguity): New test case.
7090 * data/glr.c (yyresolveLocations): New function, which uses
7091 YYLLOC_DEFAULT.
7092 (yyresolveValue): Invoke yyresolveLocations before reporting an
7093 ambiguity.
7094 * doc/bison.texinfo (Default Action for Locations): Note
7095 YYLLOC_DEFAULT's usage for ambiguity locations.
7096 (GLR Semantic Actions): Cross-reference those notes.
7097
7098 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7099
7100 * tests/glr-regression.at (Leaked semantic values when reporting
7101 ambiguity): Remove unnecessary union and type declarations.
7102 (Leaked lookahead after nondeterministic parse syntax error): New test
7103 case.
7104 * data/glr.c (yyparse): Check for zero stacks remaining before
7105 attempting to shift the lookahead so that you don't lose it.
7106
7107 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7108
7109 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7110 * tests/glr-regression.at (Leaked semantic values when reporting
7111 ambiguity): New test case.
7112 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7113 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7114 now unnecessary yystackp parameter.
7115 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7116 destructors can be called.
7117
7118 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7119 in existing testcases.
7120
7121 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7122
7123 Don't leak semantic values for parent RHS when a user action cuts the
7124 parser, and clean up related code a bit.
7125 * tests/glr-regression.at (Leaked merged semantic value if user action
7126 cuts parse): Rename to...
7127 (Leaked semantic values if user action cuts parse): ... this. Add check
7128 for leaked parent RHS values.
7129 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7130 between an unresolved state (non-empty chain of semantic options) and
7131 an incomplete one (signaled by an empty chain).
7132 (yyresolveStates): Document the interface. Move all manipulation of a
7133 successfully or unsuccessfully resolved yyGLRState to...
7134 (yyresolveValue): ... here so that yyresolveValue always leaves a
7135 yyGLRState with consistent data and thus is easier to understand.
7136 Remove the yyvalp and yylocp parameters since they are always just
7137 taken from the yys parameter. When reporting a discarded merged value
7138 in debugging output, note that it is incompletely merged. Document the
7139 interface.
7140 (yyresolveAction): If resolving any of the RHS states fails, destroy
7141 them all rather than leaking them. Thus, as long as user actions are
7142 written to clean up the RHS correctly, yyresolveAction always cleans up
7143 the RHS of a semantic option. Document the interface.
7144
7145 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7146
7147 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7148 led to a segmentation fault in GNU Pascal. Problem reported
7149 by Waldek Hebisch.
7150
7151 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7152
7153 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7154 mid-rule action inside a nonterminal symbol in order to declare a
7155 destructor for its semantic value.
7156
7157 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7158
7159 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7160 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7161 __cplusplus && ! defined _STDLIB_H && !
7162 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7163 defined free))]: Include <stdlib.h> rather than rolling our own
7164 declarations of malloc and free, to avoid problems with
7165 incompatible declarations (using 'throw') C++'s stdlib.h. This
7166 should fix Debian bug 340012
7167 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7168 reported by Guillaume Melquiond.
7169
7170 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7171
7172 * NEWS: Clarify symbols versus types in unused-value warnings.
7173
7174 * configure.ac (AC_INIT): Bump version number.
7175
7176 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7177
7178 * NEWS: Version 2.1a.
7179 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7180 since C99 requires this.
7181
7182 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7183
7184 * m4/c-working.m4: New file.
7185 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7186
7187 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7188
7189 * Makefile.maint: Merge from coreutils.
7190
7191 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7192
7193 More portability fixes for problems summarized by Nelson H. F. Beebe.
7194
7195 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7196 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7197 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7198 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7199 messes up because C++ code is compiled in 32-bit mode but linked
7200 in 64-bit mode.
7201
7202 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7203
7204 More portability fixes for problems summarized by Nelson H. F. Beebe.
7205
7206 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7207 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7208
7209 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7210 nodist_PROGRAMS, since we don't need to actually compile the
7211 example if we're just doing a plain 'make'. This avoids bothering
7212 the installer unnecessarily about problems due to weird C++
7213 compilers.
7214
7215 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7216
7217 More portability fixes for problems summarized by Nelson H. F. Beebe.
7218
7219 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7220 than #include "...", and compile with -I'.'. The old method was
7221 not portable, according to Posix and the C standard, and it does
7222 not work with Sun C 5.7, where previous #line directives affect
7223 the working directory used in later #include "..." directives.
7224
7225 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7226
7227 Various DJGGP specific issues in /djgpp
7228
7229 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7230
7231 More portability fixes for problems summarized by Nelson H. F. Beebe.
7232
7233 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7234 '#include <map>' works and that you can apply ++ to iterators.
7235
7236 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7237
7238 Work around portability problems summarized by Nelson H. F. Beebe in
7239 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7240
7241 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7242 that '#include <string>' works.
7243
7244 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7245 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7246 "warning: sorry: semantics of inline function static data `const
7247 unsigned char translate_table[262]' are wrong (you'll wind up with
7248 multiple copies)".
7249
7250 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7251 or, xor to not_, and_, or_, and xor_, respectively. This works
7252 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7253 random system header somewhere that includes the equivalent of
7254 <iso646.h>.
7255
7256 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7257 -E" works; it apparently doesn't work with PathScale EKO Compiler
7258 Suite Version 2.0.
7259
7260 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7261
7262 During deterministic GLR operation, user actions should be able to
7263 influence the parse by changing yychar. To make this easier to fix and
7264 to make glr.c easier to evolve in general, don't maintain yytoken in
7265 parallel with yychar; just compute yytoken when needed.
7266 * tests/glr-regression.at (Incorrect lookahead during deterministic
7267 GLR): Check that setting yychar in a user action has the intended
7268 effect.
7269 * data/glr.c (yyGLRStack): Remove yytokenp member.
7270 (yyclearin): Don't set *yytokenp.
7271 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7272 yychar rather than *yytokenp to determine the current lookahead.
7273 Compute yytoken locally when needed.
7274 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7275 point to.
7276
7277 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7278 after `--report' documentation.
7279
7280 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7281
7282 * src/parse-gram.y (grammar_declaration): Location of printer
7283 symbol is @1, not list->location. Bug reported by twlevo.
7284 * tests/input.at (Incompatible Aliases): Adjust to above change.
7285
7286 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7287
7288 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7289 all the test at once. This makes the output easier to read in the
7290 normal case.
7291
7292 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7293 got from <http://bro-ids.org/download.html>. The bug is that
7294 when two actions appeared in succession, the second one was
7295 scanned before the first one was added to the grammar rule
7296 as a midrule action. Bison then output the incorrect warning
7297 "parse.y:905.17-906.36: warning: unused value: $3".
7298 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7299 associated with a value.
7300 (rhs): Don't invoke grammar_current_rule_action_append.
7301 (action): Invoke it here instead.
7302 * src/reader.c (grammar_midrule_action): Now extern.
7303 (grammar_current_rule_action_append): Don't invoke
7304 grammar_midrule_action; that is now the scanner's job.
7305 * src/reader.h (last_string, last_braced_code_loc):
7306 (grammar_midrule_action): New decls.
7307 * src/scan-gram.l (last_string): Now extern, sigh.
7308 (last_braced_code_loc): New extern variable.
7309 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7310 rule already has an action.
7311 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7312 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7313 Add some tests to check that the above changes fixed the bug.
7314
7315 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7316
7317 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7318 All used changed. Check whether the symbol has a destructor,
7319 not whether it is typed.
7320 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7321 that the values are still reported as unused. All line numbers
7322 adjusted.
7323
7324 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7325
7326 Work around a bug in bro 0.8, which underparenthesizes its
7327 definition of YYLLOC_DEFAULT.
7328 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7329 their arguments.
7330 * data/lalr1.cc: Likewise.
7331 * data/yacc.cc: Likewise.
7332
7333 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7334
7335 Work around a bug in Pike 7.0, and give the Pike folks a
7336 better way to override the usual int widths.
7337 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7338 user can override the types.
7339 (short): #undef, to work around a bug in Pike 7.0.
7340 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7341 (union yyalloc.yyss): Use yytype_int16 rather than short.
7342 All uses changed.
7343 (yysigned_char): Remove.
7344 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7345 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7346 * tests/regression.at (Web2c Actions): Adjust to above changes.
7347
7348 * src/reader.c (check_and_convert_grammar): New function.
7349 (reader): Close the input file even if something went wrong during
7350 parsing. Minor file descriptor leak reported by twlevo.
7351
7352 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7353 to pacify gcc -Wswitch-default.
7354 * src/scan-gram.l (adjust_location): Use a default: break; case
7355 to pacify gcc -Wswitch-default.
7356 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7357 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7358 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7359 Move these decls to scan-skel.l, since they don't need to be
7360 visible elsewhere.
7361 * src/scan-skel.l: Accept the above decls.
7362 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7363 is used.
7364
7365 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7366
7367 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7368 since we don't want to insist on a version number at the start
7369 of the changelog every time.
7370 * Makefile.maint: Sync from coreutils a bit better.
7371 (sc_trailing_blank): Renamed from sc_trailing_space.
7372 All uses changed.
7373 (sc_no_if_have_config_h, sc_require_config_h):
7374 (sc_prohibit_assert_without_use): New rules.
7375 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7376 (sc_dd_max_sym_length): Fix leading spaces in rule.
7377 (sc_system_h_headers): Prefix with @.
7378 (sc_useless_cpp_parens, m4-check): Output line numbers.
7379 (changelog-check): Allow version only in head.
7380 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7381 satisfy new Makefile.maint rule.
7382 * data/glr.c: Likewise.
7383 * data/glr.cc: Likewise.
7384 * data/lalr1.cc: Likewise.
7385 * data/yacc.c: Likewise.
7386 * lib/ebitsetv.c: Likewise.
7387 * lib/lbitset.c: Likewise.
7388 * lib/subpipe.c: Likewise.
7389 * lib/timevar.c: Likewise.
7390 * src/system.h: Likewise.
7391 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7392 * djgpp/Makefile.maint: Add copyright notice.
7393 * djgpp/README.in: Likewise.
7394 * djgpp/config.bat: Likewise.
7395 * djgpp/config.site: Likewise.
7396 * djgpp/config_h.sed: Likewise.
7397 * djgpp/djunpack.bat: Likewise.
7398 * djgpp/config.sed: Fix copyright notice to match standard format.
7399 * djgpp/subpipe.h: Likewise.
7400 * lib/bitsetv-print.c: Likewise.
7401 * lib/bitsetv.c: Likewise.
7402 * lib/subpipe.h: Likewise.
7403 * lib/timevar.c: Likewise.
7404 * lib/timevar.h: Likewise.
7405 * djgpp/subpipe.c: Use standard recipe for config.h.
7406 * lib/abitset.c: Likewise.
7407 * lib/bitset.c: Likewise.
7408 * lib/bitset_stats.c: Likewise.
7409 * lib/bitsetv-print.c: Likewise.
7410 * lib/bitsetv.c: Likewise.
7411 * lib/ebitsetv.c: Likewise.
7412 * lib/get-errno.c: Likewise.
7413 * lib/lbitset.c: Likewise.
7414 * lib/subpipe.c: Likewise.
7415 * lib/timevar.c: Likewise.
7416 * lib/vbitset.c: Likewise.
7417 * tests/local.at: Likewise.
7418 * src/scan-gram.l: Don't include verify.h, since system.h does
7419 that for us.
7420 * .x-sc_require_config_h: New file.
7421 * .x-sc_unmarked_diagnostics: New file.
7422
7423 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7424
7425 Be a bit more systematic about using 'abort'.
7426 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7427 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7428 Put 'default: abort ();' before some other case, to satisfy older
7429 pedantic compilers.
7430 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7431 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7432 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7433 * src/conflicts.c (resolve_sr_conflict): Likewise.
7434 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7435 (get_decision_str, get_orientation_str, get_node_alignment_str):
7436 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7437 (get_linestyle_str, get_arrowstyle_str): Likewise.
7438 * src/conflicts.c (resolve_sr_conflict):
7439 Use a default case rather than one for the one remaining enum
7440 value, to catch invalid enum values as well.
7441 * src/lalr.c (set_goto_map, map_goto):
7442 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7443 * src/nullable.c (nullable_compute, token_definitions_output):
7444 Likewise.
7445 * src/reader.c (packgram, reader): Likewise.
7446 * src/state.c (transitions_to, state_new, state_reduction_find):
7447 Likewise.
7448 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7449 (symbol_pack): Likewise.
7450 * src/tables.c (conflict_row, pack_vector): Likewise.
7451 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7452 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7453 * src/system.h: Don't include <assert.h>.
7454 (assert): New macro.
7455
7456 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7457 (Destructor Decl, Parser Function, Pure Calling):
7458 Describe rules for braces inside C code more carefully.
7459
7460 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7461
7462 Fix some porting glitches found by Nelson H. F. Beebe.
7463 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7464 compilers that don't understand that abort () does not return.
7465 * src/state.c (transitions_to): Likewise.
7466 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7467 that '#include <cstdlib>' works.
7468 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7469 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7470 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7471 for the benefit of some pre-C99 compilers.
7472
7473 * bootstrap: Undo changes to gnulib files that autoreconf made.
7474
7475 Minor fixups to get 'make maintainer-check' to work.
7476 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7477 with the new verify.h implementation.
7478 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7479 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7480 * data/yacc.c (YYUSE): Likewise.
7481 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7482 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7483 * src/parse-gram.y (declaration): Don't pass a string constant
7484 to a function that expects char *, since GCC might complain
7485 about the constant value.
7486 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7487 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7488 before #defining them.
7489 * tests/glr-regression.at
7490 (Incorrectly initialized location for empty right-hand side in GLR):
7491 In yyerror, use the msg arg.
7492 (Corrupted semantic options if user action cuts parse):
7493 (Incorrect lookahead during deterministic GLR):
7494 (Incorrect lookahead during nondeterministic GLR):
7495 Don't name a local var 'index'; it shadows string.h's 'index'.
7496
7497 2006-01-19 Akim Demaille <akim@epita.fr>
7498
7499 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7500 location, not just parts of it.
7501
7502 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7503
7504 * NEWS: Document the fact that multiple %unions are now allowed.
7505 * doc/bison.texinfo (Union Decl): Likewise.
7506 * TODO: This feature is now implemented, so remove it from
7507 the wishlist.
7508
7509 * Makefile.maint: Merge with coreutils Makefile.maint.
7510 (CVS_LIST): Use build-aux version if available.
7511 (VERSION_REGEXP): New macro.
7512 (syntax-check-rules): Add sc_no_if_have_config_h,
7513 sc_prohibit_assert_without_use, sc_require_config_h,
7514 sc_useless_cpp_parens.
7515 (sc_obsolete_symbols): Check for O_NDELAY.
7516 (sc_dd_max_sym_length): Track coreutils.
7517 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7518 (sc_useless_cpp_parens): New rule.
7519 (news-date-check): Look for version or today's date.
7520 (changelog-check): Don't require version number near head.
7521 (copyright-check): Use current year instead of hardwiring 2005.
7522 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7523 (announcement): Add --gpg-key-ID.
7524
7525 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7526 with "file system".
7527
7528 Avoid undefined behavior that addressed just before the start of an
7529 array. Problem reported by twlevo.
7530 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7531 * src/lalr.c (build_relations): Rely on new sentinel.
7532 * src/gram.c (gram_free): Adjust to new sentinel.
7533
7534 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7535
7536 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7537 yylookaheadNeeds. All uses updated.
7538 (yysplitStack): Rename local yynewLookaheadStatuses to
7539 yynewLookaheadNeeds.
7540 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7541 GLR): In comments, change `lookahead status' to `lookahead need'.
7542
7543 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7544
7545 * data/glr.c (yysplitStack): A little stylistic rewrite.
7546
7547 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7548
7549 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7550
7551 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7552
7553 * doc/bison.texinfo: Fix some typos.
7554 (GLR Semantic Actions): New subsection discussing special
7555 considerations because GLR semantic actions might be deferred.
7556 (Actions): Mention look-ahead usage of yylval.
7557 (Actions and Locations): Mention look-ahead usage of yylloc.
7558 (Special Features for Use in Actions): Add YYEOF entry and mention it
7559 in the yychar entry.
7560 In the yychar entry, remove mention of the local yychar case (pure
7561 parser) since this is irrelevant information when writing semantic
7562 actions and since it's already discussed in `Table of Symbols' where
7563 yychar is otherwise described as an external variable.
7564 In the yychar entry, don't call it the `current' look-ahead since it
7565 isn't when semantic actions are deferred.
7566 In the yychar and yyclearin entries, add note about deferred semantic
7567 actions.
7568 Add yylloc and yylval entries discussing look-ahead usage.
7569 (Look-Ahead Tokens): When discussing yychar, don't call it the
7570 `current' look-ahead, and do mention yylval and yylloc.
7571 (Error Recovery): Cross-reference `Action Features' when mentioning
7572 yyclearin.
7573 (Table of Symbols): In the yychar entry, don't call it the `current'
7574 look-ahead.
7575 In the yylloc and yylval entries, mention look-ahead usage.
7576
7577 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7578
7579 * tests/glr-regression.at: Update copyright year to 2006.
7580
7581 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7582
7583 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7584 use during nondeterministic operation to track which stacks have
7585 actually needed the current lookahead.
7586 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7587 Allocate, deallocate, resize, and otherwise shuffle space for
7588 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7589 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7590 appropriately during nondeterministic operation.
7591 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7592 members to store the current lookahead to be used by the deferred
7593 user action.
7594 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7595 from which the RHS is taken. Set the lookahead members of the new
7596 yySemanticOption according to the lookahead status for stack yyk.
7597 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7598 yyaddDeferredAction.
7599 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7600 members of yySemanticOption before invoking yyuserAction, and then set
7601 them back to their current values afterward.
7602 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7603 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7604 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7605 titles for consistency.
7606 (Leaked merged semantic value if user action cuts parse): In order to
7607 suppress lint warnings, use arguments in merge function, and assign
7608 char value < 128 in main.
7609 (Incorrect lookahead during deterministic GLR): New test case.
7610 (Incorrect lookahead during nondeterministic GLR): New test case.
7611
7612 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7613
7614 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
7615 !yyvaluep as signal that no semantic value is available to print.
7616 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7617 to print a semantic value.
7618
7619 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7620
7621 * tests/glr-regression.at: For consistency with my newer test cases,
7622 don't thank myself.
7623
7624 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7625
7626 * data/glr.c (yyresolveValue): When merging semantic options, if at
7627 least one user action succeeds but a later one cuts the parse, then
7628 destroy the semantic value before returning rather than leaking it.
7629 (yyresolveStates): If a user action cuts the parse and thus
7630 yyresolveValue fails, ignore the (unset) semantic value rather than
7631 corrupting the yyGLRState, and empty the semantic options list since
7632 the user actions should have called all necessary destructors.
7633 Simplify code with YYCHK.
7634 * tests/glr-regression.at (Corrupted semantic options if user action
7635 cuts parse): New test case.
7636 (Undesirable destructors if user action cuts parse): New test case.
7637 Before applying any of this patch, this test case never actually failed
7638 for me... but only because the corrupted semantic options usually
7639 masked this bug.
7640 (Leaked merged semantic value if user action cuts parse): New test
7641 case.
7642
7643 2006-01-05 Akim Demaille <akim@epita.fr>
7644
7645 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7646
7647 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7648
7649 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7650 _MSC_VER. Problem reported by Cenzato Marco.
7651 (b4_c_function_def): Use it.
7652 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7653 b4_c_modern.
7654 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7655 than rolling our own.
7656
7657 2006-01-04 Akim Demaille <akim@epita.fr>
7658
7659 Also warn about non-used mid-rule values.
7660 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7661 member.
7662 (symbol_list_new): Adjust.
7663 * src/reader.c (symbol_typed_p): New.
7664 (grammar_rule_check): Use it.
7665 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7666 Check its rule.
7667 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7668 Use it.
7669 * tests/actions.at (Exotic Dollars): Adjust.
7670
7671 2006-01-04 Akim Demaille <akim@epita.fr>
7672
7673 * src/reader.c (grammar_midrule_action): If $$ is set in a
7674 mid-rule, move the `used' bit to its lhs.
7675 * tests/input.at (Unused values): New.
7676 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7677
7678 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7679
7680 * doc/bison.texinfo (Bison Options): Say more accurately what
7681 --yacc does.
7682 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7683 about declarations in the grammar when in Yacc mode, as POSIX does
7684 not require a diagnostic when the grammar uses extensions.
7685
7686 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7687
7688 Warn about dubious constructions like "%token T T".
7689 Reported by twlevo.
7690 * src/symtab.h (struct symbol.declared): New member.
7691 * src/symtab.c (symbol_new): Initialize it to false.
7692 (symbol_class_set): New arg DECLARING, specifying whether
7693 this is a declaration that we want to warn about, if there
7694 is more than one of them. All uses changed.
7695
7696 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7697 Allow multiple %union directives, whose contents concatenate.
7698 * src/parse-gram.y (grammar_declaration): Likewise.
7699 Use muscle_code_grow, so that we don't need stype_line any more.
7700 All uses changed.
7701
7702 * src/muscle_tab.c (muscle_grow): Fix comment.
7703
7704 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7705 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7706 Update copyright year to 2006.
7707
7708 2006-01-03 Akim Demaille <akim@epita.fr>
7709
7710 Have glr.cc pass (some of) the calc.at tests.
7711 * data/glr.cc (b4_parse_param_orig): New.
7712 (b4_parse_param): Improve its definition, and bound it more
7713 clearly in the skeleton.
7714 (b4_epilogue): Append, instead of prepending, in order to keep
7715 #line consistency.
7716 Simplify the generation of auxiliary functions: locations and
7717 purity are mandated.
7718 (b4_global_tokens_and_yystype): Honor it.
7719 * data/location.cc (c++.m4): Don't include it.
7720 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7721 and AT_SKEL_CC_IF.
7722 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7723 AT_LALR1_CC_IF.
7724 Be sure to initialize the first position's filename.
7725 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7726 mandated anyway.
7727 (AT_CHECK_CALC_GLR_CC): New.
7728 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7729
7730 2006-01-02 Akim Demaille <akim@epita.fr>
7731
7732 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7733 c.m4.
7734 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
7735 * data/glr.cc: Do not include stack.hh.
7736
7737 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7738
7739 * data/glr.c: Reformat whitespace with tabs.
7740 (b4_lpure_formals): Remove this unused m4 macro.
7741 * tests/cxx-type.at: Reformat whitespace with tabs.
7742 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7743 since it's a member. Rename type to isNterm for clarity.
7744
7745 2005-12-29 Akim <akim@sulaco.local>
7746
7747 Let glr.cc catch up with symbol_value_print.
7748 * data/glr.cc (b4_yysymprint_generate): Replace by...
7749 (b4_yy_symbol_print_generate): this.
7750 (yy_symbol_print, yy_symbol_value_print): Declare them.
7751
7752 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7753
7754 * src/location.h (boundary): Note that a line or column equal
7755 to INT_MAX indicates an overflow.
7756 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7757 (rule_length_overflow, increment_rule_length, add_column_width):
7758 New functions.
7759 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7760 (<SC_BRACED_CODE>"}"):
7761 Use increment_rule_length rather than incrementing it by hand.
7762 (adjust_location, handle_syncline): Diagnose overflow.
7763 (handle_action_dollar, handle_action_at):
7764 Fix bug with monstrosities like $-2147483648.
7765 Remove now-unnecessary checks.
7766 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7767 (convert_ucn_to_byte): Verify assumptions.
7768 (handle_syncline): New arg LOC. All callers changed.
7769 Don't store through a value derived from char const * pointer.
7770
7771 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7772 GCC warnings.
7773
7774 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7775
7776 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7777 Remove unnecessary forward static decls.
7778
7779 2005-12-27 Akim Demaille <akim@epita.fr>
7780
7781 * src/reader.c (grammar_current_rule_check): Also check that $$
7782 is used.
7783 Take the rule to check as argument, hence rename as...
7784 (grammar_rule_check): this.
7785 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7786 Rename as...
7787 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7788 (grammar_midrule_action, grammar_symbol_append): Now static.
7789 * tests/torture.at (input): Don't rely on the default action
7790 being always performed.
7791 * tests/calc.at: "Set" $$ even when the action is "cut" with
7792 YYERROR or other.
7793 * tests/actions.at (Exotic Dollars): Instead of using unused
7794 values, check that the warning is issued.
7795
7796 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7797
7798 * NEWS: Improve wording for unused-value warnings.
7799
7800 2005-12-22 Akim Demaille <akim@epita.fr>
7801
7802 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7803 (b4_yysymprint_generate): Rename as...
7804 (b4_yy_symbol_print_generate): this.
7805 Generate yy_symbol_print instead of yysymprint.
7806 Generate also yy_symbol_value_print, and use it.
7807
7808 2005-12-22 Akim Demaille <akim@epita.fr>
7809
7810 * NEWS: Warn about unused values.
7811 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7812 a `used' member.
7813 (symbol_list_n_get, symbol_list_n_used_set): New.
7814 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7815 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7816 * src/reader.c (grammar_current_rule_check): Check that values are
7817 used.
7818 * src/symtab.c (symbol_print): Accept 0.
7819 * tests/existing.at: Remove the type information.
7820 Empty the actions.
7821 Remove useless actions (beware of mid-rule actions: perl -000
7822 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7823 * tests/actions.at (Exotic Dollars): Use unused values.
7824 * tests/calc.at: Likewise.
7825 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7826 Likewise.
7827
7828 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7829 rule_useful_p.
7830
7831 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7832
7833 Undo 2005-12-01 tentative license wording change. The wording is
7834 still being reviewed by the lawyers, and we don't want to wait for
7835 them before publishing a test release. For now, revert to the
7836 previous wording.
7837 * NEWS: Undo 2005-12-01 change.
7838 * data/glr.c: Revert to previous license wording.
7839 * data/glr.cc: Likewise.
7840 * data/lalr1.cc: Likewise.
7841 * data/location.cc: Likewise.
7842 * data/yacc.c: Likewise.
7843
7844 * NEWS: Reword %destructor vs YYABORT etc.
7845 * data/glr.c: Use American spacing, for consistency.
7846 * data/glr.cc: Likewise.
7847 * data/lalr1.cc: Likewise.
7848 * data/yacc.c: Likewise.
7849 * data/yacc.c: Reformat comments slightly.
7850 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
7851 for consistency. Fix some spelling errors and reword recently-included
7852 text slightly.
7853 * tests/cxx-type.at: Cast results of malloc, for C++.
7854
7855 2005-12-21 Joel E. Denny <address@hidden>
7856
7857 * tests/cxx-type.at: Construct a tree, count the parents of shared
7858 nodes, and free each node once and only once. Previously, the memory
7859 for semantic values was leaked instead.
7860
7861 2005-12-21 Joel E. Denny <address@hidden>
7862
7863 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
7864 (yylval, yylloc): If pure, #define to yystackp->yyval and
7865 yystackp->yyloc similar to yychar and yynerrs.
7866 (yyparse): If pure, remove local yylval and yylloc. Add local
7867 yystackp to accommodate pure definitions of yylval and yylloc.
7868 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
7869 yylvalp and yyllocp to &yylval and &yylloc.
7870 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
7871 namespace. Previously, nerrs and char were missing, but lval and lloc
7872 weren't necessary.
7873 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
7874 yylvalp and yyllocp parameters since, if pure, these are now always
7875 accessible through yystackp. If not pure, they are still accessible
7876 globally.
7877 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
7878 `if (YYID (N))' to pacify lint.
7879
7880 2005-12-21 Akim Demaille <akim@epita.fr>
7881
7882 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
7883 destroy the RHS symbols of a rule.
7884 * data/yacc.c (yylen): Initialize to 0.
7885 Keep its value to the number of items to possibly shift.
7886 In particular, a regular successful parse that ends on YYFINAL by
7887 a (internal) YYACCEPT must not have yylen != 0.
7888 (yyerrorlab, yyreturn): Pop the RHS.
7889 Reorder a bit to emphasize the `shifting' bits of code.
7890 (YYPOPSTACK): Now accept a number of items to pop.
7891 * data/lalr1.cc: Likewise.
7892 * data/glr.c: Formatting changes.
7893 Use goto instead of fall through.
7894 * doc/bison.texinfo (Destructor Decl): Complete.
7895
7896 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7897
7898 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7899 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
7900 * djgpp/config.bat: Replace every occurence of the file name
7901 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7902 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7903 * djgpp/config.sed: Replace every occurence of the file name
7904 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7905 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7906 * djgpp/djunpack.bat: DJGPP specific file.
7907 * djgpp/fnchange.lst: DJGPP specific file.
7908 * djgpp/README.in: Add new information about how to unpack the bison
7909 source on MSDOS and other systems which have 8.3 file name restrictions
7910 using djunpack.bat and fnchange.lst.
7911
7912 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7913
7914 * bootstrap (build_cvs_prefix): Remove; unused.
7915 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
7916 when getting gnulib.
7917
7918 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
7919
7920 * data/glr.c: Reorder typedef declarations for structs to match order
7921 of struct declarations.
7922 Rename yystack everywhere to yystackp except in yyparse where it's not
7923 a pointer.
7924 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
7925 consistency.
7926 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
7927 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
7928 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
7929 lint.
7930
7931 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
7932
7933 * tests/sets.at (Accept): Fix typos in regular expression used to
7934 sed out the final state number.
7935
7936 Work around portability problem on Solaris 10: flex-generated
7937 files include <stdio.h> before <config.h>, which messes up
7938 because the latter defines __EXTENSIONS__. Address the problem
7939 by creating two new little files that include <config.h> first,
7940 then include the flex-generated files. Rewrite everyone else
7941 to include <config.h> first, as well.
7942 * lib/timevar.c: Always include "config.h".
7943 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
7944 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
7945 (EXTRA_bison_SOURCES): New macro.
7946 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
7947 * src/system.h: Don't include config.h.
7948 * src/LR0.c: Include <config.h> first.
7949 * src/assoc.c: Likewise.
7950 * src/closure.c: Likewise.
7951 * src/complain.c: Likewise.
7952 * src/conflicts.c: Likewise.
7953 * src/derives.c: Likewise.
7954 * src/files.c: Likewise.
7955 * src/getargs.c: Likewise.
7956 * src/gram.c: Likewise.
7957 * src/lalr.c: Likewise.
7958 * src/location.c: Likewise.
7959 * src/main.c: Likewise.
7960 * src/muscle_tab.c: Likewise.
7961 * src/nullable.c: Likewise.
7962 * src/output.c: Likewise.
7963 * src/parse-gram.y: Likewise.
7964 * src/print.c: Likewise.
7965 * src/print_graph.c: Likewise.
7966 * src/reader.c: Likewise.
7967 * src/reduce.c: Likewise.
7968 * src/relation.c: Likewise.
7969 * src/state.c: Likewise.
7970 * src/symlist.c: Likewise.
7971 * src/symtab.c: Likewise.
7972 * src/tables.c: Likewise.
7973 * src/uniqstr.c: Likewise.
7974 * src/vcg.c: Likewise.
7975
7976 * src/parse-gram.y: Fix minor problems uncovered by lint.
7977 (current_lhs, current_lhs_location): Now static.
7978 (current_assoc): Remove unused variable.
7979
7980 Cleanups so that Bison-generated parsers have less lint.
7981 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
7982 Prepend /*ARGSUSED*/, for lint's sake.
7983 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
7984 definition if 'lint' is defined.
7985 (YYID): New macro (or function, if lint).
7986 All uses of /*CONSTCOND*/0 replaced by YYID(0).
7987 * data/yacc.c: Likewise.
7988 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
7989 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
7990 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
7991 is C++ only.
7992 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
7993 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
7994 Use YYID(0) rather than 0, for lint.
7995 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
7996 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
7997
7998 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
7999
8000 * tests/glr-regression.at
8001 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8002 Close memory leak reported by twlevo.
8003
8004 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8005
8006 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8007 all stacks.
8008 (yyparse): Iterate another stack in order to call user destructors.
8009 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8010 New test case.
8011 (Duplicated user destructor for lookahead): This test now is expected
8012 to succeed.
8013
8014 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8015
8016 * NEWS: Document the following change.
8017 * data/yacc.c: Say "parser skeleton" rather than "file", since
8018 it's no longer just a file.
8019 * data/glr.c: Grant a special exception for C GLR parsers, that
8020 reads like the already-existing exception for C LALR(1) parsers.
8021 * data/glr.cc: Likewise.
8022 * data/lalr1.cc: Likewise.
8023 * data/location.cc: Likewise.
8024 * data/yacc.c: Reword the "written by" statement to clarify that
8025 it was the parser skeleton, not the entire output file.
8026 * data/glr.c: Written by Paul Hilfinger.
8027 * data/glr.cc: Written by Akim Demaille.
8028 * data/lalr1.cc: Likewise.
8029
8030 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8031
8032 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8033 Fix typos in previous change that broke 'make check'.
8034 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8035 supported in C.
8036 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8037 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8038 We can revert this once things settle down.
8039
8040 * src/conflicts.c (conflicts_print): Don't print file name twice
8041 when %expect fails because there were no conflicts.
8042 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8043 change.
8044 * tests/conflicts.at (%expect not enough, %expect too much):
8045 (%expect with reduce conflicts): Adjust to new behavior.
8046
8047 2005-11-18 Akim Demaille <akim@epita.fr>
8048
8049 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8050 errors.
8051 * NEWS: Document this.
8052 * doc/bison.texinfo (Expect Decl): Likewise.
8053
8054 2005-11-16 Akim Demaille <akim@epita.fr>
8055
8056 Generalize the display of semantic values and locations in traces.
8057 * data/glr.c (yy_reduce_print): Fix indices (again).
8058 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8059 literal integers.
8060 * data/lalr1.cc (yyreduce_print): Rename as...
8061 (yy_reduce_print): this.
8062 Display values and locations.
8063 * data/yacc.c (yy_reduce_print): Likewise.
8064 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8065 (yysymprint): Move higher to be visible from yy_reduce_print).
8066 (yyparse): Adjust.
8067 * tests/calc.at: Adjust the expected length of the traces.
8068
8069 2005-11-14 Akim Demaille <akim@epita.fr>
8070
8071 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8072 from 1 to N, while values and location start at 0.
8073 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8074
8075 2005-11-14 Akim Demaille <akim@epita.fr>
8076
8077 * data/glr.c (yy_reduce_print): Fix the $ number.
8078
8079 2005-11-14 Akim Demaille <akim@epita.fr>
8080
8081 "Use" parse parameters.
8082 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8083 * data/glr.c, data/glr.cc: Use them.
8084 * data/glr.c (YYUSE): Have a C++ definition that supports
8085 non-pointer types.
8086
8087 2005-11-14 Akim Demaille <akim@epita.fr>
8088
8089 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8090
8091 2005-11-14 Akim Demaille <akim@epita.fr>
8092
8093 * data/glr.cc: New.
8094 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8095
8096 2005-11-12 Akim Demaille <akim@epita.fr>
8097
8098 Let position and location be PODs.
8099 * data/location.cc (position::initialize, location::initialize): New.
8100 (position::position, location::location): Define only if
8101 b4_location_constructors is defined.
8102 * data/lalr1.cc (b4_location_constructors): Define it for backward
8103 compatibility.
8104 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8105
8106 2005-11-12 Akim Demaille <akim@epita.fr>
8107
8108 * data/lalr1.cc: Move the body of the ctor and dtor into the
8109 parser file (instead of the header).
8110 Wrap the implementations in a "namespace yy".
8111
8112 2005-11-12 Akim Demaille <akim@epita.fr>
8113
8114 Have glr.c include its header file when created.
8115 * data/glr.c (b4_shared_declarations): New.
8116 Output them verbatim in the parser if !%defines, otherwise
8117 output then in the header file, and include it instead.
8118
8119 2005-11-11 Akim Demaille <akim@epita.fr>
8120
8121 * data/glr.c: Comment changes.
8122
8123 2005-11-11 Akim Demaille <akim@epita.fr>
8124
8125 When yydebug, report semantic and location values for reductions.
8126 * data/glr.c (yy_reduce_print): Report the semantic values and the
8127 locations.
8128 (YY_REDUCE_PRINT): Adjust.
8129 (yyglrReduce): Use them.
8130 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8131 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8132 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8133 traces.
8134
8135 2005-11-10 Akim Demaille <akim@epita.fr>
8136
8137 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8138 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8139 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8140
8141 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8142
8143 * m4/cxx.m4, examples/Makefile.am: Don't build
8144 examples/calc++ if no C++ compiler is available. (trivial change)
8145
8146 2005-11-09 Akim Demaille <akim@epita.fr>
8147
8148 * src/scan-skel.l: Use a couple of asserts.
8149
8150 2005-11-03 Akim Demaille <akim@epita.fr>
8151
8152 In some (weird) cases, the final state number is incorrect.
8153 Reported by Alexandre Duret-Lutz.
8154 * src/LR0.c (state_list_append): Remove the computation of
8155 final_state.
8156 (save_reductions): Do it here.
8157 (get_state): Alpha conversion.
8158 (generate_states): Use a for loop.
8159 * src/gram.h (item_number_is_rule_number)
8160 (item_number_is_symbol_number): New.
8161 * src/state.c: Use assert.
8162 * src/system.h: Include assert.h.
8163 * tests/sets.at (Accept): New.
8164
8165 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8166
8167 * data/glr.c (yyfill): Adjust comment.
8168 (yyresolveAction): Initialize default location properly
8169 for empty right-hand sides.
8170 (yydoAction): Ditto.
8171 Add comment explaining apparently dead code.
8172 * tests/glr-regression.at
8173 (Incorrectly initialized location for empty right-hand side in GLR):
8174 New test.
8175
8176 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8177
8178 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8179 gnulib when interrupted. This fixes some race conditions and
8180 works around some portability problems (one noted by Paul
8181 Hilfinger).
8182
8183 2005-10-22 Akim <akim@epita.fr>
8184
8185 * Makefile.cfg: Adjust to config -> build-aux.
8186 Reported by twledo.
8187
8188 2005-10-21 Akim Demaille <akim@epita.fr>
8189
8190 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8191 the %parse-params.
8192 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8193 * data/yacc.c (b4_Pure_if): Rename as...
8194 (b4_yacc_pure_if): this.
8195 (YY_SYMBOL_PRINT, yyparse): Adjust.
8196 * doc/bison.texinfo: Formatting changes.
8197
8198 2005-10-21 Akim Demaille <akim@epita.fr>
8199
8200 Finish the transition config -> build-aux.
8201 * configure.ac, Makefile.am: Use build-aux.
8202 * config/prev-version, config/announce-gen, config/Makefile.am:
8203 Move to...
8204 * build-aux/prev-version, build-aux/announce-gen,
8205 * build-aux/Makefile.am: here.
8206
8207 2005-10-14 Akim Demaille <akim@epita.fr>
8208
8209 * examples/calc++/test: Use set -x only when VERBOSE.
8210
8211 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8212
8213 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8214 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8215
8216 2005-10-13 Akim Demaille <akim@epita.fr>
8217
8218 * src/scan-skel.l: Output the base name parts of the parser and
8219 header file names.
8220 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8221 additional checks.
8222 Use this to exercise C++ outputs in subdirs.
8223 Reported by Oleg Smolsky.
8224
8225 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8226
8227 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8228 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8229 Problem reported by John P. Hartmann.
8230 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8231 already defined it.
8232
8233 2005-10-12 Akim Demaille <akim@epita.fr>
8234
8235 * src/parse-gram.y (version_check): Exit 63 to please missing
8236 (stands for "version mismatch).
8237 * tests/input.at, doc/bison.texinfo: Adjust.
8238
8239 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8240
8241 Work around portability problems with Visual Age C compiler
8242 (xlc and xlC_r) reported by John P. Hartmann.
8243 * data/location.cc (initial_column, initial_line): Remove.
8244 All uses replaced by 0 and 1.
8245 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8246 that xlc complains about.
8247 * src/scan-skel.l (skel_wrap): Likewise.
8248 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8249 as __STDC__.
8250 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8251 __STDC_VERSION__. Use it everywhere instead of looking at
8252 __STDC__ and __cplusplus.
8253
8254 2005-10-10 Akim Demaille <akim@epita.fr>
8255
8256 * examples/calc++/test: Be quiet unless VERBOSE.
8257
8258 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8259
8260 * data/c.m4 (yydestruct, yysymprint):
8261 Use YYUSE instead of casting to void.
8262 * data/glr.c (YYUSE): New macro.
8263 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8264 Use it instead of rolling our own.
8265 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8266 (YYCHK1):
8267 Use /*CONSTCOND*/ to suppress lint warnings.
8268 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8269 (YY_STACK_PRINT): Use 'false' not '0'.
8270 (YYUSE): New macro.
8271 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8272 * data/yacc.c (YYUSE): New macro.
8273 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8274 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8275 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8276
8277
8278 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8279 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8280
8281 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8282
8283 Undo the parts of the unlocked-I/O change that substituted
8284 putc or puts for printf. This might hurt performance a bit,
8285 but some people prefer the printf style.
8286 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8287 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8288 All uses replaced by YYFPRINTF and YYDPRINTF.
8289 * data/yacc.c: Likewise.
8290 * lib/bitset.c (bitset_print): Likewise.
8291 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8292 putc and puts.
8293 * lib/lbitset.c (debug_lbitset): Likewise.
8294 * src/closure.c (print_firsts, print_fderives): Likewise.
8295 * src/gram.c (grammar_dump): Likewise.
8296 * src/lalr.c (look_ahead_tokens_print): Likewise.
8297 * src/output.c (escaped_output): Likewise.
8298 (user_actions_output): Break apart two printfs.
8299 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8300 * src/reduce.c (reduce_print): Likewise.
8301 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8302 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8303
8304 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8305 Use assignments rather than casts-to-void to suppress
8306 unused-variable warnings. This pacifies 'lint'.
8307 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8308 unused-variable warnings.
8309
8310 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8311
8312 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8313
8314 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8315
8316 Use unlocked I/O for a minor performance improvement on hosts like
8317 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8318 is to use the gnlib unlocked-io module, and to prefer putc and
8319 puts to printf when either will work (since the latter doesn't
8320 come in an unlocked flavor).
8321 * bootstrap (gnulib_modules): Add unlocked-io.
8322 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8323 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8324 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8325 and similarly for puts and putc and printf.
8326 * data/yacc.c: Likewise.
8327 * lib/bitset.c (bitset_print): Likewise.
8328 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8329 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8330 to printf.
8331 * lib/lbitset.c (debug_lbitset): Likewise.
8332 * src/closure.c (print_firsts, print_fderives): Likewise.
8333 * src/gram.c (grammar_dump): Likewise.
8334 * src/lalr.c (look_ahead_tokens_print): Likewise.
8335 * src/output.c (escaped_output): Likewise.
8336 (user_actions_output): Coalesce two printfs.
8337 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8338 * src/reduce.c (reduce_print): Likewise.
8339 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8340 * src/system.h: Include unlocked-io.h rather than stdio.h.
8341
8342 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8343 this confuses xgettext.
8344
8345 2005-10-02 Akim Demaille <akim@epita.fr>
8346
8347 * bootstrap (gnulib_modules): Add strverscmp.
8348 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8349 * m4/.cvsignore: Add strverscmp.m4.
8350 * src/parse-gram.y (%require): New token, new rule.
8351 (version_check): New.
8352 * src/scan-gram.l (%require): Adjust.
8353 * tests/input.at (AT_REQUIRE): New.
8354 Use it.
8355 * doc/bison.texinfo (Require Decl): New.
8356 (Calc++ Parser): Use %require.
8357
8358 2005-10-02 Akim Demaille <akim@epita.fr>
8359
8360 * data/location.cc: New.
8361
8362 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8363 Akim Demaille <akim@epita.fr>
8364
8365 Make sure -odir/foo.cc creates dir/location.hh etc.
8366 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8367 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8368 (spec_defines_file): Now const.
8369 (dir_prefix): New.
8370 (short_base_name): Remove.
8371 * src/files.c: Adjust.
8372 (dirname.h): Include.
8373 (base_name): Don't prototype it.
8374 (finput): Remove, duplicates gram_in.
8375 (full_base_name, short_base_name): Replace by...
8376 (all_but_ext, all_but_tab_ext): these.
8377 (compute_base_names): Rename as...
8378 (compute_file_name_parts): this.
8379 Update to compute the new variables, including dir_prefix.
8380 Adjust dependencies.
8381 * src/output.c (prepare): Output them.
8382 * src/reader.c: Adjust to use gram_in, not finput.
8383 * src/scan-skel.l (@dir_prefix@): New.
8384
8385 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8386
8387 * lib/subpipe.c: New function end_of_output_subpipe() added
8388 to allow support for non-posix systems. This is a no-op function
8389 for posix systems.
8390
8391 * lib/subpipe.h: New function end_of_output_subpipe() added
8392 to allow support for non-posix systems. This is a no-op function
8393 for posix systems.
8394
8395 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8396 handle the lack of pipe/fork functionality on non-posix systems.
8397
8398 * djgpp/Makefile.maint: DJGPP specific file.
8399
8400 * djgpp/README.in: DJGPP specific file.
8401
8402 * djgpp/config.bat: DJGPP specific configuration file.
8403
8404 * djgpp/config.sed: DJGPP specific configuration file.
8405
8406 * djgpp/config.site: DJGPP specific configuration file.
8407
8408 * djgpp/config_h.sed: DJGPP specific configuration file.
8409
8410 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8411
8412 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8413
8414 2005-10-02 Akim Demaille <akim@epita.fr>
8415
8416 * data/location.cc: New, extract from...
8417 * data/lalr1.cc: here.
8418 (location.hh): Include it after the user prologue, in case the
8419 filename type is defined by the user.
8420 Forward declation location and position before the pre-prologue.
8421 (yyresult_): Rename as...
8422 (yyresult): this, it's a local variable, not an attribute.
8423 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8424
8425 2005-10-01 Akim Demaille <akim@epita.fr>
8426
8427 * examples/extexi: Restore the #line generation.
8428
8429 2005-09-30 Akim Demaille <akim@epita.fr>,
8430 Alexandre Duret-Lutz <adl@gnu.org>
8431
8432 Move the token type and YYSTYPE in the parser class.
8433 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8434 (parser::token): New, from the moved free definition of tokens.
8435 (parser::semantic_value): Now a full definition instead of an
8436 indirection to YYSTYPE.
8437 (b4_post_prologue): No longer included in the header file, but
8438 in the implementation file.
8439 * doc/bison.texi (C+ Language Interface): Update.
8440 * src/parse-gram.y: Support unary %define.
8441 * tests/actions.at: Define global_tokens_and_yystype for backward
8442 compatibility until we update the tests.
8443 * tests/calc.at: Idem.
8444 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8445 to simplify the code.
8446
8447 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8448
8449 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8450 Ah, the good old days! Problem reported by Peter Klein.
8451 * bootstrap (gnulib_modules): Add strerror, strtoul.
8452 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8453 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8454
8455 2005-09-29 Akim Demaille <akim@epita.fr>
8456
8457 * data/c.m4 (b4_error_verbose_if): New.
8458 * data/lalr1.cc: Use it.
8459 (YYERROR_VERBOSE_IF): Remove.
8460 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8461 parser members, replaced by...
8462 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8463 local variables.
8464 (yysyntax_error_): Takes the state number as argument.
8465 (yyreduce_print_): Use the argument yyrule, not the former
8466 attribute yyn_.
8467
8468 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8469
8470 * bootstrap (gnulib_modules): Add verify.
8471 * lib/.cvsignore: Add verify.h.
8472 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8473 * src/system.h (verify): Remove.
8474 Include verify.h instead.
8475 * src/tables.c (tables_generate): Use new API for 'verify'.
8476
8477 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8478
8479 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8480 local variables whose names begin with 'yy'.
8481 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8482 Trivial changes from Joel E. Denny.
8483
8484 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8485 it itself.
8486 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8487 don't use alloca any more.
8488
8489 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8490 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8491 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8492 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8493 to match yacc.c, to test more hosts.
8494
8495 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8496
8497 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8498 doesn't affect behavior.
8499 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8500 Solaris, AIX, MSC.
8501 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8502 This works a bit better with glibc, if user code has already included
8503 stdlib.h.
8504 * doc/bison.texinfo (Bison Parser): Document that users can't
8505 arbitrarily use malloc and free for other purposes. Document
8506 that <alloca.h> and <malloc.h> might be included.
8507 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8508 user must declare alloca.
8509
8510 * HACKING (release): Forwarn the Translation Project about
8511 stable releses.
8512
8513 2005-09-20 Akim Demaille <akim@epita.fr>
8514
8515 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8516
8517 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8518
8519 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8520 (YYSTACK_ALLOC_MAXIMUM): Use it.
8521 (yysyntax_error): New function.
8522 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8523 multiple syntax errors are reported, and alloca is being used.
8524 Instead, reallocate buffers twice as big each time, so that
8525 we waste at most half the allocated memory. Start with a small
8526 (128-byte) buffer that will suffice in most cases anyway.
8527 Use yysyntax_error to do most of the work.
8528
8529 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8530 yynerrs is the number of errors reported, not the number of
8531 errors encountered.
8532
8533 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8534 Mark it as expected to fail.
8535 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8536 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8537 Don't start user-code symbols with "yy", to avoid name space problems.
8538
8539 2005-09-19 Akim Demaille <akim@epita.fr>
8540
8541 Remove the traits, failed experiment.
8542 It never proved useful, and anyway because of the current
8543 definition, it was not possible to have several specialization of
8544 this traits, making it useless.
8545 * data/lalr1.cc (yy:traits): Remove.
8546 Inline its definitions in the parser class.
8547
8548 2005-09-19 Akim Demaille <akim@epita.fr>
8549
8550 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8551 least Mac OSX with a /usr/local install of gettext.
8552
8553 2005-09-19 Akim Demaille <akim@epita.fr>
8554
8555 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8556 and yytoken for similarity with the other skeletons.
8557
8558 2005-09-19 Akim Demaille <akim@epita.fr>
8559
8560 * NEWS, configure.ac: update version number to 2.1a.
8561
8562 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8563
8564 * NEWS: Version 2.1.
8565
8566 * NEWS: Remove notice of yytname change, since it was never in an
8567 official release.
8568 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8569 diagnostic.
8570 * src/output.c (prepare): Likewise.
8571 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8572 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8573 is not defined. This is an awful hack, but it's enough for now.
8574 All callers changed.
8575 * tests/glr-regression-at (make_value): Args are const pointers now,
8576 to avoid GCC warning.
8577 (Duplicated user destructor for lookahead): New test. Currently
8578 skipped. It fails on my host but I'm not sure it'll always fail.
8579
8580 2005-09-16 Akim Demaille <akim@epita.fr>
8581
8582 * src/symtab.h (struct symbol): Declare the printer and destructor
8583 as const, to avoid accidental calls to free.
8584 (symbol_destructor_set, symbol_printer_set): Adjust.
8585 * src/symtab.c: Adjust.
8586
8587 2005-09-16 Akim Demaille <akim@epita.fr>
8588
8589 * data/c.m4 (b4_token_enums): New.
8590 (b4_token_defines): Rename as...
8591 (b4_token_enums_defines): this.
8592 (b4_token_defines): New, output only the #defines.
8593 * data/yacc.c, data/glr.c: Adjust.
8594 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8595 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8596 as default values.
8597
8598 2005-09-16 Akim Demaille <akim@epita.fr>
8599
8600 * data/lalr1.cc (yylex_): Remove, inline its code.
8601 (yyreport_syntax_error_): Remove, replaced by...
8602 (yysyntax_error_): this which returns a string and leaves to the
8603 caller the call to the users' error function.
8604 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8605 Move from members of the parser object...
8606 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8607 to local variables of the parse function.
8608
8609 2005-09-16 Akim Demaille <akim@epita.fr>
8610
8611 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8612 since it's in Bison's name space.
8613
8614 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8615
8616 * data/glr.c (yyresolveValue): Add default case to pacify
8617 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8618
8619 * NEWS: Document when yyparse started to return 2.
8620 * doc/bison.texinfo (Parser Function): Document when yyparse
8621 returns 2.
8622
8623 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8624 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8625 changed.
8626 (class position): file_name -> filename (reverting). All uses changed.
8627
8628 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8629
8630 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8631 do anything if $@ exists. This reverts part of the 2005-07-07
8632 patch.
8633
8634 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8635
8636 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8637 contains obsolete information and isn't worth distributing as a
8638 separate file anyway.
8639 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8640 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8641 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8642 (yyparse): Abort if user code uses longjmp to throw an unexpected
8643 value.
8644
8645 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8646
8647 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8648 Suggested by twlevo@xs4all.nl.
8649
8650 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8651 This avoids a diagnostic from gcc -Wswitch-enum.
8652 Problem reported by twlevo@xs4all.nl.
8653
8654 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8655 standards. Use "file name" or "file" or "name", depending on
8656 the context.
8657 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8658 not to hack/foo.tab.c.
8659 (Calc++ Top Level): 2nd arg of main is not const.
8660 * data/glr.c: b4_filename -> b4_file_name.
8661 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8662 All uses changed.
8663 (class position): filename -> file_name. All uses changed.
8664 * data/yacc.c: b4_filename -> b4_file_name.
8665 * lib/bitset.h: filename -> file_name in local vars.
8666 * lib/bitset_stats.c: Likewise.
8667 * src/files.c: Likewise.
8668 * src/scan-skel.l ("@output ".*\n): Likewise.
8669 * src/files.c (file_name_split): Renamed from filename_split.
8670 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
8671
8672 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8673
8674 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8675 to accommodate latest gnulib.
8676
8677 * tests/glr-regression.at (Duplicate representation of merged trees):
8678 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8679
8680 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8681 needed.
8682
8683 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8684
8685 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8686 All uses changed. Invoke user destructor after an error during a
8687 split parse (trivial change from Joel E. Denny).
8688
8689 * tests/glr-regression.at
8690 (User destructor after an error during a split parse): New test case.
8691 Problem reported by Joel E. Denny in:
8692 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8693
8694 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8695
8696 * README-cvs: Give URLs for recommended tools.
8697 Mention Gzip version problem, and bootstrapping issues.
8698 Remove troubleshooting section, as it's somewhat obsolete.
8699
8700 * bootstrap (no_cache): New var, to accommodate different wget
8701 variants. Use it instead of '-C off'. Problem reported by
8702 twlevo@xs4all.nl.
8703
8704 * data/glr.c (yydestroyStackItem): New function.
8705 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8706 debugging information. Problem reported by Joel E. Denny.
8707
8708 2005-08-25 Akim Demaille <akim@epita.fr>
8709
8710 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8711
8712 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8713
8714 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8715 Don't invoke destructor on unresolved entries.
8716 * tests/glr-regression.at
8717 (User destructor for unresolved GLR semantic value): New test case.
8718 Problem reported by Joel E. Denny in:
8719 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8720
8721 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8722
8723 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8724 Add strnlen.c.
8725 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8726 lib-prefix.m4, po.m4.
8727
8728 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8729 in yydestruct diagnostic, since it might not be an error.
8730 Problem reported by Joel Denny near end of
8731 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8732 * data/lalr1.cc (yyerturn): Likewise.
8733 * data/yacc.c (yyreturn): Likewise.
8734 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8735
8736 * src/files.c: Remove obsolete FIXME comment.
8737
8738 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8739 with the other templates, and to fix bogus run-on messages such
8740 as the one reported at the end of
8741 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8742 All callers changed to avoid the newline.
8743 (yyprocessOneStack): Output two lines rather than one, to accommodate
8744 the above change. This changes the debug output format slightly.
8745
8746 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8747 reported by Joel E. Denny in
8748 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8749 (trivial change).
8750 * tests/glr-regression.at (Duplicate representation of merged trees):
8751 New test, from Joel E. Denny in:
8752 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8753 * THANKS: Add Joel E. Denny.
8754
8755 * configure.ac (AC_INIT): Bump to 2.0c.
8756
8757 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8758
8759 * NEWS: Version 2.0b.
8760
8761 * Makefile.am (SUBDIRS): Put examples before tests, so that
8762 "make check" doesn't finish with "All 1 tests passed".
8763
8764 * tests/regression.at (Token definitions): Don't rely on
8765 AT_PARSER_CHECK for data that contains backslashes. It currently
8766 uses 'echo', and 'echo' isn't portable if its argument contains
8767 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8768 that the byte '\0xff' is not printable in the C locale; it is,
8769 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8770 not printable, so use '\0x81' to test.
8771
8772 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8773 version of GCC, since the macro is used with non-GCC compilers.
8774
8775 Fix core dump reported by Pablo De Napoli in
8776 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8777 * tests/regression.at (Invalid inputs with {}): New test.
8778 * src/parse-gram.y (token_name): Translate type before using
8779 it as an index.
8780
8781 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8782 the user's name space. All uses changed to __attribute__
8783 ((__unused__)).
8784 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8785 Add __attribute__ ((__noreturn__)).
8786
8787 * etc/clcommit: Remove. We weren't using it, and it failed
8788 "make maintainer-distcheck".
8789 * Makefile.maint: Merge from coreutils.
8790 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8791 (syntax-check-rules): Change list of rules as described below.
8792 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8793 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8794 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8795 (sc_trailing_space): New rules.
8796 (sc_xalloc_h_in_src): Remove.
8797 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8798 (sc_space_tab, sc_error_exit_success, sc_changelog):
8799 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8800 (makefile-check, po-check, author_mark_check):
8801 (makefile_path_separator_check, copyright-check):
8802 Use grep -n, to make it easier to find violations.
8803 Use CVS_LIST and CVS_LIST_EXCEPT.
8804 (header_regexp, h_re): Remove.
8805 (dd_c): New macro.
8806 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8807 (my-distcheck): Use more-modern GCC flags.
8808 (signatures, %.asc): Remove.
8809 (rel-files, announcement): Remove signatures.
8810 Restore old updating code, even though we don't use it, so
8811 that we're the same as coreutils.
8812 (alpha, beta, major): Depend on news-date-check.
8813 Make the upload commands.
8814
8815 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8816 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8817 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8818 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8819 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8820 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8821 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8822 * tests/sets.at: Likewise.
8823
8824 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8825 we comment out the Autoconf version number.
8826 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8827 it's error-prone and "make maintainer-distcheck" rejects it.
8828
8829 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8830 Indent calls to "error" to pacify "make maintainer-distcheck",
8831 when the calls are not intended to be translated.
8832 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8833
8834 * src/Makefile.am (DEFS): Use +=, to pacify
8835 "make maintainer-distcheck".
8836 (bison_SOURCES): Add scan-skel.h.
8837 (sc_tight_scope): New rule, from coreutils.
8838
8839 * src/files.c (src_extension, header_extension):
8840 Now static, not extern.
8841 * src/getargs.c (short_options): Likewise.
8842 * src/muscle_tab.c (muscle_table): Likewise.
8843 * src/parse-gram.y (current_class, current_type, current_prec):
8844 Likewise.
8845 * src/reader.c (grammar_end, previous_rule_end): Likewise.
8846 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
8847 * src/main.c (main): Cast bindtextdomain and textdomain calls to
8848 void, to avoid warning when NLS is disabled.
8849 * src/output.c: Include scan-skel.h.
8850 (scan_skel): Remove decl, since scan-skel.h does this.
8851 (output_skeleton):
8852 Indent calls to "error" to pacify "make maintainer-distcheck".
8853 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
8854 * src/reader.h (gram_end, gram_lineno): New decls to pacify
8855 "make maintainer-distcheck".
8856 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
8857 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
8858 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
8859 (skel_lex_destroy, scan_skel): Move these decls to...
8860 * src/scan-skel.h: New file.
8861 * src/uniqstr.c (uniqstr_assert):
8862 Indent calls to "error" to pacify "make maintainer-distcheck".
8863
8864 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
8865 not @VAR@.
8866
8867 * tests/torture.at: Revamp to avoid misuse of atoi that
8868 "make maintainer-distcheck" complained about.
8869
8870 * examples/extexi (message): Don't print a message more than once,
8871 and omit line-number decoration that makes Emacs compile think
8872 that informative messages are worth worrying about.
8873
8874 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
8875
8876 * configure.ac: Update version number.
8877
8878 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
8879 accidentally.
8880 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
8881 autogenerated by the maintainer.
8882 * examples/calc++/.cvsignore: Add *.yy.
8883
8884 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
8885 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8886 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8887
8888 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
8889
8890 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
8891 from maintainer-distcheck about casting the argument of 'free'.
8892
8893 * NEWS: Mention recent yytname changes.
8894 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
8895
8896 * bootstrap: For translations that have not yet been upgraded to
8897 the new runtime-po domain, prime the pump by extracting the
8898 relevant strings from the obsolete translations. This code can be
8899 removed once the bison-runtime domain has been translated by each
8900 team.
8901
8902 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
8903 now that token names are already quoted.
8904
8905 Fix problem reported by Anthony Heading.
8906 * data/glr.c (YYTOKEN_TABLE): New macro.
8907 (yytname): Define if YYTOKEN_TABLE.
8908 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
8909 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
8910 (YYERROR_VERBOSE): Define the same way the other skeletons do.
8911 * src/output.c (prepare_symbols): Output token_table_flag.
8912
8913 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
8914
8915 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
8916 again if the first call fails.
8917
8918 * data/glr.c (yytnamerr): New function.
8919 (yyreportSyntaxError): Use it to dequote most string literals.
8920 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
8921 with other skeletons. All uses changed.
8922 (yytnameerr_): New function.
8923 (yyreport_syntax_error): Use it to dequote most string literals.
8924 * data/yacc.c (yytnamerr): New function.
8925 (yyerrlab): Use it to decode most string literals.
8926 * doc/bison.texinfo (Decl Summary, Calling Convention):
8927 Clarify quoting convention of yytname.
8928 * src/output.c (prepare_symbols): Quote all names. This undoes
8929 the 2005-04-17 change, which is now accomplished (mostly) via
8930 changes in the parsers as described above.
8931 * tests/regression.at (Token definitions, Web2c Actions):
8932 Undo most 2005-04-17 change here, too.
8933
8934 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
8935
8936 Fix more problems reported by twlevo@xs4all.nl.
8937 * tests/cxx-type.at: Don't pipe output of ./types through sed to
8938 remove trailing spaces. This loses the exit status of ./types,
8939 and isn't needed since ./types shouldn't be emitting trailing
8940 spaces.
8941 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
8942 as the stack isn't valid in that case.
8943
8944 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8945 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8946 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8947 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
8948 is used.
8949 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
8950 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8951 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8952 Likewise.
8953
8954 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
8955 overly-picky compilers that reject 'char *foo = "bar";'.
8956
8957 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
8958 to FILE * parameter, not to stderr. This fixes a typo introduced
8959 in the 2005-07-12 change.
8960
8961 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
8962 warnings from GCC 4.
8963
8964 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
8965 (yyglrShiftDefer, yysplitStack):
8966 Remove unused parameters b4_pure_formals. All uses changed.
8967 (yyglrShift): Remove unused parameters b4_user_formals.
8968 All uses changed.
8969 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
8970
8971 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
8972
8973 Destructor cleanups and regularization among the three skeletons.
8974 * NEWS: Document the behavior changes.
8975 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
8976 stack before failing, as the cleanup code will do it for us now.
8977 * data/lalr1.cc (yyerrlab): Likewise.
8978 * data/glr.c (yyparse): Pop everything off the stack before
8979 freeing it, so that destructors get called properly.
8980 * data/lalr1.cc (yyreturn): Likewise.
8981 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
8982 This is more consistent.
8983 * doc/bison.texinfo (Destructor Decl): Mention more reasons
8984 why destructors might be called. 1.875 -> 2.1.
8985 (Destructor Decl, Decl Summary, Table of Symbols):
8986 Some English-language cleanups for %destructor.
8987 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8988 Add output line for destructor of start symbol.
8989 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
8990 because of that same extra output line.
8991
8992 * NEWS: Document minor wording changes in diagnostics of
8993 Bison-generated parsers.
8994 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
8995 Remove unused formals. All uses changed.
8996 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
8997 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
8998 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
8999 Rename yyoverflowab to yyexhaustedlab.
9000 When memory exhaustion occurs during syntax-error reporting,
9001 report it separately rather than in a single diagnostic; this
9002 eases translation.
9003 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9004 (Memory Exhausted): Renamed from Parser Stack Overflow.
9005 Revamp wording slightly to prefer "memory exhaustion".
9006 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9007
9008 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9009
9010 Add i18n support to the GLR skeleton. Partially fix the C++
9011 skeleton; a C++ expert needs to finish this. Remove debugging
9012 msgids; there's little point to having them translated, since they
9013 can be understood only by someone who can read the
9014 (English-language) source code.
9015
9016 Generate runtime-po/bison-runtime.pot automatically, so that we
9017 don't have to worry about garbage getting in that file. We'll
9018 make sure after the next official release that old msgids don't
9019 get lost. See
9020 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9021
9022 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9023 Now auto-generated.
9024 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9025 Fix typos in explanations of the runtime file.
9026 * bootstrap: Change gettext keyword from YYI18N to YY_.
9027 Use standard Makefile.in.in in runtime-po, since we'll arrange
9028 for backward-compatible bison-runtime.po files in a different way.
9029 * data/glr.c (YY_): New macro, from yacc.c.
9030 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9031 Translate messages intended for users.
9032 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9033 the wording in the other skeletons. We don't know that the memory
9034 is virtual.
9035 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9036 Use same method that yacc.c uses.
9037 Don't translate debugging messages.
9038 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9039 it doesn't work (yet), and requires C++ expertise to fix.
9040 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9041 Move defn to a more logical place, to be consistent with other
9042 skeletons.
9043 Don't translate debugging messages.
9044 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9045 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9046 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9047 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9048
9049 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9050 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9051 void, not int.
9052 * tests/glr-regression.at (Badly Collapsed GLR States):
9053 Likewise.
9054 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9055 yylex should return 0 at EOF rather than aborting.
9056
9057 Improve tests for stack overflow in GLR parser.
9058 Problem reported by twlevo@xs4all.nl.
9059 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9060 All uses removed.
9061 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9062 can handle the problem.
9063 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9064 (yyparse): New local variable yyresult to record the result.
9065 Use result of setjmp to set it, rather than storing itinto
9066 struct.
9067 (yyDone): Remove label.
9068 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9069 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9070 if YYABORT is used).
9071 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9072 yyparse status; put status > 1 into diagnostic.
9073 Check that status==2 works.
9074 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9075 Use exit status 3 for failure to open (which shouldn't happen).
9076
9077 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9078
9079 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9080 1 on syntax error; just let yyparse do its thing.
9081 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9082 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9083 (Exploding the Stack Size with Alloca):
9084 (Exploding the Stack Size with Malloc):
9085 Expect exit status 2, not 1, since the parser is supposed to blow
9086 its stack. Problem reported by twlevo@xs4all.nl.
9087
9088 * data/glr.c (yyparse): Don't assume that the initial calls
9089 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9090 Print a stack-overflow message and fail instead.
9091 Initialize the line-number information before creating the stack,
9092 so that the stack-overflow message can report line zero safely.
9093
9094 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9095
9096 Fix problems reported by twlevo@xs4all.nl.
9097 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9098 (yyuserMerge): Provide a default case if b4_mergers is empty.
9099 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9100 * tests/glr-regression.at
9101 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9102 Add casts to pacify C++ compilers.
9103 * tests/glr-regression.at (Improper merging of GLR delayed action
9104 sets): Declare yylex before using it.
9105 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9106 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9107 test for valgrind; valgrind is independent of g++.
9108 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9109 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9110 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9111 Use a destructor, so that we can expand the stack. Change
9112 YYSTYPE to char * so that we can free it. Cast result of malloc.
9113
9114 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9115
9116 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9117 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9118
9119 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9120
9121 * PACKAGING: New file, suggested by Bruno Haible and taken from
9122 similar wording in gettext's PACKAGING file.
9123 * NEWS: Mention PACKAGING.
9124 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9125
9126 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9127
9128 * NEWS: Document recent i18n improvements.
9129 * bootstrap: Get runtime translations into runtime-po.
9130 Create runtime-po files automatically, if possible.
9131 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9132 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9133 does not infringe on the user's name space.
9134 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9135 * doc/bison.texinfo (Internationalization): Revamp the English
9136 and Texinfo syntax a bit, to try to make it clearer.
9137 (Bison Options, Option Cross Key): Mention --print-localedir.
9138 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9139 YYENABLE_NLS. Quote a bit more.
9140 * runtime-po/.cvsignore: New file.
9141 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9142 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9143 * runtime-po/quot.sed: Likewise.
9144 * runtime-po/boldquot.sed: Likewise.
9145 * runtime-po/en@quot.header: Likewise.
9146 * runtime-po/en@boldquot.header: Likewise.
9147 * runtime-po/insert-header.sin: Likewise.
9148 * runtime-po/remove-potcdate.sin: Likewise.
9149 * runtime-po/Makevars: Likewise.
9150 * runtime-po/LINGUAS: Likewise.
9151 * runtime-po/de.po: Likewise; we will rely on the translation project
9152 to maintain this, so "bootstrap" should get it.
9153 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9154 its value.
9155 * src/main.c (main): Bind the bison-runtime domain, too.
9156
9157 2005-07-12 Bruno Haible <bruno@clisp.org>
9158
9159 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9160 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9161 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9162 * runtime-po: New directory.
9163 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9164 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9165 * runtime-po/Rules-quot: New file, copied from po/.
9166 * runtime-po/quot.sed: Likewise.
9167 * runtime-po/boldquot.sed: Likewise.
9168 * runtime-po/en@quot.header: Likewise.
9169 * runtime-po/en@boldquot.header: Likewise.
9170 * runtime-po/insert-header.sin: Likewise.
9171 * runtime-po/remove-potcdate.sin: Likewise.
9172 * runtime-po/Makevars: New file.
9173 * runtime-po/POTFILES.in: New file.
9174 * runtime-po/LINGUAS: New file.
9175 * runtime-po/bison-runtime.pot: New file.
9176 * runtime-po/de.po: New file.
9177 * m4/bison.m4: New file.
9178 * Makefile.am (SUBDIRS): Add runtime-po.
9179 (aclocaldir, aclocal_DATA): New variables.
9180 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9181 Define aclocaldir.
9182 * src/getargs.c (usage): Document --print-localedir option.
9183 (PRINT_LOCALEDIR_OPTION): New enum item.
9184 (long_options): Add --print-localedir option.
9185 (getargs): Handle --print-localedir option.
9186 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9187 (Internationalization): New section.
9188
9189 2005-07-12 Akim Demaille <akim@epita.fr>
9190
9191 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9192 for consistency with the rest of the code.
9193 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9194 Add separators.
9195
9196 2005-07-12 Akim Demaille <akim@epita.fr>
9197
9198 * src/parse-gram.y: Use %printer instead of YYPRINT.
9199
9200 2005-07-12 Akim Demaille <akim@epita.fr>
9201
9202 * src/symtab.h, src/symtab.c (symbol_print): New.
9203 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9204 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9205
9206 2005-07-12 Akim Demaille <akim@epita.fr>
9207
9208 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9209 b4_at_dollar and b4_dollar_dollar.
9210
9211 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9212
9213 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9214 and Pennello's paper.
9215
9216 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9217
9218 * data/yacc.c (yyparse): Undo previous patch. Instead,
9219 set yylsp[0] and yyvsp[0] only if the initial action
9220 sets yylloc and yylval, respectively.
9221
9222 * data/yacc.c (yyparse): In the initial action, set
9223 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9224 This avoids the use of undefined variables if the initial
9225 action does not set yylloc and/or yylval.
9226
9227 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9228
9229 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9230 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9231 Remove from CVS. These files are automatically generated.
9232 * examples/extexi: Clarify that this file is now part of Bison,
9233 not GNU M4, and that it works with any POSIX-compatible Awk.
9234 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9235 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9236 so that we also get calc++-parser.yy. Geneate it.
9237 Use $(AWK), not gawk, since any conforming Awk will do.
9238 Put comment before action, since older 'make' can't handle comment
9239 in action.
9240 $(BUILT_SOURCES): List all built sources, not just some of them.
9241 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9242 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9243 $($(calc_sources_generated)): Remove unnecessary test for existence
9244 of target. (This had a shell syntax error anyway; a stray "x".)
9245 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9246 calc++-parser.yy.
9247 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9248
9249 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9250 implied by the other modules.
9251
9252 2005-07-06 Akim Demaille <akim@epita.fr>
9253
9254 Bind examples/calc++ to the package.
9255 * examples/calc++/Makefile: Remove, replaced by...
9256 * examples/calc++/Makefile.am: ... this new file.
9257 * examples/calc++/test: Remove input.
9258 * examples/calc++/compile: Remove.
9259 * examples/Makefile.am: New.
9260 * configure.ac, Makefile.am: Adjust.
9261 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9262
9263 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9264
9265 * data/glr.c (yyFail): Drastically simplify; since the format argument
9266 never had any % directives, we can simply pass it to yyerror.
9267 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9268 be modified later, as that is the usual style in glr.c.
9269 Problems reported by Paul Hilfinger.
9270
9271 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9272 and size overflow errors.
9273 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9274 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9275 (YYSIZEMAX): New macro.
9276 (yystpcpy): New function, taken from yacc.c.
9277 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9278 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9279 so that we don't have to maintain their signatures.
9280 (yyFail): Check for buffer overflow, by using vsnprintf rather
9281 than vsprintf. Allocate a bigger buffer if possible.
9282 Report an error if buffer allocation fails.
9283 (yyStackOverflow): New function.
9284 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9285 the initialization was successful. It might fail if storage was
9286 exhausted.
9287 (yyexpandGLRStack): Add more checks for storage allocation failure.
9288 Use yyStackOverflow to report failures.
9289 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9290 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9291 Don't assume stack number fits in int.
9292 (yysplitStack): Check for storage allocation failure.
9293 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9294 can print diagnostics on storage allocation failure. All callers
9295 changed.
9296 (yyresolveValue): Use yybool for boolean.
9297 (yyreportSyntaxError): Check for size-calculation overflow.
9298 This code is taken from yacc.c.
9299 (yyparse): Check for storage allocation errors when allocating
9300 the initial stack.
9301
9302 2005-07-05 Akim Demaille <akim@epita.fr>
9303
9304 Extract calc++ from the documentation.
9305 * doc/bison.texinfo (Calc++): Add the extraction marks.
9306 * examples/extexi: New, from the aborted GNU Programming 2E.
9307 Separate the different paragraph of a file with empty lines.
9308 * examples/Makefile: Use it to extract the whole calc++ example.
9309
9310 2005-06-24 Akim Demaille <akim@epita.fr>
9311
9312 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9313 class typedefs.
9314
9315 2005-06-22 Akim Demaille <akim@epita.fr>
9316
9317 * doc/bison.texinfo (C++ Language Interface): First stab.
9318 (C++ Parsers): Remove.
9319
9320 2005-06-22 Akim Demaille <akim@epita.fr>
9321
9322 * data/lalr1.cc (yylex_): Honor %lex-param.
9323
9324 2005-06-22 Akim Demaille <akim@epita.fr>
9325
9326 Start a set of simple examples.
9327 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9328 * examples/calc++/calc++-driver.hh,
9329 * examples/calc++/calc++-parser.yy,
9330 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9331 * examples/calc++/compile, examples/calc++/test: New.
9332
9333 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9334
9335 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9336 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9337 which stems from the 2005-05-27 patch.
9338
9339 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9340
9341 * data/glr.c: Modify treatment of unused parameters to permit use
9342 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9343
9344 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9345
9346 Fix infringement on user name space reported by Janos Zoltan Szabo.
9347 * data/yacc.c (yyparse): strlen -> yystrlen.
9348
9349 2005-05-30 Akim Demaille <akim@epita.fr>
9350
9351 * data/lalr1.cc (_): New.
9352 Translate the various messages.
9353
9354 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9355
9356 Fix infringement on user name space reported by Bruno Haible.
9357 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9358 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9359 the user's name space.
9360 (alloca): Include <stdlib.h> to get it, if it's not built in.
9361 (YYMALLOC, YYFREE): Define only if needed.
9362 (malloc, free): Declare, but only if needed, as this infringes on
9363 the user name space.
9364
9365 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9366
9367 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9368 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9369 with %d format.
9370 * lib/ebitset.c (min, max): Undef before defining.
9371 * lib/vbitset.c (min, max): Likewise.
9372 * lib/subpipe.c (create_subpipe): Save local variables in case
9373 vfork clobbers them.
9374
9375 2005-05-24 Bruno Haible <bruno@clisp.org>
9376
9377 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9378 error message syntax used by gcc-4.0.
9379
9380 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9381
9382 * README: Mention m4 1.4.3. Remove obsolete advice about
9383 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9384
9385 * bootstrap: Remove workaround for problem I encountered with
9386 gettext 0.14.1; it seems to be fixed now.
9387
9388 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9389
9390 * NEWS: Version 2.0a.
9391
9392 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9393 the previous change.
9394
9395 Various maintainer cleanups.
9396 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9397 conftest*, for benefit of CVS commands run at the same time as
9398 "configure". Add build-aux, since "bootstrap" now creates it and
9399 its subfiles.
9400 * Makefile.cfg (move_if_change): Remove.
9401 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9402 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9403 (po_repo, do-po-update, po-update, wget_files, get-targets):
9404 (config.guess-url_prefix, config.sub-url_prefix):
9405 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9406 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9407 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9408 Remove.
9409 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9410 this is now the recommended name.
9411 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9412 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9413 ylwrap. These files now go into build-aux.
9414 * config/move-if-change: Remove.
9415 * config/prev-version.txt: Bump from 1.75 to 2.0.
9416
9417 * bootstrap: Add stdio-safer, unistd-safer modules.
9418 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9419 we don't need it).
9420 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9421 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9422 * lib/subpipe.c: Include "unistd-safer.h".
9423 (create_subpipe): Make sure all the newly-created
9424 file descriptors are > 2, so that diagnostics don't
9425 get sent down them (which might cause Bison to hang, in theory).
9426 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9427 * src/files.c (xfopen): Use fopen_safer, not fopen.
9428
9429 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9430 yesterday's yacc.c fix.
9431
9432 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9433
9434 * data/glr.c, data/lalr1.cc: Update copyright date.
9435
9436 Fix a destructor bug reported by Wolfgang Spraul in
9437 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9438 * data/yacc.c (yyabortlab): Don't call destructor, and
9439 don't set yychar to EMPTY.
9440 (yyoverflowlab): Don't call destructor.
9441 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9442 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9443 since we no longer output the message "discarding lookahead token
9444 end of input ()".
9445
9446 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9447
9448 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9449 fix a small glitch in debugging output.
9450 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9451 after YY_SYMBOL_PRINT where needed.
9452
9453 (struct yyGLRState): Add some comments.
9454 (struct yySemanticOption): Add some comments.
9455 (union yyGLRStackItem): Add comment.
9456
9457 (yymergeOptionSets): Correct this to properly perform the union,
9458 avoiding infinite reported by Michael Rosien.
9459 Update comment.
9460
9461 * tests/glr-regression.at: Add test for GLR merging error reported
9462 by M. Rosien.
9463
9464 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9465
9466 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9467 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9468 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9469 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9470 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9471 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9472 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9473 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9474 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9475 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9476 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9477 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9478 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9479 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9480 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9481 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9482 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9483 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9484 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9485 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9486 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9487 src/output.h, src/parse-gram.c, src/parse-gram.h,
9488 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9489 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9490 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9491 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9492 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9493 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9494 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9495 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9496 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9497 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9498 tests/reduce.at, tests/regression.at, tests/sets.at,
9499 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9500 Update FSF postal mail address.
9501
9502 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9503
9504 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9505 Problem reported by Ralf Menzel.
9506
9507 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9508
9509 * tests/actions.at: Test that stack overflow invokes destructors.
9510 From Marcus Holland-Moritz.
9511 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9512 from here....
9513 (yyreturn): to here. That way, destructors are called properly
9514 even if the stack overflows, or the user calls YYACCEPT or
9515 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9516 (yyoverflowlab): Destroy the lookahead.
9517
9518 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9519
9520 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9521
9522 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9523
9524 * NEWS: Bison-generated C parsers no longer quote literal strings
9525 associated with tokens.
9526 * src/output.c (prepare_symbols): Don't escape strings,
9527 since users don't want to see C escapes.
9528 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9529 in diagnostics.
9530 * tests/input.at (Torturing the Scanner): Likewise.
9531 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9532
9533 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9534
9535 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9536 the data size is known to be too small and we can't increase it.
9537 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9538
9539 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9540
9541 * src/parse-gram.y: Include quotearg.h.
9542 (string_as_id): Quote $1 before using it as a key, since the
9543 lexer no longer quotes it for us.
9544 (string_content): Don't strip quotes, since lexer no longer
9545 quotes it for us.
9546 * src/scan-gram.l: Include quotearg.h.
9547 ("\""): Omit quote.
9548 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9549 a key, since the rest of the lexer doesn't quote it.
9550 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9551 * tests/regression.at (Token definitions): Check for backslashes
9552 in token strings.
9553
9554 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9555 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9556 (yyparse): Revamp code to generate long syntax error message, to
9557 make it easier to translate, and to avoid problems with arithmetic
9558 overflow. Change "virtual memory" to "memory" in diagnostic, since
9559 we don't know whether the memory is virtual.
9560
9561 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9562
9563 * NEWS: Bison-generated C parsers now use the _ macro to
9564 translate strings.
9565 * data/yacc.c (_) [!defined _]: New macro.
9566 All English strings wrapped inside this macro.
9567 * doc/bison.texinfo (Bison Parser): Document _.
9568 * po/POTFILES.in: Include src/parse-gram.c, since it now
9569 includes translateable strings that parse-gram.y doesn't.
9570
9571 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9572
9573 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9574 reverting the 2004-10-11 change to this function.
9575 (symbol_check_alias_consistency): Don't call symbol_type_set
9576 if the type name is already correct.
9577 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9578
9579 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9580
9581 * tests/regression.at (Token definitions): Don't use a token named
9582 c, as that generates a "#define c ..." that runs afoul of buggy
9583 stdlib.h that uses the identifier c as a member of struct
9584 drand48_data. Problem reported by Horst Wente.
9585
9586 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9587
9588 * bootstrap: Change translation URL from
9589 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9590 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9591 redirection glitches. Problem reported by twlevo@xs4all.nl.
9592
9593 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9594
9595 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9596 after operands; POSIX says this isn't portable for the c99 command.
9597
9598 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9599
9600 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9601 immediately if a data overrun has occurred; this may help us track
9602 down what may be a spurious failure on MacOS.
9603
9604 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9605
9606 Respond to problems reported by twlevo@xs4all.nl.
9607
9608 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9609
9610 * src/vcg.h: Comment fix.
9611 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9612 (G_CMAX): Change to -1 instead of INT_MAX.
9613
9614 * data/yacc.c (yyparse): Omit spaces before #line.
9615
9616 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9617
9618 * src/tables.c (state_number_to_vector_number): Put it inside an
9619 "#if 0", since it's not currently used. Problem reported by
9620 Roland McGrath.
9621
9622 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9623
9624 * src/output.c (escaped_output): Renamed from
9625 escaped_file_name_output, since we now use it for symbol tags as
9626 well. All uses changed.
9627 (symbol_destructors_output, symbol_printers_output):
9628 Escape symbol tags too.
9629 Problem reported by Matyas Forstner in
9630 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9631
9632 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9633 not needed.
9634 * src/output.c (user_actions_output, token_definitions_output,
9635 symbol_destructors_output, symbol_printers_output): Likewise.
9636 * src/reader.c (prologue_augment): Likewise.
9637 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9638
9639 * src/vcg.c (output_edge): Don't quote linestyle arg.
9640 Problem reported by twlevo@xs4all.nl.
9641
9642 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9643
9644 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9645 example, reported by Derek M Jones. Also, make the example even
9646 more outrageous, to better illustrate how bad the problem is.
9647
9648 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9649
9650 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9651 putsym. Typo reported by Sebastian Piping.
9652
9653 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9654
9655 * doc/bison.texinfo (Language and Grammar): some -> same
9656 (Epilogue): int he -> in the
9657 Typos reported by Sebastian Piping via Justin Pence.
9658
9659 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9660
9661 * tests/glr-regression.at (Improper handling of embedded actions
9662 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9663 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9664 with dollar signs in test names.
9665 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9666 for a similar reason.
9667
9668 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9669
9670 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9671 wants to redefine G_VIEW.
9672
9673 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9674
9675 * src/vcg.c (get_view_str): Remove case for normal_view.
9676 Problem reported by twlevo@xs4all.nl.
9677
9678 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9679
9680 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9681 Problem reported by twlevo@xs4all.nl.
9682
9683 * doc/bison.texinfo: Change @dircategory from "GNU programming
9684 tools" to "Software development". Requested by Richard Stallman
9685 via Karl Berry.
9686
9687 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9688
9689 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9690 Problem reported by twlevo@xs4all.nl.
9691
9692 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9693
9694 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9695 keyword; it's not needed with modern compilers, and it doesn't
9696 affect correctness with older compilers. Suggested by
9697 twlevo@xs4all.nl.
9698
9699 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9700
9701 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9702 gcc -Wswitch-default.
9703 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9704 * data/yacc.c (yyparse): Likewise.
9705
9706 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9707
9708 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9709 already. Let config.h define any nonstandard values.
9710
9711 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9712
9713 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9714 for the benefit of slower hosts. Problem reported by
9715 Nelson H. F. Beebe.
9716
9717 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9718
9719 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9720 being defined and not used.
9721 * data/lalr1.cc (yyparse): Likewise.
9722 Use "if (false)" rather than "if (0)".
9723
9724 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9725
9726 * TODO: Mention that we should allow NUL bytes in tokens.
9727
9728 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9729
9730 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9731 Problem reported by Hans Aberg.
9732
9733 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9734
9735 * src/getargs.c (version): Happy new year; update overall
9736 program copyright date from 2004 to 2005.
9737
9738 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9739 Problem reported by Hans Aberg.
9740 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9741 (Output file names.): Add a test for the case when standard output
9742 is closed.
9743
9744 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9745
9746 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9747 to fix an oversight in the Bison 2.0 manual.
9748
9749 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9750
9751 * NEWS: Version 2.0. Reformat the existing news items since
9752 1.875, so that related items are grouped together.
9753 * configure.ac (AC_INIT): Bump version to 2.0.
9754 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9755
9756 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9757 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9758 otherwise, we're not testing alloca. Unfortunately there's no
9759 simple way to consult HAVE_ALLOCA here.
9760
9761 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9762 for yymsg, too.
9763
9764 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9765 hand. This avoids a warning about comparing int to size_t when
9766 GCC warnings are enabled.
9767
9768 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9769
9770 * NEWS: Bison-generated parsers no longer default to using the
9771 alloca function (when available) to extend the parser stack, due
9772 to widespread problems in unchecked stack-overflow detection.
9773 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9774 responsibility to set it to a positive value. This lets the user
9775 specify a value that is not a preprocessor constant.
9776 * data/yacc.c (YYMAXDEPTH): Likewise.
9777 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9778 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9779 to be a compile-time constant. However, explain the constraints on it.
9780 Also, explain the constraints on YYINITDEPTH.
9781 (Table of Symbols): Explain that alloca is no longer the default.
9782 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9783 to 1.
9784
9785 * doc/bison.texinfo (Location Default Action): Mention that n must
9786 be zero when k is zero. Suggested by Frank Heckenbach.
9787
9788 2004-12-22 Akim Demaille <akim@epita.fr>
9789
9790 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9791 (parser::state_type, parser::semantic_type, parser::location_type):
9792 Private, not public.
9793 (parser::parse): Return ints, not bool.
9794 Returning a bool introduces a problem: 0 corresponds to false, and
9795 it seems weird to return false on success. Returning true changes
9796 the conventions for yyparse.
9797 Alternatively we could return void and send an exception.
9798 There is no clear consensus (yet?).
9799 (state_stack, semantic_stack, location_stack): Rename as...
9800 (state_stack_type, semantic_stack_type, location_stack_type): these.
9801 Private, not public.
9802 * tests/c++.at: New.
9803 * tests/testsuite.at, tests/Makefile.am: Adjust.
9804
9805 2004-12-21 Akim Demaille <akim@epita.fr>
9806
9807 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9808
9809 2004-12-21 Akim Demaille <akim@epita.fr>
9810
9811 Don't impose std::string for filenames.
9812
9813 * data/lalr1.cc (b4_filename_type): New.
9814 (position::filename): Use it.
9815 (parser.hh): Move the inclusion of stack.hh and location.hh below
9816 the user code, so that needed headers for the filename type can be
9817 included first.
9818 Forward declare them before the user code.
9819 * tests/Makefile.am (check-local, installcheck-local): Pass
9820 TESTSUITEFLAGS to the TESTSUITE.
9821
9822 2004-12-20 Akim Demaille <akim@epita.fr>
9823
9824 Use more STL like names: my_class instead of MyClass.
9825
9826 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9827 (SemanticStack, SemanticType, StateStack, StateType)
9828 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9829 (Parser::value): Rename as...
9830 (location_stack, location_type, rhs_number_type, semantic_stack)
9831 (semantic_type, state_stack, state_type, token_number_type, stack)
9832 (slice, traits, parser::yylloc, parser::yylval): these.
9833
9834 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9835
9836 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9837
9838 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9839 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9840
9841 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9842
9843 Remove uses of 'short int' and 'unsigned short int'. This raises
9844 some arbitrary limits. It uses more memory but nowadays that's
9845 not much of an issue.
9846
9847 This change does not affect the generated parsers; that's a different
9848 task, as some users will want to conserve memory there.
9849
9850 Ideally we should use size_t to represent all object counts, and
9851 something like ptrdiff_t to represent signed differences of object
9852 counts; but that will require more code-cleanup than I have the
9853 time to do right now.
9854
9855 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
9856 Use size_t, not int or short int, to count objects.
9857 * src/closure.c (nritemset, closure): Likewise.
9858 * src/closure.h (nritemset, closure): Likewise.
9859 * src/nullable.c (nullable_compute): Likewise.
9860 * src/print.c (print_core): Likewise.
9861 * src/print_graph.c (print_core): Likewise.
9862 * src/state.c (state_compare, state_hash): Likewise.
9863 * src/state.h (struct state): Likewise.
9864 * src/tables.c (default_goto, goto_actions): Likewise.
9865
9866 * src/gram.h (rule_number, rule): Use int, not short int.
9867 * src/output.c (prepare_rules): Likewise.
9868 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
9869 errs, reductions): Likewise.
9870 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
9871 Likewise.
9872 * src/tables.c (vector_number, tally, action_number,
9873 ACTION_NUMBER_MINIMUM): Likewise.
9874 * src/output.c (muscle_insert_short_int_table): Remove.
9875
9876 2004-12-17 Akim Demaille <akim@epita.fr>
9877
9878 * data/lalr1.cc: Extensive Doxygenation.
9879 (error_): Rename as...
9880 (error): this, since it is visible to the user.
9881 Adjust callers.
9882 (Parser::message): Now an automatic variable from...
9883 (Parser::yyreport_syntax_error_): here.
9884 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
9885 Parser::error.
9886 * tests/input.at: Escape $.
9887
9888 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
9889
9890 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
9891 Parenthesize rhs to avoid obscure problems with mistakes like
9892 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
9893 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9894 b4_rhs_location): Likewise.
9895 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9896 b4_rhs_location): Likewise.
9897
9898 2004-12-16 Akim Demaille <akim@epita.fr>
9899
9900 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
9901 yacc.c: be sure to stay within yycheck_.
9902 * tests/actions.at: Re-enable C++ tests.
9903
9904 2004-12-16 Akim Demaille <akim@epita.fr>
9905
9906 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
9907 real.
9908
9909 2004-12-16 Akim Demaille <akim@epita.fr>
9910
9911 Use #define to handle the %name-prefix.
9912
9913 * data/glr.c, data/yacc.c: Comment changes.
9914 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
9915 so that one can refer to yylex in the parser file, and have it
9916 renamed, as is the case with other skeletons.
9917
9918 2004-12-16 Akim Demaille <akim@epita.fr>
9919
9920 Move lalr1.cc internals into yy*.
9921
9922 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
9923 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
9924 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
9925 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
9926 (empty_, final_, terror_, errcode_, ntokens_)
9927 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
9928 (looka_, ilooka_, error_range_, nerrs_):
9929 Rename as...
9930 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
9931 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
9932 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
9933 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
9934 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
9935 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
9936 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
9937 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
9938 these.
9939
9940 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
9941
9942 Fix some problems reported by twlevo at xs4all.
9943 * src/symtab.c (symbol_new): Report an error if the input grammar
9944 contains too many symbols. This is better than calling abort() later.
9945 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
9946 (struct node, struct graph):
9947 Rename member expand to stretch. All uses changed.
9948 (struct graph): Remove member layoutalgorithm. All uses removed.
9949 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
9950 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
9951 All uses changed.
9952 (N_STRETCH): Rename from N_EXPAND. All uses changed.
9953
9954 2004-12-15 Akim Demaille <akim@epita.fr>
9955
9956 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
9957 Add more Doxygen comments.
9958 (symprint_, stack_print_, reduce_print_, destruct_, pop)
9959 (report_syntax_error_, translate_): Rename as...
9960 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
9961 (yypop_, yyreport_syntax_error_, yytranslate_): this.
9962
9963 2004-12-15 Akim Demaille <akim@epita.fr>
9964
9965 * data/lalr1.cc (lex_): Rename as...
9966 (yylex_): this.
9967 Move the trace here.
9968 Take the %name-prefix into account.
9969 Reported by Alexandre Duret-Lutz.
9970
9971 2004-12-15 Akim Demaille <akim@epita.fr>
9972
9973 Simplify the C++ parser constructor.
9974
9975 * data/lalr1.cc (debug_): Rename as...
9976 (yydebug_): so that the parser's internals are always in the yy*
9977 pseudo namespace.
9978 Adjust uses.
9979 (b4_parse_param_decl): Remove the leading comma as it is now only
9980 called as unique argument list.
9981 (Parser::Parser): Remove the constructor accepting a location and
9982 an initial debugging level.
9983 Remove from the other ctor the argument for the debugging level.
9984 (debug_level_type, debug_level, set_debug_level): New.
9985
9986 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
9987 constructor calls.
9988
9989 2004-12-15 Akim Demaille <akim@epita.fr>
9990
9991 Remove b4_root related material: failure experiment
9992 (which goal was to allow to derive from a class).
9993
9994 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
9995 definitions and uses.
9996
9997 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
9998
9999 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10000 not 2, since it's not portable to subtract 1 from the start of an
10001 array. The new item 0 is never set or used. All uses changed.
10002
10003 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10004 the default definition of YYLLOC_DEFAULT. Problem reported
10005 by Frank Heckenbach.
10006
10007 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10008
10009 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10010 the normal case and one for the error case. Just use the
10011 first one uniformly. Problem reported by Frank Heckenbach.
10012 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10013 use exactly the same macro in both places.
10014 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10015 so that the normal-case YYRHSLOC works for the error case too.
10016 All uses changed.
10017 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10018 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10019 * doc/bison.texinfo (Location Default Action): Don't claim that
10020 we have an array of locations. Use the same macro for both glr
10021 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10022 the index is 0.
10023
10024 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10025
10026 * HACKING: Update email addresses to send announcements to.
10027
10028 * configure.ac (AC_INIT): Bump version to 1.875f.
10029
10030 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10031
10032 * NEWS: Version 1.875e.
10033 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10034
10035 * src/scan-skel.l: Include "complain.h", for "fatal".
10036
10037 * src/relation.h (relation_print, relation_digraph):
10038 Relation sizes are of type relation_node, not size_t (this is
10039 merely a doc fix, since the two types are equivalent).
10040 (relation_transpose): Relation sizes are of type relation_node,
10041 not int.
10042 * src/relation.c: Likewise.
10043 (top, infinity): Now of type relation_node, not int.
10044 (traverse, relation_transpose): Use relation_node, not int.
10045
10046 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10047 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10048 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10049
10050 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10051 specifying whether the test should be skipped. Use it tp
10052 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10053 fail on some hosts, and should be skipped.
10054
10055 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10056
10057 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10058 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10059 unless otherwise specified below.
10060
10061 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10062 to allocate kernel_base, kernel_items, kernel_size, since
10063 they needn't be initialized to 0.
10064 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10065 * src/closure.c (new_closure): Likewise, for itemset.
10066 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10067 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10068 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10069 (build_relations): Likewise for edge, states1, includes.
10070 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10071 * src/reader.c (packgram): Likewise, for ritem, rules.
10072 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10073 * src/relation.c (relation_digraph): Likewise for VERTICES.
10074 (relation_transpose): Likewise for new_R, end_R.
10075 * src/symtab.c (symbols_token_translations_init): Likewise for
10076 token_translations.
10077 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10078 (token_actions): Likewise for yydefact, actrow, conflrow,
10079 conflict_list.
10080 (save_column): Likewise for froms[symno], tos[symno].
10081 (goto_actions): Likewise for state_count.
10082 (pack_table): Likewise for base, pos, check.
10083 (tables_generate): Likewise for width.
10084
10085 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10086 for initial core. Just have a separate core, so we needn't worry
10087 about whether kernel_size and kernel_base are initialized.
10088
10089 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10090 kernel_size, kernel_items): Remove unnecessary initialization.
10091 * src/conflicts.c (conflicts): Likewise.
10092 * src/derives.c (derives): Likewise.
10093 * src/muscle_tablc (muscle_insert): Likewise.
10094 * src/relation.c (relation_digraph): Likewise.
10095 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10096 conflrow, conflict_table, conflict_list, table, check):
10097 Likewise.
10098
10099 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10100 This is because all callers pass unsigned int.
10101 * src/closure.h (new_closure): Likewise.
10102
10103 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10104 (build_relations): Initialize includes[i] in all cases.
10105 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10106 and rules[ruleno].precsym. Initialize members in order.
10107 * src/relation.c (relation_transpose): Always initialize new_R[i]
10108 and end_R[i].
10109 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10110
10111 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10112 conflict_list[0] was always 0, but now it isn't initialized.
10113
10114 * src/table.c (table_grow): When conflict_table grew, the grown
10115 area wasn't cleared. Fix this.
10116
10117 * lib/.cvsignore: Add strdup.c, strdup.h.
10118 * m4/.cvsignore: Add strdup.m4.
10119
10120 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10121
10122 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10123 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10124 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10125 ngotos + 1 without checking for overflow.
10126 (build_relations): Use END_NODE, not -1, to denote end of edges.
10127 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10128 build_relations): Use goto_number, not int, for goto numbers.
10129 * src/tables.c (save_column, default_goto): Likewise.
10130
10131 2004-11-23 Akim Demaille <akim@epita.fr>
10132
10133 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10134 of #defining from yystype.
10135 Don't typedef yystype, C++ does not need it.
10136 This lets it possible to forward declare it as union.
10137
10138 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10139
10140 * bootstrap (gnulib_modules): Add extensions.
10141 Problem reported by Jim Meyering.
10142
10143 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10144
10145 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10146 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10147 src/system.h, src/tables.c: XFREE -> free, to accommodate
10148 recent change to gnulib xalloc.h.
10149 Problem reported by Jim Meyering.
10150
10151 2004-11-17 Akim Demaille <akim@epita.fr>
10152
10153 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10154
10155 2004-11-17 Akim Demaille <akim@epita.fr>,
10156 Alexandre Duret-Lutz <adl@gnu.org>
10157
10158 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10159 changes.
10160 (YYCDEBUG): Adjust.
10161 Use it instead of cdebug_.
10162 (Parser::debug_stream, Parser::set_debug_stream): New.
10163 (Parser::symprint_): Define cdebug_ for temporary backward
10164 compatibility.
10165 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10166 debug_stream ().
10167
10168 2004-11-17 Akim Demaille <akim@epita.fr>
10169
10170 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10171 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10172 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10173 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10174
10175 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10176
10177 * data/glr.c (yyloc_default): Remove; not used.
10178 Problem reported by Frank Heckenbach.
10179
10180 2004-10-25 Akim Demaille <akim@epita.fr>
10181
10182 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10183 Introduce another definition to address simple location arrays.
10184 (yyGLRStack): New member: yyerror_range.
10185 (yyrecoverSyntaxError, yyparse): Update it.
10186 (yyrecoverSyntaxError): Use it when shifting the error token to
10187 have an accurate range, equivalent to the one computed by both
10188 yacc.c and lalr1.cc.
10189 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10190 that column numbers start at column 0, as per GNU Coding
10191 Standards, the others tests, and the doc.
10192 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10193 Adjust to the above change (first column is 0).
10194 And adjust the location of the "<error>", now covering the whole
10195 line.
10196
10197 2004-10-22 Akim Demaille <akim@epita.fr>
10198 and Paul Eggert <eggert@cs.ucla.edu>
10199
10200 Remove some arbitrary limits on goto numbers and relations.
10201 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10202 initial values, since they're never used.
10203 (set_goto_map): ngotos is now unsigned, so test for overflow
10204 by seeing whether it wraps around to zero.
10205 * src/lalr.h (goto_number): Now size_t, not short int.
10206 (GOTO_NUMBER_MAXIMUM): Remove.
10207 * src/relation.c (relation_print, traverse, relation_transpose):
10208 Check for END_NODE rather than looking at sign.
10209 * src/relation.h (END_NODE): New macro.
10210 (relation_node): Now size_t, not short int.
10211
10212 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10213
10214 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10215 keyword, not an identifier. Problem reported by Baron Schwartz in
10216 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10217
10218 2004-10-11 Akim Demaille <akim@epita.fr>
10219
10220 * src/symtab.c (symbol_check_alias_consistency): Also check
10221 type names, destructors, and printers.
10222 Reported by Alexandre Duret-Lutz.
10223 Recode the handling of associativity and precedence in terms
10224 of symbol_precedence_set.
10225 Accept no redeclaration at all, not even equal to the previous
10226 value.
10227 (redeclaration): New.
10228 Use it to factor redeclaration complaints.
10229 (symbol_make_alias): Don't set the type of the alias, let
10230 symbol_check_alias_consistency do it as for other features.
10231 * src/symtab.h (symbol): Add new member prec_location, and
10232 type_location.
10233 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10234 * tests/input.at (Incompatible Aliases): New.
10235
10236 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10237
10238 .cvsignore fixes to accommodate gnulib changes,
10239 and the practice of naming build directories "_build".
10240 * .cvsignore: Add "_*". Sort.
10241 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10242 * m4/.cvsignore: Add "*_gl.m4".
10243
10244 2004-10-06 Akim Demaille <akim@epita.fr>
10245
10246 * src/parse-gram.y (add_param): Fix the truncation of trailing
10247 spaces.
10248
10249 2004-10-05 Akim Demaille <akim@epita.fr>
10250
10251 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10252 whether the reducion was empty or not. This leaves room to
10253 improve the use of YYLLOC_DEFAULT in such a case.
10254 lalr1.cc is still experimental, so changing this is acceptable.
10255 And finally, there are probably not many users who changed the
10256 handling of locations in GLR, so changing is admissible too.
10257
10258 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10259 empty reduction, set @$ to an empty location ending the previously
10260 stacked symbol.
10261 Adjust uses to make sure the code is triggered on empty
10262 reductions.
10263 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10264 expected output: empty reductions have empty locations.
10265
10266 2004-09-29 Akim Demaille <akim@epita.fr>
10267
10268 * data/lalr1.cc: Move towards a more standard C++ coding style
10269 for templates: Class < T > -> Class<T>.
10270
10271 2004-09-29 Akim Demaille <akim@epita.fr>
10272
10273 * data/lalr1.cc: Reinstall the former ctor, for sake of
10274 compatibility, but warn it will be removed.
10275 Move towards a more standard C++ coding style (i.e., type *var ->
10276 type* var).
10277
10278 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10279
10280 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10281 since it's less likely to work if NULs are involved in the future.
10282
10283 2004-09-27 Akim Demaille <akim@epita.fr>
10284
10285 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10286
10287 2004-09-27 Akim Demaille <akim@epita.fr>
10288
10289 * data/lalr1.cc (b4_parse_param_decl_1): New.
10290 (b4_parse_param_decl): Use it to have different names between attribute
10291 and argument names.
10292 (b4_cc_constructor_call): Likewise.
10293
10294 2004-09-24 Akim Demaille <akim@epita.fr>
10295
10296 * src/parse-gram.y (add_param): Strip the leading and trailing
10297 blanks from a formal argument declaration.
10298 (YY_LOCATION_PRINT): New.
10299
10300 2004-09-24 Akim Demaille <akim@epita.fr>
10301
10302 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10303 after the location.
10304
10305 2004-09-24 Akim Demaille <akim@epita.fr>
10306
10307 * doc/bison.texinfo (Table of Symbols): Sort.
10308
10309 2004-09-21 Akim Demaille <akim@epita.fr>
10310
10311 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10312 the useless parentheses.
10313 Suggested by Paul Eggert.
10314
10315 2004-09-20 Akim Demaille <akim@epita.fr>
10316
10317 Let the initial-action act on the look-ahead, and use it for the
10318 "initial push" (corresponding to an hypothetical beginning-of-file).
10319 And let lalr1.cc honor %initial-action.
10320
10321 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10322 example.
10323 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10324 (Parser::Parser): Remove the ctor that used to initialize it.
10325 (Parser::parse): Like in the other skeletons, issue the "starting
10326 parse" message before any action.
10327 Honor %initial-action.
10328 Initialize the stacks with the lookahead.
10329 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10330 look-ahead.
10331 Push them in the stacks.
10332 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10333
10334 2004-09-20 Akim Demaille <akim@epita.fr>
10335
10336 * doc/bison.texinfo (Initial Action Decl): New.
10337
10338 2004-09-20 Akim Demaille <akim@epita.fr>
10339
10340 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10341 clearer criterion to define it.
10342 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10343 When reducing on an empty RHS, use the latest stacked location as
10344 location.
10345 yylloc is not always available.
10346 * data/glr.c: Likewise.
10347 Also, honor initial-actions.
10348
10349 2004-09-20 Akim Demaille <akim@epita.fr>
10350
10351 * data/yacc.c (YY_LOCATION_PRINT): New.
10352 Define when we know YYLTYPE's structure, i.e., when the default
10353 YYLLOC_DEFAULT is used.
10354 * data/c.m4 (b4_yysymprint_generate): Use it.
10355 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10356 value of the result.
10357 (error_start_): Replace with...
10358 (error_range_): this location array.
10359 This allows to replace code relying on the implementation of
10360 locations by portable code.
10361 * data/yacc.c (yylerrsp): Replace with...
10362 (yyerror_range): this.
10363 Every time a token is popped, update yyerror_range[0], to have an
10364 accurate location for the error token.
10365 * data/glr.c (YY_LOCATION_PRINT): New.
10366 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10367 deference a pointer.
10368 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10369 report the location in %printers.
10370
10371 * src/scan-skel.l: Instead of abort, report error messages to ease
10372 understanding skeleton scanning failures.
10373
10374 2004-09-16 Akim Demaille <akim@epita.fr>
10375
10376 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10377 (iterator, const_iterator): these, to be more in the C++ spirit.
10378 Also, return reverse iterators so that when displaying the stack
10379 we display its bottom first.
10380 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10381 from yacc.c.
10382 We should probably use vector here though.
10383
10384 2004-09-16 Akim Demaille <akim@epita.fr>
10385
10386 Have more complete shift traces.
10387
10388 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10389 to report Shifts instead of ad hoc YYDPRINTF invocations,
10390 including for the error token.
10391 * data/lalr1.cc (symprint_): Output the location.
10392 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10393 output the location within the %printer.
10394 Activate GLR tests, at least to make sure they compile properly.
10395 They still don't pass though.
10396 * tests/calc.at: Adjust expect verbose output, since now "Entering
10397 state..." is on a different line than the "Shifting" message.
10398
10399 2004-09-08 Akim Demaille <akim@epita.fr>
10400
10401 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10402 Bison directive from the Bison file to the invocation of this
10403 macro, so that these directives are passed to
10404 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10405 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10406 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10407 the extra Bison directives instead of the whole series.
10408 Change the grammar so that there are recoverable errors, and
10409 unrecoverable errors. Now we can have the parser give up before
10410 consuming the whole input. As a result we now can observe that
10411 the lookahead is freed when needed.
10412 Change the parser source to parse argv[1] instead of a hard coded
10413 string.
10414 Simplify yylex, and give a value and location to EOF.
10415 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10416 passed directives already coded in the file.
10417 Add some tests to check the location of "error".
10418 For some tests, the C++ parser is correct, and not yacc.c.
10419 For other tests, they provide different, but unsatisfying, values,
10420 so keep the C++ value so that at least one parser is "correct"
10421 according to the test suite.
10422 (Actions after errors): Remove, this is subsumed by the
10423 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10424
10425 2004-09-06 Akim Demaille <akim@epita.fr>
10426
10427 * data/lalr1.cc: Adjust the indentation of the labels.
10428 (Parser::pop): New.
10429 Use it.
10430
10431 2004-09-06 Akim Demaille <akim@epita.fr>
10432
10433 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10434 argument, an informative message.
10435 Call YY_SYMBOL_PRINT.
10436 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10437 * data/lalr1.cc (destruct_): Likewise.
10438 In addition, no longer depend on b4_yysymprint_generate and
10439 b4_yydestruct_generate to generate these functions, do it "by
10440 hand".
10441
10442 2004-09-03 Akim Demaille <akim@epita.fr>
10443
10444 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10445 invoked, yydestruct the lookahead.
10446 * tests/calc.at (Calculator $1): Update the expected lengths of
10447 traces: there is an added line for the discarded lookahead.
10448 * doc/bison.texinfo (Destructor Decl): Some rewording.
10449 Define "discarded" symbols.
10450
10451 2004-09-02 Akim Demaille <akim@epita.fr>
10452
10453 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10454
10455 2004-09-02 Akim Demaille <akim@epita.fr>
10456
10457 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10458 (YYDSYMPRINTF): Rename as...
10459 (YY_SYMBOL_PRINT): this.
10460 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10461 two.
10462 Use it instead of direct symprint_ calls.
10463 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10464 one.
10465
10466 2004-09-02 Akim Demaille <akim@epita.fr>
10467
10468 * data/lalr1.cc (b4_yysymprint_generate): New.
10469 (symprint_): New member function, defined when YYDEBUG.
10470 Use it consistently instead of token/nterm debugging output by
10471 hand.
10472 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10473 %printer calls to use cdebug_ when using lalr1.cc.
10474
10475 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10476
10477 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10478 with #ifdef YYDEBUG.
10479
10480 2004-08-26 Akim Demaille <akim@epita.fr>
10481
10482 * doc/bison.texinfo (Implementing Loops): Rename as...
10483 (Implementing Gotos/Loops): this.
10484
10485 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10486
10487 Adjust to latest gnulib.
10488 * bootstrap (gnulib_modules): Add xalloc-die.
10489 Set LC_ALL=C so that file names sort consistently.
10490 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10491 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10492 uintmax_t.m4, ulonglong.m4.
10493 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10494 po.m4 since we are now using _gl.m4 instead.
10495
10496 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10497
10498 * src/scan-action.l: Remove. Scanning of semantic actions is
10499 handled in scan-gram.l.
10500
10501 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10502
10503 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10504
10505 * src/location.h (struct): The file member is a uniqstr.
10506 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10507
10508 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10509
10510 Fix bug with non-%union parsers that have printers or destructors,
10511 which led to a Bison core dump. Reported by Peter Fales in
10512 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
10513
10514 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10515 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10516 not to our own type.
10517 * src/output.c (symbol_destructors_output, symbol_printers_output):
10518 Don't assume %union.
10519 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10520 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10521 UNION-FLAG. All callers changed.
10522 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10523 Use type char, not unsigned int, when declaring an array of char;
10524 this lets us remove a cast.
10525 (Printers and Destructors): Add non-%union test cases.
10526
10527 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10528
10529 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10530 GLR writeups. E.g., avoid frenchspacing and the future tense,
10531 change "lookahead" to "look-ahead", and change "wrt" to "with
10532 respect to".
10533
10534 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10535
10536 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10537 New sections, split off from the GLR Parsers section. Put the new
10538 Simple GLR Parser near the start of the GLR section, for clarity.
10539 Rewrite connective text.
10540
10541 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
10542
10543 * doc/bison.texinfo (Simple GLR Parsers): New section.
10544
10545 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10546
10547 * NEWS, TODO, doc/bison.texinfo:
10548 Use "look-ahead" instead of "lookahead", to be consistent.
10549 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10550 while we're fixing "look-ahead".
10551 * src/conflicts.c (shift_set): Renamed from shiftset.
10552 (look_ahead_set): Renamed from lookaheadset.
10553 * src/print.c: Likewise.
10554 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10555 name for "lookahead".
10556 (report_types, usage): Likewise.
10557 * src/getargs.h (report_look_ahead_tokens): Renamed from
10558 report_lookaheads.
10559 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10560 compute_lookaheads.
10561 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10562 (look_ahead_tokens_print): Renamed from lookaheads_print.
10563 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10564 state_rule_lookaheads_print.
10565 * src/state.h: Likewise.
10566 (reductions.look_ahead_tokens): Renamed from lookaheads.
10567 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10568 AT_DATA_LOOKAHEADS_GRAMMAR.
10569
10570 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10571
10572 * README: Update location of patched M4 distribution.
10573
10574 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10575
10576 Don't assume the C++ compiler takes the same arguments as the C compiler
10577 (trivial change).
10578 * configure.ac (O0CXXFLAGS): New var.
10579 * tests/atlocal.in (CXXFLAGS): Use it.
10580
10581 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10582
10583 Fix some "make check" problems with C++ reported by
10584 Albert Chin-A-Young for Tru64 C++ in this thread:
10585 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10586
10587 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10588 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10589 Output to a .cc file for C++, not to a .c file.
10590 * tests/calc.at (AT_CHECK_CALC): Likewise.
10591 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10592 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10593
10594 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10595
10596 * tests/calc.at, tests/actions.at: Workaround for SGI
10597 C++ compiler. (trivial change)
10598
10599 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10600
10601 Spent a few hours checking out which prerequisite versions the
10602 current sources actually require. I went all the way back to
10603 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10604 a seemingly endless set of combinations of versions more recent
10605 than that. The bottom line is that the current sources require
10606 fairly recent versions of the build tools, and it'll be some work
10607 to change this.
10608 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10609 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10610 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10611 Add comments explaining why those particular versions are
10612 currently needed.
10613
10614 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10615 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
10616 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
10617
10618 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10619 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10620
10621 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10622
10623 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10624 0.11.5. Suggested by Bruno Haible.
10625 * bootstrap: Remove gettext version checking.
10626
10627 * doc/bison.texinfo (Decl Summary): Also mention that %union
10628 can depend on prerequisite types. Problem reported by Tim
10629 Van Holder.
10630
10631 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10632
10633 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10634 * README-alpha: Don't tell people not to package this.
10635
10636 * bootstrap: Don't assume $(...) works; use `...` instead.
10637 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10638 gettext better.
10639
10640 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10641 put into the -d output file, and mention what to do if YYSTYPE is
10642 defined as a macro.
10643
10644 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10645
10646 Undo change made earlier today: it caused autopoint to not bring
10647 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10648 autopoint's.
10649
10650 * bootstrap: Check that gettext version matches what's in
10651 configure.ac. Warn users to ignore robots.txt ERROR 404.
10652 * bootstrap: Undo today's earlier change (logged below).
10653 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
10654
10655 The gettext version checking is causing more trouble than it's
10656 curing; remove it. Problem reported by Paul Hilfinger.
10657
10658 * bootstrap: Issue a warning that one can expect a message
10659 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10660 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10661
10662 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10663
10664 Ensure that the C++ compiler used for testing actually works on a
10665 simple test program; if not, skip the C++-related tests. Problem
10666 reported by Vin Shelton in:
10667 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
10668
10669 * m4/cxx.m4: New file.
10670 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10671 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10672 * tests/local.at (AT_COMPILE_CXX): Use it.
10673
10674 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10675
10676 * data/glr.c (yylloc): Output this macro even if locations are not
10677 being generated, as the GLR parser needs it even in that case.
10678 Problem reported by Troy A. Johnson
10679 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10680
10681 * configure.ac (AC_INIT): Update to 1.875e.
10682
10683 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10684
10685 * NEWS: Version 1.875d.
10686 * configure.ac (AC_INIT): Likewise.
10687 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10688
10689 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10690 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10691 lalr1.cc runs afoul of the first, and the last two are no longer
10692 supported by GCC 3.4.0.
10693 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10694 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10695
10696 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10697
10698 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10699 unsigned int, for compatibility with latest gnulib hash module.
10700 * src/state.c (state_hash, state_hasher): Likewise.
10701 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10702 * src/uniqstr.c (hash_uniqstr): Likewise.
10703
10704 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10705
10706 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10707
10708 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10709 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10710 character and string literals.
10711 (unexpected_end): New function.
10712 (unexpected_eof): Use it.
10713 (unexpected_newline): New function.
10714 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10715 actions.
10716
10717 * NEWS: Document %expect-rr.
10718
10719 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10720 Fix typo by replacing $1 with $option.
10721 Remove more 'intl'-related files.
10722 Don't DEFUN AM_INTL_SUBDIR twice.
10723
10724 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10725 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10726 strtoul.c.
10727 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10728 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10729 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10730 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10731 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10732 * src/.cvsignore: Add *.output.
10733
10734 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10735 gets copied to the output file.
10736
10737 2004-04-28 Paul Eggert <eggert@twinsun.com>
10738
10739 Get files from the gnulib and po repositories, instead of relying
10740 on them being in our CVS. Upgrade to latest versions of gnulib
10741 and Automake.
10742
10743 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10744 * bootstrap: Bootstrap from gnulib and po repositories.
10745 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10746 * README-cvs: Document these changes. Remove version numbers from
10747 mentions of build tools, since they change so often. Mention Flex.
10748
10749 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10750 (gl_USE_SYSTEM_EXTENSIONS): Add.
10751 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10752 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
10753 does this for us.
10754 (AC_ISC_POSIX): Remove; we no longer support this
10755 ancient OS, as it gets in the way of latest Autoconf & gnulib.
10756 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10757 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10758 Do not check for C89 headers, except for locale.h which is used
10759 by the Yacc library and must port to K&R hosts.
10760 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10761 Do not check for C89 functions, except for setlocale which is
10762 used by the Yacc library.
10763 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10764 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10765 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10766 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10767 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10768 AM_GNU_GETTEXT): Remove; now done by:
10769 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10770 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10771 for us.
10772
10773 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10774 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10775 Define to empty, as gnulib.mk will do the rest for us.
10776 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10777 for us.
10778 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10779 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10780
10781 * src/files.c: Include gnulib's xstrndup.h.
10782
10783 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10784 (REALLOC): Use xnrealloc, for likewise.
10785 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10786 (strnlen, memrchr): Remove decls; functions no longer used.
10787 Include <stpcpy.h>.
10788
10789 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10790 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10791 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10792 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10793 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10794 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10795 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10796 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10797 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10798 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10799 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10800 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10801 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10802 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10803 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10804 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10805 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10806 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10807 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10808 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10809 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10810 Remove, as these files are now generated automatically
10811 by bootstrap or automake.
10812
10813 * po/ChangeLog: Remove: all but one entry was a duplicate
10814 of this file, and I moved that 2000-11-02 entry here.
10815
10816 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10817 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10818 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10819 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10820 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10821 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10822 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10823 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10824 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10825 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10826 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10827 xstrndup.h.
10828 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10829 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10830 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10831 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10832 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10833 * src/.cvsignore: Remove *_.c.
10834
10835
10836 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10837 support it. (The latest stable gzip doesn't.)
10838
10839 2004-04-27 Paul Eggert <eggert@twinsun.com>
10840
10841 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10842 case, as stos_ is now used by destructors due to the 2004-02-09
10843 change.
10844
10845 Remove more K&R C support.
10846 * lib/libiberty.y (PARAMS): Remove. All uses removed.
10847 * lib/subpipe.c (errno): Remove decl.
10848 Include <stdlib.h> unconditionally.
10849 (EXIT_FAILURE): Remove macro.
10850 * src/complain.c (vfprintf, strerror): Remove.
10851 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
10852 unconditionally.
10853 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
10854 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
10855 (strchr, strspn, memchr): Remove decls.
10856 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
10857 unconditionally. Do not declare perror.
10858 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
10859 unconditionally.
10860
10861 * src/complain.c (_): Remove useless defn, as system.h defines this.
10862
10863 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
10864 with latest obstack.h.
10865 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
10866 to procedure types, as obstack.h now does that for us.
10867 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
10868
10869 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
10870 so that this include file can stand alone.
10871 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
10872 does this now. Include subpipe.h first after config.h, to
10873 test whether it can stand alone.
10874
10875 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
10876 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
10877 unused declaration.
10878
10879 * tests/synclines.at (%union synch line): Put a dummy member in
10880 the union, because empty unions aren't allowed in C. Caught
10881 by GCC 3.4.0.
10882
10883 2004-04-13 Jim Meyering <jim@meyering.net>
10884
10885 * src/conflicts.c (conflicts_print): Correct format string typo:
10886 use `%%' to produce literal `%'. (trivial change)
10887
10888 2004-03-30 Paul Eggert <eggert@twinsun.com>
10889
10890 * src/getargs.c (version): Update copyright year to 2004.
10891
10892 * data/c.m4 (b4_int_type): Use 'short int' rather than
10893 'short', and similarly for 'long', 'unsigned', etc.
10894 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
10895 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
10896 yy_yypstack, yydumpstack): Likewise.
10897 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
10898 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
10899 Likewise.
10900 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
10901 yy_stack_print, yyparse): Likewise.
10902 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
10903 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
10904 * lib/bitset.c (bitset_print): Likewise.
10905 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
10906 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10907 * lib/bitsetv.c (bitsetv_dump): Likewise.
10908 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
10909 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
10910 Likewise.
10911 * src/LR0.c (allocate_itemsets): Likewise.
10912 * src/gram.h (rule_number, rule): Likewise.
10913 * src/lalr.h (goto_number): Likewise.
10914 * src/nullable.c (nullable_compute): Likewise.
10915 * src/output.c (prepare_rules): Likewise.
10916 * src/relation.c (relation_print, relation_digraph): Likewise.
10917 * src/relation.h (relation_node): Likewise.
10918 * src/state.h (state_number, transitions, errs, reductions,
10919 struct state): Likewise.
10920 * src/symtab.h (symbol_number, struct symbol): Likewise.
10921 * src/tables.c (vector_number, tally, action_number,
10922 default_goto, goto_actions): Likewise.
10923 * tests/existing.at (GNU Cim Grammar): Likewise.
10924 * tests/regression.at (Web2c Actions): Likewise.
10925
10926 * src/output.c (muscle_insert_short_int_table): Renamed from
10927 muscle_insert_short_table. All uses changed.
10928
10929 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10930
10931 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
10932 (declaration): Replace expected_conflicts with expected_sr_conflicts.
10933 Add %expect-rr rule.
10934
10935 * src/scan-gram.l: Recognize %expect-rr.
10936
10937 * src/conflicts.h (expected_sr_conflicts): Rename from
10938 expected_conflicts.
10939 (expected_rr_conflicts): Declare.
10940
10941 * src/conflicts.c (expected_sr_conflicts): Rename from
10942 expected_conflicts.
10943 (expected_rr_conflicts): Define.
10944 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
10945 for GLR parsers.
10946 Use expected_sr_conflicts in place of expected_conflicts.
10947 Warn if expected_rr_conflicts used in non-GLR parser.
10948
10949 * doc/bison.texinfo: Add documentation for %expect-rr.
10950
10951 2004-03-08 Paul Eggert <eggert@gnu.org>
10952
10953 Add support for hex token numbers. Suggested by Odd Arild Olsen in
10954 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
10955
10956 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
10957 in lalr1.cc.
10958 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
10959 * src/scan-gram.l (scan_integer): New function.
10960 ({int}): Use it.
10961 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
10962 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
10963 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
10964 Say "long int", not "long", for uniformity with GNU style.
10965
10966 2004-02-25 Paul Eggert <eggert@twinsun.com>
10967
10968 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
10969 compilers. This fixes a problem with Intel's C++ compiler being
10970 chatty, reported by Guido Trentalancia in
10971 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
10972
10973 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
10974
10975 Support %destructor and merge error locations in lalr1.cc.
10976
10977 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
10978 (Parser::stos_): Define unconditionally.
10979 (Parser::destruct_): New method. Generate its body with
10980 b4_yydestruct_generate.
10981 (Parser::error_start_): New attribute.
10982 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
10983 token which are discarded.
10984 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
10985 error_start_ when erroneous token are discarded.
10986 (Parser::parse) <yyerrlab1>: Compute the location of the error
10987 token so that it covers all the discarded tokens.
10988 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
10989 it can be called with `%skeleton "lalr1.cc"', and do that.
10990
10991 2004-02-02 Paul Eggert <eggert@twinsun.com>
10992
10993 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
10994 $(top_srcdir)/lib and ../lib. This fixes a bug reported
10995 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
10996 There's no need to mention top_builddir since Automake does that
10997 for us.
10998 (INCLUDES): Remove, as Automake says it's obsolescent.
10999 Contents migrated into AM_CPPFLAGS as described above.
11000 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11001
11002 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11003
11004 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11005 (yyreportSyntaxError): Handle case where lookahead token is
11006 YYEMPTY.
11007
11008 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11009
11010 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11011 resulting parsers are compilable with C++.
11012
11013 2003-12-23 Paul Eggert <eggert@twinsun.com>
11014
11015 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11016 * src/output.c (output_skeleton): Rename local var.
11017 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11018 Bison tokens, as this runs afoul of the 2003-10-07 change that
11019 disallowed NUL bytes in character constants or string literals.
11020
11021 * tests/local.at: Require Autoconf 2.59's Autotest.
11022 * tests/testsuite.at: Don't include local.at, since we now assume
11023 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11024 including it.
11025 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11026 multiple inclusion warnings.
11027
11028 2003-12-02 Akim Demaille <akim@epita.fr>
11029
11030 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11031 conditions.
11032 From Bruno Haible.
11033
11034 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11035
11036 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11037
11038 2003-10-07 Paul Eggert <eggert@twinsun.com>
11039
11040 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11041 if testsuite doesn't exist.
11042
11043 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11044 literals, unfortunately.
11045 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11046 Complain about NUL bytes in character constants or string literals.
11047
11048 2003-10-05 Paul Eggert <eggert@twinsun.com>
11049
11050 * NEWS: Don't document %no-default-prec, as it's still
11051 too experimental.
11052 * doc/bison.texinfo: Document %no-default-prec only if
11053 the defaultprec flag is set. Normally it's not.
11054
11055 2003-10-04 Paul Eggert <eggert@twinsun.com>
11056
11057 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11058 non-modifiable lvalue, instead of a modifiable one.
11059 * doc/bison.texinfo (Actions): Document that $$ can
11060 be assigned to. Do not claim that $$ and $N are
11061 array element references: user code should not rely on this.
11062
11063 2003-10-01 Paul Eggert <eggert@twinsun.com>
11064
11065 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11066 (grammar_declaration): Use it.
11067 * src/scan-gram.l: New token %no-default-prec.
11068 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11069 * NEWS, doc/bison.texinfo: Document the above.
11070
11071 2003-10-01 Akim Demaille <akim@epita.fr>
11072
11073 VCG no longer supports long_straight_phase.
11074
11075 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11076 * src/print_graph.c (print_graph): Adjust.
11077
11078 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11079 and Paul Eggert <eggert@twinsun.com>
11080
11081 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11082 Table of Symbols): Document %default-prec.
11083 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11084 (grammar_declaration): Set default_prec on %default-prec.
11085 * src/scan-gram.l (%default-prec): New token.
11086 * src/reader.h (default_prec): New flag.
11087 * src/reader.c: Likewise.
11088 (packgram): Handle it.
11089 * tests/conflicts.at (%default-prec without %prec,
11090 %default-prec with %prec, %default-prec 1): New tests.
11091
11092 2003-09-30 Paul Eggert <eggert@twinsun.com>
11093
11094 * tests/testsuite.at: Include local.at, not input.at, fixing
11095 a typo in the 2003-08-25 patch.
11096
11097 2003-08-27 Akim Demaille <akim@epita.fr>
11098
11099 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11100 GCC warnings.
11101
11102 2003-08-26 Akim Demaille <akim@epita.fr>
11103
11104 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11105 "<\#" to avoid magic from Gnus when posting parts of this script.
11106
11107 2003-08-26 Akim Demaille <akim@epita.fr>
11108
11109 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11110 (Parser::parse): here.
11111 Adjust: nerrs and errstatus is now replaced by...
11112 (Parser::nerrs_, Parser::errstatus_): New.
11113
11114 2003-08-25 Akim Demaille <akim@epita.fr>
11115
11116 * config/announce-gen, Makefile.cfg: New.
11117 * Makefile.am: Adjust.
11118 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11119 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11120
11121 2003-08-25 Akim Demaille <akim@epita.fr>
11122
11123 When reducing initial empty rules, Bison parser read an initial
11124 location that is not defined. This results in garbage, and that
11125 affects Bison's own parser. Therefore we need (i) to extend Bison
11126 to support a means to initialize this location, and (ii) to use
11127 this CVS Bison to fix CVS Bison's parser.
11128
11129 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11130 with...
11131 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11132 * src/parse-gram.y: Adjust.
11133 (%initial-action): New.
11134 (%error-verbose): Since we require CVS Bison, there is no reason
11135 not to use it.
11136 * src/scan-gram.l: Adjust.
11137 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11138 * data/yacc.c (yyparse): Use b4_initial_action.
11139
11140 2003-08-25 Akim Demaille <akim@epita.fr>
11141
11142 * doc/bison.texinfo: Don't promote stdout for error messages.
11143
11144 2003-08-25 Akim Demaille <akim@epita.fr>
11145
11146 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11147 From Alexandre Duret-Lutz.
11148
11149 2003-08-25 Akim Demaille <akim@epita.fr>
11150
11151 Version 1.875c.
11152
11153 2003-08-25 Akim Demaille <akim@epita.fr>
11154
11155 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11156 Use them.
11157
11158 2003-08-25 Akim Demaille <akim@epita.fr>
11159
11160 * data/lalr1.cc (Parser::reduce_print_): New.
11161 Use it.
11162
11163 2003-08-25 Akim Demaille <akim@epita.fr>
11164
11165 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11166 error recovery loops. This patch is based on
11167 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11168 Also, augment the similarity between lalr1.cc and yacc.c.
11169 Note: the locations of error recovery rules are not correct yet.
11170
11171 * data/lalr1.cc: Comment changes to augment the similarity between
11172 lalr1.cc and yacc.c.
11173 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11174 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11175 yyerrlab), when hitting EOF, pop the whole stack here instead of
11176 merely falling thru the default error handling mechanism.
11177 (yyerrorlab): New label, with the old contents of YYERROR,
11178 plus the following change: pop the stack of rhs corresponding
11179 to the production that invoked YYERROR. That is how Yacc
11180 behaves (required by POSIX).
11181 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11182 fail.
11183
11184 2003-08-25 Akim Demaille <akim@epita.fr>
11185
11186 Tune local.at so that people can "autom4te -l autotest calc.at -o
11187 calc" for instance, to extract a sub test suite.
11188
11189 * tests/testsuite.at: Move the initialization, Autotest version
11190 requirement, and AT_TESTED invocation into...
11191 * tests/local.at: here.
11192 * tests/testsuite.at: Include it for compatibility with Autoconf
11193 2.57.
11194 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11195 be ignore.
11196
11197 2003-08-04 Paul Eggert <eggert@twinsun.com>
11198
11199 Rework code slightly to avoid gcc -Wtraditional warnings.
11200 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11201 The returned value is now stored in *YY0. All callers changed.
11202 * src/output.c (merge_output): Adjust to the above change.
11203
11204 2003-07-26 Paul Eggert <eggert@twinsun.com>
11205
11206 * data/glr.c (YYASSERT): New macro.
11207 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11208 yyresolveStates, yyprocessOneStack):
11209 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11210 Derived from a suggestion by Frank Heckenbach.
11211
11212 2003-07-25 Paul Eggert <eggert@twinsun.com>
11213
11214 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11215 for portability to K&R C (after ansi2knr, presumably). See
11216 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11217 by Frank Heckenbach, though I have omitted the structure-initialization
11218 part of his glr-knr.diff patch since I recall that the Portable
11219 C Compiler didn't require that change.
11220
11221 Let the user specify how to allocate and free memory.
11222 Derived from a suggestion by Frank Heckenbach in
11223 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11224 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11225 All uses of free, malloc, realloc changed to use these macros,
11226 and unnecessary casts removed.
11227 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11228
11229 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11230
11231 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11232 use s.empty() rather than s == "" to test for empty string; see
11233 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11234 (trivial change)
11235
11236 2003-06-25 Akim Demaille <akim@epita.fr>
11237
11238 * config/depcomp, config/install-sh: Update from masters.
11239
11240 2003-06-20 Paul Eggert <eggert@twinsun.com>
11241
11242 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11243 and return properly parenthesized result.
11244 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11245 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11246 Remove unnecessary parentheses from uses.
11247 * doc/bison.texinfo (Location Default Action): Describe the
11248 conventions for parentheses.
11249
11250 2003-06-19 Paul Eggert <eggert@twinsun.com>
11251
11252 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11253 yyreportTree): Do not assume that size_t is the same width as int,
11254 when printing sizes. Print sizes using an unsigned format.
11255 Problem reported by Frank Heckenbach in
11256 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11257
11258 Port to Forte Developer 7 C compiler.
11259 * data/glr.c (struct YYLTYPE): If locations are not being used,
11260 declare a single dummy member, as empty structs do not conform
11261 to the C standard.
11262 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11263 the Forte Developer 7 C compiler complains that end-of-loop
11264 code is not reached.
11265
11266 2003-06-17 Paul Eggert <eggert@twinsun.com>
11267
11268 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11269 avoid warnings from picky compilers about redefinition of PARAMS.
11270
11271 2003-06-17 Paul Eggert <eggert@twinsun.com>
11272
11273 Version 1.875b.
11274
11275 * NEWS: Document 1.875b.
11276
11277 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11278 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11279 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11280 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11281 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11282 per recent gettext manual's suggestion.
11283 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11284 Use prototypes, not old-style definitions.
11285 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11286 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11287 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11288 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11289 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11290 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11291 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11292 vbitset_or_and_cmp, vbitset_copy): Likewise.
11293
11294 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11295 Do not include <stdlib.h>.
11296 (PARAMS): Define unconditionally for C89.
11297 (ATTRIBUTE_NORETURN): Remove.
11298 (ATTRIBUTE_UNUSED): Define unconditionally.
11299
11300 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11301 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11302 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11303 * lib/vbitset.c, lib/vbitset.h: New files.
11304 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11305 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11306 from libbitset.
11307
11308 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11309 `How Can I Reset @code{yyparse}', since texinfo does not allow
11310 arbitrary @ in node names.
11311
11312 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11313 shouldn't be needed according to the gettext 0.12.1 documentation
11314 but which seem to be needed anyway: codeset.m4 glibc21.m4
11315 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11316 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11317 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11318
11319 * lib/.cvsignore: Add stdbool.h.
11320 * m4/.cvsignore: Add nls.m4, po.m4.
11321
11322 Upgrade to CVS gnulib.
11323 * stdbool_.h: File renamed from stdbool.h.in.
11324 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11325 AC_HEADER_STDBOOL.
11326 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11327 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11328 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11329 (MOSTLYCLEANFILES): New var.
11330 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11331 (stdbool.h): New rule.
11332 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11333 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11334 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11335 m4/quote.m4: Upgrade to today's gnulib.
11336
11337 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11338 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11339 the tests right now.
11340 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11341 yyerror are declared before use; C99 requires this.
11342
11343 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11344
11345 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11346 first.
11347 (yyrecoverSyntaxError): Correct the logic for setting and testing
11348 yyerrState.
11349 Correct comment on handling EOF.
11350 Allow states with only a default reduction, rather than failing
11351 (I can't quite reconstruct why these were not allowed before).
11352
11353 Fixes to avoid problem that $-N rules in GLR parsers can cause
11354 buffer overruns, corrupting state.
11355
11356 * src/output.c (prepare_rules): Output max_left_semantic_context
11357 definition.
11358 * src/reader.h (max_left_semantic_context): New variable declaration.
11359 * src/scan-gram.l (max_left_semantic_context): Define.
11360 (handle_action_dollar): Update max_left_semantic_context.
11361 * data/glr.c (YYMAXLEFT): New definition.
11362 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11363 (yyresolveAction): Ditto.
11364
11365 Fixes to problems with location handling in GLR parsers reported by
11366 Frank Heckenbach (2003/06/05).
11367
11368 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11369 (YYRHSLOC): Add parentheses, and define only if locations used.
11370 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11371 locations not used.
11372 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11373 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11374
11375 * tests/cxx-type.at: Exercise location information; update tests
11376 to differentiate output with and without locations.
11377 Remove forward declarations of yylex and yyerror---caused errors
11378 because default YYLTYPE not yet defined.
11379 Change semantic actions to compute strings, rather than printing
11380 them directly (to test proper passing of semantics values). Change
11381 output to prefix notation and update test data and expected results.
11382 (yylex): Track locations.
11383 (stmtMerge): Return value rather than printing, and include arguments
11384 in value.
11385
11386 2003-06-03 Paul Eggert <eggert@twinsun.com>
11387
11388 Avoid warnings generated by GCC 2.95.4 when Bison is
11389 configured with --enable-gcc-warnings.
11390 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11391 yy::]b4_parser_class_name[::translate_,
11392 yy::Stack::operator[] (unsigned),
11393 yy::Stack::operator[] (unsigned) const,
11394 yy::Slice::operator[] (unsigned),
11395 yy::Slice::operator[] (unsigned) const):
11396 Rename local vars to avoid warnings.
11397 * tests/glr-regression.at (Improper handling of embedded actions
11398 and $-N in GLR parsers): Remove unused local variable from yylex.
11399 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11400 (void) as arg when not pure, since we now assume C89 when building
11401 Bison. Pacify GCC by using parameter.
11402
11403 2003-06-02 Paul Eggert <eggert@twinsun.com>
11404
11405 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11406 yy::Location::lines, yy::Location::columns): Rename arguments
11407 to avoid shadowing; this removes a warning generated by GCC 3.3.
11408
11409 2003-06-01 Paul Eggert <eggert@twinsun.com>
11410
11411 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11412 to g++, as GCC 3.3 complains if you do it.
11413 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11414 everything that WARNING_CFLAGS has, except omit warnings
11415 not suitable for C++.
11416 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11417 * tests/atlocal.in (CXXFLAGS): New var.
11418 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11419
11420 Fix a GLR parser bug I reported in February; see
11421 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11422 The problem was that GLR parsers did not conform to the C standard,
11423 because actions like { $1 = $2 + $3; } expanded to expressions
11424 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11425 to a local variable. The C standard says that expressions
11426 like (var = f ()) + (var = f ()) have undefined behavior.
11427 Another problem was that GCC sometimes issues warnings that
11428 yyfill and its parameters are unused.
11429
11430 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11431 as possibly unused.
11432 (yyfill): New function.
11433 (YYFILL): Use it.
11434 (yyuserAction): Change type of yynormal to bool, so that it matches
11435 the new yyfill signature. Mark it as possibly unused.
11436
11437
11438 Follow up on a bug I reported in February, where a Bison-generated
11439 parser can loop. Provide a test case and a fix for yacc.c. I
11440 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11441 The original bug report is in:
11442 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11443
11444 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11445 macro's size was becoming unwieldy.
11446 (yyerrlab): Do not discard an empty lookahead symbol, as this
11447 might destroy garbage.
11448 (yyerrorlab): New label, with the old contents of YYERROR,
11449 plus the following change: pop the stack of rhs corresponding
11450 to the production that invoked YYERROR. That is how Yacc
11451 behaves, and POSIX requires this behavior.
11452 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11453 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11454 Define 'alarm' to do nothing if unistd.h is not available.
11455 Add a new rule "exp: '-' error;" to test the above change to
11456 data/yacc.c. Use 'alarm' to abort any test taking longer than
11457 10 seconds, as it's probably looping.
11458 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11459 Also, the new yacc.c generates two fewer diagnostics for an
11460 existing test.
11461
11462 2003-05-24 Paul Eggert <eggert@twinsun.com>
11463
11464 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11465 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11466 This fixes a problem reported by John Bowman when the Compaq/HP
11467 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11468 -ansi -Wall -gall).
11469 * data/yacc.c (union yyalloc): Likewise.
11470 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11471
11472 Switch from 'int' to 'bool' where that makes sense.
11473
11474 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11475 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11476 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11477 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11478 Return or accept bool, not int. All callers changed.
11479 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11480 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11481 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11482 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11483 bitset_or_and_cmp_): Likewise.
11484 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11485 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11486 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11487 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11488 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11489 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11490 bitset_stats_or_and_cmp): Likewise.
11491 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11492 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11493 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11494 ebitset_xor_cmp): Likewise.
11495 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11496 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11497 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11498 lbitset_xor_cmp): Likewise.
11499 * lib/bbitset.h: Include <stdbool.h>.
11500 (struct bitset_vtable): The following members now return bool, not
11501 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11502 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11503 or_and_cmp).
11504 * src/conflicts.c (count_rr_conflicts): Likewise.
11505 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11506 All uses changed.
11507 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11508 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11509 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11510 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11511 graph_flag): Likewise.
11512 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11513 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11514 graph_flag): Likewise.
11515 * src/output.c (error_verbose): Likewise.
11516 * src/output.h (error_verbose): Likewise.
11517 * src/reader.c (start_flag, typed): Likewise.
11518 * src/reader.h (typed): Likewise.
11519 * src/getargs.c (LOCATIONS_OPTION): New constant.
11520 (long_options, getargs): Use it.
11521 * src/lalr.c (build_relations): Use bool, not int.
11522 * src/nullable.c (nullable_compute): Likewise.
11523 * src/print.c (print_reductions): Likewise.
11524 * src/tables.c (action_row, pack_vector): Likewise.
11525 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11526 * src/output.c (prepare): Use it.
11527 * src/output.c (token_definitions_output,
11528 symbol_destructors_output, symbol_destructors_output): Use string,
11529 not boolean integer, to keep track of whether to output separator.
11530 * src/print_graph.c (print_core): Likewise.
11531 * src/state.c (state_rule_lookaheads_print): Likewise.
11532
11533 * config/install-sh: Sync from automake 1.7.5.
11534
11535 2003-05-14 Paul Eggert <eggert@twinsun.com>
11536
11537 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11538 semicolon after a grammar declaration, in the interest of possible
11539 future changes to the Bison input language.
11540 Do not allow a stray semicolon at the start of the grammar.
11541 (rhses.1): Allow one or more semicolons after any rule, including
11542 just before "|" as required by POSIX.
11543 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11544 grammar.
11545
11546 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11547
11548 %parse-param support for lalr1.cc.
11549
11550 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11551 b4_cc_constructor_calls, b4_cc_constructor_call,
11552 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11553 definitions.
11554 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11555 parse-param arguments.
11556 (yy::b4_parser_class_name): Declare instance variables to
11557 hold parse-param arguments.
11558 * tests/calc.at: s/value/semantic_value/ because value clashes
11559 with a member of yy::b4_parser_class_name. Adjust C++ code
11560 to handle %parse-param. Enable %parse-param test in C++.
11561
11562 2003-05-12 Paul Eggert <eggert@twinsun.com>
11563
11564 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11565 English a bit. Fix fclose typo. Change "const char" to "char
11566 const", and use ANSI C rather than K&R for "main". Suggest
11567 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11568 and suggest yy_switch_to_buffer.
11569
11570 2003-05-05 Paul Eggert <eggert@twinsun.com>
11571
11572 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11573 C89. This avoids a diagnostic on compilers that define __STDC__
11574 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
11575 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11576
11577 2003-05-03 Paul Eggert <eggert@twinsun.com>
11578
11579 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11580 Do not overrun array bounds.
11581 This should fix a bug reported today by Olatunji Oluwabukunmi in
11582 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
11583
11584 2003-04-29 Akim Demaille <akim@epita.fr>
11585
11586 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11587 * src/getargs.c, src/getargs.h: here, as bool, not int.
11588 (nondeterministic_parser): New.
11589 * src/parse-gram.y, src/scan-gram.l: Support
11590 %nondeterministic-parser.
11591 * src/output.c (prepare): Use nondeterministic_parser instead
11592 of glr_parser where appropriate.
11593 * src/tables.c (conflict_row, action_row, save_row)
11594 (token_actions, token_actions, pack_vector): Ditto.
11595
11596 2003-04-29 Akim Demaille <akim@epita.fr>
11597
11598 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11599
11600 2003-04-29 Akim Demaille <akim@epita.fr>
11601
11602 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11603 with %pure-parser and %locations to exercise the patch from Yakov
11604 Markovitch below.
11605
11606 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11607
11608 * data/yacc.c: (b4_lex_param): Corrected for the case where
11609 %lex-param is provided and %pure-parser isn't.
11610
11611 2003-04-27 Paul Eggert <eggert@twinsun.com>
11612
11613 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
11614 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
11615 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11616 if it is not defined.
11617 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11618
11619 2003-04-26 Paul Eggert <eggert@twinsun.com>
11620
11621 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11622 Declare to be of type suitable for the ninf value itself, not of
11623 type suitable for the corresponding table, since the latter might
11624 be unsigned but the ninf value might be negative. This fixes a
11625 bug reported by Alexandre Duret-Lutz in
11626 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
11627
11628 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11629 invokes it. We shouldn't invoke it twice because it will attempt
11630 to put error.o in the archive twice. This fixes a glitch reported
11631 by Martin Mokrejs in
11632 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11633
11634 2003-04-21 Paul Eggert <eggert@twinsun.com>
11635
11636 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11637 to gnulib.
11638
11639 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11640
11641 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11642 Fix obvious typo that results in uncompilable GLR parsers
11643 when both %pure-parser and %locations are used. (trivial change)
11644
11645 2003-04-17 Paul Eggert <eggert@twinsun.com>
11646
11647 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11648 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11649 Do not insert the expected token via unput, as this runs afoul
11650 of a POSIX-compatibility bug in flex 2.5.31.
11651 All uses changed to BEGIN the parent state,
11652 since we no longer insert the expected token via unput.
11653 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11654 that is no longer emitted after the above change.
11655
11656 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11657 the first one. This change is from Paul Hilfinger, and it fixes
11658 regression reported by Werner Lemberg in
11659 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
11660
11661 (resolve_sr_conflict): Don't invoke state_errs_set
11662 unless one or more tokens have been explicitly made errors.
11663 Otherwise, the above change causes Bison to abort.
11664
11665 * tests/existing.at (GNU pic Grammar): New test case, taken from
11666 Lemberg's email.
11667
11668 2003-03-31 Akim Demaille <akim@epita.fr>
11669
11670 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11671
11672 2003-03-31 Akim Demaille <akim@epita.fr>
11673
11674 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11675 output.
11676
11677 2003-03-31 Akim Demaille <akim@epita.fr>
11678
11679 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11680 From Paul Hilfinger.
11681
11682 2003-03-29 Akim Demaille <akim@epita.fr>
11683
11684 * m4/error.m4: Do not put under dynamic conditions some code which
11685 expansion is under static control.
11686
11687 2003-03-29 Akim Demaille <akim@epita.fr>
11688
11689 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11690
11691 2003-03-29 Akim Demaille <akim@epita.fr>
11692
11693 * doc/bison.texinfo (Strings are Destroyed): New.
11694
11695 2003-03-13 Paul Eggert <eggert@twinsun.com>
11696
11697 * .cvsignore: Add configure.lineno.
11698 * src/.cvsignore: Add yacc.
11699 * tests/.cvsignore: Add testsuite.log.
11700 * doc/fdl.texi: Sync with latest FSF version.
11701
11702 2003-03-12 Paul Eggert <eggert@twinsun.com>
11703
11704 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11705 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11706 cursor, instead of leaving it undefined. This fixes a bug
11707 reported by Tim Van Holder in
11708 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11709 * tests/input.at (Torturing the Scanner): Test the scanner on
11710 an empty input file, which was Tim Van Holder's test case.
11711
11712 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11713 <sys/resource.h> can be included, include sys/time.h and
11714 sys/times.h first, if available. This works around the SunOS
11715 4.1.4 porting bug reported by Bruce Becker in
11716 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
11717
11718 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11719 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11720 AC_HEADER_SYS_WAIT.
11721
11722 Merge changes from gnulib. This was prompted because the CVS
11723 snapshot didn't build on Solaris 7 due to strnlen problems.
11724
11725 These changes need to be merged back into gnulib:
11726 * lib/hash.c: Include <stdbool.h> unconditionally.
11727 * m4/onceonly.m4 (m4_quote): New macro.
11728 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11729 Quote AC_FOREACH variable-expansions properly.
11730 The 2003-01-03 obstack.h change also needs merging.
11731 {end of changes requiring merging}
11732
11733 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11734 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11735 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11736 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11737 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11738 New files, imported from gnulib.
11739 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11740 above.
11741
11742 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11743 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11744 gnulib sources.
11745
11746 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11747 Add.
11748 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11749 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11750 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11751 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11752 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11753 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11754 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11755 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11756 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11757 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11758 (jm_PREREQ_ARGMATCH): Remove.
11759 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11760 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11761
11762 * src/system.h: Include <stdbool.h> unconditionally.
11763
11764 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11765 assuming at least C89 in the bitset code for some time now.
11766
11767 2003-03-03 Akim Demaille <akim@epita.fr>
11768
11769 * ro.po: New.
11770
11771 2003-03-02 Akim Demaille <akim@epita.fr>
11772
11773 * doc/bison.texinfo (Table of Symbols): Reactivate the
11774 documentation for %lex-param, and %parse-param.
11775
11776 2003-03-02 Akim Demaille <akim@epita.fr>
11777
11778 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11779 generate verbose error messages.
11780 Use the number of tokens as an upper bound in yytname, as it
11781 cannot be a non terminal.
11782
11783 2003-03-02 Akim Demaille <akim@epita.fr>
11784
11785 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11786 message.
11787
11788 2003-03-02 Akim Demaille <akim@epita.fr>
11789
11790 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11791 Use them to exercise yycheck overrun.
11792 Based on Andrew Suffield's grammar.
11793
11794 2003-03-02 Akim Demaille <akim@epita.fr>
11795
11796 Create tests/local.at for Bison generic testing macros.
11797
11798 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11799 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11800 This new file.
11801 * tests/calc.at (AT_CHECK_CALC): Adjust.
11802 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11803 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11804 * tests/local.at: here.
11805 (AT_COMPILE_CXX): Tags the tests using it as c++.
11806 Ignore the test if CXX is not functional.
11807
11808 2003-03-01 Paul Eggert <eggert@twinsun.com>
11809
11810 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11811 not loc->end, since loc->end might contain garbage and this leads
11812 to undefined behavior on some platforms.
11813 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11814 depend on *loc, so that the reader doesn't give the the false
11815 impression that *loc is initialized.
11816 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11817 does not survive the return.
11818
11819 2003-03-01 Akim Demaille <akim@epita.fr>
11820
11821 * src/scan-gram.l (code_start): Always initialize it when entering
11822 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11823 yylex invocation. An alternative would be making it static, but
11824 then it starts with the second %%'s beginning, instead of its end.
11825
11826 2003-02-28 Paul Eggert <eggert@twinsun.com>
11827
11828 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11829 around a UnixWare 7.1.1 porting bug reported by John Hughes in
11830 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
11831
11832 2003-02-26 Paul Eggert <eggert@twinsun.com>
11833
11834 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11835 Remove Sequent/Pyramid discussion (nobody uses them any more).
11836 Merge VMS and MS-DOS discussion; these ports may well be dead
11837 but let's keep mentioning them for now. Put <> around email
11838 addresses. Add copyright notice.
11839
11840 2003-02-24 Paul Eggert <eggert@twinsun.com>
11841
11842 * data/glr.c (yy_reduce_print): yylineno -> yylno,
11843 to avoid collision with flex use of yylineno.
11844 Problem reported by Bruce Lilly in
11845 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
11846 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11847 * data/yacc.c (yy_reduce_print): Likewise.
11848
11849 * config/depcomp: Sync with Automake 1.7.3.
11850
11851 2003-02-21 Akim Demaille <akim@epita.fr>
11852
11853 * data/lalr1.cc: Use temporary variables instead of casts to
11854 change integer types.
11855 Suggested by Paul Eggert.
11856
11857 2003-02-21 Akim Demaille <akim@epita.fr>
11858
11859 * doc/bison.texinfo: Use "location" consistently to refer to @n,
11860 to avoid confusions with lalr1.cc's notion of Position.
11861 Suggested by Paul Eggert.
11862
11863 2003-02-20 Akim Demaille <akim@epita.fr>
11864
11865 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
11866 before initial_columns.
11867 (location.hh): Use consistent variable names when defining the
11868 operator<<.
11869 Use "last" so that we subtract from Positions, not from unsigned.
11870
11871 2003-02-20 Akim Demaille <akim@epita.fr>
11872
11873 * data/lalr1.cc (position.hh): New subfile, including the extended
11874 and Doxygen'ed documentation of class Position.
11875 (location.hh): Use it.
11876 Document a` la Doxygen.
11877 With the help of Benoit Perrot.
11878
11879 2003-02-20 Akim Demaille <akim@epita.fr>
11880
11881 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
11882 AT_YACC_IF.
11883 Redefine AT_YYERROR_SEES_LOC_IF using it.
11884 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
11885 not defined.
11886 Don't use the location in yy::Parser::error_ and
11887 yy::Parser::print_ when not %locations.
11888 Activate more lalr1.cc tests.
11889
11890 2003-02-19 Akim Demaille <akim@epita.fr>
11891
11892 * data/lalr1.cc: When displaying a line number, be sure to make it
11893 an int.
11894
11895 2003-02-19 Akim Demaille <akim@epita.fr>
11896
11897 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
11898 Remove, useless.
11899 (YYABORT, YYACCEPT, YYERROR): New.
11900 * tests/calc.at: Renable the lalr1.cc test.
11901
11902 2003-02-19 Akim Demaille <akim@epita.fr>
11903
11904 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
11905 error recovery, mixing with/without pops and discarding of the
11906 lookahead.
11907 Exercise YYERROR.
11908 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
11909
11910 2003-02-17 Paul Eggert <eggert@twinsun.com>
11911
11912 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
11913 * tests/testsuite.at (AT_COMPILE): Use them.
11914 This fixes the testsuite problem reported by Robert Lentz in
11915 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
11916
11917 2003-02-12 Paul Eggert <eggert@twinsun.com>
11918
11919 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
11920 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
11921 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
11922 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
11923 Check for malloc failure, for consistency with yacc.c.
11924 (yytname_size): Remove, for consistency with yacc.c.
11925
11926 The bug still remains in data/lalr1.cc, as I didn't have time
11927 to fix it there.
11928
11929 2003-02-06 Akim Demaille <akim@epita.fr>
11930
11931 * configure.ac (GXX): Rename as...
11932 (CXX): this, to keep the original Autoconf semantics.
11933 Require 2.57.
11934 * data/lalr1.cc: Fix b4_copyright invocations.
11935 If YYDEBUG is not defined, don't depend upon name_ being defined.
11936 (location.hh): Include string and iostream.
11937 (Position::filename): New member.
11938 (Position::Position ()): New.
11939 (operator<< (Position)): New.
11940 (operator- (Position, int)): New.
11941 (Location::first, Location::last): Rename as...
11942 (Location::begin, Location::end): these, to mock the conventional
11943 iterator names.
11944 (operator<< (Location)): New.
11945 * tests/atlocal.in (CXX): New.
11946 * tests/testsuite.at (AT_COMPILE_CXX): New.
11947 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
11948 locations in a more synthetic way.
11949 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
11950 lalr1.cc is used.
11951 Adjust the C locations to match those from Emacs: first column is
11952 column 0.
11953 Change all the expected results.
11954 Conform to the GCS: simplify the locations when applicable.
11955 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
11956 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
11957 these CPP macros with the m4 macros new defined by...
11958 (AT_CHECK_PUSHDEFS): this, i.e.:
11959 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
11960 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
11961 New macros.
11962 (AT_CHECK_POPDEFS): Undefine them.
11963 (AT_CHECK_CALC_LALR1_CC): New.
11964 Use it for the first lalr1.cc test.
11965
11966 2003-02-04 Akim Demaille <akim@epita.fr>
11967
11968 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
11969 Location as is defined.
11970
11971 2003-02-04 Akim Demaille <akim@epita.fr>
11972
11973 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
11974 name_ being defined.
11975
11976 2003-02-03 Paul Eggert <eggert@twinsun.com>
11977
11978 * src/gram.h (start_symbol): Remove unused decl.
11979
11980 Use more-consistent naming conventions for local vars.
11981
11982 * src/derives.c (derives_compute): Change type of local var from
11983 int to rule_number.
11984 * src/gram.c (grammar_rules_partial_print): Likewise.
11985 * src/print.c (print_core): Likewise.
11986 * src/reduce.c (reduce_grammar_tables): Likewise.
11987
11988 * src/gram.c (grammar_dump): Change name of item_number *
11989 local var from r to rp.
11990 * src/nullable.c (nullable_compute): Likewise.
11991
11992 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
11993
11994 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
11995 for symbol or symbol_number var.
11996 * src/reader.c (grammar_start_symbol_set): Likewise.
11997 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
11998 Likewise.
11999 * src/state.c (transitions_to): Likewise.
12000 * src/state.h: Likewise.
12001 * src/tables.c (symbol_number_to_vector_number): Likewise.
12002
12003 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12004 char * var.
12005
12006 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12007 var.
12008
12009 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12010 var.
12011
12012 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12013 Use str, not s, for char * var. Use ch, not c, for character var.
12014 Use size for size var.
12015
12016 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12017 char * var.
12018 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12019 uniqstr var.
12020 * src/uniqstr.h: Likewise.
12021
12022 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12023 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12024 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12025 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12026 param to have same name as that of enum, so that we don't use
12027 "s" to stand for a non-state.
12028
12029 2003-02-02 Akim Demaille <akim@epita.fr>
12030
12031 * src/scan-skel.l: Scan more than one inert character per yylex
12032 invocation.
12033
12034 2003-02-01 Paul Eggert <eggert@twinsun.com>
12035
12036 Version 1.875a.
12037
12038 * po/LINGUAS: Add ms.
12039
12040 2003-01-30 Akim Demaille <akim@epita.fr>
12041
12042 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12043
12044 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12045
12046 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12047 of $1.
12048
12049 Changes in response to error report by S. Eken: GLR mode does not
12050 handle negative $ indices or $ indices in embedded rules correctly.
12051 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12052
12053 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12054 (b4_rhs_location): Ditto.
12055 (yyfill): New function to copy from stack tree into array
12056 incrementally.
12057 (yyuserAction): Modify to allow incremental move of semantic values
12058 to rhs array when in GLR mode.
12059 Define YYFILL to use in user-defined actions to fill semantic array
12060 as needed.
12061 Remove dummy use of yystack, as there is now a guaranteed use.
12062 (yydoAction): Modify to allow incremental move of semantic values
12063 to rhs array when in GLR mode.
12064 (yyresolveAction): Ditto.
12065 (yyglrShiftDefer): Update comment.
12066 (yyresolveStates): Use X == NULL for pointers, not !X.
12067 (yyglrReduce): Ditto.
12068 (yydoAction): Ditto
12069
12070 * tests/glr-regr1.at: Rename to ...
12071 * tests/glr-regression.at: Add new regression test for the problems
12072 described above (adapted from S. Eken).
12073 Update copyright notice.
12074 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12075 * tests/Makefile.am: Ditto.
12076
12077 2003-01-28 Paul Eggert <eggert@twinsun.com>
12078
12079 * data/lalr1.cc: Do not use @output_header_name@ unless
12080 b4_defines_flag is set. This fixes two bugs reported by
12081 Tim Van Holder in
12082 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12083 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12084
12085 2003-01-21 Paul Eggert <eggert@twinsun.com>
12086
12087 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12088 we don't need to worry about yyerrlab1 being reported as an
12089 "unused label" by non-GCC C compilers. The downside is that if
12090 locations are used then a couple of statements are duplicated each
12091 time YYERROR is invoked, but the upside is that the warnings
12092 should vanish.
12093 (yyerrlab1): Move code to YERROR.
12094 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12095 This reverts some of the 2002-12-27 change.
12096
12097 2003-01-17 Paul Eggert <eggert@twinsun.com>
12098
12099 * src/output.c (symbol_printers_output): Fix typo that led
12100 to core dump. Problem reported by Antonio Rus in
12101 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12102
12103 2003-01-13 Akim Demaille <akim@epita.fr>,
12104 Quoc Peyrot <chojin@lrde.epita.fr>,
12105 Robert Anisko <anisko_r@lrde.epita.fr>
12106
12107 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12108 when the stacks contain one element, as the loop would otherwise
12109 free the last state, and then use the top state (the one we just
12110 popped). This means that the initial elements will not be freed
12111 explicitly, as is the case in yacc.c; it is not a problem, as
12112 these elements have fake values.
12113
12114 2003-01-11 Paul Eggert <eggert@twinsun.com>
12115
12116 * NEWS: %expect-violations are now just warnings, reverting
12117 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12118 bootstrapping problem reported by Matthias Klose; see
12119 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12120 * src/conflicts.c (conflicts_print): Likewise.
12121 * tests/conflicts.at (%expect not enough, %expect too much,
12122 %expect with reduce conflicts): Likewise.
12123 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12124 that the warning is enabled if the number of conflicts changes
12125 (not necessarily increases).
12126
12127 * src/getargs.c (version): Update copyright year.
12128
12129 2003-01-09 Akim Demaille <akim@epita.fr>
12130
12131 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12132
12133 2003-01-08 Paul Eggert <eggert@twinsun.com>
12134
12135 * Makefile.maint (WGETFLAGS):
12136 New macro, containing "-C off" to disable proxy caches.
12137 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12138 (rel-check): Use $(WGET) instead of wget.
12139
12140 2003-01-06 Paul Eggert <eggert@twinsun.com>
12141
12142 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12143 the GLR paper of Scott, Johnstone and Hussain.
12144
12145 2003-01-04 Paul Eggert <eggert@twinsun.com>
12146
12147 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12148 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12149 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12150 (EXTRA_LIBRARIES): New var, for liby.a.
12151 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12152 (EXTRA_SCRIPTS): New var, for yacc.
12153
12154 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12155 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12156 Problem reported by Nelson H. F. Beebe.
12157
12158 2003-01-03 Paul Eggert <eggert@twinsun.com>
12159
12160 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12161 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12162 when compiling Bison 1.875's `bitset bset = obstack_alloc
12163 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12164
12165 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12166 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12167 grow to a huge size with typical invocation.
12168
12169 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12170 Use the pattern recommended by Autoconf 2.57, except also protect
12171 against double-definition.
12172 * src/system.h: Likewise.
12173 Portability issues reported by Nelson H. F. Beebe.
12174
12175 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12176 All uses changed. Provide a definition in both C and C++.
12177 (yytrue, yyfalse): Define even if defined (__cplusplus).
12178
12179 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12180 Reported by Nelson H. F. Beebe.
12181
12182 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12183
12184 2003-01-02 Paul Eggert <eggert@twinsun.com>
12185
12186 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12187 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12188 Bug reported by Nelson H. F. Beebe.
12189
12190 2003-01-01 Paul Eggert <eggert@twinsun.com>
12191
12192 * Version 1.875.
12193
12194 2002-12-30 Paul Eggert <eggert@twinsun.com>
12195
12196 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12197 Moved here from...
12198 (<INITIAL>","): Here. This causes stray "," to be treated
12199 more uniformly.
12200
12201 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12202 last brace in braced code when not in Yacc mode, for compatibility
12203 with Bison 1.35. This resurrects the 2001-12-15 patch to
12204 src/reader.c.
12205
12206 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12207 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12208
12209 2002-12-28 Paul Eggert <eggert@twinsun.com>
12210
12211 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12212 that of SYM's type. This fixes Debian bug 168069, reported by
12213 Thomas Olsson.
12214
12215 2002-12-28 Paul Eggert <eggert@twinsun.com>
12216
12217 Version 1.75f.
12218
12219 Switch back to the Yacc style of conflict reports, undoing some
12220 of the 2002-07-30 change.
12221 * doc/bison.texinfo (Understanding): Use Yacc style for
12222 conflict reports. Also, use new way of locating rules.
12223 * src/conflicts.c (conflict_report):
12224 Renamed from conflict_report_yacc, removing the old
12225 'conflict_report'. Translate the entire conflict report at once,
12226 so that we don't assume that "," has the same interpretation in
12227 all languages.
12228 (conflicts_output): Use Yacc-style conflict report for each state,
12229 instead of our more-complicated style.
12230 (conflicts_print): Use Yacc-style conflict report, except print
12231 the input file name when not emulating Yacc.
12232 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12233 Conflicted Reduction, %expect not enough, %expect too much,
12234 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12235 * tests/existing.at (GNU Cim Grammar): Likewise.
12236 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12237
12238 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12239 fatal): Don't invoke fflush; it's not needed and it might even be
12240 harmful for stdout, as stdout might not be open.
12241 * src/reduce.c (reduce_print): Likewise.
12242
12243 2002-12-27 Paul Eggert <eggert@twinsun.com>
12244
12245 Fix a bug where error locations were not being recorded correctly.
12246 This problem was originally reported by Paul Hilfinger in
12247 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12248
12249 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12250 top of the location stack's error locations.
12251 (yyerrlab): Set it. When discarding a token, push its location
12252 onto yylerrsp so that we don't lose track of the error's end.
12253 (yyerrlab1): Now is only the target of YYERROR, so that we can
12254 properly record the location of the action that failed. For GCC
12255 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12256 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12257 (yyerrlab2): New label, which yyerrlab now falls through to.
12258 Compute the error's location by applying YYLLOC_DEFAULT to
12259 the locations of all the symbols that went into the error.
12260 * doc/bison.texinfo (Location Default Action): Mention that
12261 YYLLOC_DEFAULT is also invoked for syntax errors.
12262 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12263 Error locations include the locations of all the tokens that were
12264 discarded, not just the last token.
12265
12266 2002-12-26 Paul Eggert <eggert@twinsun.com>
12267
12268 * src/files.c: Include quote.h.
12269 (compute_output_file_names): Warn if we detect conflicting
12270 outputs to the same file. This should catch the misunderstanding
12271 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12272
12273 * src/conflicts.c (conflicts_print): If the user specifies
12274 "%expect N", report an error if there are any reduce/reduce
12275 conflicts. This is what the manual says should happen.
12276 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12277 * tests/conflicts.at (%expect with reduce conflicts): New test.
12278
12279 Don't use m4_include on relative file names, as it doesn't work as
12280 desired if there happens to be a file with that name under ".".
12281
12282 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12283 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12284 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12285 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12286 * src/output.c (output_skeleton): Use full path names when
12287 specifying a file to include; don't rely on include path, as
12288 it's unreliable when the working file contains a file with
12289 that name.
12290
12291 2002-12-25 Paul Eggert <eggert@twinsun.com>
12292
12293 Remove obsolete references to bison.simple and bison.hairy.
12294 Problem mentioned by Aubin Mahe in
12295 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12296 * data/glr.c: Comment fix.
12297 * doc/bison.1: Remove references. Also, mention "yacc".
12298
12299 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12300 with -g option.
12301
12302 * src/parse-gram.y (declaration): Use enum "report_states" rather
12303 than its numeric value 1.
12304
12305 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12306 opening a new one. This fixes Debian bug 165349, reported by
12307 Bruce Stephens.
12308
12309 2002-12-24 Paul Eggert <eggert@twinsun.com>
12310
12311 Version 1.75e.
12312
12313 * Makefile.maint (cvs-update): Don't assume that the shell
12314 supports $(...), as Solaris sh doesn't.
12315
12316 * src/parse-gram.y (lloc_default): Remove test for empty
12317 nonterminals at the end, since it didn't change the result.
12318
12319 2002-12-24 Paul Eggert <eggert@twinsun.com>
12320
12321 If the user does not define YYSTYPE as a macro, Bison now declares it
12322 using typedef instead of defining it as a macro. POSIX requires this.
12323 For consistency, YYLTYPE is also declared instead of defined.
12324
12325 %union directives can now have a tag before the `{', e.g., the
12326 directive `%union foo {...}' now generates the C code
12327 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12328 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12329 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12330 instead of `yyltype'.
12331
12332 `yystype' and `yyltype' are now obsolescent macros instead of being
12333 typedefs or tags; they are no longer documented and will be
12334 withdrawn in a future release.
12335
12336 * data/glr.c (b4_location_type): Remove.
12337 (YYSTYPE): Renamed from yystype.
12338 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12339 (struct YYLTYPE): Renamed from struct yyltype.
12340 (YYLTYPE): Renamed from yyltype.
12341 (yyltype, yystype): New (and obsolescent) macros,
12342 for backward compatibility.
12343 * data/yacc.c: Likewise.
12344
12345 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12346 does not specify a union tag. This is for compatibility with
12347 Solaris 9 yacc.
12348
12349 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12350 const *, since it is now modified by stripping surrounding { }.
12351 (current_braced_code): Remove.
12352 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12353 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12354 trailing " {...}". Now of type <chars>.
12355 (grammar_declaration): Adjust to bundled tokens.
12356 (code_content): Remove; stripping is now done by add_param.
12357 (print_token_value): Print contents of bundled tokens.
12358 (token_name): New function.
12359
12360 * src/reader.h (braced_code, current_braced_code): Remove.
12361 (token_name): New decl.
12362
12363 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12364 token_type, not braced_code code_kind. All uses changed.
12365 (SC_PRE_CODE): New state, for scanning after a keyword that
12366 has (or usually has) an immediately-following braced code.
12367 (token_type): New local var, to keep track of which token type
12368 to return when scanning braced code.
12369 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12370 <INITIAL>"%parse-param", <INITIAL>"%printer",
12371 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12372 instead of returning a token type immediately.
12373 (<INITIAL>"{"): Set token type.
12374 (<SC_BRACED_CODE>"}"): Use it.
12375 (handle_action_dollar, handle_action_at): Now returns bool
12376 indicating success. Fail if ! current_rule; this prevents a core dump.
12377 (handle_symbol_code_dollar, handle_symbol_code_at):
12378 Remove; merge body into caller.
12379 (handle_dollar, handle_at): Complain in invalid contexts.
12380
12381 * NEWS, doc/bison.texinfo: Document the above.
12382 * NEWS: Fix years and program names in copyright notice.
12383
12384 2002-12-17 Paul Eggert <eggert@twinsun.com>
12385
12386 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12387 Reporting, Table of Symbols): Omit mentions of %lex-param and
12388 %parse-param from the documentation for now.
12389
12390 2002-12-15 Paul Eggert <eggert@twinsun.com>
12391
12392 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12393 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12394 lookahead symbol, and which sets yychar in parser actions) and it
12395 disagreed with the Bison documentation. Bug
12396 reported by Andrew Walrond.
12397
12398 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12399 as the caller now does that.
12400 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12401 (YYEMPTY): Parenthesize right hand side, since others use it.
12402 (yyparse): Don't assume that our generated code is the only code
12403 that sets yychar.
12404
12405 2002-12-13 Paul Eggert <eggert@twinsun.com>
12406
12407 Version 1.75d.
12408
12409 POSIX requires a "yacc" command.
12410 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12411 (MOSTLYCLEANFILES): Add yacc.
12412 (yacc): New rule.
12413 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12414 as an alias for bison y.
12415
12416 * po/LINGUAS: Add da.
12417
12418 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12419 problem with latest <getopt.h>.
12420 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12421
12422 * doc/fdl.texi: Upgrade to 1.2.
12423 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12424 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12425 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12426 gnulib.
12427 * config/install-sh: Sync with autotools.
12428
12429 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12430 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12431 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12432 locations are requested.
12433 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12434 locations are requested.
12435
12436 2002-12-12 Paul Eggert <eggert@twinsun.com>
12437
12438 Remove unportable casts and storage allocation tricks.
12439 While we're at it, remove almost all casts, since they
12440 usually aren't needed and are a sign of trouble.
12441
12442 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12443
12444 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12445 the pointer DSET returned by malloc; this isn't portable.
12446 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12447 Similarly for DERIVES.
12448 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12449 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12450 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12451
12452 * src/derives.c (derives_compute): Do not bother invoking
12453 int_of_rule_number, since rule numbers are integers.
12454
12455 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12456 rather than XMALLOC (char, N).
12457
12458 * src/files.c (filename_split): Rewrite to avoid cast.
12459
12460 * src/gram.h (symbol_number_as_item_number,
12461 item_number_as_symbol_number, rule_number_as_item_number,
12462 item_number_as_rule_number):
12463 Now inline functions rather than macros, to avoid casts.
12464 * src/state.h (state_number_as_int): Likewise.
12465 * src/tables.c (state_number_to_vector_number,
12466 symbol_number_to_vector_number): Likewise.
12467
12468 * src/gram.h (int_of_rule_number): Remove; no longer used.
12469
12470 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12471 since the resulting storage is always stored into.
12472
12473 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12474 where it's needed.
12475
12476 * src/muscle_tab.c (muscle_m4_output):
12477 Now inline. Return bool, not int.
12478 * src/state.c (state_compare): Likewise.
12479 * src/symtab.c (symbol_check_defined,
12480 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12481 hash_compare_symbol, hash_symbol):
12482 Likewise.
12483 * src/uniqstr.c (uniqstr_print): Likewise.
12484 * src/muscle_tab.c (muscle_m4_output_processor):
12485 New function, to avoid casts.
12486 * src/state.c (state_comparator, stage_hasher): Likewise.
12487 * src/symtab.c (symbol_check_defined_processor,
12488 symbol_check_alias_consistency_processor, symbol_pack_processor,
12489 symbol_translation_processor, hash_symbol_comparator,
12490 hash_symbol_hasher): Likewise.
12491 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12492 * src/muscle_tab.c (muscles_m4_output):
12493 Use new functions instead of casting old functions unportably.
12494 * src/state.c (state_hash_new): Likewise.
12495 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12496 symbols_token_translations_init):
12497 Likewise.
12498 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12499
12500 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12501 var instead of casting to long, to avoid casts.
12502 (prepare_states): Use MALLOC rather than alloca, so that we don't
12503 have to worry about alloca.
12504 * src/state.c (state_hash_lookup): Likewise.
12505
12506 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12507 local var instead of casting to unsigned char, to avoid casts.
12508
12509 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12510 STATE_ALLOC): Remove.
12511 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12512 rather than calloc, and use offsetof to avoid allocating slightly
12513 too much storage.
12514 (state_new): Initialize all members.
12515
12516 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12517
12518 * src/symtab.c (symbol_free): Remove; unused.
12519 (symbol_get): Remove cast in lhs of assignment.
12520 (symbols_do): Now static. Accept generic arguments, not
12521 hashing-related ones.
12522
12523 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12524 (symbol_processor): Remove.
12525 (symbols_do): Remove decl; now static.
12526
12527 * src/system.h (alloca): Remove; decl no longer needed.
12528 (<stddef.h>): Include, for offsetof.
12529 (<inttypes.>, <stdint.h>): Include if available.
12530 (uintptr_t): New type, if system lacks it.
12531 (CALLOC, MALLOC, REALLOC): New macros.
12532 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12533 new macros.
12534
12535 * src/tables.c (table_size): Now int, to pacify GCC.
12536 (table_grow, table_ninf_remap): Use signed table size.
12537 (save_row): Don't bother initializing locals when not needed.
12538 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12539 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12540
12541 * src/vcg.h: Correct misspellings.
12542
12543 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12544
12545
12546 * src/getargs.c (getargs): Don't assume EOF == -1.
12547
12548 2002-12-09 Paul Eggert <eggert@twinsun.com>
12549
12550 Change identifier spellings to avoid collisions with names
12551 that are reserved by POSIX.
12552
12553 Don't use names ending in _t, since POSIX reserves them.
12554 For consistency, remove _e and _s endings -- they're weren't
12555 needed to remove ambiguity. All uses changed.
12556 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12557 turn was just renamed from struniq_t.
12558 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12559 which in turn was just renamed from struniq_processor_t.
12560 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12561 in turn was renamed from hash_compare_struniq_t.
12562 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12563 (state_list): Renamed from state_list_t.
12564 * src/assoc.h (assoc): Renamed from assoc_t.
12565 * src/conflicts.c (enum conflict_resolution): Renamed from
12566 enum conflict_resolution_e.
12567 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12568 (rule_list): Renamed from rule_list_t.
12569 * src/getargs.h (enum trace): Renamed from enum trace_e.
12570 (enum report): Renamed from enum report_e.
12571 * src/gram.h (item_number): Renamed from item_number_t.
12572 (rule_number): Renamed from rule_number_t.
12573 (struct rule_s): Remove the "rule_s" part; not used.
12574 (rule): Renamed from rule_t.
12575 (rule_filter): Renamed from rule_filter_t.
12576 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12577 (goto_list): Renamed from goto_list_t.
12578 * src/lalr.h (goto_number): Renamed from goto_number_t.
12579 * src/location.h (location): Renamed from location_t.
12580 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12581 and moved here from:
12582 * src/muscle_tab.h (muscle_entry_t): here.
12583 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12584 (rule_list): Renamed from rule_list_t.
12585 * src/print_graph.c (static_graph): Renamed from graph.
12586 * src/reader.h (braced_code): Renamed from braced_code_t.
12587 Remove brace_code_e tag.
12588 * src/relation.h (relation_node): Renamed from relation_node_t.
12589 (relation_nodes): Renamed from relation_nodes_t.
12590 (relation): Renamed from relation_t.
12591 * src/state.h (state_number): Renamed from state_number_t.
12592 (struct state): Renamed from struct state_s.
12593 (state): Renamed from state_t.
12594 (transitions): Renamed from transitions_t. Unused (and
12595 misspelled) transtion_s tag removed.
12596 (errs): Renamed from errs_t. Unused errs_s tag removed.
12597 (reductions): Renamed from reductions_t. Unused tag
12598 reductions_s removed.
12599 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12600 (struct symbol_list): Renamed from struct symbol_list_s.
12601 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12602 (struct symbol): Renamed from struct symbol_s.
12603 (symbol): Renamed from symbol_t.
12604 * src/tables.c (vector_number): Renamed from vector_number_t.
12605 (action_number): Renamed from action_t.
12606 * src/tables.h (base_number): Renamed from base_t.
12607 * src/vcg.h (enum color): Renamed from enum color_e.
12608 (enum textmode): Renamed from enum textmode_e.
12609 (enum shape): Renamed from enum shape_e.
12610 (struct colorentry): Renamed from struct colorentry_s.
12611 (struct classname): Renamed from struct classname_s.
12612 (struct infoname): Renamed from struct infoname_s.
12613 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12614 (enum decision): Renamed from enum decision_e.
12615 (enum orientation): Renamed from enum orientation_e.
12616 (enum alignment): Renamed from enum alignment_e.
12617 (enum arrow_mode): Renamed from enum arrow_mode_e.
12618 (enum crossing_type): Renamed from enum crossing_type_e.
12619 (enum view): Renamed from enum view_e.
12620 (struct node): Renamed from struct node_s.
12621 (node): Renamed from node_t.
12622 (enum linestyle): Renamed from enum linestyle_e.
12623 (enum arrowstyle): Renamed from enum arrowstyle_e.
12624 (struct edge): Renamed from struct edge.
12625 (edge): Renamed from edge_t.
12626 (struct graph): Renamed from struct graph_s.
12627 (graph): Renamed from graph_t.
12628 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12629 Rename value_t -> value.
12630 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12631 value_t_as_yystype -> value_as_yystype.
12632
12633 Don't include <errno.h> in the mainstream code, since it
12634 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12635 * lib/get-errno.c, lib/get-errno.h: New files.
12636 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12637 get-errno.c.
12638 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12639 * src/output.c (output_skeleton): Likewise.
12640 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12641 instead of errno.
12642 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12643 Likewise.
12644 (handle_action_dollar, handle_action_at): Likewise.
12645 * src/system.h: Do not include <errno.h>.
12646 (TAB_EXT): Renamed from EXT_TAB.
12647 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12648
12649 Avoid str[a-z]*, since <string.h> reserves that name space.
12650 Change all instances of "struniq" in names to "uniqstr", and
12651 likewise for "STRUNIQ" and "UNIQSTR".
12652 * src/uniqstr.c: Renamed from src/struniq.c.
12653 * src/uniqstr.h: Renamed from src/struniq.h.
12654 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12655 * src/files.c (strsuffix): Remove; unused.
12656 (concat2): Renamed from stringappend. Now static.
12657 * src/files.h (strsuffix, stringappend): Remove; unused.
12658 * src/parse-gram.y (<chars>): Renamed from <string>.
12659 (<uniqstr>): Renamed from <struniq>.
12660 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12661 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12662 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12663 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12664 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12665 (N_EXPAND): Renamed from N_STRETCH.
12666
12667 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12668 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12669 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12670 Remove; unused.
12671 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12672 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12673 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12674 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12675 (BASE_MAXIMUM): Renamed from BASE_MAX.
12676 (BASE_MINIMUM): Renamed from BASE_MIN.
12677 (ACTION_MAX): Remove; unused.
12678 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12679 Unnecessary casts removed from above defines.
12680
12681
12682 Fix misspelling in names.
12683 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12684 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12685 G_NODE_ALIGNEMENT.
12686
12687
12688 * lib/timevar.c (timevar_report): Renamed from time_report,
12689 for consistency with other names.
12690 * lib/timevar.h (timevar_report): New decl.
12691 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12692
12693
12694 Sort include-file uses.
12695
12696 Reorder all include files under src to be in the order "system.h".
12697 then the ../lib include files in angle brackets (alphabetized),
12698 then the . include files in double-quotes (alphabetized). Fix
12699 dependency breakages encountered in this process, as follows:
12700 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12701 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12702 * src/state.h: Include "symtab.h".
12703
12704 2002-12-08 Paul Eggert <eggert@twinsun.com>
12705
12706 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12707 since this causes problems when __file__ contains character
12708 sequences like "@" that are treated specially by src/scan-skel.l.
12709 Instead, just use the file's basename. This fixes the bug
12710 reported by Martin Mokrejs in
12711 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12712
12713 2002-12-06 Paul Eggert <eggert@twinsun.com>
12714
12715 Add support for rules that do not have trailing semicolons, as
12716 POSIX requires. Improve the quality of locations in Bison
12717 diagnostics.
12718
12719 * src/location.c: Include <quotearg.h>.
12720 (empty_location): Now const.
12721 (location_print): New function. Follow the recommendation of the
12722 GNU Coding Standards for locations that span file boundaries.
12723 * src/location.h: Do not include <quotearg.h>; no longer needed.
12724 (boundary): New type.
12725 (location_t): Use it. This allows locations to span file boundaries.
12726 All member uses changed: file -> start.file or end.file (as needed),
12727 first_line -> start.line, first_column -> start.column,
12728 last_line -> end.line, last_column -> end.column.
12729 (equal_boundaries): New function.
12730 (LOCATION_RESET, LOCATION_STEP): Remove.
12731 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12732 (empty_location): Now const.
12733 (location_print): New decl.
12734 * src/parse-gram.y (lloc_default): New function, which handles
12735 empty locations more accurately.
12736 (YYLLOC_DEFAULT): Use it.
12737 (%token COLON): Remove.
12738 (%token ID_COLON): New token.
12739 (rules): Use it.
12740 (declarations, rules): Remove trailing semicolon.
12741 (declaration, rules_or_grammar_declaration):
12742 Allow empty (";") declaration.
12743 (symbol_def): Remove empty actions; no longer needed.
12744 (rules_or_grammar_declaration): Remove trailing semicolon.
12745 (semi_colon.opt): Remove.
12746 * src/reader.h: Include location.h.
12747 (scanner_cursor): New decl.
12748 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12749 rolling our own.
12750 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12751 of *loc.
12752 (STEP): Remove. No longer needed, now that adjust_location does
12753 the work. All uses removed.
12754 (scanner_cursor): New var.
12755 (adjust_location): Renamed from extend_location. It now sets
12756 *loc and adjusts the scanner cursor. All uses changed.
12757 Don't bother testing for CR.
12758 (handle_syncline): Remove location arg; now updates scanner cursor.
12759 All callers changed.
12760 (unexpected_end_of_file): Now accepts start boundary of token or
12761 comment, not location. All callers changed. Update scanner cursor,
12762 not the location.
12763 (SC_AFTER_IDENTIFIER): New state.
12764 (context_state): Renamed from c_context. All uses changed.
12765 (id_loc, code_start, token_start): New local vars.
12766 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12767 processing of Yacc white space and equivalents here.
12768 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12769 instead of returning ID immediately, since we need to search for
12770 a subsequent colon.
12771 (<INITIAL>"'", "\""): Save token_start.
12772 (<INITIAL>"%{", "{", "%%"): Save code_start.
12773 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12774 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12775 BEGIN context_state at end, not INITIAL.
12776 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12777 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12778 Return correct token start.
12779 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12780 the start of a character, string or multiline comment is found.
12781 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12782 Reduction): Adjust reported locations to match the more-precise
12783 results now expected.
12784 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12785 * tests/reduce.at (Useless Rules, Reduced Automaton,
12786 Underivable Rules): Likewise.
12787 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12788 or "|"' now that so many other tokens are allowed by the new grammar.
12789
12790 * src/complain.h (current_file): Remove duplicate decl;
12791 current_file is now owned by files.h.
12792 * src/complain.c, src/scan-gram.l: Include files.h.
12793
12794 2002-12-06 Paul Eggert <eggert@twinsun.com>
12795
12796 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12797 promotes to int; it might be unsigned int.
12798 * data/yacc.c (yy_reduce_print): Likewise.
12799
12800 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12801 be #defined in the prologue, not in the Bison declarations.
12802 This fixes Debian Bug 102878, reported by Shaul Karl.
12803
12804 2002-12-02 Paul Eggert <eggert@twinsun.com>
12805
12806 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12807 * lib/strtoul.c: New file, from gnulib.
12808 This fixes a porting bug reported by Peter Klein in
12809 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
12810
12811 2002-11-30 Paul Eggert <eggert@twinsun.com>
12812
12813 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12814 and put only a forward declaration in the prologue. This is for
12815 consistency with the other scanner helper functions.
12816
12817 Type clashes now generate warnings, not errors, since it
12818 appears that POSIX may allow some grammars with type clashes.
12819 * src/reader.c (grammar_current_rule_check): Warn about
12820 type clashes instead of complaining.
12821 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12822
12823 Add Yacc library, since POSIX requires it.
12824 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12825 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12826 * lib/main.c, lib/yyerror.c: New files.
12827
12828 gram_error can be static; it need not be extern.
12829 * src/reader.h (gram_error): Remove decl.
12830 * src/parse-gram.y (gram_error): Now static. Add static decl.
12831 (print_token_value): Omit parameter names from forward decl,
12832 for consistency.
12833
12834 2002-11-29 Paul Eggert <eggert@twinsun.com>
12835
12836 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12837 be declared before being used. E.g., one should typically
12838 declare them in the prologue. Use GNU coding style in examples.
12839 Put "const" consistently after the type it modifies. Mention
12840 that C99 supports "inline". Mention that yyerror traditionally
12841 returns "int".
12842
12843 %parse-param and %lex-param now take just one argument, the
12844 declaration; the argument name is deduced from the declaration.
12845
12846 * doc/bison.texinfo (Parser Function, Pure Calling, Error
12847 Reporting, Table of Symbols): Document this.
12848 * src/parse-gram.y (add_param): New function.
12849 (COMMA): Remove.
12850 (declaration): Implement new rule for %parse-param and %lex-param.
12851 * src/scan-gram.l: "," now elicits a warning, rather than being
12852 a token; this is more compatible with byacc.
12853 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
12854
12855 2002-11-27 Paul Eggert <eggert@twinsun.com>
12856
12857 Rename identifiers to avoid real and potential collisions.
12858
12859 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
12860 to avoid collision with lex macro described by Bruce Lilly in
12861 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12862 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12863 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
12864 * src/parse-gram.y (print_token_value): Renamed from yyprint.
12865 All uses changed.
12866 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
12867 The name "yycontrol" violates the name space rules, and this stuff
12868 wasn't being used anyway.
12869 (input): Remove action; this stuff wasn't being used.
12870 (gram_error): Rename local variable yylloc -> loc.
12871 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
12872 (YY_DECL): Don't use "yy" at start of local variables.
12873 All uses changed, e.g., yylloc -> loc.
12874 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
12875 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
12876 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
12877 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
12878
12879 * src/parse-gram.y (gram_error): loc is now const *.
12880 * src/reader.h (gram_error): Likewise.
12881
12882 2002-11-24 Paul Eggert <eggert@twinsun.com>
12883
12884 Version 1.75c.
12885
12886 * tests/actions.at (Actions after errors): Use an output format
12887 more similar to that of the Printers and Destructors test.
12888 Test the position of the ';' token too.
12889 (Printers and Destructors): Likewise.
12890 (Printers and Destructors: %glr-parser): Remove for now, to avoid
12891 unnecessarily alarming people when the test fails.
12892
12893 * data/yacc.c (yyerrlab1): Move this label down, so that the
12894 parser does not discard the lookahead token if the user code
12895 invokes YYERROR. This change is required for POSIX conformance.
12896
12897 * lib/error.c: Sync with gnulib.
12898
12899 2002-11-22 Paul Eggert <eggert@twinsun.com>
12900
12901 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
12902 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
12903 * lib/xmalloc.c: Likewise.
12904
12905 2002-11-20 Paul Eggert <eggert@twinsun.com>
12906
12907 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
12908
12909 2002-11-20 Paul Eggert <eggert@twinsun.com>
12910
12911 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
12912 should use `if (! x) abort ();' rather than `assert (x);', and
12913 anyway it's one less thing to worry about configuring.
12914
12915 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
12916 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
12917 and replace all instances of assert with abort.
12918 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12919 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
12920
12921 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
12922 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
12923 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
12924 hash_find_entry, hash_rehash, hash_insert): Likewise.
12925 * src/conflicts.c (resolve_sr_conflict): Likewise.
12926 * src/lalr.c (set_goto_map, map_goto): Likewise.
12927 * src/nullable.c (nullable_compute): Likewise.
12928 * src/output.c (prepare_rules, token_definitions_output): Likewise.
12929 * src/reader.c (packgram, reader): Likewise.
12930 * src/state.c (state_new, state_free, state_transitions_set,
12931 state_reduction_find): Likewise.
12932 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
12933 symbol_pack): Likewise.
12934 * src/tables.c (conflict_row, pack_vector): Likewise.
12935 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12936 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12937 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
12938 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
12939
12940 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
12941 (ARGMATCH_CONSTRAINT): New macro.
12942 (ARGMATCH_ASSERT): Use it.
12943
12944 * src/system.h (verify): New macro.
12945 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
12946 rather than assert.
12947 * src/tables.c (tables_generate): Likewise.
12948
12949 * src/struniq.c (struniq_assert): Now returns void, and aborts
12950 if the assertion is false.
12951 (struniq_assert_p): Remove.
12952 * src/struniq.h: Likewise.
12953
12954 2002-11-18 Paul Eggert <eggert@twinsun.com>
12955
12956 * data/glr.c (yygetLRActions): Replace `yyindex' with
12957 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
12958 This fixes the regression with Sun ONE Studio 7 cc that I reported in
12959 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
12960
12961 2002-11-18 Akim Demaille <akim@epita.fr>
12962
12963 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
12964 space.
12965 From Tim Van Holder.
12966
12967 2002-11-17 Paul Eggert <eggert@twinsun.com>
12968
12969 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
12970 to "SyntaxError" for consistency with my 2002-11-15 change.
12971
12972 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
12973 not define to {}, since this breaks the common use of `YYDPRINTF
12974 ((...));' if a single statement is desired (e.g. before `else').
12975 Work around GCC warnings by surrounding corresponding calls with
12976 {} if needed.
12977 (yyhasResolvedValue): Remove unused function.
12978 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
12979 loop body.
12980 (yyreportSyntaxError): Renamed from yyreportParseError.
12981 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
12982 All uses changed.
12983 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
12984 extern when possible. Remove unused initializations.
12985
12986 2002-11-16 Akim Demaille <akim@epita.fr>
12987
12988 Augment the similarity between GLR and LALR traces.
12989
12990 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
12991 (YY_REDUCE_PRINT): New.
12992 (yyparse): Use them.
12993 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
12994 YYDPRINT here.
12995 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
12996 state reached after the reduction/recovery, since...
12997 (yyparse, yyprocessOneStack): Report the state we are entering in.
12998
12999 2002-11-16 Akim Demaille <akim@epita.fr>
13000
13001 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13002 Add support for --trace=skeleton.
13003 * src/scan-skel.l: %option debug.
13004 Scan strings of non-@ or \n instead of character by character.
13005 (scan_skel): Handle trace_skeleton.
13006 (QPUTS): New.
13007 (@output_parser_name@, @output_header_name@): ``Restore'' their
13008 support (used to be M4 macros).
13009 * data/yacc.c: Quote larger chunks, a la glr.c.
13010 * data/lalr1.cc: Likewise.
13011 The header guards are no longer available, so use some other
13012 string than `YYLSP_NEEDED'.
13013
13014 2002-11-16 Akim Demaille <akim@epita.fr>
13015
13016 Make the ``Printers and Destructors'' test more verbose, taking
13017 `yacc.c''s behavior as (possibly wrong) reference.
13018
13019 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13020 instead of fprint on stdout.
13021 Set and report the last_line of the symbols.
13022 Consistently display values and locations.
13023
13024 2002-11-16 Paul Eggert <eggert@twinsun.com>
13025
13026 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13027
13028 2002-11-15 Paul Eggert <eggert@twinsun.com>
13029
13030 * tests/actions.at (Actions after errors): New test case.
13031
13032 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13033 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13034 tests/action.at, tests/calc.at, tests/conflicts.at,
13035 tests/cxx-type.at, tests/regression.at:
13036 "parse error" -> "syntax error" for POSIX compatibility.
13037 "parsing stack overflow..." -> "parser stack overflow" so
13038 that code matches Bison documentation.
13039
13040 2002-11-15 Akim Demaille <akim@epita.fr>
13041
13042 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13043 take two BRACED_CODE, not two string_content.
13044 Free the scanner's obstack when we are done.
13045 (code_content): New.
13046 * tests/calc.at: Adjust.
13047 * doc/bison.texinfo: Adjust.
13048 Also, make sure to include the `,' for these declarations.
13049
13050 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13051
13052 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13053 definition; avoids potential autoreconf problems.
13054
13055 2002-11-15 Akim Demaille <akim@epita.fr>
13056
13057 Always check the value returned by yyparse.
13058
13059 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13060 returned by yyparse.
13061 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13062 Adjust calls.
13063 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13064 returned by yyparse.
13065
13066 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13067
13068 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13069 on input.at test.
13070
13071 2002-11-14 Paul Eggert <eggert@twinsun.com>
13072
13073 * src/output.c (output_skeleton): Call xfopen instead of
13074 duplicating xfopen's body.
13075
13076 Fix bugs reported by Nelson H. F. Beebe in
13077 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13078
13079 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13080 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13081 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13082 file twice in the grammar, as an extra check.
13083
13084 * tests/input.at (Torturing the Scanner): Surround the
13085 backslash-newline tests with "#if 0", to make it less likely that
13086 we'll run into compiler bugs. Bring back solitary \ inside
13087 comment, but add a closing comment to work around HP C bug. Don't
13088 test backslash-newline in C character constant.
13089
13090 2002-11-14 Akim Demaille <akim@epita.fr>
13091
13092 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13093 status of the compiler.
13094 Calling `exit 1' is no longer needed.
13095 Reported by Nelson H. F. Beebe.
13096
13097 2002-11-14 Akim Demaille <akim@epita.fr>
13098
13099 * tests/atlocal.in (CPPFLAGS): We have config.h.
13100 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13101 New.
13102 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13103 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13104 * tests/regression.at, tests/torture.at: Use them for all the
13105 grammars that are to be compiled.
13106 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13107 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13108 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13109
13110 2002-11-14 Akim Demaille <akim@epita.fr>
13111
13112 * doc/bison.texinfo: Various formatting changes (alignments in
13113 samples, additional @group/@end group, GCS in samples.
13114 Use @deffn instead of simple @table to define the directives,
13115 macros, variables etc.
13116
13117 2002-11-13 Paul Eggert <eggert@twinsun.com>
13118
13119 Fix some bugs reported by Albert Chin-A-Young in
13120 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13121
13122 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13123 -o c"; the HP C compiler chatters during compilation.
13124 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13125 * tests/headers.at (export YYLTYPE): Likewise.
13126
13127 * tests/input.at (Torturing the Scanner): Remove lines containing
13128 solitary backslashes, as they tickle a bug in the HP C compiler.
13129
13130 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13131 comments, since they're not portable. Use GNU coding style.
13132
13133 2002-11-13 Akim Demaille <akim@epita.fr>
13134
13135 * data/yacc.c: Leave bigger chunks of quoted text.
13136 (YYDSYMPRINTF): New.
13137 Use it to report symbol activities.
13138 * data/glr.c (YYDSYMPRINTF): New.
13139 Use it.
13140
13141 2002-11-12 Paul Eggert <eggert@twinsun.com>
13142
13143 Version 1.75b.
13144
13145 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13146 (yyglrReduce): Return yyok, not 0.
13147 This should avoid the enumerated-type warnings reported
13148 by Nelson H. F. Beebe in
13149 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13150
13151 * lib/bbitset.h (BITSET_INLINE): Remove.
13152 * lib/bitset.h [! BITSET_INLINE]: Remove.
13153 (bitset_set, bitset_reset, bitset_test): Rename local vars
13154 to avoid shadowing warnings by GCC.
13155
13156 * data/glr.c (inline): Remove #define. It's the user's
13157 responsibility to #define it away, just like 'const'.
13158 This fixes one of the bugs reported by Nelson H. F. Beebe in
13159 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13160
13161 * Makefile.maint (po-check): Scan .l and .y files instead of the
13162 .c and the .h files that they generate. This fixes the bug
13163 reported by Tim Van Holder in:
13164 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13165 Look for N_ as well as for _. Try to avoid matching #define for
13166 N_ and _.
13167 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13168 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13169 * src/scan-gram.l: Revamp regular expressions so that " and '
13170 do not confuse xgettext.
13171
13172 * src/struniq.h (struniq_new): Do not declare the return type
13173 to be 'const'; this violates the C standard.
13174 * src/struniq.c (struniq_new): Likewise.
13175
13176 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13177
13178 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13179 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13180 linker.
13181
13182 2002-11-12 Akim Demaille <akim@epita.fr>
13183
13184 * Makefile.maint: Sync with Autoconf:
13185 (local_updates): New.
13186
13187 2002-11-12 Akim Demaille <akim@epita.fr>
13188
13189 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13190
13191 2002-11-12 Akim Demaille <akim@epita.fr>
13192
13193 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13194 locations.
13195
13196 2002-11-12 Akim Demaille <akim@epita.fr>
13197
13198 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13199 not yyvalue.
13200
13201 2002-11-12 Akim Demaille <akim@epita.fr>
13202
13203 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13204 Use it to test the GLR parser.
13205
13206 2002-11-12 Akim Demaille <akim@epita.fr>
13207
13208 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13209 defines it.
13210 * data/glr.c (yystos): New.
13211 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13212 (YYDSYMPRINT): New.
13213 (yyval): Don't define it, it is handled via M4.
13214 (yyrecoverParseError): Free verbosely the discarded symbols.
13215 * data/yacc.c (yysymprint): Remove, rather...
13216 (b4_yysymprint_generate): invoke.
13217 * data/c.m4 (b4_yysymprint_generate): New.
13218 Accept pointers as arguments, as opposed to the version from
13219 yacc.c.
13220 (b4_yydestruct_generate): Likewise.
13221 * tests/cations.at (Printers and Destructors): Use Bison directives
13222 instead of CPP macros.
13223 Don't rely on internal details.
13224
13225 2002-11-12 Akim Demaille <akim@epita.fr>
13226
13227 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13228 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13229 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13230 it against YYEMPTY and so forth), work on yytoken (i.e., set
13231 it to YYEMPTY etc.).
13232 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13233 (b4_symbol_actions): Remove.
13234 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13235 for 0, end-of-input.
13236
13237 2002-11-12 Akim Demaille <akim@epita.fr>
13238
13239 * doc/bison.texinfo (Destructor Decl): New.
13240
13241 2002-11-12 Akim Demaille <akim@epita.fr>
13242
13243 * src/tables.c (tables_generate): Use free for pointers that
13244 cannot be NULL, not XFREE.
13245 (pack_vector): Use assert, not fatal, for bound violations.
13246 * src/state.c (state_new): Likewise.
13247 * src/reader.c (reader): Likewise.
13248 * src/lalr.c (set_goto_map): Likewise.
13249 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13250 the file name.
13251
13252 2002-11-12 Akim Demaille <akim@epita.fr>
13253
13254 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13255 Restore.
13256 * src/scan-gram.l (last_string): Is global to the file, not to
13257 yylex.
13258 * src/parse-gram.y (input): Don't append the epilogue here,
13259 (epilogue.opt): do it here, and free the scanner's obstack.
13260 * src/reader.c (epilogue_set): Rename as...
13261 (epilogue_augment): this.
13262 * data/c.m4 (b4_epilogue): Defaults to empty.
13263
13264 2002-11-12 Akim Demaille <akim@epita.fr>
13265
13266 * src/getargs.c (long_options): Remove duplicates.
13267 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13268 Remove.
13269 * doc/bison.rnh: Remove.
13270 * doc/bison.texinfo (VMS Invocation): Remove.
13271
13272 2002-11-12 Akim Demaille <akim@epita.fr>
13273
13274 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13275 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13276
13277 Use struniq for symbols.
13278
13279 * src/symtab.h (symbol_t): The tag member is a struniq.
13280 (symbol_type_set): Adjust.
13281 * src/symtab.c (symbol_new): Takes a struniq.
13282 (symbol_free): Don't free the tag member.
13283 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13284 (hash_compare_symbol, hash_symbol): these.
13285 Use the fact that tags as struniqs.
13286 (symbol_get): Use struniq_new.
13287 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13288 Returns a strniq.
13289 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13290 and type members are struniqs.
13291 * src/reader.c (get_merge_function)
13292 (grammar_current_rule_merge_set): Adjust.
13293 (TYPE, current_type): Are struniq.
13294
13295 Use struniq for file names.
13296
13297 * src/files.h, src/files.c (infile): Split into...
13298 (grammar_file, current_file): these.
13299 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13300 * src/reduce.c (reduce_print): Likewise.
13301 * src/getargs.c (getargs): Likewise.
13302 * src/complain.h, src/complain.c: Likewise.
13303 * src/main.c (main): Call struniqs_new early enough to use it for
13304 file names.
13305 Don't free the input file name.
13306
13307 2002-11-12 Akim Demaille <akim@epita.fr>
13308
13309 * src/symtab.c (symbol_free): Remove dead deactivated code:
13310 type_name are properly removed.
13311 Don't use XFREE to free items that cannot be NULL.
13312 * src/struniq.h, src/struniq.c: New.
13313 * src/main.c (main): Initialize/free struniqs.
13314 * src/parse-gram.y (%union): Add astruniq member.
13315 (yyprint): Adjust.
13316 * src/scan-gram.l (<{tag}>): Return a struniq.
13317 Free the obstack bit that used to store it.
13318 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13319
13320 2002-11-11 Paul Eggert <eggert@twinsun.com>
13321
13322 Revamp to fix many (but not all) of the C- and M4-related quoting
13323 problems. Among other things, this fixes the Bison bug reported
13324 by Jan Hubicka when processing the Bash grammar; see:
13325 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13326
13327 Use new @ escapes consistently. Represent brackets with @{ and @}
13328 rather than @<:@ and @:>@, since this works a bit better with dumb
13329 editors like vi. Represent @ with @@, since @ is now consistently
13330 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13331 __ofile__, to avoid unexpected expansions. Similarly, use @output
13332 rather than #output.
13333
13334 * data/c.m4 (b4_copyright): Omit file name from comment, since
13335 the file name could contain "*/".
13336 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13337 be quoted. All uses changed.
13338
13339 * data/glr.c: Use new @ escapes consistently.
13340 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13341 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13342 Remove, since they couldn't handle arbitrary characters in file
13343 names.
13344 * data/lalr1.cc: Likewise.
13345 * data/yacc.c: Likewise.
13346
13347 * src/files.c (output_infix): Remove; all uses removed.
13348 * src/files.h: Likewise.
13349
13350 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13351 mishandled funny characters in file names, and anyway it isn't
13352 needed any more.
13353 * data/yacc.c: Likewise.
13354 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13355
13356 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13357 * data/yacc.c: Likewise.
13358
13359 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13360 strings now.
13361 (muscle_init): Quote filename as a C string.
13362 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13363 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13364 * src/output.c (escaped_file_name_output): New function.
13365 (prepare_symbols): Quote tokens for M4.
13366 (prepare): Don't insert output_infix, output_prefix,
13367 output_parser_name, output_header_name; this is now down by scan-skel.
13368 Insert skeleton as a C string.
13369
13370 * src/output.c (user_actions_output, symbol_destructors_output,
13371 symbol_printers_output): Quote filenames for C and M4.
13372 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13373
13374 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13375 escapes other than \\ and \'; this simplifies the code.
13376 (<SC_STRING>): Likewise, for \\ and \".
13377 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13378 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13379 Use new escapes @{ and @} for [ and ].
13380
13381 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13382 them with auto vars.
13383 Switch to new escape scheme, where @ is the escape character uniformly.
13384 Abort if a stray escape character is found. Avoid unbounded input
13385 buffer when parsing non-escaped text.
13386
13387 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13388 __oline__, #output, $@, and @{ do not have unintended meanings.
13389
13390 2002-11-09 Paul Eggert <eggert@twinsun.com>
13391
13392 Fix the test failure due to GCC warnings described in
13393 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13394 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13395 evaluate to 0 if it's impossible for NINF to be in the respective
13396 table.
13397 (yygetLRActions, yyrecoverParseError): Use them.
13398
13399 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13400 counted in the token inserted at end of file. Now takes
13401 location_t *, not location_t, so that the location can be
13402 adjusted. All uses changed.
13403
13404 * tests/regression.at (Invalid inputs): Adjust wording in
13405 diagnostic to match the new behavior.
13406
13407 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13408 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13409 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13410 abort ();'. This reduces the runtime of the "Many lookaheads"
13411 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13412 GCC 3.2.
13413
13414 2002-11-07 Paul Eggert <eggert@twinsun.com>
13415
13416 * src/parse-gram.y (CHARACTER): Remove unused token.
13417 All uses removed.
13418
13419 * src/scan-gram.l: Remove stack option. We no longer use the
13420 stack, since the stack was never deeper than 1; instead, use the
13421 new auto var c_context to record the stacked value.
13422
13423 Remove nounput option. At an unexpected end of file, we now unput
13424 the minimal input necessary to end cleanly; this simplifies the
13425 code.
13426
13427 Avoid unbounded token sizes where this is easy.
13428
13429 (unexpected_end_of_file): New function.
13430 Use it to systematize the error message on unexpected EOF.
13431 (last-string): Now auto, not static.
13432 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13433 (scanner_last_string_free): Remove; not used.
13434 (percent_percent_count): Move decl to just before use.
13435 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13436 not the (never otherwised-used) CHARACTER.
13437
13438 2002-11-07 Akim Demaille <akim@epita.fr>
13439
13440 Let yyerror always receive the msg as last argument, so that
13441 yyerror can be variadic.
13442
13443 * data/yacc.c (b4_yyerror_args): New.
13444 Use it when calling yyerror.
13445 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13446 Use it when calling yyerror.
13447 * doc/bison.texinfo (Error Reporting): Adjust.
13448 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13449 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13450
13451 2002-11-06 Akim Demaille <akim@epita.fr>
13452
13453 #line should have quoted strings.
13454 Ideally, this should be done by m4_quotearg.
13455
13456 * src/scan-skel.l: Include quotearg.h.
13457 Quote __ofile__.
13458 * src/output.c (symbol_printers_output)
13459 (symbol_destructors_output): Quote the file name.
13460
13461 2002-11-06 Akim Demaille <akim@epita.fr>
13462
13463 * tests/regression.at (Invalid inputs): Adjust to the recent
13464 messages.
13465
13466 2002-11-06 Akim Demaille <akim@epita.fr>
13467
13468 Restore --no-lines.
13469 Reported by Jim Kent.
13470
13471 * data/c.m4 (b4_syncline): New.
13472 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13473 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13474 * src/output.c (user_actions_output): Likewise.
13475 (prepare): Define 'b4_synclines_flag'.
13476 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13477
13478 2002-11-06 Akim Demaille <akim@epita.fr>
13479
13480 * src/main.c (main): Free `infile'.
13481 * src/scan-gram.l (handle_syncline): New.
13482 Recognize `#line'.
13483 * src/output.c (user_actions_output, symbol_destructors_output)
13484 (symbol_printers_output): Use the location's file name, not
13485 infile.
13486 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13487
13488 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13489
13490 * src/tables.c (matching_state): Don't allow states to match if
13491 either has GLR conflict entries.
13492
13493 2002-11-05 Paul Eggert <eggert@twinsun.com>
13494
13495 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13496 "integer out of range" rather than "invalid value".
13497 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13498 accordingly.
13499
13500 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13501 Also, remove one static variable in the scanner.
13502
13503 * src/scan-gram.l (braces_level): Now auto, not static.
13504 Initialize to zero if the compiler is being picky.
13505 (INITIAL): Clear braces_level instead of incrementing it.
13506 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13507 as POSIX 1003.1-2001 requires.
13508 * src/system.h (IF_LINT): New macro, taken from coreutils.
13509 * configure.ac: Define "lint" if --enable-gcc-warnings.
13510
13511 2002-11-05 Akim Demaille <akim@epita.fr>
13512
13513 * src/scan-gram.l: When it starts with `%', complain about the
13514 whole directive, not just that `invalid character: %'.
13515
13516 2002-11-04 Akim Demaille <akim@epita.fr>
13517
13518 * Makefile.maint: Update from Autoconf.
13519 (update, cvs-update, po-update, do-po-update): New.
13520
13521 2002-11-04 Akim Demaille <akim@epita.fr>
13522
13523 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13524 and yyerror.
13525 Have yyerror `use' its arguments.
13526 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13527 returns true when location & yacc & pure & parse-param.
13528 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13529
13530 2002-11-04 Akim Demaille <akim@epita.fr>
13531
13532 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13533 clashes.
13534 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13535 font-lock-mode.
13536 Use complain_at.
13537 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13538 slot 0.
13539
13540 2002-11-03 Paul Eggert <eggert@twinsun.com>
13541
13542 * src/reader.c (get_merge_function, grammar_current_rule_check):
13543 Use consistent diagnostics for reporting type name clashes.
13544 Quote the types with <>, for consistency with Yacc.
13545 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13546
13547 2002-11-03 Akim Demaille <akim@epita.fr>
13548
13549 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13550 New.
13551 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13552 (b4_parse_param): Remove.
13553 Use b4_identification.
13554 Propagate b4_pure_args where needed to pass them to yyerror.
13555 * data/glr.m4 (b4_parse_param): Remove.
13556 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13557 (b4_lpure_formals): New.
13558 Use b4_identification.
13559 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13560 b4_user_formals and b4_user_args.
13561 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13562 (yyreportAmbiguity): When using a pure parser, also need
13563 the location, and the parse-params.
13564 Adjust callers.
13565 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13566 When using a pure parser, also need the parse-params.
13567 Adjust callers.
13568 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13569 (%pure-parser + %parse-param) LALR and GLR parsers.
13570 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13571 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13572 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13573 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13574 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13575 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13576 * doc/bison.texinfo: Untabify the whole file.
13577 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13578 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13579 (Error Reporting): Adjust to these new directives.
13580 Document %error-verbose, deprecate YYERROR_VERBOSE.
13581
13582 2002-11-03 Akim Demaille <akim@epita.fr>
13583
13584 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13585 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13586 command line options.
13587 * tests/cxx-type.at: Formatting changes.
13588
13589 2002-11-03 Paul Eggert <eggert@twinsun.com>
13590
13591 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13592 to count columns correctly, and to check for invalid inputs.
13593
13594 Use mbsnwidth to count columns correctly. Account for tabs, too.
13595 Include mbswidth.h.
13596 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13597 (extend_location): New function.
13598 (YY_LINES): Remove.
13599
13600 Handle CRLF in C code rather than in Lex code.
13601 (YY_INPUT): New macro.
13602 (no_cr_read): New function.
13603
13604 Scan UCNs, even though we don't fully handle them yet.
13605 (convert_ucn_to_byte): New function.
13606
13607 Handle backslash-newline correctly in C code.
13608 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13609 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13610 all uses changed.
13611 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13612 Use {splice} wherever C allows backslash-newline.
13613 YY_STEP after space, newline, vertical-tab.
13614 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
13615
13616 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13617
13618 ({int}, handle_action_dollar, handle_action_at): Check for integer
13619 overflow.
13620
13621 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13622
13623 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13624 as well as \000. Check for UCHAR_MAX, not 255.
13625 Allow \x with an arbitrary positive number of digits, as in C.
13626 Check for overflow here.
13627 Allow \? and UCNs, for compatibility with C.
13628
13629 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13630 with quote slot used by complain_at.
13631
13632 * tests/input.at: Add tests for backslash-newline, m4 quotes
13633 in symbols, long literals, and funny escapes in strings.
13634
13635 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13636 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13637 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13638 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13639 * m4/mbswidth.m4: New file, from GNU coreutils.
13640
13641 * doc/bison.texinfo (Grammar Outline): Document // comments.
13642 (Symbols): Document that trigraphs have no special meaning in Bison,
13643 nor is backslash-newline allowed.
13644 (Actions): Document that trigraphs have no special meaning.
13645
13646 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13647 no longer used.
13648
13649 2002-11-02 Paul Eggert <eggert@twinsun.com>
13650
13651 * src/reader.c: Don't include quote.h; not needed.
13652 (get_merge_function): Reword warning to be consistent with
13653 type clash diagnostic in grammar_current_rule_check.
13654
13655 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13656 bug in trigraph handling.
13657
13658 * src/output.c (prepare_symbols): When printing token names,
13659 escape "[" as "@<:@" and likewise for "]".
13660
13661 * src/system.h (errno): Remove declaration, as we are now
13662 assuming C89 or better, and C89 guarantees errno.
13663
13664 2002-10-30 Paul Eggert <eggert@twinsun.com>
13665
13666 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13667 Check for close failures.
13668 * src/files.h (xfclose): Return void, not int, since it always
13669 returned zero.
13670 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13671 indicates one.
13672 * src/output.c (output_skeleton): Use xfclose rather than fclose
13673 and ferror. xfclose now checks ferror.
13674
13675 * data/glr.c (YYLEFTMOST_STATE): Remove.
13676 (yyreportTree): Use a stack-based leftmost state. This avoids
13677 our continuing battles with bogus warnings about initializers.
13678
13679 2002-10-30 Akim Demaille <akim@epita.fr>
13680
13681 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13682 #if.
13683
13684 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13685
13686 * tests/glr-regr1.at: New test for reported regressions.
13687 * tests/testsuite.at: Add glr-regr1.at test.
13688 * tests/Makefile.am: Add glr-regr1.at test.
13689
13690 2002-10-24 Paul Eggert <eggert@twinsun.com>
13691
13692 Version 1.75a.
13693
13694 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13695 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13696 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13697 Don't assume strdup exists; POSIX says its an XSI extension.
13698 Check for buffer overflow on input.
13699
13700 2002-10-24 Akim Demaille <akim@epita.fr>
13701
13702 * src/output.c (output_skeleton): Don't disable M4sugar comments
13703 too soon: it results in comments being expanded.
13704 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13705 first output.
13706
13707 2002-10-24 Akim Demaille <akim@epita.fr>
13708
13709 * data/yacc.c (m4_int_type): New.
13710 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13711 char' as only yacc.c wants K&R portability.
13712 * data/glr.c (yysigned_char): Remove.
13713 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13714 Reported by Quoc Peyrot.
13715
13716 2002-10-23 Paul Eggert <eggert@twinsun.com>
13717
13718 * src/main.c (main): With --trace=time, report times even if a
13719 non-fatal error occurs. Formerly, the times were reported in some
13720 such cases but not in others.
13721 * src/reader.c (reader): Just return if a complaint has been issued,
13722 instead of exiting, so that 'main' can report times.
13723
13724 2002-10-22 Akim Demaille <akim@epita.fr>
13725
13726 * src/system.h: Include sys/types.
13727 Reported by Bert Deknuydt.
13728
13729 2002-10-23 Paul Eggert <eggert@twinsun.com>
13730
13731 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13732 Suggested by Art Haas.
13733
13734 2002-10-22 Paul Eggert <eggert@twinsun.com>
13735
13736 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13737 decl; not needed any more.
13738 * src/main.c (main): Use return to exit, undoing yesterday's change.
13739 The last OS that we could find where this wouldn't work is
13740 SunOS 3.5, and that's too old to worry about now.
13741
13742 * data/glr.c (struct yyltype): Define members even when not
13743 doing locations. This is more consistent with yacc.c, and it
13744 works around the following bug reports:
13745 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13746 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
13747
13748 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13749 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13750 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13751
13752 2002-10-22 Akim Demaille <akim@epita.fr>
13753
13754 * data/README: New.
13755
13756 2002-10-21 Paul Eggert <eggert@twinsun.com>
13757
13758 Be consistent about 'bool'; the old code used an enum in one
13759 module and an int in another, and this violates the C standard.
13760 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13761 * configure.ac (AC_HEADER_STDBOOL): Add.
13762 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13763 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13764 * src/symtab.c (hash_compare_symbol_t): Likewise.
13765 * src/system.h (bool, false, true): Use a definition consistent
13766 with ../lib/hash.c. All uses changed.
13767
13768 * src/complain.c (warning_issued): Renamed from warn_message_count,
13769 so that we needn't worry about integer overflow (!).
13770 Now of type bool. All uses changed.
13771 (complaint_issued): Renamed from complain_message_count; likewise.
13772
13773 * src/main.c (main): Use exit to exit with failure.
13774
13775 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13776 rather than 1 and 0.
13777 * src/main.c (main): Likewise.
13778 * src/getargs.c (getargs): Likewise.
13779 * src/reader.c (reader): Likewise.
13780
13781 * src/getarg.c (getargs): Remove duplicate code for
13782 "Try `bison --help'".
13783
13784 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13785 What was that "2" for?
13786
13787 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13788 * src/getargs.c (usage): Likewise.
13789
13790 * src/getargs.c (getargs): When there are too few operands, report
13791 the last one. When there are too many, report the first extra
13792 one. This is how diffutils does it.
13793
13794 2002-10-20 Paul Eggert <eggert@twinsun.com>
13795
13796 Remove K&R vestiges.
13797 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13798 * src/complain.c (VA_START): Remove. Assume prototypes.
13799 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13800 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13801 fatal): Assume prototypes.
13802 * src/complain.h: Assume prototypes.
13803 * src/system.h (PARAMS): Remove.
13804 Include <limits.h> unconditionally, since it's guaranteeed even
13805 for a freestanding C89 compiler.
13806 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13807 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
13808
13809 2002-10-20 Akim Demaille <akim@epita.fr>
13810
13811 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13812 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13813 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13814 (yyresolveStates, yyresolveAction, yyresolveStack)
13815 (yyprocessOneStack): Use them.
13816 (yy_reduce_print): New.
13817 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13818
13819 2002-10-20 Akim Demaille <akim@epita.fr>
13820
13821 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13822 arguments and output `void'.
13823 (b4_c_function): Rename as...
13824 (b4_c_function_def): this.
13825 (b4_c_function_decl, b4_c_ansi_function_def)
13826 (b4_c_ansi_function_decl): New.
13827 Change the interpretation of the arguments: before `int, foo', now
13828 `int foo, foo'.
13829 * data/yacc.c (yyparse): Prototype and define thanks to these.
13830 Adjust b4_c_function_def uses.
13831 * data/glr.c (yyparse): Likewise, but ANSI only.
13832
13833 2002-10-20 Akim Demaille <akim@epita.fr>
13834
13835 * src/output.c (prepare): Move the definition of `tokens_number',
13836 `nterms_number', `undef_token_number', `user_token_number_max'
13837 to...
13838 (prepare_tokens): Here.
13839 (prepare_tokens): Rename as...
13840 (prepare_symbols): this.
13841 (prepare): Move the definition of `rules_number' to...
13842 (prepare_rules): here.
13843 (prepare): Move the definition of `last', `final_state_number',
13844 `states_number' to...
13845 (prepare_states): here.
13846 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
13847
13848 2002-10-20 Akim Demaille <akim@epita.fr>
13849
13850 * src/tables.h, src/tables.c, src/output.c: Comment changes.
13851
13852 2002-10-20 Akim Demaille <akim@epita.fr>
13853
13854 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
13855 * data/c.m4: here.
13856
13857 2002-10-20 Akim Demaille <akim@epita.fr>
13858
13859 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
13860 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
13861 `pair'.
13862 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
13863 `name' to...
13864 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
13865 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
13866 These.
13867
13868 2002-10-19 Paul Eggert <eggert@twinsun.com>
13869
13870 Do not create a temporary file, as that involves security and
13871 cleanup headaches. Instead, use a pair of pipes.
13872 Derived from a suggestion by Florian Krohm.
13873 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
13874 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
13875 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
13876 (BISON_PREREQ_SUBPIPE): Add.
13877 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
13878 Add subpipe.h, subpipe.c.
13879 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
13880 * po/POTFILES.in: Add lib/subpipe.c.
13881 * src/output.c: Include "subpipe.h".
13882 (m4_invoke): Remove decl.
13883 (scan_skel): New decl.
13884 (output_skeleton): Use pipe rather than temporary file for m4 input.
13885 Check that m4sugar.m4 is readable, to avoid deadlock.
13886 Check for pipe I/O error.
13887 * src/scan-skel.l (readpipe): Remove decl.
13888 (scan_skel): New function, to be used in place of m4_invoke.
13889 Read from stream rather than file.
13890
13891 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
13892 float, as this generates a warning on Solaris 8 + GCC 3.2 with
13893 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
13894 this generates a more-accurate value anyway.
13895
13896 * lib/timevar.c (timervar_accumulate): Rename locals to
13897 avoid confusion with similarly-named more-global.
13898 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
13899
13900 * src/output.c (prepare): Use xstrdup to convert char const *
13901 to char *, to avoid GCC warning.
13902
13903 2002-10-19 Akim Demaille <akim@epita.fr>
13904
13905 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
13906 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
13907 Use them to have `calc.y' ready for %pure-parser.
13908 * data/yacc.c (YYLEX): Pass a yylex return type to
13909 b4_c_function_call.
13910
13911 2002-10-19 Akim Demaille <akim@epita.fr>
13912
13913 Prototype support of %lex-param and %parse-param.
13914
13915 * src/parse-gram.y: Add the definition of the %lex-param and
13916 %parse-param tokens, plus their rules.
13917 Drop the `_' version of %glr-parser.
13918 Add the "," token.
13919 * src/scan-gram.l (INITIAL): Scan them.
13920 * src/muscle_tab.c: Comment changes.
13921 (muscle_insert, muscle_find): Rename `pair' as `probe'.
13922 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
13923 (muscle_entry_s): The `value' member is no longer const.
13924 Adjust all dependencies.
13925 * src/muscle_tab.c (muscle_init): Adjust: use
13926 MUSCLE_INSERT_STRING.
13927 Initialize the obstack earlier.
13928 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
13929 (muscle_pair_list_grow): New.
13930 * data/c.m4 (b4_c_function_call, b4_c_args): New.
13931 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
13932 * tests/calc.at: Use %locations, not --locations.
13933 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
13934
13935 2002-10-19 Akim Demaille <akim@epita.fr>
13936
13937 * src/getargs.c (usage): Take status as argument and exit
13938 accordingly.
13939 Report the traditional `Try ... --help' message when status != 0.
13940 (usage, version): Don't take a FILE * as arg, it is pointless.
13941 (getargs): When there is an incorrect number of arguments, make it
13942 an error, and report it GNUlically thanks to `usage ()'.
13943
13944 2002-10-18 Paul Eggert <eggert@twinsun.com>
13945
13946 * data/glr.c (yyreportParseError): Don't assume that sprintf
13947 yields the length of the printed string, as this is not true
13948 on SunOS 4.1.4. Reported by Peter Klein.
13949
13950 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
13951 * tests/conflicts.at (%nonassoc and eof): Likewise.
13952 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
13953
13954 2002-10-17 Akim Demaille <akim@epita.fr>
13955
13956 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
13957 * src/getargs.c (trace_types, trace_args): Adjust.
13958 * src/reader.c (grammar_current_rule_prec_set)
13959 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
13960 Standardize error messages.
13961 And s/@prec/%prec/!
13962 (reader): Use trace_flag to enable scanner/parser debugging,
13963 instead of an adhoc scheme.
13964 * src/scan-gram.l: Remove trailing debugging code.
13965
13966 2002-10-16 Paul Eggert <eggert@twinsun.com>
13967
13968 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
13969 MUSCLE_TAB_H.
13970
13971 * NEWS: Officially drop support for building Bison with K&R C,
13972 since it didn't work anyway and it's not worth worrying about.
13973 * Makefile.maint (wget_files): Remove ansi2knr.c.
13974 (ansi2knr.c-url_prefix): Remove.
13975 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
13976 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13977 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13978
13979 2002-10-15 Paul Eggert <eggert@twinsun.com>
13980
13981 Stop using the "enum_" trick for K&R-style function definitions;
13982 it confused me, and I was the author! Instead, assume that people
13983 who want to use K&R C compilers (when using these modules in GCC,
13984 perhaps?) will run ansi2knr.
13985
13986 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
13987 All uses of "enum_" changed to "enum ".
13988 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13989 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13990
13991 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
13992 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
13993 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
13994 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
13995 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
13996 abitset_not, abitset_ones, abitset_or, abitset_or_and,
13997 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
13998 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
13999 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14000 Use function prototypes; this removes the need for declaring
14001 static functions simply to provide their prototypes.
14002 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14003 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14004 bitset_count_, bitset_create, bitset_dump, bitset_first,
14005 bitset_free, bitset_init, bitset_last, bitset_next,
14006 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14007 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14008 bitset_print, bitset_release_memory, bitset_toggle_,
14009 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14010 debug_bitset): Likewise.
14011 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14012 * lib/bitset_stats.c (bitset_log_histogram_print,
14013 bitset_percent_histogram_print, bitset_stats_and,
14014 bitset_stats_and_cmp, bitset_stats_and_or,
14015 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14016 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14017 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14018 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14019 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14020 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14021 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14022 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14023 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14024 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14025 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14026 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14027 bitset_stats_zero): Likewise.
14028 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14029 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14030 bitsetv_dump, debug_bitsetv): Likewise.
14031 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14032 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14033 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14034 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14035 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14036 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14037 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14038 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14039 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14040 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14041 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14042 Likewise.
14043 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14044 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14045 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14046 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14047 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14048 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14049 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14050 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14051 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14052 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14053 lbitset_xor_cmp, lbitset_zero): Likewise.
14054
14055 2002-10-14 Akim Demaille <akim@epita.fr>
14056
14057 Version 1.75.
14058
14059 2002-10-14 Akim Demaille <akim@epita.fr>
14060
14061 * tests/Makefile.am (maintainer-check-posix): New.
14062
14063 2002-10-14 Akim Demaille <akim@epita.fr>
14064
14065 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14066 member.
14067
14068 2002-10-14 Akim Demaille <akim@epita.fr>
14069
14070 * src/tables.c (table_ninf_remap): base -> tab.
14071 Reported by Matt Rosing.
14072
14073 2002-10-14 Paul Eggert <eggert@twinsun.com>
14074
14075 * tests/action.at, tests/calc.at, tests/conflicts.at,
14076 tests/cxx-type.at, tests/headers.at, tests/input.at,
14077 tests/regression.at, tests/synclines.at, tests/torture.at:
14078 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14079 so that the tests still work even if POSIXLY_CORRECT is set.
14080 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14081
14082 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14083 for portability to K&R hosts. Fix typo: signed char is guaranteed
14084 only to 127, not to 128.
14085 * data/glr.c (yysigned_char): New type.
14086 * data/yacc.c (yysigned_char): Likewise.
14087 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14088
14089 2002-10-13 Paul Eggert <eggert@twinsun.com>
14090
14091 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14092 true due to limited range of data type" warning from GCC.
14093
14094 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14095 by wrapping enum yytokentype's definition inside #ifndef
14096 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14097
14098 2002-10-13 Akim Demaille <akim@epita.fr>
14099
14100 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14101 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14102
14103 2002-10-13 Akim Demaille <akim@epita.fr>
14104
14105 * Makefile.maint: Update from Autoconf 2.54.
14106 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14107
14108 2002-10-13 Akim Demaille <akim@epita.fr>
14109
14110 * src/print.c (print_state): Separate the list of solved conflicts
14111 from the other items.
14112 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14113
14114 2002-10-13 Akim Demaille <akim@epita.fr>
14115
14116 Let nondeterministic skeletons be usable with deterministic
14117 tables.
14118
14119 With the patch, GAWK compiled by GCC without -O2 passes its test
14120 suite using a GLR parser driven by LALR tables. It fails with -O2
14121 because `struct stat' gives two different answers on my machine:
14122 88 (definition of an auto var) and later 96 (memset on this var).
14123 Hence the stack is badly corrumpted. The headers inclusion is to
14124 blame: if I move the awk.h inclusion before GLR's system header
14125 inclusion, the two struct stat have the same size.
14126
14127 * src/tables.c (pack_table): Always create conflict_table.
14128 (token_actions): Always create conflict_list.
14129 * data/glr.c (YYFLAG): Remove, unused.
14130
14131 2002-10-13 Akim Demaille <akim@epita.fr>
14132
14133 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14134 (O0FLAGS): New.
14135 (VALGRIND, GXX): New.
14136 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14137 * tests/bison.in: Run $PREBISON a pre-command.
14138 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14139 (maintainer-check-g++): New.
14140 * Makefile.am (maintainer-check): New.
14141
14142 2002-10-13 Akim Demaille <akim@epita.fr>
14143
14144 * data/glr.c: Formatting changes.
14145 Tweak some trace messages to match yacc.c's.
14146
14147 2002-10-13 Akim Demaille <akim@epita.fr>
14148
14149 GLR parsers sometimes raise parse errors instead of performing the
14150 default reduction.
14151 Reported by Charles-Henry de Boysson.
14152
14153 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14154 check the length of the traces when %glr.
14155 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14156 GLR's traces.
14157 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14158 Test GLR parsers.
14159 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14160 (yyltype): Remove the yy prefix from the member names.
14161 (yytable): Complete its comment.
14162 (yygetLRActions): Map error action number from YYTABLE from
14163 YYTABLE_NINF to 0.
14164 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14165 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14166 not satisfying as we could compare an YYACTION computed from
14167 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14168 only value for error actions.
14169 (yyreportParseError): In verbose parse error messages, don't issue
14170 `error' in the list of expected tokens.
14171 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14172 next action to perform to match glr.c's decoding.
14173 (yytable): Complete its comment.
14174
14175 2002-10-13 Paul Eggert <eggert@twinsun.com>
14176
14177 Fix problem reported by Henrik Grubbstroem in
14178 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14179 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14180 because the Bison parser reads the second action before reducing
14181 the first one.
14182 * src/scan-gram.l (rule_length): New static var.
14183 Use it to keep track of the rule length in the scanner, since
14184 we can't expect the parser to be in lock-step sync with the scanner.
14185 (handle_action_dollar, handle_action_at): Use this var.
14186 * tests/actions.at (Exotic Dollars): Test for the problem.
14187
14188 2002-10-12 Paul Eggert <eggert@twinsun.com>
14189
14190 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14191 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14192 Include <sys/time.h> when checking for clock_t and struct tms.
14193 Use same include order as source.
14194 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14195 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14196
14197 * lib/timevar.c: Update copyright date and clarify comments.
14198 (get_time) [IN_GCC]: Keep the GCC version for reference.
14199
14200 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14201 GCC version as of today, then merge Bison's changes.
14202 Change "GCC" to "Bison" in copyright notice. timevar.def's
14203 author is Akim, so change that too.
14204
14205 * src/reader.c (grammar_current_rule_check):
14206 Don't worry about the default action if $$ is untyped.
14207 Prevents bogus warnings reported by Jim Gifford in
14208 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14209
14210 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14211 * data/glr.c, data/lalr1.cc, data/yacc.c:
14212 Output token definitions before the first part of user declarations.
14213 Fixes compatibility problem reported by Jim Gifford for kbd in
14214 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14215
14216 2002-10-11 Paul Eggert <eggert@twinsun.com>
14217
14218 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14219 (yyparse): here. This undoes some of the 2002-07-25 change.
14220 Compatibility problem reported by Ralf S. Engelschall with
14221 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14222
14223 2002-10-11 Akim Demaille <akim@epita.fr>
14224
14225 * tests/regression.at Characters Escapes): New.
14226 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14227 characters.
14228 Reported by Jan Nieuwenhuizen.
14229
14230 2002-10-11 Akim Demaille <akim@epita.fr>
14231
14232 * po/id.po: New.
14233
14234 2002-10-10 Paul Eggert <eggert@twinsun.com>
14235
14236 Portability fixes for bitsets; this also avoids several GCC
14237 warnings.
14238
14239 * lib/abitset.c: Include <stddef.h>, for offsetof.
14240 * lib/lbitset.c: Likewise.
14241
14242 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14243 properly for vectors of objects. Do not assume that adding a
14244 header size to a multiple of a word size yields a value that is
14245 properly aligned for the whole union.
14246 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14247
14248 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14249 unique names for structures.
14250 * lib/ebitset.c (ebitset_bytes): Likewise.
14251 * lib/lbitset.c (lbitset_bytes): Likewise.
14252
14253 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14254 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14255 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14256 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14257 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14258 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14259 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14260 to improve the type-checking that GCC can do.
14261 * lib/bitset.c (bitset_op4_cmp): Likewise.
14262 * lib/bitset_stats.c (bitset_stats_count,
14263 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14264 bitset_stats_copy, bitset_stats_disjoint_p,
14265 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14266 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14267 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14268 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14269 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14270 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14271 bitset_stats_or_and_cmp): Likewise.
14272 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14273 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14274 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14275 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14276
14277 * lib/abitset.h: Include bitset.h, not bbitset.h.
14278 * lib/ebitset.h: Likewise.
14279 * lib/lbitset.h: Likewise.
14280
14281 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14282 All instances of parameters of type enum bitset_opts are now of
14283 type enum_bitset_opts, to conform to the C Standard, and similarly
14284 for enum_bitset_type.
14285 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14286 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14287
14288 Do not use "struct bitset_struct" to mean different things in
14289 different modules. Not only is this confusing, it violates
14290 the C Standard, which requires that structure types in different
14291 modules must be compatible if one is to be passed to the other.
14292 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14293 All instances of "struct bitset_struct *" replaced with "bitset".
14294 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14295 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14296 struct lbitset_struct, struct bitset_stats_struct): New types.
14297 All uses of struct bitset_struct changed to union bitset_union,
14298 etc.
14299 * lib/abitset.c (struct abitset_struct, abitset,
14300 struct bitset_struct): Remove.
14301 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14302 struct bitset_struct): Remove.
14303 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14304 bitset_struct): Remove.
14305 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14306 Likewise.
14307
14308 Do not call a function of type T using a call that assumes the
14309 function is of a different type U. Standard C requires that a
14310 function must be called with a type that is compatible with its
14311 definition.
14312 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14313 New decls.
14314 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14315 New functions.
14316 * lib/ebitset.c (PFV): Remove.
14317 * lib/lbitset.c (PFV): Likewise.
14318 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14319 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14320 decls.
14321 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14322 (ebitset_vtable): Use them.
14323 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14324 lbitset_xor): New functions.
14325 (lbitset_vtable): Use them.
14326
14327 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14328 Declare.
14329
14330 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14331 GCC warning.
14332 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14333 Use offsetof, for simplicity.
14334
14335 2002-10-06 Paul Eggert <eggert@twinsun.com>
14336
14337 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14338 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14339 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14340 which was inadvertently undone by the 2002-09-30 patch.
14341 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14342 the same width as int.
14343
14344 2002-10-04 Paul Eggert <eggert@twinsun.com>
14345
14346 Version 1.50.
14347
14348 * configure.ac (AC_INIT), NEWS: Increment version number.
14349
14350 * doc/bison.texinfo: Minor spelling, grammar, and white space
14351 fixes.
14352 (Symbols): Mention that any negative value returned from yylex
14353 signifies end-of-input. Warn about negative chars. Mention
14354 the portable Standard C character set.
14355
14356 The GNU coding standard says CFLAGS and YFLAGS are reserved
14357 for the installer to set.
14358 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14359 * src/Makefile.am (AM_CFLAGS): Likewise.
14360 (AM_YFLAGS): Renamed from YFLAGS.
14361
14362 Fix some MAX and MIN problems.
14363 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14364 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14365 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14366 * src/reader.c (reader): Use it.
14367
14368 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14369 POSIX 1003.1-2001 has removed fgrep.
14370
14371 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14372
14373 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14374 interpreted as signed.
14375 * lib/ebitset.c (ebitset_list): Fix bug.
14376
14377 2002-10-01 Paul Eggert <eggert@twinsun.com>
14378
14379 More fixes for 64-bit hosts and large bitsets.
14380
14381 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14382 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14383 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14384 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14385 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14386 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14387 bitset_count_): Likewise.
14388 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14389 bitset_first, bitset_last): Likewise.
14390 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14391 bitset_stats_list_reverse, bitset_stats_size,
14392 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14393 Likewise.
14394 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14395 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14396 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14397 bitsetv_reflexive_transitive_closure): Likewise.
14398 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14399 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14400 Likewise.
14401 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14402 Likewise.
14403
14404 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14405 Use size_t, not unsigned int, to count bytes.
14406 * lib/abitset.h (abitset_bytes): Likewise.
14407 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14408 Likewise.
14409 * lib/bitset.h (bitset_bytes): Likewise.
14410 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14411 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14412 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14413 * lib/ebitset.c (ebitset_bytes): Likewise.
14414 * lib/ebitset.h (ebitset_bytes): Likewise.
14415 * lib/lbitset.c (lbitset_bytes): Likewise.
14416 * lib/lbitset.h (lbitset_bytes): Likewise.
14417
14418 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14419 abitset_subset_p, abitset_disjoint_p, abitset_and,
14420 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14421 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14422 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14423 abitset_or_and, abitset_or_and_cmp):
14424 Use bitset_windex instead of unsigned int.
14425 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14426 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14427 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14428 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14429 Likewise.
14430 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14431
14432 * lib/bitset.c (bitset_print):
14433 Use proper printf formats for widths of integer types.
14434 * lib/bitset_stats.c (bitset_percent_histogram_print,
14435 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14436 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14437 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14438 * lib/lbitset.c (lbitset_bytes): Likewise.
14439
14440 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14441 BITSET_SIZE_MAX): New macros.
14442 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14443 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14444 to BITSET_WINDEX_MAX.
14445
14446 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14447 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14448 since we now return the bitset_bindex type (not int).
14449
14450 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14451 when computing sizes.
14452 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14453
14454 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14455 and avoid cast to unsigned.
14456
14457 2002-09-30 Akim Demaille <akim@epita.fr>
14458
14459 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14460 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14461 Updates from Michael Hayes.
14462
14463 2002-09-30 Art Haas <ahaas@neosoft.com>
14464
14465 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14466 invocations.
14467 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14468 defined.
14469
14470 2002-09-27 Akim Demaille <akim@epita.fr>
14471
14472 Version 1.49c.
14473
14474 2002-09-27 Akim Demaille <akim@epita.fr>
14475
14476 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14477 (Because of AC_LIBSOURCE).
14478
14479 2002-09-27 Akim Demaille <akim@epita.fr>
14480
14481 Playing with Autoscan.
14482
14483 * configure.ac: Remove the old LIBOBJ tweaks.
14484 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14485 * lib/strrchr.c: New.
14486 * lib/strtol.c: New, from the Coreutils 4.5.1.
14487
14488 2002-09-27 Akim Demaille <akim@epita.fr>
14489
14490 Playing with Autoscan.
14491
14492 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14493 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14494 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14495 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14496 Coreutils 4.5.1.
14497
14498 2002-09-24 Akim Demaille <akim@epita.fr>
14499
14500 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14501 (Frequently Asked Questions, Parser Stack Overflow): New.
14502
14503 2002-09-13 Akim Demaille <akim@epita.fr>
14504
14505 Playing with autoscan.
14506
14507 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14508 * src/files.c (skeleton_find): Remove, unused.
14509 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14510 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14511
14512 2002-09-13 Akim Demaille <akim@epita.fr>
14513
14514 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14515 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14516
14517 2002-09-13 Akim Demaille <akim@epita.fr>
14518
14519 * configure.ac: Require 2.54.
14520 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14521 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14522 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14523 Remove, provided by Autoconf macros.
14524
14525 2002-09-12 Akim Demaille <akim@epita.fr>
14526
14527 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14528
14529 2002-09-12 Akim Demaille <akim@epita.fr>
14530
14531 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14532 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14533 Reported by Martin Mokrejs.
14534
14535 2002-09-10 Akim Demaille <akim@epita.fr>
14536
14537 * src/parse-gram.y: Associate a human readable string to each
14538 token type.
14539 * tests/regression.at (Invalid inputs): Adjust.
14540
14541 2002-09-10 Gary V. Vaughan <gary@gnu.org>
14542
14543 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14544 with an Autoconf-2.5x style configure.ac.
14545
14546 2002-09-06 Paul Eggert <eggert@twinsun.com>
14547
14548 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14549 exception applies only to yacc.c. This is a modification of a
14550 patch originally suggested by Akim Demaille.
14551
14552 2002-09-06 Akim Demaille <akim@epita.fr>
14553
14554 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14555 here to...
14556 * data/yacc.c: here.
14557
14558 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14559 LocationType.
14560 (b4_ltype): Default to yy::Location from location.hh.
14561
14562 2002-09-04 Jim Meyering <jim@meyering.net>
14563
14564 * data/yacc.c: Guard the declaration of yytoknum also with
14565 `#ifdef YYPRINT', so it is declared only when used.
14566
14567 2002-09-04 Akim Demaille <akim@epita.fr>
14568
14569 * configure.in: Rename as...
14570 * configure.ac: this.
14571 Bump to 1.49c.
14572
14573 2002-09-04 Akim Demaille <akim@epita.fr>
14574
14575 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14576 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14577 translate maintainer only messages.
14578
14579 2002-08-12 Paul Eggert <eggert@twinsun.com>
14580
14581 Version 1.49b.
14582
14583 * Makefile.am (SUBDIRS): Remove intl.
14584 (DISTCLEANFILES): Remove.
14585 * NEWS: Mention that GNU M4 is now required. Clarify what is
14586 meant by "larger grammars". Mention the pt_BR translation.
14587 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14588 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14589 Bump version from 0.11.2 to 0.11.5.
14590 (BISON_PREREQ_STAGE): Remove.
14591 (AM_GNU_GETTEXT): Use external gettext.
14592 (AC_OUTPUT): Remove intl/Makefile.
14593
14594 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14595
14596 * data/glr.c: Include string.h, for strlen.
14597 (yyreportParseError): Use size_t for yysize.
14598 (yy_yypstack): No longer nested inside yypstates, as nested
14599 functions are not portable. Do not assume size_t is the
14600 same width as int.
14601 (yypstates): Do not assume that ptrdiff_t is the same width
14602 as int, and similarly for yyposn and YYINDEX.
14603
14604 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14605
14606 * lib/Makefile.am (INCLUDES): Do not include from the intl
14607 directory, which has been removed.
14608 * src/Makefile.am (INCLUDES): Likewise.
14609
14610 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14611 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14612 New vars.
14613
14614 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14615 * tests/Makefile.am (EXTRA_DIST): Likewise.
14616
14617 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14618 Do not assume that bitset_windex is the same width as unsigned.
14619
14620 * lib/abitset.c (abitset_unused_clear): Do not assume that
14621 bitset_word is the same width as int.
14622 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14623 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14624 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14625 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14626 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14627
14628 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14629 portability to one's complement hosts!).
14630 * lib/ebitset.c (ebitset_op1): Likewise.
14631 * lib/lbitset.c (lbitset_op1): Likewise.
14632
14633 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14634 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14635 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14636 Sync with fileutils.
14637 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14638 lib/gettext.h: Sync with diffutils.
14639
14640 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14641 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14642
14643 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14644 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14645 check for void *.
14646
14647 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14648 size_t; the old version tried to do this but casted improperly.
14649 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14650 (bitset_test): Now returns int, not unsigned long.
14651
14652 * lib/bitset_stats.c: Include "gettext.h".
14653 (_): New macro.
14654 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14655 name locals "index", as it generates unnecessary warnings on some
14656 hosts that have an "index" function.
14657
14658 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14659 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14660 they need translation.
14661 * src/LR0.c (state_list_append, new_itemsets, get_state,
14662 append_states, generate_states): Likewise.
14663 * src/assoc.c (assoc_to_string): Likewise.
14664 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14665 * src/gram.c (grammar_dump): Likewise.
14666 * src/injections.c (injections_compute): Likewise.
14667 * src/lalr.c (lookaheads_print): Likewise.
14668 * src/relation.c (relation_transpose): Likewise.
14669 * src/scan-gram.l: Likewise.
14670 * src/tables.c (table_grow, pack_vector): Likewise.
14671
14672 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14673 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14674 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14675 * m4/mbstate_t.m4: Sync with fileutils.
14676 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14677
14678 * po/LINGUAS: Add pt_BR.
14679 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14680 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14681 lib/timevar.c.
14682 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14683 manual recommends.
14684 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14685
14686 * src/complain.c (strerror_r): Remove decl; not needed.
14687 (strerror): Use same pattern as ../lib/error.c.
14688
14689 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14690
14691 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14692
14693 * src/main.c (main): Cast result of bindtextdomain and textdomain
14694 to void, to avoid a GCC warning when --disable-nls is in effect.
14695
14696 * src/scan-gram.l: Use strings rather than escapes when possible,
14697 to minimize the number of warnings from xgettext.
14698 (handle_action_dollar, handle_action_at): Don't use isdigit,
14699 as it mishandles negative chars and it may not work as expected
14700 outside the C locale.
14701
14702 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14703 this is a GCC extension and is not portable to other compilers.
14704
14705 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14706 Do not include <ctype.h>; no longer needed.
14707 Do not include <malloc.h>; no longer needed (and generates
14708 warnings on OpenBSD 3.0).
14709
14710 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14711 it's not portable.
14712
14713 * tests/regression.at: Do not use 'cc -c input.c -o input';
14714 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14715
14716 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14717 exit status as failure, not just exit status 1. Sun C exits
14718 with status 2 sometimes.
14719
14720 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14721 Use it for the two large tests.
14722
14723 2002-08-02 Akim Demaille <akim@epita.fr>
14724
14725 * src/conflicts.c (conflicts_output): Don't output rules never
14726 reduced here, since anyway that computation doesn't work.
14727 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14728 (rule_useless_p, rule_never_reduced_p): New.
14729 (grammar_rules_partial_print): Use a filter instead of a range.
14730 Display the title only if needed.
14731 (grammar_rules_print): Adjust.
14732 (grammar_rules_never_reduced_report): New.
14733 * src/tables.c (action_row): Move the computation of rules never
14734 reduced to...
14735 (token_actions): here.
14736 * src/main.c (main): Make the parser before making the report, so
14737 that rules never reduced are computed.
14738 Call grammar_rules_never_reduced_report.
14739 * src/print.c (print_results): Report rules never reduced.
14740 * tests/conflicts.at, tests/reduce.at: Adjust.
14741
14742 2002-08-01 Akim Demaille <akim@epita.fr>
14743
14744 Instead of attaching lookaheads and duplicating the rules being
14745 reduced by a state, attach the lookaheads to the reductions.
14746
14747 * src/state.h (state_t): Remove the `lookaheads',
14748 `lookaheads_rule' member.
14749 (reductions_t): Add a `lookaheads' member.
14750 Use a regular array for the `rules'.
14751 * src/state.c (reductions_new): Initialize the lookaheads member
14752 to 0.
14753 (state_rule_lookaheads_print): Adjust.
14754 * src/state.h, src/state.c (state_reductions_find): New.
14755 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14756 (count_rr_conflicts): Adjust.
14757 * src/lalr.c (LArule): Remove.
14758 (add_lookback_edge): Adjust.
14759 (state_lookaheads_count): New.
14760 (states_lookaheads_initialize): Merge into...
14761 (initialize_LA): this.
14762 (lalr_free): Adjust.
14763 * src/main.c (main): Don't free nullable and derives too early: it
14764 is used by --verbose.
14765 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14766
14767 2002-08-01 Akim Demaille <akim@epita.fr>
14768
14769 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14770 `rule_number_t**'.
14771 (set_derives, free_derives): Rename as...
14772 (derives_compute, derives_free): this.
14773 Adjust all dependencies.
14774 * src/nullable.c (set_nullable, free_nullable): Rename as...
14775 (nullable_compute, nullable_free): these.
14776 (rule_list_t): Store rule_t *, not rule_number_t.
14777 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14778 pointers, instead of their numbers.
14779 * src/main.c (main): Call nullable_free, and derives_free earlier,
14780 as they were lo longer used.
14781
14782 2002-08-01 Akim Demaille <akim@epita.fr>
14783
14784 * lib/timevar.c (get_time): Include children time.
14785 * src/lalr.h (LA, LArule): Don't export them: used with the
14786 state_t.
14787 * src/lalr.c (LA, LArule): Static.
14788 * src/lalr.h, src/lalr.c (lalr_free): New.
14789 * src/main.c (main): Call it.
14790 * src/tables.c (pack_vector): Check whether loc is >= to the
14791 table_size, not >.
14792 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14793 (tables_generate): do it, since that's also it which allocates
14794 them.
14795 Don't free LA and LArule, main does.
14796
14797 2002-07-31 Akim Demaille <akim@epita.fr>
14798
14799 Separate parser tables computation and output.
14800
14801 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14802 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14803 (yydefgoto, yydefact, high): Move to...
14804 * src/tables.h, src/tables.c: here.
14805 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14806 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14807 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14808 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14809 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14810 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14811 (action_row, save_row, token_actions, save_column, default_goto)
14812 (goto_actions, sort_actions, matching_state, pack_vector)
14813 (table_ninf_remap, pack_table, prepare_actions): Move to...
14814 * src/tables.c: here.
14815 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14816 * src/output.c (token_actions, output_base, output_conflicts)
14817 (output_check): Merge into...
14818 (prepare_actions): this.
14819 (actions_output): Rename as...
14820 (user_actions_output): this.
14821 * src/main.c (main): Call tables_generate and tables_free.
14822
14823 2002-07-31 Akim Demaille <akim@epita.fr>
14824
14825 Steal GCC's --time-report support.
14826
14827 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14828 stolen/adjusted from GCC.
14829 * m4/stage.m4: Remove time related checks.
14830 * m4/timevar.m4: New.
14831 * configure.in: Adjust.
14832 * src/system.h: Adjust to using timevar.h.
14833 * src/getargs.h, src/getargs.c: Support trace_time for
14834 --trace=time.
14835 * src/main.c (stage): Remove.
14836 (main): Replace `stage' invocations with timevar calls.
14837 * src/output.c: Insert pertinent timevar calls.
14838
14839 2002-07-31 Akim Demaille <akim@epita.fr>
14840
14841 Let --trace have arguments.
14842
14843 * src/getargs.h (enum trace_e): New.
14844 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
14845 (long_options, short_options): --trace/-T takes an optional
14846 argument.
14847 Change all the uses of trace_flag to reflect the new flags.
14848 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
14849
14850 Strengthen `stage' portability.
14851
14852 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
14853 * configure.in: Use it.
14854 Don't check for malloc.h and sys/times.h.
14855 * src/system.h: Include them when appropriate.
14856 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
14857 times and struct tms are available.
14858
14859 2002-07-30 Akim Demaille <akim@epita.fr>
14860
14861 In verbose parse error message, don't report `error' as an
14862 expected token.
14863 * tests/actions.at (Printers and Destructors): Adjust.
14864 * tests/calc.at (Calculator $1): Adjust.
14865 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
14866 error message, do not report the parser accepts the error token in
14867 that state.
14868
14869 2002-07-30 Akim Demaille <akim@epita.fr>
14870
14871 Normalize conflict related messages.
14872
14873 * src/complain.h, src/complain.c (warn, complain): New.
14874 * src/conflicts.c (conflicts_print): Use them.
14875 (conflict_report_yacc): New, extracted from...
14876 (conflicts_print): here.
14877 * tests/conflicts.at, tests/existing.at: Adjust.
14878
14879 2002-07-30 Akim Demaille <akim@epita.fr>
14880
14881 Report rules which are never reduced by the parser: those hidden
14882 by conflicts.
14883
14884 * src/LR0.c (save_reductions): Don't make the final state too
14885 different: save its reduction (accept) instead of having a state
14886 without any action (no shift or goto, no reduce).
14887 Note: the final state is now a ``regular'' state, i.e., the
14888 parsers now contain `reduce 0' as default reduction.
14889 Nevertheless, since they decide to `accept' when yystate =
14890 final_state, they still will not reduce rule 0.
14891 * src/print.c (print_actions, print_reduction): Adjust.
14892 * src/output.c (action_row): Track reduced rules.
14893 (token_actions): Report rules never reduced.
14894 * tests/conflicts.at, tests/regression.at: Adjust.
14895
14896 2002-07-30 Akim Demaille <akim@epita.fr>
14897
14898 `stage' was accidently included in a previous patch.
14899 Initiate its autoconfiscation.
14900
14901 * configure.in: Look for malloc.h and sys/times.h.
14902 * src/main.c (stage): Adjust.
14903 Report only when trace_flag.
14904
14905 2002-07-29 Akim Demaille <akim@epita.fr>
14906
14907 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
14908 state_number_t.
14909 (errs_t): symbol_t*, not symbol_number_t.
14910 (reductions_t): rule_t*, not rule_number_t.
14911 (FOR_EACH_SHIFT): New.
14912 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
14913 * src/print.c, src/print_graph.c: Adjust.
14914
14915 2002-07-29 Akim Demaille <akim@epita.fr>
14916
14917 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
14918
14919 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
14920 (endtoken, accept): these.
14921 * src/reader.c (reader): Set endtoken's default tag to "$end".
14922 Set undeftoken's tag to "$undefined" instead of "$undefined.".
14923 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
14924 Adjust.
14925
14926 2002-07-29 Akim Demaille <akim@epita.fr>
14927
14928 * src/reduce.c (reduce_grammar): When the language is empty,
14929 complain about the start symbol, not the axiom.
14930 Use its location.
14931 * tests/reduce.at (Empty Language): New.
14932
14933 2002-07-26 Akim Demaille <akim@epita.fr>
14934
14935 * src/reader.h, src/reader.c (gram_error): ... can't get
14936 yycontrol without making too strong assumptions on the parser
14937 itself.
14938 * src/output.c (prepare_tokens): Use the real 0th value of
14939 token_translations instead of `0'.
14940 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
14941 visible here.
14942 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
14943 for the time being: %locations ought to provide it to yyerror.
14944
14945 2002-07-25 Akim Demaille <akim@epita.fr>
14946
14947 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
14948 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
14949 * tests/regression.at (Web2c Actions): Adjust.
14950
14951 2002-07-25 Akim Demaille <akim@epita.fr>
14952
14953 Stop storing rules from 1 to nrules + 1.
14954
14955 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
14956 * src/nullable.c, src/output.c, src/print.c, src/reader.c
14957 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
14958 Iterate from 0 to nrules.
14959 Use rule_number_as_item_number and item_number_as_rule_number.
14960 Adjust to `derive' now containing possibly 0.
14961 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
14962 Handle the `- 1' part in rule numbers from/to item numbers.
14963 * src/conflicts.c (log_resolution): Fix the message which reversed
14964 shift and reduce.
14965 * src/output.c (action_row): Initialize default_rule to -1.
14966 (token_actions): Adjust.
14967 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
14968 expected output.
14969 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
14970
14971 2002-07-25 Akim Demaille <akim@epita.fr>
14972
14973 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
14974 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
14975 (b4_c_knr_arg_decl): New.
14976 * data/yacc.c: Use it to define yysymprint, yydestruct, and
14977 yyreport_parse_error.
14978
14979 2002-07-25 Akim Demaille <akim@epita.fr>
14980
14981 * data/yacc.c (yyreport_parse_error): New, extracted from...
14982 (yyparse): here.
14983 (yydestruct, yysymprint): Move above yyparse.
14984 Be K&R compliant.
14985
14986 2002-07-25 Akim Demaille <akim@epita.fr>
14987
14988 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
14989 replace...
14990 (b4_sint_type, b4_uint_type): these.
14991 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
14992 * tests/regression.at (Web2c Actions): Adjust.
14993
14994 2002-07-25 Akim Demaille <akim@epita.fr>
14995
14996 * src/gram.h (TIEM_NUMBER_MAX): New.
14997 (item_number_of_rule_number, rule_number_of_item_number): Rename
14998 as...
14999 (rule_number_as_item_number, item_number_as_rule_number): these.
15000 Adjust dependencies.
15001 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15002 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15003 (symbol_number_to_vector_number): New.
15004 (order): Of vector_number_t* type.
15005 (base_t, BASE_MAX, BASE_MIN): New.
15006 (froms, tos, width, pos, check): Of base_t type.
15007 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15008 (actrow): Of action_number_t type.
15009 (conflrow): Of unsigned int type.
15010 (table_ninf, base_ninf): New.
15011 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15012 (muscle_insert_int_table, muscle_insert_base_table)
15013 (muscle_insert_rule_number_table): New.
15014 (prepare_tokens): Output `toknum' as int_table.
15015 (action_row): Returns a rule_number_t.
15016 Use ACTION_MIN, not SHRT_MIN.
15017 (token_actions): yydefact is rule_number_t*.
15018 (table_ninf_remap): New.
15019 (pack_table): Use it for `base' and `table'.
15020 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15021 replaced with...
15022 (YYPACT_NINF, YYTABLE_NINF): these.
15023 (yypact, yytable): Compute their types instead of hard-coded
15024 `short'.
15025 * tests/regression.at (Web2c Actions): Adjust.
15026
15027 2002-07-19 Akim Demaille <akim@epita.fr>
15028
15029 * src/scan-gram.l (id): Can start with an underscore.
15030
15031 2002-07-16 Akim Demaille <akim@epita.fr>
15032
15033 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15034 Adjust all former `associativity' dependencies.
15035 * src/symtab.c (symbol_new): Default associativity is `undef', not
15036 `right'.
15037 (symbol_check_alias_consistence): Adjust.
15038
15039 2002-07-09 Akim Demaille <akim@epita.fr>
15040
15041 * doc/bison.texinfo: Properly set the ``header'' part.
15042 Use @dircategory ``GNU programming tools'' as per Texinfo's
15043 documentation.
15044 Use @copying.
15045
15046 2002-07-09 Akim Demaille <akim@epita.fr>
15047
15048 * lib/quotearg.h: Protect against multiple inclusions.
15049 * src/location.h (location_t): Add a `file' member.
15050 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15051 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15052 `error_one_per_line' support.
15053
15054 2002-07-09 Akim Demaille <akim@epita.fr>
15055
15056 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15057 * src/reader.c (lineno): Remove.
15058 Adjust all dependencies.
15059 (get_merge_function): Take a location and use complain_at.
15060 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15061 * tests/regression.at (Invalid inputs, Mixing %token styles):
15062 Adjust.
15063
15064 2002-07-09 Akim Demaille <akim@epita.fr>
15065
15066 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15067 recovery rule, and forbid extensions when --yacc.
15068 (gram_error): Use complain_at.
15069 * src/reader.c (reader): Exit if there were parse errors.
15070
15071 2002-07-09 Akim Demaille <akim@epita.fr>
15072
15073 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15074 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15075 Reported by R Blake <blakers@mac.com>.
15076
15077 2002-07-09 Akim Demaille <akim@epita.fr>
15078
15079 * data/yacc.c: Output the copyright notive in the header.
15080
15081 2002-07-03 Akim Demaille <akim@epita.fr>
15082
15083 * src/output.c (froms, tos): Are state_number_t.
15084 (save_column): sp, sp1, and sp2 are state_number_t.
15085 (prepare): Rename `final' as `final_state_number', `nnts' as
15086 `nterms_number', `nrules' as `rules_number', `nstates' as
15087 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15088 unused.
15089 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15090 * data/lalr1.cc (nsym_): Remove, unused.
15091
15092 2002-07-03 Akim Demaille <akim@epita.fr>
15093
15094 * src/lalr.h, src/lalr.c (goto_number_t): New.
15095 * src/lalr.c (goto_list_t): New.
15096 Propagate them.
15097 * src/nullable.c (rule_list_t): New.
15098 Propagate.
15099 * src/types.h: Remove.
15100
15101 2002-07-03 Akim Demaille <akim@epita.fr>
15102
15103 * src/closure.c (print_fderives): Use rule_rhs_print.
15104 * src/derives.c (print_derives): Use rule_rhs_print.
15105 (rule_list_t): New, replaces `shorts'.
15106 (set_derives): Add comments.
15107 * tests/sets.at (Nullable, Firsts): Adjust.
15108
15109 2002-07-03 Akim Demaille <akim@epita.fr>
15110
15111 * src/output.c (prepare_actions): Free `tally' and `width'.
15112 (prepare_actions): Allocate and free `order'.
15113 * src/symtab.c (symbols_free): Free `symbols'.
15114 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15115 * src/output.c (m4_invoke): Move to...
15116 * src/scan-skel.l: here.
15117 (<<EOF>>): Close yyout, and free its name.
15118
15119 2002-07-03 Akim Demaille <akim@epita.fr>
15120
15121 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15122
15123 * src/LR0.c (new_state): Merge into...
15124 (state_list_append): this.
15125 (new_states): Merge into...
15126 (generate_states): here.
15127 (set_states): Don't ensure a proper `errs' state member here, do it...
15128 * src/conflicts.c (conflicts_solve): here.
15129 * src/state.h, src/state.c: Comment changes.
15130 (state_t): Rename member `shifts' as `transitions'.
15131 Adjust all dependencies.
15132 (errs_new): For consistency, also take the values as argument.
15133 (errs_dup): Remove.
15134 (state_errs_set): New.
15135 (state_reductions_set, state_transitions_set): Assert that no
15136 previous value was assigned.
15137 (state_free): New.
15138 (states_free): Use it.
15139 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15140 temporary storage: use `errs' and `nerrs' as elsewhere.
15141 (set_conflicts): Allocate and free this `errs'.
15142
15143 2002-07-02 Akim Demaille <akim@epita.fr>
15144
15145 * lib/libiberty.h: New.
15146 * lib: Update the bitset implementation from upstream.
15147 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15148 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15149 * src/main.c: Adjust bitset stats calls.
15150
15151 2002-07-01 Paul Eggert <eggert@twinsun.com>
15152
15153 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15154 char, so that negative chars don't collide with $.
15155
15156 2002-06-30 Akim Demaille <akim@epita.fr>
15157
15158 Have the GLR tests be `warning' checked, and fix the warnings.
15159
15160 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15161 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15162 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15163 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15164 (yyaddDeferredAction): static.
15165 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15166 (yyreportParseError): yyprefix is const.
15167 yytokenp is used only when verbose.
15168 (yy__GNUC__): Replace with __GNUC__.
15169 (yypdumpstack): yyi is size_t.
15170 (yypreference): Un-yy local variables and arguments, to avoid
15171 clashes with `yyr1'. Anyway, we are not in the user name space.
15172 (yytname_size): be an int, as is compared with ints.
15173 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15174 Use them.
15175 * tests/cxx-gram.at: Use quotation to protect $1.
15176 Use AT_COMPILE to enable warnings hunts.
15177 Prototype yylex and yyerror.
15178 `Use' argc.
15179 Include `string.h', not `strings.h'.
15180 Produce and prototype stmtMerge only when used.
15181 yylex takes a location.
15182
15183 2002-06-30 Akim Demaille <akim@epita.fr>
15184
15185 We spend a lot of time in quotearg, in particular when --verbose.
15186
15187 * src/symtab.c (symbol_get): Store a quoted version of the key.
15188 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15189 Adjust all callers.
15190
15191 2002-06-30 Akim Demaille <akim@epita.fr>
15192
15193 * src/state.h (reductions_t): Rename member `nreds' as num.
15194 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15195 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15196
15197 2002-06-30 Akim Demaille <akim@epita.fr>
15198
15199 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15200 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15201 (shifts_to): Rename as...
15202 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15203 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15204 (TRANSITION_IS_DISABLED, transitions_to): these.
15205
15206 2002-06-30 Akim Demaille <akim@epita.fr>
15207
15208 * src/print.c (print_shifts, print_gotos): Merge into...
15209 (print_transitions): this.
15210 (print_transitions, print_errs, print_reductions): Align the
15211 lookaheads columns.
15212 (print_core, print_transitions, print_errs, print_state,
15213 print_grammar): Output empty lines separator before, not after.
15214 (state_default_rule_compute): Rename as...
15215 (state_default_rule): this.
15216 * tests/conflicts.at (Defaulted Conflicted Reduction),
15217 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15218 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15219
15220 2002-06-30 Akim Demaille <akim@epita.fr>
15221
15222 Display items as we display rules.
15223
15224 * src/gram.h, src/gram.c (rule_lhs_print): New.
15225 * src/gram.c (grammar_rules_partial_print): Use it.
15226 * src/print.c (print_core): Likewise.
15227 * tests/conflicts.at (Defaulted Conflicted Reduction),
15228 (Unresolved SR Conflicts): Adjust.
15229 (Unresolved SR Conflicts): Adjust and rename as...
15230 (Resolved SR Conflicts): this, as was meant.
15231 * tests/regression.at (Web2c Report): Adjust.
15232
15233 2002-06-30 Akim Demaille <akim@epita.fr>
15234
15235 * src/print.c (state_default_rule_compute): New, extracted from...
15236 (print_reductions): here.
15237 Pessimize, but clarify the code.
15238 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15239
15240 2002-06-30 Akim Demaille <akim@epita.fr>
15241
15242 * src/output.c (action_row): Let default_rule be always a rule
15243 number.
15244
15245 2002-06-30 Akim Demaille <akim@epita.fr>
15246
15247 * src/closure.c (print_firsts, print_fderives, closure):
15248 Use BITSET_EXECUTE.
15249 * src/lalr.c (lookaheads_print): Likewise.
15250 * src/state.c (state_rule_lookaheads_print): Likewise.
15251 * src/print_graph.c (print_core): Likewise.
15252 * src/print.c (print_reductions): Likewise.
15253 * src/output.c (action_row): Likewise.
15254 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15255
15256 2002-06-30 Akim Demaille <akim@epita.fr>
15257
15258 * src/print_graph.c: Use report_flag.
15259
15260 2002-06-30 Akim Demaille <akim@epita.fr>
15261
15262 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15263 to...
15264 * src/relation.h, src/relation.c (traverse, relation_digraph)
15265 (relation_print, relation_transpose): New.
15266
15267 2002-06-30 Akim Demaille <akim@epita.fr>
15268
15269 * src/state.h, src/state.c (shifts_to): New.
15270 * src/lalr.c (build_relations): Use it.
15271
15272 2002-06-30 Akim Demaille <akim@epita.fr>
15273
15274 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15275 (item_number_of_rule_number, rule_number_of_item_number): New.
15276 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15277 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15278 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15279 Propagate their use.
15280 Much remains to be done, in particular wrt `shorts' from types.h.
15281
15282 2002-06-30 Akim Demaille <akim@epita.fr>
15283
15284 * src/symtab.c (symbol_new): Initialize the `printer' member.
15285
15286 2002-06-30 Akim Demaille <akim@epita.fr>
15287
15288 * src/LR0.c (save_reductions): Remove, replaced by...
15289 * src/state.h, src/state.c (state_reductions_set): New.
15290 (reductions, errs): Rename as...
15291 (reductions_t, errs_t): these.
15292 Adjust all dependencies.
15293
15294 2002-06-30 Akim Demaille <akim@epita.fr>
15295
15296 * src/LR0.c (state_list_t, state_list_append): New.
15297 (first_state, last_state): Now symbol_list_t.
15298 (this_state): Remove.
15299 (new_itemsets, append_states, save_reductions): Take a state_t as
15300 argument.
15301 (set_states, generate_states): Adjust.
15302 (save_shifts): Remove, replaced by...
15303 * src/state.h, src/state.c (state_shifts_set): New.
15304 (shifts): Rename as...
15305 (shifts_t): this.
15306 Adjust all dependencies.
15307 * src/state.h (state_t): Remove the `next' member.
15308
15309 2002-06-30 Akim Demaille <akim@epita.fr>
15310
15311 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15312 escaped in slot 0.
15313
15314 2002-06-30 Akim Demaille <akim@epita.fr>
15315
15316 Use hash.h for the state hash table.
15317
15318 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15319 (allocate_storage): Use state_hash_new.
15320 (free_storage): Use state_hash_free.
15321 (new_state, get_state): Adjust.
15322 * src/lalr.h, src/lalr.c (states): Move to...
15323 * src/states.h (state_t): Remove the `link' member, no longer
15324 used.
15325 * src/states.h, src/states.c: here.
15326 (state_hash_new, state_hash_free, state_hash_lookup)
15327 (state_hash_insert, states_free): New.
15328 * src/states.c (state_table, state_compare, state_hash): New.
15329 * src/output.c (output_actions): Do not free states now, since we
15330 still need to know the final_state number in `prepare', called
15331 afterwards. Do it...
15332 * src/main.c (main): here: call states_free after `output'.
15333
15334 2002-06-30 Akim Demaille <akim@epita.fr>
15335
15336 * src/state.h, src/state.c (state_new): New, extracted from...
15337 * src/LR0.c (new_state): here.
15338 * src/state.h (STATE_ALLOC): Move to...
15339 * src/state.c: here.
15340 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15341 * src/state.h, src/state.c: here.
15342
15343 2002-06-30 Akim Demaille <akim@epita.fr>
15344
15345 * src/reader.c (gensym): Rename as...
15346 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15347 (getsym): Rename as...
15348 (symbol_get): this.
15349
15350 2002-06-30 Akim Demaille <akim@epita.fr>
15351
15352 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15353 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15354 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15355 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15356
15357 2002-06-30 Akim Demaille <akim@epita.fr>
15358
15359 Make the test suite pass with warnings checked.
15360
15361 * tests/actions.at (Printers and Destructors): Improve.
15362 Avoid unsigned vs. signed issues.
15363 * tests/calc.at: Don't exercise the scanner here, do it...
15364 * tests/input.at (Torturing the Scanner): here.
15365
15366 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15367
15368 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15369 reorganize first lines parallel to yacc.c.
15370
15371 2002-06-28 Akim Demaille <akim@epita.fr>
15372
15373 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15374 (b4_token_enum, b4_token_defines): New, factored from...
15375 * data/lalr1.cc, data/yacc.c, glr.c: here.
15376
15377 2002-06-28 Akim Demaille <akim@epita.fr>
15378
15379 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15380 unused variables.
15381 * src/output.c (merger_output): static.
15382
15383 2002-06-28 Akim Demaille <akim@epita.fr>
15384
15385 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15386 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15387 pacify GCC.
15388 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15389
15390 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15391
15392 Accumulated changelog for new GLR parsing features.
15393
15394 * src/conflicts.c (count_total_conflicts): Change name to
15395 conflicts_total_count.
15396 * src/conflicts.h: Ditto.
15397 * src/output.c (token_actions): Use the new name.
15398 (output_conflicts): Change conflp => conflict_list_heads, and
15399 confl => conflict_list for better readability.
15400 * data/glr.c: Use the new names.
15401 * NEWS: Add self to GLR announcement.
15402
15403 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15404
15405 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15406 Akim Demaille.
15407
15408 * data/bison.glr: Change name to glr.c
15409 * data/glr.c: Renamed from bison.glr.
15410 * data/Makefile.am: Add glr.c
15411
15412 * src/getargs.c:
15413
15414 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15415 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15416
15417 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15418
15419 * data/bison.glr: Be sure to restore the
15420 current #line when returning to the skeleton contents after having
15421 exposed the input file's #line.
15422
15423 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15424
15425 * data/bison.glr: Bring up to date with changes to bison.simple.
15426
15427 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15428
15429 * data/bison.glr: Correct definitions that use b4_prefix.
15430 Various reformatting.
15431 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15432 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15433 yytokenp argument; now part of stack.
15434 (yychar): Define to behave as documented.
15435 (yyclearin): Ditto.
15436
15437 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15438
15439 * src/reader.h: Add declaration for free_merger_functions.
15440
15441 * src/reader.c (merge_functions): New variable.
15442 (get_merge_function): New function.
15443 (free_merger_functions): New function.
15444 (readgram): Check for %prec that is not followed by a symbol.
15445 Handle %dprec and %merge declarations.
15446 (packgram): Initialize dprec and merger fields in rules array.
15447
15448 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15449 conflict_list_cnt, conflict_list_free): New variables.
15450 (table_grow): Also grow conflict_table.
15451 (prepare_rules): Output dprec and merger tables.
15452 (conflict_row): New function.
15453 (action_row): Output conflict lists for GLR parser. Don't use
15454 default reduction in conflicted states for GLR parser so that there
15455 are spaces for the conflict lists.
15456 (save_row): Also save conflict information.
15457 (token_actions): Allocate conflict list.
15458 (merger_output): New function.
15459 (pack_vector): Pack conflict table, too.
15460 (output_conflicts): New function to output yyconflp and yyconfl.
15461 (output_check): Allocate conflict_tos.
15462 (output_actions): Output conflict tables, also.
15463 (output_skeleton): Output b4_mergers definition.
15464 (prepare): Output b4_max_rhs_length definition.
15465 Use 'bison.glr' as default skeleton for GLR parsers.
15466
15467 * src/gram.c (glr_parser): New flag.
15468 (grammar_free): Call free_merger_functions.
15469
15470 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15471 all pairs of conflicting reductions, rather than just all tokens
15472 causing conflicts. Needed to size conflict tables.
15473 (conflicts_output): Modify call to count_rr_conflicts for new
15474 interface.
15475 (conflicts_print): Ditto.
15476 (count_total_conflicts): New function.
15477
15478 * src/reader.h (merger_list): New type.
15479 (merge_functions): New variable.
15480
15481 * src/lex.h (tok_dprec, tok_merge): New token types.
15482
15483 * src/gram.h (rule_s): Add dprec and merger fields.
15484 (glr_parser): New flag.
15485
15486 * src/conflicts.h (count_total_conflicts): New function.
15487
15488 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15489
15490 * doc/bison.texinfo (Generalized LR Parsing): New section.
15491 (GLR Parsers): New section.
15492 (Language and Grammar): Mention GLR parsing.
15493 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15494 Correct typo ("tge" -> "the").
15495
15496 * data/bison.glr: New skeleton for GLR parsing.
15497
15498 * tests/cxx-gram.at: New tests for GLR parsing.
15499
15500 * tests/testsuite.at: Include cxx-gram.at.
15501
15502 * tests/Makefile.am: Add cxx-gram.at.
15503
15504 * src/parse-gram.y:
15505
15506 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15507
15508 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
15509
15510 2002-06-27 Akim Demaille <akim@epita.fr>
15511
15512 * src/options.h, src/options.c: Remove.
15513 * src/getargs.c (short_options, long_options): New.
15514
15515 2002-06-27 Akim Demaille <akim@epita.fr>
15516
15517 * data/bison.simple, data/bison.c++: Rename as...
15518 * data/yacc.c, data/lalr1.cc: these.
15519 * doc/bison.texinfo (Environment Variables): Remove.
15520
15521 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15522
15523 * src/getargs.c (report_argmatch): Initialize strtok().
15524
15525 2002-06-20 Akim Demaille <akim@epita.fr>
15526
15527 * data/bison.simple (b4_symbol_actions): New, replaces...
15528 (b4_symbol_destructor, b4_symbol_printer): these.
15529 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15530 user token numbers.
15531
15532 2002-06-20 Akim Demaille <akim@epita.fr>
15533
15534 * data/bison.simple (yydestructor): Rename as...
15535 (yydestruct): this.
15536
15537 2002-06-20 Akim Demaille <akim@epita.fr>
15538
15539 * src/symtab.h, src/symtab.c (symbol_type_set)
15540 (symbol_destructor_set, symbol_precedence_set): The location is
15541 the last argument.
15542 Adjust all callers.
15543
15544 2002-06-20 Akim Demaille <akim@epita.fr>
15545
15546 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15547 internals.
15548 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15549 Takes a location.
15550 * src/symtab.h, src/symtab.c (symbol_class_set)
15551 (symbol_user_token_number_set): Likewise.
15552 Adjust all callers.
15553 Promote complain_at.
15554 * tests/input.at (Type Clashes): Adjust.
15555
15556 2002-06-20 Akim Demaille <akim@epita.fr>
15557
15558 * data/bison.simple (YYLEX): Fix the declaration when
15559 %pure-parser.
15560
15561 2002-06-20 Akim Demaille <akim@epita.fr>
15562
15563 * data/bison.simple (yysymprint): Don't print the token number,
15564 just its name.
15565 * tests/actions.at (Destructors): Rename as...
15566 (Printers and Destructors): this.
15567 Also exercise %printer.
15568
15569 2002-06-20 Akim Demaille <akim@epita.fr>
15570
15571 * data/bison.simple (YYDSYMPRINT): New.
15572 Use it to remove many of the #if YYDEBUG/if (yydebug).
15573
15574 2002-06-20 Akim Demaille <akim@epita.fr>
15575
15576 * src/symtab.h, src/symtab.c (symbol_t): printer and
15577 printer_location are new members.
15578 (symbol_printer_set): New.
15579 * src/parse-gram.y (PERCENT_PRINTER): New token.
15580 Handle its associated rule.
15581 * src/scan-gram.l: Adjust.
15582 (handle_destructor_at, handle_destructor_dollar): Rename as...
15583 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15584 * src/output.c (symbol_printers_output): New.
15585 (output_skeleton): Call it.
15586 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15587 since there are already many grammar files with a user `yyprint'.
15588 Replace the calls to YYPRINT to calls to yysymprint.
15589 * tests/calc.at: Adjust.
15590 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15591 taking advantage of parser very internal details (stack size!).
15592
15593 2002-06-20 Akim Demaille <akim@epita.fr>
15594
15595 * src/scan-gram.l: Complete the scanner with the missing patterns
15596 to pacify Flex.
15597 Use `quote' and `symbol_tag_get' where appropriate.
15598
15599 2002-06-19 Akim Demaille <akim@epita.fr>
15600
15601 * tests/actions.at (Destructors): Augment to test locations.
15602 * data/bison.simple (yydestructor): Pass it the current location
15603 if locations are enabled.
15604 Prototype only when __STDC__ or C++.
15605 Change the argument names to move into the yy name space: there is
15606 user code here.
15607
15608 2002-06-19 Akim Demaille <akim@epita.fr>
15609
15610 * data/bison.simple (b4_pure_if): New.
15611 Use it instead of #ifdef YYPURE.
15612
15613 2002-06-19 Akim Demaille <akim@epita.fr>
15614
15615 * data/bison.simple (b4_location_if): New.
15616 Use it instead of #ifdef YYLSP_NEEDED.
15617
15618 2002-06-19 Akim Demaille <akim@epita.fr>
15619
15620 Prepare @$ in %destructor, but currently don't bind it in the
15621 skeleton, as %location use is not cleaned up yet.
15622
15623 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15624 (handle_action_at): New.
15625 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15626 a braced_code_t and a location as additional arguments.
15627 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15628 unquote one when outputting `b4_dollar_dollar'.
15629 Adjust callers.
15630 * data/bison.simple (b4_eval): Remove.
15631 (b4_symbol_destructor): Adjust.
15632 * tests/input.at (Invalid @n): Adjust.
15633
15634 2002-06-19 Zack Weinberg <zack@codesourcery.com>
15635
15636 * doc/bison.texinfo: Document ability to have multiple
15637 prologue sections.
15638
15639 2002-06-18 Akim Demaille <akim@epita.fr>
15640
15641 * src/files.c (compute_base_names): When computing the output file
15642 names from the input file name, strip the directory part.
15643
15644 2002-06-18 Akim Demaille <akim@epita.fr>
15645
15646 * data/bison.simple.new: Comment changes.
15647 Reported by Andreas Schwab.
15648
15649 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15650
15651 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15652 there are no `label `yyoverflowlab' defined but not used' warnings
15653 when yyoverflow is defined.
15654
15655 2002-06-18 Akim Demaille <akim@epita.fr>
15656
15657 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15658 new member.
15659 (symbol_destructor_set): Adjust.
15660 * src/output.c (symbol_destructors_output): Output the destructor
15661 locations.
15662 Output the symbol name.
15663 * data/bison.simple (b4_symbol_destructor): Adjust.
15664
15665 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15666 and Akim Demaille <akim@epita.fr>
15667
15668 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15669 what's left on the stack when the error recovery hits EOF.
15670 * tests/actions.at (Destructors): Complete to exercise this case.
15671
15672 2002-06-17 Akim Demaille <akim@epita.fr>
15673
15674 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15675 arguments is really empty, not only equal to `[]'.
15676 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15677 member.
15678 (symbol_destructor_set): New.
15679 * src/output.c (symbol_destructors_output): New.
15680 * src/reader.h (brace_code_t, current_braced_code): New.
15681 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15682 (handle_dollar): Rename as...
15683 (handle_action_dollar): this.
15684 (handle_destructor_dollar): New.
15685 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15686 (grammar_declaration): Use it.
15687 * data/bison.simple (yystos): Is always defined.
15688 (yydestructor): New.
15689 * tests/actions.at (Destructors): New.
15690 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15691
15692 2002-06-17 Akim Demaille <akim@epita.fr>
15693
15694 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15695 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15696 rule_length only when needed.
15697 * src/output.c (actions_output, token_definitions_output): Output
15698 the full M4 block.
15699 * src/symtab.c: Don't access directly to the symbol tag, use
15700 symbol_tag_get.
15701 * src/parse-gram.y: Use symbol_list_free.
15702
15703 2002-06-17 Akim Demaille <akim@epita.fr>
15704
15705 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15706 (symbol_list_prepend, get_type_name): Move to...
15707 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15708 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15709 Adjust all callers.
15710 (symbol_list_free): New.
15711 * src/scan-gram.l (handle_dollar): Takes a location.
15712 * tests/input.at (Invalid $n): Adjust.
15713
15714 2002-06-17 Akim Demaille <akim@epita.fr>
15715
15716 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15717 (symbol_list_prepend): New.
15718 * src/parse-gram.y (%union): `list' is a new member.
15719 (symbols.1): New, replaces...
15720 (terms_to_prec.1, nterms_to_type.1): these.
15721 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15722 Take a location as additional argument.
15723 Adjust all callers.
15724
15725 2002-06-15 Akim Demaille <akim@epita.fr>
15726
15727 * src/parse-gram.y: Move %token in the declaration section so that
15728 we don't depend upon CVS Bison.
15729
15730 2002-06-15 Akim Demaille <akim@epita.fr>
15731
15732 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15733 * src/print.c (print_core): Use it.
15734
15735 2002-06-15 Akim Demaille <akim@epita.fr>
15736
15737 * src/conflicts.c (log_resolution): Accept the rule involved in
15738 the sr conflicts instead of the lookahead number that points to
15739 that rule.
15740 (flush_reduce): Accept the current lookahead vector as argument,
15741 instead of the index in LA.
15742 (resolve_sr_conflict): Accept the current number of lookahead
15743 bitset to consider for the STATE, instead of the index in LA.
15744 (set_conflicts): Adjust.
15745 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15746
15747 2002-06-15 Akim Demaille <akim@epita.fr>
15748
15749 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15750 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15751 Adjust all dependencies.
15752 * src/lalr.c (initialize_lookaheads): Split into...
15753 (states_lookaheads_count, states_lookaheads_initialize): these.
15754 (lalr): Adjust.
15755
15756 2002-06-15 Akim Demaille <akim@epita.fr>
15757
15758 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15759 out of...
15760 (grammar_rules_print): here.
15761 * src/reduce.c (reduce_output): Use it.
15762 * tests/reduce.at (Useless Rules, Reduced Automaton)
15763 (Underivable Rules): Adjust.
15764
15765 2002-06-15 Akim Demaille <akim@epita.fr>
15766
15767 Copy BYacc's nice way to report the grammar.
15768
15769 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15770 New.
15771 Don't print the rules' location, it is confusing and useless.
15772 (rule_print): Use grammar_rhs_print.
15773 * src/print.c (print_grammar): Use grammar_rules_print.
15774
15775 2002-06-15 Akim Demaille <akim@epita.fr>
15776
15777 Complete and rationalize `useless thing' warnings.
15778
15779 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15780 (symbol_tag_print): New.
15781 Use them everywhere in place of accessing directly the tag member.
15782 * src/gram.h, src/gram.c (rule_print): New.
15783 Use it where a rule used to be printed `by hand'.
15784 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15785 (reduce_grammar_tables): Report the useless rules.
15786 (reduce_print): Useless things are a warning, not an error.
15787 Report it as such.
15788 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15789 (Reduced Automaton, Underivable Rules): Adjust.
15790 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15791 * tests/conflicts.at (Unresolved SR Conflicts)
15792 (Solved SR Conflicts): Adjust.
15793
15794 2002-06-15 Akim Demaille <akim@epita.fr>
15795
15796 Let symbols have a location.
15797
15798 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15799 (getsym): Adjust.
15800 Adjust all callers.
15801 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15802 Use location_t, not int.
15803 * src/symtab.c (symbol_check_defined): Take advantage of the
15804 location.
15805 * tests/regression.at (Invalid inputs): Adjust.
15806
15807 2002-06-15 Akim Demaille <akim@epita.fr>
15808
15809 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15810 (input): Don't try to initialize yylloc here, do it in the
15811 scanner.
15812 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15813 * src/gram.h (rule_t): Change line and action_line into location
15814 and action_location, of location_t type.
15815 Adjust all dependencies.
15816 * src/location.h, src/location.c (empty_location): New.
15817 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15818 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15819 (grammar_current_rule_symbol_append)
15820 (grammar_current_rule_action_append): Expect a location as argument.
15821 * src/reader.c (grammar_midrule_action): Adjust to attach an
15822 action's location as dummy symbol location.
15823 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15824 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15825 the line numbers.
15826
15827 2002-06-14 Akim Demaille <akim@epita.fr>
15828
15829 Grammar declarations may be found in the grammar section.
15830
15831 * src/parse-gram.y (rules_or_grammar_declaration): New.
15832 (declarations): Each declaration may end with a semicolon, not
15833 just...
15834 (grammar_declaration): `"%union"'.
15835 (grammar): Branch to rules_or_grammar_declaration.
15836
15837 2002-06-14 Akim Demaille <akim@epita.fr>
15838
15839 * src/main.c (main): Invoke scanner_free.
15840
15841 2002-06-14 Akim Demaille <akim@epita.fr>
15842
15843 * src/output.c (m4_invoke): Extracted from...
15844 (output_skeleton): here.
15845 Free tempfile.
15846
15847 2002-06-14 Akim Demaille <akim@epita.fr>
15848
15849 * src/parse-gram.y (directives, directive, gram)
15850 (grammar_directives, precedence_directives, precedence_directive):
15851 Rename as...
15852 (declarations, declaration, grammar, grammar_declaration)
15853 (precedence_declaration, precedence_declarator): these.
15854 (symbol_declaration): New.
15855
15856 2002-06-14 Akim Demaille <akim@epita.fr>
15857
15858 * src/files.c (action_obstack): Remove, unused.
15859 (output_obstack): Remove it, and all its dependencies, as it is no
15860 longer needed.
15861 * src/reader.c (epilogue_set): Build the epilogue in the
15862 muscle_obstack.
15863 * src/output.h, src/output.c (muscle_obstack): Move to...
15864 * src/muscle_tab.h, src/muscle_tab.h: here.
15865 (muscle_init): Initialize muscle_obstack.
15866 (muscle_free): New.
15867 * src/main.c (main): Call it.
15868
15869 2002-06-14 Akim Demaille <akim@epita.fr>
15870
15871 * src/location.h: New, extracted from...
15872 * src/reader.h: here.
15873 * src/Makefile.am (noinst_HEADERS): Merge into
15874 (bison_SOURCES): this.
15875 Add location.h.
15876 * src/parse-gram.y: Use location_t instead of Bison's.
15877 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
15878 Use location_t instead of ints.
15879
15880 2002-06-14 Akim Demaille <akim@epita.fr>
15881
15882 * data/bison.simple, data/bison.c++: Be sure to restore the
15883 current #line when returning to the skeleton contents after having
15884 exposed the input file's #line.
15885
15886 2002-06-12 Akim Demaille <akim@epita.fr>
15887
15888 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
15889 eager.
15890 * tests/actions.at (Exotic Dollars): New.
15891
15892 2002-06-12 Akim Demaille <akim@epita.fr>
15893
15894 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
15895 ['"/] too eagerly.
15896 * tests/input.at (Torturing the Scanner): New.
15897
15898 2002-06-11 Akim Demaille <akim@epita.fr>
15899
15900 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
15901 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
15902 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
15903 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
15904 * src/reader.c (reader): Use it.
15905
15906 2002-06-11 Akim Demaille <akim@epita.fr>
15907
15908 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
15909 Adjust all callers.
15910 (scanner_last_string_free): New.
15911
15912 2002-06-11 Akim Demaille <akim@epita.fr>
15913
15914 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
15915 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
15916 (last_string, YY_OBS_FREE): New.
15917 Use them when returning an ID.
15918
15919 2002-06-11 Akim Demaille <akim@epita.fr>
15920
15921 Have Bison grammars parsed by a Bison grammar.
15922
15923 * src/reader.c, src/reader.h (prologue_augment): New.
15924 * src/reader.c (copy_definition): Remove.
15925
15926 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
15927 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
15928 (grammar_current_rule_prec_set, grammar_current_rule_check)
15929 (grammar_current_rule_symbol_append)
15930 (grammar_current_rule_action_append): Export.
15931 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
15932 (symbol_list_action_append): Remove.
15933 Hook the routines from reader.
15934 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
15935 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
15936
15937 * src/reader.c (read_declarations): Remove, unused.
15938
15939 * src/parse-gram.y: Handle the epilogue.
15940 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
15941 (grammar_start_symbol_set): this.
15942 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
15943 * src/reader.c (readgram): Remove, unused.
15944 (reader): Adjust to insert eoftoken and axiom where appropriate.
15945
15946 * src/reader.c (copy_dollar): Replace with...
15947 * src/scan-gram.h (handle_dollar): this.
15948 * src/parse-gram.y: Remove `%thong'.
15949
15950 * src/reader.c (copy_at): Replace with...
15951 * src/scan-gram.h (handle_at): this.
15952
15953 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
15954 New.
15955
15956 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
15957 time being.
15958
15959 * src/reader.h, src/reader.c (grammar_rule_end): New.
15960
15961 * src/parse.y (current_type, current_class): New.
15962 Implement `%nterm', `%token' support.
15963 Merge `%term' into `%token'.
15964 (string_as_id): New.
15965 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
15966 type name.
15967
15968 * src/parse-gram.y: Be sure to handle properly the beginning of
15969 rules.
15970
15971 * src/parse-gram.y: Handle %type.
15972 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
15973
15974 * src/parse-gram.y: More directives support.
15975 * src/options.c: No longer handle source directives.
15976
15977 * src/parse-gram.y: Fix %output.
15978
15979 * src/parse-gram.y: Handle %union.
15980 Use the prologue locations.
15981 * src/reader.c (parse_union_decl): Remove.
15982
15983 * src/reader.h, src/reader.c (epilogue_set): New.
15984 * src/parse-gram.y: Use it.
15985
15986 * data/bison.simple, data/bison.c++: b4_stype is now either not
15987 defined, then default to int, or to the contents of %union,
15988 without `union' itself.
15989 Adjust.
15990 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
15991
15992 * src/output.c (actions_output): Don't output braces, as they are
15993 already handled by the scanner.
15994
15995 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
15996 characters to themselves.
15997
15998 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
15999 that the epilogue has a proper #line.
16000
16001 * src/parse-gram.y: Handle precedence/associativity.
16002
16003 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16004 a terminal.
16005 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16006 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16007 at all to define terminals that cannot be emitted.
16008
16009 * src/scan-gram.l: Escape M4 characters.
16010
16011 * src/scan-gram.l: Working properly with escapes in user
16012 strings/characters.
16013
16014 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16015 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16016 grammar.
16017 Use more modest sizes, as for the time being the parser does not
16018 release memory, and therefore the process swallows a huge amount
16019 of memory.
16020
16021 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16022 stricter %token grammar.
16023
16024 * src/symtab.h (associativity): Add `undef_assoc'.
16025 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16026 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16027
16028 * tests/regression.at (Invalid %directive): Remove, as it is now
16029 meaningless.
16030 (Invalid inputs): Adjust to the new error messages.
16031 (Token definitions): The new grammar doesn't allow too many
16032 eccentricities.
16033
16034 * src/lex.h, src/lex.c: Remove.
16035 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16036 (copy_character, copy_string2, copy_string, copy_identifier)
16037 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16038 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16039 (parse_action): Remove.
16040 * po/POTFILES.in: Adjust.
16041
16042 2002-06-11 Akim Demaille <akim@epita.fr>
16043
16044 * src/reader.c (parse_action): Don't store directly into the
16045 rule's action member: return the action as a string.
16046 Don't require `rule_length' as an argument: compute it.
16047 (grammar_current_rule_symbol_append)
16048 (grammar_current_rule_action_append): New, eved out from
16049 (readgram): here.
16050 Remove `action_flag', `rulelength', unused now.
16051
16052 2002-06-11 Akim Demaille <akim@epita.fr>
16053
16054 * src/reader.c (grammar_current_rule_prec_set).
16055 (grammar_current_rule_check): New, eved out from...
16056 (readgram): here.
16057 Remove `xaction', `first_rhs': useless.
16058 * tests/input.at (Type clashes): New.
16059 * tests/existing.at (GNU Cim Grammar): Adjust.
16060
16061 2002-06-11 Akim Demaille <akim@epita.fr>
16062
16063 * src/reader.c (grammar_midrule_action): New, Eved out from
16064 (readgram): here.
16065
16066 2002-06-11 Akim Demaille <akim@epita.fr>
16067
16068 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16069 New.
16070 (readgram): Use them as replacement of inlined code, crule and
16071 crule1.
16072
16073 2002-06-11 Akim Demaille <akim@epita.fr>
16074
16075 * src/reader.c (grammar_end, grammar_symbol_append): New.
16076 (readgram): Use them.
16077 Make the use of `p' as local as possible.
16078
16079 2002-06-10 Akim Demaille <akim@epita.fr>
16080
16081 GCJ's parser requires the tokens to be defined before the prologue.
16082
16083 * data/bison.simple: Output the token definition before the user's
16084 prologue.
16085 * tests/regression.at (Braces parsing, Duplicate string)
16086 (Mixing %token styles): Check the output from bison.
16087 (Early token definitions): New.
16088
16089 2002-06-10 Akim Demaille <akim@epita.fr>
16090
16091 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16092 assigning twice the same user number to a token, so that we can
16093 use it in...
16094 * src/lex.c (lex): here.
16095 Also use `symbol_class_set' instead of hand written code.
16096 * src/reader.c (parse_assoc_decl): Likewise.
16097
16098 2002-06-10 Akim Demaille <akim@epita.fr>
16099
16100 * src/symtab.c, src/symtab.c (symbol_class_set)
16101 (symbol_user_token_number_set): New.
16102 * src/reader.c (parse_token_decl): Use them.
16103 Use a switch instead of ifs.
16104 Use a single argument.
16105
16106 2002-06-10 Akim Demaille <akim@epita.fr>
16107
16108 Remove `%thong' support as it is undocumented, unused, duplicates
16109 `%token's job, and creates useless e-mail traffic with people who
16110 want to know what it is, why it is undocumented, unused, and
16111 duplicates `%token's job.
16112
16113 * src/reader.c (parse_thong_decl): Remove.
16114 * src/options.c (option_table): Remove "thong".
16115 * src/lex.h (tok_thong): Remove.
16116
16117 2002-06-10 Akim Demaille <akim@epita.fr>
16118
16119 * src/symtab.c, src/symtab.c (symbol_type_set)
16120 (symbol_precedence_set): New.
16121 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16122 (value_components_used): Remove, unused.
16123
16124 2002-06-09 Akim Demaille <akim@epita.fr>
16125
16126 Move symbols handling code out of the reader.
16127
16128 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16129 (axiom): Move to...
16130 * src/symtab.h, src/symtab.c: here.
16131
16132 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16133 * src/reader.c (startval): Rename as...
16134 * src/symtab.h, src/symtab.c (startsymbol): this.
16135 * src/reader.c: Adjust.
16136
16137 * src/reader.c (symbol_check_defined, symbol_make_alias)
16138 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16139 (token_translations_init)
16140 Move to...
16141 * src/symtab.c: here.
16142 * src/reader.c (packsymbols): Move to...
16143 * src/symtab.h, src/symtab.c (symbols_pack): here.
16144 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16145 argument.
16146
16147 2002-06-03 Akim Demaille <akim@epita.fr>
16148
16149 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16150 then statements.
16151
16152 2002-06-03 Akim Demaille <akim@epita.fr>
16153
16154 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16155 structs with non literals.
16156 * src/scan-skel.l: never-interactive.
16157 * src/conflicts.c (enum conflict_resolution_e): No trailing
16158 comma.
16159 * src/getargs.c (usage): Split long literal strings.
16160 Reported by Hans Aberg.
16161
16162 2002-05-28 Akim Demaille <akim@epita.fr>
16163
16164 * data/bison.c++: Use C++ ostreams.
16165 (cdebug_): New member.
16166
16167 2002-05-28 Akim Demaille <akim@epita.fr>
16168
16169 * src/output.c (output_skeleton): Be sure to allocate enough room
16170 for `/' _and_ for `\0' in full_skeleton.
16171
16172 2002-05-28 Akim Demaille <akim@epita.fr>
16173
16174 * data/bison.c++: Catch up with bison.simple:
16175 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16176 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16177 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16178 and popping traces.
16179
16180 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16181
16182 * src/output.c (output_skeleton): Put an explicit path in front of
16183 the skeleton file name, rather than relying on the -I directory,
16184 to partially alleviate effects of having a skeleton file lying around
16185 in the current directory.
16186
16187 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16188
16189 * src/conflicts.c (log_resolution): Correct typo:
16190 obstack_printf should be obstack_fgrow1.
16191
16192 2002-05-26 Akim Demaille <akim@epita.fr>
16193
16194 * src/state.h (state_t): `solved_conflicts' is a new member.
16195 * src/LR0.c (new_state): Set it to 0.
16196 * src/conflicts.h, src/conflicts.c (print_conflicts)
16197 (free_conflicts, solve_conflicts): Rename as...
16198 (conflicts_print, conflicts_free, conflicts_solve): these.
16199 Adjust callers.
16200 * src/conflicts.c (enum conflict_resolution_e)
16201 (solved_conflicts_obstack): New, used by...
16202 (log_resolution): this.
16203 Adjust to attach the conflict resolution to each state.
16204 Complete the description with the precedence/associativity
16205 information.
16206 (resolve_sr_conflict): Adjust.
16207 * src/print.c (print_state): Output its solved_conflicts.
16208 * tests/conflicts.at (Unresolved SR Conflicts)
16209 (Solved SR Conflicts): Exercise --report=all.
16210
16211 2002-05-26 Akim Demaille <akim@epita.fr>
16212
16213 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16214 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16215 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16216 (token_number_t, item_number_as_token_number)
16217 (token_number_as_item_number, muscle_insert_token_number_table):
16218 Rename as...
16219 (symbol_number_t, item_number_as_symbol_number)
16220 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16221 these, since it is more appropriate.
16222
16223 2002-05-26 Akim Demaille <akim@epita.fr>
16224
16225 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16226 `Error:' lines.
16227 * data/bison.simple (yystos) [YYDEBUG]: New.
16228 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16229 error recovery.
16230 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16231
16232 2002-05-25 Akim Demaille <akim@epita.fr>
16233
16234 * doc/bison.texinfo (Debugging): Split into...
16235 (Tracing): this new section, its former contents, and...
16236 (Understanding): this new section.
16237 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16238 by...
16239 (report_flag): this.
16240 Adjust all dependencies.
16241 (report_args, report_types, report_argmatch): New.
16242 (usage, getargs): Report/support -r, --report.
16243 * src/options.h
16244 (struct option_table_struct): Rename as..,
16245 (struct option_table_s): this.
16246 Rename the `set_flag' member to `flag' to match with getopt_long's
16247 struct.
16248 * src/options.c (option_table): Split verbose into an entry for
16249 %verbose, and another for --verbose.
16250 Support --report/-r, so remove -r from the obsolete --raw.
16251 * src/print.c: Attach full item sets and lookaheads reports to
16252 report_flag instead of trace_flag.
16253 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16254
16255 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16256 and Paul Eggert <eggert@twinsun.com>
16257
16258 * data/bison.simple (yyparse): Correct error handling to conform to
16259 POSIX and yacc. Specifically, after syntax error is discovered,
16260 do not reduce further before shifting the error token.
16261 Clean up the code a bit by removing the labels yyerrdefault,
16262 yyerrhandle, yyerrpop.
16263 * NEWS: Document the above.
16264
16265 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16266
16267 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16268 type; it isn't always big enough, since it doesn't necessarily
16269 include non-terminals.
16270 (yytranslate): Expand definition of yy_token_number_type, so that
16271 the latter can be removed.
16272 (yy_token_number_type): Remove, only one use.
16273 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16274 don't use TokenNumberType as element type.
16275
16276 * tests/regression.at: Modify expected output to agree with change
16277 to yyr1 and yytranslate.
16278
16279 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16280
16281 * src/reader.c (parse_action): Use copy_character instead of
16282 obstack_1grow.
16283
16284 2002-05-13 Akim Demaille <akim@epita.fr>
16285
16286 * tests/regression.at (Token definitions): Prototype yylex and
16287 yyerror.
16288
16289 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16290
16291 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16292 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16293 32-bit arithmetic.
16294 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16295
16296 2002-05-07 Akim Demaille <akim@epita.fr>
16297
16298 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16299 avoid GCC warnings.
16300
16301 2002-05-07 Akim Demaille <akim@epita.fr>
16302
16303 Kill GCC warnings.
16304
16305 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16306 over the RHS of each rule.
16307 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16308 * src/state.h (state_t): Member `nitems' is unsigned short.
16309 * src/LR0.c (get_state): Adjust.
16310 * src/reader.c (packgram): Likewise.
16311 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16312 `Type'.
16313 (muscle_insert_int_table): Remove, unused.
16314 (prepare_rules): Remove `max'.
16315
16316 2002-05-06 Akim Demaille <akim@epita.fr>
16317
16318 * src/closure.c (print_firsts): Display of the symbol tags.
16319 (bitmatrix_print): Move to...
16320 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16321 here.
16322 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16323
16324 2002-05-06 Akim Demaille <akim@epita.fr>
16325
16326 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16327 hash_do_for_each.
16328
16329 2002-05-06 Akim Demaille <akim@epita.fr>
16330
16331 * src/LR0.c (new_state, get_state): Instead of using the global
16332 `kernel_size' and `kernel_base', have two new arguments:
16333 `core_size' and `core'.
16334 Adjust callers.
16335
16336 2002-05-06 Akim Demaille <akim@epita.fr>
16337
16338 * src/reader.c (packgram): No longer end `ritem' with a 0
16339 sentinel: it is not used.
16340
16341 2002-05-05 Akim Demaille <akim@epita.fr>
16342
16343 New experimental feature: display the lookaheads in the report and
16344 graph.
16345
16346 * src/print (print_core): When --trace-flag, display the rules
16347 lookaheads.
16348 * src/print_graph.c (print_core): Likewise.
16349 Swap the arguments.
16350 Adjust caller.
16351
16352 2002-05-05 Akim Demaille <akim@epita.fr>
16353
16354 * tests/torture.at (Many lookaheads): New test.
16355
16356 2002-05-05 Akim Demaille <akim@epita.fr>
16357
16358 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16359 (GENERATE_MUSCLE_INSERT_TABLE): this.
16360 (output_int_table, output_unsigned_int_table, output_short_table)
16361 (output_token_number_table, output_item_number_table): Replace with...
16362 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16363 (muscle_insert_short_table, muscle_insert_token_number_table)
16364 (muscle_insert_item_number_table): these.
16365 Adjust all callers.
16366 (prepare_tokens): Don't free `translations', since...
16367 * src/reader.h, src/reader.c (grammar_free): do it.
16368 Move to...
16369 * src/gram.h, src/gram.c (grammar_free): here.
16370 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16371 b4_translate_max.
16372
16373 2002-05-05 Akim Demaille <akim@epita.fr>
16374
16375 * src/output.c (output_unsigned_int_table): New.
16376 (prepare_rules): `i' is unsigned.
16377 `prhs', `rline', `r2' are unsigned int.
16378 Rename muscle `rhs_number_max' as `rhs_max'.
16379 Output muscles `prhs_max', `rline_max', and `r2_max'.
16380 Free rline and r1.
16381 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16382 to compute types instead of constant types.
16383 * tests/regression.at (Web2c Actions): Adjust.
16384
16385 2002-05-04 Akim Demaille <akim@epita.fr>
16386
16387 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16388 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16389 Adjust dependencies.
16390 * src/output.c (token_definitions_output): Be sure not to output a
16391 `#define 'a'' when fed with `%token 'a' "a"'.
16392 * tests/regression.at (Token definitions): New.
16393
16394 2002-05-03 Paul Eggert <eggert@twinsun.com>
16395
16396 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16397 for K&R C.
16398
16399 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16400
16401 * Makefile.am (SUBDIRS): Remove intl.
16402 (EXTRA_DIST): Add config/config.rpath.
16403
16404 2002-05-03 Akim Demaille <akim@epita.fr>
16405
16406 * data/bison.simple (m4_if): Don't output empty enums.
16407 And actually, output valid enum definitions :(.
16408
16409 2002-05-03 Akim Demaille <akim@epita.fr>
16410
16411 * configure.bat: Remove, completely obsolete.
16412 * Makefile.am (EXTRA_DIST): Adjust.
16413 Don't distribute config.rpath...
16414 * config/Makefile.am (EXTRA_DIST): Do it.
16415
16416 2002-05-03 Akim Demaille <akim@epita.fr>
16417
16418 * configure.in (GETTEXT_VERSION): New.
16419 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16420
16421 2002-05-03 Akim Demaille <akim@epita.fr>
16422
16423 * data/bison.simple (b4_token_enum): New.
16424 (b4_token_defines): Use it to output tokens both as #define and
16425 enums.
16426 Suggested by Paul Eggert.
16427 * src/output.c (token_definitions_output): Don't output spurious
16428 white spaces.
16429
16430 2002-05-03 Akim Demaille <akim@epita.fr>
16431
16432 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16433
16434 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16435
16436 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16437 Update the stack class, give a try to deque as the default container.
16438
16439 2002-05-02 Akim Demaille <akim@epita.fr>
16440
16441 * data/bison.simple (yyparse): Do not implement @$ = @1.
16442 (YYLLOC_DEFAULT): Adjust to do it.
16443 * doc/bison.texinfo (Location Default Action): Fix.
16444
16445 2002-05-02 Akim Demaille <akim@epita.fr>
16446
16447 * src/reader.c (parse_braces): Merge into...
16448 (parse_action): this.
16449
16450 2002-05-02 Akim Demaille <akim@epita.fr>
16451
16452 * configure.in (ALL_LINGUAS): Remove.
16453 * po/LINGUAS, hr.po: New.
16454
16455 2002-05-02 Akim Demaille <akim@epita.fr>
16456
16457 Remove the so called hairy (semantic) parsers.
16458
16459 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16460 * src/gram.h, src/gram.c (semantic_parser): Remove.
16461 (rule_t): Remove the guard and guard_line members.
16462 * src/lex.h (token_t): remove tok_guard.
16463 * src/options.c (option_table): Remove %guard and %semantic_parser
16464 support.
16465 * src/output.c, src/output.h (guards_output): Remove.
16466 (prepare): Adjust.
16467 (token_definitions_output): Don't output the `T'
16468 tokens (???).
16469 (output_skeleton): Don't output the guards.
16470 * src/files.c, src/files.c (attrsfile): Remove.
16471 * src/reader.c (symbol_list): Remove the guard and guard_line
16472 members.
16473 Adjust dependencies.
16474 (parse_guard): Remove.
16475 * data/bison.hairy: Remove.
16476 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16477 BISON_HAIRY.
16478
16479 2002-05-02 Akim Demaille <akim@epita.fr>
16480
16481 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16482 (parse_guard): Rename the formal argument `stack_offset' as
16483 `rule_length', which is more readable.
16484 Adjust callers.
16485 (copy_at, copy_dollar): Instead of outputting the hard coded
16486 values of $$, $n and so forth, output invocation to b4_lhs_value,
16487 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16488 Note: this patch partially drops `semantic-parser' support: it
16489 always does `rule_length - n', where semantic parsers ought to
16490 always use `-n'.
16491 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16492 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16493
16494 2002-05-02 Akim Demaille <akim@epita.fr>
16495
16496 * configure.in (AC_INIT): Bump to 1.49b.
16497 (AM_INIT_AUTOMAKE): Short invocation.
16498
16499 2002-05-02 Akim Demaille <akim@epita.fr>
16500
16501 Version 1.49a.
16502
16503 2002-05-01 Akim Demaille <akim@epita.fr>
16504
16505 * src/skeleton.h: Remove.
16506
16507 2002-05-01 Akim Demaille <akim@epita.fr>
16508
16509 * src/skeleton.h: Fix the #endif.
16510 Reported by Magnus Fromreide.
16511
16512 2002-04-26 Paul Eggert <eggert@twinsun.com>
16513
16514 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16515 Define if we define YYSTYPE and YYLTYPE, respectively.
16516 (YYCOPY): Fix [] quoting problem in the non-GCC case.
16517
16518 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
16519
16520 * src/scan-skel.l: Postprocess quadrigraphs.
16521
16522 * src/reader.c (copy_character): New function, used to output
16523 single characters while replacing `[' and `]' with quadrigraphs, to
16524 avoid troubles with M4 quotes.
16525 (copy_comment): Output characters with copy_character.
16526 (read_additionnal_code): Likewise.
16527 (copy_string2): Likewise.
16528 (copy_definition): Likewise.
16529
16530 * tests/calc.at: Exercise M4 quoting.
16531
16532 2002-04-25 Akim Demaille <akim@epita.fr>
16533
16534 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16535 between `!' and the command.
16536 Reported by Paul Eggert.
16537
16538 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
16539
16540 * tests/calc.at: Exercise prologue splitting.
16541
16542 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16543 `b4_post_prologue' instead of `b4_prologue'.
16544
16545 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16546 muscles.
16547 (output): Free pre_prologue_obstack and post_prologue_obstack.
16548 * src/files.h, src/files.c (attrs_obstack): Remove.
16549 (pre_prologue_obstack, post_prologue_obstack): New.
16550 * src/reader.c (copy_definition): Add a parameter to specify the
16551 obstack to fill, instead of using attrs_obstack unconditionally.
16552 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16553 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16554
16555 2002-04-23 Paul Eggert <eggert@twinsun.com>
16556
16557 * data/bison.simple: Remove unnecessary commentary and white
16558 space differences from 1_29-branch.
16559 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16560
16561 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16562 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16563 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16564 constructors or destructors.
16565
16566 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16567
16568 2002-04-23 Akim Demaille <akim@epita.fr>
16569
16570 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16571 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16572 location with columns.
16573 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16574 All reported by Paul Eggert.
16575
16576 2002-04-22 Akim Demaille <akim@epita.fr>
16577
16578 * src/reduce.c (dump_grammar): Move to...
16579 * src/gram.h, src/gram.c (grammar_dump): here.
16580 Be sure to separate long item numbers.
16581 Don't read the members of a rule's prec if its nil.
16582
16583 2002-04-22 Akim Demaille <akim@epita.fr>
16584
16585 * src/output.c (table_size, table_grow): New.
16586 (MAXTABLE): Remove, replace uses with table_size.
16587 (pack_vector): Instead of dying when the table is too big, grow it.
16588
16589 2002-04-22 Akim Demaille <akim@epita.fr>
16590
16591 * data/bison.simple (yyr1): Its type is that of a token number.
16592 * data/bison.c++ (r1_): Likewise.
16593 * tests/regression.at (Web2c Actions): Adjust.
16594
16595 2002-04-22 Akim Demaille <akim@epita.fr>
16596
16597 * src/reader.c (token_translations_init): 256 is now the default
16598 value for the error token, i.e., it will be assigned another
16599 number if the user assigned 256 to one of her tokens.
16600 (reader): Don't force 256 to error.
16601 * doc/bison.texinfo (Symbols): Adjust.
16602 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16603 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16604 etc. instead of 10, 20, 30 (which was used to `jump' over error
16605 (256) and undefined (2)).
16606
16607 2002-04-22 Akim Demaille <akim@epita.fr>
16608
16609 Propagate more token_number_t.
16610
16611 * src/gram.h (token_number_as_item_number)
16612 (item_number_as_token_number): New.
16613 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16614 Use it to create output_item_number_table and
16615 output_token_number_table.
16616 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16617 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16618 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16619 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16620
16621 2002-04-22 Akim Demaille <akim@epita.fr>
16622
16623 * src/output.h, src/output.c (get_lines_number): Remove.
16624
16625 2002-04-19 Akim Demaille <akim@epita.fr>
16626
16627 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16628 as Lex/Flex'.
16629 (Debugging): More details about enabling the debugging features.
16630 (Table of Symbols): Describe $$, $n, @$, and @n.
16631 Suggested by Tim Josling.
16632
16633 2002-04-19 Akim Demaille <akim@epita.fr>
16634
16635 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16636
16637 2002-04-10 Akim Demaille <akim@epita.fr>
16638
16639 * src/system.h: Rely on HAVE_LIMITS_H.
16640 Suggested by Paul Eggert.
16641
16642 2002-04-09 Akim Demaille <akim@epita.fr>
16643
16644 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16645 full stderr, and strip it according to the bison options, instead
16646 of composing the error message from different bits.
16647 This makes it easier to check for several error messages.
16648 Adjust all the invocations.
16649 Add an invocation exercising the error token.
16650 Add an invocation demonstrating a stupid error message.
16651 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16652 Adjust the tests.
16653 Error message are for stderr, not stdout.
16654
16655 2002-04-09 Akim Demaille <akim@epita.fr>
16656
16657 * src/gram.h, src/gram.c (error_token_number): Remove, use
16658 errtoken->number.
16659 * src/reader.c (reader): Don't specify the user token number (2)
16660 for $undefined, as it uselessly prevents using it.
16661 * src/gram.h (token_number_t): Move to...
16662 * src/symtab.h: here.
16663 (state_t.number): Is a token_number_t.
16664 * src/print.c, src/reader.c: Use undeftoken->number instead of
16665 hard coded 2.
16666 (Even though this 2 is not the same as above: the number of the
16667 undeftoken remains being 2, it is its user token number which
16668 might not be 2).
16669 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16670 `user_token_number_max'.
16671 Output `undef_token_number'.
16672 * data/bison.simple, data/bison.c++: Use them.
16673 Be sure to map invalid yylex return values to
16674 `undef_token_number'. This saves us from gratuitous SEGV.
16675
16676 * tests/conflicts.at (Solved SR Conflicts)
16677 (Unresolved SR Conflicts): Adjust.
16678 * tests/regression.at (Web2c Actions): Adjust.
16679
16680 2002-04-08 Akim Demaille <akim@epita.fr>
16681
16682 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16683 Adding #line.
16684 Remove the duplicate `typedefs'.
16685 (RhsNumberType): Fix the declaration and various other typos.
16686 Use __ofile__.
16687 * data/bison.simple: Use __ofile__.
16688 * src/scan-skel.l: Handle __ofile__.
16689
16690 2002-04-08 Akim Demaille <akim@epita.fr>
16691
16692 * src/gram.h (item_number_t): New, the type of item numbers in
16693 RITEM. Note that it must be able to code symbol numbers as
16694 positive number, and the negation of rule numbers as negative
16695 numbers.
16696 Adjust all dependencies (pretty many).
16697 * src/reduce.c (rule): Remove this `short *' pointer: use
16698 item_number_t.
16699 * src/system.h (MINSHORT, MAXSHORT): Remove.
16700 Include `limits.h'.
16701 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16702 (shortcpy): Remove.
16703 (MAXTABLE): Move to...
16704 * src/output.c (MAXTABLE): here.
16705 (prepare_rules): Use output_int_table to output rhs.
16706 * data/bison.simple, data/bison.c++: Adjust.
16707 * tests/torture.at (Big triangle): Move the limit from 254 to
16708 500.
16709 * tests/regression.at (Web2c Actions): Ajust.
16710
16711 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16712 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16713 passes, but produces negative #line number, once fixed, GCC is
16714 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16715 C), it passes.
16716 * src/state.h (state_h): Code input lines on ints, not shorts.
16717
16718 2002-04-08 Akim Demaille <akim@epita.fr>
16719
16720 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16721 and then the grammar.
16722
16723 2002-04-08 Akim Demaille <akim@epita.fr>
16724
16725 * src/system.h: No longer using strndup.
16726
16727 2002-04-07 Akim Demaille <akim@epita.fr>
16728
16729 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16730 * src/output.c (output_table_data): Return the longest number.
16731 (prepare_tokens): Output `token_number_max').
16732 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16733 New.
16734 Use them to define yy_token_number_type/TokenNumberType.
16735 Use this type for yytranslate.
16736 * tests/torture.at (Big triangle): Push the limit from 124 to
16737 253.
16738 * tests/regression.at (Web2c Actions): Adjust.
16739
16740 2002-04-07 Akim Demaille <akim@epita.fr>
16741
16742 * tests/torture.at (Big triangle): New.
16743 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16744 * tests/existing.at: here.
16745
16746 2002-04-07 Akim Demaille <akim@epita.fr>
16747
16748 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16749 nritems.
16750 Adjust dependencies.
16751
16752 2002-04-07 Akim Demaille <akim@epita.fr>
16753
16754 * src/reader.c: Normalize increments to prefix form.
16755
16756 2002-04-07 Akim Demaille <akim@epita.fr>
16757
16758 * src/reader.c, symtab.c: Remove debugging code.
16759
16760 2002-04-07 Akim Demaille <akim@epita.fr>
16761
16762 Rename all the `bucket's as `symbol_t'.
16763
16764 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16765 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16766 * src/symtab.c, src/symtab.h (bucket): Rename as...
16767 (symbol_t): this.
16768 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16769 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16770 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16771 (buckets_new, buckets_free, buckets_do): Rename as...
16772 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16773 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16774 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16775 (symbols_new, symbols_free, symbols_do): these.
16776
16777 2002-04-07 Akim Demaille <akim@epita.fr>
16778
16779 Use lib/hash for the symbol table.
16780
16781 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16782 EOF.
16783 * src/lex.c (lex): Set the `number' member of new terminals.
16784 * src/reader.c (bucket_check_defined, bucket_make_alias)
16785 (bucket_check_alias_consistence, bucket_translation): New.
16786 (reader, grammar_free, readgram, token_translations_init)
16787 (packsymbols): Adjust.
16788 (reader): Number the predefined tokens.
16789 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16790 for predefined tokens.
16791 * src/symtab.h (bucket): Remove all the hash table related
16792 members.
16793 * src/symtab.c (symtab): Replace by...
16794 (bucket_table): this.
16795 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16796 (buckets_new, buckets_do): New.
16797
16798 2002-04-07 Akim Demaille <akim@epita.fr>
16799
16800 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16801 (start_symbol, max_user_token_number, semantic_parser)
16802 (error_token_number): Initialize.
16803 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16804 Initialize.
16805 (reader): Don't.
16806 (errtoken, eoftoken, undeftoken, axiom): Extern.
16807
16808 2002-04-07 Akim Demaille <akim@epita.fr>
16809
16810 * src/gram.h (rule_s): prec and precsym are now pointers
16811 to the bucket giving the priority/associativity.
16812 Member `associativity' removed: useless.
16813 * src/reduce.c, src/conflicts.c: Adjust.
16814
16815 2002-04-07 Akim Demaille <akim@epita.fr>
16816
16817 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16818 Properly escape the symbols' TAG when outputting them.
16819
16820 2002-04-07 Akim Demaille <akim@epita.fr>
16821
16822 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16823
16824 2002-04-07 Akim Demaille <akim@epita.fr>
16825
16826 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16827 (LArule): this, which is an array to rule_t*.
16828 * src/print.c, src/conflicts.c: Adjust.
16829
16830 2002-04-07 Akim Demaille <akim@epita.fr>
16831
16832 * src/gram.h (rule_t): Rename `number' as `user_number'.
16833 `number' is a new member.
16834 Adjust dependencies.
16835 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16836
16837 2002-04-07 Akim Demaille <akim@epita.fr>
16838
16839 As a result of the previous patch, it is no longer needed
16840 to reorder ritem itself.
16841
16842 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
16843
16844 2002-04-07 Akim Demaille <akim@epita.fr>
16845
16846 Be sure never to walk through RITEMS, but use only data related to
16847 the rules themselves. RITEMS should be banished.
16848
16849 * src/output.c (output_token_translations): Rename as...
16850 (prepare_tokens): this.
16851 In addition to `translate', prepare the muscles `tname' and
16852 `toknum', which were handled by...
16853 (output_rule_data): this.
16854 Remove, and move the remainder of its outputs into...
16855 (prepare_rules): this new routines, which also merges content from
16856 (output_gram): this.
16857 (prepare_rules): Be sure never to walk through RITEMS.
16858 (output_stos): Rename as...
16859 (prepare_stos): this.
16860 (output): Always invoke prepare_states, after all, just don't use it
16861 in the output if you don't need it.
16862
16863 2002-04-07 Akim Demaille <akim@epita.fr>
16864
16865 * src/LR0.c (new_state): Display `nstates' as the name of the
16866 newly created state.
16867 Adjust to initialize first_state and last_state if needed.
16868 Be sure to distinguish the initial from the final state.
16869 (new_states): Create the itemset of the initial state, and use
16870 new_state.
16871 * src/closure.c (closure): Now that the initial state has its
16872 items properly set, there is no need for a special case when
16873 creating `ruleset'.
16874
16875 As a result, now the rule 0, reducing to $axiom, is visible in the
16876 outputs. Adjust the test suite.
16877
16878 * tests/conflicts.at (Solved SR Conflicts)
16879 (Unresolved SR Conflicts): Adjust.
16880 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
16881 * tests/conflicts.at (S/R in initial): New.
16882
16883 2002-04-07 Akim Demaille <akim@epita.fr>
16884
16885 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
16886 the RHS of the rules.
16887 * src/output.c (output_gram): Likewise.
16888
16889 2002-04-07 Akim Demaille <akim@epita.fr>
16890
16891 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
16892 bucket.
16893 Adjust all dependencies.
16894 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
16895 `number' of the buckets too.
16896 * src/gram.h: Include `symtab.h'.
16897 (associativity): Move to...
16898 * src/symtab.h: here.
16899 No longer include `gram.h'.
16900
16901 2002-04-07 Akim Demaille <akim@epita.fr>
16902
16903 * src/gram.h, src/gram.c (rules_rhs_length): New.
16904 (ritem_longest_rhs): Use it.
16905 * src/gram.h (rule_t): `number' is a new member.
16906 * src/reader.c (packgram): Set it.
16907 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
16908 the end of `rules', and count them out of `nrules'.
16909 (reduce_output, dump_grammar): Adjust.
16910 * src/print.c (print_grammar): It is no longer needed to check for
16911 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
16912 * tests/reduce.at (Reduced Automaton): New test.
16913
16914 2002-04-07 Akim Demaille <akim@epita.fr>
16915
16916 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
16917 lacking `+ 1' to nrules, Bison reported as useless a token if it
16918 was used solely to set the precedence of the last rule...
16919
16920 2002-04-07 Akim Demaille <akim@epita.fr>
16921
16922 * data/bison.c++, data/bison.simple: Don't output the current file
16923 name in #line, to avoid useless diffs between two identical
16924 outputs under different names.
16925
16926 2002-04-07 Akim Demaille <akim@epita.fr>
16927
16928 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
16929 Normalize loops to using `< nrules + 1', not `<= nrules'.
16930
16931 2002-04-07 Akim Demaille <akim@epita.fr>
16932
16933 * TODO: Update.
16934
16935 2002-04-07 Akim Demaille <akim@epita.fr>
16936
16937 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
16938 bucket.value as bucket.number.
16939
16940 2002-04-07 Akim Demaille <akim@epita.fr>
16941
16942 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
16943 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16944 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
16945 RHS, instead of being an index in RITEMS.
16946
16947 2002-04-04 Paul Eggert <eggert@twinsun.com>
16948
16949 * doc/bison.texinfo: Update copyright date.
16950 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
16951 (Symbols): Warn about running Bison in one character set,
16952 but compiling and/or running in an incompatible one.
16953 Warn about character code 256, too.
16954
16955 2002-04-03 Paul Eggert <eggert@twinsun.com>
16956
16957 * src/bison.data (YYSTACK_ALLOC): Depend on whether
16958 YYERROR_VERBOSE is nonzero, not whether it is defined.
16959
16960 Merge changes from bison-1_29-branch.
16961
16962 2002-03-20 Paul Eggert <eggert@twinsun.com>
16963
16964 Merge fixes from Debian bison_1.34-1.diff.
16965
16966 * configure.in (AC_PREREQ): 2.53.
16967
16968 2002-03-20 Akim Demaille <akim@epita.fr>
16969
16970 * src/conflicts.c (log_resolution): Argument `resolution' is const.
16971
16972 2002-03-19 Paul Eggert <eggert@twinsun.com>
16973
16974 * src/bison.simple (YYCOPY): New macro.
16975 (YYSTACK_RELOCATE): Use it.
16976 Remove Type arg; no longer needed. All callers changed.
16977 (yymemcpy): Remove; no longer needed.
16978
16979 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
16980 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16981
16982 2002-03-19 Akim Demaille <akim@epita.fr>
16983
16984 Test and fix the #line outputs.
16985
16986 * tests/atlocal.at (GCC): New.
16987 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
16988 (Prologue synch line, %union synch line, Postprologue synch line)
16989 (Action synch line, Epilogue synch line): New tests.
16990 * src/reader.c (parse_union_decl): Define the muscle stype_line.
16991 * data/bison.simple, data/bison.c++: Use it.
16992
16993 2002-03-19 Akim Demaille <akim@epita.fr>
16994
16995 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
16996 (Solved SR Conflicts, %expect not enough, %expect right)
16997 (%expect too much): Move to...
16998 * tests/conflicts.at: this new file.
16999
17000 2002-03-19 Akim Demaille <akim@epita.fr>
17001
17002 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17003 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17004 that we can move to enums for instance.
17005 * src/output.c (token_definitions_output): Output a list of
17006 `token-name, token-number' instead of the #define.
17007 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17008
17009 2002-03-14 Akim Demaille <akim@epita.fr>
17010
17011 Use Gettext 0.11.1.
17012
17013 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17014
17015 * data/bison.c++: Make the user able to add members to the generated
17016 parser by subclassing.
17017
17018 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17019
17020 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17021 a character.
17022 Reported by Nicolas Tisserand and Nicolas Burrus.
17023
17024 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17025
17026 * src/reader.c: Warn about lacking semi-colons, do not complain.
17027
17028 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17029
17030 * data/bison.c++: Remove a debug line.
17031
17032 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17033
17034 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17035 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17036 provide a default implementation.
17037
17038 2002-03-04 Akim Demaille <akim@epita.fr>
17039
17040 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17041 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17042 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17043 * tests/semantic.at (Parsing Guards): Similarly.
17044 * src/reader.at (readgram): Complain if the last rule is not ended
17045 with a semi-colon.
17046
17047 2002-03-04 Akim Demaille <akim@epita.fr>
17048
17049 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17050 * src/closure.c: here.
17051 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17052 RTC.
17053 * src/warshall.h, src/warshall.c: Remove.
17054 * tests/sets.at (Broken Closure): Adjust.
17055
17056 2002-03-04 Akim Demaille <akim@epita.fr>
17057
17058 * src/output.c (output_skeleton): tempdir is const.
17059 bytes_read is unused.
17060
17061 2002-03-04 Akim Demaille <akim@epita.fr>
17062
17063 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17064 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17065 Update.
17066 From Michael Hayes.
17067
17068 2002-03-04 Akim Demaille <akim@epita.fr>
17069
17070 * src/closure.c (closure): `r' is unused.
17071
17072 2002-03-04 Akim Demaille <akim@epita.fr>
17073
17074 * tests/sets.at (Broken Closure): Add the ending `;'.
17075 * src/reader.at (readgram): Complain if a rule is not ended with a
17076 semi-colon.
17077
17078 2002-03-04 Akim Demaille <akim@epita.fr>
17079
17080 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17081 (count_sr_conflicts): Use bitset_count.
17082 * src/reduce.c (inaccessable_symbols): Ditto.
17083 (bits_size): Remove.
17084 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17085
17086 2002-03-04 Akim Demaille <akim@epita.fr>
17087
17088 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17089 * src/reduce.c: Remove the `bitset_zero's following the
17090 `bitset_create's, as now it is performed by the latter.
17091
17092 2002-03-04 Akim Demaille <akim@epita.fr>
17093
17094 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17095 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17096 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17097 latest sources from Michael.
17098
17099 2002-03-04 Akim Demaille <akim@epita.fr>
17100
17101 * src/output.c (output): Don't free the grammar.
17102 * src/reader.c (grammar_free): New.
17103 * src/main.c (main): Call it and don't free symtab here.
17104
17105 2002-03-04 Akim Demaille <akim@epita.fr>
17106
17107 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17108 before returning.
17109 Reported by Benoit Perrot.
17110
17111 2002-03-04 Akim Demaille <akim@epita.fr>
17112
17113 Use bitset operations when possible, not loops over bits.
17114
17115 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17116 bitset_or.
17117 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17118 * src/reduce.c (useless_nonterminals): Formatting changes.
17119 * src/warshall.c (TC): Use bitset_or.
17120
17121 2002-03-04 Akim Demaille <akim@epita.fr>
17122
17123 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17124 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17125 Ditto.
17126
17127 2002-03-04 Akim Demaille <akim@epita.fr>
17128
17129 * src/lalr.c (F): Now a bitset*.
17130 Adjust all dependencies.
17131
17132 2002-03-04 Akim Demaille <akim@epita.fr>
17133
17134 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17135 Adjust all dependencies.
17136
17137 2002-03-04 Akim Demaille <akim@epita.fr>
17138
17139 * src/L0.c, src/LR0.h (nstates): Be size_t.
17140 Adjust comparisons (signed vs unsigned).
17141 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17142 bitset*.
17143 Adjust all dependencies.
17144
17145 2002-03-04 Akim Demaille <akim@epita.fr>
17146
17147 * src/closure.c (firsts): Now, also a bitset.
17148 Adjust all dependencies.
17149 (varsetsize): Remove, now unused.
17150 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17151
17152 2002-03-04 Akim Demaille <akim@epita.fr>
17153
17154 * src/print.c: Convert to use bitset.h, not hand coded iterations
17155 over ints.
17156
17157 2002-03-04 Akim Demaille <akim@epita.fr>
17158
17159 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17160
17161 2002-03-04 Akim Demaille <akim@epita.fr>
17162
17163 * src/closure.c (ruleset): Be a bitset.
17164 (rulesetsize): Remove.
17165
17166 2002-03-04 Akim Demaille <akim@epita.fr>
17167
17168 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17169 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17170 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17171 * src/closure.c (fderives): Be an array of bitsets.
17172
17173 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17174
17175 * data/bison.c++: Merge the two generated headers. Insert a copyright
17176 notice in each output file.
17177
17178 2002-02-28 Akim Demaille <akim@epita.fr>
17179
17180 * data/bison.c++: Copy the prologue of bison.simple to fetch
17181 useful M4 definitions, such as b4_header_guard.
17182
17183 2002-02-25 Akim Demaille <akim@epita.fr>
17184
17185 * src/getargs.c (version): Give the name of the authors, and use a
17186 translator friendly scheme for the bgr
17187 copyright notice.
17188
17189 2002-02-25 Akim Demaille <akim@epita.fr>
17190
17191 * src/output.c (header_output): Remove, now handled completely via
17192 M4.
17193
17194 2002-02-25 Akim Demaille <akim@epita.fr>
17195
17196 * m4/m4.m4: New, from CVS Autoconf.
17197 * configure.in: Invoke it.
17198 * src/output.c (output_skeleton): Use its result instead of the
17199 hard coded name.
17200
17201 2002-02-25 Akim Demaille <akim@epita.fr>
17202
17203 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17204 Fileutils 4.1.5.
17205 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17206 * src/output.c (output_skeleton): Use mkstemp to create a real
17207 temporary file.
17208 Move the filling of `skeleton' and its muscle to...
17209 (prepare): here.
17210 (output): Move the definition of the prologue muscle to...
17211 (prepare): here.
17212 * src/system.h (DEFAULT_TMPDIR): New.
17213
17214 2002-02-14 Paul Eggert <eggert@twinsun.com>
17215
17216 Remove the support for C++ namespace cleanliness; it was
17217 causing more problems than it was curing, since it didn't work
17218 properly on some nonstandard C++ compilers. This can wait
17219 for a proper C++ parser.
17220
17221 * NEWS: Document this.
17222 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17223 of C++, as it's treated like C now.
17224 * src/bison.simple (YYSTD): Remove.
17225 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17226 Treat C++ just like Standard C instead of trying to support
17227 namespace cleanliness.
17228
17229 2002-02-14 Akim Demaille <akim@epita.fr>
17230
17231 * tests/regression.at (else): Adjust to Andreas' change.
17232
17233 2002-02-14 Akim Demaille <akim@epita.fr>
17234
17235 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17236
17237 2002-02-13 Andreas Schwab <schwab@suse.de>
17238
17239 * src/output.c (output_rule_data): Don't output NULL, it might
17240 not be defined yet.
17241
17242 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17243
17244 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17245 (Copyright notice): Update.
17246
17247 2002-02-11 Akim Demaille <akim@epita.fr>
17248
17249 * tests/regression.at (%nonassoc and eof): Don't include
17250 nonportable headers.
17251
17252 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17253
17254 * data/bison.c++: Correct error recovery. Make the user able to
17255 initialize the starting location.
17256
17257 2002-02-07 Akim Demaille <akim@epita.fr>
17258
17259 * tests/input.at: New.
17260
17261 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17262
17263 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17264 more consistent when naming methods and variables. Put preprocessor
17265 directives around tables only needed for debugging.
17266
17267 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17268
17269 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17270 C++ parsers.
17271 (yy::b4_name::parse): Use print_.
17272
17273 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17274
17275 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17276
17277 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17278
17279 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17280 C++ parsers.
17281 (yy::b4_name::parse): Build verbose error messages, and use error_.
17282
17283 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17284
17285 * data/bison.c++: Fix m4 quoting in comments.
17286
17287 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17288
17289 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17290 not expanded by m4.
17291
17292 2002-02-05 Akim Demaille <akim@epita.fr>
17293
17294 * data/bison.c++: Adjust to the M4 back end.
17295 More is certainly needed.
17296
17297 2002-02-05 Akim Demaille <akim@epita.fr>
17298
17299 Give a try to M4 as a back end.
17300
17301 * lib/readpipe.c: New, from wdiff.
17302 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17303 BISON_HAIRY.
17304 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17305 specific values. Now it is m4 that performs the lookup.
17306 * src/parse-skel.y: Remove.
17307 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17308 * src/output.c (actions_output, guards_output)
17309 (token_definitions_output): No longer keeps track of the output
17310 line number, hence remove the second argument.
17311 (guards_output): Check against the guard member of a rule, not the
17312 action member.
17313 Adjust callers.
17314 (output_skeleton): Don't look for the skeleton location, let m4 do
17315 that.
17316 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17317 file will be used.
17318 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17319 (prepare): Given that for the time being changesyntax is not
17320 usable in M4, rename the muscles using `-' to `_'.
17321 Define `defines_flag', `output_parser_name' and `output_header_name'.
17322 * src/output.h (actions_output, guards_output)
17323 (token_definitions_output): Adjust prototypes.
17324 * src/scan-skel.l: Instead of scanning the skeletons, it now
17325 processes the output of m4: `__oline__' and `#output'.
17326 * data/bison.simple: Adjust to be used by M4(sugar).
17327 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17328 to date.
17329 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17330 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17331 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17332 shamelessly stolen from CVS Autoconf.
17333
17334 2002-02-05 Akim Demaille <akim@epita.fr>
17335
17336 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17337 * configure.in: Check for the declarations of free and malloc.
17338 * src/muscle_tab.c: Adjust.
17339
17340 2002-02-05 Akim Demaille <akim@epita.fr>
17341
17342 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17343 which have no values.
17344
17345 2002-02-05 Akim Demaille <akim@epita.fr>
17346
17347 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17348 * data/: here.
17349
17350 2002-01-29 Paul Eggert <eggert@twinsun.com>
17351
17352 * src/bison.simple (YYSIZE_T): Do not define merely because
17353 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17354 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17355
17356 2002-01-27 Akim Demaille <akim@epita.fr>
17357
17358 Fix `%nonassoc and eof'.
17359
17360 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17361 which were not properly copied! Replace
17362 memcpy (res->errs, src->errs, src->nerrs);
17363 with
17364 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17365 !!!
17366 * tests/regression.at (%nonassoc and eof): Adjust to newest
17367 Autotest: `.' is not in the PATH.
17368
17369 2002-01-27 Akim Demaille <akim@epita.fr>
17370
17371 * tests/sets.at (AT_EXTRACT_SETS): New.
17372 (Nullable): Use it.
17373 (Firsts): New.
17374
17375 2002-01-26 Akim Demaille <akim@epita.fr>
17376
17377 * tests/actions.at, tests/calc.at, tests/headers.at,
17378 * tests/torture.at: Adjust to the newest Autotest which no longer
17379 forces `.' in the PATH.
17380
17381 2002-01-25 Akim Demaille <akim@epita.fr>
17382
17383 * tests/regression.at (%nonassoc and eof): New.
17384 Suggested by Robert Anisko.
17385
17386 2002-01-24 Akim Demaille <akim@epita.fr>
17387
17388 Bison dumps core when trying to complain about broken input files.
17389 Reported by Cris van Pelt.
17390
17391 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17392 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17393 into...
17394 (Invalid inputs): Strengthen: exercise parse_percent_token.
17395
17396 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17397
17398 * src/Makefile.am: Add bison.c++.
17399 * src/bison.c++: New skeleton.
17400
17401 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17402
17403 * po/it.po: New.
17404
17405 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17406
17407 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17408
17409 2002-01-20 Marc Autret <marc@gnu.org>
17410
17411 * src/files.c (compute_output_file_names): Fix
17412
17413 2002-01-20 Marc Autret <marc@gnu.org>
17414
17415 * tests/output.at: New test.
17416 * src/files.c (compute_base_names): Don't map extensions when
17417 the YACC flag is set, use defaults.
17418 Reported by Evgeny Stambulchik.
17419
17420 2002-01-20 Marc Autret <marc@gnu.org>
17421
17422 * src/system.h: Need to define __attribute__ away for non-GCC
17423 compilers as well (i.e., the vendor C compiler).
17424 Suggested by Albert Chin-A-Young.
17425
17426 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17427
17428 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17429 canonical definition.
17430 * src/system.h: Use the canonical definition for PARAMS (avoids
17431 a conflict with the macro from lib/hash.h).
17432
17433 2002-01-11 Akim Demaille <akim@epita.fr>
17434
17435 * configure.in: Use AC_FUNC_STRNLEN.
17436 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17437
17438 2002-01-09 Akim Demaille <akim@epita.fr>
17439
17440 * src/files.c, src/files.h (output_infix): New.
17441 (tab_extension): Remove.
17442 (compute_base_names): Compute the former, drop the latter.
17443 * src/output.c (prepare): Insert the muscles `output-infix', and
17444 `output-suffix'.
17445 * src/parse-skel.y (string, string.1): New.
17446 (section.header): Use it.
17447 (section.yacc): Remove.
17448 (prefix): Remove too.
17449 * src/scan-skel.l: Adjust.
17450 * src/bison.simple, src/bison.hairy: Adjust.
17451
17452 2002-01-09 Akim Demaille <akim@epita.fr>
17453
17454 * configure.in (WERROR_CFLAGS): Compute it.
17455 * src/Makefile.am (CFLAGS): Pass it.
17456 * tests/atlocal.in (CFLAGS): Idem.
17457 * src/files.c: Fix a few warnings.
17458 (get_extension_index): Remove, unused.
17459
17460 2002-01-08 Akim Demaille <akim@epita.fr>
17461
17462 * src/getargs.c (AS_FILE_NAME): New.
17463 (getargs): Use it to convert DOSish file names.
17464 * src/files.c (base_name): Rename as full_base_name to avoid
17465 clashes with `base_name ()'.
17466 (filename_split): New.
17467 (compute_base_names): N-th rewrite, using filename_split.
17468
17469 2002-01-08 Akim Demaille <akim@epita.fr>
17470
17471 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17472 New, stolen from the Fileutils 4.1.
17473 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17474 * configure.in: Check for the presence of memrchr, and of its
17475 prototype.
17476
17477 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17478
17479 * lib/hash.h (__P): Added definition for this macro.
17480 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17481 BUILT_SOURCES, to ensure they are generated first.
17482 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17483 %error-verbose to allow bootstrapping with bison 1.30x.
17484
17485 2002-01-06 Akim Demaille <akim@epita.fr>
17486
17487 * src/reader.c (parse_braces): Don't fetch the next char, the
17488 convention is to fetch on entry.
17489 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17490 'switch' without a following semicolon.
17491 * tests/regression.at (braces parsing): New.
17492
17493 2002-01-06 Akim Demaille <akim@epita.fr>
17494
17495 Bison is dead wrong in its RR conflict reports.
17496
17497 * tests/torture.at (GNU Cim Grammar): New.
17498 * src/conflicts.c (count_rr_conflicts): Fix.
17499
17500 2002-01-06 Akim Demaille <akim@epita.fr>
17501
17502 Creating package.m4 from configure.ac causes too many problems.
17503
17504 * tests/Makefile.am (package.m4): Create it by hand,
17505 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17506
17507 2002-01-06 Akim Demaille <akim@epita.fr>
17508
17509 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17510 skeleton.h.
17511
17512 2002-01-04 Paul Eggert <eggert@twinsun.com>
17513
17514 * doc/bison.texinfo (Debugging):
17515 Remove YYSTDERR; it's no longer defined or used.
17516 Also, s/cstdio.h/cstdio/.
17517
17518 2002-01-03 Akim Demaille <akim@epita.fr>
17519
17520 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17521
17522 2002-01-03 Akim Demaille <akim@epita.fr>
17523
17524 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17525 tracing code to --trace, wait for a better --trace option, with
17526 args.
17527
17528 2002-01-03 Akim Demaille <akim@epita.fr>
17529
17530 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17531 The ISO C++ standard is extremely clear about it: stderr is
17532 considered a macro, not a regular symbol (see table 94 `Header
17533 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17534 Therefore std:: does not apply to it. It still does with fprintf.
17535 Also, s/cstdio.h/cstdio/.
17536
17537 2002-01-03 Akim Demaille <akim@epita.fr>
17538
17539 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17540 for non system headers.
17541
17542 2002-01-02 Akim Demaille <akim@epita.fr>
17543
17544 Equip the skeleton chain with location tracking, runtime trace,
17545 pure parser and scanner.
17546
17547 * src/parse-skel.y: Request a pure parser, locations, and prefix
17548 renaming.
17549 (%union): Having several members with the same type does not help
17550 type mismatches, simplify.
17551 (YYPRINT, yyprint): New.
17552 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17553 (skel_error): this.
17554 Handle locations.
17555 * src/scan-skel.l: Adjust to these changes.
17556 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17557 (LOCATION_PRINT, skel_control_t): New.
17558
17559 2001-12-30 Akim Demaille <akim@epita.fr>
17560
17561 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17562 replace `gb' with BLANKS.
17563 * src/scan-skel.l: Adjust.
17564
17565 2001-12-30 Akim Demaille <akim@epita.fr>
17566
17567 * src/system.h: We don't need nor want bcopy.
17568 Throw away MS-DOS crap: we don't need getpid.
17569 * configure.in: We don't need strndup. It was even causing
17570 problems: because Flex includes the headers *before* us,
17571 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17572 not visible.
17573 * lib/xstrndup.c: New.
17574 * src/scan-skel.l: Use it.
17575 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17576 * src/parse-skel.y: Use %directives instead of #defines.
17577
17578 2001-12-30 Akim Demaille <akim@epita.fr>
17579
17580 * src/skeleton.h: New.
17581 * src/output.c (output_parser, output_master_parser): Remove, dead
17582 code.
17583 * src/output.h (get_lines_number, actions_output, guards_output)
17584 (token_definitions_output): Prototype them.
17585 * src/parse-skel.y: Add the license notice.
17586 Include output.h and skeleton.h.
17587 (process_skeleton): Returns void, and takes a single parameter.
17588 * src/scan-skel.l: Add the license notice.
17589 Include skeleton.h.
17590 Don't use %option yylineno: it seems that then Flex imagines
17591 REJECT has been used, and therefore it won't reallocate its
17592 buffers (which makes no other sense to me than a bug). It results
17593 in warnings for `unused: yy_flex_realloc'.
17594
17595 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
17596
17597 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17598 (MUSCLE_INSERT_PREFIX): ...to there.
17599 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17600 (MUSCLE_INSERT_PREFIX): Move from here...
17601
17602 * src/bison.hairy: Add a section directive. Put braces around muscle
17603 names. This parser skeleton is still broken, but Bison should not
17604 choke on a bad muscle 'syntax'.
17605 * src/bison.simple: Add a section directive. Put braces around muscle
17606 names.
17607
17608 * src/files.h (strsuffix, stringappend): Add declarations.
17609 (tab_extension): Add declaration.
17610 (short_base_name): Add declaration.
17611
17612 * src/files.c (strsuffix, stringappend): No longer static. These
17613 functions are used in the skeleton parser.
17614 (tab_extension): New.
17615 (compute_base_names): Use the computations done in this function
17616 to guess if the generated parsers should have '.tab' in their
17617 names.
17618 (short_base_name): No longer static.
17619
17620 * src/output.c (output_skeleton): New.
17621 (output): Disable call to output_master_parser, and give a try to
17622 a new skeleton handling system.
17623 (guards_output, actions_output): No longer static.
17624 (token_definitions_output, get_lines_number): No longer static.
17625
17626 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17627
17628 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
17629 parse-skel.y.
17630
17631 * src/parse-skel.y: New file.
17632 * src/scan-skel.l: New file.
17633
17634 2001-12-29 Akim Demaille <akim@epita.fr>
17635
17636 %name-prefix is broken.
17637
17638 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17639 Adjust all dependencies.
17640 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17641 %name-prefix.
17642
17643 Renaming yylval but not yylloc is not consistent. Now we do.
17644
17645 * src/bison.simple: Prefix yylloc if used.
17646 * doc/bison.texinfo (Decl Summary): Document that.
17647
17648 2001-12-29 Akim Demaille <akim@epita.fr>
17649
17650 * doc/bison.texinfo: Promote `%long-directive' over
17651 `%long_directive'.
17652 Remove all references to fixed-output-files, yacc is enough.
17653
17654 2001-12-29 Akim Demaille <akim@epita.fr>
17655
17656 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17657 user prologue. These are defaults.
17658 * tests/actions.at (Mid-rule actions): Make sure the user can
17659 define YYDEBUG and YYERROR_VERBOSE.
17660
17661 2001-12-29 Akim Demaille <akim@epita.fr>
17662
17663 * src/output.c (header_output): Don't forget to export YYLTYPE and
17664 yylloc.
17665 * tests/headers.at (export YYLTYPE): New, make sure it does.
17666 * tests/regression.at (%union and --defines, Invalid CPP headers):
17667 Move to...
17668 * tests/headers.at: here.
17669
17670 2001-12-29 Akim Demaille <akim@epita.fr>
17671
17672 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17673
17674 2001-12-29 Akim Demaille <akim@epita.fr>
17675
17676 * tests/actions.at (Mid-rule actions): Output on a single line
17677 instead of several.
17678
17679 2001-12-29 Akim Demaille <akim@epita.fr>
17680
17681 * doc/bison.texinfo: Formatting changes.
17682
17683 2001-12-29 Akim Demaille <akim@epita.fr>
17684
17685 Don't store the token defs in a muscle, just be ready to output it
17686 on command. Now possible via `symbols'. Fixes a memory leak.
17687
17688 * src/output.c (token_definitions_output): New.
17689 (output_parser, header_output): Use it.
17690 * src/reader.c (symbols_save): Remove.
17691
17692 2001-12-29 Akim Demaille <akim@epita.fr>
17693
17694 * src/bison.simple: Do not provide a default for YYSTYPE and
17695 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17696 default.
17697
17698 2001-12-29 Akim Demaille <akim@epita.fr>
17699
17700 Mid-rule actions are simply... ignored!
17701
17702 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17703 the empty-rule associated to the dummy symbol, not to the host
17704 rule.
17705 * tests/actions.at (Mid-rule actions): New.
17706
17707 2001-12-29 Akim Demaille <akim@epita.fr>
17708
17709 Memory leak.
17710
17711 * src/reader.c (reader): Free grammar.
17712
17713 2001-12-29 Akim Demaille <akim@epita.fr>
17714
17715 Memory leak.
17716
17717 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17718 since it allocates it for each state, although only one is needed.
17719 (allocate_storage): Do it here.
17720
17721 2001-12-29 Akim Demaille <akim@epita.fr>
17722
17723 * src/options.h, src/options.c (create_long_option_table): Rename
17724 as...
17725 (long_option_table_new): this, with a clearer prototype.
17726 (percent_table): Remove, unused,
17727 * src/getargs.c (getargs): Adjust.
17728
17729 2001-12-29 Akim Demaille <akim@epita.fr>
17730
17731 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17732 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17733 as states.
17734
17735 2001-12-29 Akim Demaille <akim@epita.fr>
17736
17737 * src/lalr.c (build_relations): Rename `states' as `states1'.
17738 Sorry, I don't understand exactly what it is, no better name...
17739
17740 2001-12-29 Akim Demaille <akim@epita.fr>
17741
17742 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17743 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17744 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17745 as rules.
17746
17747 2001-12-29 Akim Demaille <akim@epita.fr>
17748
17749 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17750 ago.
17751
17752 2001-12-29 Akim Demaille <akim@epita.fr>
17753
17754 * src/reader.c, src/reader.h (user_toknums): Remove.
17755 Adjust all users to use symbols[i]->user_token_number.
17756
17757 2001-12-29 Akim Demaille <akim@epita.fr>
17758
17759 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17760 Adjust all users to use symbols[i]->prec or ->assoc.
17761
17762 2001-12-29 Akim Demaille <akim@epita.fr>
17763
17764 * src/reader.c, src/reader.h (tags): Remove.
17765 Adjust all users to use symbols[i]->tag.
17766
17767 2001-12-29 Akim Demaille <akim@epita.fr>
17768
17769 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17770 and rule_table.
17771 * src/reader.c (packsymbols): Fill this table.
17772 Drop sprec.
17773 * src/conflicts.c (resolve_sr_conflict): Adjust.
17774 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17775 single table.
17776 Use symbols[i]->tag instead of tags[i].
17777
17778 2001-12-29 Akim Demaille <akim@epita.fr>
17779
17780 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17781 In addition, put a comment in there, to replace...
17782 * tests/regression.at (%union and C comments): Remove.
17783
17784 2001-12-29 Akim Demaille <akim@epita.fr>
17785
17786 * tests/regression.at (Web2c Actions): Blindly move the actual
17787 output as expected output. The contents *seem* right to me, but I
17788 can't pretend reading perfectly parser tables... Nonetheless, all
17789 the other tests pass correctly, the table look OK, even though the
17790 presence of `$axiom' is to be noted: AFAICS it is useless (but
17791 harmless).
17792
17793 2001-12-29 Akim Demaille <akim@epita.fr>
17794
17795 * src/reader.c (readgram): Don't add the rule 0 if there were no
17796 rules read. In other words, add it _after_ having performed
17797 grammar sanity checks.
17798 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17799
17800 2001-12-29 Akim Demaille <akim@epita.fr>
17801
17802 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17803 visible, and some states have now a different number.
17804
17805 2001-12-29 Akim Demaille <akim@epita.fr>
17806
17807 * src/reader.c (readgram): Bind the initial rule's lineno to that
17808 of the first rule.
17809 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17810 (Solved SR Conflicts): Adjust rule 0's line number.
17811
17812 2001-12-29 Akim Demaille <akim@epita.fr>
17813
17814 Fix the `GAWK Grammar' failure.
17815
17816 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17817 the reductions of the first state which was mistakenly confused
17818 with the final state because precisely final_state was initialized
17819 to 0.
17820 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17821 now noticed by Bison.
17822 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17823 have a reduction on $default.
17824
17825 2001-12-29 Akim Demaille <akim@epita.fr>
17826
17827 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17828 rule line numbers.
17829 * src/closure.c (print_closure): Likewise.
17830 * src/derives.c (print_derives): Likewise.
17831 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17832 now.
17833
17834 2001-12-29 Akim Demaille <akim@epita.fr>
17835
17836 * src/lalr.c (lookaheads_print): New.
17837 (lalr): Call it when --trace-flag.
17838 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17839 are dumped.
17840
17841 2001-12-29 Akim Demaille <akim@epita.fr>
17842
17843 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
17844 when walking through ritem, even via rule->rhs.
17845 * src/reduce.c (dump_grammar, useful_production, reduce_output)
17846 (useful_production, useless_nonterminals): Likewise.
17847 (reduce_grammar_tables): Likewise, plus update nritems.
17848 * src/nullable.c (set_nullable): Likewise.
17849 * src/lalr.c (build_relations): Likewise.
17850 * tests/sets.at (Nullable): Adjust.
17851 Fortunately, now, the $axiom is no longer nullable.
17852
17853 2001-12-29 Akim Demaille <akim@epita.fr>
17854
17855 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
17856 the 0-sentinel.
17857 * src/gram.c (ritem_longest_rhs): Likewise.
17858 * src/reduce.c (nonterminals_reduce): Likewise.
17859 * src/print_graph.c (print_graph): Likewise.
17860 * src/output.c (output_rule_data): Likewise.
17861 * src/nullable.c (set_nullable): Likewise.
17862
17863 2001-12-29 Akim Demaille <akim@epita.fr>
17864
17865 * src/output.c: Comment changes.
17866
17867 2001-12-27 Paul Eggert <eggert@twinsun.com>
17868
17869 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
17870 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
17871 Sparc, as they were causing more porting problems than the
17872 (minor) performance improvement was worth.
17873
17874 Also, catch up with 1.31's YYSTD.
17875
17876 2001-12-27 Akim Demaille <akim@epita.fr>
17877
17878 * src/output.c (output_gram): Rely on nritems, not the
17879 0-sentinel. See below.
17880 Use -1 as separator, not 0.
17881 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
17882 Rely on -1 as separator in yyrhs, instead of 0.
17883 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
17884 twice `Now at end of input', therefore there are two lines less to
17885 expect.
17886
17887 2001-12-27 Akim Demaille <akim@epita.fr>
17888
17889 * tests/regression.at (Unresolved SR Conflicts):
17890 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
17891 below.
17892
17893 2001-12-27 Akim Demaille <akim@epita.fr>
17894
17895 * src/LR0.c (new_state): Recognize the final state by the fact it
17896 is reached by eoftoken.
17897 (insert_start_shifting_state, insert_eof_shifting_state)
17898 (insert_accepting_state, augment_automaton): Remove, since now
17899 these states are automatically computed from the initial state.
17900 (generate_states): Adjust.
17901 * src/print.c: When reporting a rule number to the user, substract
17902 1, so that the axiom rule is rule 0, and the first user rule is 1.
17903 * src/reduce.c: Likewise.
17904 * src/print_graph.c (print_core): For the time being, just as for
17905 the report, depend upon --trace-flags to dump the full set of
17906 items.
17907 * src/reader.c (readgram): Once the grammar read, insert the rule
17908 0: `$axiom: START-SYMBOL $'.
17909 * tests/set.at: Adjust: rule 0 is now displayed, and since the
17910 number of the states has changed (the final state is no longer
17911 necessarily the last), catch up.
17912
17913 2001-12-27 Akim Demaille <akim@epita.fr>
17914
17915 Try to make the use of the eoftoken valid. Given that its value
17916 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
17917 is used instead of > 0 where appropriate, (ii), depend upon nritems
17918 instead of the 0-sentinel.
17919
17920 * src/gram.h, src/gram.c (nritems): New.
17921 Expected to be duplication of nitems, but for the time being...
17922 * src/reader.c (packgram): Assert nritems and nitems are equal.
17923 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
17924 * src/closure.c (print_closure, print_fderives): Likewise.
17925 * src/gram.c (ritem_print): Likewise.
17926 * src/print.c (print_core, print_grammar): Likewise.
17927 * src/print_graph.c: Likewise.
17928
17929 2001-12-27 Akim Demaille <akim@epita.fr>
17930
17931 * src/main.c (main): If there are complains after grammar
17932 reductions, then output the report anyway if requested, then die.
17933 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
17934 * src/reader.c (eoftoken): New.
17935 (parse_token_decl): If the token being defined has value `0', it
17936 is the eoftoken.
17937 (packsymbols): No longer hack `tags' to insert `$' by hand.
17938 Be sure to preserve the value of the eoftoken.
17939 (reader): Make sure eoftoken is defined.
17940 Initialize nsyms to 0: now eoftoken is created just like the others.
17941 * src/print.c (print_grammar): Don't special case the eof token.
17942 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
17943 lie anyway, albeit pleasant.
17944 * tests/calc.at: Exercise error messages with eoftoken.
17945 Change the grammar so that empty input is invalid.
17946 Adjust expectations.
17947 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
17948
17949 2001-12-27 Akim Demaille <akim@epita.fr>
17950
17951 * configure.in: Check the protos of strchr ans strspn.
17952 Replace strchr if needed.
17953 * src/system.h: Provide the protos of strchr, strspn and memchr if
17954 missing.
17955 * lib/strchr.c: New.
17956 * src/reader.c (symbols_save): Use strchr.
17957
17958 2001-12-27 Akim Demaille <akim@epita.fr>
17959
17960 * src/print.c, src/print_graph.c (escape): New.
17961 Use it to quote the TAGS outputs.
17962 * src/print_graph.c (print_state): Now errors are in red, and
17963 reductions in green.
17964 Prefer high to wide: output the state number on a line of its own.
17965
17966 2001-12-27 Akim Demaille <akim@epita.fr>
17967
17968 * src/state.h, src/state.c (reductions_new): New.
17969 * src/LR0.c (set_state_table): Let all the states have a
17970 `reductions', even if reduced to 0.
17971 (save_reductions): Adjust.
17972 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
17973 * src/print.c (print_reductions, print_actions): Adjust.
17974 * src/output.c (action_row): Adjust.
17975
17976 2001-12-27 Akim Demaille <akim@epita.fr>
17977
17978 * src/state.h, src/state.c (errs_new, errs_dup): New.
17979 * src/LR0.c (set_state_table): Let all the states have an errs,
17980 even if reduced to 0.
17981 * src/print.c (print_errs, print_reductions): Adjust.
17982 * src/output.c (output_actions, action_row): Adjust.
17983 * src/conflicts.c (resolve_sr_conflict): Adjust.
17984
17985 2001-12-27 Akim Demaille <akim@epita.fr>
17986
17987 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
17988
17989 2001-12-27 Akim Demaille <akim@epita.fr>
17990
17991 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
17992 * src/print.c: here.
17993 (lookaheadset, shiftset): New, used as additional storage by
17994 print_reductions.
17995 (print_results): Adjust.
17996 (print_shifts, print_gotos, print_errs): New, extracted from...
17997 (print_actions): here.
17998 * src/print_graph.c (print_actions): Remove dead code.
17999
18000 2001-12-27 Akim Demaille <akim@epita.fr>
18001
18002 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18003 `$n' and `@n'.
18004
18005 2001-12-27 Akim Demaille <akim@epita.fr>
18006
18007 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18008 (build_relations): Adjust.
18009
18010 2001-12-27 Akim Demaille <akim@epita.fr>
18011
18012 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18013 duplication.
18014
18015 2001-12-27 Akim Demaille <akim@epita.fr>
18016
18017 * src/reader.c (packgram): Catch nitems overflows.
18018
18019 2001-12-27 Akim Demaille <akim@epita.fr>
18020
18021 * src/files.c, src/files.h (guard_obstack): Remove.
18022 * src/output.c (output): Adjust.
18023 * src/reader.c (parse_braces): New, factoring...
18024 (copy_action, copy_guard): these two which are renamed as...
18025 (parse_action, parse_guard): these.
18026 As a voluntary consequence, using braces around guards is now
18027 mandatory.
18028
18029 2001-12-27 Akim Demaille <akim@epita.fr>
18030
18031 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18032 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18033 members.
18034 (symbol_list_new): Adjust.
18035 (copy_action): action_line is the first line, not the last.
18036 (copy_guard): Just as for actions, store the `action' only, not
18037 the switch/case/break flesh.
18038 Don't parse the user action that might follow the guard, let...
18039 (readgram): do it, i.e., now, there can be an action after a
18040 guard.
18041 In other words the guard is just explicitly optional.
18042 (packgram): Adjust.
18043 * src/output.c (guards_output): New.
18044 (output_parser): Call it when needed.
18045 (output): Also free the guard and attrs obstacks.
18046 * src/files.c, src/files.h (obstack_save): Remove.
18047 (output_files): Remove.
18048 As a result, if one needs the former `.act' file, using an
18049 appropriate skeleton which requires actions and guards is now
18050 required.
18051 * src/main.c (main): Adjust.
18052 * tests/semantic.at: New.
18053 * tests/regression.at: Use `input.y' as input file name.
18054 Avoid 8+3 problems by requiring input.c when the test needs the
18055 parser.
18056
18057 2001-12-27 Akim Demaille <akim@epita.fr>
18058
18059 * src/reader.c (symbol_list_new): Be sure to initialize all the
18060 fields.
18061
18062 2001-12-27 Akim Demaille <akim@epita.fr>
18063
18064 All the hacks using a final pseudo state are now useless.
18065
18066 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18067 * src/lalr.c (nLA): New.
18068 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18069 instead of lookaheadsp from the pseudo state (nstate + 1).
18070
18071 2001-12-27 Akim Demaille <akim@epita.fr>
18072
18073 * src/output.c (action_row, token_actions): Use a state_t instead
18074 of a integer, and nlookaheads instead of the following state's
18075 lookaheadsp.
18076
18077 2001-12-27 Akim Demaille <akim@epita.fr>
18078
18079 * src/conflicts.c (log_resolution, flush_shift)
18080 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18081 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18082 (conflicts_print, print_reductions): Use a state_t instead of an
18083 integer when referring to a state.
18084 As much as possible, depend upon nlookaheads, instead of the
18085 `lookaheadsp' member of the following state (since lookaheads of
18086 successive states are successive, the difference between state n + 1
18087 and n served as the number of lookaheads for state n).
18088 * src/lalr.c (add_lookback_edge): Likewise.
18089 * src/print.c (print_core, print_actions, print_state)
18090 (print_results): Likewise.
18091 * src/print_graph.c (print_core, print_actions, print_state)
18092 (print_graph): Likewise.
18093 * src/conflicts.h: Adjust.
18094
18095 2001-12-27 Akim Demaille <akim@epita.fr>
18096
18097 * src/bison.hairy: Formatting/comment changes.
18098 ANSIfy.
18099 Remove `register' indications.
18100 Add plenty of `static'.
18101
18102 2001-12-27 Akim Demaille <akim@epita.fr>
18103
18104 * src/output.c (prepare): Drop the muscle `ntbase' which
18105 duplicates ntokens.
18106 * src/bison.simple: Formatting/comment changes.
18107 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18108 is an undocumented synonym.
18109
18110 2001-12-22 Akim Demaille <akim@epita.fr>
18111
18112 * src/output.c (output_table_data): Change the prototype to use
18113 `int' for array ranges: some invocations do pass an int, not a
18114 short.
18115 Reported by Wayne Green.
18116
18117 2001-12-22 Akim Demaille <akim@epita.fr>
18118
18119 Some actions of web2c.y are improperly triggered.
18120 Reported by Mike Castle.
18121
18122 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18123 * tests/regression.at (Web2c): Rename as...
18124 (Web2c Report): this.
18125 (Web2c Actions): New.
18126
18127 2001-12-22 Akim Demaille <akim@epita.fr>
18128
18129 Reductions in web2c.y are improperly reported.
18130 Reported by Mike Castle.
18131
18132 * src/conflicts.c (print_reductions): Fix.
18133 * tests/regression.at (Web2c): New.
18134
18135 2001-12-18 Akim Demaille <akim@epita.fr>
18136
18137 Some host fail on `assert (!"foo")', which expands to
18138 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18139 Reported by Nelson Beebee.
18140
18141 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18142 `#define it_succeeded 0' and `assert (it_succeeded)'.
18143
18144 2001-12-17 Marc Autret <autret_m@epita.fr>
18145
18146 * src/bison.simple: Don't hard code the skeleton line and filename.
18147 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18148 New line counter 'skeleton_line' (skeleton-line muscle).
18149
18150 2001-12-17 Paul Eggert <eggert@twinsun.com>
18151
18152 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18153 YYDEBUG must be defined to a nonzero value.
18154
18155 * src/bison.simple (yytname): Do not assume that the user defines
18156 YYDEBUG to a properly parenthesized expression.
18157
18158 2001-12-17 Akim Demaille <akim@epita.fr>
18159
18160 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18161 nlookaheads is a new member.
18162 Adjust all users.
18163 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18164 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18165 state.
18166
18167 2001-12-17 Akim Demaille <akim@epita.fr>
18168
18169 * src/files.h, src/files.c (open_files, close_files): Remove.
18170 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18171 let...
18172 * src/reader.c (reader): Do it.
18173
18174 2001-12-17 Akim Demaille <akim@epita.fr>
18175
18176 * src/conflicts.c (print_reductions): Formatting changes.
18177
18178 2001-12-17 Akim Demaille <akim@epita.fr>
18179
18180 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18181 (flush_reduce): New.
18182 (resolve_sr_conflict): Adjust.
18183
18184 2001-12-17 Akim Demaille <akim@epita.fr>
18185
18186 * src/output.c (output_obstack): Be static and rename as...
18187 (format_obstack): this, to avoid any confusion with files.c's
18188 output_obstack.
18189 * src/reader.h (muscle_obstack): Move to...
18190 * src/output.h: here, since it's defined in output.c.
18191
18192 2001-12-17 Akim Demaille <akim@epita.fr>
18193
18194 * src/output.c (action_row, save_column, default_goto)
18195 (sort_actions, matching_state, pack_vector): Better variable
18196 locality.
18197
18198 2001-12-17 Akim Demaille <akim@epita.fr>
18199
18200 * src/output.c: Various formatting changes.
18201
18202 2001-12-17 Akim Demaille <akim@epita.fr>
18203
18204 * src/files.c (output_files): Free the output_obstack.
18205 * src/main.c (main): Call print and print_graph conditionally.
18206 * src/print.c (print): Work unconditionally.
18207 * src/print_graph.c (print_graph): Work unconditionally.
18208 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18209
18210 2001-12-16 Marc Autret <autret_m@epita.fr>
18211
18212 * src/output.c (actions_output): Fix. When we use %no-lines,
18213 there is one less line per action.
18214
18215 2001-12-16 Marc Autret <autret_m@epita.fr>
18216
18217 * src/bison.simple: Remove a useless #line directive.
18218 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18219 * src/output.c (get_lines_number): New.
18220 (output_parser): Adjust, now takes care about the lines of a
18221 output muscles.
18222 Fix line numbering.
18223 (actions_output): Computes the number of lines taken by actions.
18224 (output_master_parser): Insert new skeleton which is the name of
18225 the output parser file name.
18226
18227 2001-12-15 Marc Autret <autret_m@epita.fr>
18228
18229 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18230
18231 2001-12-15 Marc Autret <autret_m@epita.fr>
18232
18233 * src/output.c (output_gram): Keep track of the hairy one.
18234
18235 2001-12-15 Akim Demaille <akim@epita.fr>
18236
18237 Make `make distcheck' work.
18238
18239 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18240 system.h which uses libgettext.h.
18241
18242 2001-12-15 Akim Demaille <akim@epita.fr>
18243
18244 * src/nullable.c (set_nullable): Useless rules must be skipped,
18245 otherwise, since we range over their symbols, we might look at a
18246 nonterminal which no longer ``exists'', i.e., it is not counted in
18247 `nvars', hence we overflow our arrays.
18248
18249 2001-12-15 Akim Demaille <akim@epita.fr>
18250
18251 The header can also be produced directly, without any obstack!
18252 Yahoo!
18253
18254 * src/files.c, src/files.h (defines_obstack): Remove.
18255 (compute_header_macro): Global.
18256 (defines_obstack_save): Remove.
18257 * src/reader.c (parse_union_decl): No longer output to
18258 defines_obstack: its content can be found in the `stype' muscle
18259 anyway.
18260 (output_token_translations): Merge into...
18261 (symbols_output): this.
18262 Rename as...
18263 (symbols_save): this.
18264 (reader): Adjust.
18265 * src/output.c (header_output): New.
18266 (output): Call it.
18267
18268 2001-12-15 Akim Demaille <akim@epita.fr>
18269
18270 * src/reader.c (parse_union_decl): Instead of handling two obstack
18271 simultaneously, use one to define the `stype' muscle, and use the
18272 value of the latter to fill defines_obstack.
18273 (copy_comment): Remove.
18274 (copy_comment2): Work for a single obstack.
18275 Rename as...
18276 (copy_comment): this.
18277
18278 2001-12-15 Akim Demaille <akim@epita.fr>
18279
18280 * src/lex.c, src/lex.h (xgetc): No longer static.
18281 * src/reader.c (parse_union_decl): Revamp.
18282
18283 2001-12-15 Akim Demaille <akim@epita.fr>
18284
18285 Still making progress in separating Bison into (i) input, (ii)
18286 process, (iii) output: now we can directly output the parser file
18287 without using table_obstack at all.
18288
18289 * src/files.c, src/files.h (table_obstack): Bye bye.
18290 (parser_file_name): New.
18291 * src/files.c (compute_output_file_names): Compute it.
18292 * src/output.c (actions_output, output_parser)
18293 (output_master_parser): To a file instead of an obstack.
18294
18295 2001-12-15 Akim Demaille <akim@epita.fr>
18296
18297 Attach actions to rules, instead of pre-outputting them to
18298 actions_obstack.
18299
18300 * src/gram.h (rule_t): action and action_line are new members.
18301 * src/reader.c (symbol_list): Likewise.
18302 (copy_action): Save the actions within the rule.
18303 (packgram): Save them in rule_table.
18304 * src/output.c (actions_output): New.
18305 (output_parser): Use it on `%%actions'.
18306 (output_rule_data): Don't free rule_table.
18307 (output): Do it.
18308 (prepare): Don't save the `action' muscle.
18309 * src/bison.simple: s/%%action/%%actions/.
18310
18311 2001-12-15 Akim Demaille <akim@epita.fr>
18312
18313 * src/reader.c (copy_action): When --yacc, don't append a `;'
18314 to the user action: let it fail if lacking.
18315 Suggested by Arnold Robbins and Tom Tromey.
18316
18317 2001-12-14 Akim Demaille <akim@epita.fr>
18318
18319 * src/lex.c (literalchar): Simply return the char you decoded, non
18320 longer mess around with obstacks and int pointers.
18321 Adjust all callers.
18322
18323 2001-12-14 Akim Demaille <akim@epita.fr>
18324
18325 * src/lex.c (literalchar): Don't escape the special characters,
18326 just decode them, and keep them as char (before, eol was output as
18327 the 2 char string `\n' etc.).
18328 * src/output.c (output_rule_data): Use quotearg to output the
18329 token strings.
18330
18331 2001-12-13 Paul Eggert <eggert@twinsun.com>
18332
18333 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18334 Do not infringe on the global user namespace when using C++.
18335 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18336 All uses of `fprintf' and `stderr' changed.
18337
18338 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18339
18340 2001-12-13 Akim Demaille <akim@epita.fr>
18341
18342 The computation of nullable is broken: it doesn't handle empty
18343 RHS's properly.
18344
18345 * tests/torture.at (GNU AWK Grammar): New.
18346 * tests/sets.at (Nullable): New.
18347 * src/nullable.c (set_nullable): Instead of blindly looping over
18348 `ritems', loop over the rules, and then over their rhs's.
18349
18350 Work around Autotest bugs.
18351
18352 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18353 frame, because Autotest understand lines starting with a `+' as
18354 traces from the shell. Then, they are not processed properly.
18355 Admittedly an Autotest bug, but we don't have time to wait for
18356 Autotest to catch up.
18357 * tests/regression.at (Broken Closure): Adjust to the new table
18358 frames.
18359 Move to...
18360 * tests/sets.at: here.
18361
18362 2001-12-13 Akim Demaille <akim@epita.fr>
18363
18364 * src/closure.c (closure): Use nrules instead of playing tricks
18365 with BITS_PER_WORD.
18366
18367 2001-12-13 Akim Demaille <akim@epita.fr>
18368
18369 * src/print.c (print_actions): Output the handling of `$' as the
18370 traces do: shifting the token EOF. Before EOF was treated as a
18371 nonterminal.
18372 * tests/regression.at: Adjust some tests.
18373 * src/print_graph.c (print_core): Complete the set of items via
18374 closure. The next-to-final and final states are still unsatisfying,
18375 but that's to be addressed elsewhere.
18376 No longer output the rule numbers, but do output the state number.
18377 A single loop for the shifts + gotos is enough, but picked a
18378 distinct color for each.
18379 (print_graph): Initialize and finalize closure.
18380
18381 2001-12-13 Akim Demaille <akim@epita.fr>
18382
18383 * src/reader.c (readgram): Remove dead code, an strip useless
18384 braces.
18385 (get_type): Remove, unused.
18386
18387 2001-12-12 Akim Demaille <akim@epita.fr>
18388
18389 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18390 on that of lib/error.c.
18391
18392 2001-12-12 Akim Demaille <akim@epita.fr>
18393
18394 Some hosts don't like `/' in includes.
18395
18396 * src/system.h: Include libgettext.h without qualifying the path.
18397 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18398 $(top_srcdir).
18399
18400 2001-12-11 Marc Autret <autret_m@epita.fr>
18401
18402 * src/output.c (output_parser): Remove useless muscle.
18403
18404 2001-12-11 Marc Autret <autret_m@epita.fr>
18405
18406 * src/bison.simple: Remove #line just before %%epilogue. It
18407 is now handled in ...
18408 * src/reader.c (read_additionnal_code): Add the output of a
18409 #line for the epilogue.
18410
18411 2001-12-10 Marc Autret <autret_m@epita.fr>
18412
18413 * src/reader.c (copy_definition): Re-use CPP-outed code which
18414 replace precedent remove.
18415 * src/bison.simple: Remove #line before %%prologue because
18416 %%input-line is wrong at this time.
18417
18418 2001-12-10 Marc Autret <autret_m@epita.fr>
18419
18420 * src/reader.c (symbols_output): Clean up.
18421 * src/output.c (output_gram, output): Clean up.
18422
18423 2001-12-10 Akim Demaille <akim@epita.fr>
18424
18425 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18426 * src/LR0.c (set_state_table): here.
18427 * src/lalr.c (lalr): Call it.
18428
18429 2001-12-10 Akim Demaille <akim@epita.fr>
18430
18431 * src/state.h (shifts): Remove the `number' member: shifts are
18432 attached to state, hence no longer need to be labelled with a
18433 state number.
18434
18435 2001-12-10 Akim Demaille <akim@epita.fr>
18436
18437 Now that states have a complete set of members, the linked list of
18438 shifts is useless: just fill directly the state's shifts member.
18439
18440 * src/state.h (shifts): Remove the `next' member.
18441 * src/LR0.c (first_state, last_state): Remove.
18442 Adjust the callers.
18443 (augment_automaton): Don't look for the shifts that must be added
18444 a shift on EOF: it is those of the state we looked for! But now,
18445 since shifts are attached, it is no longer needed to looking
18446 merely by its id: its number.
18447
18448 2001-12-10 Akim Demaille <akim@epita.fr>
18449
18450 * src/LR0.c (augment_automaton): Better variable locality.
18451 Remove an impossible branch: if there is a state corresponding to
18452 the start symbol being shifted, then there is shift for the start
18453 symbol from the initial state.
18454
18455 2001-12-10 Akim Demaille <akim@epita.fr>
18456
18457 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18458 only when appropriate: when insert_start_shifting_state' is not
18459 invoked.
18460 * tests/regression.at (Rule Line Numbers): Adjust.
18461
18462 2001-12-10 Akim Demaille <akim@epita.fr>
18463
18464 * src/LR0.c (augment_automaton): Now that all states have shifts,
18465 merge the two cases addition shifts to the initial state.
18466
18467 2001-12-10 Akim Demaille <akim@epita.fr>
18468
18469 * src/lalr.c (set_state_table): Move to...
18470 * src/LR0.c: here.
18471 * src/lalr.c (lalr): Don't call it...
18472 * src/LR0.c (generate_states): do it.
18473 * src/LR0.h (first_state): Remove, only the table is used.
18474
18475 2001-12-10 Akim Demaille <akim@epita.fr>
18476
18477 * src/LR0.h (first_shift, first_reduction): Remove.
18478 * src/lalr.c: Don't use first_shift: find shifts through the
18479 states.
18480
18481 2001-12-10 Akim Demaille <akim@epita.fr>
18482
18483 * src/LR0.c: Attach shifts to states as soon as they are
18484 computed.
18485 * src/lalr.c (set_state_table): Instead of assigning shifts to
18486 state, just assert that the mapping was properly done.
18487
18488 2001-12-10 Akim Demaille <akim@epita.fr>
18489
18490 * src/LR0.c (insert_start_shift): Rename as...
18491 (insert_start_shifting_state): this.
18492 (insert_eof_shifting_state, insert_accepting_state): New.
18493 (augment_automaton): Adjust.
18494 Better locality of the variables.
18495 When looking if the start_symbol is shifted from the initial
18496 state, using `while (... symbol != start_symbol ...)' sounds
18497 better than `while (... symbol < start_symbol ...)': If fail
18498 to see how the order between symbols could be relevant!
18499
18500 2001-12-10 Akim Demaille <akim@epita.fr>
18501
18502 * src/getargs.h: Don't declare `spec_name_prefix' and
18503 `spec_file_prefix', declared by src/files.h.
18504 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18505 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18506 * src/output.c (prepare): Adjust.
18507 * src/reader.c (symbols_output): Likewise.
18508 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18509
18510 2001-12-10 Akim Demaille <akim@epita.fr>
18511
18512 * src/muscle_tab.c (muscle_init): NULL is a better default than
18513 `"0"'.
18514
18515 2001-12-10 Akim Demaille <akim@epita.fr>
18516
18517 * src/reader.c (reader): Calling symbols_output once is enough.
18518
18519 2001-12-10 Akim Demaille <akim@epita.fr>
18520
18521 Now that states have a complete set of members, the linked list of
18522 reductions is useless: just fill directly the state's reductions
18523 member.
18524
18525 * src/state.h (struct reductions): Remove member `number' and
18526 `next'.
18527 * src/LR0.c (first_reduction, last_reduction): Remove.
18528 (save_reductions): Don't link the new reductions, store them in
18529 this_state.
18530 * src/lalr.c (set_state_table): No need to attach reductions to
18531 states, it's already done.
18532 * src/output.c (output_actions): No longer free the shifts, then
18533 the reductions, then the states: free all the states and their
18534 members.
18535
18536 2001-12-10 Akim Demaille <akim@epita.fr>
18537
18538 * src/options.c (OPTN, DRTV, BOTH): New.
18539 (option_table): Use them.
18540
18541 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18542 the job of system.h.
18543 * src/options.c: Don't include stdio.h and xalloc.h for the same
18544 reasons.
18545
18546 2001-12-10 Akim Demaille <akim@epita.fr>
18547
18548 * src/output.c (output, prepare): Make sure the values of the
18549 muscles `action' and `prologue' are 0-terminated.
18550
18551 2001-12-10 Akim Demaille <akim@epita.fr>
18552
18553 Clean up GCC warnings.
18554
18555 * src/reader.c (copy_action): `buf' is not used.
18556 (parse_skel_decl): Be static.
18557 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18558 * src/options.h (create_long_option_table): Have a real prototype.
18559 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18560 (hash_delete_at): Return const void *.
18561 Adjust casts to preserve the const.
18562
18563 2001-12-10 Akim Demaille <akim@epita.fr>
18564
18565 * configure.in: Require 2.52g.
18566 M4 is not needed, but AUTOM4TE is.
18567 * m4/m4.m4: Remove.
18568 * tests/Makefile.am: Adjust.
18569
18570 2001-12-10 Akim Demaille <akim@epita.fr>
18571
18572 One structure for states is enough, even though theoretically
18573 there are LR(0) states and LALR(1) states.
18574
18575 * src/lalr.h (state_t): Remove.
18576 (state_table): Be state_t **, not state_t *.
18577 * src/state.h (core, CORE_ALLOC): Rename as...
18578 (state_t, STATE_ALLOC): this.
18579 Add the LALR(1) members: shifts, reductions, errs.
18580 * src/LR0.c (state_table): Rename as...
18581 (state_hash): this, to avoid name clashes with the global
18582 `state_table'.
18583 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18584 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18585
18586 2001-12-10 Akim Demaille <akim@epita.fr>
18587
18588 Bison dumps core on bash.y.
18589 Reported by Pascal Bart.
18590
18591 * src/warshall.c (bitmatrix_print): New.
18592 (TC): Use it.
18593 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
18594 j must be the outer loop.
18595 * tests/regression.at (Broken Closure): New.
18596
18597 2001-12-05 Akim Demaille <akim@epita.fr>
18598
18599 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18600 its argument.
18601 Reported by Peter Hamorsky.
18602
18603 2001-12-05 Akim Demaille <akim@epita.fr>
18604
18605 * src/conflicts.c (err_table): Remove.
18606 (resolve_sr_conflict): Adjust.
18607 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18608 Rename as...
18609 (state_t.reductions, state_t.shifts): this.
18610
18611 2001-12-05 Akim Demaille <akim@epita.fr>
18612
18613 * src/reduce.c (reduce_grammar_tables): No longer disable the
18614 removal of useless rules via CPP but via `if (0)', so that the
18615 compiler still check the code is valid.
18616 For instance, it should have noticed `rline' no longer exists: use
18617 the `line' member of rule_t.
18618 * src/gram.c (dummy, rline): Remove, unused.
18619
18620 2001-12-05 Akim Demaille <akim@epita.fr>
18621
18622 * src/output.c (pack_vector): Use assert, not berror.
18623 * src/main.c (berror): Remove, unused.
18624
18625 2001-12-05 Akim Demaille <akim@epita.fr>
18626
18627 New experimental feature: if --verbose --trace output all the
18628 items of a state, not only its kernel.
18629
18630 * src/print.c (print_core): If `trace_flag', then invoke closure
18631 before outputting the items of the state (print_core is no longer
18632 a correct name them).
18633 (print_results): Invoke new_closure/free_closure if needed.
18634
18635 2001-12-05 Akim Demaille <akim@epita.fr>
18636
18637 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18638 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18639 (nitemset): for consistency with the rest of the project.
18640
18641 2001-12-05 Akim Demaille <akim@epita.fr>
18642
18643 * src/closure.c (print_closure): Improve.
18644 (closure): Use it for printing input and output.
18645
18646 2001-12-05 Akim Demaille <akim@epita.fr>
18647
18648 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18649 indexed by nonterminals.
18650
18651 2001-12-05 Akim Demaille <akim@epita.fr>
18652
18653 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18654 what it was!).
18655 * src/warshall.h: Remove accidental duplication of the content.
18656
18657 2001-12-05 Akim Demaille <akim@epita.fr>
18658
18659 * src/closure.c (set_fderives): De-obfuscate.
18660
18661 2001-12-05 Akim Demaille <akim@epita.fr>
18662
18663 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18664
18665 2001-12-05 Akim Demaille <akim@epita.fr>
18666
18667 * src/closure.c (set_firsts): De-obfuscate.
18668
18669 2001-12-05 Akim Demaille <akim@epita.fr>
18670
18671 * src/output.c (action_row): De-obfuscate
18672 using the good o' techniques: arrays not pointers, variable
18673 locality, BITISSET, RESETBIT etc.
18674
18675 2001-12-05 Akim Demaille <akim@epita.fr>
18676
18677 Pessimize the code to simplify it: from now on, all the states
18678 have a valid SHIFTS, which NSHIFTS is possibly 0.
18679
18680 * src/LR0.c (shifts_new): Be global and move to..
18681 * src/state.c, src/state.h: here.
18682 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18683 * src/print_graph: Adjust.
18684
18685 2001-12-05 Akim Demaille <akim@epita.fr>
18686
18687 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18688 * src/conflicts.c: Use it.
18689 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18690 incorrectly ``simplified''.
18691
18692 2001-12-05 Akim Demaille <akim@epita.fr>
18693
18694 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18695 using the good o' techniques: arrays not pointers, variable
18696 locality, BITISSET, RESETBIT etc.
18697
18698 2001-12-05 Akim Demaille <akim@epita.fr>
18699
18700 * src/state.h (SHIFT_SYMBOL): New.
18701 * src/conflicts.c: Use it to deobfuscate.
18702
18703 2001-12-05 Akim Demaille <akim@epita.fr>
18704
18705 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18706 (print_reductions): De-obfuscate using the good o' techniques:
18707 arrays not pointers, variable locality, BITISSET.
18708
18709 2001-12-05 Akim Demaille <akim@epita.fr>
18710
18711 * src/conflicts.c (print_reductions): Arrays, not pointers.
18712 Use BITISSET.
18713
18714 2001-12-05 Akim Demaille <akim@epita.fr>
18715
18716 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18717
18718 2001-12-05 Akim Demaille <akim@epita.fr>
18719
18720 * src/conflicts.c (print_reductions): Improve variable locality.
18721
18722 2001-12-05 Akim Demaille <akim@epita.fr>
18723
18724 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18725
18726 2001-12-05 Akim Demaille <akim@epita.fr>
18727
18728 * src/conflicts.c (print_reductions): Improve variable locality.
18729
18730 2001-12-05 Akim Demaille <akim@epita.fr>
18731
18732 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18733 * src/lalr.c: Use them.
18734
18735 2001-12-05 Akim Demaille <akim@epita.fr>
18736
18737 * src/LR0.c (augment_automaton): Formatting changes.
18738 Better variable locality.
18739
18740 2001-12-05 Akim Demaille <akim@epita.fr>
18741
18742 * src/lalr.c (matrix_print): New.
18743 (transpose): Use it.
18744 Use arrays instead of pointers.
18745
18746 2001-12-05 Akim Demaille <akim@epita.fr>
18747
18748 * src/lalr.c (maxrhs): Move to...
18749 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18750 * src/lalr.c (build_relations): Adjust.
18751
18752 2001-12-05 Akim Demaille <akim@epita.fr>
18753
18754 * src/lalr.c (transpose): Free the memory allocated to the
18755 argument, as it is replaced by the results by the unique caller.
18756 (build_relations): Merely invoke transpose: it handles the memory
18757 deallocation.
18758 Improve variable locality.
18759 Avoid variables used as mere abbreviations.
18760 (compute_lookaheads): Use arrays instead of pointers.
18761
18762 2001-12-05 Akim Demaille <akim@epita.fr>
18763
18764 * src/lalr.c (initialize_F): Improve variable locality.
18765 Avoid variables used as mere abbreviations.
18766
18767 2001-12-05 Akim Demaille <akim@epita.fr>
18768
18769 * src/derives.c (print_derives): Display the ruleno.
18770 * src/lalr.c (initialize_F, transpose): Better variable locality
18771 to improve readability.
18772 Avoid variables used as mere abbreviations.
18773
18774 2001-12-05 Akim Demaille <akim@epita.fr>
18775
18776 * src/lalr.c (traverse): Use arrays instead of pointers.
18777
18778 2001-12-05 Akim Demaille <akim@epita.fr>
18779
18780 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18781 the handling of squeue.
18782 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18783
18784 2001-12-05 Akim Demaille <akim@epita.fr>
18785
18786 Because useless nonterminals are now kept alive (instead of being
18787 `destroyed'), we now sometimes examine them, and store information
18788 related to them. Hence we need to know their number, and adjust
18789 memory allocations.
18790
18791 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18792 static.
18793 * src/LR0.c (allocate_itemsets): The memory allocated to
18794 `symbol_count' was used for two different purpose: once to count
18795 the number of occurrences of each symbol, and later reassigned to
18796 `shift_symbol', containing the symbol that can be shifted from a
18797 given state.
18798 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18799 only, and...
18800 (new_itemsets): Allocate `shift_symbol' here.
18801 (allocate_itemsets): symbol_count includes useless nonterminals.
18802 Make room for them.
18803 (free_storage): Use `free', not `XFREE', for pointers that cannot
18804 be null.
18805
18806 2001-12-05 Akim Demaille <akim@epita.fr>
18807
18808 * src/nullable.c (set_nullable): Deobfuscate the handling of
18809 ritem.
18810 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18811
18812 2001-12-05 Akim Demaille <akim@epita.fr>
18813
18814 * src/gram.c, src/gram.h (ritem_print): New.
18815 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18816 (This useless function was defined only to work around VMS linkers
18817 that can't handle compilation units with variables only).
18818 * src/reduce.c (dump_grammar): Use it to trace the construction of
18819 ritem.
18820
18821 2001-12-04 Paul Eggert <eggert@twinsun.com>
18822
18823 * src/bison.simple (union yyalloc): Change member names
18824 to be the same as the stack names.
18825 (yyparse): yyptr is now union yyalloc *, not char *.
18826 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18827 and may generate better code on some machines.
18828 (yystpcpy): Use prototype if __STDC__ is defined, not just
18829 if __cplusplus is defined.
18830
18831 2001-11-30 Akim Demaille <akim@epita.fr>
18832
18833 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18834 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18835 Gettext doesn't compile cleanly, and dies with -Werror.
18836 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18837 Include WARNING_CFLAGS here.
18838 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18839 before being defined.
18840
18841 2001-11-27 Paul Eggert <eggert@twinsun.com>
18842
18843 * lib/quotearg.h (quotearg_n, quotearg_n_style):
18844 First arg is int, not unsigned.
18845 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18846 (SIZE_MAX, UINT_MAX): New macros.
18847 (quotearg_n_options): Abort if N is negative.
18848 Avoid overflow check on hosts where size_t is 64 bits and int
18849 is 32 bits, as overflow is impossible there.
18850 Fix off-by-one typo that caused unnecessary reallocation.
18851
18852 2001-11-29 Paul Eggert <eggert@twinsun.com>
18853
18854 Name space cleanup in generated parser.
18855
18856 * doc/bison.texinfo (Bison Parser): Discuss system headers
18857 and their effect on the user name space.
18858
18859 * src/bison.simple:
18860 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
18861 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
18862 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
18863
18864 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
18865 on user names when possible.
18866
18867 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
18868 Simplify test for whather <alloca.h> exists.
18869
18870 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
18871
18872 (<stdio.h>): Include if YYDEBUG.
18873
18874 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
18875 ! defined (yyoverflow) && ! defined (yymemcpy).
18876
18877 (yymemcpy, yyparse): Rename local variables as needed so that
18878 they all begin with 'yy'.
18879
18880 (yystrlen, yystpcpy): New functions.
18881
18882 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
18883 All uses changed.
18884
18885 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
18886 instead of relying on string.h functions. Use YYSTACK_ALLOC
18887 and YYSTACK_FREE instead of malloc and free.
18888
18889 2001-11-30 Akim Demaille <akim@epita.fr>
18890
18891 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
18892 before their first uses.
18893 (YYBISON, YYPURE): Move to the top of the output.
18894
18895 2001-11-30 Akim Demaille <akim@epita.fr>
18896
18897 * tests/reduce.at (Useless Nonterminals): Fix.
18898
18899 2001-11-30 Akim Demaille <akim@epita.fr>
18900
18901 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
18902 if body instead of `;' to pacify GCC's warnings.
18903
18904 2001-11-30 Akim Demaille <akim@epita.fr>
18905
18906 Instead of mapping the LHS of unused rules to -1, keep the LHS
18907 valid, but flag the rules as invalid.
18908
18909 * src/gram.h (rule_t): `useful' is a new member.
18910 * src/print.c (print_grammar): Adjust.
18911 * src/derives.c (set_derives): Likewise.
18912 * src/reader.c (packgram, reduce_output): Likewise.
18913 * src/reduce.c (reduce_grammar_tables): Likewise.
18914 * tests/reduce.at (Underivable Rules, Useless Rules): New.
18915
18916 2001-11-30 Akim Demaille <akim@epita.fr>
18917
18918 * src/reduce.c (reduce_output): Formatting changes.
18919 * src/print.c (print_results, print_grammar): Likewise.
18920 * tests/regression.at (Rule Line Numbers)
18921 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
18922
18923 2001-11-30 Akim Demaille <akim@epita.fr>
18924
18925 * src/reduce.c (nonterminals_reduce): Instead of throwing away
18926 useless nonterminals, move them at the end of the symbol arrays.
18927 (reduce_output): Adjust.
18928 * tests/reduce.at (Useless Nonterminals): Adjust.
18929
18930 2001-11-30 Akim Demaille <akim@epita.fr>
18931
18932 * src/reduce.c: Various comment/formatting changes.
18933 (nonterminals_reduce): New, extracted from...
18934 (reduce_grammar_tables): here.
18935 (reduce_grammar): Call nonterminals_reduce.
18936
18937 2001-11-29 Paul Eggert <eggert@twinsun.com>
18938
18939 * src/bison.simple (YYSTACK_REALLOC): Remove.
18940 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
18941 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
18942 New macros.
18943 (union yyalloc): New type.
18944 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
18945 an arbitrary restriction on hosts where size_t is wider than int.
18946
18947 (yyparse): Don't dump core if alloca or malloc fails; instead, report
18948 a parser stack overflow. Allocate just one block of memory for all
18949 three stacks, instead of allocating three blocks; this typically is
18950 faster and reduces fragmentation.
18951
18952 Do not limit the number of items in the stack to a value that fits
18953 in 'int', as this is an arbitrary limit on hosts with 64-bit
18954 size_t and 32-bit int.
18955
18956 2001-11-29 Marc Autret <autret_m@epita.fr>
18957
18958 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
18959 of defining YYERROR_VERBOSE.
18960 [AT_DATA]: $4 is now out of C declarations in the prologue.
18961
18962 2001-11-28 Marc Autret <autret_m@epita.fr>
18963
18964 * src/reader.c (parse_dquoted_param): New.
18965 (parse_skel_decl): Use it.
18966 * src/lex.h: Add its prototype.
18967 * src/lex.c (literalchar): Become not static.
18968
18969 2001-11-28 Marc Autret <autret_m@epita.fr>
18970
18971 * src/output.h: And put its extern declaration here.
18972 * src/output.c (error_verbose): Define here.
18973 (prepare): Echo name modification.
18974 * src/getargs.h: Clean its extern declaration.
18975 * src/getargs.c (error_verbose_flag): Remove.
18976 (getargs): Remove case 'e'.
18977 * src/options.c (option_table): 'error-verbose' is now seen as simple
18978 percent option.
18979 Include output.h.
18980
18981 * src/reader.c (read_declarations): Remove case tok_include.
18982 (parse_include_decl): Remove.
18983 * src/lex.h (token_t): Remove tok_include.
18984 * src/options.c (option_table): 'include' is now a simple command line
18985 option.
18986
18987 2001-11-28 Marc Autret <autret_m@epita.fr>
18988
18989 * src/bison.simple: Adjust muscle names.
18990 * src/muscle_tab.c (muscle_init): Also rename the muscles.
18991 * src/output.c (prepare): s/_/-/ for the muscles names.
18992 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
18993
18994 2001-11-28 Marc Autret <autret_m@epita.fr>
18995
18996 * src/bison.simple: Fix debug.
18997 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
18998
18999 2001-11-28 Akim Demaille <akim@epita.fr>
19000
19001 * src/LR0.c (shifts_new): New.
19002 (save_shifts, insert_start_shift, augment_automaton): Use it.
19003
19004 2001-11-28 Akim Demaille <akim@epita.fr>
19005
19006 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19007 keep ruleno only.
19008
19009 2001-11-28 Akim Demaille <akim@epita.fr>
19010
19011 * src/closure.c (closure): Instead of looping over word in array
19012 then bits in words, loop over bits in array.
19013
19014 2001-11-28 Akim Demaille <akim@epita.fr>
19015
19016 * src/closure.c (closure): No longer optimize the special case
19017 where all the bits of `ruleset[r]' are set to 0, to make the code
19018 clearer.
19019
19020 2001-11-28 Akim Demaille <akim@epita.fr>
19021
19022 * src/closure.c (closure): `r' and `c' are new variables, used to
19023 de-obfuscate accesses to RULESET and CORE.
19024
19025 2001-11-28 Akim Demaille <akim@epita.fr>
19026
19027 * src/reduce.c (reduce_print): Use ngettext.
19028 (dump_grammar): Improve the trace accuracy.
19029
19030 2001-11-28 Akim Demaille <akim@epita.fr>
19031
19032 * src/reduce.c (dump_grammar): Don't translate trace messages.
19033
19034 2001-11-28 Akim Demaille <akim@epita.fr>
19035
19036 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19037 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19038 as all tags are free'ed afterwards.
19039 From Enrico Scholz.
19040
19041 2001-11-27 Paul Eggert <eggert@twinsun.com>
19042
19043 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19044 use alloca when we didn't want to, and vice versa.
19045
19046 2001-11-27 Marc Autret <autret_m@epita.fr>
19047
19048 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19049 initialization.
19050 * src/output.c (prepare): Remove its update.
19051
19052 2001-11-27 Marc Autret <autret_m@epita.fr>
19053
19054 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19055 Use %error-verbose.
19056
19057 2001-11-27 Marc Autret <autret_m@epita.fr>
19058
19059 * src/bison.simple: Remove YYERROR_VERBOSE using.
19060 Use %%error_verbose.
19061 (yyparse): Likewise.
19062 * src/output.c (prepare): Give its final value.
19063 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19064 * src/getargs.h: Add its extern declaration.
19065 * src/getargs.c (error_verbose_flag): New int.
19066 (getargs): Update to catch new case.
19067 * src/options.c (option_table): 'error-verbose' is a new option.
19068 (shortopts): Update.
19069
19070 2001-11-27 Akim Demaille <akim@epita.fr>
19071
19072 * src/system.h: Use intl/libgettext.h.
19073 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19074
19075 2001-11-27 Akim Demaille <akim@epita.fr>
19076
19077 * tests/torture.at (Exploding the Stack Size with Malloc):
19078 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19079
19080 2001-11-27 Akim Demaille <akim@epita.fr>
19081
19082 * src/files.c: Include error.h.
19083 Reported by Hans Aberg.
19084
19085 2001-11-26 Marc Autret <autret_m@epita.fr>
19086
19087 * src/reader.c (parse_include_decl): New, not yet implemented.
19088 (read_declarations): Add case tok_include.
19089 * src/getargs.h (include): Add its extern definition.
19090 * src/getargs.c (include): New const char *.
19091 (getargs): Add case '-I'.
19092 * src/options.c (option_table): Add include as command line and
19093 percent option.
19094 * src/lex.h (token_t): Add tok_include.
19095
19096 2001-11-26 Akim Demaille <akim@epita.fr>
19097
19098 * src/reader.c (readgram): Make sure rules for mid-rule actions
19099 have a lineno equal to that of their host rule.
19100 Reported by Hans Aberg.
19101 * tests/regression.at (Rule Line Numbers): New.
19102
19103 2001-11-26 Akim Demaille <akim@epita.fr>
19104
19105 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19106 size_ts.
19107
19108 2001-11-26 Akim Demaille <akim@epita.fr>
19109
19110 * src/complain.c, src/complain.h (error): Remove, provided by
19111 lib/error.[ch].
19112
19113 2001-11-26 Akim Demaille <akim@epita.fr>
19114
19115 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19116 issue an error message.
19117 * tests/regression.at (Invalid %directive): New.
19118 Reported by Hans Aberg.
19119
19120 2001-11-26 Akim Demaille <akim@epita.fr>
19121
19122 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19123 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19124
19125 2001-11-26 Akim Demaille <akim@epita.fr>
19126
19127 * src/conflicts.c (conflicts_print): Don't complain at all when
19128 there are no reduce/reduce conflicts, and as many shift/reduce
19129 conflicts as expected.
19130 * tests/regression.at (%expect right): Adjust.
19131
19132 2001-11-23 Akim Demaille <akim@epita.fr>
19133
19134 * lib/alloca.c: Update, from fileutils.
19135
19136 2001-11-23 Akim Demaille <akim@epita.fr>
19137
19138 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19139
19140 2001-11-23 Akim Demaille <akim@epita.fr>
19141
19142 * src/system.h: Include alloca.h.
19143 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19144
19145 2001-11-23 Akim Demaille <akim@epita.fr>
19146
19147 * src/print_graph.c (print_actions): Remove `rule', unused.
19148 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19149 pacify GCC's signed < unsigned warnings.
19150 * src/closure.c (itemsetsize): Likewise.
19151 * src/reader.c (symbol_list_new): Static.
19152
19153 2001-11-23 Akim Demaille <akim@epita.fr>
19154
19155 Attaching lineno to buckets is stupid, since only one copy of each
19156 symbol is kept, only the line of the first occurrence is kept too.
19157
19158 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19159 * src/reader.c (rline_allocated): Remove, unused.
19160 (symbol_list): Have a `line' member.
19161 (symbol_list_new): New.
19162 (readgram): Use it.
19163 * src/print.c (print_grammar): Output the rule line numbers.
19164 * tests/regression.at (Solved SR Conflicts)
19165 (Unresolved SR Conflicts): Adjust.
19166 Reported by Hans Aberg.
19167
19168 2001-11-22 Marc Autret <autret_m@epita.fr>
19169
19170 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19171
19172 2001-11-22 Marc Autret <autret_m@epita.fr>
19173
19174 * src/muscle_tab.c (muscle_init): Remove initialization of
19175 skeleton muscle.
19176 * src/output.c (output_master_parser): Do it here.
19177
19178 2001-11-20 Akim Demaille <akim@epita.fr>
19179
19180 * po/sv.po: New.
19181 * configure.in (ALL_LINGUAS): Adjust.
19182 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19183 longer contains strings to translate.
19184
19185 2001-11-19 Akim Demaille <akim@epita.fr>
19186
19187 * src/conflicts.c (conflicts_print): Add a missing \n.
19188
19189 2001-11-19 Akim Demaille <akim@epita.fr>
19190
19191 * src/nullable.c (nullable_print): New.
19192 (set_nullable): Call it when tracing.
19193 Better locality of variables.
19194
19195 2001-11-19 Akim Demaille <akim@epita.fr>
19196
19197 * src/print.c (print_actions): Better locality of variables.
19198
19199 2001-11-19 Akim Demaille <akim@epita.fr>
19200
19201 * src/derives.c (print_derives): Fix and enrich.
19202 * src/closure.c (print_fderives): Likewise.
19203
19204 2001-11-19 Akim Demaille <akim@epita.fr>
19205
19206 * src/closure.c (itemsetend): Remove, replaced with...
19207 (itemsetsize): new.
19208
19209 2001-11-19 Akim Demaille <akim@epita.fr>
19210
19211 * src/LR0.c (kernel_end): Remove, replaced with...
19212 (kernel_size): new.
19213
19214 2001-11-19 Akim Demaille <akim@epita.fr>
19215
19216 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19217 to clarify.
19218
19219 2001-11-19 Akim Demaille <akim@epita.fr>
19220
19221 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19222
19223 2001-11-19 Akim Demaille <akim@epita.fr>
19224
19225 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19226 trace messages.
19227 * src/LR0.c: Likewise.
19228 (allocate_itemsets): Use arrays instead of pointers to clarify.
19229
19230 2001-11-19 Akim Demaille <akim@epita.fr>
19231
19232 * src/getargs.c (statistics_flag): Replace with...
19233 (trace_flag): New.
19234 (longopts): Accept --trace instead of --statistics.
19235 * src/getargs.h, src/options.c: Adjust.
19236 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19237 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19238
19239 2001-11-19 Akim Demaille <akim@epita.fr>
19240
19241 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19242 pointers to clarify the code.
19243 (save_reductions, save_shifts): Factor common parts of alternatives.
19244
19245 2001-11-19 Akim Demaille <akim@epita.fr>
19246
19247 * src/LR0.c (new_state, get_state): Complete TRACE code.
19248 * src/closure.c: Include `reader.h' to get `tags', needed by the
19249 trace code.
19250 Rename the conditional DEBUG as TRACE.
19251 Output consistently TRACEs to stderr, not stdout.
19252 * src/derives.c: Likewise.
19253 * src/reduce.c: (inaccessable_symbols): Using if is better style
19254 than goto.
19255 Use `#if TRACE' instead of `#if 0' for tracing code.
19256
19257 2001-11-19 Akim Demaille <akim@epita.fr>
19258
19259 * src/system.h (LIST_FREE, shortcpy): New.
19260 * src/LR0.c: Use them.
19261 * src/output.c (free_itemsets, free_reductions, free_shifts):
19262 Remove, replaced by LIST_FREE.
19263
19264 2001-11-19 Akim Demaille <akim@epita.fr>
19265
19266 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19267 (REDUCTIONS_ALLOC): New.
19268 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19269 allocation.
19270
19271 2001-11-19 Akim Demaille <akim@epita.fr>
19272
19273 * src/LR0.c (new_state): Complete trace code.
19274 * src/nullable.c (set_nullable): Don't translate traces.
19275
19276 2001-11-19 Akim Demaille <akim@epita.fr>
19277
19278 * src/print_graph.c (print_core): Better locality of variables.
19279 * src/print.c (print_core): Likewise.
19280
19281 2001-11-19 Akim Demaille <akim@epita.fr>
19282
19283 * src/vcg.c: You do the output, so you are responsible of the
19284 handling of VCG syntax, in particular: use quotearg.
19285 * src/print_graph.c: Don't.
19286 (print_actions): Don't output the actions as part of the nodes,
19287 since that's the job of the edges.
19288 (print_state): Don't output by hand: fill the node description,
19289 and ask for its output.
19290
19291 2001-11-19 Akim Demaille <akim@epita.fr>
19292
19293 * src/bison.simple (yyparse): When verbosely reporting an error,
19294 no longer put additional quotes around token names.
19295 * tests/calc.at: Adjust.
19296
19297 2001-11-19 Akim Demaille <akim@epita.fr>
19298
19299 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19300 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19301 * src/output.c: Adjust.
19302
19303 2001-11-19 Akim Demaille <akim@epita.fr>
19304
19305 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19306 (rule_t): this.
19307 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19308
19309 2001-11-19 Akim Demaille <akim@epita.fr>
19310
19311 * src/gram.h (rule_t): New.
19312 (rule_table): New.
19313 (rrhs, rlhs): Remove, part of state_t.
19314 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19315 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19316 * src/reader.c, src/reduce.c: Adjust.
19317
19318 2001-11-19 Akim Demaille <akim@epita.fr>
19319
19320 * src/reader.c (symbols_output): New, extracted from...
19321 (packsymbols): Here.
19322 (reader): Call it.
19323
19324 2001-11-19 Akim Demaille <akim@epita.fr>
19325
19326 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19327 (maxrhs): this new function.
19328
19329 2001-11-19 Akim Demaille <akim@epita.fr>
19330
19331 * src/lalr.c (F): New macro to access the variable F.
19332 Adjust.
19333
19334 2001-11-19 Akim Demaille <akim@epita.fr>
19335
19336 * src/lalr.h (LA): New macro to access the variable LA.
19337 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19338 * src/lalr.c: Adjust.
19339
19340 2001-11-19 Akim Demaille <akim@epita.fr>
19341
19342 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19343 (set_state_table): handle the `lookaheads' members.
19344
19345 2001-11-19 Akim Demaille <akim@epita.fr>
19346
19347 * src/lalr.h (lookaheads): Removed array, whose contents is now
19348 a member of...
19349 (state_t): this structure.
19350 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19351 Adjust.
19352
19353 2001-11-19 Akim Demaille <akim@epita.fr>
19354
19355 * src/lalr.h (consistent): Removed array, whose contents is now
19356 a member of...
19357 (state_t): this structure.
19358 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19359 Adjust.
19360
19361 2001-11-19 Akim Demaille <akim@epita.fr>
19362
19363 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19364 contents are now members of...
19365 (state_t): this structure.
19366 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19367 Adjust.
19368
19369 2001-11-19 Akim Demaille <akim@epita.fr>
19370
19371 * src/lalr.h (state_t): New.
19372 (state_table): Be a state_t * instead of a core **.
19373 (accessing_symbol): Remove, part of state_t.
19374 * src/lalr.c: Adjust.
19375 (set_accessing_symbol): Merge into...
19376 (set_state_table): this.
19377 * src/print_graph.c, src/conflicts.c: Adjust.
19378
19379 2001-11-14 Akim Demaille <akim@epita.fr>
19380
19381 * tests/calc.at, tests/output.at, tests/regression.at,
19382 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19383 now the tests are run in private dirs, therefore AC_CLEANUP and
19384 family can be simplified to 0-ary.
19385 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19386 use abs. path to find config.h.
19387 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19388 stderr, there can be way too much random noise.
19389 Instead pass -Werror to GCC and rely on the exit status.
19390 Reported by Wolfram Wagner.
19391
19392 2001-11-14 Akim Demaille <akim@epita.fr>
19393
19394 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19395 defined only if yyoverflow is defined, to avoid `warning: unused
19396 variable `yyvs1''.
19397 Reported by The Test Suite.
19398
19399 2001-11-14 Akim Demaille <akim@epita.fr>
19400
19401 * src/print.c: Include reduce.h.
19402 Reported by Hans Aberg.
19403
19404 2001-11-14 Akim Demaille <akim@epita.fr>
19405
19406 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19407 Revert a previous patch: these are really const.
19408 * src/conflicts.c (conflict_report): Additional useless pair of
19409 braces to pacify GCC's warnings for `if () if () {} else {}'.
19410 * src/lex.c (parse_percent_token): Replace equal_offset with
19411 arg_offset.
19412 arg is const.
19413 Be sure to strdup `arg' when used, since there is no reason for
19414 token_buffer not to change.
19415
19416 2001-11-14 Akim Demaille <akim@epita.fr>
19417
19418 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19419 definition.
19420 * src/main.c (main): Use them.
19421 Suggested by Hans Aberg.
19422
19423 2001-11-12 Akim Demaille <akim@epita.fr>
19424
19425 * src/system.h (ngettext): Now that we use ngettext, be sure to
19426 provide a default definition when NLS are not used.
19427
19428 2001-11-12 Akim Demaille <akim@epita.fr>
19429
19430 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19431 Use @kbd to denote user input.
19432 (Language and Grammar): ANSIfy the example.
19433 Adjust its layout for info/notinfo.
19434 (Location Tracking Calc): Output error messages to stderr.
19435 Output locations in a more GNUtically correct way.
19436 Fix a couple of Englishos.
19437 Adjust @group/@end group pairs.
19438
19439 2001-11-12 Akim Demaille <akim@epita.fr>
19440
19441 %expect was not functioning at all.
19442
19443 * src/conflicts.c (expected_conflicts): Set to -1.
19444 (conflict_report): Use ngettext.
19445 (conflicts_print): Check %expect and make its violation an error.
19446 * doc/bison.texinfo (Expect Decl): Adjust.
19447 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19448 * tests/regression.at (%expect not enough, %expect right)
19449 (%expect too much): New.
19450
19451 2001-11-12 Akim Demaille <akim@epita.fr>
19452
19453 * tests/regression.at (Conflicts): Rename as...
19454 (Unresolved SR Conflicts): this.
19455 (Solved SR Conflicts): New.
19456
19457 2001-11-12 Akim Demaille <akim@epita.fr>
19458
19459 * src/reduce.c (print_results): Rename as...
19460 (reduce_output): This.
19461 Output to OUT, passed as argument, instead of output_obstack.
19462 (dump_grammar): Likewise.
19463 (reduce_free): New.
19464 Also free V1.
19465 (reduce_grammar): No longer call reduce_output, since...
19466 * src/print.c (print_results): do it.
19467 * src/main.c (main): Call reduce_free;
19468
19469 2001-11-12 Akim Demaille <akim@epita.fr>
19470
19471 * src/conflicts.c (print_reductions): Accept OUT as argument.
19472 Output to it, not to output_obstack.
19473 * src/print.c (print_actions): Adjust.
19474
19475 2001-11-12 Akim Demaille <akim@epita.fr>
19476
19477 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19478 the result instead of using...
19479 (src_total, rrc_total, src_count, rrc_count): Remove.
19480 (any_conflicts): Remove.
19481 (print_conflicts): Split into...
19482 (conflicts_print, conflicts_output): New.
19483 * src/conflicts.h: Adjust.
19484 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19485 * src/print.c (print_grammar): Issue `\n' between two rules.
19486 * tests/regression.at (Conflicts): New.
19487 Reported by Tom Lane.
19488
19489 2001-11-12 Akim Demaille <akim@epita.fr>
19490
19491 * tests/regression.at (Invalid input): Remove, duplicate with
19492 ``Invalid input: 1''.
19493
19494 2001-11-12 Akim Demaille <akim@epita.fr>
19495
19496 * tests/torture.at (AT_DATA_STACK_TORTURE)
19497 (Exploding the Stack Size with Alloca)
19498 (Exploding the Stack Size with Malloc): New.
19499
19500 2001-11-12 Akim Demaille <akim@epita.fr>
19501
19502 * src/bison.simple (YYSTACK_REALLOC): New.
19503 (yyparse) [!yyoverflow]: Use it and free the old stack.
19504 Reported by Per Allansson.
19505
19506 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19507
19508 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19509 define CPP macro, which substitute YYSTYPE by yystype.
19510 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19511 with yyltype/YYLTYPE. This allows inclusion of the generated
19512 header within the parser if the compiler, such as GGC, accepts
19513 multiple equivalent #defines.
19514 From Akim.
19515
19516 2001-11-05 Akim Demaille <akim@epita.fr>
19517
19518 * src/reader.c (symbols_output): New, extracted from...
19519 (packsymbols): here.
19520 (reader): Adjust.
19521
19522 2001-11-05 Akim Demaille <akim@epita.fr>
19523
19524 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19525
19526 2001-11-05 Akim Demaille <akim@epita.fr>
19527
19528 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19529 pattern.
19530
19531 2001-11-05 Akim Demaille <akim@epita.fr>
19532
19533 * src/options.h (struct option_table_struct): set_flags is void*.
19534 * src/options.c (longopts): Support `--output' and `%output'.
19535 (usage): Adjust.
19536 * src/lex.h (tok_setopt): Remove, replaced with...
19537 (tok_intopt, tok_stropt): these new guys.
19538 * src/lex.c (getopt.h): Not needed.
19539 (token_buffer, unlexed_token_buffer): Not const.
19540 (percent_table): Promote `-' over `_' in directive names.
19541 Active `%name-prefix', `file-prefix', and `output'.
19542 (parse_percent_token): Accept possible arguments to directives.
19543 Promote `-' over `_' in directive names.
19544
19545 2001-11-04 Akim Demaille <akim@epita.fr>
19546
19547 * doc/bison.texinfo (Decl Summary): Split the list into
19548 `directives for grammars' and `directives for bison'.
19549 Sort'em.
19550 Add description of `%name-prefix', `file-prefix', and `output'.
19551 Promote `-' over `_' in directive names.
19552 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19553 Simplify the description of `--name-prefix'.
19554 Promote `-' over `_' in directive names.
19555 Promote `--output' over `--output-file'.
19556 Fix the description of `--defines'.
19557 * tests/output.at: Exercise %file-prefix and %output.
19558
19559 2001-11-02 Akim Demaille <akim@epita.fr>
19560
19561 * doc/refcard.tex: Update.
19562
19563 2001-11-02 Akim Demaille <akim@epita.fr>
19564
19565 * src/symtab.h (SUNDEF): New.
19566 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19567 stand for `uninitialized', instead of 0.
19568 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19569 * src/lex.c (lex): Adjust.
19570
19571 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19572 Number it 0.
19573 Let yylex return it instead of a plain 0.
19574 Reported by Dick Streefland.
19575
19576 2001-11-02 Akim Demaille <akim@epita.fr>
19577
19578 * tests/regression.at (Mixing %token styles): New test.
19579
19580 2001-11-02 Akim Demaille <akim@epita.fr>
19581
19582 * src/reader.c (parse_thong_decl): Formatting changes.
19583 (token_translations_init): New, extracted from...
19584 (packsymbols): Here.
19585 Adjust.
19586
19587 2001-11-01 Akim Demaille <akim@epita.fr>
19588
19589 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19590 Check that `9foo.y' produces correct cpp guards.
19591 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19592 guards.
19593 Reported by Wwp.
19594
19595 2001-11-01 Akim Demaille <akim@epita.fr>
19596
19597 * tests/regression.at (Invalid input: 2): New.
19598 * src/lex.c (unlexed_token_buffer): New.
19599 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19600 too.
19601 Reported by Wwp.
19602
19603 2001-11-01 Akim Demaille <akim@epita.fr>
19604
19605 * tests/calc.at: Catch up with 1.30.
19606 * configure.in: Bump to 1.49a.
19607 Adjust to newer Autotest.
19608
19609 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
19610
19611 * src/conflicts.c: Move global variables rrc_total and src_total ...
19612 (print_conflicts): here.
19613 * src/output.c (output): Free global variable user_toknums.
19614 * src/lex.c (token_obstack): Become static.
19615
19616 2001-10-18 Akim Demaille <akim@epita.fr>
19617
19618 * tests/atlocal.in (GCC): Add.
19619 * tests/calc.at: s/m4_match/m4_bmatch/.
19620 s/m4_patsubst/m4_bpatsubst/.
19621 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19622 * configure.in: AC_SUBST(GCC).
19623
19624 2001-10-14 Marc Autret <autret_m@epita.fr>
19625
19626 * src/options.c (create_long_option_table): Fix.
19627
19628 2001-10-10 Akim Demaille <akim@epita.fr>
19629
19630 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19631
19632 2001-10-04 Akim Demaille <akim@epita.fr>
19633
19634 * src/reader.c (parse_union_decl): Push the caracters in
19635 union_obstack, not attrs_obstack.
19636
19637 2001-10-04 Akim Demaille <akim@epita.fr>
19638
19639 Merge in the branch 1.29.
19640
19641 * src/reader.c (packsymbols): Use a temporary obstack for
19642 `%%tokendef', since output_stack is already used elsewhere.
19643
19644 2001-10-02 Akim Demaille <akim@epita.fr>
19645
19646 Bump 1.29d.
19647
19648 2001-10-02 Akim Demaille <akim@epita.fr>
19649
19650 Version 1.29c.
19651
19652 2001-10-02 Akim Demaille <akim@epita.fr>
19653
19654 * tests/regression.at (Invalid CPP headers): New.
19655 From Alexander Belopolsky.
19656 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19657
19658 2001-10-02 Akim Demaille <akim@epita.fr>
19659
19660 * tests/regression.at (Invalid input): New.
19661 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19662 Reported by Shura.
19663
19664 2001-10-02 Akim Demaille <akim@epita.fr>
19665
19666 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19667
19668 2001-10-02 Akim Demaille <akim@epita.fr>
19669
19670 * src/output.c (output_parser): Assert `skeleton'.
19671 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19672 systems.
19673 From Shura.
19674
19675 2001-10-01 Marc Autret <autret_m@epita.fr>
19676
19677 * src/lex.h: Echo modifications.
19678 * src/lex.c (unlex): Parameter is now token_t.
19679 From Hans Aberg.
19680
19681 2001-10-01 Marc Autret <autret_m@epita.fr>
19682
19683 * src/main.c: Include lex.h.
19684 From Hans Aberg.
19685
19686 2001-09-29 Akim Demaille <akim@epita.fr>
19687
19688 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19689
19690 2001-09-28 Akim Demaille <akim@epita.fr>
19691
19692 * tests/testsuite.at: Update to newer Autotest.
19693 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19694
19695 2001-09-27 Akim Demaille <akim@epita.fr>
19696
19697 Position independent wrapper.
19698
19699 * tests/bison: Remove.
19700 * tests/bison.in: New.
19701 * configure.in: Adjust.
19702
19703 2001-09-27 Paul Eggert <eggert@twinsun.com>
19704
19705 Port quotearg fixes from tar 1.13.24.
19706
19707 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19708 tm to be declared.
19709 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19710 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19711
19712 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19713 * m4/mbrtowc.m4: New file.
19714 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19715 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19716
19717 2001-09-27 Akim Demaille <akim@epita.fr>
19718
19719 Bump to 1.29c.
19720
19721 2001-09-27 Akim Demaille <akim@epita.fr>
19722
19723 Version 1.29b.
19724
19725 2001-09-25 Akim Demaille <akim@epita.fr>
19726
19727 * src/system.h: Include `xalloc.h'.
19728 Remove it from the C files.
19729 * src/files.c (output_files): Free the obstacks.
19730 * src/lex.c (init_lex): Rename as...
19731 (lex_init): this.
19732 (lex_free): New.
19733 * src/main.c (main): Use it.
19734
19735 2001-09-24 Marc Autret <autret_m@epita.fr>
19736
19737 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19738 to output informations in fout (FILE*).
19739 (open_graph, close_graph): Likewise.
19740 (output_graph, output_edge, output_node): Likewise.
19741 * src/vcg.h: Update function prototypes.
19742 * src/print_graph.c (print_graph): Open output graph file.
19743 (print_actions): Adjust.
19744 * src/files.h: Remove extern declaration.
19745 * src/files.c: Remove graph_obstack declaration.
19746 (open_files): Remove graph_obstack initialization.
19747 (output_files): Remove graph_obstack saving.
19748
19749 2001-09-24 Marc Autret <autret_m@epita.fr>
19750
19751 * src/files.c (compute_output_file_names): Fix.
19752
19753 2001-09-24 Marc Autret <autret_m@epita.fr>,
19754 Akim Demaille <akim@epita.fr>
19755
19756 * src/reader.c (reader): Remove call to free_symtab ().
19757 * src/main.c (main): Call it here.
19758 Include symtab.h.
19759 * src/conflicts.c (initialize_conflicts): Rename as...
19760 (solve_conflicts): this.
19761 * src/print.c (print_core, print_actions, print_state)
19762 (print_grammar): Dump to a file instead a `output_obstack'.
19763 (print_results): Dump `output_obstack', and then proceed with the
19764 FILE *.
19765 * src/files.c (compute_output_file_names, close_files): New.
19766 (output_files): Adjust.
19767 * src/main.c (main): Adjust.
19768
19769 2001-09-23 Marc Autret <autret_m@epita.fr>
19770
19771 * src/files.c (compute_header_macro): Computes header macro name
19772 from spec_defines_file when given.
19773
19774 2001-09-23 Marc Autret <autret_m@epita.fr>
19775
19776 * src/files.c (output_files): Add default extensions.
19777
19778 2001-09-22 Akim Demaille <akim@epita.fr>
19779
19780 * src/conflicts.c (finalize_conflicts): Rename as...
19781 (free_conflicts): this.
19782
19783 2001-09-22 Akim Demaille <akim@epita.fr>
19784
19785 * src/gram.c (gram_free): Rename back as...
19786 (dummy): this.
19787 (output_token_translations): Free `token_translations'.
19788 * src/symtab.c (free_symtab): Free the tag field.
19789
19790 2001-09-22 Akim Demaille <akim@epita.fr>
19791
19792 Remove `translations' as it is always set to true.
19793
19794 * src/gram.h: Adjust.
19795 * src/reader.c (packsymbols, parse_token_decl): Adjust
19796 * src/print.c (print_grammar): Adjust.
19797 * src/output.c (output_token_translations): Adjust.
19798 * src/lex.c (lex): Adjust.
19799 * src/gram.c: Be sure the set pointers to NULL.
19800 (dummy): Rename as...
19801 (gram_free): this.
19802
19803 2001-09-22 Akim Demaille <akim@epita.fr>
19804
19805 * configure.in: Invoke AM_LIB_DMALLOC.
19806 * src/system.h: Use dmalloc.
19807 * src/LR0.c: Be sure to have pointers initialized to NULL.
19808 (allocate_itemsets): Allocate kernel_items only if needed.
19809
19810 2001-09-22 Akim Demaille <akim@epita.fr>
19811
19812 * configure.in: Bump to 1.29b.
19813 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19814 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19815 need xmalloc.c in calc.y.
19816 From Pascal Bart.
19817
19818 2001-09-21 Akim Demaille <akim@epita.fr>
19819
19820 Version 1.29a.
19821 * Makefile.maint, config/config.guess, config/config.sub,
19822 * config/missing: Update from masters.
19823 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19824 upon package.m4.
19825 * configure.in (ALL_LINGUAS): Add `tr'.
19826
19827 2001-09-21 Akim Demaille <akim@epita.fr>
19828
19829 * tests/Makefile.am (package.m4): Move to...
19830 ($(srcdir)/$(TESTSUITE)): here.
19831
19832 2001-09-20 Akim Demaille <akim@epita.fr>
19833
19834 * src/complain.c: No longer try to be standalone: use system.h.
19835 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19836 * src/complain.h: Likewise.
19837 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19838 Remove the unused variable `n'.
19839 From Albert Chin-A-Young.
19840
19841 2001-09-18 Marc Autret <autret_m@epita.fr>
19842
19843 * doc/bison.1: Update.
19844 * doc/bison.texinfo (Bison Options): Update --defines and --graph
19845 descriptions.
19846 (Option Cross Key): Update.
19847 Add --graph.
19848
19849 2001-09-18 Marc Autret <autret_m@epita.fr>
19850
19851 * tests/regression.at: New test (comment in %union).
19852
19853 2001-09-18 Marc Autret <autret_m@epita.fr>
19854
19855 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
19856 do that.
19857 Reported by Keith Browne.
19858
19859 2001-09-18 Marc Autret <autret_m@epita.fr>
19860
19861 * tests/output.at: Add tests for --defines and --graph.
19862
19863 2001-09-18 Marc Autret <autret_m@epita.fr>
19864
19865 * tests/output.at: Removes tests of %{header,src}_extension features.
19866
19867 2001-09-18 Akim Demaille <akim@epita.fr>
19868
19869 * tests/Makefile.am (package.m4): New.
19870 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
19871 (_AT_CHECK_CALC_ERROR): Likewise.
19872 Factor the `, ' part of verbose error messages.
19873
19874 2001-09-18 Marc Autret <autret_m@epita.fr>
19875
19876 * src/getargs.c (longopts): Declare --defines and --graph as options
19877 with optional arguments.
19878 * src/files.h: Add extern declarations.
19879 * src/files.c (spec_graph_file, spec_defines_file): New.
19880 (output_files): Update.
19881 Remove CPP-outed code.
19882
19883 2001-09-18 Marc Autret <autret_m@epita.fr>
19884
19885 Turn off %{source,header}_extension feature.
19886
19887 * src/files.c (compute_exts_from_gf): Update.
19888 (compute_exts_from_src): Update.
19889 (output_files): CPP-out useless code.
19890 * src/files.h: Remove {header,source}_extension extern declarations.
19891 * src/reader.c (parse_dquoted_param): CPP-out.
19892 (parse_header_extension_decl): Remove.
19893 (parse_source_extension_decl): Remove.
19894 (read_declarations): Remove cases tok_{hdrext,srcext}.
19895 * src/lex.c (percent_table): Remove {header,source}_extension entries.
19896 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
19897
19898 2001-09-10 Akim Demaille <akim@epita.fr>
19899
19900 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
19901 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
19902 (AT_CHECK_OUTPUT): this.
19903 Merely check ls' exit status, its output is useless.
19904
19905 2001-09-10 Akim Demaille <akim@epita.fr>
19906
19907 * tests/calc.at: Use m4_match.
19908 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
19909
19910 2001-09-10 Marc Autret <autret_m@epita.fr>,
19911 Akim Demaille <akim@epita.fr>
19912
19913 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
19914 enum color_e.
19915 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
19916 to `normal'.
19917 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
19918 * src/lex.h: Adjust prototype.
19919 (token_t): Add `tok_undef'.
19920 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
19921 (parse_percent_token): Now returns token_t.
19922 Add default statement in switch.
19923 (lex): Separate `c' as an input variable, from the token_t result
19924 part.
19925 (unlexed): Is a token_t.
19926
19927 2001-09-10 Akim Demaille <akim@epita.fr>
19928
19929 * configure.in: Bump to 1.29a.
19930
19931 2001-09-07 Akim Demaille <akim@epita.fr>
19932
19933 Version 1.29.
19934
19935 2001-08-30 Akim Demaille <akim@epita.fr>
19936
19937 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
19938 * m4/atconfig.m4: Remove.
19939 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
19940 * tests/bison: New.
19941 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
19942 m4_if, m4_patsubst, and m4_regexp.
19943 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
19944 `input' file instead of echo.
19945
19946 2001-08-29 Akim Demaille <akim@epita.fr>
19947
19948 Bump to 1.28e.
19949
19950 2001-08-29 Akim Demaille <akim@epita.fr>
19951
19952 Version 1.28d.
19953
19954 2001-08-29 Paul Eggert <eggert@twinsun.com>
19955
19956 * src/bison.simple (yyparse): Don't take the address of an
19957 item before the start of an array, as that doesn't conform to
19958 the C Standard.
19959
19960 2001-08-29 Robert Anisko <anisko_r@epita.fr>
19961
19962 * doc/bison.texinfo (Location Tracking Calc): New node.
19963
19964 2001-08-29 Paul Eggert <eggert@twinsun.com>
19965
19966 * src/output.c (output): Do not define const, as this now
19967 causes more problems than it cures.
19968
19969 2001-08-29 Akim Demaille <akim@epita.fr>
19970
19971 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
19972 the nodes.
19973 Be sure to tag the `detailmenu'.
19974
19975 2001-08-29 Akim Demaille <akim@epita.fr>
19976
19977 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
19978 download in a tmp dir.
19979
19980 2001-08-28 Marc Autret <autret_m@epita.fr>
19981
19982 * config/depcomp: New file.
19983
19984 2001-08-28 Marc Autret <autret_m@epita.fr>
19985
19986 * doc/bison.1 (mandoc): Adjust.
19987 From Juan Manuel Guerrero.
19988
19989 2001-08-28 Marc Autret <autret_m@epita.fr>
19990
19991 * src/print_graph.c (print_state): Fix.
19992
19993 2001-08-27 Marc Autret <autret_m@epita.fr>
19994
19995 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
19996 char * members.
19997 Echo modifications to the functions prototypes.
19998 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
19999
20000 2001-08-27 Marc Autret <autret_m@epita.fr>
20001
20002 * src/vcg.c: Include `xalloc.h'.
20003 (add_colorentry): New.
20004 (add_classname): New.
20005 (add_infoname): New.
20006 * src/vcg.h: Add new prototypes.
20007
20008 2001-08-27 Akim Demaille <akim@epita.fr>
20009
20010 * Makefile.maint: Sync. again with CVS Autoconf.
20011
20012 2001-08-27 Akim Demaille <akim@epita.fr>
20013
20014 * Makefile.maint: Formatting changes.
20015 (po-update, cvs-update, update): New targets.
20016 (AMTAR): Remove.
20017
20018 2001-08-27 Akim Demaille <akim@epita.fr>
20019
20020 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20021 * Makefile.maint: Sync. with CVS Autoconf.
20022
20023 2001-08-27 Marc Autret <autret_m@epita.fr>
20024
20025 * src/vcg.h (struct infoname_s): New.
20026 (struct colorentry_s): New.
20027 (graph_s): New fields {vertical,horizontal}_order in structure.
20028 Add `infoname' field.
20029 Add `colorentry' field;
20030 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20031 (G_HORIZONTAL_ORDER): New.
20032 (G_INFONAME): New.
20033 (G_COLORENTRY): New.
20034 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20035 Add output of `infoname'.
20036 Add output of `colorentry'.
20037
20038 2001-08-27 Marc Autret <autret_m@epita.fr>
20039
20040 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20041 This one shadowed a global parameter.
20042
20043 2001-08-24 Marc Autret <autret_m@epita.fr>
20044
20045 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20046 instead of `unsigned'.
20047 (print_state): Do not call obstack_object_size () in obstack_grow ()
20048 to avoid macro variables shadowing.
20049
20050 2001-08-23 Marc Autret <autret_m@epita.fr>
20051
20052 * src/lex.c (percent_table): Typo: s/naem/name/.
20053 Add graph option.
20054 Normalize new options declarations.
20055
20056 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20057
20058 * tests/suite.at: Exercise %header_extension and %source_extension.
20059
20060 2001-08-16 Marc Autret <autret_m@epita.fr>
20061
20062 * src/reader.c (parse_dquoted_param): New.
20063 (parse_header_extension_decl): Use it.
20064 (parse_source_extension_decl): Likewise.
20065
20066 2001-08-16 Marc Autret <autret_m@epita.fr>
20067
20068 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20069 (get_xxxx_str): Use assert () instead of complain ().
20070 Remove return invokations in default cases.
20071 (get_decision_str): Modify default behaviour. Remove second argument.
20072 Echo modifications on calls.
20073 (output_graph): Fix.
20074
20075 2001-08-16 Marc Autret <autret_m@epita.fr>
20076
20077 * src/getargs.c (usage): Update with ``-g, --graph''.
20078
20079 2001-08-16 Marc Autret <autret_m@epita.fr>
20080
20081 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20082 (Option Cross Key): Likewise.
20083 * doc/bison.1: Update.
20084
20085 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20086
20087 * src/output.c (output_master_parser): Don't finish action_obstack.
20088 (output_parser): Don't care about the muscle action, here.
20089 (prepare): Copy the action_obstack in the action muscle.
20090 (output): Free action_obstack.
20091
20092 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20093
20094 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20095 will contain `%union' declaration.
20096 (parse_union_decl): Delete #line directive output.
20097 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20098 informations about %union.
20099 (parse_union_decl): Copy the union_obstack in the muscle stype.
20100 * src/bison.simple: Add new #line directive.
20101 Add typdef %%stype YYSTYPE.
20102
20103 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20104
20105 * src/bison.simple: Add new `#line' directive.
20106
20107 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20108
20109 * src/bison.simple: New `#line' directive.
20110 * src/output.c (output_parser): Support new dynamic muscle input_line.
20111
20112 2001-09-22 Marc Autret <autret_m@epita.fr>
20113
20114 * src/output.c (output_master_parser): New.
20115 (output_parser): Be more re-entrant.
20116
20117 2001-09-21 Marc Autret <autret_m@epita.fr>
20118
20119 * src/reader.c (copy_definition, parse_union_decl): Update and use
20120 `linef' muscle.
20121 (copy_action): Likewise.
20122 Use obstack_1grow ().
20123 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20124
20125 2001-09-21 Marc Autret <autret_m@epita.fr>
20126
20127 * src/options.c (option_table): Adjust.
20128 * src/lex.c (parse_percent_token): Fix.
20129
20130 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20131
20132 * src/options.c (symtab.h): Include it, need by lex.h.
20133
20134 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20135
20136 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20137 is now an option_table_struct*.
20138 (option_strcmp): New function option_strcmp.
20139 (parse_percent_token): Call option_strcmp.
20140 * src/getargs.c (xalloc.h, options.h): Include it.
20141 (getargs): Call create_long_option_table.
20142 (getargs): Free longopts at the end of the function.
20143 (shortopts): Move in options.c.
20144 * src/options.c (create_long_option_table): New function. Convert
20145 information from option_table to option structure.
20146 * src/reader.c (options.h): Include it.
20147
20148 * src/Makefile.am: Adjust.
20149 * src/options.c (option_table): Create from longopts and percent_table.
20150 * src/getargs.c (longopts): Delete.
20151 * src/lex.c (struct percent_table_struct): Delete.
20152 (percent_table): Delete.
20153 (options.h): Include it.
20154 * src/options.c: Create.
20155 * src/options.h: Create.
20156 Declare enum opt_access_e.
20157 Define struct option_table_struct.
20158
20159 2001-09-20 Marc Autret <autret_m@epita.fr>
20160
20161 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20162 sections of Bison.
20163
20164 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20165
20166 * src/bison.simple: s/%%filename/%%skeleton.
20167 * src/muscle_tab.c (getargs.h): Include it.
20168 (muscle_init): Insert new muscle skeleton.
20169
20170 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20171
20172 * src/output.c (output_parser): Delete unused variable actions_dumped.
20173
20174 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20175
20176 * src/output.c (output): Delete call to reader_output_yylsp.
20177 * src/reader.c (reader): Likewise.
20178 * src/reader.h: Delete declaration of reader_output_yylsp.
20179
20180 2001-09-02 Marc Autret <autret_m@epita.fr>
20181
20182 * src/reader.c: Include muscle_tab.h.
20183 (parse_union_decl): Update.
20184 (parse_macro_decl): Rename parse_muscle_decl.
20185 Update to use renamed functions and variable.
20186 (read_declarations, copy_action, read_additionnal_code, : Updated
20187 with correct variables and functions names.
20188 (packsymbols, reader): Likewise.
20189
20190 * src/reader.h (muscle_obstack): Extern declaration update.
20191
20192 * src/output.c: Include muscle_tab.h
20193 In all functions using macro_insert, change by using muscle_insert ().
20194 (macro_obstack): Rename muscle_obstack.
20195 Echo modifications in the whole file.
20196 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20197 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20198 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20199
20200 * src/muscle_tab.h: Update double inclusion macros.
20201 (macro_entry_s): Rename muscle_entry_s.
20202 Update prototypes.
20203
20204 * src/muscle_tab.c: Include muscle_tab.h.
20205 Rename macro_tabble to muscle_table.
20206 (mhash1, mhash2, mcmp): Use muscle_entry.
20207 (macro_init): Rename muscle_init. Update.
20208 (macro_insert): Rename muscle_insert. Update.
20209 (macro_find): Rename muscle_find. Update.
20210
20211 * src/main.c: Include muscle_tab.h.
20212 (main): Call muscle_init ().
20213 * src/Makefile.am (bison_SOURCES): Echo modifications.
20214
20215 2001-09-02 Marc Autret <autret_m@epita.fr>
20216
20217 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20218
20219 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20220
20221 2001-09-02 Marc Autret <autret_m@epita.fr>
20222
20223 * src/macrotab.c, src/macrotab.h: Remove.
20224
20225 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20226
20227 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20228 filename.
20229
20230 2001-09-01 Marc Autret <autret_m@epita.fr>
20231
20232 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20233 to an explicit value to activate the feature. We do it here.
20234
20235 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20236
20237 * src/output.c (prepare): Delete the `filename' muscule insertion.
20238 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20239 (parse_union_decl): Likewise.
20240 * src/macrotab.c (macro_init): Initialize filename by infile.
20241
20242 2001-08-31 Marc Autret <autret_m@epita.fr>
20243
20244 * src/bison.simple (YYLSP_NEEDED): New definition.
20245 * src/output.c (prepare): Add macro insertion of `locations_flag'
20246
20247 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20248
20249 * src/output.c (prepare): Delete insertion of previous muscles,
20250 and insert the `prefix' muscles.
20251 * src/macrotab.c (macro_init): Likewise.
20252 (macro_init): Initialization prefix directive by `yy'.
20253 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20254 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20255 yylval, yydebug, yyerror, yynerrs and yyparse.
20256 New directive `#define' to substitute yydebug, ... with option
20257 name_prefix.
20258
20259 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20260
20261 * src/main.c (main): Standardize.
20262 * src/output.c (output_table_data, output_parser): Likewise.
20263 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20264
20265 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20266
20267 * src/reader.c (read_additionnal_code): Rename %%user_code to
20268 %%epilogue.
20269 * src/output.c (output): Rename %%declarations to %%prologue.
20270 * src/bison.simple: Echo modifications.
20271
20272 2001-08-31 Marc Autret <autret_m@epita.fr>
20273
20274 * src/reader.c (readgram): CleanUp.
20275 (output_token_defines): Likewise.
20276 (packsymbols): Likewise.
20277 (reader): Likewise.
20278 * src/output.c (output): CPP-out useless code.
20279
20280 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20281
20282 * src/reader.c (reader): Delete obsolete call to function
20283 output_trailers and output_headers.
20284 * src/output.h: Remove obsolete functions prototypes of output_headers
20285 and output_trailers.
20286
20287 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20288
20289 * src/main.c: Include macrotab.h.
20290 * src/macrotab.h (macro_entry_s): Constify fields.
20291 Adjust functions prototypes.
20292 * src/macrotab.c (macro_insert): Constify key and value.
20293 (macro_find): Constify key.
20294 (macro_insert): Include 'xalloc.h'
20295 (macro_insert): Use XMALLOC.
20296 (macro_find): Constify return value.
20297 * src/output.c (output_table_data): Rename table to table_data.
20298 (output_parser): Constify macro_key, macro_value.
20299
20300 2001-08-30 Marc Autret <autret_m@epita.fr>
20301
20302 * src/reader.c (parse_skel_decl): New.
20303 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20304 * src/lex.h (token_t): New token `tok_skel'.
20305 * src/lex.c (percent_table): Add skeleton option entry.
20306 Standardize.
20307
20308 2001-08-29 Marc Autret <autret_m@epita.fr>
20309
20310 * src/bison.simple: Add %%user_code directive at the end.
20311 * src/reader.c (read_additionnal_code): New.
20312 (reader): Use it.
20313 * src/output.c (output_program): Remove.
20314 (output): Update.
20315
20316 2001-08-28 Marc Autret <autret_m@epita.fr>
20317
20318 * src/output.c (output_actions): Clean up.
20319 (output_gram): CPP-out useless code.
20320 * src/reader.c (reader): Clean up, CPP-out useless code.
20321
20322 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20323
20324 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20325 directive.
20326 * src/bison.simple: Add `%%definitions'.
20327
20328 2001-08-28 Marc Autret <autret_m@epita.fr>
20329
20330 * config/depcomp: New file.
20331
20332 2001-08-27 Paul Eggert <eggert@twinsun.com>
20333
20334 * src/bison.simple (yyparse): Don't take the address of an
20335 item before the start of an array, as that doesn't conform to
20336 the C Standard.
20337
20338 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20339
20340 * src/output.c (output): Remove the initialization of the macro
20341 obstack. It was done too late here.
20342
20343 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20344 completely wrong.
20345 (reader): Initialize the macro obstack here, since we need it to grow
20346 '%define' directives.
20347
20348 * src/reader.h: Declare the macro obstack as extern.
20349
20350 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20351
20352 * src/output.c (output_parser): Fix. Store single '%' characters in
20353 the output obstack instead of throwing them away.
20354
20355 2001-08-27 Akim Demaille <akim@epita.fr>
20356
20357 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20358
20359 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20360
20361 * lib/Makefile.am: Adjust.
20362
20363 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20364
20365 * src/bison.simple: Update and add '%%' directives.
20366
20367 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20368
20369 * src/reader.c (reader): Remove calls to 'output_headers' and
20370 'output_trailers'. Remove some C output.
20371 (readgram): Disable a piece of code that was writing a default
20372 definition for 'YYSTYPE'.
20373 (reader_output_yylsp): Remove.
20374 (packsymbols): Output token defintions to a macro.
20375 (copy_definition): Disable C output.
20376
20377 * src/reader.c (parse_macro_decl): New function used to parse macro
20378 declarations.
20379 (copy_string2): Put the body of copy_string into this new function.
20380 Add a parameter to let the caller choose whether he wants to copy the
20381 string delimiters or not.
20382 (copy_string): Be a simple call to copy_string2 with the last argument
20383 bound to true.
20384 (read_declarations): Add case for macro definition.
20385 (copy_identifier): New.
20386 (parse_macro_decl): Read macro identifiers using copy_identifier
20387 rather than lex.
20388
20389 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20390
20391 * src/output.c (prepare): Add prefixed names.
20392 (output_parser): Output semantic actions.
20393 (output_parser): Fix bug on '%%line' directives.
20394
20395 * src/output.c (output_headers): Remove. The C code printed by this
20396 function should now be in the skeletons.
20397 (output_trailers): Remove.
20398 (output): Disable call to 'reader_output_yylsp'.
20399 (output_rule_data): Do not output tables to the table obstack.
20400
20401 * src/output.c: Remove some C dedicated output.
20402 Improve the use of macro and output obstacks.
20403 (output_defines): Remove.
20404
20405 * src/output.c (output_token_translations): Associate 'translate'
20406 table with a macro. No output to the table obstack.
20407 (output_gram): Same for 'rhs' and 'prhs'.
20408 (output_stos): Same for 'stos'.
20409 (output_rule_data): Same for 'r1' and 'r2'.
20410 (token_actions): Same for 'defact'.
20411 (goto_actions): Same for 'defgoto'.
20412 (output_base): Same for 'pact' and 'pgoto'.
20413 (output_table): Same for 'table'.
20414 (output_check): Same for 'check'.
20415
20416 * src/output.c (output_table_data): New function.
20417 (output_short_table): Remove.
20418 (output_short_or_char_table): Remove.
20419
20420 * src/output.c (output_parser): Replace most of the skeleton copy code
20421 with something new. Skeletons are now processed character by character
20422 rather than line by line, and Bison looks for '%%' macros. This is the
20423 first step in making Bison's output process (a lot) more flexible.
20424 (output_parser): Use the macro table.
20425
20426 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20427
20428 * src/main.c (main): Initialize the macro table.
20429
20430 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20431
20432 * src/lex.c (percent_table): Add tok_define.
20433 * src/lex.h: Add tok_define.
20434
20435 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20436
20437 * src/macrotab.c: New file.
20438 * src/macrotab.h: New file.
20439 * src/Makefile.am: Update.
20440
20441 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20442
20443 * lib/hash.c: New file.
20444 * lib/hash.h: New file.
20445 * lib/Makefile.am: Update.
20446
20447 2001-08-15 Akim Demaille <akim@epita.fr>
20448
20449 Version 1.28c.
20450
20451 2001-08-15 Marc Autret <autret_m@epita.fr>
20452
20453 * src/reader.c (readgram): Indent output macro YYSTYPE.
20454 (packsymbols): Likewise.
20455 (output_token_defines): Likewise.
20456 * src/files.c: Standardize.
20457 (compute_header_macro): New.
20458 (defines_obstack_save): New. Use compute_header_macro.
20459 (output_files): Update. Use defines_obstack_save.
20460
20461 2001-08-15 Akim Demaille <akim@epita.fr>
20462
20463 * doc/bison.texinfo (Table of Symbols): Document
20464 YYSTACK_USE_ALLOCA.
20465
20466 2001-08-15 Akim Demaille <akim@epita.fr>
20467
20468 * missing: Update from CVS Automake.
20469 * config/config.guess, config/config.sub, config/texinfo.tex:
20470 Update from gnu.org.
20471
20472 2001-08-15 Akim Demaille <akim@epita.fr>
20473
20474 * Makefile.maint: Sync with CVS Autoconf.
20475
20476 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20477
20478 * doc/bison.texinfo: Include GNU Free Documentation License from
20479 `fdl.texi'.
20480 * doc/fdl.texi: Add to package.
20481
20482 2001-08-14 Marc Autret <autret_m@epita.fr>
20483
20484 Turn on %{source,header}_extension features.
20485
20486 * src/lex.c (percent_table): Un-CPP out header_extension and
20487 source_extension.
20488 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20489 (compute_exts_from_src): Remove conditions. It restores priorities
20490 between options.
20491
20492 2001-08-14 Marc Autret <autret_m@epita.fr>
20493
20494 * src/files.c (compute_base_names): Add extensions computing when
20495 `--file-prefix' used.
20496 Standardize function calls.
20497
20498 2001-08-13 Marc Autret <autret_m@epita.fr>
20499
20500 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20501 defining it (defined but null disables alloca).
20502
20503 2001-08-13 Marc Autret <autret_m@epita.fr>
20504
20505 * src/bison.simple (_yy_memcpy): CPP reformat.
20506
20507 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20508
20509 * tests/atconfig.in (CPPFLAGS): Fix.
20510
20511 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
20512
20513 * doc/bison.texinfo: Include GNU General Public License from
20514 `gpl.texi'.
20515 * doc/gpl.texi: Add to package.
20516
20517 2001-08-10 Marc Autret <autret_m@epita.fr>
20518
20519 * src/print_graph.h: Fix.
20520 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20521
20522 2001-08-10 Akim Demaille <akim@epita.fr>
20523
20524 * src/system.h: Provide default declarations for stpcpy, strndup,
20525 and strnlen.
20526
20527 2001-08-10 Robert Anisko <anisko_r@epita.fr>
20528
20529 * doc/bison.texinfo (Locations): Update @$ stuff.
20530
20531 2001-08-09 Robert Anisko <anisko_r@epita.fr>
20532
20533 * src/bison.simple (YYLLOC_DEFAULT): Update.
20534 (yyparse): Adjust.
20535
20536 2001-08-08 Marc Autret <autret_m@epita.fr>
20537
20538 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
20539 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20540 Reported by Fabrice Bauzac.
20541
20542 2001-08-08 Marc Autret <autret_m@epita.fr>
20543
20544 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20545 * src/vcg.c (output_node): Fix.
20546 * src/vcg.h: Cleanup.
20547 * src/print_graph.c: Add comments.
20548 (node_output_size): New global variable. Simplify the formatting of
20549 the VCG graph output.
20550 (print_actions): Unused code is now used. It notifies the final state
20551 and no action states in the VCG graph. It also give the reduce actions.
20552 The `shift and goto' edges are red and the `go to state' edges are
20553 blue.
20554 Get the current node name and node_obstack by argument.
20555 (node_obstack): New variable.
20556 (print_state): Manage node_obstack.
20557 (print_core): Use node_obstack given by argument.
20558 A node is not only computed here but in print_actions also.
20559 (print_graph): CPP out useless code instead of commenting it.
20560
20561 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
20562
20563 * tests/atconfig.in (CPPFLAGS): Fix.
20564
20565 2001-08-07 Akim Demaille <akim@epita.fr>
20566
20567 * src/print_graph.c (quote): New.
20568 (print_core): Use it.
20569
20570 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
20571
20572 * src/vcg.c (complain.h): Include it.
20573 Unepitaize `return' invocations.
20574 [NDEBUG] (main): Remove.
20575 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
20576 * src/files.c (open_files): Initialize graph_obstack.
20577 * src/print_graph.c (print_actions): CPP out useless code.
20578 (print_core): Don't output the last `\n' in labels.
20579 Use `quote'.
20580 * src/files.c (output_files): Output the VCG file.
20581 * src/main.c (main): Invoke print_graph ();
20582
20583 2001-08-06 Marc Autret <autret_m@epita.fr>
20584
20585 Automaton VCG graph output.
20586 Using option ``-g'' or long option ``--graph'', you can generate
20587 a gram_filename.vcg file containing a VCG description of the LALR (1)
20588 automaton of your grammar.
20589
20590 * src/main.c: Call to print_graph() function.
20591 * src/getargs.h: Update.
20592 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20593 (graph_flag): New flag.
20594 (longopts): Update.
20595 (getargs): Add case `g'.
20596 * src/files.c (graph_obstack): New obstack struct.
20597 (open_files): Initialize new obstack.
20598 (output_files): Saves graph_obstack if required.
20599 * src/files.h (graph_obstack): New extern declaration.
20600 * src/Makefile.am: Add new source files.
20601
20602 2001-08-06 Marc Autret <autret_m@epita.fr>
20603
20604 * src/print_graph.c, src/print_graph.h (graph): New.
20605 * src/vcg.h: New file.
20606 * src/vcg.c: New file, VCG graph handling.
20607
20608 2001-08-06 Marc Autret <autret_m@epita.fr>
20609
20610 Add of %source_extension and %header_extension which specify
20611 the source or/and the header output file extension.
20612
20613 * src/files.c (compute_base_names): Remove initialisation of
20614 src_extension and header_extension.
20615 (compute_exts_from_gf): Update.
20616 (compute_exts_from_src): Update.
20617 (output_files): Update.
20618 * src/reader.c (parse_header_extension_decl): New.
20619 (parse_source_extension_decl): New.
20620 (read_declarations): New case statements for the new tokens.
20621 * src/lex.c (percent_table): Add entries for %source_extension
20622 and %header_extension.
20623 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20624
20625 2001-08-06 Marc Autret <autret_m@epita.fr>
20626
20627 * configure.in: Bump to 1.28c.
20628 * doc/bison.texinfo: Texinfo thingies.
20629
20630 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
20631
20632 * tests/atconfig.in (CPPFLAGS): Add.
20633 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20634
20635 2001-08-03 Akim Demaille <akim@epita.fr>
20636
20637 Version 1.28b.
20638
20639 2001-08-03 Akim Demaille <akim@epita.fr>
20640
20641 * tests/Makefile.am (check-local): Ship testsuite.
20642 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20643 Include `string.h'.
20644
20645 2001-08-03 Akim Demaille <akim@epita.fr>
20646
20647 * configure.in: Try using -Wformat when compiling.
20648
20649 2001-08-03 Akim Demaille <akim@epita.fr>
20650
20651 * configure.in: Bump to 1.28b.
20652
20653 2001-08-03 Akim Demaille <akim@epita.fr>
20654
20655 * src/complain.c: Adjust strerror_r portability issues.
20656
20657 2001-08-03 Akim Demaille <akim@epita.fr>
20658
20659 Version 1.28a.
20660
20661 2001-08-03 Akim Demaille <akim@epita.fr>
20662
20663 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20664 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20665 * src/getargs.c: Include complain.h.
20666 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20667 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20668
20669 2001-08-03 Akim Demaille <akim@epita.fr>
20670
20671 * src/reader.c (readgram): Display hidden chars in error messages.
20672
20673 2001-08-03 Akim Demaille <akim@epita.fr>
20674
20675 Update to gettext 0.10.39.
20676
20677 2001-08-03 Akim Demaille <akim@epita.fr>
20678
20679 * lib/strspn.c: New.
20680
20681 2001-08-01 Marc Autret <autret_m@epita.fr>
20682
20683 * doc/bison.texinfo: Update.
20684 * doc/bison.1 (mandoc): Update.
20685 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20686 * src/files.c: Support output files extensions computing.
20687 (src_extension): New static variable.
20688 (header_extension): New static variable.
20689 (tr): New function.
20690 (get_extension_index): New function, gets the index of an extension
20691 filename in a string.
20692 (compute_exts_from_gf): New function, computes extensions from the
20693 grammar file extension.
20694 (compute_exts_from_src): New functions, computes extensions from the
20695 C source file extension, file given by ``-o'' option.
20696 (compute_base_names): Update.
20697 (output_files): Update.
20698
20699 2001-08-01 Robert Anisko <anisko_r@epita.fr>
20700
20701 * doc/bison.texi: Document @$.
20702 (Locations): New section.
20703
20704 2001-07-18 Akim Demaille <akim@epita.fr>
20705
20706 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20707 * config/prev-version.txt, config/move-if-change: New.
20708 * Makefile.am: Adjust.
20709
20710 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20711
20712 * src/bison.simple (yyparse): Suppress warning `comparaison
20713 between signed and unsigned'.
20714
20715 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
20716
20717 * src/getargs.h (raw_flag): Remove.
20718 * src/getargs.c: Die on `-r'/`--raw'.
20719 * src/lex.c (parse_percent_token): Die on `%raw'.
20720 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20721 * tests/calc.at: Suppress test with option `--raw'.
20722
20723 2001-07-14 Akim Demaille <akim@epita.fr>
20724
20725 * config/: New.
20726 * configure.in: Require Autoconf 2.50.
20727 Update to gettext 0.10.38.
20728
20729 2001-03-16 Akim Demaille <akim@epita.fr>
20730
20731 * doc/bison.texinfo: ANSIfy the examples.
20732
20733 2001-03-16 Akim Demaille <akim@epita.fr>
20734
20735 * getargs.c (skeleton): New variable.
20736 (longopts): --skeleton is a new option.
20737 (shortopts, getargs): -S is a new option.
20738 * getargs.h: Declare skeleton.
20739 * output.c (output_parser): Use it.
20740
20741 2001-03-16 Akim Demaille <akim@epita.fr>
20742
20743 * m4/strerror_r.m4: New.
20744 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20745 * lib/error.h, lib/error.c: Update.
20746
20747 2001-03-16 Akim Demaille <akim@epita.fr>
20748
20749 * src/getargs.c (longopts): Clean up.
20750
20751 2001-02-21 Akim Demaille <akim@epita.fr>
20752
20753 * src/reader.c (gensym): `gensym_count' is your own.
20754 Use a static buf to create the symbol name, as token_buffer is no
20755 longer a buffer.
20756
20757 2001-02-08 Akim Demaille <akim@epita.fr>
20758
20759 * src/conflicts.c (conflict_report): Be sure not to append to res
20760 between two calls, which could happen if both first sprintf were
20761 skipped, but not the first cp += strlen.
20762
20763 2001-02-08 Akim Demaille <akim@epita.fr>
20764
20765 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20766 New, from fileutils 4.0.37.
20767 * configure.in: Require Autoconf 2.49c. I took some time before
20768 making this decision. This is the only way out for portability
20769 issues in Bison, it would mean way too much duplicate effort to
20770 import in Bison features implemented in 2.49c since 2.13.
20771 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20772
20773 2001-02-02 Akim Demaille <akim@epita.fr>
20774
20775 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
20776 * lib/xalloc.h, lib/xmalloc.c: Update.
20777
20778 2001-01-19 Akim Demaille <akim@epita.fr>
20779
20780 Get rid of the ad hoc handling of token_buffer in the scanner: use
20781 the obstacks.
20782
20783 * src/lex.c (token_obstack): New.
20784 (init_lex): Initialize it. No longer call...
20785 (grow_token_buffer): this. Remove it.
20786 Adjust all the places which used it to use the obstack.
20787
20788 2001-01-19 Akim Demaille <akim@epita.fr>
20789
20790 * src/lex.h: Rename all the tokens:
20791 s/\bENDFILE\b/tok_eof/g;
20792 s/\bIDENTIFIER\b/tok_identifier/g;
20793 etc.
20794 Let them be enums, not #define, to ease debugging.
20795 Adjust all the code.
20796
20797 2001-01-18 Akim Demaille <akim@epita.fr>
20798
20799 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20800 * src/lex.c (maxtoken, grow_token_buffer): Static.
20801
20802 2001-01-18 Akim Demaille <akim@epita.fr>
20803
20804 Since we now use obstacks, more % directives can be enabled.
20805
20806 * src/lex.c (percent_table): Also accept `%yacc',
20807 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20808 `%debug'.
20809 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20810 instead of returning a token.
20811 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20812 * src/reader.c (read_declarations): Adjust.
20813 * src/files.c (open_files): Don't call `compute_base_names', don't
20814 compute `attrsfile' since they depend upon data which might be
20815 *in* the input file now.
20816 (output_files): Do it here.
20817 * src/output.c (output_headers): Document the fact that this patch
20818 introduces a guaranteed SEGV for semantic parsers.
20819 * doc/bison.texinfo: Document them.
20820 * tests/suite.at: Exercise these %options.
20821
20822 2000-12-20 Akim Demaille <akim@epita.fr>
20823
20824 Also handle the output file (--verbose) with obstacks.
20825
20826 * files.c (foutput): Remove.
20827 (output_obstack): New.
20828 Adjust all dependencies.
20829 * src/conflicts.c: Return a string.
20830 * src/system.h (obstack_grow_string): Rename as...
20831 (obstack_sgrow): this. Be ready to work with non literals.
20832 (obstack_fgrow4): New.
20833
20834 2000-12-20 Akim Demaille <akim@epita.fr>
20835
20836 * src/files.c (open_files): Fix the computation of short_base_name
20837 in the case of `-o foo.tab.c'.
20838
20839 2000-12-20 Akim Demaille <akim@epita.fr>
20840
20841 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20842 (copy_dollar): Now that everything uses obstacks, get rid of the
20843 FILE * parameters.
20844
20845 2000-12-20 Akim Demaille <akim@epita.fr>
20846
20847 * src/files.c (open_files): Actually the `.output' file is based
20848 on the short_base_name, not base_name.
20849 * tests/suite.at (Checking output file names): Adjust.
20850
20851 2000-12-20 Akim Demaille <akim@epita.fr>
20852
20853 * src/bison.s1: Remove, we now use directly...
20854 * src/bison.simple: this.
20855 * src/Makefile.am: Use pkgdata instead of data.
20856
20857 2000-12-20 Akim Demaille <akim@epita.fr>
20858
20859 * src/files.c (guard_obstack): New.
20860 (open_files): Initialize it.
20861 (output_files): Dump it...
20862 * src/files.h: Export it.
20863 * src/reader.c (copy_guard): Use it.
20864
20865 2000-12-19 Akim Demaille <akim@epita.fr>
20866
20867 * src/files.c (outfile, defsfile, actfile): Removed as global
20868 vars.
20869 (open_files): Don't compute them.
20870 (output_files): Adjust.
20871 (base_name, short_base_name): Be global.
20872 Adjust dependencies.
20873
20874 2000-12-19 Akim Demaille <akim@epita.fr>
20875
20876 * src/files.c (strsuffix): New.
20877 (stringappend): Be just like strcat but allocate.
20878 (base_names): Eve out from open_files.
20879 Try to simplify the rather hairy computation of base_name and
20880 short_base_name.
20881 (open_files): Use it.
20882 * tests/suite.at (Checking output file names): New test.
20883
20884 2000-12-19 Akim Demaille <akim@epita.fr>
20885
20886 * src/system.h (obstack_grow_literal_string): Rename as...
20887 (obstack_grow_string): this.
20888 * src/output.c (output_parser): Recognize `%% actions' instead of
20889 `$'.
20890 * src/bison.s1: s/$/%% actions/.
20891 * src/bison.hairy: Likewise.
20892
20893 2000-12-19 Akim Demaille <akim@epita.fr>
20894
20895 * src/output.c (output_parser): Compute the `#line' lines when
20896 there are.
20897 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
20898 Suggested by Hans Aberg.
20899
20900 2000-12-19 Akim Demaille <akim@epita.fr>
20901
20902 Let the handling of the skeleton files be local to the procedures
20903 that use it.
20904
20905 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
20906 longer static.
20907 (fparser, open_extra_files): Remove.
20908 (open_files, output_files): Don't take care of fparser.
20909 * src/files.h: Adjust.
20910 * src/output.c (output_parser): Open and close the file to the
20911 skeleton.
20912 * src/reader.c (read_declarations): When %semantic_parser, open
20913 fguard.
20914
20915 2000-12-19 Akim Demaille <akim@epita.fr>
20916
20917 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
20918 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
20919
20920 2000-12-19 Akim Demaille <akim@epita.fr>
20921
20922 * src/files.c (open_files): Yipee! We no longer need all the code
20923 looking for `/tmp' since we have no tmp file.
20924
20925 2000-12-19 Akim Demaille <akim@epita.fr>
20926
20927 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
20928 New macros.
20929 * src/files.c (open_files): Less dependency on MSDOS etc.
20930
20931 2000-12-14 Akim Demaille <akim@epita.fr>
20932
20933 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
20934 Provide a default definition.
20935 Use it when executing the default @ action.
20936 * src/reader.c (reader_output_yylsp): No longer include
20937 `timestamp' and `text' in the default YYLTYPE.
20938
20939 2000-12-12 Akim Demaille <akim@epita.fr>
20940
20941 * src/reader.c (copy_definition, parse_union_decl, copy_action)
20942 (copy_guard): Quote the file names.
20943 Reported by Laurent Mascherpa.
20944
20945 2000-12-12 Akim Demaille <akim@epita.fr>
20946
20947 * src/output.c (output_headers, output_program, output): Be sure
20948 to escape special characters when outputting filenames.
20949 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
20950 (output_headers): Don't depend on them, Use ACTSTR.
20951
20952 2000-11-17 Akim Demaille <akim@epita.fr>
20953
20954 * lib/obstack.h: Formatting changes.
20955 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
20956 prevents type checking.
20957 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20958 cast the value to (void *): assigning a `foo *' to a `void *'
20959 variable is valid.
20960 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20961 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
20962 append characters.
20963
20964 2000-11-17 Akim Demaille <akim@epita.fr>
20965
20966 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
20967 as...
20968 (suite.m4, regression.m4, calc.m4): these.
20969 * tests/atgeneral.m4: Update from CVS Autoconf.
20970
20971 2000-11-17 Akim Demaille <akim@epita.fr>
20972
20973 * tests/regression.m4 (%union and --defines): New test,
20974 demonstrating a current bug in the obstack implementation.
20975
20976 2000-11-17 Akim Demaille <akim@epita.fr>
20977
20978 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
20979 macros.
20980 Use them to declare the variables which are global or local to
20981 `yyparse'.
20982
20983 2000-11-17 Akim Demaille <akim@epita.fr>
20984
20985 * acconfig.h: Remove, no longer used.
20986
20987 2000-11-07 Akim Demaille <akim@epita.fr>
20988
20989 * src: s/Copyright (C)/Copyright/g.
20990
20991 2000-11-07 Akim Demaille <akim@epita.fr>
20992
20993 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
20994 defining.
20995 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
20996
20997 2000-11-07 Akim Demaille <akim@epita.fr>
20998
20999 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21000 Merge in a single CPP if/else.
21001
21002 2000-11-07 Akim Demaille <akim@epita.fr>
21003
21004 * src/output.c (output): Remove useless variables.
21005 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21006 argument `data' for consistency with the prototypes.
21007 Qualify it `const'.
21008 (obstack_copy, obstack_copy0): Rename the second argument as
21009 `address' for consistency. Qualify it `const'.
21010 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21011 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21012 `const' their input argument (`data' or `address').
21013 Adjust the corresponding macros to include `const' in casts.
21014
21015 2000-11-03 Akim Demaille <akim@epita.fr>
21016
21017 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21018 s/PFILE1/BISON_HAIRY/.
21019 Adjust dependencies.
21020
21021 2000-11-03 Akim Demaille <akim@epita.fr>
21022
21023 For some reason, this was not applied.
21024
21025 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21026 `unlink': it's no longer used.
21027
21028 2000-11-03 Akim Demaille <akim@epita.fr>
21029
21030 * src/files.c (skeleton_find): New function, eved out of...
21031 (open_files, open_extra_files): here.
21032
21033 2000-11-03 Akim Demaille <akim@epita.fr>
21034
21035 Don't use `atexit'.
21036
21037 * src/files.c (obstack_save): New function.
21038 (done): Rename as...
21039 (output_files): this.
21040 Use `obstack_save'.
21041 * src/main.c (main): Don't use `atexit' to register `done', since
21042 it no longer has to remove tmp files, just call `output_files'
21043 when there are no errors.
21044
21045 2000-11-02 Akim Demaille <akim@epita.fr>
21046
21047 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21048 `unlink': it's no longer used.
21049 * src/files.h: Formatting changes.
21050
21051 2000-11-02 Akim Demaille <akim@epita.fr>
21052
21053 Remove the last uses of mktemp and unlink/delete.
21054
21055 * src/files.c (fdefines, ftable): Removed.
21056 (defines_ostack, table_obstack): New.
21057 Adjust dependencies of the former into uses of the latter.
21058 * src/output.c (output_short_or_char_table, output_short_table):
21059 Convert to using obstacks.
21060 * src/reader.c (copy_comment2): Accept one FILE * and two
21061 obstacks.
21062 (output_token_defines, reader_output_yylsp): Use obstacks.
21063 * src/system.h (obstack_fgrow3): New.
21064 * po/POTFILES.in: Adjust.
21065
21066 2000-11-01 Akim Demaille <akim@epita.fr>
21067
21068 Change each use of `fattrs' into a use of `attrs_obstack'.
21069
21070 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21071 * src/files.c (fattrs): Remove.
21072 (attrs_obstack): New.
21073 Adjust all dependencies.
21074 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21075
21076 2000-11-01 Akim Demaille <akim@epita.fr>
21077
21078 Introduce obstacks.
21079 Change each use of `faction' into a use of `action_obstack'.
21080
21081 * lib/obstack.h, lib/obstack.c: New files.
21082 * src/files.c (faction): Remove.
21083 (action_obstack): New.
21084 Adjust all dependencies.
21085
21086 2000-10-20 Akim Demaille <akim@epita.fr>
21087
21088 * lib/quote.h (PARAMS): New macro. Use it.
21089
21090 2000-10-16 Akim Demaille <akim@epita.fr>
21091
21092 * src/output.c (output_short_or_char_table): New function.
21093 (output_short_table, output_token_translations): Use it.
21094 (goto_actions): Use output_short_table.
21095
21096 2000-10-16 Akim Demaille <akim@epita.fr>
21097
21098 * src/symtab.c (bucket_new): New function.
21099 (getsym): Use it.
21100
21101 * src/output.c (output_short_table): New argument to display the
21102 comment associated with the table.
21103 Adjust dependencies.
21104 (output_gram): Use it.
21105 (output_rule_data): Nicer output layout for YYTNAME.
21106
21107 2000-10-16 Akim Demaille <akim@epita.fr>
21108
21109 * src/lex.c (read_typename): New function.
21110 (lex): Use it.
21111 * src/reader.c (copy_dollar): Likewise.
21112
21113 2000-10-16 Akim Demaille <akim@epita.fr>
21114
21115 * src/reader.c (copy_comment2): Expect the input stream to be on
21116 the `/' which is suspected to open a comment, instead of being
21117 called after `//' or `/*' was read.
21118 (copy_comment, copy_definition, parse_union_decl, copy_action)
21119 (copy_guard): Adjust.
21120
21121 2000-10-16 Akim Demaille <akim@epita.fr>
21122
21123 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21124 `read_signed_integer'.
21125
21126 2000-10-16 Akim Demaille <akim@epita.fr>
21127
21128 * src/reader.c (copy_dollar): New function.
21129 (copy_guard, copy_action): Use it.
21130
21131 2000-10-16 Akim Demaille <akim@epita.fr>
21132
21133 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21134 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21135 New files, from Fileutils 4.0.27.
21136 * src/main.c (printable_version): Remove.
21137 * src/lex.c, src/reader.c: Use `quote'.
21138
21139 2000-10-04 Akim Demaille <akim@epita.fr>
21140
21141 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21142
21143 2000-10-04 Akim Demaille <akim@epita.fr>
21144
21145 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21146
21147 2000-10-04 Akim Demaille <akim@epita.fr>
21148
21149 When a literal string is used to define two different tokens,
21150 `bison -v' segfaults.
21151 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21152
21153 * tests/regression.m4: New file.
21154 Include the core of the sample provided by Piotr Gackiewicz.
21155 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21156 properly.
21157
21158 2000-10-04 Akim Demaille <akim@epita.fr>
21159
21160 * src/reader.c (parse_expect_decl): Keep `count' within the size
21161 of `buffer'.
21162 From Neil Booth.
21163
21164 2000-10-02 Paul Eggert <eggert@twinsun.com>
21165
21166 * bison.s1 (yyparse): Assign the default value
21167 unconditionally, to avoid a GCC warning and make the parser a
21168 tad smaller.
21169
21170 2000-10-02 Akim Demaille <akim@epita.fr>
21171
21172 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21173 options.
21174
21175 2000-10-02 Akim Demaille <akim@epita.fr>
21176
21177 * src/derives.c, src/print.c, src/reduce.c: To ease the
21178 translation, move some `\n' out of the translated strings.
21179
21180 2000-10-02 Akim Demaille <akim@epita.fr>
21181
21182 The location tracking mechanism is precious for parse error
21183 messages. Nevertheless, it is enabled only when `@n' is used in
21184 the grammar, which is a different issue (you can use it in error
21185 message, but not in the grammar per se). Therefore, there should
21186 be another means to enable it.
21187
21188 * src/getargs.c (getargs): Support `--locations'.
21189 (usage): Report it.
21190 * src/getargs.h (locationsflag): Export it.
21191 * src/lex.c (percent_table): Support `%locations'.
21192 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21193 with `locationsflag'.
21194 * doc/bison.texinfo: Document `--locations' and `%locations'.
21195 Sort the options.
21196 * tests/calc.m4: Test it.
21197
21198 For regularity of the names, replace each
21199 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21200 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21201 In addition replace each `flag' with `_flag'.
21202
21203 2000-10-02 Akim Demaille <akim@epita.fr>
21204
21205 Also test parse error messages, including with YYERROR_VERBOSE.
21206
21207 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21208 associative).
21209 Use it to check the computations.
21210 Use it to check `nonassoc' is honored.
21211 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21212 `--yyerror-verbose'.
21213 (_AT_CHECK_CALC): Adjust to this option.
21214 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21215
21216 2000-10-02 Akim Demaille <akim@epita.fr>
21217
21218 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21219 the latter demonstrates a flaw in the handling of non debugging
21220 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21221 was used in order to simplify:
21222
21223 #if YYDEBUG
21224 if (yydebug)
21225 {
21226 ...
21227 }
21228 #endif
21229
21230 into
21231
21232 if (yydebug)
21233 {
21234 ...
21235 }
21236
21237 unfortunately this leads to a CPP conflict when
21238 `--name-prefix=foo' is used since it produces `#define yydebug
21239 foodebug'.
21240
21241 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21242 (YYDPRINTF): New macro.
21243 Spread its use.
21244 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21245 the bison options.
21246 Also test `--verbose', `--defines' and `--name-prefix'.
21247
21248 2000-10-02 Akim Demaille <akim@epita.fr>
21249
21250 Improve the readability of the produced parsers.
21251
21252 * src/bison.s1: Formatting changes.
21253 Improve the comment related to the `$' mark.
21254 (yydefault): Don't fall through to `yyresume': `goto' there.
21255 * src/output.c (output_parser): When the `$' is met, skip the end
21256 of its line.
21257 New variable, `number_of_dollar_signs', to check there's exactly
21258 one `$' in the parser skeleton.
21259
21260 2000-10-02 Akim Demaille <akim@epita.fr>
21261
21262 * lib/xstrdup.c: New file, from the fileutils.
21263 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21264 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21265 instead of strlen + xmalloc + strcpy.
21266 * src/symtab.c (copys): Remove, use xstrdup instead.
21267
21268 2000-10-02 Akim Demaille <akim@epita.fr>
21269
21270 * src/gram.h (associativity): New enum type which replaces the
21271 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21272 `right_assoc', `left_assoc' and `non_assoc'.
21273 Adjust all dependencies.
21274 * src/reader.c: Formatting changes.
21275 (LTYPESTR): Don't define it, use it as a literal in
21276 `reader_output_yylsp'.
21277 * src/symtab.h (symbol_class): New enum type which replaces the
21278 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21279 `sunknown', `stoken and `snterm'.
21280
21281 2000-10-02 Akim Demaille <akim@epita.fr>
21282
21283 * src/getargs.c (fixed_outfiles): Rename as...
21284 (yaccflag): for consistency and accuracy.
21285 Adjust dependencies.
21286
21287 2000-10-02 Akim Demaille <akim@epita.fr>
21288
21289 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21290 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21291 difficult and introduced a lot of core dump. It turns out that
21292 Bison used an implementation of `xmalloc' based on `calloc', and
21293 at various places it does depend upon the initialization to 0. I
21294 have not tried to isolate the pertinent places, and all the former
21295 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21296 someone should address this issue.
21297
21298 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21299 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21300 files.
21301 Adjust dependencies.
21302 * src/warshall.h: New file.
21303 Propagate.
21304
21305 2000-10-02 Akim Demaille <akim@epita.fr>
21306
21307 Various anti-`extern in *.c' changes.
21308
21309 * src/system.h: Include `assert.h'.
21310
21311 2000-10-02 Akim Demaille <akim@epita.fr>
21312
21313 * src/state.h (nstates, final_state, first_state, first_shift)
21314 (first_reduction): Move their exportation from here...
21315 * src/LR0.h: to here.
21316 Adjust dependencies.
21317 * src/getargs.c (statisticsflag): New variable.
21318 Add support for `--statistics'.
21319 Adjust dependencies.
21320
21321 Remove a lot of now useless `extern' statements in most files.
21322
21323 2000-10-02 Akim Demaille <akim@epita.fr>
21324
21325 * src/LR0.h: New file.
21326 Propagate its use.
21327
21328 2000-10-02 Akim Demaille <akim@epita.fr>
21329
21330 * src/print.h: New file.
21331 Propagate its use.
21332 * src/print.c: Formatting and ordering changes.
21333 (verbose, terse): Replace with...
21334 (print_results): this new function.
21335 Adjust dependencies.
21336
21337 2000-10-02 Akim Demaille <akim@epita.fr>
21338
21339 * src/conflicts.c (conflict_report): New function.
21340 (conflict_log, verbose_conflict_log): Replace with...
21341 (print_conflicts): this function.
21342 Adjust dependencies.
21343 * src/conflicts.h: New file.
21344 Propagate its inclusion.
21345
21346 2000-10-02 Akim Demaille <akim@epita.fr>
21347
21348 * src/nullable.h: New file.
21349 Propagate its inclusion.
21350 * src/nullable.c: Formatting changes.
21351
21352 2000-10-02 Akim Demaille <akim@epita.fr>
21353
21354 * src/reduce.h: New file.
21355 Propagate its inclusion.
21356 * src/reduce.c: Topological sort and other formatting changes.
21357 (bool, TRUE, FALSE): Move their definition to...
21358 * src/system.h: here.
21359
21360 2000-10-02 Akim Demaille <akim@epita.fr>
21361
21362 * src/files.c: Formatting changes.
21363 (tryopen, tryclose, openfiles): Rename as...
21364 (xfopen, xfclose, open_files): this.
21365 (stringappend): static.
21366 * src/files.h: Complete the list of exported symbols.
21367 Propagate its use.
21368
21369 2000-10-02 Akim Demaille <akim@epita.fr>
21370
21371 * src/reader.h: New file.
21372 Propagate its use instead of tedious list of `extern' and
21373 prototypes.
21374 * src/reader.c: Formatting changes, topological sort,
21375 s/register//.
21376
21377 2000-10-02 Akim Demaille <akim@epita.fr>
21378
21379 * src/lex.h: Prototype `lex.c' exported functions.
21380 * src/reader.c: Adjust.
21381 * src/lex.c: Formatting changes.
21382 (safegetc): Rename as...
21383 (xgetc): this.
21384
21385 2000-10-02 Akim Demaille <akim@epita.fr>
21386
21387 * src/lalr.h: New file.
21388 Propagate its inclusion instead of prototypes and `extern'.
21389 * src/lalr.c: Formatting changes, topological sorting etc.
21390
21391 2000-10-02 Akim Demaille <akim@epita.fr>
21392
21393 * src/output.c (token_actions): Introduce a temporary array,
21394 YYDEFACT, that makes it possible for this function to use
21395 output_short_table.
21396
21397 2000-10-02 Akim Demaille <akim@epita.fr>
21398
21399 `user_toknums' is output as a `short[]' in `output.c', while it is
21400 defined as a `int[]' in `reader.c'. For consistency with the
21401 other output tables, `user_toknums' is now defined as a table of
21402 shorts.
21403
21404 * src/reader.c (user_toknums): Be a short table instead of an int
21405 table.
21406 Adjust dependencies.
21407
21408 Factor the short table outputs.
21409
21410 * src/output.c (output_short_table): New function.
21411 * src/output.c (output_gram, output_stos, output_rule_data)
21412 (output_base, output_table, output_check): Use it.
21413
21414 2000-10-02 Akim Demaille <akim@epita.fr>
21415
21416 * src/output.c (output): Topological sort of the functions, in
21417 order to get rid of the `static' prototypes.
21418 No longer use `register'.
21419 * src/output.h: New file.
21420 Propagate its inclusion in files explicitly prototyping functions
21421 from output.c.
21422
21423 2000-09-21 Akim Demaille <akim@epita.fr>
21424
21425 * src/atgeneral.m4: Update from Autoconf.
21426
21427 2000-09-21 Akim Demaille <akim@epita.fr>
21428
21429 * src/closure.h: New file.
21430 * src/closure.c: Formatting changes, topological sort over the
21431 functions, use of closure.h.
21432 (initialize_closure, finalize_closure): Rename as...
21433 (new_closure, free_closure): these. Adjust dependencies.
21434 * src/LR0.c: Formatting changes, topological sort, use of
21435 cloture.h.
21436 (initialize_states): Rename as...
21437 (new_states): this.
21438 * src/Makefile.am (noinst_HEADERS): Adjust.
21439
21440 2000-09-20 Akim Demaille <akim@epita.fr>
21441
21442 * src/acconfig.h: Don't protect config.h against multiple
21443 inclusion.
21444 Don't define PARAMS.
21445 * src/system.h: Define PARAMS.
21446 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21447 purpose of config.h. system.h must not try to fix wrong
21448 definitions in config.h.
21449
21450 2000-09-20 Akim Demaille <akim@epita.fr>
21451
21452 * src/derives.h: New file.
21453 * src/main.c, src/derives.h: Use it.
21454 Formatting changes.
21455 * src/Makefile.am (noinst_HEADERS): Adjust.
21456
21457 2000-09-20 Akim Demaille <akim@epita.fr>
21458
21459 * tests/atgeneral.m4: Update from Autoconf.
21460 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21461 (AT_CHECK_CALC): New macros.
21462 Use these macros to test bison with options `', `--raw',
21463 `--debug', `--yacc', `--yacc --debug'.
21464
21465 2000-09-19 Akim Demaille <akim@epita.fr>
21466
21467 * src/output.c: Formatting changes.
21468 * src/machine.h: Remove, leaving its contents in...
21469 * src/system.h: here.
21470 Include stdio.h.
21471 Adjust all dependencies on stdio.h and machine.h.
21472 * src/getargs.h: New file.
21473 Let all `extern' declarations about getargs.c be replaced with
21474 inclusion of `getargs.h'.
21475 * src/Makefile.am (noinst_HEADERS): Adjust.
21476
21477 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21478 scope.
21479 (yyerror): Returns void, not int.
21480 * doc/bison.texinfo: Formatting changes.
21481
21482 2000-09-19 Akim Demaille <akim@epita.fr>
21483
21484 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21485 portable.
21486
21487 2000-09-18 Akim Demaille <akim@epita.fr>
21488
21489 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21490 * src/Makefile.am (INCLUDES): Don't.
21491 Be ready to fetch headers in lib/.
21492
21493 2000-09-18 Akim Demaille <akim@epita.fr>
21494
21495 * doc/bison.texinfo: Update the copyright.
21496 ANSIfy and GNUify the examples.
21497 Remove the old menu.
21498
21499 2000-09-18 Akim Demaille <akim@epita.fr>
21500
21501 First set of tests: use the `calc' example from the documentation.
21502
21503 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21504 is defined only when YYDEBUG is.
21505 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21506 * src/files.c (tryopen, tryclose): Formatting changes.
21507 Move to the top and be static.
21508 * src/reader.c (read_signed_integer): Likewise.
21509 * tests/calc.m4: New file.
21510 * Makefile.am, suite.m4: Adjust.
21511 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21512
21513 2000-09-18 Akim Demaille <akim@epita.fr>
21514
21515 Add support for an Autotest test suite for Bison.
21516
21517 * m4/m4.m4, m4/atconfig.m4: New files.
21518 * m4/Makefile.am (EXTRA_DIST): Adjust.
21519 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21520 files.
21521 * src/getargs.c: Display a more standard --version message.
21522 * src/reader.c (reader): Formatting changes.
21523 No longer depend upon VERSION_STRING.
21524 * configure.in: No longer use `dnl'.
21525 Set up the test suite and the new directory `tests/.
21526 (VERSION_STRING): Remove.
21527
21528 2000-04-14 Akim Demaille <akim@epita.fr>
21529
21530 * src/reader.c (copy_comment2): New function, same as former
21531 `copy_comment', but outputs into two FILE *.
21532 (copy_comment): Use it.
21533 (parse_union_decl): Use it.
21534 (get_type, parse_start_decl): Use the same `invalid' message.
21535 (parse_start_decl, parse_union_decl): Use the same `multiple'
21536 message.
21537 (parse_union_decl, copy_guard, copy_action): Use the same
21538 `unmatched' message.
21539 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21540
21541 2000-03-31 Akim Demaille <akim@epita.fr>
21542
21543 * src/files.c (tryopen, tryclose): Move to the top.
21544 Be static.
21545
21546 2000-03-31 Akim Demaille <akim@epita.fr>
21547
21548 * src/main.c (main): Don't call `done', exit does it.
21549
21550 2000-03-31 Akim Demaille <akim@epita.fr>
21551
21552 * allocate.c: s/return (foo)/return foo/.
21553 * lalr.c: Likewise.
21554 * LR0.c: Likewise.
21555 * output.c: Likewise.
21556 * reader.c: Likewise.
21557 * symtab.c: Likewise.
21558 * vmsgetargs.c: Likewise.
21559
21560 2000-03-31 Akim Demaille <akim@epita.fr>
21561
21562 Clean up the error reporting functions.
21563
21564 * src/report.c: New file.
21565 * src/report.h: Likewise.
21566 * src/Makefile.am: Adjust.
21567 * m4/error.m4: New file.
21568 * m4/Makefile.am: Adjust.
21569 * configure.in (jm_PREREQ_ERROR): Call it.
21570 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21571 Remove.
21572 (fatal, fatals): Remove. All callers use complain.c::fatal.
21573 (warn, warni, warns, warnss, warnss): Remove. All callers use
21574 complain.c::complain.
21575 (toomany): Remove, use fatal instead.
21576 * src/files.c (done): No argument, use complain_message_count.
21577 * src/main.c (main): Register `done' to `atexit'.
21578
21579 * src/getargs.c (usage): More `fputs', less `fprintf'.
21580
21581 2000-03-28 Akim Demaille <akim@epita.fr>
21582
21583 * lib/: New directory.
21584 * Makefile.am (SUBDIRS): Adjust.
21585 * configure.in: Adjust.
21586 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21587 useless.
21588 * src/alloca.c: Moved to lib/.
21589 * src/getopt.c: Likewise.
21590 * src/getopt1.c: Likewise.
21591 * src/getopt.h: Likewise.
21592 * src/ansi2knr.c: Likewise.
21593 * src/ansi2knr.1: Likewise.
21594 * src/Makefile.am: Adjust.
21595 * lib/Makefile.am: New file.
21596
21597 2000-03-28 Akim Demaille <akim@epita.fr>
21598
21599 * src/getargs.c (usage): Refresh the help message.
21600
21601 2000-03-17 Akim Demaille <akim@epita.fr>
21602
21603 * src/getopt1.c: Updated from textutils 2.0e
21604 * src/getopt.c: Likewise.
21605 * src/getopt.h: Likewise.
21606
21607 2000-03-17 Akim Demaille <akim@epita.fr>
21608
21609 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21610 the file name, not the whole `#line LINE FILE'.
21611
21612 2000-03-17 Akim Demaille <akim@epita.fr>
21613
21614 On syntax errors, report the token on which we choked.
21615
21616 * src/bison.s1 (yyparse): In the label yyerrlab, when
21617 YYERROR_VERBOSE, add yychar in msg.
21618
21619 2000-03-17 Akim Demaille <akim@epita.fr>
21620
21621 * src/reader.c (copy_at): New function.
21622 (copy_guard): Use it.
21623 (copy_action): Use it.
21624
21625 2000-03-17 Akim Demaille <akim@epita.fr>
21626
21627 Be kind to translators, save some useless translations.
21628
21629 * src/main.c (banner): New function.
21630 (fatal_banner): Use it.
21631 (warn_banner): Use it.
21632
21633 2000-03-17 Akim Demaille <akim@epita.fr>
21634
21635 * src/reader.c (copy_definition): Use copy_string and
21636 copy_comment. Removed now unused `match', `ended',
21637 `cplus_comment'.
21638 (copy_comment, copy_string): Moved, to be visible from
21639 copy_definition.
21640
21641 2000-03-17 Akim Demaille <akim@epita.fr>
21642
21643 * src/reader.c (copy_string): Declare `static inline'. No
21644 problems with inline, since it is checked by configure.
21645 (copy_comment): Likewise.
21646
21647 2000-03-17 Akim Demaille <akim@epita.fr>
21648
21649 * src/reader.c (packsymbols): Formatting changes.
21650
21651 2000-03-17 Akim Demaille <akim@epita.fr>
21652
21653 * src/reader.c (copy_comment): New function, factored out from:
21654 (copy_action): Use it. Removed now unused `match', `ended',
21655 `cplus_comment'.
21656 (copy_guard): Likewise.
21657
21658 2000-03-17 Akim Demaille <akim@epita.fr>
21659
21660 * src/reader.c (copy_string): New function, factored out from:
21661 (copy_action): Use it.
21662 (copy_guard): Likewise.
21663
21664 2000-03-17 Akim Demaille <akim@epita.fr>
21665
21666 Change the handling of @s so that they behave exactly like $s.
21667 There is now a pseudo variable @$ (readble and writable), location
21668 of the lhs of the rule (by default ranging from the location of
21669 the first symbol of the rhs, to the location of the last symbol,
21670 or, if the rhs is empty, YYLLOC).
21671
21672 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21673 yyval.
21674 (yyparse): When providing a default semantic action, provide a
21675 default location action.
21676 (after the $): No longer change `*YYLSP', just stack YYLOC the
21677 same way you stack YYVAL.
21678 * src/reader.c (read_declarations): Use warns.
21679 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21680 (copy_action, case '@'): Likewise.
21681 Use a standard error message, to save useless work from
21682 translators.
21683
21684 2000-03-17 Akim Demaille <akim@epita.fr>
21685
21686 * src/bison.s1: Formatting and cosmetics changes.
21687 * src/reader.c: Likewise.
21688 Update the Copyright notice.
21689
21690 2000-03-17 Akim Demaille <akim@epita.fr>
21691
21692 * src/bison.s1 (#line): All set to `#line' only, since the
21693 Makefile now handles them.
21694
21695 2000-03-16 Akim Demaille <akim@epita.fr>
21696
21697 * src/output.c (output_rule_data): Output the documentation of
21698 some of the tables.
21699 (Copyright notice): Update.
21700 Formatting changes.
21701
21702 2000-03-16 Akim Demaille <akim@epita.fr>
21703
21704 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21705 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21706 One `#if YYDEBUG' remains, since it uses variables which are
21707 defined only if `YYDEBUG != 0'.
21708
21709 2000-03-16 Akim Demaille <akim@epita.fr>
21710
21711 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21712 and related variables so that the similarities are highlighted.
21713
21714 2000-03-16 Akim Demaille <akim@epita.fr>
21715
21716 * src/bison.s1: Properly indent CPP directives.
21717
21718 2000-03-16 Akim Demaille <akim@epita.fr>
21719
21720 * src/bison.s1: Properly indent the `alloca' CPP section.
21721
21722 2000-03-16 Akim Demaille <akim@epita.fr>
21723
21724 Do not hard code values of directories in `configure.in'.
21725 Update the `configure' tool chain.
21726
21727 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21728 src/makefile.am.
21729 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21730 (AC_OUTPUT): Add m4/Makefile.
21731 Bump to bison 1.28a, 1.29 has never been released.
21732 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21733 handled via src/Makefile.am.
21734 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21735 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21736 autoheader.
21737 * Makefile.am (SUBDIRS): Add m4.
21738 (ACLOCAL_AM_FLAGS): New variable.
21739 (AUTOMAKE_OPTIONS): Add check-news.
21740 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21741 the proper line number and file name.
21742 (DEFS): Propagate the location of bison library files and of the
21743 locale files.
21744 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21745 builddir.
21746 * acinclude.m4: Remove, replaced by the directory m4.
21747 * m4/Makefile.am (EXTRA_DIST): New variable.
21748 * m4/gettext.m4: New file, from the fileutils.
21749 * m4/lcmessage.m4: Likewise
21750 * m4/progtest.m4: Likewise.
21751 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21752
21753 2000-03-10 Akim Demaille <akim@epita.fr>
21754
21755 * src/closure.c:
21756 Formatting changes of various comments.
21757 Respect the GNU coding standards at various places.
21758 Don't use `_()' when no translation is needed.
21759
21760 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21761
21762 * src/files.c:
21763 OS/2 honors TMPDIR environment variable.
21764
21765 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21766
21767 * doc/bison.texinfo: Tweaked spelling and grammar.
21768 Updated ISBN.
21769 Removed reference to price of printed copy.
21770 Mention BISON_SIMPLE and BISON_HAIRY.
21771
21772 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21773
21774 * configure.in, NEWS:
21775 Bison 1.29 released.
21776
21777 1999-10-27 Jesse Thilo <jthilo@gnu.org>
21778
21779 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21780 Added reference card.
21781
21782 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21783
21784 * po/ru.po: Added Russian translation.
21785
21786 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21787
21788 * configure.in: Added Russian translation.
21789
21790 1999-07-06 Jesse Thilo <jthilo@gnu.org>
21791
21792 * configure.in, NEWS, README:
21793 Released version 1.28.
21794
21795 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21796
21797 * src/system.h:
21798 Squashed redefinition warning on some systems.
21799
21800 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21801 Have configure build version string instead of relying on ANSI string
21802 concatentation.
21803
21804 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21805
21806 * po/POTFILES.in: Got rid of version.c.
21807
21808 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21809
21810 * acconfig.h, configure.in:
21811 Have configure build version string instead of relying on ANSI string
21812 concatentation.
21813
21814 1999-06-08 Jesse Thilo <jthilo@gnu.org>
21815
21816 * doc/bison.1:
21817 Dropped mention of `+' for long-named options.
21818
21819 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21820
21821 * src/files.c: Added <unistd.h> for unlink().
21822
21823 * src/Makefile.am, src/system.h:
21824 I18n fixes.
21825
21826 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21827
21828 * README: Added a FAQ list.
21829
21830 * configure.in, acconfig.h:
21831 I18n fixes.
21832
21833 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21834
21835 * doc/FAQ, doc/Makefile.am:
21836 Added a FAQ list.
21837
21838 1999-05-19 Jesse Thilo <jthilo@gnu.org>
21839
21840 * src/alloc.h, src/symtab.h, src/version.c:
21841 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21842
21843 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21844
21845 * src/.cvsignore, src/Makefile.am:
21846 Reorganized: sources in `src', documentation in `doc'.
21847
21848 * src/lex.c (literalchar):
21849 fixed the code for escaping double quotes (thanks
21850 Jonathan Czisny.)
21851
21852 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21853
21854 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
21855 Adjusted paths to reflect directory reorganization.
21856
21857 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21858
21859 * doc/.cvsignore, doc/Makefile.am:
21860 Reorganized: sources in `src', documentation in `doc'.
21861
21862 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21863
21864 * configure.in:
21865 Updated AC_INIT file to reflect directory reorganization.
21866
21867 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
21868 Reorganized: sources in `src', documentation in `doc'.
21869
21870 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21871
21872 * src/allocate.c:
21873 Don't declare calloc() and realloc() if not necessary.
21874
21875 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21876
21877 * configure.in, acconfig.h, acinclude.m4:
21878 Don't declare calloc() and realloc() if not necessary.
21879
21880 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21881
21882 * po/.cvsignore: Added i18n support.
21883
21884 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21885
21886 * acconfig.h, configure.in, Makefile.am:
21887 Added i18n support.
21888
21889 1999-03-22 Jesse Thilo <jthilo@gnu.org>
21890
21891 * src/bison.s1: Fixed #line numbers.
21892
21893 1999-03-15 Jesse Thilo <jthilo@gnu.org>
21894
21895 * po/es.po, po/fr.po, po/nl.po, po/de.po:
21896 Added PO files from Translation Project.
21897
21898 1999-03-03 Jesse Thilo <jthilo@gnu.org>
21899
21900 * Makefile.am:
21901 Added support for non-ANSI compilers (ansi2knr).
21902
21903 1999-02-16 Jesse Thilo <jthilo@gnu.org>
21904
21905 * configure.in: Bumped version number to 1.27.
21906
21907 * Makefile.am:
21908 Added `bison.simple' to list of files removed by `make distclean'.
21909
21910 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21911
21912 * src/files.c, src/files.h:
21913 Defined locations of parser files in config.h instead of Makefile.
21914
21915 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21916
21917 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
21918 Defined locations of parser files in config.h instead of Makefile.
21919
21920 1999-02-09 Jesse Thilo <jthilo@gnu.org>
21921
21922 * Makefile.am:
21923 Removed inappropriate use of $< macro.
21924
21925 1999-02-05 Jesse Thilo <jthilo@gnu.org>
21926
21927 * po/Makefile.in.in, po/POTFILES.in:
21928 Add `po' directory skeleton.
21929
21930 1999-01-27 Jesse Thilo <jthilo@gnu.org>
21931
21932 * README: Document help-bison list.
21933
21934 * configure.in: Add check for mkstemp().
21935
21936 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21937
21938 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
21939 Hush a few compiler warnings.
21940
21941 * src/files.c:
21942 Add tryclose(), which verifies that fclose was successful.
21943 Hush a couple of compiler warnings.
21944
21945 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21946
21947 * Makefile.am, OChangeLog:
21948 ChangeLog is now automatically generated. Include the old version as
21949 OChangeLog.
21950
21951 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21952
21953 * 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:
21954 Update FSF address.
21955
21956 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21957
21958 * doc/bison.texinfo: Fix formatting glitch.
21959
21960 * doc/bison.texinfo: Update FSF address.
21961
21962 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21963
21964 * acconfig.h: Update FSF address.
21965
21966 1999-01-08 Jesse Thilo <jthilo@gnu.org>
21967
21968 * src/system.h:
21969 Don't define PACKAGE here, since config.h defines it.
21970
21971 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21972
21973 * src/reader.c: Update copyright date.
21974
21975 * src/main.c:
21976 Ditch sprintf to statically-sized buffers in fatal/warn functions in
21977 favor of output directly to stderr (avoids buffer overruns).
21978
21979 * src/reader.c: Some checks for premature EOF.
21980
21981 * 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:
21982 Use prototypes if the compiler understands them.
21983
21984 * src/files.c: Honor TMPDIR on Unix hosts.
21985 Use prototypes if the compiler understands them.
21986
21987 * src/reader.c:
21988 Fix a couple of buffer overrun bugs.
21989 Use prototypes if the compiler understands them.
21990
21991 * src/system.h: Include unistd.h and ctype.h.
21992 Use #ifdef instead of #if for NLS symbols.
21993
21994 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21995
21996 * doc/bison.texinfo:
21997 Delete comment "consider using @set for edition number, etc..." since
21998 we now are doing so.
21999
22000 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22001
22002 * configure.in:
22003 Use prototypes if the compiler understands them.
22004
22005 * NEWS: Document 1.26 highlights.
22006
22007 * Makefile.am: Require Automake 1.3 or later.
22008
22009 * acconfig.h:
22010 Use prototypes if the compiler understands them.
22011
22012 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22013
22014 * src/version.c:
22015 Use VERSION symbol from automake for version number.
22016
22017 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22018
22019 * acconfig.h, configure.in, version.cin:
22020 Use VERSION symbol from automake for version number.
22021
22022 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22023
22024 * Makefile.am:
22025 Distribute original version of simple parser (bison.s1), not built
22026 version (bison.simple).
22027
22028 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22029
22030 * doc/bison.texinfo: Add info dir entry.
22031
22032 * doc/bison.texinfo:
22033 Let automake put version number into documentation.
22034
22035 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22036
22037 * src/bison.cld, src/build.com, src/vmshlp.mar:
22038 Add non-RCS files from /gd/gnu/bison.
22039
22040 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22041
22042 * doc/bison.1:
22043 Document the BISON_HAIRY and BISON_SIMPLE variables.
22044
22045 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22046
22047 * src/version.c: Build version.c automatically.
22048
22049 * src/reader.c:
22050 Fix token numbering (used to start at 258, not 257).
22051
22052 * src/system.h: Include config.h.
22053
22054 * src/getargs.c: Update bug report address.
22055
22056 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22057 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22058
22059 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22060
22061 * Makefile.am:
22062 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22063
22064 * configure.in, version.cin:
22065 Build version.c automatically.
22066
22067 * AUTHORS: Add AUTHORS file.
22068
22069 * README: Update bug report address.
22070
22071 * bison.simple:
22072 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22073
22074 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22075 Add automake stuff.
22076
22077 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22078
22079 * doc/bison.texinfo: Clean up some formatting.
22080
22081 1998-05-05 Richard Stallman <rms@gnu.org>
22082
22083 * doc/bison.texinfo:
22084 Explain better why to make a pure parser.
22085
22086 1998-01-05 Richard Stallman <rms@gnu.org>
22087
22088 * src/files.c (openfiles):
22089 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22090 find a temporary directory, if possible. Do not unlink files while
22091 they are open.
22092
22093 1997-08-25 Richard Stallman <rms@gnu.org>
22094
22095 * src/reader.c (stack_offset;):
22096 Change some warni to warns.
22097
22098 * src/lex.c (literalchar): Use warns, not warni.
22099
22100 1997-06-28 Richard Stallman <rms@gnu.org>
22101
22102 * src/bison.s1: Add a Bison version comment.
22103
22104 * src/main.c (fatal, warn, berror):
22105 Use program_name.
22106
22107 1997-06-28 Richard Stallman <rms@gnu.org>
22108
22109 * Makefile.in (bison_version): New variable.
22110 (dist): Use that variable.
22111 (bison.s1): Substitute the Bison version into bison.simple.
22112
22113 * bison.simple: Add a Bison version comment.
22114
22115 1997-06-18 Richard Stallman <rms@gnu.org>
22116
22117 * src/main.c (fatal, warn, berror):
22118 Make error messages standard.
22119 (toomany): Improve error message text.
22120
22121 * 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:
22122 new.h renamed to alloc.h.
22123
22124 1997-06-18 Richard Stallman <rms@gnu.org>
22125
22126 * Makefile.in: new.h renamed to alloc.h.
22127
22128 1997-05-24 Richard Stallman <rms@gnu.org>
22129
22130 * src/lex.c (literalchar):
22131 Fix the code for escaping \, " and '.
22132
22133 (lex): Avoid trouble when there are many chars
22134 to discard in a char literal with just several chars in it.
22135
22136 1997-05-17 Richard Stallman <rms@gnu.org>
22137
22138 * src/bison.s1:
22139 Use malloc, if using alloca is troublesome.
22140 (YYSTACK_USE_ALLOCA): New flag macro.
22141 Define it for some systems and compilers.
22142 (YYSTACK_ALLOC): New macro.
22143 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22144 If it was malloc'd, free it.
22145
22146 1997-05-17 Richard Stallman <rms@gnu.org>
22147
22148 * bison.simple:
22149 Use malloc, if using alloca is troublesome.
22150 (YYSTACK_USE_ALLOCA): New flag macro.
22151 Define it for some systems and compilers.
22152 (YYSTACK_ALLOC): New macro.
22153 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22154 If it was malloc'd, free it.
22155
22156 1997-04-23 Richard Stallman <rms@gnu.org>
22157
22158 * src/bison.s1:
22159 (alloca) [__hpux]: Always define as __builtin_alloca.
22160
22161 1997-04-23 Richard Stallman <rms@gnu.org>
22162
22163 * bison.simple:
22164 (alloca) [__hpux]: Always define as __builtin_alloca.
22165
22166 1997-04-22 Richard Stallman <rms@gnu.org>
22167
22168 * src/bison.s1:
22169 [__hpux]: Include alloca.h (right for HPUX 10)
22170 instead of declaring alloca (right for HPUX 9).
22171
22172 * src/bison.s1 (__yy_memcpy):
22173 Declare arg `count' as unsigned int.
22174 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22175
22176 1997-04-22 Richard Stallman <rms@gnu.org>
22177
22178 * bison.simple:
22179 [__hpux]: Include alloca.h (right for HPUX 10)
22180 instead of declaring alloca (right for HPUX 9).
22181
22182 * bison.simple (__yy_memcpy):
22183 Declare arg `count' as unsigned int.
22184 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22185
22186 1997-01-03 Richard Stallman <rms@gnu.org>
22187
22188 * src/allocate.c: [__STDC__ or _MSC_VER]:
22189 Declare calloc and realloc to return void *.
22190
22191 1997-01-02 Richard Stallman <rms@gnu.org>
22192
22193 * src/system.h:
22194 [_MSC_VER]: Include stdlib.h and process.h.
22195 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22196
22197 * src/main.c (main): Return FAILURE as a value.
22198 (printable_version): Declare arg as int, not char.
22199
22200 1997-01-02 Richard Stallman <rms@gnu.org>
22201
22202 * Makefile.in (dist):
22203 Explicitly check for symlinks, and copy them.
22204
22205 1996-12-19 Richard Stallman <rms@gnu.org>
22206
22207 * src/files.c:
22208 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22209
22210 1996-12-18 Paul Eggert <eggert@gnu.org>
22211
22212 * src/bison.s1 (yyparse):
22213 If __GNUC__ and YYPARSE_PARAM are both defined,
22214 declare yyparse to have a void * argument.
22215
22216 1996-12-18 Paul Eggert <eggert@gnu.org>
22217
22218 * bison.simple (yyparse):
22219 If __GNUC__ and YYPARSE_PARAM are both defined,
22220 declare yyparse to have a void * argument.
22221
22222 1996-12-17 Richard Stallman <rms@gnu.org>
22223
22224 * src/reduce.c (nbits): Add some casts.
22225
22226 1996-08-12 Richard Stallman <rms@gnu.org>
22227
22228 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22229
22230 1996-08-12 Richard Stallman <rms@gnu.org>
22231
22232 * bison.simple: Test _MSDOS as well as _MSDOS_.
22233
22234 1996-07-31 Richard Stallman <rms@gnu.org>
22235
22236 * src/bison.s1:
22237 [__sun && __i386]: Include alloca.h.
22238
22239 1996-07-31 Richard Stallman <rms@gnu.org>
22240
22241 * bison.simple:
22242 [__sun && __i386]: Include alloca.h.
22243
22244 1996-07-30 Richard Stallman <rms@gnu.org>
22245
22246 * src/bison.s1: Comment change.
22247
22248 * src/bison.s1: Test _MSDOS_, not MSDOS.
22249
22250 1996-07-30 Richard Stallman <rms@gnu.org>
22251
22252 * bison.simple: Comment change.
22253
22254 * bison.simple: Test _MSDOS_, not MSDOS.
22255
22256 1996-06-01 Richard Stallman <rms@gnu.org>
22257
22258 * 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:
22259 Insert `_' macro around many string constants.
22260
22261 * src/main.c:
22262 Insert `_' macro around many string constants.
22263
22264 (main): Call setlocale, bindtextdomain and textdomain.
22265
22266 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22267 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22268 [ENABLE_NLS]: Include libintl.h.
22269 [ENABLE_NLS] (gettext): Define.
22270 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22271 (N_, PACKAGE, LOCALEDIR): New macros.
22272
22273 1996-06-01 Richard Stallman <rms@gnu.org>
22274
22275 * POTFILES.in: New file.
22276
22277 * Makefile.in (allocate.o):
22278 Define target explicitly.
22279
22280 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22281 (LDFLAGS): Set to @LDFLAGS@.
22282 (configure): Run autoconf only if preceding `cd' succeeds.
22283 (bison.s1): Redirect output to temporary file then move the
22284 temporary to the target, rather than redirecting directly to bison.s1.
22285 (clean): Remove config.status and config.log.
22286 (distclean): Don't remove config.status here.
22287
22288 1996-05-12 Richard Stallman <rms@gnu.org>
22289
22290 * src/bison.s1:
22291 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22292
22293 1996-05-12 Richard Stallman <rms@gnu.org>
22294
22295 * bison.simple:
22296 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22297
22298 1996-05-11 Richard Stallman <rms@gnu.org>
22299
22300 * src/bison.s1 (__yy_memcpy):
22301 Really reorder the args, as was supposedly done on Feb 14 1995.
22302 (yyparse): Calls changed accordingly.
22303
22304 1996-05-11 Richard Stallman <rms@gnu.org>
22305
22306 * Makefile.in (dist): Don't use $(srcdir).
22307
22308 * bison.simple (__yy_memcpy):
22309 Really reorder the args, as was supposedly done on Feb 14 1995.
22310 (yyparse): Calls changed accordingly.
22311
22312 1996-01-27 Richard Stallman <rms@gnu.org>
22313
22314 * src/output.c (output_rule_data):
22315 Test YYERROR_VERBOSE in the conditional
22316 around the definition of ttyname.
22317
22318 1995-12-29 Richard Stallman <rms@gnu.org>
22319
22320 * src/bison.s1:
22321 Fix line numbers in #line commands.
22322
22323 1995-12-29 Richard Stallman <rms@gnu.org>
22324
22325 * bison.simple:
22326 Fix line numbers in #line commands.
22327
22328 1995-12-27 Richard Stallman <rms@gnu.org>
22329
22330 * src/bison.s1 (YYPARSE_PARAM_DECL):
22331 In C++, make it always null.
22332 (YYPARSE_PARAM_ARG): New macro.
22333 (yyparse): Use YYPARSE_PARAM_ARG.
22334
22335 1995-12-27 Richard Stallman <rms@gnu.org>
22336
22337 * bison.simple (YYPARSE_PARAM_DECL):
22338 In C++, make it always null.
22339 (YYPARSE_PARAM_ARG): New macro.
22340 (yyparse): Use YYPARSE_PARAM_ARG.
22341
22342 1995-11-29 Richard Stallman <rms@gnu.org>
22343
22344 * doc/bison.texinfo:
22345 Describe literal string tokens, %raw, %no_lines, %token_table.
22346
22347 1995-11-29 Daniel Hagerty <hag@gnu.org>
22348
22349 * doc/bison.texinfo: Fixed update date
22350
22351 1995-10-16 Richard Stallman <rms@gnu.org>
22352
22353 * src/version.c: Version 1.25.
22354
22355 1995-10-16 Richard Stallman <rms@gnu.org>
22356
22357 * NEWS: *** empty log message ***
22358
22359 1995-10-16 Richard Stallman <rms@gnu.org>
22360
22361 * doc/bison.1, doc/bison.rnh:
22362 Add new options.
22363
22364 1995-10-15 Richard Stallman <rms@gnu.org>
22365
22366 * src/vmsgetargs.c, src/getargs.c:
22367 Added -n, -k, and -raw switches.
22368 (noparserflag, toknumflag, rawtoknumflag): New variables.
22369
22370 * src/symtab.h (SALIAS):
22371 New #define for adding aliases to %token.
22372 (struct bucket): Added `alias' field.
22373
22374 * src/reduce.c (reduce_grammar):
22375 Revise error message.
22376 (print_notices): Remove final `.' from error message.
22377
22378 * src/reader.c (reader_output_yylsp):
22379 New function.
22380 (readgram): Use `#if 0' around code that accepted %command
22381 inside grammar rules: The documentation doesn't allow it,
22382 and it will fail since the %command processors scan for the next %.
22383 (parse_token_decl): Extended the %token
22384 declaration to allow a multi-character symbol as an alias.
22385 (parse_thong_decl): New function.
22386 (read_declarations): Added %thong declarations.
22387 (read_declarations): Handle NOOP to deal with allowing
22388 % declarations as another means to specify the flags.
22389 (readgram): Allow %prec prior to semantics embedded in a rule.
22390 (skip_to_char, read_declarations, copy_definition)
22391 (parse_token_decl, parse_start_decl, parse_type_decl)
22392 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22393 (get_type_name, copy_guard, copy_action, readgram)
22394 (get_type, packsymbols): Revised most error messages.
22395 Changed `fatal' to `warnxxx' to avoid aborting for error.
22396 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22397 (read_declarations): Improve the error message for
22398 an invalid character. Do not abort.
22399 (read_declarations, copy_guard, copy_action): Use
22400 printable_version to avoid unprintable characters in printed output.
22401 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22402 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22403 Allow the type of a non-terminal can be given
22404 more than once, as long as all specifications give the same type.
22405
22406 * src/output.c:
22407 (output_headers, output_trailers, output, output_gram)
22408 (output_rule_data): Implement noparserflag variable.
22409 Implement toknumflag variable.
22410 (output): Call reader_output_yylsp to output LTYPESTR.
22411
22412 * src/main.c (main):
22413 If reader sees an error, don't process the grammar.
22414 (fatals): Updated to not use VARARGS1.
22415 (printable_version, int_to_string, warn, warni, warns, warnss)
22416 (warnsss): New error reporting functions. Avoid abort for error.
22417
22418 * src/lex.h:
22419 Added THONG and NOOP for alias processing.
22420 Added SETOPT for the new code that allows setting options with %flags.
22421
22422 * src/lex.c:
22423 Include getopt.h. Add some extern decls.
22424 (safegetc): New function to deal with EOF gracefully.
22425 (literalchar); new function to deal with reading \ escapes.
22426 (lex): Use literalchar.
22427 (lex): Implemented "..." tokens.
22428 (literalchar, lex, parse_percent_token): Made tokenbuffer
22429 always contain the token. This includes growing the token
22430 buffer while reading an integer.
22431 (parse_percent_token): Replaced if-else statement with percent_table.
22432 (parse_percent_token): Added % declarations as another
22433 way to specify the flags -n, -l, and -r. Also added hooks for
22434 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22435 major changes to files.c.
22436 (lex) Retain in the incoming stream a character following
22437 an incorrect '/'.
22438 (skip_white_space, lex): Revised most error messages
22439 and changed fatal to warn to avoid aborting.
22440 (percent_table): Added %thong declarations.
22441
22442 * src/gram.h: Comment changes.
22443
22444 * src/files.c (openfiles, open_extra_files, done):
22445 Add faction flag
22446 and actfile file. Handle noparserflag. Both for -n switch.
22447
22448 * src/conflicts.c (resolve_sr_conflict):
22449 Remove use of alloca.
22450
22451 1995-06-01 Jim Meyering <meyering@gnu.org>
22452
22453 * doc/bison.texinfo: *** empty log message ***
22454
22455 1995-05-06 Richard Stallman <rms@gnu.org>
22456
22457 * src/bison.s1: Comment change.
22458
22459 1995-05-06 Richard Stallman <rms@gnu.org>
22460
22461 * bison.simple: Comment change.
22462
22463 1995-05-03 Richard Stallman <rms@gnu.org>
22464
22465 * src/version.c: Version now 1.24.
22466
22467 * src/bison.s1: Change distribution terms.
22468
22469 * src/version.c: Version now 1.23.
22470
22471 1995-05-03 Richard Stallman <rms@gnu.org>
22472
22473 * doc/bison.texinfo:
22474 Rewrite "Conditions for Using Bison".
22475 Update version to 1.24.
22476
22477 1995-05-03 Richard Stallman <rms@gnu.org>
22478
22479 * bison.simple: Change distribution terms.
22480
22481 1995-02-23 Richard Stallman <rms@gnu.org>
22482
22483 * src/files.c: Test __VMS_POSIX as well as VMS.
22484
22485 1995-02-14 Jim Meyering <meyering@gnu.org>
22486
22487 * src/bison.s1 (__yy_memcpy):
22488 Renamed from __yy_bcopy to avoid
22489 confusion. Reverse FROM and TO arguments to be consistent with
22490 those of memcpy.
22491
22492 1995-02-14 Jim Meyering <meyering@gnu.org>
22493
22494 * bison.simple (__yy_memcpy):
22495 Renamed from __yy_bcopy to avoid
22496 confusion. Reverse FROM and TO arguments to be consistent with
22497 those of memcpy.
22498
22499 1994-11-10 David J. MacKenzie <djm@gnu.org>
22500
22501 * NEWS: reformat
22502
22503 * NEWS: New file.
22504
22505 * Makefile.in (DISTFILES): Include NEWS.
22506
22507 * Makefile.in (DISTFILES):
22508 Include install-sh, not install.sh.
22509
22510 * configure.in: Update to Autoconf v2 macro names.
22511
22512 1994-10-05 David J. MacKenzie <djm@gnu.org>
22513
22514 * Makefile.in: fix typo
22515
22516 * Makefile.in (prefix, exec_prefix):
22517 Let configure set them.
22518
22519 1994-09-28 David J. MacKenzie <djm@gnu.org>
22520
22521 * Makefile.in: Set datadir to $(prefix)/share.
22522
22523 1994-09-15 Richard Stallman <rms@gnu.org>
22524
22525 * src/bison.s1:
22526 Update copyright notice and GPL version.
22527
22528 1994-09-15 Richard Stallman <rms@gnu.org>
22529
22530 * bison.simple:
22531 Update copyright notice and GPL version.
22532
22533 1994-07-12 Richard Stallman <rms@gnu.org>
22534
22535 * src/reduce.c, src/reader.c:
22536 entered into RCS
22537
22538 1994-05-05 David J. MacKenzie <djm@gnu.org>
22539
22540 * Makefile.in: entered into RCS
22541
22542 1994-03-26 Richard Stallman <rms@gnu.org>
22543
22544 * src/bison.s1: entered into RCS
22545
22546 1994-03-26 Richard Stallman <rms@gnu.org>
22547
22548 * bison.simple: entered into RCS
22549
22550 1994-03-25 Richard Stallman <rms@gnu.org>
22551
22552 * src/main.c: entered into RCS
22553
22554 1994-03-24 Richard Stallman <rms@gnu.org>
22555
22556 * src/conflicts.c: entered into RCS
22557
22558 1994-01-02 Richard Stallman <rms@gnu.org>
22559
22560 * Makefile.in: *** empty log message ***
22561
22562 1993-11-21 Richard Stallman <rms@gnu.org>
22563
22564 * src/bison.s1: *** empty log message ***
22565
22566 1993-11-21 Richard Stallman <rms@gnu.org>
22567
22568 * doc/bison.texinfo: entered into RCS
22569
22570 * doc/bison.texinfo: *** empty log message ***
22571
22572 1993-11-21 Richard Stallman <rms@gnu.org>
22573
22574 * bison.simple: *** empty log message ***
22575
22576 1993-10-25 David J. MacKenzie <djm@gnu.org>
22577
22578 * doc/bison.texinfo: *** empty log message ***
22579
22580 1993-10-19 Richard Stallman <rms@gnu.org>
22581
22582 * src/bison.s1: *** empty log message ***
22583
22584 1993-10-19 Richard Stallman <rms@gnu.org>
22585
22586 * bison.simple: *** empty log message ***
22587
22588 1993-10-14 Richard Stallman <rms@gnu.org>
22589
22590 * src/bison.s1: *** empty log message ***
22591
22592 1993-10-14 Richard Stallman <rms@gnu.org>
22593
22594 * bison.simple: *** empty log message ***
22595
22596 1993-09-14 David J. MacKenzie <djm@gnu.org>
22597
22598 * doc/bison.texinfo: *** empty log message ***
22599
22600 1993-09-13 Noah Friedman <friedman@gnu.org>
22601
22602 * Makefile.in: *** empty log message ***
22603
22604 1993-09-10 Richard Stallman <rms@gnu.org>
22605
22606 * src/conflicts.c: *** empty log message ***
22607
22608 * src/system.h: entered into RCS
22609
22610 1993-09-10 Richard Stallman <rms@gnu.org>
22611
22612 * doc/bison.1: entered into RCS
22613
22614 1993-09-06 Noah Friedman <friedman@gnu.org>
22615
22616 * src/version.c: entered into RCS
22617
22618 1993-09-06 Noah Friedman <friedman@gnu.org>
22619
22620 * Makefile.in: *** empty log message ***
22621
22622 1993-07-30 David J. MacKenzie <djm@gnu.org>
22623
22624 * Makefile.in: *** empty log message ***
22625
22626 1993-07-24 Richard Stallman <rms@gnu.org>
22627
22628 * src/bison.s1: *** empty log message ***
22629
22630 1993-07-24 Richard Stallman <rms@gnu.org>
22631
22632 * bison.simple: *** empty log message ***
22633
22634 1993-07-08 David J. MacKenzie <djm@gnu.org>
22635
22636 * Makefile.in: *** empty log message ***
22637
22638 1993-07-04 Richard Stallman <rms@gnu.org>
22639
22640 * src/bison.s1: *** empty log message ***
22641
22642 1993-07-04 Richard Stallman <rms@gnu.org>
22643
22644 * bison.simple: *** empty log message ***
22645
22646 1993-06-26 David J. MacKenzie <djm@gnu.org>
22647
22648 * src/getargs.c: entered into RCS
22649
22650 1993-06-26 David J. MacKenzie <djm@gnu.org>
22651
22652 * doc/bison.texinfo: *** empty log message ***
22653
22654 * doc/bison.1: New file.
22655
22656 1993-06-25 Richard Stallman <rms@gnu.org>
22657
22658 * src/getargs.c: New file.
22659
22660 1993-06-16 Richard Stallman <rms@gnu.org>
22661
22662 * src/bison.s1: *** empty log message ***
22663
22664 1993-06-16 Richard Stallman <rms@gnu.org>
22665
22666 * bison.simple: *** empty log message ***
22667
22668 1993-06-03 Richard Stallman <rms@gnu.org>
22669
22670 * src/bison.s1: New file.
22671
22672 1993-06-03 Richard Stallman <rms@gnu.org>
22673
22674 * doc/bison.texinfo: *** empty log message ***
22675
22676 1993-06-03 Richard Stallman <rms@gnu.org>
22677
22678 * bison.simple: New file.
22679
22680 1993-05-19 Richard Stallman <rms@gnu.org>
22681
22682 * doc/bison.texinfo: New file.
22683
22684 1993-05-07 Noah Friedman <friedman@gnu.org>
22685
22686 * Makefile.in: *** empty log message ***
22687
22688 1993-04-28 Noah Friedman <friedman@gnu.org>
22689
22690 * src/reader.c: *** empty log message ***
22691
22692 1993-04-23 Noah Friedman <friedman@gnu.org>
22693
22694 * src/alloc.h: entered into RCS
22695
22696 1993-04-20 David J. MacKenzie <djm@gnu.org>
22697
22698 * src/version.c: *** empty log message ***
22699
22700 * src/files.c, src/allocate.c:
22701 entered into RCS
22702
22703 * src/reader.c: *** empty log message ***
22704
22705 * src/lex.c: entered into RCS
22706
22707 * src/conflicts.c: New file.
22708
22709 * src/symtab.c: entered into RCS
22710
22711 * src/alloc.h: New file.
22712
22713 * src/LR0.c: entered into RCS
22714
22715 1993-04-18 Noah Friedman <friedman@gnu.org>
22716
22717 * src/reader.c: New file.
22718
22719 * src/version.c: *** empty log message ***
22720
22721 1993-04-18 Noah Friedman <friedman@gnu.org>
22722
22723 * Makefile.in: *** empty log message ***
22724
22725 1993-04-17 Noah Friedman <friedman@gnu.org>
22726
22727 * Makefile.in: *** empty log message ***
22728
22729 1993-04-15 Richard Stallman <rms@gnu.org>
22730
22731 * src/main.c, src/files.c:
22732 New file.
22733
22734 1993-04-15 Noah Friedman <friedman@gnu.org>
22735
22736 * configure.in: entered into RCS
22737
22738 * configure.in: *** empty log message ***
22739
22740 * configure.in: New file.
22741
22742 1993-04-14 Richard Stallman <rms@gnu.org>
22743
22744 * Makefile.in: New file.
22745
22746 1993-04-13 Richard Stallman <rms@gnu.org>
22747
22748 * src/version.c: New file.
22749
22750 1993-03-25 Richard Stallman <rms@gnu.org>
22751
22752 * src/output.c: entered into RCS
22753
22754 1992-09-25 Richard Stallman <rms@gnu.org>
22755
22756 * configure.bat: entered into RCS
22757
22758 1992-06-22 Richard Stallman <rms@gnu.org>
22759
22760 * src/vmsgetargs.c: entered into RCS
22761
22762 1992-06-22 Richard Stallman <rms@gnu.org>
22763
22764 * doc/bison.rnh: entered into RCS
22765
22766 1992-04-20 David J. MacKenzie <djm@gnu.org>
22767
22768 * README: entered into RCS
22769
22770 1992-01-22 Richard Stallman <rms@gnu.org>
22771
22772 * src/machine.h: entered into RCS
22773
22774 1991-12-21 Richard Stallman <rms@gnu.org>
22775
22776 * src/lalr.c, src/closure.c:
22777 entered into RCS
22778
22779 1991-12-20 Richard Stallman <rms@gnu.org>
22780
22781 * src/state.h: entered into RCS
22782
22783 1991-12-18 Richard Stallman <rms@gnu.org>
22784
22785 * src/print.c, src/nullable.c, src/derives.c:
22786 entered into RCS
22787
22788 1991-11-03 David J. MacKenzie <djm@gnu.org>
22789
22790 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22791 entered into RCS
22792
22793 1988-09-09 Richard Stallman <rms@gnu.org>
22794
22795 * src/bison.hairy: entered into RCS
22796
22797 1987-12-16 Richard Stallman <rms@gnu.org>
22798
22799 * REFERENCES: entered into RCS
22800
22801
22802 -----
22803
22804 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
22805 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
22806 2007, 2008, 2009 Free Software Foundation, Inc.
22807
22808 Copying and distribution of this file, with or without
22809 modification, are permitted provided the copyright notice and this
22810 notice are preserved.