]> git.saurik.com Git - bison.git/blob - ChangeLog
* HACKING (Release Procedure): Recommend a secure automake.
[bison.git] / ChangeLog
1 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
2
3 * HACKING (Release Procedure): Recommend a secure automake.
4
5 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
6
7 portability: `<' and `>' are not always defined on addresses.
8 Specifically, don't sort objects by their memory addresses when
9 they're not allocated in the same array or other object. Though
10 I haven't found a test case where that fails on my platform, C
11 says the behavior is undefined.
12 * src/AnnotationList.c (AnnotationList__insertInto): Remove
13 FIXME. Use new id field of InadequacyList nodes rather than
14 their memory addresses when sorting.
15 (AnnotationList__compute_from_inadequacies): Add
16 inadequacy_list_node_count argument to pass to
17 InadequacyList__new_conflict.
18 * src/AnnotationList.h
19 (AnnotationList__compute_from_inadequacies): Update prototype
20 and documentation for new argument.
21 * src/InadequacyList.c (InadequacyList__new_conflict): Add
22 node_count argument and use it to assign a unique ID.
23 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
24 (InadequacyList): Add id field.
25 (InadequacyList__new_conflict): Update prototype and
26 documentation for new argument.
27 * src/ielr.c (ielr_compute_annotation_lists): Update
28 AnnotationList__compute_from_inadequacies invocation.
29
30 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
31
32 Fix handling of yychar manipulation in user semantic actions.
33 The problem was that yacc.c didn't always update the yychar
34 translation afterwards. However, other skeletons appear to be
35 fine. glr.c appears to already translate yychar before every
36 use. lalr1.cc does not define yychar and does not document its
37 replacement, yyla, for users. It does provide yyclearin, but
38 that does not manipulate yyla and thus requires no translation
39 update. In lalr1.java, yychar is out of scope during semantic
40 actions.
41 * NEWS (2.5): Document.
42 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
43 yytoken here.
44 (yyparse, yypush_parse): Instead, translate before every use of
45 yytoken, and add comments explaining this approach.
46 * tests/actions.at (Destroying lookahead assigned by semantic
47 action): New test group checking that translation happens before
48 lookahead destructor calls at parser return. Previously,
49 incorrect destructors were called.
50 * tests/conflicts.at (parse.error=verbose and consistent
51 errors): New test group checking that translation happens at
52 syntax error detection before the associated verbose error
53 message and the associated lookahead destructor calls. While
54 the destructor call is fixed by this patch, the verbose error
55 message is currently incorrect due to another bug (see
56 comments in test group), so this is an expected failure for now.
57
58 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
59
60 YYFAIL: warn about uses and remove from lalr1.java.
61 * NEWS (2.5): Document.
62 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
63 and make it private. Update all uses.
64 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
65
66 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
67
68 YYFAIL: deprecate.
69 * NEWS (2.4.2): Document deprecation and the phase-out plan.
70 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
71 deprecation.
72 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
73 YYFAIL from GCC cpp's -Wunused-macros.
74 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
75 documentation.
76 (LocalWords): Remove YYFAIL.
77
78 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
79
80 tests: cleanup.
81 * tests/c++.at (Syntax error discarding no lookahead): Don't
82 ignore stderr. Instead, eliminate remaining warnings.
83
84 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
85
86 lalr1.cc: don't discard non-existent lookahead on syntax error.
87 * data/lalr1.cc (parser::parse): Check yyempty first.
88 * tests/c++.at (Syntax error discarding no lookahead): New test
89 group.
90
91 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
92
93 Code cleanup.
94 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
95 function, which is no longer used.
96
97 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
98
99 Add gcc's -Wundef to test suite and fix another warning from it.
100 * NEWS (2.4.2): Update description of -Wundef fix.
101 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
102 (WARN_CFLAGS_TEST): New substitution.
103 * data/glr.c: Avoid warning about __STRICT_ANSI__.
104 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
105 WARN_CFLAGS.
106 (NO_WERROR_CFLAGS): Likewise.
107 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
108
109 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
110
111 * data/yacc.c: Reformat m4 a little.
112
113 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
114
115 Document gcc -Wundef fix.
116 * NEWS (2.4.2): Here.
117 * THANKS (Jonathan Nieder): Add.
118
119 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
120
121 Simplify y.tab.c when location tracking is disabled.
122 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
123 tracking is not enabled. Instead, unconditionally define
124 YY_LOCATION_PRINT as a no-op for backward compatibility.
125
126 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
127
128 Avoid warnings from gcc -Wundef y.tab.c.
129 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
130 defined before using them.
131 * data/lalr1.cc: Likewise.
132 * data/yacc.c: Likewise.
133
134 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
135
136 autoconf: update to latest for fix of M4 detection.
137 Reported by Eric Blake.
138 * submodules/autoconf: Update.
139
140 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
141
142 portability: use -DGNULIB_POSIXCHECK.
143 Reported by Eric Blake. See discussions at
144 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
145 and
146 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
147 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
148 * bootstrap.conf (gnulib_modules): Add all the printf modules
149 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
150 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
151 (excluded_files): Remove m4/printf-posix.m4.
152 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
153 lib/libbison.a so gnulib libraries can be linked.
154
155 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
156
157 gnulib: update for fix of fprintf-posix, which we'll use soon.
158 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
159 targets so that gnulib's new arg-nonnull.h and link-warning.h
160 are matched.
161 * gnulib: Update.
162
163 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
164
165 Enable assertion output and --disable-assert for configure.
166 * bootstrap.conf (gnulib_modules): Add assert module.
167 * src/system.h (aver): Define as assert, and summarize the
168 discussion on this issue.
169
170 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
171
172 Expand GLR acronym in summary of Bison.
173 Based on discussion with Akim Demaille starting at
174 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
175 * doc/bison.texinfo (Introduction): Here.
176 * src/getargs.c (usage): Here.
177
178 2009-10-03 Alex Rozenman <rozenman@gmail.com>
179
180 Document named references.
181 * doc/bison.texinfo (Actions): Add new example and xref to
182 Using Named References node.
183 (Using Named References): New node.
184
185 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
186
187 cleanup.
188 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
189 of char*.
190 (Sbitset__isEmpty): Use Sbitset instead of char*.
191 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
192 instead of char. This helps to avoid casting errors.
193 (Sbitset__or): Use Sbitset instead of char*.
194
195 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
196
197 portability: don't assume 8-bit bytes.
198 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
199 * src/Sbitset.h (Sbitset__nbytes): Here.
200 (Sbitset__byteAddress): Here.
201 (Sbitset__bit_mask): Here.
202 (Sbitset__last_byte_mask): Here.
203 (Sbitset__ones): Here.
204 (SBITSET__FOR_EACH): Here.
205
206 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
207
208 portability: use va_start and va_end in the same function.
209 * src/complain.c (error_message): Move va_end from here...
210 (ERROR_MESSAGE): ... to here.
211
212 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
213
214 * data/bison.m4: Update comments for rename to muscle-tab.h.
215
216 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
217
218 Minor code cleanup.
219 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
220 replace all uses with UNIQSTR_CONCAT.
221 * src/uniqstr.c (uniqstr_vsprintf): New function.
222 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
223 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
224 macros.
225
226 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
227
228 * TODO (Complaint submessage indentation): New.
229
230 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
231
232 Minor code cleanup.
233 * src/parse-gram.y: Clean up sorting of declarations.
234 Use types to simplify %printer declarations where possible.
235 Provide %printer for BRACKETED_ID and symbol.prec.
236 * src/symtab.c: Whitespace change.
237
238 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
239
240 tests: skip tests of file names that platform does not support.
241 Reported by Michael Raskin at
242 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
243 * THANKS (Michael Raskin): Add.
244 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
245 to fail at least for file names containing ":" or "\".
246
247 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
248
249 yysyntax_error: avoid duplicate lookahead collection.
250 Except when memory reallocation is required, this change
251 eliminates the need to invoke yysyntax_error twice and thus to
252 repeat the collection of lookaheads. It also prepares for
253 future extensions that will make those repetitions more
254 expensive and that will require additional memory management in
255 yysyntax_error. Finally, it fixes an obscure bug already
256 exercised in the test suite.
257 * data/yacc.c (yysyntax_error): Add arguments for message
258 buffer variables stored in the parser. Instead of size, return
259 status similar to yyparse status but indicating success of
260 message creation. Other than the actual reallocation of the
261 message buffer, import and clean up memory management code
262 from...
263 (yyparse, yypush_parse): ... here.
264 * tests/regression.at (parse.error=verbose overflow): No longer
265 an expected failure.
266
267 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
268
269 yysyntax_error: test memory management more.
270 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
271 * tests/regression.at (parse.error=verbose and
272 YYSTACK_USE_ALLOCA): New test group.
273 (parse.error=verbose overflow): New test group that reveals an
274 obscure bug. Expected fail for now.
275
276 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
277
278 benchmarks: use %debug consistently among grammars.
279 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
280 %debug by default. It can affect the timings even if yydebug=0.
281 (generate_grammar_calc): For consistency with other grammars,
282 use YYDEBUG environment variable to set yydebug.
283
284 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
285
286 Remove dead code.
287 * src/symtab.c (symbol_pack): Here because every symbol's number
288 is always defined by this time.
289
290 2009-10-03 Alex Rozenman <rozenman@gmail.com>
291
292 Add additional space after periods in NEWS.
293 * NEWS (2.5): here.
294
295 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
296
297 Use the correct conversion specifier for size_t.
298 Reported by Jim Meyering.
299 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
300 because Sbitset__Index is size_t.
301 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
302
303 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
304
305 tests: don't abuse AT_BISON_CHECK.
306 * tests/regression.at (parse-gram.y: LALR = IELR): Move
307 additional shell commands outside of AT_BISON_CHECK.
308
309 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
310
311 tests: check that parse-gram.y's IELR and LALR are identical.
312 * tests/atlocal.in (abs_top_srcdir): New shell variable.
313 * tests/regression.at (parse-gram.y: LALR = IELR): New test
314 group.
315
316 2009-09-19 Alex Rozenman <rozenman@gmail.com>
317
318 Keep sub-messages aligned. Fix strings for translation.
319 * src/location.h (location_print): Add return value.
320 * src/location.c (location_print): Return number of printed
321 characters.
322 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
323 new functions.
324 * src/complain.cpp (indent_ptr): New static variable.
325 (error_message, complain_at_indent, warn_at_indent): Implement
326 the alignment mechanism.
327 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
328 for translations. Use new alignment mechanism.
329 * tests/named-ref.at: Adjust test-cases.
330 * NEWS (2.5): Add an announcement about named references.
331
332 2009-09-17 Akim Demaille <demaille@gostai.com>
333
334 doc: fixes.
335 * doc/bison.texinfo: here.
336 Reported by Alex Rozenman.
337
338 2009-09-16 Akim Demaille <demaille@gostai.com>
339
340 doc: lalr1.cc and variants.
341 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
342 "variant" %define variables.
343 (C++ Semantic Values): Split into...
344 (C++ Unions, C++ Variants): these.
345 The latter is new.
346 (C++ Parser Interface): Fix type names.
347 Document parser::syntax_error.
348 Document the fact that locations are not mandatory.
349 (C++ Scanner Interface): Split into...
350 (Split Symbols, Complete Symbols): these.
351 The later is new.
352 (Calc++ Parsing Driver): Use variants.
353 Add more comments.
354 Adjust style.
355 (Calc++ Parser): Declare all the tokens, no
356 longer accept raw characters.
357 Remove %union.
358 Adjust types and printers.
359 Remove destructors.
360 (Calc++ Scanner): Use make_<SYMBOL> functions.
361 Use strerror in error message.
362
363 2009-09-16 Akim Demaille <demaille@gostai.com>
364
365 doc: spell checking.
366 * doc/bison.texinfo: here.
367
368 2009-09-16 Akim Demaille <demaille@gostai.com>
369
370 doc: comment changes.
371 * doc/bison.texinfo: Comment changes.
372
373 2009-09-16 Akim Demaille <demaille@gostai.com>
374
375 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
376 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
377 constructor to take a token_type instead of the (internal) symbol
378 number.
379 Call yytranslate_.
380 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
381 don't call yytranslate_ here.
382
383 2009-09-16 Akim Demaille <demaille@gostai.com>
384
385 TODO: statistics.
386 * TODO (Figures): New.
387
388 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
389
390 tests: clean up push.at test group titles.
391 * tests/push.at: Remove "Push Parsing: " from test group titles
392 because these are already under the banner "Push Parsing Tests".
393
394 2009-09-12 Alex Rozenman <rozenman@gmail.com>
395
396 Provide an additional sub-message for clarity.
397 Add "symbol not found in production" error message when
398 an "invalid reference" is detected in named references
399 resolution.
400 * src/scan-code.l: Update "invalid reference" case.
401 * tests/named-ref.at: Adjust test-cases.
402
403 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
404
405 Clean up yacc.c a little.
406 * data/yacc.c: Clean up M4 for readability, and make output
407 whitespace more consistent. For the main parse function
408 comment, instead of saying "yyparse or yypush_parse", say either
409 "yyparse" or "yypush_parse" depending on which it actually is.
410
411 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
412
413 Fix --enable-gcc-warnings.
414 * src/parse-gram.y (%printer <param>): Handle param_none.
415
416 2009-09-09 Akim Demaille <demaille@gostai.com>
417
418 lalr1.cc: syntax_error as exceptions.
419 It is common to use sort of factories in the user actions. These
420 factories may check some "syntactic" constraints that are not
421 enforced by the grammar itself. This is possible using YYERROR
422 within the action itself. Provide the user with a means to throw
423 a syntax_error exception.
424
425 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
426 Declare and define yy::parser::syntax_error.
427 * data/lalr1.cc: Include stdexcept.
428 (yy::parser::parse): Wrap the user action within a try/catch.
429 * data/glr.cc: Include stdexcept.
430
431 2009-09-09 Akim Demaille <demaille@gostai.com>
432
433 lalr1.cc: add missing "inline".
434 * data/c++.m4 (b4_public_types_define): Add missing inline to
435 implementations provided in headers.
436
437 2009-09-09 Akim Demaille <demaille@gostai.com>
438
439 %param: documentation.
440 * NEWS (2.6): Document %param, %lex-param, and %parse-param
441 changes.
442 * doc/bison.texinfo: Document that %lex-param and %parse-param
443 are n-ary.
444 Changes some examples to demonstrate it.
445 (Calc++ Parser): Use %param.
446
447 2009-09-09 Akim Demaille <demaille@gostai.com>
448
449 Regen.
450
451 2009-09-09 Akim Demaille <demaille@gostai.com>
452
453 style changes.
454 * src/parse-gram.y (add_param): Scope changes.
455
456 2009-09-09 Akim Demaille <demaille@gostai.com>
457
458 %parse: support several arguments.
459 * src/parse-gram.y (current_param): New.
460 (param_type): Add param_none.
461 (params): New nonterminal.
462 Use it.
463
464 2009-09-09 Akim Demaille <demaille@gostai.com>
465
466 Regen.
467
468 2009-09-09 Akim Demaille <demaille@gostai.com>
469
470 %param.
471 Provide a means to factor lex-param and parse-param common
472 declarations.
473
474 * src/parse-gram.y (param_type): New.
475 Define a %printer for it.
476 (add_param): Use it.
477 (%parse-param, %lex-param): Merge into...
478 (%parse): this new token.
479 Adjust the grammar to use it.
480 * src/scan-gram.l (RETURN_VALUE): New.
481 (RETURN_PERCENT_FLAG): Use it.
482 (RETURN_PERCENT_PARAM): New.
483 Use it to support %parse-param, %lex-param and %param.
484
485 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
486
487 Use aver not assert.
488 * src/output.c: Don't include assert.h.
489 (output_skeleton): Use aver not assert.
490 * src/system.h (aver): In documentation of why, add links to
491 Paul Eggert's explanations in the mailing lists.
492
493 2009-09-05 Alex Rozenman <rozenman@gmail.com>
494
495 Use "Unresolved reference" error message when no symbols were found
496 in a symbolic reference resolution. Remove .expr and -expr from
497 the shown reference when the reference is unresolved.
498 * src/scan-code.l: Change the error message, adjust location columns,
499 rename variable "exact_mode" to "explicit_bracketing".
500 * tests/named-ref.at: Adjust existing tests and add a new one.
501
502 2009-09-04 Akim Demaille <demaille@gostai.com>
503
504 Adjust synclines in src/parse-gram.[ch].
505 * tests/bison.in: Do some magic (including working around issues
506 with ylwrap) when this wrapper is used to compile
507 src/parse-gram.y.
508
509 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
510
511 Complain about unused %define variables and %code qualifiers.
512 * NEWS (2.5): Document.
513 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
514 * doc/bison.texinfo (Decl Summary): Document complaint, and
515 improve %define documentation a little otherwise.
516 * tests/input.at (Reject unused %code qualifiers): Update.
517 (%define errors): Update.
518 (%define, --define, --force-define): Update.
519 (%define backward compatibility): Update.
520 (Unused %define api.pure): Update.
521 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
522
523 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
524
525 Don't suppress warnings about unused parse.error.
526 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
527 %define variable parse.error unless b4_error_verbose_flag is
528 actually expanded in a skeleton.
529
530 2009-09-03 Akim Demaille <demaille@gostai.com>
531
532 * NEWS (2.4.2): Add "Internationalization" item.
533
534 2009-09-03 Akim Demaille <demaille@gostai.com>
535
536 bootstrap: fix/improve find_tool.
537 * bootstrap (find_tool): Improve error messages.
538 Fix typo about find_tool_names.
539
540 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
541
542 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
543 See
544 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
545 * src/scan-code.h (code_props_rule_action_init): Rename
546 named_ref arg to name so it doesn't shadow named_ref type. This
547 makes it consistent with the function definition in scan-code.l
548 anyway.
549
550 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
551
552 %define: accept unquoted values.
553 * NEWS (2.5): Group all %define changes together, and document
554 this one. Remove quotes in IELR and canonical LR entry.
555 * doc/bison.texinfo: Remove quotes in most examples throughout.
556 (Decl Summary): Update %define documentation.
557 (Table of Symbols): Likewise.
558 * src/ielr.c (LrType): Update documentation.
559 * src/parse-gram.y (content.opt): Add production for ID.
560 * tests/actions.at: Remove quotes in most tests.
561 * tests/calc.at: Likewise.
562 * tests/existing.at: Likewise.
563 * tests/input.at: Likewise.
564 * tests/local.at: Likewise.
565 * tests/push.at: Likewise.
566 * tests/reduce.at: Likewise.
567 * tests/torture.at: Likewise.
568
569 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
570
571 %define lr.type: make values lowercase IDs.
572 That is, "LALR" => "lalr", "IELR" => "ielr", and
573 "canonical LR" => "canonical-lr".
574 * NEWS (2.5): Update documentation.
575 * doc/bison.texinfo (Decl Summary): Likewise.
576 * src/ielr.c (ielr): Use new values.
577 * src/ielr.h (ielr): Update documentation.
578 * src/reader.c (prepare_percent_define_front_end_variables): Use
579 and validate new values.
580 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
581 grammars.
582 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
583
584 2009-08-27 Eric Blake <ebb9@byu.net>
585
586 scan-gram: avoid portability trap with ctype usage.
587 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
588 Avoid compiler warning.
589
590 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
591
592 tests: use perl for printing special sequences to files.
593 And skip tests if perl is not available. This is better than
594 playing tricks with shell portability. Suggested by Akim
595 Demaille.
596 * tests/input.at (Bad character literals): Use it here for
597 omitting final newlines.
598 (Bad escapes in literals): Use it here for special characters.
599
600 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
601
602 tests: show a use of %define lr.default-reductions "consistent"
603 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
604 prevents the omission of expected tokens for %error-verbose.
605
606 2009-08-26 Akim Demaille <demaille@gostai.com>
607
608 tests: portability fix.
609 * tests/input.at (Bad escapes in literals): Don't expect "echo
610 '\0'" to output \ then 0.
611
612 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
613
614 Actually handle the yytable zero value correctly this time.
615 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
616 zero values in the YYTABLE comments.
617 * data/glr.c (yytable_value_is_error): Don't check for zero
618 value.
619 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
620 * data/yacc.c (yytable_value_is_error): Likewise.
621 * data/lalr1.java (yy_table_value_is_error_): Likewise.
622 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
623 * src/tables.h: In header comments, explain why it's useless to
624 check for a zero value in yytable.
625
626 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
627
628 More fixes related to last two patches.
629 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
630 comments: zero indicates syntax error not default action.
631 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
632 defined.
633 * data/glr.c (yyis_pact_ninf): Rename to...
634 (yypact_value_is_default): ... this.
635 (yyisDefaultedState): Update for rename.
636 (yyis_table_ninf): Rename to...
637 (yytable_value_is_error): ... this, and check for value zero
638 besides just YYTABLE_NINF.
639 (yygetLRActions): Check for default value from yypact. It
640 appears that this check is always performed before this function
641 is invoked, and so adding the check here is probably redundant.
642 However, the code may evolve after this subtlety is forgotten.
643 Also, update for rename to yytable_value_is_error. Because that
644 macro now checks for zero, a different but equivalent branch of
645 the if-then-else here is evaluated.
646 (yyreportSyntaxError): Update for rename to
647 yytable_value_is_error. The zero condition was mishandled
648 before.
649 (yyrecoverSyntaxError): Update for renames. No behavioral
650 changes.
651 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
652 New function.
653 (yy_table_value_is_error_): New function.
654 (parse): Use new functions where possible. No behavioral
655 changes.
656 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
657 The zero condition was mishandled before.
658 * data/yacc.c (yyis_pact_ninf): Rename to...
659 (yypact_value_is_default): ... this.
660 (yyis_table_ninf): Rename to...
661 (yytable_value_is_error): ... this, and check for value zero
662 besides just YYTABLE_NINF.
663 (yysyntax_error): Update for rename to yytable_value_is_error.
664 The zero condition was mishandled before.
665 (yyparse): Update for renames. No behavioral changes.
666 * src/tables.h: Improve comments about yypact, yytable, etc.
667 more. Most importantly, say yytable value of zero means syntax
668 error not default action.
669
670 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
671
672 Fix %error-verbose for conflicts resolved by %nonassoc.
673 * NEWS (2.5): Document.
674 * data/glr.c (yyreportSyntaxError): Fix this by checking
675 yyis_table_ninf.
676 * data/yacc.c (yysyntax_error): Likewise.
677 * data/lalr1.cc (yysyntax_error_): Fix this by checking
678 yytable_ninf_.
679 * data/lalr1.java (yysyntax_error): Likewise.
680 * tests/conflicts.at (%nonassoc and eof): Update expected output
681 and remove FIXME.
682
683 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
684
685 Some code and documentation improvements.
686 * data/c.m4 (b4_table_value_equals): New macro to capture
687 some repeated code.
688 * data/glr.c (yyis_pact_ninf): Use it here.
689 (yyis_table_ninf): Likewise.
690 (yyreportSyntaxError): Improve internal comments.
691 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
692 Use it everywhere possible.
693 (yyis_table_ninf): Likewise.
694 (yysyntax_error): Improve internal comments.
695 * data/lalr1.cc (yysyntax_error_): Likewise.
696 * data/lalr1.java (yysyntax_error): Likewise.
697 * src/tables.h: Improve comments about yypact, yytable, etc.
698
699 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
700
701 Use locale when quoting.
702 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
703 quote rather than implementing quoting here.
704
705 2009-08-20 Eric Blake <ebb9@byu.net>
706
707 Make previous patch more robust.
708 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
709 argmatch.h.
710 (output_skeleton): Use it.
711 Suggested by Akim Demaille.
712
713 Import latest m4/m4.m4.
714 * submodules/autoconf: Update to autoconf 2.64.
715 * configure.ac (M4_GNU_OPTION): New define.
716 * src/output.c (output_skeleton): Use it to resolve FIXME.
717 * NEWS: Mention this.
718
719 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
720
721 Fix complaints about escape sequences.
722 Discussed starting at
723 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
724 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
725 For a \0 and similar escape sequences meaning the null
726 character, report an invalid escape sequence instead of an
727 invalid null character because the latter does not actually
728 appear in the user's input.
729 In all escape sequence complaints, don't escape the initial
730 backslash, and don't quote when the sequence appears at the end
731 of the complaint line unless there's whitespace that quotearg
732 won't escape.
733 Consistently say "invalid" not "unrecognized".
734 Consistently prefer "empty character literal" over "extra
735 characters in character literal" warning for invalid escape
736 sequences; that is, consistently discard those sequences.
737 * tests/input.at (Bad escapes in literals): New.
738
739 2009-08-19 Akim Demaille <demaille@gostai.com>
740
741 doc: fixes.
742 * doc/bison.texinfo: Fix minor Texinfo errors.
743
744 2009-08-19 Akim Demaille <demaille@gostai.com>
745
746 tests: distcc compliance.
747 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
748 error messages from the output.
749
750 2009-08-19 Akim Demaille <demaille@gostai.com>
751
752 variables: simplify the upgrade of namespace into api.namespace.
753
754 This patch simplifies "variables: rename namespace as
755 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
756 Suggested by Joel E. Denny in
757 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
758
759 * src/muscle-tab.c (muscle_percent_variable_update): New.
760 (muscle_percent_define_insert): Use it in replacement of the
761 previous tr invocation.
762 Remove variable_tr, no longer needed.
763 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
764 Remove.
765 * data/c++.m4: No longer handle namespace -> api.namespace.
766 * tests/input.at (%define backward compatibility): Check that
767 namespace is treated as api.namespace.
768
769 2009-08-19 Akim Demaille <demaille@gostai.com>
770
771 doc: %initial-action to initialize yylloc.
772 Reported by Bill Allombert.
773 * doc/bison.texinfo: Set fill-column to 76.
774 (Location Type): Document the use of %initial-action to initialize
775 yylloc.
776
777 2009-08-19 Akim Demaille <demaille@gostai.com>
778
779 lalr1.cc: use state_type.
780 * data/lalr1.cc (yysyntax_error_): Use state_type.
781 Move argument names into yy*.
782
783 2009-08-19 Akim Demaille <demaille@gostai.com>
784
785 lalr1.cc: get rid of yyparse's yystate.
786 yystate and yystack_[0].state are equal, keep only the latter.
787 The former was also used as a temporary variable to compute the
788 post-reduction state. Move this computation into an auxiliary
789 function.
790
791 * data/glr.c (yyLRgotoState): Fuse variable definition and first
792 assignment.
793 * data/lalr1.cc (yy_lr_goto_state_): New.
794 (yyparse): Use it.
795 Replace remaining uses of yystate by yystate_[0].state.
796 Remove the former.
797
798 2009-08-19 Akim Demaille <demaille@gostai.com>
799
800 lalr1.cc: destroy $$ when YYERROR is called.
801 * data/lalr1.cc (yyreduce): Compute the resulting state before
802 running the user action so that yylhs is a valid symbol.
803 (yyerrorlab): Since yylhs is complete (it knows its type), we can
804 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
805 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
806
807 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
808
809 maint: update for gnulib's recent update-copyright changes
810 * gnulib: Update.
811 * .x-update-copyright (COPYING): Add as it's no longer implied
812 when .x-update-copyright is present.
813 * cfg.mk (update-copyright-local): Remove, now ignored.
814 (update-copyright): Declare update-b4-copyright as a dependency.
815
816 2009-08-17 Akim Demaille <demaille@gostai.com>
817
818 build: require gettext 0.17.
819
820 Suggested by Bruno Haible.
821 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
822 * configure.ac: require gettext 0.17 to ensure compatibility with
823 gnulib.
824
825 2009-08-17 Akim Demaille <demaille@gostai.com>
826
827 build: lower gettext requirements.
828
829 Bison was uselessly requiring the formatstring macros from
830 gettext, which resulted in mo files not being installed on systems
831 that perfectly supported Bison mo files. Lower the requirement.
832 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
833
834 * configure.ac: Require need-ngettext instead of
835 need-formatstring-macros.
836 Reported by Martin Jabocs.
837 Suggested by Bruno Haible.
838 * INSTALL: Restructure.
839 (Internationalization): New.
840
841 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
842
843 maint: fix use of copyright year intervals.
844 * gnulib: Update.
845 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
846 as now recommended in gnulib/NEWS.
847 * build-aux/update-b4-copyright: Fix.
848 * cfg.mk (update-copyright-env): Configure update-copyright.
849
850 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
851
852 Make it easier to write deterministic tests.
853 Continues Akim's work from his 2009-06-10 commits.
854 * src/reader.c (check_and_convert_grammar): Don't add any
855 symbols after the first symbols_do invocation.
856 * src/symtab.c (symbols_sorted): New static global.
857 (user_token_number_redeclaration): Update comments.
858 (symbol_from_uniqstr): If a new symbol is being created, assert
859 that symbols_sorted hasn't been allocated yet.
860 (symbols_free): Free symbols_sorted.
861 (symbols_cmp, symbols_cmp_qsort): New functions.
862 (symbols_do): Sort symbol_table into symbols_sorted on first
863 invocation.
864 * tests/input.at (Numbered tokens): Recombine tests now that the
865 output should be deterministic across multiple numbers.
866
867 2009-08-12 Akim Demaille <demaille@gostai.com>
868
869 tests: GCC 4.5 compliance.
870 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
871 messages about #error.
872
873 2009-08-12 Akim Demaille <demaille@gostai.com>
874
875 build: fix the generation of the documentation.
876 Some of our targets use "bison --help", but they can't depend on
877 "bison" itself (to avoid additional requirements on the user), so
878 they used to call "make src/bison" in the commands. Then
879 concurrent builds may fail: one make might be aiming one of its
880 jobs at compiling src/bison, and another job at generating the man
881 page. If the latter is faster than the former, then we have two
882 makes that concurrently try to compile src/bison.
883
884 This might also be a more convincing explanation for the failure
885 described in the patch "build: fix paths".
886
887 * Makefile.am (SUFFIXES): Initialize.
888 * build-aux/move-if-change: New, symlink to gnulib's.
889 * build-aux/local.mk: Ship it.
890 * doc/common.x: Remove, merged into...
891 * doc/bison.x: here.
892 * doc/local.mk (doc/bison.help): New.
893 ($(CROSS_OPTIONS_TEXI)): Depend on it.
894 Use src/bison.
895 (.x.1): Replace with...
896 (doc/bison.1): this explicit, simpler, target.
897 (common_dep): Remove, inlined where appropriate.
898 (SUFFIXES, PREPATH): Remove, unused.
899
900 2009-08-12 Akim Demaille <demaille@gostai.com>
901
902 gnulib: improve prefixing.
903 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
904 change the value of...
905 (gl_LIBOBJS): this.
906 Adjust more variables.
907 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
908 gl_LIBOBJS.
909 (prefix): Also transform rules whose targets have slashes.
910 Use $prefix liberally.
911 Map @MKDIR_P@ to $(MKDIR_P).
912 Prefix directories that are mkdir'd.
913
914 2009-08-12 Akim Demaille <demaille@gostai.com>
915
916 build: fix paths.
917 When using $(top_builddir) inconsistently, Make (including GNU
918 Make) is sometimes confused. As a result it may want to build
919 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
920 file, different names) concurrently, which, amusingly enough,
921 might end with:
922
923 ranlib lib/libbison.a
924 ranlib lib/libbison.a
925 make[2]: *** [lib/libbison.a] Segmentation fault
926
927 on OS X.
928
929 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
930 needed.
931
932 2009-08-12 Akim Demaille <demaille@gostai.com>
933
934 distcheck: fix.
935
936 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
937
938 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
939
940 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
941
942 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
943
944 Miscellaneous code readability improvements.
945
946 * src/reader.c (reader): Move %define front-end variable
947 defaults and checking into...
948 (prepare_percent_define_front_end_variables): ... this new
949 function.
950
951 * src/scan-gram.l (INITIAL): For consistency with string
952 literals, don't store open quote on character literal. It's
953 discarded before returning anyway.
954 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
955 Make length test more readable, and make the character stored
956 for an empty literal more obvious while consistent with the
957 previous behavior.
958
959 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
960 USER_NUMBER_HAS_STRING_ALIAS throughout.
961 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
962 that is repeated in symtab.h. Improve argument names to make it
963 clear which side of the symbol-string alias pair is which.
964 (symbol_check_alias_consistency): Improve local variable names
965 for the same purpose.
966 * src/symtab.h (struct symbol): Make comments about aliases
967 clearer.
968 (symbol_make_alias): Improve comments and argument name.
969 * src/output.c (token_definitions_output): Update for rename to
970 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
971
972 2009-08-08 Alex Rozenman <rozenman@gmail.com>
973
974 Convert "misleading reference" messages to warnings.
975 * src/scan-code.l: New function 'show_sub_messages', more
976 factoring.
977 * tests/named-ref.at: Adjust tests.
978
979 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
980
981 maint: run "make update-copyright"
982
983 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
984
985 maint: make update-b4-copyright easier to use
986 * build-aux/update-b4-copyright: In warnings, report line
987 numbers rather than character positions.
988 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
989 that update-copyright runs it.
990 * gnulib: Update.
991
992 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
993
994 maint: clean up update-b4-copyright code
995 * build-aux/update-b4-copyright: Do not accept 2-digit
996 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
997 Don't accept a `[' in a b4_copyright argument.
998 Format code more consistently.
999 Don't assume b4*copyright never occurs.
1000
1001 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1002
1003 maint: automate b4_copyright updates.
1004 * Makefile.am (update-b4-copyright): New target rule.
1005 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1006 * build-aux/update-b4-copyright: New.
1007 * data/yacc.c: Remove stray characters around b4_copyright
1008 invocations.
1009
1010 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1011
1012 maint: automate annual package-wide copyright-year update.
1013 * .x-update-copyright: New.
1014 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1015 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1016 update-copyright. Remove gnumakefile, which is implied by
1017 maintainer-makefile.
1018 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1019 * gnulib: Update.
1020 * maint.mk: Remove, now copied from gnulib.
1021 * examples/extexi: Add missing "(C)" in copyright statement so
1022 update-copyright can recognize it.
1023 * src/LR0.h: Likewise.
1024 * src/print.h: Likewise.
1025 * src/print_graph.h: Likewise.
1026 * src/gram.c: Add missing comma in copyright statement.
1027 * src/gram.h: Likewise.
1028
1029 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1030
1031 Fix "make distcheck".
1032 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1033 of just calc.stamp.
1034
1035 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1036
1037 Pacify "gcc -Wunused" for the input function from Flex.
1038 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1039 and later.
1040 * src/scan-code.l: Add "%option noinput", which I cannot find in
1041 the Flex manual, but which Flex has supported since at least as
1042 far back as 2.5.4. However, if any of our developers still use
1043 Flex 2.5.4, they'll need to stop configuring with
1044 --enable-gcc-warnings because "%option noinput" didn't work
1045 correctly until Flex 2.5.6.
1046 * src/scan-gram.l: Likewise.
1047 * src/scan-skel.l: Likewise.
1048
1049 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1050
1051 Fix --enable-gcc-warnings problems.
1052 * src/reader.c: Adjust variable names.
1053 * src/scan-code.l: Fix prototypes and adjust names.
1054 * src/named-ref.c: Remove redundant "if".
1055
1056 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1057
1058 Fix a --enable-gcc-warnings problem.
1059 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1060 variable.
1061
1062 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1063
1064 Warn about character literals not of length one.
1065 * NEWS (2.5): Document.
1066 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1067 the length.
1068 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1069 * tests/input.at (Bad character literals): New test group.
1070
1071 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1072
1073 Fix some memory leaks.
1074 * src/named-ref.c: Add a pointer check (named_ref_free).
1075 * src/scan-code.l: New function (variant_table_free). Called in
1076 code_scanner_free.
1077 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1078
1079 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1080
1081 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1082
1083 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1084
1085 Some M4 cleanup in the testsuite.
1086 Suggested by Eric Blake at
1087 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1088 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1089 complicate the code by distinguishing between a missing value
1090 and an empty string value for an optional argument. This fix is
1091 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1092 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1093 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1094 arguments are not needed because of the following changes.
1095 Fix stale comments.
1096 Bison developers should use GNU M4 and should not use
1097 POSIXLY_CORRECT when building the test suite, so do not
1098 complicate the code by avoiding $10 and above.
1099 Do not quote an empty string value for an optional argument, and
1100 do not distinguish between a missing value and an empty string
1101 value.
1102
1103 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1104
1105 Revert unnecessary column realignment in --help output.
1106 Reported by Akim Demaille at
1107 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1108 * src/getargs.c (usage): Here.
1109
1110 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1111
1112 Alphabetical order in src/local.mk.
1113 * src/local.mk: Adjust.
1114
1115 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1116
1117 Style changes and factoring.
1118 * src/named-ref.h: Add comments.
1119 * src/parse-gram.y: Readability and style changes.
1120 * src/reader.c: Factoring: assign_named_ref function.
1121 * src/scan-code.l: Factoring and style changes. Rename
1122 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1123 Use "unsigned" type for variant index. Improve readablity.
1124 * src/scan-gram.l: Change error messages and add comments.
1125 * src/symlist.h: symbol_list_null: New function decl.
1126 * src/symlist.c: symbol_list_null: Implement here.
1127 * tests/named-refs.at: Adjust for new error messages.
1128
1129 2009-06-29 Eric Blake <ebb9@byu.net>
1130
1131 scan-code: avoid compiler warnings
1132 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1133
1134 2009-06-29 Akim Demaille <demaille@gostai.com>
1135
1136 build: avoid concurrent extraction of calc++.
1137 * examples/calc++/Makefile.am (calc.stamp): New.
1138 Depend on it to create the sources of calc++ so that concurrent
1139 builds don't launch several "extexi" in parallel.
1140 Not only this is inefficient, this also builds incorrect sources
1141 with several extractions mixed together.
1142
1143 2009-06-29 Akim Demaille <demaille@gostai.com>
1144
1145 parse.error: fix.
1146 * data/bison.m4: Move code related to specific variables after the
1147 definition of the variable-maintaining macros so that we don't
1148 "invoke" b4_percent_define_check_values before it is defined.
1149
1150 2009-06-29 Akim Demaille <demaille@gostai.com>
1151
1152 variables: parse.error
1153
1154 Implement, document, and test the replacement of %error-verbose
1155 by %define parse.error "verbose".
1156 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1157 values of the parse.error variable.
1158 Make "simple" its default value.
1159 Check the valid values.
1160 * src/parse-gram.y: Use %define parse.error.
1161 (PERCENT_ERROR_VERBOSE): New token.
1162 Support it.
1163 * src/scan-gram.l: Support %error-verbose.
1164
1165 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1166 %define error-verbose by that of %define parse.error.
1167 * NEWS: Document it.
1168
1169 * tests/actions.at, tests/calc.at: Use parse.error instead of
1170 %error-verbose.
1171
1172 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1173
1174 Implement support for named symbol references.
1175 * src/parse-gram.y: Add new syntax (named_ref.opt).
1176 * src/reader.c: Store named refs in symbol lists.
1177 * src/reader.h: New argument for symbol_append and
1178 action_append functions.
1179 * src/scan-code.h: Add new field (named_ref) into
1180 code_props data structure. Keeps named ref of midrule
1181 actions.
1182 * src/scan-code.l: Support for named refs in semantic
1183 action code. New function 'parse_named_ref'.
1184 * src/scan-gram.l: Support bracketed id.
1185 * src/symlist.c: Store named refs in symbol lists.
1186 * src/symlist.h: New field in symbol list: named_ref.
1187 * src/named-ref.h: New file, a struct for named_ref.
1188 * src/named-ref.cp: New file, named_ref_new function.
1189 * src/local.mk: Add two new files.
1190 * tests/testsuite.at: Include new test group:
1191 * tests/named-refs.at: this new file.
1192
1193 2009-06-25 Akim Demaille <demaille@gostai.com>
1194
1195 hash: check insertion for memory exhaustion.
1196 * src/uniqstr.c (uniqstr_new): New.
1197
1198 2009-06-24 Akim Demaille <demaille@gostai.com>
1199
1200 variables: rename namespace as api.namespace.
1201 Discussed in
1202 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1203
1204 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1205 New.
1206 (b4_percent_define_use): New.
1207 Use it where applicable.
1208 * data/c++.m4: Replace uses of the variable "namespace" by
1209 "api.namespace".
1210 Default the latter to the former.
1211 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1212 obsolete.
1213 Document api.namespace.
1214 Use @samp to document %define uses, keep @code for identifiers.
1215 * NEWS: Likewise.
1216 * tests/c++.at, tests/input.at: Test api.namespace instead of
1217 namespace. (The tests passed with namespace.)
1218
1219 2009-06-11 Akim Demaille <demaille@gostai.com>
1220
1221 style changes.
1222 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1223 * src/print-xml.c: Style changes.
1224 * tests/conflicts.at: Comment changes.
1225
1226 2009-06-11 Akim Demaille <demaille@gostai.com>
1227
1228 xml: beware of user strings used to give a %prec to rules.
1229 * tests/conflicts.at (%prec with user strings): New.
1230 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1231 XML output.
1232
1233 2009-06-11 Akim Demaille <demaille@gostai.com>
1234
1235 hash: check insertion for memory exhaustion.
1236 * src/muscle-tab.c (muscle_insert, muscle_grow)
1237 * src/state.c (state_hash_insert): Check the return value of
1238 hash_insert.
1239
1240 2009-06-11 Akim Demaille <demaille@gostai.com>
1241
1242 tests: honor TESTSUITEFLAGS in every check target.
1243 * tests/local.mk (RUN_TESTSUITE): New.
1244 (check-local, installcheck-local, maintainer-check-g++)
1245 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1246
1247 2009-06-10 Akim Demaille <demaille@gostai.com>
1248
1249 deterministic test suite.
1250 Some consistency checks on symbols are performed after all the
1251 symbols were read, by an iteration over the symbol table. This
1252 traversal is nondeterministic, which can be a problem for test
1253 cases.
1254 Avoid this.
1255 Addresses another form of nondeterminism reported by Joel E. Denny.
1256 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1257
1258 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1259 test in two.
1260 Use different file names for the three tests to make the
1261 maintenance easier.
1262
1263 2009-06-10 Akim Demaille <demaille@gostai.com>
1264
1265 gnulib: update.
1266 * gnulib: Update to latest.
1267 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1268 * m4/.gitignore: Regen.
1269 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1270 Call xalloc_die on hash_insert failures.
1271 Requested by the new __warn_unused_result__ attribute of
1272 hash_insert.
1273
1274 2009-06-10 Akim Demaille <demaille@gostai.com>
1275
1276 deterministic user-token-number redeclaration errors.
1277 Address nondeterminism reported by Joel E. Denny.
1278 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1279
1280 * src/uniqstr.h: Comment changes.
1281 * src/location.h (boundary_cmp, location_cmp): New.
1282 * src/symtab.c (user_token_number_redeclaration): New.
1283 (symbol_translation): Use it.
1284 * tests/input.at (Numbered tokens): Adjust the expected output.
1285
1286 2009-05-25 Akim Demaille <demaille@gostai.com>
1287
1288 build: avoid ignored errors.
1289 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1290 errors, they pollute the output.
1291
1292 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1293
1294 Convert multiple variable definition warnings to complaints.
1295 * NEWS (2.5): Add a new entry for that change.
1296 * doc/bison.texinfo (Decl Summary): Update %define entry.
1297 (Bison Options): Update -D/--define/-F/--force-define entry.
1298 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1299 * src/muscle-tab.h (muscle_percent_define_insert): Update
1300 comments.
1301 * tests/input.at (`%define errors'): Update.
1302 (`%define, --define, --force-define'): Update.
1303
1304 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1305
1306 -F/--force-define and relative %define/-D/--define priorities.
1307 * NEWS (2.5): Add documentation to -D/--define entry.
1308 * build-aux/cross-options.pl: Hard-code association of
1309 --force-define with %define.
1310 * doc/bison.texinfo (Decl Summary): In %define entry,
1311 cross-reference command-line options.
1312 (Bison Options): Add documentation to -D/--define entry.
1313 (Option Cross Key): Widen column for --force-define row.
1314 * src/getargs.c (usage): Document -F/--force-define. Realign
1315 options in output.
1316 (short_options, long_options, getargs): Parse -F/--force-define,
1317 and update muscle_percent_define_insert invocations.
1318 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1319 (muscle_percent_define_insert): Add argument with that type.
1320 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1321 -F/--force-define behavior and priorities.
1322 (muscle_percent_define_ensure): Update
1323 muscle_percent_define_insert invocation.
1324 * src/parse-gram.y (prologue_declaration): Update
1325 muscle_percent_define_insert invocations.
1326 * tests/input.at (`%define, --define'): Rename to...
1327 (`%define, --define, --force-define'): ... this and extend.
1328
1329 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1330
1331 Update some comments to make sense for -D.
1332 * data/bison.m4 (b4_check_user_names): In header comments, say
1333 "user occurrence" instead of "grammar occurrence".
1334 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1335 (muscle_percent_code_grow): Likewise just for consistency.
1336
1337 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1338
1339 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1340
1341 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1342
1343 Handle a trailing `:' in a user-supplied C++ namespace better.
1344 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1345 among the closing braces here. This fix might make the
1346 generated code easier to debug, but otherwise it should be
1347 insignificant because a trailing `:' is a C++ error already.
1348
1349 2009-05-19 Akim Demaille <demaille@gostai.com>
1350
1351 remove useless variable.
1352 * src/getargs.c (skeleton_arg): Remove now useless variable.
1353 Should help the compiler see that this printf-like call is sane.
1354
1355 2009-05-15 Akim Demaille <demaille@gostai.com>
1356
1357 Rename token.prefix as api.tokens.prefix.
1358 Discussed here.
1359 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1360
1361 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1362 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1363 (token.prefix): Rename as...
1364 (api.tokens.prefix): this.
1365
1366 2009-05-11 Akim Demaille <demaille@gostai.com>
1367
1368 doc: use C++ headers.
1369 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1370 headers.
1371
1372 2009-05-11 Akim Demaille <demaille@gostai.com>
1373
1374 doc: token.prefix
1375 * doc/bison.simple (Decl Summary): Document token.prefix.
1376 (Calc++ Parser): Various fixes.
1377 Formatting changes.
1378 Use token.prefix.
1379 Introduce a macro TOKEN to shorten the code and make it more
1380 readable.
1381 (Calc++ Scanner): Adjust.
1382 * NEWS (Variable token.prefix): New.
1383
1384 2009-05-04 Akim Demaille <demaille@gostai.com>
1385
1386 bison: catch bad symbol names.
1387 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1388 * tests/input.at: Adjust.
1389
1390 2009-05-04 Akim Demaille <demaille@gostai.com>
1391
1392 identifiers: dashes are letters.
1393 Dashes can now start identifiers (symbols and directives).
1394
1395 * src/scan-gram.l ({letter}): Add dash.
1396 ({id}): Remove it.
1397 * tests/input.at (Symbols): Adjust.
1398 Remove stray comment.
1399 * tests/regression.at (Invalid inputs): Adjust error message.
1400 * doc/bison.texinfo (Symbols): Update.
1401
1402 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1403
1404 Declare %code to be a permanent feature.
1405 * NEWS (2.4.2): Here.
1406 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1407 experimental.
1408 (Decl Summary): Likewise.
1409
1410 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1411
1412 Convert underscores to dashes in some %define variable names.
1413 For now, just api.push-pull and lr.keep-unreachable-states.
1414 Maintain old names for backward compatibility.
1415 * NEWS (2.5): Document.
1416 * data/c.m4 (b4_identification): Update comment.
1417 * data/yacc.c: Update access.
1418 * doc/bison.texinfo: Update.
1419 * etc/bench.pl.in (bench_push_parser): Update use.
1420 * src/files.c (tr): Move to...
1421 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1422 think of a better place to expose it. My logic is that, for all
1423 uses of tr so far, command-line arguments can be involved, and
1424 getargs.h is already included.
1425 * src/main.c (main): Update access.
1426 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1427 variable names to new variable names before assigning value.
1428 * src/reader.c (reader): Update setting default.
1429 * tests/calc.at: Update uses.
1430 * tests/conflicts.at (Unreachable States After Conflict
1431 Resolution): Update use.
1432 * tests/input.at (%define enum variables): Update use.
1433 (%define backward compatibility): New test group.
1434 * tests/push.at: Update uses.
1435 * tests/reduce.at: Update uses.
1436 * tests/torture.at: Update uses.
1437
1438 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1439
1440 Set all front-end %define defaults in one place.
1441 * src/main.c (main): Move lr.keep_unreachable_states default...
1442 * src/reader.c (reader): ... to here.
1443
1444 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1445
1446 Rename lr.default_reductions to lr.default-reductions.
1447 * NEWS (2.5): Here.
1448 * doc/bison.texinfo: Here.
1449 * src/lalr.c (initialize_LA): Here.
1450 * src/print.c (print_reductions): Here.
1451 * src/reader.c (reader): Here.
1452 * src/tables.c (action_row): Here.
1453 * tests/input.at (%define enum variables): Here.
1454 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1455
1456 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1457
1458 Pacify ./configure --enable-gcc-warnings.
1459 * tests/input.at (Symbols): Prototype yyerror and yylex.
1460
1461 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1462
1463 Document how `%define "var" "value"' is not M4-friendly.
1464 * src/parse-gram.y (variable): In comments here.
1465
1466 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1467
1468 Clean up recent patches a little.
1469 Reported by Akim Demaille.
1470 * doc/bison.texinfo (Understanding): Fix typos.
1471 * src/print.c (print_reductions): Don't use negated variable.
1472
1473 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1474
1475 List accepted values for a %define enum variable with an invalid value.
1476 Suggested by Akim Demaille at
1477 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1478 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1479 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
1480 * tests/input.at (%define lr.default_reductions invalid values): Merge
1481 into...
1482 (%define enum variables): ... here, and update output.
1483
1484 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1485
1486 Rename "default rule" to "default reduction".
1487 This includes changing variable names in code, changing
1488 comments, and renaming %define lr.default_rules to %define
1489 lr.default_reductions.
1490 * NEWS (2.5): Update IELR documentation.
1491 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
1492 documentation.
1493 * data/glr.c, data/lalr1.java: Sync copyright dates.
1494 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1495 and lr.type documentation. Make some other wording
1496 improvements.
1497 (Glossary): Adjust cross-references and Default Reduction
1498 definition.
1499 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1500 Remove a confusing comment pointed out by Akim Demaille.
1501 (initialize_LA): Adjust code.
1502 * src/print-xml.c (print_reductions): Adjust code.
1503 * src/print.c (print_reductions): Adjust code.
1504 * src/reader.c (reader): Adjust code.
1505 * src/tables.c (action_row): Adjust code.
1506 (token_actions): Adjust code.
1507 * src/tables.h: Adjust YYDEFACT documentation.
1508 * tests/input.at (%define lr.default_rules invalid values):
1509 Rename test group to...
1510 (%define lr.default_reductions invalid values): ... this, and
1511 update grammar file and expected output.
1512 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1513 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1514
1515 2009-04-21 Akim Demaille <demaille@gostai.com>
1516
1517 tests: check the use of dashes and periods in symbols.
1518 * tests/input.at (Symbol): New test group.
1519
1520 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1521
1522 Document %define lr.type and lr.default_rules.
1523 * NEWS (2.5): Add an entry.
1524 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1525 besides just LALR(1) and GLR(1).
1526 * doc/bison.texinfo (Introduction): Likewise.
1527 (Language and Grammar): Bison is no longer limited to LALR(1)
1528 restrictions.
1529 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1530 when trying to distinguish from GLR. Talk about LR(1) grammars
1531 rather than LALR(1) grammars.
1532 (Decl Summary): In %define api.push_pull entry, say it applies
1533 to deterministic parsers in C rather than LALR(1) parsers in C.
1534 Add lr.default_rules entry.
1535 Add lr.type entry.
1536 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1537 restrictions.
1538 (Generalized LR Parsing): Same changes as for the previous GLR
1539 section.
1540 (Memory Management): Say deterministic rather than LALR(1).
1541 (Understanding): Correct some bison output.
1542 Index discussion of "accepting state".
1543 Say deterministic rather than LALR(1).
1544 (Bison Options): In --yacc entry, say deterministic rather than
1545 LALR(1).
1546 In --report, --graph, and --xml entries, just don't mention
1547 LALR(1).
1548 (C++ Parsers): Say deterministic rather than LALR(1).
1549 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1550 (Glossary): Add Accepting State, Consistent State, Default Rule,
1551 and IELR(1) definitions.
1552 In Generalized LR (GLR) definition, make same changes as in
1553 previous GLR sections.
1554 In LALR(1) definition, say Bison uses LALR(1) by default rather
1555 than implying Bison is limited to LALR(1).
1556 (LocalWords): Add IELR.
1557
1558 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1559
1560 Finish implementing %define lr.type.
1561 Its value can be "LALR", "IELR", or "canonical LR".
1562 * lib/timevar.def (TV_IELR_PHASE1): New var.
1563 (TV_IELR_PHASE2): New var.
1564 (TV_IELR_PHASE3): New var.
1565 (TV_IELR_PHASE4): New var.
1566 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1567 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1568 Sbitset.h, ielr.h, and ielr.c.
1569 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1570 trace_types): Add trace_ielr.
1571 * src/lalr.h, src/lalr.c (ngotos): Export it.
1572 (F): Rename to...
1573 (goto_follows): ... this, update all uses, and export it.
1574 (set_goto_map): Export it.
1575 (map_goto): Export it.
1576 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1577 handled in ielr.
1578 (initialize_LA): Export it. Move lookback allocation to...
1579 (lalr): ... here because, for canonical LR, initialize_LA must
1580 be invoked but lookback and much of the rest of LALR isn't
1581 needed.
1582 * main.c (main): Instead of lalr, invoke ielr, which invokes
1583 lalr.
1584 * src/reader.c (reader): Default lr.type to "LALR".
1585 Default lr.default_rules to "accepting" if lr.type is "canonical
1586 LR". Leave the default as "all" otherwise.
1587 Check for a valid lr.type value.
1588 * src/state.h, src/state.c (struct state_list): Add state_list
1589 member.
1590 (state_new): Initialize state_list member to NULL.
1591 (state_new_isocore): New function, exported.
1592 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1593 exercises all values of lr.type.
1594 (GNU AWK Grammar): Rename test group to...
1595 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1596 AT_TEST_EXISTING_GRAMMAR.
1597 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1598 (GNU pic Grammar): Rename test group to...
1599 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1600 AT_TEST_EXISTING_GRAMMAR.
1601 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1602 all values of lr.type.
1603 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1604 (Lane Split): Likewise.
1605 (Complex Lane Split): Likewise.
1606 (Split During Added Lookahead Propagation): Likewise.
1607
1608 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1609
1610 Add new files for IELR and canonical LR implementation.
1611 * src/AnnotationList.c: New.
1612 * src/AnnotationList.h: New.
1613 * src/InadequacyList.c: New.
1614 * src/InadequacyList.h: New.
1615 * src/Sbitset.c: New.
1616 * src/Sbitset.h: New.
1617 * src/ielr.c: New.
1618 * src/ielr.h: New.
1619
1620 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1621
1622 Implement %define lr.default_rules.
1623 Its value describes the states that are permitted to contain
1624 default rules: "all", "consistent", or "accepting".
1625 * src/reader.c (reader): Default lr.default_rules to "all".
1626 Check for a valid lr.default_rules value.
1627 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1628 is "accepting", then only mark the accepting state as
1629 consistent.
1630 (initialize_LA): Tell state_lookahead_tokens_count whether
1631 lr.default_rules is "accepting".
1632 * src/tables.c (action_row): If lr.default_rules is not "all",
1633 then disable default rules in inconsistent states.
1634 * src/print.c (print_reductions): Use this opportunity to
1635 perform some assertions about whether lr.default_rules was
1636 obeyed correctly.
1637 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1638 helps with checking the parser tables for a grammar.
1639 * tests/input.at (%define lr.default_rules invalid values): New
1640 test group.
1641 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1642 AT_TEST_TABLES_AND_PARSE.
1643 (`no %define lr.default_rules'): New test group generated by
1644 AT_TEST_LR_DEFAULT_RULES.
1645 (`%define lr.default_rules "all"'): Likewise.
1646 (`%define lr.default_rules "consistent"'): Likewise.
1647 (`%define lr.default_rules "accepting"'): Likewise.
1648
1649 2009-04-20 Akim Demaille <demaille@gostai.com>
1650
1651 Formatting change.
1652
1653 2009-04-20 Akim Demaille <demaille@gostai.com>
1654
1655 bison: factoring.
1656 * src/output.c (token_definitions_output): Use symbol_id_get
1657 instead of duplicating its logic.
1658 * TODO (YYERRCODE): Extend.
1659
1660 2009-04-20 Akim Demaille <demaille@gostai.com>
1661
1662 variables: prefer error-verbose to error_verbose.
1663 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
1664 instead of error_verbose.
1665 * src/scan-gram.l (%error-verbose): Map to the error-verbose
1666 variable.
1667 * doc/bison.texinfo: Promote %define error-verbose instead of
1668 %error-verbose.
1669 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
1670
1671 2009-04-15 Akim Demaille <demaille@gostai.com>
1672
1673 variables: accept dashes.
1674 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
1675 underscores.
1676 * src/scan-gram.l ({id}): Also accept dashes after the initial
1677 letter.
1678 ({directive}): Use {id}.
1679 * src/parse-gram.y: Comment and formatting changes.
1680 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1681 symbols.
1682 * src/complain.h, src/complain.c (yacc_at): New.
1683 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1684 symbol names.
1685 * src/output.c (token_definitions_output): Do not #define token
1686 names with dashes.
1687
1688 2009-04-20 Akim Demaille <demaille@gostai.com>
1689
1690 Consistently refer to Yacc, not YACC.
1691 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1692
1693 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1694
1695 Pacify make maintainer-check-posix.
1696 * tests/input.at (%define, --define): Move bison command-line
1697 options before grammar file name.
1698
1699 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1700
1701 Document semicolon warnings.
1702 * NEWS (2.5): Here.
1703
1704 2009-04-14 Akim Demaille <demaille@gostai.com>
1705
1706 variables: use `parse.assert' instead of `assert'.
1707 * TODO (assert): Remove.
1708 * data/bison.m4 (b4_assert_if): Replace with...
1709 (b4_parse_assert_if): this.
1710 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
1711 * doc/bison.texinfo (Decl Summary): Document parse.assert.
1712
1713 2009-04-14 Akim Demaille <demaille@gostai.com>
1714
1715 variables: use `parse.trace' instead of `debug'.
1716 * src/getargs.c (getargs): Map -t to %define trace.parse.
1717 * src/scan-gram.l (%debug): Map to %define trace.parse.
1718 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
1719 names to `_' in macro names.
1720 (b4_debug_if): Replace with...
1721 (b4_parse_trace_if): this.
1722 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1723 * data/yacc.c: Adjust.
1724 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
1725 Use @code to label the variable list.
1726 Document the variable parse.trace.
1727 (Tracing): Promote the parse.trace variable.
1728 * TODO: %printer is not documented.
1729
1730 2009-04-14 Akim Demaille <demaille@gostai.com>
1731
1732 doc: minor fixes.
1733 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1734 (Table of Symbols): Remove duplicate entry for %debug.
1735
1736 2009-04-10 Eric Blake <ebb9@byu.net>
1737
1738 submodules: update to latest
1739 * submodules/autoconf: Use latest upstream Autoconf.
1740
1741 2009-04-06 Eric Blake <ebb9@byu.net>
1742
1743 Work around autoconf 2.63b bug in testsuite.
1744 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1745 autoconf bug related to # in test.
1746
1747 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1748
1749 * NEWS (2.5): New section. Describe new -D/--define feature.
1750
1751 2009-04-06 Akim Demaille <demaille@gostai.com>
1752
1753 Regen.
1754 * src/parse-gram.h, src/parse-gram.c: Regen.
1755
1756 2009-04-06 Akim Demaille <demaille@gostai.com>
1757
1758 rename muscle_tab.* as muscle-tab.* for consistency.
1759 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
1760 * src/muscle-tab.h, src/muscle-tab.c: these.
1761 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
1762 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
1763
1764 2009-04-06 Akim Demaille <demaille@gostai.com>
1765
1766 Makefile: introduce $(BISON).
1767 * src/local.mk (BISON): New.
1768 (YACC): Use it.
1769
1770 2009-04-06 Akim Demaille <demaille@gostai.com>
1771
1772 parser: handle %locations as %define locations.
1773 * src/getargs.h, src/getargs.c (locations_flag): Remove.
1774 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
1775 to set "locations" to true.
1776 * src/output.c (prepare): Don't output "locations".
1777 * src/scan-gram.l (%locations): Handle it as a %<flag>.
1778 * src/parse-gram.y: It's no longer a token.
1779 Don't handle it.
1780 * data/bison.m4 (b4_locations_if): Define it with
1781 b4_percent_define_if_define.
1782 * data/c.m4, data/glr.cc: Adjust.
1783
1784 2009-04-06 Akim Demaille <demaille@gostai.com>
1785
1786 Regen.
1787 * src/parse-gram.c: Regen.
1788
1789 2009-04-06 Akim Demaille <demaille@gostai.com>
1790
1791 muscle: factor the handling of obsolete of obsolete directives.
1792 Suggested by Joel E. Denny.
1793
1794 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
1795 New, extracted from...
1796 * src/parse-gram.y (prologue_declaration: pure-parser): here.
1797 Remove it.
1798 (prologue_declaration: "%<flag>"): Use
1799 muscle_percent_define_ensure.
1800 (%error-verbose, %pure-parser): No longer tokens.
1801 * src/scan-gram.l (pure-parser): Return as a %<flag>.
1802
1803 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1804
1805 Fix options documentation.
1806 * build-aux/cross-options.pl: As in --help output, write optional
1807 arguments as [=ARG] not =[ARG].
1808 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1809
1810 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1811
1812 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1813 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1814 requirements for a correct m4 are stricter.
1815 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
1816 * configure.ac: Update to use AC_PROG_GNU_M4.
1817 Reported by Eric Blake.
1818
1819 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1820
1821 Help with updating web manual.
1822 * HACKING: Incorporate instructions from gnulib/doc/README.
1823 * bootstrap.conf (gnulib_modules): Add gendocs.
1824
1825 2009-04-03 Akim Demaille <demaille@gostai.com>
1826
1827 Regen.
1828 * src/parse-gram.h, src/parse-gram.c: Regen.
1829
1830 2009-04-03 Akim Demaille <demaille@gostai.com>
1831
1832 Factor %FLAG at scan level.
1833 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
1834 definitions and associated rules, replaced by....
1835 (PERCENT_FLAG): this new token type, and rule.
1836 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
1837 Use it for %debug and %error-verbose.
1838
1839 2009-04-03 Akim Demaille <demaille@gostai.com>
1840
1841 Regen.
1842 * src/parse-gram.h, src/parse-gram.c: Regen.
1843
1844 2009-04-03 Akim Demaille <demaille@gostai.com>
1845
1846 Treat %debug as %define debug.
1847 * data/bison.m4 (b4_debug_if): New.
1848 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
1849 * data/lalr1.java: Use it instead of b4_debug_flag.
1850 * src/getargs.h, src/getargs.c (debug_flag): Remove.
1851 * src/output.c (prepare): Don't output it.
1852 * src/parse-gram.y: Treat %debug as %define debug.
1853
1854 2009-04-03 Akim Demaille <demaille@gostai.com>
1855
1856 Treat %error-verbose as %define error_verbose.
1857 This allows to pass -Derror_verbose on the command line. Better
1858 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
1859 ERROR_VERBOSE being defined as false or true.
1860 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
1861 on b4_percent_define_ifdef, for does not check the defined value,
1862 but only whether the symbol is defined, rely on
1863 b4_percent_define_flag_if, so that a value of "false" is processed
1864 as a false.
1865 If not defined, define the flag to "false".
1866 (b4_error_verbose_if): New.
1867 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1868 b4_error_verbose_flag.
1869 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1870 * src/output.c (prepare): Don't output it.
1871 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1872
1873 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1874
1875 Fix strange %define locations for default values.
1876 Reported by Akim Demaille at
1877 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1878 and discussed again starting at
1879 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1880 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1881 because location information is bogus.
1882 Use angle brackets to delimit fake file name because square brackets
1883 look like underexpanded m4. Choose a better fake file name.
1884 Use negative line numbers.
1885 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1886 * src/location.c (location_print): If line for a boundary is negative,
1887 only print that boundary's file name.
1888 * src/location.h: Document that.
1889 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1890 defaults): Update output.
1891
1892 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1893
1894 Pacify ./configure --enable-gcc-warnings.
1895 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1896 in lib won't compile with it.
1897 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1898
1899 2009-03-31 Akim Demaille <demaille@gostai.com>
1900
1901 bootstrap: --help to stdout.
1902 * bootstrap (usage): Don't send --help to stderr.
1903 Use a here doc instead of a long string.
1904
1905 2009-03-31 Akim Demaille <demaille@gostai.com>
1906
1907 bootstrap: README-hacking no longer exists
1908 * bootstrap (checkout_only_file): Set to HACKING.
1909
1910 2009-03-26 Akim Demaille <demaille@gostai.com>
1911
1912 doc: merge HACKING and README-hacking.
1913 Two files is confusing.
1914 Reported by Alexandre Duret-Lutz.
1915
1916 * README-hacking: Merge into...
1917 * HACKING (Working from the repository): here.
1918
1919 2009-03-26 Akim Demaille <demaille@gostai.com>
1920
1921 doc: update README-hacking.
1922 * README-hacking: We now use git and git submodules.
1923 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1924
1925 2009-03-26 Akim Demaille <demaille@gostai.com>
1926
1927 lalr1.cc: avoid GCC 4.3 warnings.
1928 GCC 4.3 now warns about "a || b && c" and asks for explicit
1929 parentheses.
1930 Reported by Alexandre Duret-Lutz.
1931 * data/location.cc: Update copyright years.
1932 (Position::operator==): Use parens to make precedence explicit.
1933 Compare lines and columns first, as they are more likely to be
1934 different, and they are faster to compare.
1935
1936 2009-03-26 Akim Demaille <demaille@gostai.com>
1937
1938 gnulib: update.
1939 * gnulib: Update to latest.
1940 * src/local.mk (AM_CFLAGS): Move to...
1941 * Makefile.am: here.
1942 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1943 AM_CFLAGS.
1944
1945 2009-03-02 Akim Demaille <demaille@gostai.com>
1946
1947 Comment changes.
1948
1949 2009-03-02 Akim Demaille <demaille@gostai.com>
1950
1951 Share b4_yytranslate_define.
1952 * data/lalr1.cc (b4_yytranslate_define): Move to...
1953 * data/c++.m4: here.
1954
1955 2009-03-02 Akim Demaille <demaille@gostai.com>
1956
1957 Use locations in the variant example.
1958 Yes, this obfuscates the point of this example, variants only.
1959 But glr.cc cannot work (yet?) without locations. This change
1960 makes it easier to use this example with glr.cc.
1961
1962 * examples/variant.yy (assert): %define it.
1963 (locations): Request them.
1964 (yylex): Bind the location to the stage.
1965
1966 2009-03-02 Akim Demaille <demaille@gostai.com>
1967
1968 Dub make_TOKEN as a public type interface.
1969 * data/c++.m4 (b4_symbol_constructor_declare)
1970 (b4_symbol_constructor_define): New empty stubs.
1971 (b4_public_types_declare, b4_public_types_define): Use them.
1972 * data/lalr1.cc (b4_symbol_constructor_declare)
1973 (b4_symbol_constructor_declare_)
1974 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1975 Move to...
1976 * data/variant.hh: here.
1977 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1978 needed.
1979 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
1980 b4_symbol_constructor_declare, as it is now done by
1981 b4_public_types_define and b4_public_types_declare.
1982
1983 2009-03-02 Akim Demaille <demaille@gostai.com>
1984
1985 Coding style changes.
1986 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1987 (b4_symbol_constructor_declarations)
1988 (b4_symbol_constructor_definition_)
1989 (b4_symbol_constructor_definitions)
1990 (b4_yytranslate_definition): Rename as...
1991 (b4_symbol_constructor_declare_)
1992 (b4_symbol_constructor_declare)
1993 (b4_symbol_constructor_define_)
1994 (b4_symbol_constructor_define)
1995 (b4_yytranslate_define): these.
1996 * data/variant.hh (b4_variant_definition): Rename as...
1997 (b4_variant_define): this.
1998
1999 2009-03-02 Akim Demaille <demaille@gostai.com>
2000
2001 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2002 * data/bison.m4 (b4_percent_define_if_define): New.
2003 * data/c++.m4 (b4_variant_if): Move to...
2004 * data/bison.m4: Here, using b4_percent_define_if_define.
2005 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2006 * data/bison.m4: Here, using b4_percent_define_if_define.
2007
2008 2009-03-02 Akim Demaille <demaille@gostai.com>
2009
2010 Dub symbol_type_base as a public type.
2011 * data/c++.m4 (b4_public_types_declare): Now define
2012 symbol_type_base and symbol_type.
2013 (b4_public_types_define): New.
2014 In both cases, the definitions are taken verbatim from lalr1.cc.
2015 * data/lalr1.cc: Adjust.
2016
2017 2009-03-02 Akim Demaille <demaille@gostai.com>
2018
2019 b4_public_types_declare.
2020 * data/c++.m4 (b4_public_types_declare): New.
2021 * data/glr.cc, data/lalr1.cc: Use it.
2022
2023 2009-03-02 Akim Demaille <demaille@gostai.com>
2024
2025 b4_semantic_type_declare.
2026 * data/c++.m4 (b4_semantic_type_declare): New.
2027 Factors and generalizes what was in glr.cc and lalr1.cc.
2028 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2029 variants.
2030 * data/lalr1.cc, data/glr.cc: Use it.
2031
2032 2009-02-26 Akim Demaille <demaille@gostai.com>
2033
2034 Upgrade gnulib.
2035 * gnulib: Upgrade from master.
2036 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2037 Regen.
2038
2039 2009-02-25 Akim Demaille <demaille@gostai.com>
2040
2041 Remove useless arguments.
2042 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2043 relevant.
2044
2045 2009-02-25 Akim Demaille <demaille@gostai.com>
2046
2047 Comment changes.
2048 * data/lalr1.cc: here.
2049
2050 2009-02-25 Akim Demaille <demaille@gostai.com>
2051
2052 Fix glr.cc's debug level handling.
2053 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2054 glr.c which is used.
2055 (debug_level, set_debug_level): Adjust.
2056
2057 2009-02-25 Akim Demaille <demaille@gostai.com>
2058
2059 Copyright years.
2060 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2061
2062 2009-02-25 Akim Demaille <demaille@gostai.com>
2063
2064 Style changes.
2065 * etc/bench.pl.in (generate_grammar_list): Consitently use
2066 location_type, not yy::location.
2067
2068 2009-02-25 Akim Demaille <demaille@gostai.com>
2069
2070 Comment change.
2071 * data/lalr1.cc: here.
2072
2073 2009-02-19 Akim Demaille <demaille@gostai.com>
2074
2075 Make yyparser::error public.
2076 * data/lalr1.cc: here.
2077 There is no good reason to keep it private (and it is convenient
2078 to use it from the scanner for instance). It is already public in
2079 glr.cc.
2080
2081 2009-02-19 Akim Demaille <demaille@gostai.com>
2082
2083 Comment changes.
2084 * data/glr.cc: here.
2085
2086 2009-02-19 Akim Demaille <demaille@gostai.com>
2087
2088 Remove trailing blanks.
2089 The epilogue has its own ending \n, no need to add another.
2090
2091 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2092 epilogue.
2093 * data/glr.cc: dnl when extending the epilogue.
2094 Remove stray "private:".
2095
2096 2009-02-19 Akim Demaille <demaille@gostai.com>
2097
2098 Use b4_c_modern.
2099 * data/c.m4 (b4_c_function_decl): Here.
2100
2101 2009-02-19 Akim Demaille <demaille@gostai.com>
2102
2103 Comment changes.
2104 * data/lalr1.cc: here.
2105
2106 2009-02-19 Akim Demaille <demaille@gostai.com>
2107
2108 Extract variant.hh
2109 * data/variant.hh: New, extracted from...
2110 * data/lalr1.cc: here.
2111 Adjust.
2112 * data/local.mk: Adjust.
2113
2114 2009-02-19 Akim Demaille <demaille@gostai.com>
2115
2116 Extract stack.hh from lalr1.cc.
2117 * data/stack.hh: New.
2118 * data/lalr1.cc: Extract from here.
2119 * data/local.mk: Adjust.
2120
2121 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2122
2123 Add reminder about uploading public key to keys.gnupg.net.
2124 * HACKING (Release Procedure): Here.
2125
2126 2009-01-28 Akim Demaille <demaille@gostai.com>
2127
2128 * NEWS: Update information about 2.4.1 and 2.4.2.
2129
2130 2008-11-04 Akim Demaille <demaille@gostai.com>
2131
2132 Reformat NEWS.
2133 * NEWS: Use more outline-mode markup.
2134 Suggested by Jim Meyering.
2135
2136 2009-01-08 Akim Demaille <demaille@gostai.com>
2137
2138 Fix grep portability issues.
2139 Grep on Solaris does not support -q.
2140 Reported by Summum Bonum.
2141
2142 * NEWS: Add a stub for 2.4.2.
2143 * THANKS: Add Summum Bonum.
2144 * tests/atlocal.in (EGREP): New.
2145 (CC, CXX, XSLTPROC): Make it possible to override them via
2146 envvars.
2147 * tests/java.at: Use $EGREP instead of egrep.
2148 Use AT_CHECK's ignore instead of grep's -q.
2149
2150 2008-12-11 Akim Demaille <demaille@gostai.com>
2151
2152 Pass the token type to yysyntax_error.
2153 * data/yacc.c (yysyntax_error): Take the transated token instead
2154 of the raw number.
2155 Adjust callers.
2156 * TODO: Update.
2157
2158 2008-12-11 Akim Demaille <demaille@gostai.com>
2159
2160 Formatting changes.
2161 * data/glr.c: Formatting changes.
2162
2163 2008-12-11 Akim Demaille <demaille@gostai.com>
2164
2165 Propagate i18n changes into glr.c.
2166 * TODO: Update.
2167 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2168 building the error message format dynamically.
2169 * data/lalr1.java: Formatting changes.
2170
2171 2008-12-11 Akim Demaille <demaille@gostai.com>
2172
2173 Use testsuite -C.
2174 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2175 Solves problems when top_srcdir is an absolute path.
2176 Suggested by Eric Blake.
2177 * configure.ac: Require Autoconf 2.62.
2178
2179 2008-12-11 Akim Demaille <demaille@gostai.com>
2180
2181 Simplify the i18n of the error messages.
2182 * data/lalr1.cc: Comment changes.
2183 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2184 lalr1.cc instead of building dynamically the format string.
2185
2186 2008-12-08 Akim Demaille <demaille@gostai.com>
2187
2188 Fix portability issue in the test suite.
2189 * tests/local.at (AT_MATCHES_CHECK): New.
2190 Based on Perl instead of Sed. Sed has too many portability
2191 pitfalls, not ever Sed is GNU Sed.
2192 * tests/actions.at (Fix user actions without a trailing semicolon):
2193 Use it.
2194
2195 2008-12-08 Akim Demaille <demaille@gostai.com>
2196
2197 Update data/README.
2198 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2199
2200 2008-12-08 Akim Demaille <demaille@gostai.com>
2201
2202 Install autoconf as a submodule to get m4sugar.
2203 * .gitmodules: Add submodules/autoconf.
2204 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2205 submodules/autoconf.
2206
2207 2008-12-08 Akim Demaille <demaille@gostai.com>
2208
2209 Test token.prefix in all the skeletons.
2210 * data/java.m4 (b4_token_enum): Use the token.prefix.
2211 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2212 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2213 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2214 * tests/java.at: Comment changes.
2215 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2216 (Java parser class and package names): Add token.prefix check.
2217
2218 2008-12-08 Akim Demaille <demaille@gostai.com>
2219
2220 Fix regeneration of atconfig.
2221 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2222 remove it: now that there is no tests/Makefile.am, the top-level
2223 Makefile properly updates atconfig when needed.
2224
2225 2008-12-07 Di-an Jan <dianj@freeshell.org>
2226
2227 Implement the FIXME that ends an user action with a semicolon
2228 if it seems necessary.
2229 * src/scan-code.l (flex rules section): Flag cpp directive from
2230 any `#' to the first unescaped end-of-line. Semicolon is not
2231 needed after `;', `{', '}', or cpp directives and is needed after
2232 any other token (whitespaces and comments have no effect).
2233 * tests/actions.at (Fix user actions without a trailing semicolon):
2234 New test.
2235 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2236 to make user actions complete statements.
2237 Adjust column numbers in error messages.
2238 * tests/regression.at (Fix user actions without a trailing semicolon):
2239 Remove. Covered by new test.
2240
2241 2008-12-07 Akim Demaille <demaille@gostai.com>
2242
2243 Update gnulib.
2244 * gnulib: Update from master.
2245
2246 2008-12-05 Eric Blake <ebb9@byu.net>
2247
2248 Avoid compiler warning.
2249 * src/output.c (muscle_insert_item_number_table): Delete unused
2250 function.
2251
2252 2008-12-02 Eric Blake <ebb9@byu.net>
2253
2254 Build testsuite with newer autoconf.
2255 * tests/output.at (m4_expand): Don't override in newer autoconf,
2256 where the underlying implementation changed.
2257 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2258 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2259 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2260 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2261 since some of them contain unbalanced ')'.
2262
2263 2008-12-01 Akim Demaille <demaille@gostai.com>
2264
2265 Use b4_symbol for printers and destructors everywhere.
2266 * data/bison.m4 (b4_symbol_action_location): New.
2267 * data/c.m4 (b4_symbol_actions): Remove.
2268 Adjust all callers to use by b4_symbol_foreach and the corresponding
2269 b4_symbol_printer/destructor macro.
2270 * data/glr.cc: Adjust.
2271 * data/lalr1.java: Adjust the %destructor sanity check.
2272 * src/output.c (symbol_code_props_output): Remove, we no longer
2273 need the b4_symbol_printers/destructors tables.
2274
2275 2008-12-01 Akim Demaille <demaille@gostai.com>
2276
2277 Use b4_symbol_case_.
2278 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2279 b4_symbol_case_.
2280
2281 2008-12-01 Akim Demaille <demaille@gostai.com>
2282
2283 Move b4_symbol based macro to bison.m4.
2284 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2285 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2286 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2287 (b4_type_foreach): Move to...
2288 * data/bison.m4: Here.
2289 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2290 b4_symbol_value_template instead of b4_symbol_value.
2291
2292 2008-12-01 Akim Demaille <demaille@gostai.com>
2293
2294 b4_symbol/type_foreach.
2295 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2296 Use them.
2297
2298 2008-12-01 Akim Demaille <demaille@gostai.com>
2299
2300 Use the symbol properties to output the printer/destructor for lalr1.cc.
2301 Instead of defining complex list of tuples to define various
2302 properties of the symbols, we now prefer to define symbols as
2303 "structs" in m4: using the symbol key (its number), and the
2304 property name, b4_symbol gives it value. Use this to handle
2305 destructors and printers.
2306
2307 * src/output.c (CODE_PROP): New.
2308 (prepare_symbol_definitions): Use it to define the printer and
2309 destructor related attributes of the symbols.
2310 * data/lalr1.cc (b4_symbol_actions): Rename as...
2311 (b4_symbol_action): this.
2312 Use b4_symbol instead of 6 arguments.
2313 (b4_symbol_printer, b4_symbol_destructor): New.
2314 Use them instead of b4_symbol_actions.
2315
2316 2008-12-01 Akim Demaille <demaille@gostai.com>
2317
2318 Avoid capturing variables too easily.
2319 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2320 v__ and p__ instead of v and p.
2321
2322 2008-12-01 Akim Demaille <demaille@gostai.com>
2323
2324 Remove spurious empty line before syncline.
2325 * data/bison.m4 (b4_syncline): Don't output an empty line before
2326 the output.
2327
2328 2008-11-26 Akim Demaille <demaille@gostai.com>
2329
2330 Convert lib/Makefile.am into lib/local.mk.
2331 The real problem is rather gnulib.mk, which itself is extracted
2332 from a Makefile.am that gnulib expects to the "recursive". The
2333 tool prefix-gnulib-mk converts such a gnulib.mk to be
2334 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2335
2336 * etc/prefix-gnulib-mk: New.
2337 * bootstrap (slurp): Use it to convert further gnulib.mk.
2338 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2339 are deeper.
2340 * lib/Makefile.am: Rename as...
2341 * lib/local.mk: this.
2342 Adjust to be prefixed.
2343 * Makefile.am, configure.ac: Adjust.
2344 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2345
2346 2008-11-26 Akim Demaille <demaille@gostai.com>
2347
2348 s/_FLAGS/FLAGS/.
2349 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2350 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2351 Reported by Eric Blake.
2352
2353 2008-11-26 Akim Demaille <demaille@gostai.com>
2354
2355 Use b4_parser_tables_define in glr.cc.
2356 * data/glr.c: Use b4_parser_tables_define instead of defining the
2357 (deterministic integral) tables by hand.
2358
2359 2008-11-26 Akim Demaille <demaille@gostai.com>
2360
2361 Use b4_parser_tables_define in Java.
2362 * data/java.m4 (b4_typed_parser_table): Rename as...
2363 (b4_typed_parser_table_define): this, for consistency.
2364 Accept a comment as $4.
2365 Move $2 into yy*_.
2366 (b4_integral_parser_table): Rename as...
2367 (b4_integral_parser_table_define): this.
2368 * data/lalr1.java: Adjust all uses.
2369 Use b4_parser_tables_define instead of generation by hand.
2370
2371 2008-11-26 Akim Demaille <demaille@gostai.com>
2372
2373 Prepare the convergence bw C style and Java table generation.
2374 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2375 (b4_tables_define): Rename as...
2376 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2377 (b4_parser_tables_define): these.
2378 * data/c.m4 (b4_table_define): Rename as...
2379 (b4_integral_parser_table_define): this.
2380 * data/lalr1.cc: Adjust.
2381 (b4_table_define, b4_table_declare): Rename as...
2382 (b4_integral_parser_table_define)
2383 (b4_integral_parser_table_declare): these.
2384 (yyrline_): Move the comment where it is actually used.
2385 * data/yacc.c: Adjust.
2386 (yyrline): Use b4_integral_parser_table_define.
2387
2388 2008-11-26 Akim Demaille <demaille@gostai.com>
2389
2390 Regen.
2391 * src/parse-gram.h, src/parse-gram.c: Regen.
2392
2393 2008-11-26 Akim Demaille <demaille@gostai.com>
2394
2395 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
2396 * data/lalr1.cc (b4_tables_map): Move to...
2397 * data/bison.m4: here.
2398 Update the comment for yytable during the flight.
2399 (b4_tables_declare, b4_tables_define): New.
2400 * data/lalr1.cc: Use them.
2401 * data/c.m4 (b4_table_define): New.
2402 * data/yacc.c: Use b4_tables_define instead of output the tables
2403 by hand.
2404 * tests/regression.at (Web2c Actions): Adjust the expected output,
2405 the order of the tables changed.
2406
2407 2008-11-26 Akim Demaille <demaille@gostai.com>
2408
2409 Get rid of (yy)rhs and (yy)prhs.
2410 These tables are no longer needed in the parsers, and they don't seem to
2411 be useful. They are not documented either.
2412
2413 * src/output.c (prepare_rules): Get rid of rhs and prhs.
2414 Adjust the computation of (yy)r2.
2415
2416 2008-11-26 Akim Demaille <demaille@gostai.com>
2417
2418 Rule length is unsigned.
2419 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
2420
2421 2008-11-26 Akim Demaille <demaille@gostai.com>
2422
2423 Get rid of lalr1-split.cc.
2424 It was no longer maintainer.
2425
2426 * data/lalr1-split.cc: Remove.
2427 * etc/bench.pl.in (bench_fusion_parser): Remove.
2428 Adjust.
2429
2430 2008-11-26 Akim Demaille <demaille@gostai.com>
2431
2432 Use yy* consistently.
2433 * data/glr.c: Now that yyrhs no longer exists as a global
2434 variable, rename local "rhs" variables into "yyrhs" for
2435 consistency.
2436
2437 2008-11-25 Akim Demaille <demaille@gostai.com>
2438
2439 Get rid of yyrhs and yyprhs in glr.c.
2440 * data/glr.c (yyrhs, yyprhs): Remove.
2441 Instead, use the state stack and yystos.
2442
2443 2008-11-25 Akim Demaille <demaille@gostai.com>
2444
2445 Flag glr tests.
2446 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
2447 as an Autotest keyword.
2448
2449 2008-11-25 Akim Demaille <demaille@gostai.com>
2450
2451 Prefer TESTSUITE_FLAGS.
2452 TESTSUITEFLAGS is barely readable.
2453
2454 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
2455 for backward compatibility.
2456 Use the former instead of the latter.
2457
2458 2008-11-25 Akim Demaille <demaille@gostai.com>
2459
2460 Get rid of yyrhs and yyprhs in larl1.java.
2461 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
2462 (yy_reduce_print): Rather, use yystos_ and the state stack.
2463
2464 2008-11-25 Akim Demaille <demaille@gostai.com>
2465
2466 Formatting changes.
2467
2468 2008-11-25 Akim Demaille <demaille@gostai.com>
2469
2470 Get rid of yyrhs and yyprhs in yacc.c.
2471 They were used to get the symbol types, given a rule number, when
2472 displaying the top of the stack before a reduction. But the
2473 symbol type is available from the state stack. This has two be
2474 benefits: two tables less in the parser (making it smaller), and a
2475 more consistent use of the three stacks which will help to fuse
2476 them.
2477
2478 * data/yacc.c (yyprhs, yyrhs): Remove.
2479 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
2480 (yy_reduce_print): Take yyssp as argument.
2481 Use it, together with yystos, to get the symbol type.
2482 * tests/regression.at (Web2c Report): Remove these tables from the
2483 expected output.
2484
2485 2008-11-25 Akim Demaille <demaille@gostai.com>
2486
2487 b4_tables_map.
2488 The point is to factor the generation of the tables across skeletons.
2489 This is language dependant.
2490
2491 * data/c.m4 (b4_comment_): New.
2492 Should be usable to define how to generate tables independently of
2493 the language.
2494 (b4_c_comment): New.
2495 (b4_comment): Bounce to b4_c_comment.
2496 Now support $2 = [PREFIX] for indentation.
2497 * data/lalr1.cc (b4_table_declare): Don't output a comment if
2498 there is no comment.
2499 Indent it properly when there is one.
2500 Output the ending semicolon.
2501 (b4_table_define): Space changes.
2502 Output the ending semicolon.
2503 (b4_tables_map): New.
2504 Use it twice instead of declaring and defining the (integral)
2505 tables by hand.
2506
2507 2008-11-25 Akim Demaille <demaille@gostai.com>
2508
2509 b4_table_declare.
2510 * data/lalr1.cc (b4_table_declare): New.
2511 Use it to declare the tables defined with b4_table_define.
2512 (b4_table_define): Declare a third arg to match b4_table_declare
2513 signature.
2514 Move all the comments around invocations of b4_table_define into
2515 the invocations itselves.
2516 Move things around to have the order for declarations and
2517 definitions.
2518
2519 2008-11-25 Akim Demaille <demaille@gostai.com>
2520
2521 Formatting changes.
2522 * data/lalr1.java: here.
2523
2524 2008-11-25 Akim Demaille <demaille@gostai.com>
2525
2526 b4_args is more general than only C++.
2527 * data/lalr1.cc (b4_args, _b4_args): Move to...
2528 * data/bison.m4: here.
2529
2530 2008-11-21 Di-an Jan <dianj@freeshell.org>
2531
2532 Implement no-XXX arguments for --warnings, --report, --trace.
2533 * src/getargs.c (flags_argmatch): Handles no-XXX.
2534 Fix typo in doxygen comment.
2535
2536 2008-11-21 Akim Demaille <demaille@gostai.com>
2537
2538 Display the changes in cross-options.texi.
2539 * build-aux/cross-options.pl ($sep): New, to separate items.
2540 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
2541 changes.
2542
2543 2008-11-20 Di-an Jan <dianj@freeshell.org>
2544
2545 Improves options in the manual.
2546 * doc/bison.texinfo (-g, -x): Add space before argument.
2547 (Option Cross Key): Implement FIXME: listing directives also.
2548 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2549 (Short Option): Special case -d. Put arguments inside @option.
2550 (Bison Directive): Add column, automatically extracted from
2551 src/scan-gram.l (actual name passed as the first argument)
2552 with special case for %define.
2553 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
2554 to build-aux/cross-options.pl.
2555 * src/getargs.c (usage): Document limitations of cross-options.pl.
2556 * src/scan-gram.l: Likewise.
2557
2558 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2559
2560 Fix unexpanded macros in GLR defines file.
2561 Reported by Csaba Raduly at
2562 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2563 * THANKS (Csaba Raduly): Add.
2564 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2565 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2566 lexer in a separate module that includes the defines file.
2567 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
2568 source.
2569 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2570 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2571 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2572 (AT_DATA_SOURCE_PROLOGUE): New.
2573 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2574 (AT_DATA_SOURCE): New.
2575 (AT_FULL_COMPILE): Extend to support an additional source file.
2576
2577 2008-11-18 Akim Demaille <demaille@gostai.com>
2578
2579 More TODO.
2580 * TODO: More short term issues.
2581
2582 2008-11-18 Akim Demaille <demaille@gostai.com>
2583
2584 Regen.
2585 * src/parse-gram.h, src/parse-gram.c: Regen.
2586
2587 2008-11-18 Akim Demaille <demaille@gostai.com>
2588
2589 Use b4_subtract where possible.
2590 * data/lalr1.cc (b4_subtract): Move to...
2591 * data/bison.m4: here.
2592 * data/glr.c (b4_rhs_data): Use it.
2593 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
2594
2595 2008-11-18 Akim Demaille <demaille@gostai.com>
2596
2597 Remove incorrect mode specification.
2598 * data/glr.cc: Don't pretend it's C code.
2599
2600 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2601
2602 Simplify last patch slightly.
2603 * src/getargs.c (getargs): Here.
2604
2605 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2606
2607 Fix last warning from --enable-gcc-warnings.
2608 * src/getargs.c (getargs): Don't assign const address to non-const
2609 pointer.
2610
2611 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2612
2613 Don't let maintainer-*-check targets force a version update.
2614 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2615 handled.
2616
2617 2008-11-17 Di-an Jan <dianj@freeshell.org>
2618
2619 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2620 Align menus. Adjust word wrapping. Use node names for menu names.
2621 (Examples): Don't abbreviate node names.
2622 (LocalWords): Remove abbreviations.
2623 (Copying): Make description a sentence.
2624 (Java Action Features): Remove period to match the rest of menu.
2625
2626 2008-11-17 Di-an Jan <dianj@freeshell.org>
2627
2628 Handles several --enable-gcc-warnings.
2629 * src/getargs.c (command_line_location): Set parameters to void.
2630 * src/output.c (symbol_type_name_cmp): Make static.
2631 (symbols_by_type_name): Set parameters to void.
2632 (symbol_definitions_output): Remove unused parameter. Rename as...
2633 (prepare_symbol_definitions): this.
2634 (muscles_output): Move symbol_definitions_output to...
2635 (output): here as prepare_symbol_definitions.
2636 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
2637 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
2638
2639 2008-11-17 Di-an Jan <dianj@freeshell.org>
2640
2641 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
2642 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
2643
2644 2008-11-16 Akim Demaille <demaille@gostai.com>
2645
2646 Add missing $(EXEEXT).
2647 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
2648 "src/bison$(EXEEXT)".
2649 Reported by Di-an Jan.
2650
2651 2008-11-15 Akim Demaille <demaille@gostai.com>
2652
2653 * TODO: Update.
2654
2655 2008-11-15 Akim Demaille <demaille@gostai.com>
2656
2657 Formatting changes.
2658 * tests/input.at: here.
2659
2660 2008-11-15 Akim Demaille <demaille@gostai.com>
2661
2662 Remove duplicate header inclusion.
2663 * src/LR0.c: here.
2664
2665 2008-11-15 Akim Demaille <demaille@gostai.com>
2666
2667 * src/parse-gram.h, src/parse-gram.c: Regen.
2668
2669 2008-11-15 Akim Demaille <demaille@gostai.com>
2670
2671 Support parametric types.
2672
2673 There are two issues to handle: first scanning nested angle
2674 bracket pairs to support types such as std::pair< std::string,
2675 std::list<std::string> > >.
2676
2677 Another issue is to address idiosyncracies of C++: do not glue two
2678 closing angle brackets together (otherwise it's operator>>), and
2679 avoid sticking blindly a TYPE to the opening <, as it can result
2680 in '<:' which is a digraph for '['.
2681
2682 * src/scan-gram.l (brace_level): Rename as...
2683 (nesting): this.
2684 (SC_TAG): New.
2685 Implement support for complex tags.
2686 (tag): Accept
2687 , but not <.
2688 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
2689 (b4_symbol_variant): Leave space around types as parameters.
2690 * examples/variant.yy: Use nested template types and leading ::.
2691 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
2692 Rename as...
2693 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
2694 * tests/c++.at: Test parametric types.
2695
2696 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2697
2698 Test token.prefix.
2699 This is not sufficient, but we test at least that the make_SYMBOL
2700 interface is not affected by token.prefix. A more general test
2701 will be implemented when the support of token.prefix is generalized
2702 to more skeletons.
2703
2704 * tests/c++.at: One more variant test, using token.prefix.
2705
2706 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2707
2708 Test the make_TOKEN interface.
2709 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
2710 Factor the common code in yylex.
2711 Use it to test "%define lex_symbol".
2712
2713 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2714
2715 Formatting change.
2716
2717 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2718
2719 Simplify code for variants bench marks.
2720 * etc/bench.pl.in (&generate_grammar_list): Define and use
2721 location_type.
2722 Factor the common code in yylex.
2723
2724 2008-11-15 Akim Demaille <demaille@gostai.com>
2725
2726 Better error message.
2727 * bootstrap (find_tool): Fix the error message.
2728
2729 2008-11-15 Akim Demaille <demaille@gostai.com>
2730
2731 Update variant.yy to newest interface.
2732 * examples/variant.yy: Define lex_symbol.
2733 Adjust.
2734
2735 2008-11-15 Akim Demaille <demaille@gostai.com>
2736
2737 Don't use locations in variant.yy.
2738 * examples/variant.yy: Adjust to not using locations.
2739
2740 2008-11-15 Akim Demaille <demaille@gostai.com>
2741
2742 Comment changes.
2743 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
2744 comments for the license.
2745
2746 2008-11-15 Akim Demaille <demaille@gostai.com>
2747
2748 Remove tests/Makefile.am.
2749 * tests/Makefile.am: Rename as...
2750 * tests/local.mk: this.
2751 * Makefile.am, configure.ac: Adjust.
2752 * Makefile.am (DISTCLEANFILES): Define.
2753 (maintainer-check, maintainer-xml-check, maintainer-push-check):
2754 Remove, we no longer need to bounce to the real targets.
2755
2756 2008-11-15 Akim Demaille <demaille@gostai.com>
2757
2758 Comment changes.
2759
2760 2008-11-15 Akim Demaille <demaille@gostai.com>
2761
2762 djgpp/local.mk.
2763 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
2764 * djgpp/local.mk: this new file.
2765
2766 2008-11-15 Akim Demaille <demaille@gostai.com>
2767
2768 Remove doc/Makefile.am.
2769 * doc/Makefile.am: Rename as...
2770 * doc/local.mk: this.
2771 Adjust paths
2772 * Makefile.am, configure.ac: Adjust.
2773 * Makefile.am (MOSTLYCLEANFILES): New.
2774 * src/local.mk: Adjust.
2775
2776 2008-11-15 Akim Demaille <demaille@gostai.com>
2777
2778 Move sc_tight_scope into maint.mk.
2779 It does not work, and I don't know how it was supposed to work: it
2780 seems to be looking for sources in the build tree. I just moved
2781 it at a better place, fixing it is still required.
2782
2783 * src/local.mk (echo): Remove.
2784 (sc_tight_scope): Move to...
2785 * maint.mk: here.
2786
2787 2008-11-15 Akim Demaille <demaille@gostai.com>
2788
2789 Regen.
2790 * src/parse-gram.h, src/parse-gram.h: Regen.
2791
2792 2008-11-15 Akim Demaille <demaille@gostai.com>
2793
2794 Remove src/Makefile.am.
2795 * src/Makefile.am: Rename as...
2796 * src/local.mk: this.
2797 Prefix all the paths with src/.
2798 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
2799 (AM_CPPFLAGS): Find find in builddir/src.
2800 (YACC): Move the flags into...
2801 (AM_YFLAGS): here.
2802 * maint.mk (sc_tight_scope): Disable.
2803 It used to bounce to the version in src/Makefile.am which is now
2804 part of this very Makefile.
2805 * Makefile.am, configure.ac: Adjust.
2806 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
2807 include "..." to find files "here": we are no longer in src/, so
2808 qualify the includes with src/.
2809 * doc/Makefile.am (PREPATH): No longer include the top_builddir
2810 prefix.
2811 (.x.1): Adjust to be able to create src/foo from the top level
2812 Makefile, instead of going bounce to src/Makefile the creation of
2813 foo.
2814
2815 2008-11-15 Akim Demaille <demaille@gostai.com>
2816
2817 Remove useless variable.
2818 * doc/Makefile.am (srcsrcdir): Remove.
2819
2820 2008-11-15 Akim Demaille <demaille@gostai.com>
2821
2822 Remove data/Makefile.am.
2823 * data/Makefile.am: Rename as...
2824 * data/local.mk: this.
2825 Adjust paths.
2826 * Makefile.am, configure.ac: Adjust.
2827
2828 2008-11-15 Akim Demaille <demaille@gostai.com>
2829
2830 Remove etc/Makefile.am.
2831 * etc/Makefile.am: Rename as...
2832 * etc/local.mk: this.
2833 Adjust.
2834 * Makefile.am, configure.ac: Adjust.
2835
2836 2008-11-15 Akim Demaille <demaille@gostai.com>
2837
2838 Remove examples/local.mk.
2839 examples/calc++/Makefile.am might be interesting to keep as is, since
2840 it is an example in itself.
2841
2842 * examples/Makefile.am: Rename as...
2843 * examples/local.mk: this.
2844 Adjust.
2845 * Makefile.am, configure.ac: Adjust.
2846
2847 2008-11-15 Akim Demaille <demaille@gostai.com>
2848
2849 Remove build-aux/Makefile.am.
2850 Recursive Makefiles are really way too slow, let's get rid of some of
2851 them.
2852
2853 * build-aux/Makefile.am: Rename as...
2854 * build-aux/local.mk: this.
2855 Adjust paths.
2856 * Makefile.am, configure.ac: Adjust.
2857
2858 2008-11-15 Akim Demaille <demaille@gostai.com>
2859
2860 Provide convenience constructors for locations and positions.
2861 * data/location.cc (position::position): Accept file, line and
2862 column as arguments with default values.
2863 Always qualify initial line and column literals as unsigned.
2864 (location::location): Provide convenience constructors.
2865
2866 2008-11-15 Akim Demaille <demaille@gostai.com>
2867
2868 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2869 token type.
2870 Using template buys us nothing, and makes it uselessly complex to
2871 construct a symbol. Besides, it could not be generalized to other
2872 languages, while make_FOO would work in C/Java etc.
2873
2874 * data/lalr1.cc (b4_symbol_): New.
2875 (b4_symbol): Use it.
2876 (b4_symbol_constructor_declaration_)
2877 (b4_symbol_constructor_definition_): Instead of generating
2878 specializations of an overloaded template function, just generate
2879 several functions whose names are forged from the token names
2880 without the token.prefix.
2881 (b4_symbol_constructor_declarations): Generate them for all the
2882 symbols, not just by class of symbol type, now that instead of
2883 specializing a function template by the token, we generate a
2884 function named after the token.
2885 (b4_symbol_constructor_specialization_)
2886 (b4_symbol_constructor_specializations): Remove.
2887 * etc/bench.pl.in: Adjust to this new API.
2888
2889 2008-11-13 Akim Demaille <demaille@gostai.com>
2890
2891 %define token.prefix.
2892 Provide a means to add a prefix to the name of the tokens as
2893 output in the generated files. Because of name clashes, it is
2894 good to have such a prefix such as TOK_ that protects from names
2895 such as EOF, FILE etc. But it clutters the grammar itself.
2896
2897 * data/bison.m4 (token.prefix): Empty by default.
2898 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2899 * data/lalr1.cc (b4_symbol): Ditto.
2900
2901 2008-11-13 Akim Demaille <demaille@gostai.com>
2902
2903 Compute at M4 time some of the subtractions.
2904 * data/lalr1.cc (b4_subtract): New.
2905 (b4_rhs_data): Use it.
2906
2907 2008-11-13 Akim Demaille <demaille@gostai.com>
2908
2909 symbol::token.
2910 This allows the user to get the type of a token returned by yylex.
2911
2912 * data/lalr1.cc (symbol::token): New.
2913 (yytoknum_): Define when %define lex_symbol, independently of
2914 %debug.
2915 (yytoken_number_): Move into...
2916 (symbol::token): here, since that's the only use.
2917 The other one is YYPRINT which was not officially supported
2918 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2919 array under a different name (yytoknum).
2920
2921 2008-11-13 Akim Demaille <demaille@gostai.com>
2922
2923 YYERRCODE.
2924 * TODO (YYERRCODE): Mention the case of $undef.
2925
2926 2008-11-13 Akim Demaille <demaille@gostai.com>
2927
2928 TODO: YYPRINT.
2929 * TODO (YYPRINT): New.
2930
2931 2008-11-13 Akim Demaille <demaille@gostai.com>
2932
2933 Comment changes.
2934 * data/lalr1.cc, data/yacc.c: Fix the description of the
2935 yytranslate and yytoknum tables.
2936
2937 2008-11-13 Akim Demaille <demaille@gostai.com>
2938
2939 Define make_symbol in the header.
2940 To reach good performances these functions should be inlined (yet
2941 this is to measure precisely). To this end they must be available
2942 to the caller.
2943
2944 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2945 location_type with the class name.
2946 Since will now be output in the header, declare "inline".
2947 No longer use b4_symbol_constructor_specializations, but
2948 b4_symbol_constructor_definitions in the header.
2949 Don't call it in the *.cc file.
2950
2951 2008-11-13 Akim Demaille <demaille@gostai.com>
2952
2953 Define yytranslate in the header for lex_symbol.
2954 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2955 into the header file when using %define lex_symbol.
2956 (yytranslate_): Declare inline.
2957
2958 2008-11-13 Akim Demaille <demaille@gostai.com>
2959
2960 Define the constructors of symbol_type in
2961 b4_symbol_constructor_definitions.
2962 The constructors are called by the make_symbol functions, which a
2963 forthcoming patch will move elsewhere. Hence the interest of
2964 putting them together.
2965
2966 The stack_symbol_type does not need to be moved, it is used only
2967 by the parser.
2968
2969 * data/lalr1.cc: Move symbol_type and symbol_base_type
2970 constructors into...
2971 (b4_symbol_constructor_definitions): here.
2972 Adjust.
2973
2974 2008-11-13 Akim Demaille <demaille@gostai.com>
2975
2976 Make it easier to move the definition of yytranslate_.
2977 Forthcoming changes will make it possible to use yytranslate_
2978 from outside the parser implementation file.
2979
2980 * data/lalr1.cc (b4_yytranslate_definition): New.
2981 Use it.
2982
2983 2008-11-13 Akim Demaille <demaille@gostai.com>
2984
2985 Remove useless class specification.
2986 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
2987 to refer to the class name to use a type defined by the class for
2988 arguments of member functions.
2989
2990 2008-11-13 Akim Demaille <demaille@gostai.com>
2991
2992 Finer input type for yytranslate.
2993 This patch is debatable: the tradition expects yylex to return an int
2994 which happens to correspond to token_number (which is an enum). This
2995 allows for instance to return characters (such as '*' etc.). But this
2996 goes against the stronger typing I am trying to have with the new
2997 lex interface which return a symbol_type. So in this case, feed
2998 yytranslate_ with a token_type.
2999
3000 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3001 expect a token_type.
3002
3003 2008-11-13 Akim Demaille <demaille@gostai.com>
3004
3005 Honor lex-params in %define lex_symbol mode.
3006 * data/lalr1.cc: Use b4_lex_param.
3007
3008 2008-11-13 Akim Demaille <demaille@gostai.com>
3009
3010 Simplify names.
3011 * src/output.c (symbol_definitions_output): Rename symbol
3012 attributes type_name and has_type_name as type and has_type.
3013 * data/lalr1.cc: Adjust uses.
3014
3015 2008-11-13 Akim Demaille <demaille@gostai.com>
3016
3017 Use b4_type_names for the union type.
3018 The union used to compute the size of the variant used to iterate
3019 over the type of all the symbols, with a lot of redundancy. Now
3020 iterate over the lists of symbols having the same type-name.
3021
3022 * data/lalr1.cc (b4_char_sizeof_): New.
3023 (b4_char_sizeof): Use it.
3024 Adjust to be called with a list of numbers instead of a single
3025 number.
3026 Adjust its caller for new-line issues.
3027
3028 2008-11-13 Akim Demaille <demaille@gostai.com>
3029
3030 Define the "identifier" of a symbol.
3031 Symbols may have several string representations, for instance if
3032 they have an alias. What I call its "id" is a string that can be
3033 used as an identifier. May not exist.
3034
3035 Currently the symbols which have the "tag_is_id" flag set are
3036 those that don't have an alias. Look harder for the id.
3037
3038 * src/output.c (is_identifier): Move to...
3039 * src/symtab.c (is_identifier): here.
3040 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3041 * src/output.c (symbol_definitions_output): Use it to define "id"
3042 and "has_id".
3043 Remove the definition of "tag_is_id".
3044 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3045 "tag_is_id" were used to produce code.
3046 We still use "tag" for documentation.
3047
3048 2008-11-11 Akim Demaille <demaille@gostai.com>
3049
3050 Locations are no longer required by lalr1.cc.
3051 * data/lalr1.cc (_b4_args, b4_args): New.
3052 Adjust all uses of locations to make them optional.
3053 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3054 (AT_CHECK_NAMESPACE): Check the use of locations.
3055 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3056 without locations with lalr1.cc.
3057 Test these cases.
3058 * tests/output.at: Check lalr1.cc with and without location
3059 support.
3060 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3061 Don't use locations.
3062
3063 2008-11-11 Akim Demaille <demaille@gostai.com>
3064
3065 AT_FULL_COMPILE.
3066 * tests/local.at (AT_FULL_COMPILE): New.
3067 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3068
3069 2008-11-11 Akim Demaille <demaille@gostai.com>
3070
3071 Support parens in calc++.
3072 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3073 * examples/calc++/test (run): Check the expected output.
3074 Adjust callers.
3075 Check parens too.
3076
3077 2008-11-11 Akim Demaille <demaille@gostai.com>
3078
3079 Simplify lalr1.cc since %defines is mandatory.
3080 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3081
3082 2008-11-11 Akim Demaille <demaille@gostai.com>
3083
3084 TODO: yyfmt.
3085 * TODO (yysyntax_error): New item.
3086
3087 2008-11-11 Akim Demaille <demaille@gostai.com>
3088
3089 Prefer M4 to CPP.
3090 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3091 YYERROR_VERBOSE.
3092
3093 2008-11-11 Akim Demaille <demaille@gostai.com>
3094
3095 Support i18n of the parse error messages.
3096 * TODO (lalr1.cc/I18n): Remove.
3097 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3098 error messages, as done in yacc.c.
3099 Stay within the yy* pseudo namespace.
3100
3101 2008-11-11 Akim Demaille <demaille@gostai.com>
3102
3103 More TODO.
3104 * TODO (single stack, yysyntax_error): New.
3105
3106 2008-11-11 Akim Demaille <demaille@gostai.com>
3107
3108 Make it possible to return a symbol_type from yylex.
3109 * data/lalr1.cc (b4_lex_symbol_if): New.
3110 (parse): When lex_symbol is defined, expected yylex to return the
3111 complete lookahead.
3112 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3113 yylex interface.
3114 (bench_variant_parser): Exercise it.
3115
3116 2008-11-11 Akim Demaille <demaille@gostai.com>
3117
3118 Remove useless bench case.
3119 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3120 no longer used.
3121
3122 2008-11-11 Akim Demaille <demaille@gostai.com>
3123
3124 Improve display of directives.
3125 * etc/bench.pl.in (parse_term): Don't add useless eol.
3126
3127 2008-11-11 Akim Demaille <demaille@gostai.com>
3128
3129 Use string_cast in the bench.
3130 * etc/bench.pl.in (generate_grammar_list): Define and use
3131 string_cast.
3132
3133 2008-11-11 Akim Demaille <demaille@gostai.com>
3134
3135 Replace yychar with a Boolean.
3136 * data/lalr1.cc (parse::yychar): Replace by...
3137 (parse::yyempty): this.
3138
3139 2008-11-11 Akim Demaille <demaille@gostai.com>
3140
3141 Factor the tables.
3142 * TODO: New item.
3143
3144 2008-11-11 Akim Demaille <demaille@gostai.com>
3145
3146 Let yytranslate handle the eof case.
3147 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3148 Adjust callers.
3149 No longer expect yychar to be equal to yyeof_, rather, test the
3150 lookahead's (translated) kind.
3151
3152 2008-11-11 Akim Demaille <demaille@gostai.com>
3153
3154 yychar cannot be empty in yyerrlab.
3155 * TODO (yychar == yyempty_): New.
3156 * data/lalr1.cc: Remove the handling of this case.
3157 This eases forthcoming changes related to yychar and yytranslate.
3158
3159 2008-11-11 Akim Demaille <demaille@gostai.com>
3160
3161 Bench: syntactic sugar for %define/#define.
3162 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3163 (&bench_push_parser, bench_variant_parser): Use this feature.
3164 (&eat): New.
3165 Use it.
3166
3167 2008-11-11 Akim Demaille <demaille@gostai.com>
3168
3169 Less memory pressure on the "list" bench.
3170 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3171 the values, to limit memory pressure.
3172
3173 2008-11-11 Akim Demaille <demaille@gostai.com>
3174
3175 Introduce make_symbol.
3176 make_symbol provides a means to construct a full symbol (kind,
3177 value, location) in a single shot. It is meant to be a Symbol
3178 constructor, parameterized by the symbol kind so that overloading
3179 would prevent incorrect kind/value pairs. Unfortunately
3180 parameterized constructors do not work well in C++ (unless the
3181 parameter also appears as an argument, which is not acceptable),
3182 hence the use of a function instead of a constructor.
3183
3184 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3185 (b4_symbol_constructor_declarations)
3186 (b4_symbol_constructor_specialization_)
3187 (b4_symbol_constructor_specializations)
3188 (b4_symbol_constructor_definition_)
3189 (b4_symbol_constructor_definitions): New.
3190 Use them where appropriate to generate declaration, declaration of
3191 the specializations, and implementations of the templated
3192 overloaded function "make_symbol".
3193 (variant::variant): Always define a default ctor.
3194 Also provide a copy ctor.
3195 (symbol_base_type, symbol_type): New ctor overloads for value-less
3196 symbols.
3197 (symbol_type): Now public, so that functions such as yylex can use
3198 it.
3199
3200 2008-11-11 Akim Demaille <demaille@gostai.com>
3201
3202 Inform m4 whether a tag is a valid id.
3203 * src/output.c (is_identifier): New.
3204 (symbol_definitions_output): Use it to define tag_is_id.
3205 But maybe this should be done at m4 level?
3206
3207 2008-11-11 Akim Demaille <demaille@gostai.com>
3208
3209 Test 214 was failing: it greps with a pattern containing [ ]*
3210 which obviously meant to catch spaces and tabs, but contained only
3211 spaces. Tabulations in sources are a nuisance, so to simplify the
3212 matter, get rid of all the tabulations in the Java sources. The
3213 other skeletons will be treated equally later.
3214
3215 * data/java.m4, data/lalr1.java: Untabify.
3216 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3217 tabulations are no longer generated.
3218
3219 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3220
3221 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3222 * configure.ac: Adjust usage.
3223 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3224 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3225 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3226
3227 2008-11-10 Di-an Jan <dianj@freeshell.org>
3228
3229 Workaround Java's ``code too large'' problem for parser tables
3230 in most cases, by using one function per initialization.
3231 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3232 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3233 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3234 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3235 (yytname_): Use b4_typed_parser_table.
3236 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3237 ``code too large'' error.
3238
3239 2008-11-10 Di-an Jan <dianj@freeshell.org>
3240
3241 * NEWS: Document them.
3242
3243 General Java skeleton improvements.
3244 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3245 using gcj < 4.3 in the testsuite, according to comments in
3246 gnulib/m4/javacomp.m4.
3247 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3248 location_type, position_type): Remove extraneous brackets from
3249 b4_percent_define_default.
3250 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3251 m4_define and m4_define_default.
3252 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3253 which marks the end of user code with appropriate syncline, like all
3254 the other skeletons.
3255 (b4_user_post_prologue): Add. Don't silently drop.
3256 (yylex): Remove.
3257 (parse): Inline yylex.
3258 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3259 (%{...%}): Fix typo of %code imports.
3260 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3261
3262 Support annotations on parser class with %define annotations.
3263 * data/lalr1.java (annotations): Add to parser class modifier.
3264 * doc/bison.texinfo (Java Parser Interface): Document
3265 %define annotations.
3266 (Java Declarations Summary): Document %define annotations.
3267 * tests/java.at (Java parser class modifiers): Test annotations.
3268
3269 Do not generate code for %error-verbose unless requested.
3270 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3271 Make private. Make conditional on %error-verbose.
3272 (getErrorVerbose, setErrorVerbose): New.
3273 (yytnamerr_): Make conditional on %error-verbose.
3274 (yysyntax_error): Make some code conditional on %error-verbose.
3275 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3276 about %error-verbose having no effect.
3277 (getErrorVerbose, setErrorVerbose): Document.
3278
3279 Move constants for token names to Lexer interface.
3280 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3281 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3282 (parse): Qualify EOF to Lexer.EOF.
3283 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3284 EOF and token names to Java Lexer Interface.
3285 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3286
3287 Make yyerror public.
3288 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3289 (yyerror): Change to public. Add Javadoc comments. Use longer
3290 parameter names. Make the body rather than the declarator
3291 conditional on %locations.
3292 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3293
3294 Allow user to add code to the constructor with %code init.
3295 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3296 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3297 Add %code init to the front of the constructor body.
3298 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3299 and %define init_throws.
3300 (Java Declarations Summary): Document %code init and
3301 %define init_throws.
3302 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3303 (Java constructor init and init_throws): Add tests.
3304
3305 2008-11-10 Akim Demaille <demaille@gostai.com>
3306
3307 Update TODO.
3308 * TODO (-D): is implemented.
3309 (associativity): Same precedence must have the same associativity.
3310 For instance, how can a * b / c be parsed if * is %left and / is
3311 %right?
3312 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3313
3314 2008-11-10 Akim Demaille <demaille@gostai.com>
3315
3316 Formatting changes.
3317
3318 2008-11-10 Akim Demaille <demaille@gostai.com>
3319
3320 More information about the symbols.
3321 * src/output.c (type_names_output): Document all the symbols,
3322 including those that don't have a type-name.
3323 (symbol_definitions_output): Define "is_token" and
3324 "has_type_name".
3325 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3326 type-name, now that they are defined too in b4_type_names.
3327
3328 2008-11-10 Akim Demaille <demaille@gostai.com>
3329
3330 Regen.
3331
3332 2008-11-10 Akim Demaille <demaille@gostai.com>
3333
3334 Make parser::yytranslate static.
3335 Small speedup (1%) on the list grammar. And makes yytranslate_
3336 available in non member functions.
3337
3338 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3339 function.
3340
3341 2008-11-10 Akim Demaille <demaille@gostai.com>
3342
3343 Avoid trailing spaces.
3344 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3345 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3346 they can be empty, and anyway this incorrectly indents the first
3347 action.
3348
3349 2008-11-10 Akim Demaille <demaille@gostai.com>
3350
3351 Comment changes.
3352
3353 2008-11-10 Akim Demaille <demaille@gostai.com>
3354
3355 Use "enum" for integral constants.
3356 This is just nicer to read, I observed no speedup.
3357
3358 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3359 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3360 (yyuser_token_number_max_, yyundef_token_): Move into...
3361 (yytranslate_): here.
3362
3363 2008-11-10 Akim Demaille <demaille@gostai.com>
3364
3365 Shortcuts in bench directives.
3366 * etc/bench.pl.in (parse_dirs): New.
3367 Use it.
3368 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3369 Create the benches in "benches/".
3370
3371 2008-11-10 Akim Demaille <demaille@gostai.com>
3372
3373 Formatting changes.
3374 * data/lalr1.cc: here.
3375
3376 2008-11-10 Akim Demaille <demaille@gostai.com>
3377
3378 Adjust verbose message to using emacs.
3379 * etc/bench.pl.in: Inform compilation-mode when we change the
3380 directory.
3381 (generate_grammar_list): Recognize %define "variant" in addition
3382 to %define variant.
3383
3384 2008-11-10 Akim Demaille <demaille@gostai.com>
3385
3386 Classify symbols by type-name.
3387 * src/uniqstr.h (UNIQSTR_CMP): New.
3388 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
3389 (type_names_output): New.
3390 (muscles_output): Use it.
3391 * data/lalr1.cc (b4_symbol_action_): Remove.
3392 (b4_symbol_case_, b4_type_action_): New.
3393 Adjust uses of b4_symbol_action_ to use b4_type_action_.
3394
3395 2008-11-10 Akim Demaille <demaille@gostai.com>
3396
3397 Change the handling of the symbols in the skeletons.
3398 Before we were using tables which lines were the symbols and which
3399 columns were things like number, tag, type-name etc. It is was
3400 difficult to extend: each time a column was added, all the numbers had
3401 to be updated (you asked for colon $2, not for "tag"). Also, it was
3402 hard to filter these tables when only a subset of the symbols (say the
3403 tokens, or the nterms, or the tokens that have and external number
3404 *and* a type-name) was of interest.
3405
3406 Now instead of monolithic tables, we define one macro per cell. For
3407 instance "b4_symbol(0, tag)" is a macro name which contents is
3408 self-decriptive. The macro "b4_symbol" provides easier access to
3409 these cells.
3410
3411 * src/output.c (type_names_output): Remove.
3412 (symbol_numbers_output, symbol_definitions_output): New.
3413 (muscles_output): Call them.
3414 (prepare_symbols): Define b4_symbols_number.
3415
3416 2008-11-10 Akim Demaille <demaille@gostai.com>
3417
3418 --trace=muscles
3419 * src/getargs.h, src/getargs.c (trace_muscle): New.
3420 (trace_types, trace_args): Support it.
3421 * src/output.c (output_skeleton): Use it.
3422
3423 2008-11-10 Akim Demaille <demaille@gostai.com>
3424
3425 muscles_output.
3426 * src/output.c (muscles_output): New, extracted from...
3427 (output_skeleton): here.
3428 Adjust.
3429
3430 2008-11-10 Akim Demaille <demaille@gostai.com>
3431
3432 Formatting changes.
3433
3434 2008-11-10 Akim Demaille <demaille@gostai.com>
3435
3436 Update the variant example.
3437 * examples/variant.yy: Formatting changes.
3438 One stage build.
3439
3440 2008-11-10 Akim Demaille <demaille@gostai.com>
3441
3442 Support constructor with an argument.
3443 This improves the "list" bench by 2%.
3444
3445 * data/lalr1.cc (variant::build): Add an overloaded version with
3446 an argument.
3447 * tests/c++.at (AT_CHECK_VARIANT): Check it.
3448
3449 2008-11-10 Akim Demaille <demaille@gostai.com>
3450
3451 Test variants.
3452 * tests/c++.at (AT_CHECK_VARIANTS): New.
3453 Use it with and without %define assert.
3454
3455 2008-11-10 Akim Demaille <demaille@gostai.com>
3456
3457 Add %precedence support.
3458 Unfortunately it is not possible to reuse the %prec directive. This
3459 is because to please POSIX, we do not require to end the rules with a
3460 semicolon. As a result,
3461
3462 foo: bar %prec baz
3463
3464 is ambiguous: either a rule which precedence is that of baz, or a rule,
3465 and then a declaration of the precedence of the token baz.
3466
3467 * doc/bison.texinfo: Document %precedence.
3468 (Precedence Only): New.
3469 * src/assoc.h, src/assoc.c (precedence_assoc): New.
3470 * src/conflicts.c (resolve_sr_conflict): Support it.
3471 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
3472 Parse it.
3473 * tests/calc.at: Use %precedence for NEG.
3474 * tests/conflicts.at (%precedence does not suffice)
3475 (%precedence suffices): New tests.
3476
3477 2008-11-09 Akim Demaille <demaille@gostai.com>
3478
3479 Make benches in a sub dirs.
3480 * etc/bench.pl.in ($dir): New.
3481 Use it.
3482 Check the use of constructors with an argument.
3483 (bench_variant_parser): Fix.
3484
3485 2008-11-09 Akim Demaille <demaille@gostai.com>
3486
3487 fix eof condition
3488
3489 2008-11-09 Akim Demaille <demaille@gostai.com>
3490
3491 Fix --help.
3492
3493 2008-11-09 Akim Demaille <demaille@gostai.com>
3494
3495 Require the generation of parse-gram.output.
3496 * src/Makefile.am (YACC): Pass --report=all.
3497
3498 2008-11-09 Akim Demaille <demaille@gostai.com>
3499
3500 Formatting changes.
3501
3502 2008-11-09 Akim Demaille <demaille@gostai.com>
3503
3504 Update TODO.
3505 * TODO: Remove obsolete items.
3506 Update others.
3507
3508 2008-11-09 Akim Demaille <demaille@gostai.com>
3509
3510 Enhance bench.pl.
3511 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
3512 (@token, $grammar, $bench): New.
3513 (generate_grammar_variant): Rename as...
3514 (generate_grammar_list): this.
3515 (generate_grammar): Adjust.
3516 (bench_grammar): Rename as...
3517 (bench): this.
3518 Use it in the various bench-marking routines.
3519 (-b, -g): New options.
3520
3521 2008-11-09 Akim Demaille <demaille@gostai.com>
3522
3523 Use a static hierarchy for symbols in the C++ parser.
3524 * data/lalr1.cc (symbol_base_type, symbol_type)
3525 (stack_symbol_type): Make it a static hierarchy.
3526 Adjust dependencies.
3527
3528 2008-11-09 Akim Demaille <demaille@gostai.com>
3529
3530 bench.pl -d, --directive.
3531 * etc/bench.pl.in (@directive): New.
3532 (&bench_grammar): Use it.
3533 (&bench_list_grammar): New, to provide access to the "variant"
3534 grammar.
3535 Use it.
3536 (getopts): Support -d, --directive.
3537
3538 2008-11-09 Akim Demaille <demaille@gostai.com>
3539
3540 Use inline for small operations.
3541 * data/lalr1.cc (symbol_base_type, symbol_type)
3542 (stack_symbol_type): Declare constructor and other operations as
3543 inline.
3544 (yy_destroy_): Inline.
3545
3546 2008-11-09 Akim Demaille <demaille@gostai.com>
3547
3548 Introduce a hierarchy for symbols.
3549 * data/lalr1.cc (symbol_base_type, symbol_type): New.
3550 (data_type): Rename as...
3551 (stack_symbol_type): this.
3552 Derive from symbol_base_type.
3553 (yy_symbol_value_print_): Merge into...
3554 (yy_symbol_print_): this.
3555 Rename as...
3556 (yy_print_): this.
3557 (yydestruct_): Rename as...
3558 (yy_destroy_): this.
3559 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
3560 (parser::parse): yyla is now of symbol_type.
3561 Use its type member instead of yytoken.
3562
3563 2008-11-09 Akim Demaille <demaille@gostai.com>
3564
3565 Rename data_type and stack_symbol_type.
3566 * data/lalr1.cc (data_type): Rename as...
3567 (stack_symbol_type): this.
3568
3569 2008-11-09 Akim Demaille <demaille@gostai.com>
3570
3571 Handle semantic value and location together.
3572 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
3573 yydata.value and yydata.location.
3574 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
3575 (YY_SYMBOL_PRINT): Now take semantic value and location as a
3576 single arg.
3577 Adjust all callers.
3578 (yydestruct_): New overload for a stack symbol.
3579
3580 2008-11-09 Akim Demaille <demaille@gostai.com>
3581
3582 Push a complete symbol, not connected parts.
3583 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
3584 state, value and location.
3585 Adjust callers.
3586
3587 2008-11-09 Akim Demaille <demaille@gostai.com>
3588
3589 Agregate yylval and yylloc.
3590 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
3591 (parser::yyla): this.
3592
3593 2008-11-09 Akim Demaille <demaille@gostai.com>
3594
3595 Rely on the state stack to display reduction traces.
3596 To display rhs symbols before a reduction, we used information
3597 about the rule reduced, which required the tables yyrhs and
3598 yyprhs. Now use rely only on the state stack to get the same
3599 information.
3600
3601 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
3602 Use them.
3603 (parser::yyrhs_, parser::yyprhs_): Remove.
3604 (parser::yy_reduce_print_): Use the state stack.
3605
3606 2008-11-09 Akim Demaille <demaille@gostai.com>
3607
3608 Fuse yyval and yyloc into yylhs.
3609 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
3610 yylhs.
3611 (parse): Replace yyval and yyloc with yylhs.value and
3612 yylhs.location.
3613 After a user action, compute yylhs.state earlier.
3614 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
3615 fresh error_token.
3616
3617 2008-11-09 Di-an Jan <dianj@freeshell.org>
3618
3619 Remove unused variable.
3620 * src/output.c (type_names_output): Remove unused variable sep.
3621
3622 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
3623
3624 Change tests/output.at quoting.
3625 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
3626 expanding arguments.
3627
3628 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3629
3630 Don't add a semicolon to actions for %skeleton or %language.
3631 It breaks Java test cases as reported by Akim Demaille.
3632 * src/scan-code.l: Implement.
3633
3634 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3635
3636 Clean up %skeleton and %language priority implementation.
3637 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3638 remove static qualifier because others will soon need to see it.
3639 (language_prio): Likewise.
3640 (getargs): Use command_line_prio rather than 0.
3641 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3642 enum fields.
3643 (skeleton_prio): Extern it.
3644 (language_prio): Extern it.
3645 * src/parse-gram.y: Use grammar_prio rather than 1.
3646
3647 2008-11-07 Akim Demaille <demaille@gostai.com>
3648
3649 Moving push traces into yypush_.
3650 * data/lalr1.cc (yypush_): Now takes a optional trace message.
3651 Adjust all uses.
3652
3653 2008-11-07 Akim Demaille <demaille@gostai.com>
3654
3655 The single-stack C++ parser is now the standard one.
3656 * data/lalr1.cc: Rename as...
3657 * data/lalr1-split.cc: this.
3658 * data/lalr1-fusion.cc: Rename as...
3659 * data/lalr1.cc: this.
3660 * etc/bench.pl.in: Adjust.
3661
3662 2008-11-07 Akim Demaille <demaille@gostai.com>
3663
3664 Avoid empty-if warnings.
3665 Reported by Quentin Hocquet.
3666
3667 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
3668 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
3669
3670 2008-11-07 Akim Demaille <demaille@gostai.com>
3671
3672 Pass command line location to skeleton_arg and language_argmatch.
3673 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
3674 The location argument is now mandatory.
3675 Adjust all dependencies.
3676 (getargs): Use command_line_location.
3677
3678 2008-11-07 Akim Demaille <demaille@gostai.com>
3679
3680 -D, --define.
3681 * src/getargs.c (usage): Document -D.
3682 Fix help string for --locations.
3683 (command_line_location): New.
3684 (short_options, long_options, getargs): Support -D, --define.
3685 (getargs): Move -d support at the right place.
3686 * doc/bison.texinfo (Bison Options): Update.
3687 * tests/input.at (%define, --define): New.
3688
3689 2008-11-07 Akim Demaille <demaille@gostai.com>
3690
3691 Initialize the muscle table before parsing the command line.
3692 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
3693 (getargs): Define file_name.
3694 * src/main.c (main): Initialize muscle_tab before calling
3695 getargs.
3696 * src/muscle_tab.c (muscle_init): No longer define file_name, as
3697 its value is not available yet.
3698
3699 2008-11-07 Akim Demaille <demaille@gostai.com>
3700
3701 Locations without columns for command line arguments.
3702 * src/location.c (location_print): Don't display negative columns.
3703 * src/location.h: Document this.
3704
3705 2008-11-07 Akim Demaille <demaille@gostai.com>
3706
3707 Fix --help.
3708 * src/getargs.c (usage): Fix help string for -W.
3709
3710 2008-11-07 Akim Demaille <demaille@gostai.com>
3711
3712 Handle more general types of option arguments.
3713 * build-aux/cross-options.pl: The argument ends at the first
3714 space, not the first non-symbol character.
3715 Use @var for each word appearing the argument description.
3716
3717 2008-11-07 Akim Demaille <demaille@gostai.com>
3718
3719 Destroy the variants that remain on the stack in case of error.
3720 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
3721 destructor.
3722 Display the value only if yymsg is nonnull.
3723 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
3724
3725 2008-11-07 Akim Demaille <demaille@gostai.com>
3726
3727 Add "%define assert" to variants.
3728 This is used to help the user catch cases where some value gets
3729 ovewritten by a new one. This should not happen, as this will
3730 probably leak.
3731
3732 Unfortunately this uncovered a bug in the C++ parser itself: the
3733 lookahead value was not destroyed between two calls to yylex. For
3734 instance if the previous lookahead was a std::string, and then an int,
3735 then the value of the std::string was correctly taken (i.e., the
3736 lookahead was now an empty string), but std::string structure itself
3737 was not reclaimed.
3738
3739 This is now done in variant::build(other&) (which is used to take the
3740 value of the lookahead): other is not only stolen from its value, it
3741 is also destroyed. This incurs a new performance penalty of a few
3742 percent, and union becomes faster again.
3743
3744 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
3745 (b4_variant_if): New.
3746 (variant::built): New.
3747 Use it whereever the status of the variant changes.
3748 * etc/bench.pl.in: Check the penalty of %define assert.
3749
3750 2008-11-07 Akim Demaille <demaille@gostai.com>
3751
3752 Use "%define variant" in bench.pl.
3753 * etc/bench.pl.in: No longer use the pseudo directive %variants,
3754 just use %define variants.
3755
3756 2008-11-07 Akim Demaille <demaille@gostai.com>
3757
3758 Regen.
3759 * src/parse-gram.h, src/parse-gram.c: Regen.
3760
3761 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3762
3763 Fix user actions without a trailing semicolon.
3764 Reported by Sergei Steshenko at
3765 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3766 * THANKS (Sergei Steshenko): Add.
3767 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3768 * tests/regression.at (Fix user actions without a trailing semicolon):
3769 New test case.
3770
3771 2008-11-04 Akim Demaille <demaille@gostai.com>
3772
3773 Use b4_copyright_years.
3774 * data/yacc.c (b4_copyright_years): New.
3775 Fix its value according to the comments in the file.
3776 Use it and undefine it.
3777
3778 2008-11-04 Akim Demaille <demaille@gostai.com>
3779
3780 Formatting changes.
3781 * data/lalr1-fusion.cc, src/parse-gram.y: here.
3782
3783 2008-11-04 Akim Demaille <demaille@gostai.com>
3784
3785 Formatting changes.
3786 * data/lalr1-fusion.cc: here.
3787
3788 2008-11-04 Akim Demaille <demaille@gostai.com>
3789
3790 Use strict on bench.pl.
3791 * etc/bench.pl.in (&run, &generate_grammar): New.
3792 Rename the grammar generating functions for consistency.
3793 Change the interface so that the list of benches to run is passed
3794 as (optionless) arguments.
3795 (&compile): Use &run.
3796
3797 2008-11-04 Akim Demaille <demaille@gostai.com>
3798
3799 Remove spurious initial empty lines.
3800 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3801 * data/yacc.c: End the @output lines with an @.
3802
3803 2008-11-04 Akim Demaille <demaille@gostai.com>
3804
3805 Improve the display of sizes.
3806 * etc/bench.p.in: Higher precision.
3807 Sort by decreasing size.
3808
3809 2008-11-04 Akim Demaille <demaille@gostai.com>
3810
3811 Don't memcpy C++ structures.
3812 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
3813 arguments.
3814 (variant::build): New overload for
3815 copy-construction-that-destroys.
3816 (variant::swap): New.
3817 (parser::yypush_): Use it in variant mode.
3818
3819 2008-11-04 Akim Demaille <demaille@gostai.com>
3820
3821 Better defaults for bench.pl.
3822 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
3823 default values.
3824 Adjust &verbose uses.
3825 (-q, --quiet): New.
3826
3827 2008-11-04 Akim Demaille <demaille@gostai.com>
3828
3829 Make variant.yy more complex.
3830 std::list cannot be copied via memcpy, they are more demanding than
3831 std::string. Use one std::list to strengthen the test.
3832
3833 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
3834 Adjust.
3835 Create a list of strings, instead of a single large string.
3836
3837 2008-11-04 Akim Demaille <demaille@gostai.com>
3838
3839 bench.pl --bench.
3840 * etc/bench.pl.in (--bench, $bench): New.
3841
3842 2008-11-04 Akim Demaille <demaille@gostai.com>
3843
3844 Sort methods.
3845 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
3846 Define it after as().
3847
3848 2008-11-04 Akim Demaille <demaille@gostai.com>
3849
3850 Useless parens.
3851 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
3852
3853 2008-11-04 Akim Demaille <demaille@gostai.com>
3854
3855 Issue missing synclines after user actions.
3856 * data/c.m4 (b4_case): Issue synclines on the output file.
3857
3858 2008-11-04 Akim Demaille <demaille@gostai.com>
3859
3860 Remove trailing empty line.
3861 * data/lalr1-fusion.cc: Don't add an empty line after the user's
3862 epilogue.
3863
3864 2008-11-04 Akim Demaille <demaille@gostai.com>
3865
3866 Fix output of copyright years.
3867 * data/bison.m4 (b4_copyright): Fix the indentation of the
3868 copyright year paragraph.
3869 Use b4_copyright_years when no years are given.
3870 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3871 (b4_copyright_years): New.
3872 Use it.
3873
3874 2008-11-04 Akim Demaille <demaille@gostai.com>
3875
3876 Avoid the spurious initial empty line.
3877 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3878 the end of @output request to suppress the empty line that
3879 results.
3880
3881 2008-11-04 Akim Demaille <demaille@gostai.com>
3882
3883 Remove parser::rhs_number_type.
3884 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3885 (yyrhs_): Use b4_table_define.
3886
3887 2008-11-04 Akim Demaille <demaille@gostai.com>
3888
3889 Fix iteration type.
3890 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3891
3892 2008-11-04 Akim Demaille <demaille@gostai.com>
3893
3894 Factor the declaration of the integer tables.
3895 * data/lalr1-fusion.cc (b4_table_define): New.
3896 Use it.
3897
3898 2008-11-03 Akim Demaille <demaille@gostai.com>
3899
3900 Fix indentation of tables in lalr1.cc
3901 * data/lalr1-fusion.cc: Fix the indentation.
3902
3903 2008-11-03 Akim Demaille <demaille@gostai.com>
3904
3905 Destroy the lhs symbols after reduction.
3906 * data/lalr1-fusion.cc (parse): After the user action, when in
3907 variant mode, destroy the lhs symbols.
3908
3909 2008-11-03 Akim Demaille <demaille@gostai.com>
3910
3911 Simplify yysyntax_error_ use.
3912 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3913 type, but make it unnamed in the declaration when it is not used.
3914
3915 2008-11-03 Akim Demaille <demaille@gostai.com>
3916
3917 Let yy::variant::build return an lvalue.
3918 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3919 object.
3920
3921 2008-11-03 Akim Demaille <demaille@gostai.com>
3922
3923 Define yy::variant only when needed.
3924 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3925 used.
3926
3927 2008-11-03 Akim Demaille <demaille@gostai.com>
3928
3929 Bench the three-stack lalr1.cc.
3930 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3931 one-stack one.
3932
3933 2008-11-03 Akim Demaille <demaille@gostai.com>
3934
3935 Fail on parse error in calc++.
3936 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
3937 status.
3938 * examples/calc++/test ($me, $number, $exit, run): New.
3939 Use them to propagate errors to the exit status.
3940
3941 2008-11-03 Akim Demaille <demaille@gostai.com>
3942
3943 Don't specify the skeleton twice in the example.
3944 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3945 file does what is needed.
3946
3947 2008-11-03 Akim Demaille <demaille@gostai.com>
3948
3949 bench: Improve output.
3950 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3951
3952 2008-11-03 Akim Demaille <demaille@gostai.com>
3953
3954 bench: check impact of %debug on variants.
3955 * etc/bench.pl.in (variant_grammar): Fix the computation of
3956 $variant.
3957 Generate a grammar file that can work with or without %debug.
3958 Do use the @directive.
3959 (bench_variant_parser): Check impact of %debug.
3960 (@directives): Rename all the occurrences to...
3961 (@directive): this, for consistency.
3962
3963 2008-11-03 Akim Demaille <demaille@gostai.com>
3964
3965 bench: report the size too.
3966 * etc/bench.pl.in ($iterations): Defaults to -3.
3967 (&bench_grammar): Require hireswallclock.
3968 Compute and display the size of the result.
3969 More comments.
3970
3971 2008-11-03 Akim Demaille <demaille@gostai.com>
3972
3973 bench: More use of the verbosity level.
3974 * etc/bench.pl.in ($verbose, &verbose): New.
3975 Use them.
3976 More POD documentation.
3977
3978 2008-11-03 Akim Demaille <demaille@gostai.com>
3979
3980 bench.pl: a command line interface
3981 * etc/bench.pl.in: More doc.
3982 Some fixes in the documentation.
3983 ($cflags, $iterations, &help, &getopt): New.
3984 Use them.
3985 (&variant_grammar): Let the number of stages be 10 times what is
3986 specified.
3987
3988 2008-11-03 Akim Demaille <demaille@gostai.com>
3989
3990 Bench the use of Boost.Variants.
3991 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
3992 New.
3993 (&compile): Be ready to compile C++ parsers.
3994 (&bench_push_parser): Move debug information to the outermost
3995 level.
3996 * THANKS: Add Michiel De Wilde.
3997
3998 2008-11-03 Akim Demaille <demaille@gostai.com>
3999
4000 bench.pl: Pass directives as a list instead of as a string.
4001 * etc/bench.pl.in (&directives): New.
4002 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4003 directives.
4004 (&triangular_grammar): Do use the directives (were ignored).
4005 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4006 directives.
4007
4008 2008-11-03 Akim Demaille <demaille@gostai.com>
4009
4010 Improve genericity of bench.pl.
4011 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4012 argument.
4013 (&bench_push_parser): New.
4014 Call it.
4015
4016 2008-11-03 Akim Demaille <demaille@gostai.com>
4017
4018 Add documentation to bench.pl.
4019 * etc/bench.pl.in: Comment changes.
4020
4021 2008-11-03 Akim Demaille <demaille@gostai.com>
4022
4023 Fuse the three stacks into a single one.
4024
4025 In order to make it easy to perform benchmarks to ensure that
4026 there are no performance loss, lalr1.cc is forked into
4027 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4028 lalr1.cc.
4029
4030 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4031 exercized by the test suite, the user must install a symbolic link
4032 from lalr1.cc to it.
4033
4034 Instead of having three stacks (state, value, location), use a
4035 stack of triples. This considerably simplifies the code (and it
4036 will be easier not to require locations as currently does the C++
4037 parser), and also gives a 10% speedup according to
4038 etc/bench (probably mainly since memory allocation is done once
4039 instead of three times).
4040
4041 Another motivation is to make it easier to destruct properly
4042 semantic values: now that they are bound to their state (hence
4043 symbol type) it will be easier to call the appropriate destructor.
4044
4045 These changes should probably benefit the C parser too.
4046
4047 * data/lalr1.cc: Copy as...
4048 * data/lalr1-fusion.cc: this new file.
4049 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4050 from c++.m4.
4051 (state_stack_type, semantic_stack_type, location_stack_type)
4052 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4053 (data_type, stack_type, yystack_): New.
4054 (YYLLOC_DEFAULT, yypush_): Adjust.
4055 (yyerror_range): Now based on data_type, not location_type.
4056
4057 2008-11-03 Akim Demaille <demaille@gostai.com>
4058
4059 Push the state, value, and location at the same time.
4060 This is needed to prepare a forthcoming patch that fuses the three
4061 stacks into one.
4062
4063 * data/lalr1.cc (parser::yypush_): New.
4064 (parser::yynewstate): Change the semantics: instead of arriving to
4065 this label when value and location have been pushed, but yystate
4066 is to be pushed on the state stack, now the three of them must
4067 have been pushed before. yystate still must be the new state.
4068 This allows to use yypush_ everywhere instead of individual
4069 handling of the stacks.
4070
4071 2008-11-03 Akim Demaille <demaille@gostai.com>
4072
4073 Prefer references to pointers.
4074 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4075 definition to use references instead of pointers.
4076 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4077 Take the value and location as references.
4078 Adjust callers.
4079
4080 2008-11-03 Akim Demaille <demaille@gostai.com>
4081
4082 stack::size instead of stack::height.
4083 * data/lalr1.cc (stack::height): Rename as...
4084 (stack::size): this.
4085 Fix the output type.
4086 Comment changes.
4087
4088 2008-11-03 Akim Demaille <demaille@gostai.com>
4089
4090 Use variants to support objects as semantic values.
4091 This patch was inspired by work by Michiel De Wilde. But he used
4092 Boost variants which (i) requires Boost on the user side, (ii) is
4093 slow, and (iii) has useless overhead (the parser knows the type of
4094 the semantic value there is no reason to duplicate this
4095 information as Boost.Variants do).
4096
4097 This implementation reserves a buffer large enough to store the
4098 largest objects. yy::variant implements this buffer. It was
4099 implemented with Quentin Hocquet.
4100
4101 * src/output.c (type_names_output): New.
4102 (output_skeleton): Invoke it.
4103 * data/c++.m4 (b4_variant_if): New.
4104 (b4_symbol_value): If needed, provide a definition for variants.
4105 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4106 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4107 (b4_char_sizeof, yy::variant): New.
4108 (parser::parse): If variants are requested, define
4109 parser::union_type, parser::variant, change the definition of
4110 semantic_type, construct $$ before running the user action instead
4111 of performing a default $$ = $1.
4112 * examples/variant.yy: New.
4113 Based on an example by Michiel De Wilde.
4114
4115 2008-11-03 Akim Demaille <demaille@gostai.com>
4116
4117 Parameterize the extraction of semantic values.
4118 To make future changes easier, no longer rely on ".TYPE" being the
4119 way to get a semantic value.
4120
4121 * data/c.m4 (b4_symbol_value): New.
4122 Use it.
4123 * data/c++.m4, data/yacc.c: Use it.
4124 * data/glr.c: Use b4_symbol_value.
4125 (b4_rhs_data): New.
4126 Use it.
4127
4128 2008-11-03 Akim Demaille <demaille@gostai.com>
4129
4130 Prepare easier M4 changes.
4131 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4132 future changes.
4133
4134 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4135
4136 Initiate further development.
4137 * NEWS: Create an empty section for new entries.
4138 * gnulib: Update submodule to HEAD.
4139
4140 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4141
4142 * NEWS: Version 2.4.
4143
4144 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4145
4146 Prepare for next release.
4147 * NEWS: Briefly mention changes since 2.3b.
4148 * README: Say GNU m4 1.4.6, which we've been requiring in release
4149 announcements already, not 1.4.3, which breaks the build.
4150
4151 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4152
4153 Say %language is experimental.
4154 We're thinking of extending it's effect on output file naming. See the
4155 thread at
4156 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4157 * NEWS: Say it's experimental.
4158 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4159 recommend it over %skeleton for now.
4160 (Bison Options): Likewise.
4161 (C++ Bison Interface): Use %skeleton not %language.
4162 (Calc++ Parser): Use %skeleton not %language.
4163 * src/getargs.c (usage): Say it's experimental.
4164
4165 2008-11-01 Di-an Jan <dianj@freeshell.org>
4166 Paolo Bonzini <bonzini@gnu.org>
4167
4168 Support all Java parser class modifiers.
4169 * data/java.m4 (b4_percent_define_get3): New.
4170 (b4_final_if, b4_strictfp_if): New.
4171 * data/lalr1.java (final, strictfp, extends, implements): Support.
4172 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4173 documentation.
4174 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4175 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4176 (AT_CHECK_JAVA_GREP): New.
4177 (Java parser class modifiers): New test.
4178 (Java parser class extends and implements): New test.
4179
4180 Model exception propagation better with throws and lex_throws.
4181 * data/java.m4 (b4_list2): New.
4182 (throws): Change default.
4183 * data/lalr1.java (yyaction): Add throws.
4184 (parse): Add lex_throws in addition to throws.
4185 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4186 * tests/java.at (Java throws specifications): New test.
4187
4188 Improve documentation for Java parsers.
4189 * doc/bison.texinfo (Java Parsers): Add subsections.
4190 Don't quote first argument of %define.
4191 (Java Bison Interface): Document output files. Move documentation
4192 of parser class and merge into Java Parser Interface. Document
4193 features that error out. Document directives with no effect.
4194 Move note about Javadoc higher.
4195 (Java Semantic Values): Explicitly mention stype.
4196 Document that generic types cannot be used.
4197 (Java Location Values): Use @deftypeivar. Document constructors.
4198 Correct return value for toString.
4199 (Java Parser Interface): List undocumented constants/fields.
4200 Move documentation of fields added by %parse-param closer to list
4201 of members. Document that token names are added as fields.
4202 Document constructors accurately. Remove error method.
4203 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4204 Interface. Describe %code lexer and yylex accutately.
4205 Remove documentation that does not match the code.
4206 (Java Action Features): New.
4207 (Java Differences): Add reference. Add item on semantic values.
4208 Add note about @{ ... @}. Clarify %% epilogue placement.
4209 (Java Declarations Summary): New.
4210
4211 Fix Java skeleton.
4212 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4213 (b4_remove_comma): Quote test argument.
4214 (b4_identification): Remove "bison" field.
4215 * tests/java.at (Java parser class and package names): New test.
4216 (Java %parse-param and %lex-param): New test.
4217 (Java stype, position_class and location_class): New test.
4218
4219 2008-10-31 Di-an Jan <dianj@freeshell.org>
4220
4221 * data/lalr1.jave: Update copyright years.
4222 (YYParser): Correct name of "generated from" file in Javadoc:
4223 use b4_file_name instead of @ofile@.
4224 (Location constructor): Correct Javadoc parameter name.
4225 (yylloc): Add missing opening m4 quote after b4_location_if.
4226 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4227 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4228 (YYParser constructor): Correct Javadoc parameter name.
4229
4230 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4231
4232 Always put auxiliary code files in the same dir as other output files.
4233 * src/files.c (compute_file_name_parts): When the user specifies
4234 --output but not --file-prefix, extract the directory prefix from the
4235 file prefix not from the grammar file name. This affects the location
4236 of files like location.hh generated by the C++ skeleton. The includes
4237 in the other output files require this fix.
4238 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4239 for expected output files.
4240 (Output files): Add a test for the above.
4241
4242 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4243
4244 * gnulib: Update submodule to HEAD.
4245
4246 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4247
4248 Update copyright year.
4249 * src/files.c: Here.
4250
4251 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4252
4253 Don't overwrite the input file.
4254 * src/files.c (output_file_name_check): Fatal error if using input file
4255 for output.
4256 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4257 argument.
4258 (Conflicting output files): Add test.
4259
4260 2008-10-28 Akim Demaille <demaille@gostai.com>
4261
4262 Space changes.
4263 * data/lalr1.cc: Formatting changes.
4264
4265 2008-10-28 Akim Demaille <demaille@gostai.com>
4266
4267 Don't define debugging functions when !YYDEBUG.
4268 * data/lalr1.cc (debug_stream, set_debug_stream)
4269 (debug_level_type, debug_level, set_debug_level): Don't
4270 declare them when YYDEBUG is not defined.
4271 The implementation are already YYDEBUG-aware.
4272
4273 2008-10-28 Akim Demaille <demaille@gostai.com>
4274
4275 Prefer "continue" for empty loop bodies.
4276 * etc/bench.pl.in: Use "continue" instead of {}.
4277
4278 2008-10-28 Akim Demaille <demaille@gostai.com>
4279
4280 Space and comments changes.
4281 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4282 * data/c.m4, data/lalr1.cc: Space changes.
4283
4284 2008-10-28 Akim Demaille <demaille@gostai.com>
4285
4286 Make gnulib a submodule.
4287 * gnulib: New.
4288 * .gitmodules (gnulib): New.
4289
4290 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4291
4292 Fix yyerror_range for user-defined location type in C++. Reported by
4293 Georg Sauthoff at
4294 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4295 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4296 * THANKS (Georg Sauthoff): Add.
4297
4298 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4299
4300 Update several administrative files mainly to facilitate releasing.
4301 * HACKING (Administrivia): Make the git-merge-changelog notes more
4302 helpful.
4303 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4304 (Release Procedure): Update for git and add numerous details that were
4305 previously missing.
4306 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4307 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4308 that announcements don't claim we bootstrapped with whatever bison
4309 happened to be in PATH. Add flex as a bootstrap tool.
4310 * Makefile.maint: Remove, previously replaced by maint.mk.
4311 * Makefile.cfg: Remove, and migrate settings to...
4312 * cfg.mk: ... here for the sake of `make announcement'.
4313 * bootstrap.conf (gnulib_modules): Add announce-gen.
4314 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4315 Berry.
4316
4317 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4318
4319 Small but important bugfixes for the Java skeleton.
4320 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4321 (yy_symbol_print): Call toString on yyvaluep.
4322
4323 2008-08-29 Akim Demaille <demaille@gostai.com>
4324
4325 Clarify UPDATED use.
4326 * doc/bison.texinfo: It refers to the last edition of this file,
4327 not to the release date of Bison.
4328 Reported by Joel E. Denny.
4329
4330 2008-08-29 Akim Demaille <demaille@gostai.com>
4331
4332 * README: Update FAQ pointer.
4333 Reported by Joel E. Denny.
4334
4335 2008-08-27 Eric Blake <ebb9@byu.net>
4336
4337 Resync m4sugar from autoconf.
4338 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4339 (m4_init): Adjust to latest m4.git changes.
4340 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4341 effects.
4342 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4343 (_m4_list_cmp): Reduce side effects.
4344
4345 2008-08-27 Akim Demaille <demaille@gostai.com>
4346
4347 Check yyerrok in calc.at.
4348 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4349 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4350 expected.
4351
4352 2008-08-27 Akim Demaille <demaille@gostai.com>
4353
4354 Support yyerrok in lalr1.cc.
4355 YYBACKUP is still to import back into lalr1.cc.
4356 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4357
4358 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4359
4360 For maintainer-check*, don't recompile for a $(VERSION) update.
4361 * cfg.mk: New file.
4362 (_is-dist-target): Override the one in GNUmakefile.
4363 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4364
4365 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4366
4367 Update for recent change to gnulib.
4368 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4369 string.h now.
4370
4371 2008-08-15 Eric Blake <ebb9@byu.net>
4372
4373 Remaining m4sugar merge from autoconf.
4374 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4375 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4376 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4377 * src/output.c (output_skeleton): Tell m4 how to find it.
4378
4379 Partial m4sugar merge from autoconf: m4_map.
4380 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4381 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4382 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4383 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
4384 for empty list.
4385 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
4386 Likewise.
4387 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
4388 declares it.
4389
4390 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
4391
4392 Keep .version and PACKAGE_VERSION in sync.
4393 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
4394 dependency, and add comments justifying this in more detail. Discussed
4395 starting at
4396 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
4397
4398 2008-08-06 Eric Blake <ebb9@byu.net>
4399
4400 Partial m4sugar merge from autoconf: m4_shiftn.
4401 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
4402 (m4_shift2, m4_shift3): New macros.
4403 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
4404 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
4405 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
4406 * data/java.m4 (b4_remove_comma): Likewise.
4407
4408 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
4409 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
4410 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
4411 (m4_init): Consolidate wrapped text into single m4_wrap.
4412 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
4413 in wrapped text.
4414
4415 2008-08-05 Eric Blake <ebb9@byu.net>
4416
4417 Partial m4sugar merge from autoconf: builtins, version.m4.
4418 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
4419 (m4_prepend): Remove, as it is unused and inherently quadratic,
4420 whereas m4_append is linear in newer m4.
4421 (m4_mkstemp): New builtin.
4422 (m4_symbols): Make rename conditional.
4423 (m4_version_prereq): Ensure fatal error if used in bison, which
4424 intentionally lacks version.m4.
4425
4426 Fix comments in m4sugar.
4427 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
4428
4429 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4430
4431 Update for recent .gitignore fix in Gnulib.
4432 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
4433 anchored .gitignore entries.
4434
4435 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4436
4437 Set gnu or gnits strictness.
4438 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
4439 development and gnits strictness for releases. Based on Eric Blake's
4440 suggestion at
4441 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
4442
4443 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4444
4445 * NEWS: Clarify documentation of %language.
4446
4447 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4448
4449 Support usage of git-merge-changelog.
4450 * .gitattributes: New.
4451 * HACKING: Document usage of git-merge-changelog.
4452 * bootstrap: Install git-merge-changelog entries in .git/config
4453 if appropriate.
4454
4455 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4456
4457 Remove remaining dependence on CVS Id keyword.
4458 * ChangeLog: For the sake of people still using CVS, don't use dollars
4459 when mentioning Id.
4460 * data/xslt/bison.xsl: Remove Id from header comments, where it was
4461 unusual anyway.
4462 * data/xslt/xml2dot.xsl: Likewise.
4463 * data/xslt/xml2text.xsl: Likewise.
4464 * data/xslt/xml2xhtml.xsl: Likewise.
4465 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
4466 * doc/Makefile.am (neutralize): Remove, no longer needed.
4467 (.x.1): Don't use neutralize.
4468 (edit): Don't substitute for ID.
4469 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
4470
4471 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4472
4473 Fix dependence on computed configure variables.
4474 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
4475 $(top_srcdir)/configure.ac so that changes to computed variables, such
4476 as PACKAGE_VERSION, are seen.
4477 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
4478
4479 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
4480
4481 Update copyright dates for recent changes.
4482 * Makefile.am: Here.
4483 * src/Makefile.am: Here.
4484 * src/reduce.c: Here.
4485 * tests/reduce.at: Here.
4486
4487 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
4488
4489 Use git-version-gen for version names between releases.
4490 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
4491 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
4492 * .prev-version: New.
4493 * .version.in: Remove.
4494 * ChangeLog: Remove the Id previously used for capturing the CVS
4495 revision.
4496 * GNUmakefile: Remove, now copied from Gnulib.
4497 * Makefile.am: Add code suggested by comments in
4498 build-aux/git-version-gen.
4499 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
4500 .prev-version, and .version.
4501 * NEWS (2.3b+): Rename to...
4502 (?.?): ... this because we're dropping the "+" version naming scheme,
4503 but, in general, we still can't be sure of our next release name.
4504 * bootstrap: Add a quick hack to remove from .gitignore the
4505 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
4506 entry. This should really be fixed in gnulib instead.
4507 * bootstrap.conf (gnulib_modules): Add gnumakefile.
4508 * configure.ac (AC_INIT): Set version name by invoking
4509 build-aux/git-version-gen.
4510 (AC_CONFIG_FILES): Remove .version, now generated by
4511 build-aux/git-version-gen.
4512 * maint.mk: New, copied from coreutils.
4513 * doc/.cvsignore (bison.1): Add.
4514 * doc/.gitignore (/bison.1): Add.
4515 * doc/bison.1: Remove, generated.
4516 * src/.cvsignore (revision.c): Remove.
4517 * src/.gitignore (/revision.c): Remove.
4518 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
4519 (BUILT_SOURCES): Remove revision.c.
4520 (revision.c): Remove.
4521 * src/getargs.c (version): Don't print revision after the VERSION.
4522 * src/revision.h: Remove.
4523
4524 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4525
4526 Fix untranslatable composition of sentences. Reported by Goran
4527 Uddeborg at
4528 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
4529 * THANKS (Goran Uddeborg): Add.
4530 * src/reduce.c (reduce_print): Report the number of nonterminals and
4531 rules useless in the grammar in separate sentences.
4532 * tests/reduce.at (Useless Rules): Update output.
4533 (Reduced Automaton): Likewise.
4534 (Underivable Rules): Likewise.
4535 (Empty Language): Likewise.
4536
4537 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4538
4539 Fix some .gitignore and .cvsignore problems.
4540 * bootstrap (insert_sorted_if_absent): Replace all uses with...
4541 (insert_vc_ignore): ... this new function, which prepends `/' to all
4542 .gitignore entries before passing them to insert_sorted_if_absent.
4543 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
4544 .cvsignore files are maintained even though Bison developers run
4545 bootstrap while using Git.
4546 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
4547 unneeded by Bison.
4548 (gnulib): Add.
4549 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
4550 unneeded. Reported by Eric Blake.
4551 * lib/.gitignore (/*~): Add.
4552 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
4553 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
4554 Blake.
4555 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
4556
4557 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4558
4559 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
4560 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
4561 * bootstrap.conf (gnulib_modules): Add unsetenv.
4562 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
4563 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
4564 (/setenv.m4): Add.
4565 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
4566 the first argument because it may become position-dependent, and unset
4567 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
4568 Add comments explaining these issues in more detail.
4569
4570 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
4571
4572 Add .gitignore everywhere based on .cvsignore.
4573 * .gitignore: New.
4574 * build-aux/.gitignore: New.
4575 * data/.gitignore: New.
4576 * doc/.gitignore: New.
4577 * etc/.gitignore: New.
4578 * examples/.gitignore: New.
4579 * examples/calc++/.gitignore: New.
4580 * lib/.gitignore: New.
4581 * m4/.gitignore: New.
4582 * po/.gitignore: New.
4583 * runtime-po/.gitignore: New.
4584 * src/.gitignore: New.
4585 * tests/.gitignore: New.
4586
4587 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4588
4589 * NEWS (2.3b+): New section, empty for now.
4590 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
4591
4592 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4593
4594 * NEWS (2.3b): Update release date since there has been a delay in
4595 getting the announcements and tarballs out.
4596
4597 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4598
4599 * NEWS: Version 2.3b.
4600 * configure.ac (AC_INIT): Likewise.
4601 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
4602
4603 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4604
4605 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
4606 been doing it for years.
4607 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
4608 (Release Procedure): Add FIXME about make alpha being unmaintained.
4609
4610 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
4611
4612 * data/yacc.c: Reformat m4 a little for readability.
4613 * src/lalr.c (build_relations): Correct comment.
4614
4615 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4616
4617 DJGPP specific issue.
4618 * djgpp/config.sed: Fixes required to run configure scripts generated
4619 by autoconf 2.62.
4620
4621 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4622
4623 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
4624 coordinator@translationproject.org.
4625
4626 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4627
4628 * THANKS: Add Eric Blake.
4629
4630 2008-04-23 Eric Blake <ebb9@byu.net>
4631
4632 Revert prior patch, by working around autoconf regression.
4633 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
4634 ("Output file name: ("): Uncomment test.
4635 ("Output file name: )"): Likewise.
4636 Based on an idea from Noah Misch.
4637
4638 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4639
4640 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
4641 2.61. Reported by Juan Manuel Guerrero at
4642 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
4643 * tests/output.at ("Output file name: ("): Comment out test case for
4644 now.
4645 ("Output file name: )"): Likewise.
4646
4647 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4648
4649 * GNUmakefile: Update git-version-gen invocation so make dist
4650 succeeds.
4651
4652 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4653
4654 Update to the current gnulib CVS repository, and fix trigraph handling
4655 in Bison.
4656 * bootstrap: Update gnulib CVS repository URL.
4657 (symlink_to_dir): Encapsulate the code that guarantees the destination
4658 directory exists into...
4659 (check_dst_dir): ... this new function, and...
4660 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
4661 fail when copying files into lib/uniwidth/.
4662 * src/output.c (prepare_symbols): When writing yytname muscles, where
4663 symbol names will be encoded in C-string literals, tell quotearg to
4664 escape trigraphs. This used to be the default in gnulib.
4665 * tests/regression.at (Token definitions): Because of the change in
4666 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
4667 escapes trigraphs in symbol names. Thus, yytname no longer has
4668 trigraphs unnecessarily doubly escaped. Update test case output.
4669 Extend test case to be sure Bison's own error messages will no longer
4670 have trigraphs in symbol names unnecessarily escaped once.
4671
4672 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
4673
4674 Fix make dist infinite loop reported by Juan Manuel Guerrero at
4675 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
4676 * .cvsignore: Add .version.
4677 * .version.in: New.
4678 * bootstrap.conf (gnulib_modules): Add git-version-gen.
4679 * configure.ac (AC_CONFIG_FILES): Add .version.
4680 * build-aux/.cvsignore: Add git-version-gen.
4681
4682 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4683
4684 * NEWS (2.3a+): Mention that -g now takes an argument.
4685 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
4686 consistency. Update the -g and -x entries now that they take
4687 arguments. Use brackets to indicate optional arguments.
4688 * src/getargs.c (usage): Explain the relationship between arguments of
4689 long and short options more completely. Document --defines and -d
4690 separately since the former takes an argument but, for POSIX Yacc, the
4691 latter does not.
4692 (short_options): Let -W take an optional argument like --warnings.
4693 (getargs): Sort cases.
4694
4695 2008-02-28 Akim Demaille <demaille@gostai.com>
4696
4697 * doc/bison.texinfo: Fix a few typos.
4698
4699 2008-02-28 Akim Demaille <akim@epita.fr>
4700
4701 * doc/bison.texinfo (Bison Options): Document -W.
4702 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
4703
4704 2008-02-28 Akim Demaille <akim@epita.fr>
4705
4706 * src/getargs.c (short_options): Split and sort for readability.
4707 -g and -x take optional arguments, just like their long options.
4708 * build-aux/cross-options.pl: Use /x to make the regexp easier to
4709 understand.
4710 Fix the handling of $opt which resulted in all the argument to be
4711 considered as optional.
4712
4713 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
4714
4715 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
4716 say its interface is experimental.
4717 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4718 Java.
4719 (Bison Options): In the -L and --language entry, mention Java.
4720 (Java Bison Interface): Say the interface is experimental.
4721 * src/getargs.c (usage): Mention -L and --language.
4722
4723 * NEWS (2.3a+): Say the push parsing interface is experimental.
4724 * doc/bison.texinfo (Push Decl): Likewise.
4725 (Decl Summary): Likewise in the "%define api.push_pull" entry.
4726 (Push Parser Function): Likewise.
4727 (Pull Parser Function): Likewise.
4728 (Parser Create Function): Likewise.
4729 (Parser Delete Function): Likewise.
4730 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
4731 yypull_parse, and yypush_parse entries.
4732
4733 * NEWS (2.3a+): Mention XML support, and say the schema is
4734 experimental.
4735 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
4736 * src/getargs.c (usage): Say the XML schema is experimental.
4737
4738 * NEWS (2.3a+): Say option instead of flag.
4739
4740 2008-02-21 Wojciech Polak <polak@gnu.org>
4741
4742 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
4743 text.
4744
4745 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
4746
4747 Fix impure push parser compile error reported by Bob Rossi at
4748 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
4749 * data/yacc.c: Clean up whitespace in the output a little.
4750 (yypstate_allocated): Define for impure push parsers regardless of
4751 whether the pull interface is also requested.
4752 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
4753 check impure push parsers without the pull interface.
4754
4755 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
4756 yyerror takes arguments specified by %parse-param while yypstate_new
4757 does not.
4758 * doc/bison.texinfo (Parser Create Function): Document that
4759 yypstate_new returns 0 for multiple impure parser instances.
4760 * tests/push.at (Push Parsing: Multiple impure instances): Update
4761 expected stderr output.
4762
4763 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4764
4765 * runtime-po/POTFILES.in (push.c): Remove.
4766
4767 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4768
4769 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
4770 * data/push.c: Rename to...
4771 * data/yacc.c: ... this, overwriting it.
4772 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
4773 `%push-pull-parser' -> `%define api.push_pull "both"'.
4774 Remove old yacc.c tests, and update push.c tests to yacc.c.
4775
4776 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4777
4778 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4779 `"%code top" blocks' instead of `%code "top" blocks'.
4780 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
4781 Clean up whitespace in the output a little.
4782
4783 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4784
4785 Fix documentation problems reported by Tim Josling at
4786 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
4787 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
4788 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
4789 integers. Explain the effect of literal string aliases on error
4790 messages. Copy token 0 documentation from the C++ skeleton
4791 documentation.
4792
4793 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4794
4795 Accept a token number in a %left, %right, or %nonassoc for POSIX
4796 conformance. Reported by Tim Josling at
4797 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
4798 * NEWS (2.3a+): Mention.
4799 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
4800 and code numbers are treated by precedence declarations.
4801 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
4802 of symbols.1.
4803 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
4804 of symbol.
4805 (symbol.prec): New, just like symbol but allows INT.
4806 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
4807 longer holds.
4808 * tests/regression.at (Token number in precedence declaration): New
4809 test case.
4810
4811 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4812
4813 DJGPP specific issues.
4814 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
4815 be changed. Copyright timestamp adjusted.
4816 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
4817 be changed. Copyright timestamp adjusted.
4818 * djgpp/config.site: Copyright timestamp adjusted.
4819 * djgpp/config_h.sed: Copyright timestamp adjusted.
4820 * djgpp/djunpack.bat: Copyright timestamp adjusted.
4821 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
4822 filename translation list.
4823 * djgpp/subpipe.c (init_subpipe): Check the environment variables
4824 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
4825 files shall be created. Before trying to use the temp dir where the
4826 environment variable points to check that the dir really exists. If
4827 not default to the cwd as temp dir. Copyright timestamp adjusted.
4828 * djgpp/subpipe.h: Copyright timestamp adjusted.
4829 * djgpp/testsuite.sed: Copyright timestamp adjusted.
4830
4831 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4832
4833 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
4834
4835 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
4836
4837 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
4838 Problem reported by Claudio Saavedra in
4839 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
4840
4841 2008-01-05 Wojciech Polak <polak@gnu.org>
4842
4843 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
4844 document's title with the input grammar file name.
4845
4846 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
4847
4848 Automate regression testing of the XML/XSLT implementation. Discussed
4849 starting at
4850 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4851 * configure.ac (XSLTPROC): New substitution.
4852 * Makefile.am (maintainer-xml-check): New phony target invoking...
4853 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4854 invoking make maintainer-check with BISON_TEST_XML=1.
4855 * tests/atlocal.in (XSLTPROC): New.
4856 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4857 not to report reachable memory when Bison is expected to have a
4858 non-zero exit status and (2) to compare XML/XSLT output with --graph
4859 and --report=all output for every working grammar when
4860 BISON_TEST_XML=1.
4861 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4862 (AT_BISON_CHECK_XML): New.
4863 (AT_QUELL_VALGRIND): New.
4864 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4865 (AT_CHECK): ... don't redefine this since this was the old way to
4866 quell Valgrind.
4867 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4868 AT_BISON_CHECK invocations.
4869 * tests/c++.at: Likewise.
4870 * tests/calc.at: Likewise.
4871 * tests/conflicts.at: Likewise.
4872 * tests/cxx-type.at: Likewise.
4873 * tests/existing.at: Likewise.
4874 * tests/glr-regression.at: Likewise.
4875 * tests/headers.at: Likewise.
4876 * tests/input.at: Likewise.
4877 * tests/java.at: Likewise.
4878 * tests/output.at: Likewise.
4879 * tests/push.at: Likewise.
4880 * tests/reduce.at: Likewise.
4881 * tests/regression.at: Likewise.
4882 * tests/sets.at: Likewise.
4883 * tests/skeletons.at: Likewise.
4884 * tests/synclines.at: Likewise.
4885 * tests/torture.at: Likewise.
4886 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4887 tends to hang xsltproc.
4888 (Big horizontal): Likewise.
4889
4890 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4891
4892 In XML output, remove redundant class attribute on symbol element.
4893 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4894 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4895 look up a symbol to determine whether it's a nonterminal or terminal.
4896 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4897 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4898
4899 Add prec/assoc information to XML output.
4900 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4901 %prec, add a percent_prec attribute.
4902 * src/print-xml.c (print_grammar): For each terminal that has a
4903 precedence or associativity, add a prec or assoc attribute.
4904 (xml_indent): New.
4905 (xml_puts): Use xml_indent.
4906 (xml_printf): Use xml_indent.
4907 * src/print-xml.h (xml_indent): Prototype.
4908
4909 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4910 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4911
4912 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4913
4914 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4915 (bison:ruleByNumber): ... this for clarity.
4916 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4917 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4918 (xsl:template match="reduction"): Update.
4919 (xsl:template match="item"): Update.
4920 (xsl:template match="reduction"): Update.
4921
4922 In the XML output, don't print the list of rules where symbols appear.
4923 Compute it in XSLT instead. Discussed at
4924 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4925 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4926 (bison:ruleByRhs): New.
4927 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4928 bison:ruleByRhs.
4929 (xsl:template match="terminal/rule"): Remove.
4930 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4931 bison:ruleByRhs.
4932 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4933 Remove.
4934 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4935 bison:ruleByRhs and mode="number-link" for rule template.
4936 (xsl:template match="terminal/rule"): Remove.
4937 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4938 bison:ruleByRhs and mode="number-link" for rule template.
4939 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4940 Rewrite as...
4941 (xsl:template match="rule" mode="number-link"): ... this.
4942 * src/print-xml.c (print_grammar): Don't print the list of rules.
4943
4944 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4945
4946 Don't let --report affect XML output; always print all information.
4947 Discussed at
4948 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4949 * src/conflicts.c (log_resolution): Implement.
4950 * src/print-xml.c (print_core): Implement.
4951 (print_state): Implement.
4952 (print_xml): Implement.
4953
4954 * NEWS (2.3a+): Fix quotes.
4955 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4956 don't let %verbose clear the list specified by --report.
4957
4958 2007-11-26 Akim Demaille <akim@epita.fr>
4959
4960 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4961
4962 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4963
4964 In the XML output, list useless and unused symbols and rules with the
4965 useful ones and add a "usefulness" attribute. Discussed starting at
4966 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4967 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4968 (grammar_rules_print_xml): Print all rules instead of just those
4969 useful in the grammar, and add a "usefulness" attribute.
4970 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4971 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4972 (print_grammar): Print all nonterminals instead of just useful ones,
4973 and add a "usefulness" attribute to nonterminals and terminals.
4974 (print_xml): Don't print a separate "reductions" or
4975 "rules-useless-in-parser" element.
4976 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4977 (reduce_xml): Remove.
4978 (reduce_token_unused_in_grammar): New.
4979 (reduce_nonterminal_useless_in_grammar): New.
4980 * src/reduce.h (reduce_xml): Remove prototype.
4981 (reduce_token_unused_in_grammar): Add prototype.
4982 (reduce_nonterminal_useless_in_grammar): Add prototype.
4983 * data/xslt/xml2text.xsl: Update for XML changes.
4984 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4985 * tests/reduce.at (Useless Terminals): Update output.
4986 (Useless Rules): Update output.
4987 (Reduced Automaton): Update output.
4988
4989 Say "Terminals unused in grammar" instead of "Unused terminals".
4990 * NEWS (2.3a+): Update.
4991 * doc/bison.texinfo (Understanding): Update example output.
4992 * src/reduce.c (reduce_output): Implement.
4993 * data/xslt/xml2text.xsl: Implement.
4994 * data/xslt/xml2xhtml.xsl: Implement.
4995
4996 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4997
4998 Accept --report-file=FILE to override the default `.output' filename.
4999 * NEWS (2.3a+): Mention.
5000 * doc/bison.texinfo (Bison Options): Add an entry.
5001 * src/files.c (compute_output_file_names): Don't override
5002 spec_verbose_file if already set.
5003 * src/getargs.c (usage): Document --report-file.
5004 (REPORT_FILE_OPTION): New anonymous enum member.
5005 (long_options): Add entry for it.
5006 (getargs): Add case for it setting spec_verbose_file.
5007
5008 * build-aux/cross-options.pl: Don't record a short option just because
5009 there's an arg.
5010 * doc/.cvsignore: Add yacc.1.
5011
5012 2007-11-14 Akim Demaille <akim@epita.fr>
5013
5014 * doc/yacc.1.in: New.
5015 * configure.ac, doc/Makefile.am: Adjust.
5016 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5017 config.h symbol.
5018 Use AC_SUBST for assignments too.
5019 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5020
5021 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5022
5023 * src/gram.c: Remove comments that duplicate comments in gram.h.
5024
5025 When reporting useless rules and nonterminals, say "useless in grammar"
5026 instead of "useless", and say "useless in parser" instead of "never
5027 reduced". Discussed starting at
5028 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5029 * NEWS (2.3a+): Mention this change.
5030 * data/xslt/xml2text.xsl: Update output text and expected input XML
5031 element names to match changes below.
5032 * data/xslt/xml2xhtml.xsl: Likewise.
5033 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5034 Contents: "Rules useless in parser due to conflicts".
5035 * doc/bison.texinfo (Decl Summary): Reword a little.
5036 (Understanding): Update example output for changes below.
5037 * src/gram.c: (rule_useful_p): Rename to...
5038 (rule_useful_in_grammar_p): ... this.
5039 (rule_useless_p): Rename to...
5040 (rule_useless_in_grammar_p): ... this.
5041 (rule_never_reduced_p): Rename to...
5042 (rule_useless_in_parser_p): ... this.
5043 (grammar_rules_print): Update for renames.
5044 (grammar_rules_print_xml): Update for renames.
5045 (grammar_rules_never_reduced_report): Rename to...
5046 (grammar_rules_useless_report): ... this since it is used for either
5047 kind of useless rule.
5048 * src/gram.h: Reword comments and update function names in prototypes.
5049 * src/main.c (main): Say "rule useless in parser due to conflicts".
5050 * src/print-xml.c (print_rules_never_reduced): Rename to...
5051 (print_rules_useless_in_parser): ... this, and rename output XML
5052 element "rules-never-reduced" to "rules-useless-in-parser".
5053 (print_xml): Update for rename.
5054 * src/print.c (print_results): Say "Rules useless in parser due to
5055 conflicts".
5056 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5057 (nonterminals_reduce): Say "nonterminal useless in grammar".
5058 (reduce_output): Say "Nonterminals useless in grammar".
5059 Say "Rules useless in grammar".
5060 (reduce_xml): Rename output XML element "useless" to
5061 "useless-in-grammar".
5062 (reduce_print): Don't report the count of grammatically useless rules
5063 as "rules never reduced" just because %yacc is specified.
5064 In the correct report of this count, say nonterminal(s) and rule(s)
5065 "useless in grammar".
5066 * tests/conflicts.at (S/R in initial): Update expected output.
5067 (Defaulted Conflicted Reduction): Likewise.
5068 (Unreachable States After Conflict Resolution): Likewise.
5069 * tests/existing.at (GNU pic Grammar): Likewise.
5070 * tests/reduce.at (Useless Nonterminals): Likewise.
5071 (Useless Rules): Likewise.
5072 (Reduced Automaton): Likewise.
5073 (Underivable Rules): Likewise.
5074 (Empty Language): Likewise.
5075
5076 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5077
5078 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5079 here document and before the EOF so that BSD's implementation of Bourne
5080 shell doesn't parse the delimiter as part of the here document.
5081 * doc/.cvsignore: Add cross-options.texi.
5082 * src/getargs.c (usage): Add a blank line after the warning categories.
5083
5084 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
5085
5086 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5087
5088 2007-11-05 Akim Demaille <akim@epita.fr>
5089
5090 Remove Id: from bison.1.
5091 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5092 (perl -0777 -pi -e 's/\.PP\nId): New.
5093 (.x.1): Use it to ignore the version control revision.
5094
5095 2007-11-05 Akim Demaille <demaille@gostai.com>
5096
5097 * build-aux/Makefile.am: Ship cross-options.pl.
5098 * doc/Makefile.am: Always refer to cross-options.texi with
5099 $(srcdir).
5100 (MAINTAINERCLEANFILES): Add it.
5101
5102 2007-11-04 Akim Demaille <demaille@gostai.com>
5103
5104 Generate the long/short option cross-table.
5105 * build-aux/cross-options.pl: New.
5106 * doc/Makefile.am (cross-options.texi): New.
5107 * doc/bison.texinfo: Use it.
5108
5109 2007-11-04 Akim Demaille <demaille@gostai.com>
5110
5111 Generate bison.1 using help2man.
5112 * doc/common.x, doc/bison.x: New.
5113 * doc/Makefile.am (bison.1, .x.1): New.
5114 The code is taken from autoconf-2.61/man/Makefile.am.
5115 * configure.ac: Look for help2man.
5116
5117 2007-11-04 Akim Demaille <demaille@gostai.com>
5118
5119 Complete --help.
5120 * src/getargs.c (usage): Document -W, make it clear that -d,
5121 -g and -x have optional arguments.
5122
5123 2007-11-04 Akim Demaille <demaille@gostai.com>
5124
5125 Find sha1sum when named gsha1sum.
5126 * bootstrap (find_tool): New.
5127 ($SHA1SUM): New.
5128
5129 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5130
5131 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5132 at
5133 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5134 * NEWS (2.3a+): Mention.
5135 * data/bison.m4 (b4_pure_if): Don't define it here.
5136 * data/c.m4 (b4_identification): Depend on individual skeletons to
5137 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5138 values of the %define variables api.pure or api.push_pull. Define
5139 YYPURE, YYPUSH, and YYPULL accordingly.
5140 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5141 glr.cc has already defined b4_pure_flag.
5142 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5143 Remove YYPUSH and YYPULL since they're back in b4_identification again.
5144 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
5145 * doc/bison.texinfo (Pure Decl): Update.
5146 (Push Decl): Update.
5147 (Decl Summary): Add api.pure to %define entry.
5148 In %pure-parser entry, say it's deprecated and reference %define.
5149 (Pure Calling): Update.
5150 (Error Reporting): Update.
5151 (C++ Scanner Interface): Update.
5152 (How Can I Reset the Parser): Update.
5153 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5154 reference %define.
5155 * src/getargs.c (pure_parser): Remove global variable.
5156 * src/getargs.h (pure_parser): Remove extern.
5157 * src/output.c (prepare): Don't define pure_flag muscle.
5158 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5159 wrapper around `%define api.pure'.
5160 * tests/calc.at (Simple LALR Calculator): Update.
5161 (Simple GLR Calculator): Update.
5162 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5163 Update.
5164 (GLR: Resolve ambiguity, pure, locations): Update.
5165 (GLR: Merge conflicting parses, pure, no locations): Update.
5166 (GLR: Merge conflicting parses, pure, locations): Update.
5167 * tests/glr-regression.at (Uninitialized location when reporting
5168 ambiguity): Update
5169 * tests/input.at (Unused %define api.pure): New test case.
5170 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5171 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5172 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5173
5174 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5175
5176 %define push_pull -> %define api.push_pull. Discussed starting at
5177 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5178 * data/push.c: Expect the new name.
5179 * data/yacc.c: Likewise.
5180 * doc/bison.texinfo (Push Decl): Update.
5181 (Decl Summary): Update %define entry.
5182 (Push Parser Function): Update.
5183 (Pull Parser Function): Update.
5184 (Parser Create Function): Update.
5185 (Parser Delete Function): Update.
5186 * tests/calc.at (Simple LALR Calculator): Update.
5187 * tests/input.at (%define enum variables): Update.
5188 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5189 (Push Parsing: Multiple impure instances): Update.
5190 (Push Parsing: Unsupported Skeletons): Update.
5191 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5192 (Exploding the Stack Size with Malloc): Update.
5193
5194 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5195 other entries some.
5196
5197 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5198
5199 For the XML output's terminal element, rename @number to @token-number,
5200 and add @symbol-number. In the nonterminal element, rename @number to
5201 @symbol-number. Discussed starting at
5202 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5203 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5204 renames.
5205 (xsl:template match="nonterminal"): Likewise.
5206 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5207 (xsl:template match="nonterminal"): Likewise.
5208 * src/print-xml.c (print_grammar): Implement.
5209
5210 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5211
5212 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5213 2007-10-11 change, the child elements here are items not rules.
5214 (xsl:template match="item"): New.
5215 (xsl:template match="rule"): Update for new reduced itemset.
5216 (xsl:template match="point"): Remove.
5217 (xsl:template match="empty"): For consistency with --graph, don't
5218 output "/* empty */".
5219 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5220 line-wrap, don't pass a negative value as first-line-length since this
5221 won't work with the following changes.
5222 (xsl:template name="line-wrap"): Simplify slightly.
5223 (xsl:template name="ws-search"): Eliminate recursion.
5224 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5225 set next to an item whose dot is not at the end of the RHS even if it
5226 happens to be associated with the same rule.
5227
5228 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5229
5230 Add %define lr.keep_unreachable_states.
5231 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5232 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5233 * src/main.c (main): Implement it.
5234 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5235 Extend to test it, and fix a typo.
5236
5237 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5238
5239 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
5240 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5241 the example .output text.
5242 * tests/regression.at (Extra lookahead sets in report): Improve wording
5243 of comments.
5244
5245 2007-10-17 Wojciech Polak <polak@gnu.org>
5246
5247 * src/print-xml.c (print_grammar): Renamed
5248 <terminal> and <nonterminal> attributes:
5249 "type" to "number" and "symbol" to "name".
5250 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5251 Use new attribute names.
5252 (xsl:template match="nonterminal"): Likewise.
5253 * data/xslt/xml2xhtml.xsl: Likewise.
5254
5255 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5256
5257 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5258 (Option Cross Key): Likewise.
5259
5260 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5261 next to an item whose dot is not at the end of the RHS even if it
5262 happens to be associated with the same rule.
5263 * src/print.c (print_core): Likewise.
5264 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5265 (Resolved SR Conflicts): Update output.
5266 * tests/regression.at (Extra lookahead sets in report): New test case.
5267
5268 2007-10-11 Wojciech Polak <polak@gnu.org>
5269
5270 * src/print-xml.c (print_core): Remove item set
5271 redundancy.
5272 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5273 Improve processing time. Suggested by Joel E. Denny.
5274 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5275 Write xsl:param "required" attribute as comment.
5276 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5277 (xsl:template match="rule"): Support new reduced itemset.
5278 (xsl:template match="point"): Remove.
5279 * data/xslt/xml2xhtml.xsl: Likewise.
5280
5281 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5282
5283 * src/getargs.c (version): Update copyright year.
5284
5285 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5286
5287 Make xml2dot.xsl and --graph produce the same output.
5288 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5289 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5290 escaped later.
5291 (xsl:template name="output-node"): Use the new escape template instead
5292 of the string-replace template directly.
5293 (xsl:template name="output-edge"): Likewise.
5294 (xsl:template name="escape"): New, escapes backslashes and newlines in
5295 addition to quotation marks.
5296 * src/graphviz.c (start_graph, output_node, output_edge): Add
5297 whitespace to output for legibility.
5298
5299 Make xml2text.xsl and --report produce the same output, and remove the
5300 XML "conflicts" element since a conflict summary is easily extracted
5301 from the automaton.
5302 * data/xslt/bison.xsl: New.
5303 (xsl:template match="state" mode="bison:count-conflicts): New.
5304 * data/xslt/xml2text.xsl: Import bison.xsl.
5305 (xsl:template match="bison-xml-report"): Instead of styling the
5306 "conflicts" element, style the "automaton" element with mode
5307 "conflicts". Unlike the former, the latter lists S/R and R/R
5308 conflicts for a state on the same line.
5309 (xsl:template match="conflicts"): Remove.
5310 (xsl:template match="conflict"): Remove.
5311 (xsl:template match="terminal"): Line-wrap the list of rules in which
5312 the terminal is used.
5313 (xsl:template match="nonterminal"): Likewise for nonterminals.
5314 (xsl:template match="automaton" mode="conflicts"): New.
5315 (xsl:template match="state" mode="conflicts"): New.
5316 (xsl:template name="line-wrap"): New.
5317 (xsl:template name="ws-search"): New.
5318 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5319 (xsl:template match="bison-xml-report"): Instead of styling the
5320 "conflicts" element, style the "automaton" element with mode
5321 "conflicts."
5322 (xsl:template match="conflicts"): Remove.
5323 (xsl:template match="conflict"): Remove.
5324 (xsl:template match="automaton" mode="conflicts"): New.
5325 (xsl:template match="state" mode="conflicts): New.
5326 * src/conflicts.c (conflicts_output_xml): Remove.
5327 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5328 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5329 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5330 the corresponding XSLT is easier. Also, never wrap between a word and
5331 the comma that follows it.
5332
5333 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5334
5335 Improve C++ namespace support. Discussed starting at
5336 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5337 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5338 b4_namespace_close): New macros that interpret the %define variable
5339 "namespace" so its value can contain "::" to indicate nested
5340 namespaces.
5341 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5342 the above macros.
5343 * data/lalr1.cc (b4_namespace): Likewise.
5344 * data/location.cc (b4_namespace): Likewise.
5345 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5346 inside a new table in the general %define entry. Document `%define
5347 namespace' there as well. Point the %name-prefix entry to it since it
5348 explains it more completely in the case of C++.
5349 (C++ Bison Interface): Mention `%define namespace' instead of
5350 %name-prefix.
5351 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5352 entry suffices.
5353 * tests/c++.at (Relative namespace references): New test case.
5354 (Absolute namespace references): New test case.
5355 (Syntactically invalid namespace references): New test case.
5356 * tests/input.at (C++ namespace reference errors): New test case.
5357
5358 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5359
5360 Add syncline support and location accessor to internal %define
5361 interfaces.
5362 * data/bison.m4 (b4_percent_define_get_loc): New.
5363 (b4_percent_define_get_syncline): New.
5364 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5365 (b4_percent_define_default): Record defining location as line 1 rather
5366 than 0 for the sake of synchronizing #line's, and define
5367 b4_percent_define_syncline(VARIABLE).
5368 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5369 * src/muscle_tab.c (muscle_syncline_grow): New.
5370 (muscle_code_grow): Use muscle_syncline_grow.
5371 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5372 define b4_percent_define_syncline(VARIABLE).
5373 (muscle_percent_define_get_loc): New.
5374 (muscle_percent_define_get_syncline): New.
5375 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5376 remove some unused variables.
5377 (muscle_percent_define_default): Record defining location as line 1
5378 rather than 0 for the sake of synchronizing #line's, and define
5379 b4_percent_define_syncline(VARIABLE).
5380 (muscle_percent_define_check_values): Use
5381 muscle_percent_define_get_loc.
5382 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5383 (muscle_percent_define_get_syncline): Prototype.
5384 * tests/skeletons.at (%define Boolean variables: invalid skeleton
5385 defaults): Update output for location change.
5386 (Complaining during macro argument expansion): Extend to test
5387 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
5388
5389 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
5390
5391 Fix some error-reporting macro bugs.
5392 * data/bison.m4 (b4_cat): New.
5393 (b4_error, b4_error_at): Use b4_cat to send error directives directly
5394 to stdout so they don't become arguments to other macros. Update
5395 comments and add examples.
5396 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
5397 add examples.
5398 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
5399 after printing the error directive so that M4 doesn't report subsequent
5400 problems that are induced by this problem.
5401 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
5402 instead of just in them. Recognize @\n in both places. Both expand to
5403 the empty string. Needed by b4_cat.
5404 * tests/skeletons.at (Complaining during macro argument expansion):
5405 New test case.
5406 (Fatal errors make M4 exit immediately): New test case.
5407
5408 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
5409
5410 Implement --print-datadir.
5411 * src/getargs.c (usage): Mention.
5412 (PRINT_DATADIR_OPTION): New anonymous enum member.
5413 (long_options): Add entry for it.
5414 (getargs): Add case for it calling compute_pkgdatadir.
5415 * src/output.c (output_skeleton): Encapsulate data directory
5416 computation from here...
5417 (prepare): ... and from here...
5418 (compute_pkgdatadir): ... into this new function.
5419 * src/output.h (compute_pkgdatadir): Prototype.
5420
5421 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
5422
5423 * src/print-xml.c (escape_bufs): New static global variable
5424 replacing...
5425 (xml_escape_n): ... the static local variable buf here.
5426 (print_xml): Free memory for escape_bufs.
5427 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
5428
5429 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
5430
5431 Replace `%push-parser' and `%push-pull-parser' with
5432 `%define push_pull "push"' and `%define push_pull "both"'.
5433 `%define push_pull "pull"' is the default.
5434 * doc/bison.texinfo (Push Decl, Push Parser Function,
5435 Pull Parser Function, Parser Create Function, Parser Delete Function):
5436 Update declarations.
5437 (Decl Summary, Table of Symbols): Replace %push-parser and
5438 %push-pull-parser entries with a %define push_pull entry.
5439 * data/bison.m4 (b4_percent_define_check_values): New macro.
5440 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
5441 definitions...
5442 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
5443 definitions...
5444 * data/push.c: ... to here and compute them from the value of the
5445 %define variable push_pull.
5446 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
5447 parsing requests here...
5448 * data/yacc.c: ... hack this to switch to push.c any time
5449 b4_use_push_pull_flag or the %define variable push_pull is set. This
5450 will go away when we mv push.c yacc.c.
5451 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
5452 push parsing is not supported since unused %define variables are
5453 reported anyway.
5454 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
5455 * src/muscle_tab.h (muscle_percent_define_check_values): Update
5456 comments for consistency with b4_percent_define_check_values.
5457 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
5458 muscles.
5459 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
5460 Remove.
5461 (prologue_declaration): Remove %push-parser and %push-pull-parser
5462 rules.
5463 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
5464 * tests/calc.at: Update declarations.
5465 * tests/input.at (%define enum variables): New test case.
5466 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
5467 declaration.
5468 (Push Parsing: Multiple impure instances): Update declaration.
5469 (Push Parsing: Unsupported Skeletons): New test case.
5470 * tests/torture.at (Exploding the Stack Size with Alloca): Update
5471 declaration.
5472 (Exploding the Stack Size with Malloc): Update declaration.
5473
5474 2007-09-24 Wojciech Polak <polak@gnu.org>
5475
5476 Add XSLT transformations.
5477
5478 * data/xslt/xml2dot.xsl: Transform XML into DOT.
5479 * data/xslt/xml2text.xsl: Transform XML into plain text.
5480 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
5481 * data/Makefile.am (xsltdir): New variable.
5482 (dist_xslt_DATA): Add xslt/*.xsl files.
5483
5484 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
5485
5486 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
5487 Problem reported by Wojciech Polak.
5488 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
5489 (xml_printf): Undo change I made on 21 September; that is,
5490 indent 2 spaces, not 1.
5491
5492 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
5493
5494 Pacify ./configure --enable-gcc-warnings.
5495 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
5496 `char const *' instead of `char *'.
5497 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
5498 local variable `sep'.
5499
5500 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5501
5502 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
5503 elsewhere.
5504 * src/print-xml.c: Prefer "const" after types; that's more consistent.
5505 (xml_printf): Indent just 1 space for level.
5506 (e_char, xlate_char): Remove.
5507 (xml_escape_string): Rewrite to avoid undefined behavior (used
5508 storage that was freed from the stack).
5509 (xml_escape_n): Don't bother checking for subscript error.
5510
5511 2007-09-21 Wojciech Polak <polak@gnu.org>
5512
5513 Add Bison XML Automaton Report.
5514
5515 Add support for an -x option to generate an XML report.
5516 It is not documented yet.
5517 * src/print-xml.c: New file.
5518 * src/print-xml.h: Likewise.
5519 * lib/timevar.def (TV_XML): New var.
5520 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
5521 * src/conflicts.c: Include print-xml.h.
5522 (solved_conflicts_xml_obstack): New var.
5523 (log_resolution, conflicts_solve, conflicts_free):
5524 Add support for XML report.
5525 (conflicts_output_val): New function.
5526 * src/conflicts.h (conflicts_output_val): New decl.
5527 * src/files.c (spec_xml_file): New var.
5528 (compute_output_file_names, output_file_names_free): Add XML support.
5529 * src/files.h (spec_xml_file): New decl.
5530 * src/getargs.c (xml_flag): New var.
5531 (usage, short_options, long_options, getargs): Add XML support.
5532 * src/getargs.h (xml_flag): New decl.
5533 * src/gram.c: Include print-xml.h.
5534 (rule_lhs_print_xml, rule_rhs_print_xml):
5535 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
5536 New functions.
5537 * src/gram.h: Declare external ones.
5538 * src/main.c: Include print-xml.h.
5539 (main): Add XML support.
5540 * src/reduce.c: Include print-xml.h.
5541 (reduce_xml): New function.
5542 * src/reduce.h: Declare it.
5543 * src/state.c: Include print-xml.h.
5544 (state_new): Add XML support.
5545 (state_rule_lookahead_tokens_print_xml): New function.
5546 * src/state.h: Declare it.
5547 (struct state): New member solved_conflicts_xml.
5548 * src/symtab.c (symbol_class_get_string): New function.
5549 * src/symtab.h: Declare it.
5550
5551 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5552
5553 * GNUmakefile: Switch to coreutils's version.
5554 * bootstrap: Likewise.
5555 * Makefile.cfg: Adjust to new GNUmakefile.
5556 * README-hacking: Likewise.
5557
5558 Import from gnulib:
5559
5560 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5561 Bruno Haible <bruno@clisp.org>
5562
5563 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5564 and is a script that invokes bison. Tighten the code. Add comments.
5565
5566 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
5567
5568 Spell "boolean" as "Boolean". Reported by Akim Demaille.
5569 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
5570 * doc/bison.texinfo (Decl Summary): Fix.
5571 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
5572 * tests/input.at (Boolean %define variables): Update output.
5573 * tests/skeletons.at (%define boolean variables: invalid skeleton
5574 defaults): Rename to...
5575 (%define Boolean variables: invalid skeleton defaults): ... this and
5576 update output.
5577
5578 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
5579
5580 In impure push mode, don't allow more than one yypstate to be allocated
5581 since multiple impure parsers would corrupt yynerrs.
5582 * data/push.c (yypstate_allocated): New static global variable
5583 initialized to 0.
5584 (yypull_parse): If yypstate_new returns 0, don't report it as memory
5585 exhaustion if yypstate_allocated is 1, but still return 2.
5586 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
5587 already 1. Otherwise, set it to 1.
5588 (yypstate_delete): Set it to 0.
5589 * tests/push.at (Push Parsing: Multiple impure instances): New test
5590 case.
5591
5592 2007-08-17 Bob Rossi <bob@brasko.net>
5593
5594 * doc/bison.texinfo (Push Decl): Document the push parser.
5595 (Table of Symbols): Ditto.
5596 (Pure Decl): Ditto.
5597 (Decl Summary): Ditto.
5598 (Multiple Parsers, Push Parser Function, Pull Parser Function,
5599 Parser Create Function, Parser Delete Function):
5600 Add new push parser symbols.
5601 (Table of Symbols): Document push-parser, push-pull-parser,
5602 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
5603
5604 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
5605
5606 Update to GPLv3.
5607 * doc/gpl-3.0.texi: New file.
5608 * doc/gpl.texi: Remove.
5609 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
5610 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
5611 * README-hacking, TODO, bootstrap, bootstrap.conf:
5612 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
5613 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
5614 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
5615 * data/lalr1.cc, data/lalr1.java, data/location.cc:
5616 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
5617 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
5618 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
5619 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
5620 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
5621 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
5622 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
5623 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
5624 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
5625 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
5626 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
5627 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
5628 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
5629 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
5630 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
5631 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
5632 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
5633 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
5634 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
5635 * src/complain.c, src/complain.h, src/conflicts.c:
5636 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
5637 * src/files.h, src/flex-scanner.h, src/getargs.c:
5638 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
5639 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
5640 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
5641 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
5642 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
5643 * src/print.c, src/print.h, src/print_graph.c:
5644 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
5645 * src/reduce.h, src/relation.c, src/relation.h:
5646 * src/revision.h, src/scan-code.h, src/scan-code.l:
5647 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
5648 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
5649 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
5650 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
5651 * tests/Makefile.am, tests/actions.at, tests/c++.at:
5652 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
5653 * tests/existing.at, tests/glr-regression.at:
5654 * tests/headers.at, tests/input.at, tests/java.at:
5655 * tests/local.at, tests/output.at, tests/push.at:
5656 * tests/reduce.at, tests/regression.at, tests/sets.at:
5657 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
5658 * tests/torture.at:
5659 Update to GPLv3.
5660
5661 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5662
5663 Get rid of broken %no-parser, -n, and --no-parser implementation and
5664 documentation.
5665 * TODO: Don't mention them.
5666 * doc/bison.1: Likewise.
5667 * doc/bison.texinfo (Decl Summary): Likewise.
5668 (Bison Options): Likewise.
5669 (Option Cross Key): Likewise.
5670 * src/getargs.c (no_parser_flag): Remove global variable.
5671 (usage): Don't print description of -n and --no-parser.
5672 (long_options): Remove --no-parser entry here.
5673 (getargs): Remove -n case in the switch here.
5674 * src/getargs.h (no_parser_flag): Remove extern.
5675 * tests/regression.at (Web2c Actions): Remove comment that mentions
5676 --no-parser.
5677
5678 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5679
5680 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
5681 name user variables starting with `yy'. Just pass NULL instead of a
5682 dummy local &yylval to yypush_parse.
5683 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
5684 starting with `yy'.
5685
5686 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
5687
5688 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
5689 true since it's then always used regardless of whether yyoverflow is
5690 defined. Reported by Christian Burger at
5691 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
5692 * THANKS: Add Christian Burger.
5693
5694 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5695 node names: say "Decl Summary" not "Bison Declaration Summary".
5696
5697 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
5698
5699 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
5700 determine whether this function has already complained about an invalid
5701 value for a %define boolean variable, don't check whether Bison has
5702 ever examined the value. As written, the check was a tautology.
5703 Instead, record and check for this complaint using a separate muscle.
5704
5705 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5706
5707 Fix push parsing memory leak reported by Brandon Lucia at
5708 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
5709 * THANKS: Add Brandon Lucia.
5710 * data/push.c (yypstate_delete): Free the stack if it was reallocated
5711 but the parse never completed and thus freed it.
5712 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
5713 * tests/testsuite.at: Include push.at.
5714 * test/push.at: New.
5715 (Push Parsing: Memory Leak for Early Deletion): New test case.
5716
5717 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
5718
5719 Improve handling of multiple S/R conflicts in the same state and of S/R
5720 conflicts involving multiple reductions.
5721 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
5722 set for a state here or Bison will abort if it is reassigned on a
5723 later conflicted reduction in the same state.
5724 Similarly, don't finalize and assign the solved conflicts report here
5725 or it will be lost if it is reassigned on a later conflicted reduction
5726 in the same state.
5727 (set_conflicts): Instead, assign them both here after all S/R conflicts
5728 in the state have been fully examined.
5729 * src/print.c (shift_set): Rename to...
5730 (no_reduce_set): ... this.
5731 (print_reductions): Update for rename, and add %nonassoc error action
5732 tokens to no_reduce_set so that, when printing the first remaining
5733 reduction on an error action token, the reduction is enclosed in
5734 brackets.
5735 (print_results): Update for rename.
5736 * tests/conflicts.at (Solved conflicts report for multiple reductions
5737 in a state): New test case.
5738 (%nonassoc error actions for multiple reductions in a state): New test
5739 case.
5740
5741 * src/main.c (main): Don't depend on C99 features.
5742
5743 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5744
5745 * build-aux/.cvsignore: Add compile.
5746 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
5747 uniwidth.
5748
5749 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
5750
5751 * bootstrap (slurp): Create target directories that don't exist.
5752 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
5753
5754 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5755
5756 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
5757 than item number.
5758 * closure.c (closure): Likewise.
5759 * state.h (reductions): Comment sorting of rules.
5760 (state): Comment sorting of items.
5761
5762 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
5763
5764 Fix C++ test cases after recent Gnulib changes. Discussed starting at
5765 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
5766 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
5767 definition in order to avoid Gnulib headers since we don't use config.h
5768 here.
5769 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
5770 rather than AT_DATA so that config.h is included.
5771
5772 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
5773
5774 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
5775 instead of fprintf. Guard these functions with #if YYDEBUG instead of
5776 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
5777 and so that YYFPRINTF is guaranteed to be defined here.
5778
5779 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5780
5781 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
5782 with...
5783 (muscle_percent_define_check_values): ... this more helpful function.
5784 Again, it's not used yet, but it will be.
5785 * src/muscle_tab.h: Likewise.
5786
5787 Improve some comments in parser table construction.
5788 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
5789 (generate_states): Don't mention ruleset, which is internal to closure.
5790 * src/closure.c (closure): Explain sorting of core and itemset, which
5791 is required for this function to behave correctly.
5792 * src/closure.h (closure): Mention sorting.
5793
5794 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
5795
5796 * src/lalr.c (state_lookahead_tokens_count): For code readability,
5797 move the check for disabled transitions to an aver since conflict
5798 resolution hasn't happened yet.
5799
5800 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
5801 labels a state as inconsistent just because it has error transitions.
5802 The original form of this check appeared in revision 1.1 of lalr.c,
5803 which was committed on 1991-12-21. Now (at least), changing the
5804 consistency label on such a state appears to have no useful effect in
5805 any of the places it is examined, which I enumerate below. The key
5806 point to understanding each item in this enumeration is that a state
5807 with an error transition is labelled consistent in the first place only
5808 if it has no rules, so the check cannot matter for states that have
5809 rules. (1) Labelling a state as inconsistent will cause set_conflicts
5810 to try to identify its conflicts, and a state must have *rules* to have
5811 conflicts. (2) Labelling a state as inconsistent will affect how
5812 action_row sets the default *rule* for the state. (3) Labelling a
5813 state as inconsistent will cause build_relations to add lookback edges
5814 to *rules* in that state.
5815 * src/state.h (struct state): Word the comment for member consistent
5816 more carefully.
5817
5818 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5819
5820 Don't depend on C99 features.
5821 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
5822 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
5823 * src/reader.c (check_and_convert_grammar): Fix for-loop.
5824 * src/state.c (state_mark_reachable_states): Fix for-loop.
5825 (state_remove_unreachable_states): Fix for-loop.
5826
5827 Don't widen struct state with member reachable just to temporarily
5828 record reachability. Instead, use a local bitset.
5829 * src/state.h (struct state): Remove member.
5830 * src/state.c (state_new): Don't initialize it.
5831 (state_mark_reachable_states): Rename to...
5832 (state_record_reachable_states): ... this, and use bitset.
5833 (state_remove_unreachable_states): Use bitset.
5834
5835 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
5836
5837 * src/Makefile.am (yacc): Quote target action commands properly so
5838 that the yacc script isn't corrupt. Reported by Hans Aberg at
5839 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
5840
5841 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
5842 the case of pure parsers. Reported by Frans Englich at
5843 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
5844 * THANKS: Add Frans Englich.
5845
5846 * NEWS (2.3a+): In the %code entry, reference section `Bison
5847 Declaration Summary' from the manual now since the %code summary has
5848 moved there.
5849 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5850 in the rules section must be terminated by semicolons.
5851
5852 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5853
5854 Extend the front-end API for %define variables to more completely
5855 mirror the back-end. This will be useful in the future.
5856 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5857 Update comments to mention the new front-end counterparts of these
5858 macros.
5859 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5860 for muscle_string_decode and muscle_location_decode.
5861 (muscle_string_decode): New static function.
5862 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5863 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5864 functions.
5865 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5866 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5867 implementation more closely.
5868 (muscle_percent_define_invalid_value): New function.
5869 * src/muscle_tab.h (muscle_percent_define_get,
5870 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5871 Prototype.
5872
5873 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5874
5875 * NEWS (2.3a+): Mention yesterday's state-removal change.
5876 (2.3a): Remove the %language entry, which was added after 2.3a.
5877 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5878 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5879 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5880 tests/existing.at: Update copyright date.
5881
5882 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5883
5884 If conflict resolution makes states unreachable, remove those states,
5885 report rules that are then unused, and don't report conflicts in those
5886 states.
5887 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5888 New global function.
5889 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5890 function.
5891 * src/main.c (main): After conflict resolution, remove the unreachable
5892 states and update all data structures that reference states by number.
5893 * src/state.c (state_new): Initialize each state's reachable member to
5894 false.
5895 (state_mark_reachable_states): New static function.
5896 (state_remove_unreachable_states): New global function.
5897 * src/state.h (struct state): Add member bool reachable.
5898 (state_remove_unreachable_states): Prototype.
5899 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5900 New test case.
5901 * tests/existing.at (GNU pic Grammar): Update test case output now that
5902 an unused rule is discovered.
5903
5904 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5905
5906 Minor code cleanup in parser table construction.
5907 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5908 (new_itemsets, save_reductions): Update for rename to nitemset.
5909 * src/closure.c (nritemset): Rename to...
5910 (nitemset): ... this since the "r" appears to meaningless and isn't
5911 used in the comments.
5912 (closure): Update for rename.
5913 * src/closure.h (nritemset): Update extern to...
5914 (nitemset): ... this.
5915 * src/lalr.c (LA): Fix a typo in comments.
5916 * src/print.c (print_core): Update for rename to nitemset.
5917 * src/print_graph.c (print_graph): Likewise.
5918 * src/state.h: Fix some typos in header comments.
5919
5920 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5921
5922 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5923 still sticks to ASCII. Sorry!
5924
5925 * README-hacking: New file, taken mostly from coreutils, with changes
5926 for Bison. Contains much of the contents of:
5927 * README-cvs: Remove.
5928 * bootstrap: Sync from gnulib.
5929 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5930 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5931
5932 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5933
5934 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5935 Setzer.
5936 (Java Differences): Fix some typos.
5937 * THANKS: Add Sebastian Setzer.
5938
5939 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5940
5941 * data/java.m4 (b4_single_class_if): Remove.
5942 (b4_abstract_if): Look at "%define abstract".
5943 (b4_lexer_if): New.
5944 (b4_union_name): Rename...
5945 (b4_yystype): ... to this. Map to "%define stype".
5946 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5947 b4_maybe_throws): Fix quoting.
5948 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5949 * data/lalr1.java (Lexer interface): Always define.
5950 (Lexer interface within parser class): Remove.
5951 (YYLexer class): New, used when "%code lexer" is present.
5952 (constructor): When "%code lexer" is used, pass %lex-param
5953 to the lexer constructor.
5954 (yylex, yyparse): Remove %lex-param from method invocations
5955 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5956
5957 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5958 abstract". Rename "%define union_name" to "%define stype".
5959 Rename method names according to previous patch.
5960 (Java Scanner Interface): Describe "%code lexer" instead of
5961 "%pure-parser" and "%define single_class".
5962 (Java Differences): Mention "%code lexer".
5963
5964 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5965 Include scanner here, using macros from tests/local.at.
5966 (AT_DATA_CALC_Y): Remove final argument.
5967 (_AT_CHECK_JAVA_CALC): Likewise.
5968 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5969 of %locations and %error-verbose.
5970 (main): Test with and without %lex-param.
5971 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5972 (AT_BISON_OPTION_POPDEFS): Pop it.
5973
5974 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5975
5976 DJGPP spefic issue. Inhibit the use of disallowed characters for
5977 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5978 and concern testsuite case 46.
5979 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5980 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5981 * djgpp/config.bat: Inhibit the use of disallowed characters.
5982
5983 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5984
5985 Miscellaneous %define and %code cleanup.
5986 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5987 values are interpreted.
5988 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5989 documentation a little more.
5990 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5991 muscle_percent_define_insert, muscle_percent_code_grow): New
5992 functions/macros.
5993 * src/muscle_tab.h (muscle_percent_define_insert,
5994 muscle_percent_code_grow): Prototype.
5995 * src/parse-gram.y (prologue_declaration): Use
5996 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5997 %define and %code directives.
5998
5999 Make it easy to share %define boolean variables between the front-end
6000 and back-end. Though not used yet, this will be useful in the future.
6001 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6002 Bison uses of names rather than just skeleton uses of names.
6003 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6004 b4_percent_define_skeleton_variables(VARIABLE) to
6005 b4_percent_define_bison_variables(VARIABLE).
6006 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6007 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6008 b4_percent_code_bison_qualifiers(QUALIFIER).
6009 (b4_check_user_names_wrap): Update for renames.
6010 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6011 muscle_percent_define_default): New functions mimicking
6012 b4_percent_define_flag_if and b4_percent_define_default.
6013
6014 For %define variables, report locations for invalid values and
6015 redefinitions.
6016 * data/bison.m4 (b4_percent_define_flag_if): Read
6017 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6018 value for VARIABLE.
6019 (b4_percent_define_default): Save a special location in
6020 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6021 must later be reported as invalid.
6022 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6023 functions.
6024 (muscle_percent_define_insert): Record the location of VARIABLE in
6025 muscle percent_define_loc(VARIABLE), and use it to report the previous
6026 location for a redefinition.
6027 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6028 (muscle_percent_define_default): Update like b4_percent_define_default.
6029 (muscle_grow_user_name_list): Rename to...
6030 (muscle_user_name_list_grow): ... this for consistency and use
6031 muscle_location_grow.
6032 * src/muscle_tab.h (muscle_location_grow): Prototype.
6033 * tests/input.at (%define errors): Update expected output.
6034 * tests/skeletons.at (%define boolean variables: invalid skeleton
6035 defaults): New test case.
6036
6037 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6038
6039 * src/print.c (lookahead_set, state_default_rule): Remove.
6040 (print_reductions): Replace state_default_rule invocation with
6041 equivalent use of yydefact, which was computed in token_actions in
6042 tables.c.
6043 (print_results): Don't allocate lookahead_set.
6044
6045 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
6046
6047 * data/lalr1.java: Prefix all private members with yy.
6048
6049 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6050
6051 Use YYFPRINTF instead of fprintf where appropriate. Reported by
6052 Sebastien Fricker at
6053 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6054 * THANKS: Add Sebastien Fricker.
6055 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6056 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6057 accept a variable number of arguments.
6058
6059 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6060
6061 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6062
6063 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6064
6065 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6066 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6067 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6068
6069 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6070
6071 Undo my 2007-02-07 change, switching back to the c-strcase module
6072 introduced in the 2007-02-03 change. Bruno Haible reported that
6073 the 2007-02-07 change would be dangerous in Turkish if we add a
6074 language whose name contains "i", since "i" is not lowercase "I"
6075 in Turkish.
6076 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6077 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6078 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6079 * m4/.cvsignore: Remove strcase.m4.
6080 * src/getargs.c: Revert 2007-02-07 change, as follows.
6081 Include c-strcase.h.
6082 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6083
6084 2007-02-11 Bruno Haible <bruno@clisp.org>
6085
6086 Enable the Java related testsuite tests when the only Java compiler
6087 found is a gcj < 4.3. Discussed at
6088 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6089 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6090
6091 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6092
6093 * data/Makefile.am: Update copyright date.
6094 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6095 yypstate_new returns NULL.
6096 (yypstate_new): Return NULL if malloc does.
6097 * src/reader.c (packgram): Move translation of rule actions from the
6098 beginning of packgram to...
6099 (check_and_convert_grammar): ... here right before packgram is invoked
6100 so it's easier to write more complete comments, and remove redundant
6101 code.
6102
6103 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6104
6105 As in semantic actions, make @$ in %initial-action, %destructor, and
6106 %printer imply %locations.
6107 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6108 scanning @$.
6109 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6110 (@$ in %initial-action implies %locations,
6111 @$ in %destructor implies %locations,
6112 @$ in %printer implies %locations): ... these new test cases.
6113
6114 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6115
6116 Undo most of the 2007-02-03 change, switching to the strcase module
6117 now that gnulib strcase has been fixed.
6118 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6119 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6120 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6121 * m4/.cvsignore: Add strcase.m4.
6122 * src/getargs.c: Revert 2007-02-03 change, as follows.
6123 Don't include c-strcase.h.
6124 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6125 strcasecmp has "unspecified behavior" outside the POSIX locale,
6126 but it works fine in practice if at least one argument is ASCII,
6127 as is the case in Bison.
6128
6129 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
6130
6131 * tests/java.at: Skip tests if only one of javac/java is present.
6132 Reported by Joel E. Denny.
6133 * tests/atlocal.in: Adjust copyright years.
6134
6135 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6136
6137 * data/lalr1.java (Stack): Work around old verifiers that disallow
6138 access to the private fields of an inner class, from the outer class.
6139 We can make Stack's fields public because user code doesn't have access
6140 to the instance of Stack used by parse(). Reported by Paul Eggert.
6141
6142 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6143
6144 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6145 the right spot for these files?
6146 * bootstrap.conf (gnulib_modules): Add c-strcase.
6147 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6148 c-strncasecmp.c.
6149 * src/getargs.c: Include c-strcase.h.
6150 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6151 to avoid unspecified behavior.
6152
6153 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6154
6155 * doc/bison.texinfo (Decl Summary): Correct typo.
6156
6157 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
6158
6159 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6160 Complain if the value does not match empty, "true" or "false".
6161 * data/c++.m4: Adjust default definitions of %define variables.
6162 * data/java.m4: Adjust default definitions of %define variables.
6163 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6164 to above behavior.
6165 * tests/input.at (Boolean %define variables): Test new behavior.
6166
6167 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
6168
6169 * NEWS: Mention java.
6170 * TODO: Remove things that are done.
6171 * bootstrap.conf: Add javacomp-script and javaexec-script.
6172 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6173
6174 * data/Makefile.am: Add new files.
6175 * data/java-skel.m4: New.
6176 * data/java.m4: New.
6177 * data/lalr1.java: New.
6178
6179 * doc/bison.texinfo: Put "A Complete C++ Example" under
6180 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6181 under Other Languages.
6182
6183 * src/getargs.c (valid_languages): Add Java.
6184 * src/getargs.h (struct bison_language): Update size of string fields.
6185
6186 * tests/Makefile.am: Add java.at.
6187 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6188 * tests/java.at: New.
6189 * tests/testsuite.at: Include it.
6190
6191 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6192
6193 Clean up.
6194 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6195 at_directive_argv arguments so these no longer have to be global
6196 variables. Also, update the implementation for the following changes.
6197 (fail_for_at_directive_too_many_args,
6198 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6199 (at_directive_name): Remove as at_directive_argv[0] will be used for
6200 this now.
6201 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6202 for the directive name.
6203 (at_directive_argc, at_directive_argv): Make these local within
6204 skel_lex instead of global.
6205 (INITIAL): Update directive start action for above changes.
6206 (SC_AT_DIRECTIVE_ARG): Rename to...
6207 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6208 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6209 (scan_skel): Move yylex_destroy to...
6210 (skel_scanner_free): ... here.
6211 * tests/skeletons.at (installed skeleton file name): Rename to...
6212 (installed skeleton file names): ... this.
6213
6214 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6215
6216 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6217 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6218 Summary" not "Directives".
6219 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6220 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6221 since the former is now the more complete one.
6222 (Prologue Alternatives): Likewise and do the same for %defines.
6223 (Table of Symbols): Add summary of %code, add summary of %define, and
6224 move full %code documentation to...
6225 (Decl Summary): ... here for consistency with other entries in these
6226 sections.
6227 Move %define entry in order to keep this list alphabetized.
6228 Reword %define entry a little to put less emphasis on the skeleton
6229 concept, which most users shouldn't have to think about.
6230
6231 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6232
6233 Adjust to recent gnulib changes.
6234 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6235 Add string.h, string_.h, unistd_.h, wchar_.h.
6236 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6237 * src/system.h: Don't include <stpcpy.h>; this is now done by
6238 <string.h>.
6239
6240 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
6241
6242 Simplify implementation of unqualified %code, implement macros for
6243 uniform treatment of boolean %define flags. Document %define.
6244 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6245 b4_percent_code_ifdef): New.
6246 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6247 * data/c++.m4: Define default value for global_tokens_and_yystype.
6248 * data/glr.cc: Likewise.
6249 * data/location.cc: Use b4_percent_define_flag_if.
6250
6251 * doc/bison.texinfo (Decl Summary): Document %define.
6252
6253 * src/parse-gram.y (Unqualified %code): Change muscle name to
6254 b4_percent_code().
6255 (content.opt): Default to empty.
6256
6257 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6258
6259 Implement support for relative and absolute skeleton file names.
6260 Discussed starting at
6261 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6262 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6263 (Bison Options): Document in --skeleton entry.
6264 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6265 full_skeleton can't necessarily hold all of pkgdatadir.
6266 If the specified skeleton file name contains a `/', don't prepend
6267 pkgdatadir.
6268 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6269 file name contains a `/', prepend the grammar file directory.
6270 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6271 * skeletons.at: New file.
6272 (relative skeleton file names): New test case.
6273 (installed skeleton file names): New test case.
6274 * tests/testsuite.at: Include skeletons.at.
6275
6276 * bootstrap: Update copyright to 2007.
6277
6278 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
6279
6280 * bootstrap: Remove occurrences of .#bootmp from the files.
6281
6282 2007-01-17 Akim Demaille <akim@epita.fr>
6283
6284 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6285 nonterminals.
6286 Use per-type %printer.
6287
6288 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6289
6290 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6291 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6292 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6293 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6294 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6295 tests/glr-regression.at, tests/input.at, tests/local.at,
6296 tests/output.at, tests/torture.at: Update copyright to 2007.
6297
6298 2007-01-16 Akim Demaille <akim@epita.fr>
6299
6300 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6301 error code.
6302 (Calc++ Scanner): Exit with failure if we can't open the input
6303 file.
6304 Accept "-" standing for stdin.
6305 (Calc++ Top Level): Print the result only if the parsing was
6306 successful.
6307
6308 2007-01-16 Akim Demaille <akim@epita.fr>
6309
6310 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6311
6312 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
6313 and Joel E. Denny <jdenny@ces.clemson.edu>
6314
6315 Clean up %define and %code implementation in M4 some. Most
6316 importantly, rename all related macros to be in the b4_percent_define
6317 and b4_percent_code namespaces. Also, complete support for `.' in
6318 %define variable names and %code qualifiers.
6319 * data/bison.m4 (b4_check_user_names): Check for special
6320 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6321 m4_foreach loops.
6322 (b4_get_percent_define, b4_get_percent_code): Rename to...
6323 (b4_percent_define_get, b4_percent_code_get): ... these.
6324 Extend documentation with examples.
6325 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6326 b4_percent_define_skeleton_variables and
6327 b4_percent_code_skeleton_qualifiers.
6328 Expect any value for the %define variable `foo' to be stored in the
6329 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6330 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6331 expect any unqualified %code blocks to be stored in a macro named
6332 `b4_percent_code_unqualified'.
6333 Use m4_indir so that %define variable names and %code qualifiers can
6334 contain `.', which is allowed by the grammar parser.
6335 (b4_percent_define_default): New macro to set a default value for a
6336 %define variable.
6337 (m4_wrap): Update wrapped code, and fix some underquoting.
6338 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6339 Expect grammar uses of %define variables and %code qualifiers to be
6340 defined in b4_percent_define_user_variables and
6341 b4_percent_code_user_qualifiers.
6342 * data/c++.m4: Use b4_percent_define_default rather than
6343 m4_define_default. Fix some underquoting. Skeleton usage of %define
6344 variable define_location_comparison now implies skeleton usage of
6345 %define variable filename_type.
6346 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6347 data/push.c, data/yacc.c: Update macro names.
6348 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6349 muscle names.
6350
6351 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6352
6353 DJGPP specific issues.
6354
6355 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6356 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6357
6358 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6359
6360 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6361 run parsers in all tests so that Valgrind is invoked during
6362 maintainer-check-valgrind.
6363 (Duplicate representation of merged trees): Free all semantic values.
6364 (Duplicated user destructor for lookahead): Likewise.
6365
6366 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6367
6368 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6369 command-line prefix.
6370 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6371 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6372 miss Valgrind messages.
6373 (Exploding the Stack Size with Malloc): Likewise.
6374
6375 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6376
6377 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6378 locals. Reported by Juan Manuel Guerrero at
6379 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6380 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6381 Fix some indentation also.
6382 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6383 explaining this issue.
6384
6385 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
6386 and Joel E. Denny <jdenny@ces.clemson.edu>
6387
6388 Simplify union and prologue handling, and escape union and lex/parse
6389 params with digraphs.
6390 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
6391 values to the empty string since these are no longer guaranteed
6392 initialized by the front-end.
6393 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
6394 braces around b4_user_stype since this is no longer done by the
6395 front-end.
6396 * src/files.c, src/files.h (pre_prologue_obstack,
6397 post_prologue_obstack): Remove.
6398 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
6399 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
6400 with digraphs. This fixes lex params and parse params.
6401 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
6402 * src/output.c (prepare): Remove muscle insertion of the prologues.
6403 (output): Remove freeing of pre_prologue_obstack and
6404 post_prologue_obstack.
6405 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
6406 than prologue_augment for prologue parsing so you don't need prologue
6407 obstacks.
6408 (grammar_declaration): For %union RHS, use `braceless' instead of
6409 "{...}" so that braces are already stripped and code is escaped with
6410 digraphs.
6411 * src/reader.c (prologue_augment): Remove.
6412 (reader): Remove initialization of pre_prologue_obstack and
6413 post_prologue_obstack.
6414 * src/reader.h (prologue_augment): Remove.
6415
6416 * data/c.m4: Remove stray parenthesis.
6417
6418 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6419
6420 Remove quotes from variables names in %define directives and from
6421 qualifiers in %code directives, and restrict the characters that are
6422 allowed in them to M4-friendly ones. For %define, continue to support
6423 the quoted form as a deprecated feature. Discussed starting at
6424 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
6425 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
6426 %code.
6427 * doc/bison.texinfo (Prologue Alternatives): Update.
6428 (Decl Summary): In %defines entry, update mention of `%code requires'
6429 and `%code provides'.
6430 (C++ Location Values): Update %define uses.
6431 (Calc++ Parser Interface): Likewise.
6432 (Calc++ Parser): Likewise, and update `%code requires' uses.
6433 (Table of Symbols): Update %code documentation.
6434 * src/parse-gram.y (prologue_declaration): For %define variables, use
6435 `variable' instead of `STRING'.
6436 (grammar_declaration): For %code qualifiers, use `ID' instead of
6437 `STRING'.
6438 (variable): New nonterminal that takes an `ID' or a `STRING'.
6439 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
6440 and %define uses.
6441 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
6442 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
6443 (%define errors): Update %define uses.
6444
6445 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6446
6447 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
6448 instead of muscle_insert for %define values so that M4-special
6449 characters are replaced with digraphs.
6450 * tests/input.at (%define errors): Extend to check weird values.
6451
6452 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6453
6454 Instead of having skeletons declare all valid %define variables and
6455 %code qualifiers, provide macros that retrieve the associated values
6456 and build these lists automatically. Thus Bison will now warn when a
6457 variable or qualifier is not used by the skeleton in the current
6458 invocation regardless of whether it might sometimes be used by that
6459 skeleton in other invocations. Also, move all %define value macros to
6460 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
6461 form, which is replaced by %code.
6462 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
6463 (b4_check_user_names): ... this, and change the series of valid name
6464 arguments to a single list argument for names used in the skeleton
6465 similar to the existing list argument for names used in the grammar.
6466 Warn instead of complaining.
6467 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
6468 values and %code code, to format %code code properly, and to build
6469 lists of all %define variables and %code qualifiers used in the
6470 skeleton: b4_skeleton_percent_define_variables and
6471 b4_skeleton_percent_code_qualifiers.
6472 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
6473 Remove, and...
6474 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
6475 the skeleton names lists can finish building first. In place of
6476 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
6477 expect the lists b4_user_percent_define_variables and
6478 b4_user_percent_code_qualifiers.
6479 * data/c++.m4: Where setting default values for b4_parser_class_name,
6480 b4_location_type, b4_filename_type, b4_namespace, and
6481 b4_define_location_comparison, update their names to the
6482 b4_percent_define_ namespace.
6483 * data/glr.c: Don't use b4_check_percent_define_variables and
6484 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6485 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
6486 (b4_parser_class_name, b4_namespace): Define these using
6487 b4_get_percent_define for parser_class_name and namespace.
6488 * data/location.cc: Use b4_get_percent_define.
6489 * data/push.c: Don't use b4_check_percent_define_variables and
6490 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6491 * data/yacc.c: Likewise, and don't call m4_exit in
6492 b4_use_push_for_pull_if or m4_wrap code will never execute.
6493 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
6494 Rename to...
6495 (muscle_grow_user_name_list): ... this for consistency with the
6496 terminology used in bison.m4.
6497 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
6498 %define variable names, and rename muscle used_percent_define_variables
6499 to user_percent_define_variables.
6500 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
6501 user_percent_code_qualifiers.
6502 (content): Remove.
6503 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
6504 {CODE} form is no longer accepted.
6505 * tests/input.at (Reject bad %code qualifiers): Rename to...
6506 (Reject unused %code qualifiers): ... this, and update test output.
6507 (%define error): Update test output.
6508
6509 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
6510
6511 Check for unrecognized %define variables similar to checking for
6512 unrecognized %code qualifiers. Check for redefined %define variables.
6513 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
6514 generalizes...
6515 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
6516 (b4_check_percent_define_variables): New, also wraps it.
6517 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
6518 variables using b4_check_percent_define_variables.
6519 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
6520 all those exercised in the test suite and all those listed in the
6521 `Default values' section of c++.m4. Are there others?
6522 * data/push.c, data/yacc.c: Declare no valid %define variables.
6523 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
6524 similar to muscle_find, but it works even when the muscle stores a
6525 const value.
6526 (muscle_grow_used_name_list): New function for constructing the used
6527 name list muscles that b4_check_for_unrecognized_names requires.
6528 * src/parse-gram.y (prologue_declaration): Warn if a variable is
6529 %define'd more than once. Define the b4_used_percent_define_variables
6530 muscle with muscle_grow_used_name_list.
6531 (grammar_declaration): Abbreviate %code code with
6532 muscle_grow_used_name_list.
6533 * tests/input.at (%define errors): New.
6534
6535 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6536
6537 Provide warn_at, complain_at, and fatal_at function callbacks to the
6538 skeletons, and use this for %code qualifier complaints.
6539 * data/bison.m4 (b4_error_at): New, invoked by...
6540 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
6541 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
6542 @fatal_at(...@) directives.
6543 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
6544 qualifiers in b4_used_percent_code_qualifiers and to use
6545 b4_complain_at.
6546 * src/location.c, src/location.h (boundary_set_from_string): New global
6547 function.
6548 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
6549 function.
6550 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
6551 to b4_used_percent_code_qualifiers.
6552 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
6553 function.
6554 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
6555 (lineno): Rename to...
6556 (out_lineno): ... this so I don't misunderstand it again.
6557 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
6558 here; these newlines are in the input but not the output file.
6559 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
6560 (at_directive_perform): ... this new static function, and add handling
6561 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
6562 directives.
6563 * tests/input.at (Reject bad %code qualifiers): Update test output with
6564 locations and extend.
6565
6566 * tests/output.at (Output file name: [, Output file name: ]): Remove
6567 bogus comment about these tests failing.
6568
6569 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6570
6571 Clean up b4_check_percent_code_qualifiers a little.
6572 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
6573 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
6574 documentation and add examples.
6575 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
6576 qualifiers here.
6577
6578 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6579
6580 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
6581 unreliable -- especially when they're hidden inside another macro.
6582 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
6583 data/c.m4: Remove m4_divert(-1).
6584 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6585 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
6586 m4_divert_push(0) and m4_divert_pop(0).
6587 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
6588 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
6589 pushed and popped by m4sugar, should be first on the stack.
6590
6591 Provide warn, complain, and fatal function callbacks to the skeletons.
6592 This provides more flexibility than m4_fatal, improves the error
6593 message format, and captures messages for translation. Discussed
6594 starting at
6595 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
6596 * data/bison.m4 (b4_error): New, invoked by...
6597 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
6598 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
6599 directives. Because these M4 macros might be called when the current
6600 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
6601 the previous removal of uses of m4_divert, which caused trouble.
6602 (b4_check_percent_code_qualifiers): Use b4_complain instead of
6603 m4_fatal to report unrecognized %code qualifiers.
6604 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
6605 push parser requests.
6606 * data/glr.c: Use b4_complain instead of m4_fatal to report
6607 non-deterministic push parser requests.
6608 Update @output usage to @output(...@) form.
6609 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
6610 report missing %defines. Update @output usage to @output(...@) form.
6611 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
6612 @output(...@) form.
6613 * src/main.c (main): Invoke skel_scanner_free.
6614 * src/scan-skel.h (skel_scanner_free): Prototype new function.
6615 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
6616 obstack_for_string from flex-scanner.h.
6617 (YY_DECL): Use to declare skel_lex static.
6618 (decode_at_digraphs): Remove; now handled in the new
6619 SC_AT_DIRECTIVE_ARG start condition.
6620 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
6621 functions.
6622 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
6623 at_directive_argv): New static globals.
6624 (INITIAL): Use fail_for_invalid_at.
6625 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
6626 recognize the start of a generalized `@directive(...@)' form and
6627 start...
6628 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
6629 directive args (using the new obstack_for_string), to decode the
6630 contained @ diagraphs, and to perform the directive. It recognizes
6631 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
6632 @output(...@).
6633 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
6634 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
6635 `@,'.
6636 (scan_skel): Initialize obstack_for_string on the first call.
6637 (skel_scanner_free): New function to free obstack_for_string.
6638 * tests/input.at (Reject bad %code qualifiers): Update test output.
6639
6640 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
6641
6642 Consolidate the 4 prologue alternative directives (%code, %requires,
6643 %provides, and %code-top) into a single %code directive with an
6644 optional qualifier field. Discussed at
6645 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
6646 * NEWS (2.3a+): Rewrite the existing entry for the prologue
6647 alternatives.
6648 * doc/bison.texinfo (Prologue Alternatives): Update.
6649 (Decl Summary): Update to %code "requires" and %code "provides".
6650 (Calc++ Parser): Update to %code "requires".
6651 (Table of Symbols): Remove entries for %requires, %provides, and
6652 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
6653 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
6654 are replaced by b4_percent_code_provides and b4_percent_code_requires,
6655 which are skeleton-specific.
6656 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
6657 declare what %code qualifiers it supports and to complain if any other
6658 qualifiers were used in the grammar.
6659 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
6660 and b4_user_code([b4_percent_code_provides]) in place of
6661 b4_user_requires and b4_user_provides.
6662 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
6663 Add b4_user_code([b4_percent_code_top]) and
6664 b4_user_code([b4_percent_code]).
6665 Invoke b4_check_percent_code_qualifiers.
6666 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6667 PERCENT_REQUIRES): Remove.
6668 (grammar_declaration): Remove RHS's for %code-top, %provides, and
6669 %requires. Rewrite the %code RHS as the unqualified form defining the
6670 muscle b4_percent_code. Add another RHS for the qualified %code form,
6671 which defines muscles of the form b4_percent_code_QUALIFIER and the
6672 b4_used_percent_code_qualifiers muscle.
6673 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6674 PERCENT_REQUIRES): Remove.
6675 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
6676 %code "requires" and %code "provides".
6677 * tests/input.at (Reject bad %code qualifiers): New.
6678
6679 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6680
6681 Use the new code_props interface for destructors and printers.
6682 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
6683 printer_location members, and change the type of the destructor and
6684 printer members to code_props.
6685 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
6686 symbol_printer_get, semantic_type_destructor_set,
6687 semantic_type_printer_set, default_tagged_destructor_set,
6688 default_tagless_destructor_set, default_tagged_printer_set,
6689 default_tagless_printer_set): Use code_props in arguments and return
6690 types in place of char const * and location.
6691 (symbol_destructor_location_get, symbol_printer_location_get): Remove
6692 since the locations are now contained in the return of
6693 symbol_destructor_get and symbol_printer_get.
6694 * src/output.c (symbol_destructors_output, symbol_printers_output):
6695 Replace with...
6696 (symbol_code_props_output): ... this to eliminate duplicate code.
6697 (output_skeleton): Update to use symbol_code_props_output.
6698 * src/reader.c (symbol_should_be_used): Update use of
6699 symbol_destructor_get.
6700 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6701 Update uses of the various _destructor_set and _printer_set functions.
6702 * src/symtab.c: (default_tagged_destructor_location,
6703 default_tagless_destructor_location, default_tagged_printer_location,
6704 default_tagless_printer_location): Remove since we...
6705 (default_tagged_destructor, default_tagless_destructor,
6706 default_tagged_printer, default_tagless_printer): ... change the type
6707 of these to code_props.
6708 (symbol_new, semantic_type_new, symbol_destructor_set,
6709 semantic_type_destructor_set, symbol_destructor_get,
6710 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
6711 symbol_check_alias_consistency, default_tagged_destructor_set,
6712 default_tagless_destructor_set, default_tagged_printer_set,
6713 default_tagless_printer_set): Update.
6714 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
6715 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
6716 code_props members.
6717 (symbol_print): Use SYMBOL_CODE_PRINT.
6718
6719 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6720
6721 Use the new code_props interface for rule actions.
6722 * src/symlist.h (symbol_list): Replace action, action_location, and
6723 used members with a code_props action_props member.
6724 * src/reader.c (symbol_should_be_used, grammar_rule_check,
6725 grammar_midrule_action, grammar_current_rule_merge_set,
6726 grammar_current_rule_symbol_append, packgram): Update.
6727 * src/scan-code.h (translate_rule_action): Remove, no longer used.
6728 * src/scan-code.l (handle_action_dollar): Update.
6729 (translate_rule_action): Remove, no longer used.
6730 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
6731
6732 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6733
6734 Use the new code_props interface in parse-gram.y.
6735 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
6736 Update all uses of translate_* functions to use the new code_props
6737 interface and to use gram_scanner_last_string_free and
6738 code_scanner_last_string_free where possible.
6739 (grammar_declaration): symbol_list_destructor_set and
6740 symbol_list_printer_set now perform the translation, so don't do it
6741 here. Use gram_scanner_last_string_free where possible.
6742 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
6743 translate_code): Remove, no longer used.
6744 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
6745 symbol_list_printer_set): Perform code translation here rather than
6746 depending on the caller to do so.
6747
6748 * src/symlist.h (struct symbol_list): Correct some documentation typos.
6749 * src/scan-gram.h (gram_last_string): Remove declaration.
6750 * src/scan-gram.l (last_string): Declare it static.
6751
6752 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6753
6754 Encapsulate code properties and related functionality for the various
6755 destructors, printers, and actions into a code_props structure and
6756 interface. This patch merely implements code_props in scan-code.h and
6757 scan-code.l. Future patches will rewrite other modules to use it.
6758 Discussed starting at
6759 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
6760 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
6761 consistently initialize const structs that have an empty location
6762 field.
6763 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
6764 to ensure consistency.
6765 * src/scan-code.h (code_props): New structure.
6766 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
6767 function, macro, and const global variable for initializing a
6768 code_props with no code.
6769 (code_props_plain_init, code_props_symbol_action_init,
6770 code_props_rule_action_init, code_props_translate_code): The rest of
6771 the new code_props functional interface. Among other things, the init
6772 functions set the code_props kind field so that
6773 code_props_translate_code will know whether to behave like
6774 translate_symbol_action, translate_rule_action, or translate_code.
6775 These old translate functions must remain until all other modules are
6776 updated to use the new code_props interface.
6777 (code_scanner_last_string_free): New function similar to
6778 gram_scanner_last_string_free.
6779 (code_scanner_free): Add documentation.
6780 * src/scan-code.l: Implement the new interface.
6781 (code_lex): Make it static, add a code_props* argument, and remove the
6782 rule argument.
6783 (last_string): New static global similar to the one in scan-gram.l.
6784 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
6785 instead of rule.
6786 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
6787 code_props since Bison may one day use this information for destructors
6788 and printers.
6789 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
6790 (handle_action_dollar): Use symbol_list_n_get and set used flag
6791 directly since symbol_list_n_used_set is removed.
6792 (translate_action): Add a code_props* argument and remove the rule,
6793 action, and location arguments. Pass the code_props* on to code_lex.
6794 (translate_rule_action, translate_symbol_action, translate_code):
6795 Rewrite as wrappers around the new code_props interface.
6796 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
6797 it would eventually need to break the encapsulation of code_props.
6798
6799 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6800
6801 * etc/.cvsignore: New.
6802
6803 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6804
6805 Add maintainer-push-check to run maintainer-check using push parsing in
6806 place of pull parsing where available.
6807 * Makefile.am (maintainer-push-check): New.
6808 * data/bison.m4 (b4_use_push_for_pull_if): New.
6809 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
6810 appropriately based on their existing values.
6811 (yypush_parse): Don't print push-parser-specific diagnostics if push
6812 parsing is being used in place of pull parsing.
6813 * data/yacc.c: If push parsing should replace pull parsing, redirect to
6814 push.c.
6815 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
6816 variable, and insert b4_use_push_for_pull_flag into muscles.
6817 * tests/Makefile.am (maintainer-push-check): New.
6818
6819 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6820
6821 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
6822 (whether successful or failed) so that yypush_parse can be invoked
6823 again to start a new parse using the same yypstate.
6824 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
6825 check multiple yypull_parse invocations on the same yypstate. For pull
6826 mode, extend to check multiple yyparse invocations.
6827 (Exploding the Stack Size with Alloca): Extend to try with
6828 %push-pull-parser.
6829 (Exploding the Stack Size with Malloc): Likewise.
6830
6831 * tests/calc.at (Simple LALR Calculator): Don't specify
6832 %skeleton "push.c" since %push-pull-parser implies that now.
6833 * tests/headers.at (export YYLTYPE): Don't check for the push
6834 declarations. Otherwise, this test case can't be used to see if push
6835 mode can truly emulate pull mode.
6836 * tests/input.at (Torturing the Scanner): Likewise.
6837 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
6838 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
6839 AT_YACC_IF, which now includes the case of push mode since %skeleton
6840 need not be used for push mode. This will be more intuitive once
6841 push.c is renamed to yacc.c.
6842
6843 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6844
6845 For push mode, convert yyparse from a macro to a function, invoke yylex
6846 instead of passing a yylexp argument to yypull_parse, and don't
6847 generate yypull_parse or yyparse unless %push-pull-parser is declared.
6848 Discussed starting at
6849 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6850 * data/bison.m4 (b4_pull_if): New.
6851 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6852 * data/push.c: Improve M4 quoting a little.
6853 (b4_generate_macro_args, b4_parenthesize): Remove.
6854 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6855 any time a pull parser is requested.
6856 Don't #define this as a wrapper around yypull_parse. Instead, when
6857 both push and pull are requested, make it a function that does that
6858 same thing.
6859 (yypull_parse): If there's a b4_prefix, #define this to
6860 b4_prefix[pull_parse] when both push and pull are requested.
6861 Don't define this as a function unless both push and pull are
6862 requested.
6863 Remove the yylexp argument and hard-code yylex invocation instead.
6864 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6865 %push-parser.
6866 * src/getargs.c (pull_parser): New global initialized to true.
6867 * getargs.h (pull_parser): extern it.
6868 * src/output.c (prepare): Insert pull_flag muscle.
6869 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6870 (prologue_declaration): Set both push_parser and pull_parser = true for
6871 %push-pull-parser. Set push_parser = true and pull_parser = false for
6872 %push-parser.
6873 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6874 %push-parser since there's no backward-compatibility concern here.
6875 Scan %push-pull-parser.
6876 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6877 instead of %push-parser.
6878 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6879 prototype it in the module that calls yyparse.
6880 * tests/input.at (Torturing the Scanner): Likewise.
6881 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6882
6883 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6884
6885 Update etc/bench.pl. Optimize push mode a little (the yyn change
6886 deserves most of the credit).
6887 * Makefile.am (SUBDIRS): Add etc subdirectory.
6888 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6889 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6890 yytoken, yyval, and yyloc declarations to...
6891 (yyparse or yypush_parse): ... here to improve performance. For
6892 yypush_parse invocations after the first, be sure to assign yyn its old
6893 value again.
6894 (yypstate_new): Don't bother initializing the yyresult field since the
6895 initial value isn't used.
6896 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6897 remove the #define that, in push mode, set it to yyps->NAME.
6898 * etc/Makefile.am: New.
6899 * etc/bench.pl: Remove and build it instead from...
6900 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6901 "tests/bison" from the build directory by default rather than just
6902 invoking "bison" from $PATH.
6903 (calc_grammar): Update push parser code: don't declare yylval globally,
6904 don't define yyparse_wrapper, and don't #define yyparse.
6905 (bench_grammar): Update to check all working combinations of yacc.c,
6906 push.c, impure, pure, pull, and push.
6907
6908 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6909
6910 For push mode, add pull wrappers around yypush_parse.
6911 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6912 (yypull_parse): New function wrapping yypush_parse.
6913 (yyparse): New #define wrapping yypull_parse.
6914 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6915 is declared.
6916 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6917 prototype yylex in the module that calls yyparse, and don't prototype
6918 yyparse there. Otherwise, the yyparse expansion won't compile.
6919 * tests/input.at (Torturing the Scanner): Likewise.
6920
6921 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6922
6923 Enable push parsers to operate in impure mode. Thus, %push-parser no
6924 longer implies %pure-parser. The point of this change is to move
6925 towards being able to test the push parser code by running the entire
6926 test suite as if %push-parser had been declared.
6927 * data/push.c (yypush_parse): For impure mode, remove the
6928 yypushed_char, yypushed_val, and yypushed_loc arguments.
6929 Instead, declare these as local variables initialized to the global
6930 yychar, yylval, and yylloc.
6931 For the first yypush_parse invocation only, restore the initial values
6932 of these global variables when it's time to read a token since they
6933 have been overwritten.
6934 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6935 %push-parser.
6936 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6937 %pure-parser along with %push-parser since this test case was designed
6938 for pure push parsers.
6939 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6940 (AT_YACC_OR_PUSH_IF): New.
6941 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6942 add a note that it's still wrong for some cases (as it has been for a
6943 while).
6944 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6945 %push-parser no longer implies %pure-parser.
6946
6947 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6948
6949 Remove some unnecessary differences between the pull parser code and
6950 the push parser code. This patch enables yynerrs in push mode.
6951 * data/push.c: Reformat M4 a little.
6952 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6953 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6954 because push mode is on. Instead, if pure mode is on, move yynerrs
6955 to...
6956 (b4_declare_parser_state_variables): ... here.
6957 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6958 to yyps->NAME so it can be used in yypush_parse.
6959 (yypush_parse): Don't omit uses of yynerrs in push mode.
6960
6961 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6962
6963 Fix bug such that the first pushed token's value and location are
6964 sometimes overwritten (sometimes by %initial-action) before being used.
6965 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6966 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6967 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6968 more closely mimic the pull parser logic.
6969 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6970 time to read a token, which is after any initialization of yylval and
6971 yylloc.
6972 (gottoken): Rename label to...
6973 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6974 user namespace.
6975
6976 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6977
6978 Rearrange initialization of the parser state variables so that the
6979 skeleton doesn't have to have a copy for pull mode and another for push
6980 mode. This patch also fixes at least a bug such that yylloc was not
6981 initialized (with b4_location_initial_line and
6982 b4_location_initial_column) upon calling yypush_parse. However, that
6983 initialization now overwrites the first token's location;
6984 %initial-action assigning @$ already did the same thing, and both bugs
6985 will be fixed in a later patch.
6986 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6987 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6988 yyss, yyvs, yyls, and yystacksize.
6989 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6990 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6991 yylsp.
6992 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6993 yyps->NAME so it can be used in yypush_parse.
6994 (yyparse or yypush_parse): For yypush_parse, don't print the
6995 "Starting parse" diagnostic for invocations after the first.
6996 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6997 yypush_parse, only do it for the first invocation.
6998 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6999 initialization to occur in yypush_parse but only on the first
7000 invocation.
7001
7002 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7003
7004 * data/push.c: Add CPP guards around push parser declarations in both
7005 the header and the code file.
7006 In the code file, move the push parser declarations to the same place
7007 they appear in the header file.
7008 Clean up the M4 some, especially the inconsistent underquoting in
7009 some b4_c_function_def and b4_c_function_decl uses.
7010
7011 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7012
7013 Encapsulate the push parser state variables into an M4 macro so the
7014 push skeleton doesn't have to list them again for pull mode's yyparse.
7015 For push mode, remove yypush_parse's local equivalents of these
7016 variables to eliminate unnecessary copying between the two sets at
7017 run-time. This patch also fixes at least a bug related to multiple
7018 %initial-action invocations in push mode.
7019 * data/push.c (b4_declare_parser_variables): Rename to...
7020 (b4_declare_scanner_communication_variables): ... this for clarity and
7021 update both uses.
7022 (b4_declare_yyparse_variables): Remove and move its contents to the one
7023 spot where it was invoked.
7024 (b4_declare_parser_state_variables): New macro containing the parser
7025 state variables required by push mode.
7026 (struct yypstate): Replace all fields but yynew with
7027 b4_declare_parser_state_variables.
7028 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7029 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7030 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7031 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7032 parser state variable declarations with
7033 b4_declare_parser_state_variables.
7034 Don't initialize parser state variables when calling yypush_parse since
7035 yypstate_new already does that.
7036 Invoke the user's initial action only upon the first yypush_parse
7037 invocation.
7038 Remove all code that copies between the local parser state variables
7039 and the yypstate.
7040
7041 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7042
7043 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7044 prevent a name collision in a future patch where these names will
7045 sometimes be #define'd.
7046 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7047 since it no longer has the same name as the existing argument.
7048 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7049
7050 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
7051 and Joel E. Denny <jdenny@ces.clemson.edu>
7052
7053 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7054 that the argument is case-insensitive, and there's no `=' here.
7055 For the %skeleton entry, mention that %language is better.
7056 (Bison Options): Likewise for --language and --skeleton. Move the
7057 --skeleton entry so that the `Tuning the parser' section is sorted
7058 alphabetically on long options.
7059 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7060 %language directive in detail here; cross-reference the %language
7061 documentation instead.
7062 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7063 `%require "2.3b"' so that the example is always up-to-date.
7064 (Table of Symbols): Add entries for %language and %skeleton.
7065 * examples/extexi (normalize): Instead of replacing every %require
7066 argument with the current Bison version, just substitute for
7067 `@value{VERSION}'. This guarantees that we're testing what actually
7068 appears in the documentation.
7069 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7070 rather than `@VERSION@'.
7071
7072 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7073
7074 * NEWS: Reword the %language news a bit, and put it earlier.
7075
7076 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7077 Rewrite to simplify the logic.
7078 (language_argmatch): Likewise.
7079 (program_name): We now own this var.
7080 * src/getargs.h (struct bison_language): Use char[] rather than
7081 const char *.
7082
7083 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7084 Java is supported.
7085 * src/complain.c (program_name): Remove decl; no longer needed.
7086 * src/main.c (program_name): Remove; now belongs to getargs.
7087
7088 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
7089
7090 * NEWS: Document %language.
7091
7092 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7093
7094 * data/c-skel.m4, data/c++-skel.m4: New files.
7095 * data/glr.c: Complain on push parsers.
7096
7097 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7098 over %skeleton.
7099 (Decl Summary): Document %language and %skeleton.
7100 (Command line): Document -L.
7101
7102 * examples/extexi: Rewrite %require directive.
7103 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7104
7105 * src/files.c (compute_exts_from_gc): Look in language structure
7106 for .y extension.
7107 (compute_file_name_parts): Check whether .tab should be added.
7108 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7109 (language, skeleton_arg, language_argmatch): New.
7110 (long_options): Add --language.
7111 (getargs): Use skeleton_arg, add -L/--language.
7112 * src/getargs.h: Include location.h.
7113 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7114 * src/output.c (prepare): Pick default skeleton from struct language.
7115 Don't dispatch C skeletons here.
7116 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7117 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7118 * src/scan-gram.l ("%language"): New rule.
7119
7120 * tests/calc.at: Test %skeleton and %language.
7121 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7122 (AT_GLR_IF): Look for %skeleton "glr.cc".
7123 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7124 (AT_YACC_IF): Reject %language.
7125
7126 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7127
7128 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7129 since it wasn't used; only the typedef name 'semantic_type' is needed.
7130 Also, omit trailing white space.
7131
7132 * bootstrap: Sync from coreutils.
7133 (gnulib_extra_files): Add build-aux/announce.gen.
7134 (slurp): Adjust .gitignore files like .cvsignore files.
7135 * build-aux/announce-gen: Remove from CVS, since bootstrap
7136 now creates this.
7137
7138 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7139
7140 Make %push-parser imply %pure-parser. This fixes several bugs; see
7141 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7142 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7143 pure_parser = true.
7144 * data/push.c: Don't bother testing b4_push_if when deciding whether
7145 to expand b4_declare_parser_variables globally.
7146 (yypush_parse): Likewise in here.
7147
7148 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7149 (yy_reduce_print): Reformat M4 for readability.
7150
7151 2006-12-15 Bob Rossi <bob@brasko.net>
7152 and Joel Denny <jdenny@ces.clemson.edu>
7153
7154 * data/push.c (yypstate): Add typedef, and update all uses of
7155 struct yypstate to just yypstate.
7156 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7157
7158 2006-12-14 Bob Rossi <bob@brasko.net>
7159
7160 * data/push.c (yypush_parse): Declare prototype regardless of
7161 %locations option.
7162
7163 2006-12-14 Bob Rossi <bob@brasko.net>
7164
7165 * data/push.c (yyparse): Remove the prototype and the #define when in
7166 push-parser mode.
7167
7168 2006-12-13 Bob Rossi <bob@brasko.net>
7169
7170 * data/push.c (yypstate_init): Rename to...
7171 (yypstate_new): ... this and use b4_c_function_def.
7172 (yypstate_delete): New.
7173 (yypush_parse): Change parameters yynval and yynlloc to be const.
7174 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7175 yypstate_delete functions.
7176
7177 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7178
7179 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7180 strange test case titles. Reported by Bob Rossi.
7181
7182 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7183
7184 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7185 of potential ambiguities in GLR grammers.
7186
7187 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7188
7189 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7190 `bison ', use m4_index instead of m4_substr since chopping up a string
7191 containing M4-special characters causes problems here.
7192
7193 Fix a couple of bugs related to special characters in user-specified
7194 file names, and make it easier for skeletons to compute output file
7195 names with the same file name prefix as Bison-computed output file
7196 names.
7197 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7198 b4_parser_file_name and b4_spec_defines_file instead of
7199 @output_parser_name@ and @output_header_name@, which are now redundant.
7200 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7201 b4_parser_file_name, b4_spec_defines_file, and the new
7202 @basename(FILENAME@) instead of @output_parser_name@ and
7203 @output_header_name@, which inappropriately escaped the file names as
7204 C string literals.
7205 * src/files.c (all_but_ext): Remove static qualifier.
7206 (compute_output_file_names): Move `free (all_but_ext)' to...
7207 (output_file_names_free): ... here since all_but_ext is needed later.
7208 * src/files.h (all_but_ext): Extern.
7209 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7210 exactly what MUSCLE_INSERT_STRING used to do.
7211 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7212 characters are escaped properly.
7213 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7214 all_but_ext.
7215 For pkgdatadir muscle, maintain previous functionality by using
7216 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7217 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7218 digraphs would never be expanded. Hopefully no one has M4-special
7219 characters in his Bison installation path.
7220 * src/scan-skel.l: Don't parse @output_header_name@ and
7221 @output_parser_name@ anymore since they're now redundant.
7222 In @output, use decode_at_digraphs.
7223 Parse a new @basename command that invokes last_component.
7224 (decode_at_digraphs): New.
7225 (BASE_QPUTS): Remove unused.
7226 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7227 (Output file name): New tests.
7228
7229 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7230
7231 Warn about output files that are generated by the skeletons and that
7232 conflict with other output files.
7233 * data/glr.c: Don't generate the header file here when glr.cc does.
7234 * src/files.c (file_names, file_names_count): New static globals.
7235 (compute_output_file_names): Invoke output_file_name_check for files
7236 not generated by the skeletons and remove existing checks.
7237 (output_file_name_check): New function that warns about conflicting
7238 output file names.
7239 (output_file_names_free): Free file_names.
7240 * src/files.h (output_file_name_check): Declare.
7241 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7242 the skeletons.
7243 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7244 (Conflicting output files): New tests.
7245
7246 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7247
7248 * doc/bison.texinfo: Fix a couple of typos.
7249
7250 2006-12-08 Bob Rossi <bob@brasko.net>
7251
7252 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7253 Rename to...
7254 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7255 update all uses.
7256 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7257 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7258 local pv.
7259 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7260 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7261
7262 2006-12-07 Bob Rossi <bob@brasko.net>
7263 and Joel Denny <jdenny@ces.clemson.edu>
7264
7265 * data/push.c (yypvarsinit): Change return type from void* to struct
7266 yypvars*. No longer cast to void* on return.
7267 (struct yypvars): Remove yylen since it need not be remembered between
7268 yypushparse invocations.
7269 (yypushparse): Don't copy between yylen and pv->yylen.
7270
7271 2006-12-05 Bob Rossi <bob@brasko.net>
7272
7273 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7274 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7275 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7276 (struct yypvars): Remove b4_declare_parser_variables.
7277 (yypvarsinit): Remove init code for removed variables.
7278 (global scope): Do not declare b4_declare_parser_variables if
7279 push or pure mode.
7280 (yypushparse): Add b4_declare_parser_variables.
7281 Init new local variables, and remove init code for removed
7282 yypvars variables.
7283 (yyparse): Delete.
7284 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7285 and yyparse for other modes.
7286 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7287 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7288 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7289 (AT_PURE_LEX_IF): True if pure or push parser.
7290
7291 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7292
7293 Document Yacc prologue alternatives and default %destructor's and
7294 %printer's as experimental. Don't mention Java yet. Discussed at
7295 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7296 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7297 (2.3a): Annotate this entry to say the old forms of these features were
7298 also experimental.
7299 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
7300 Table of Symbols): Say they're experimental. Comment out any mention
7301 of Java (we'll want this back eventually).
7302
7303 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7304
7305 Support a file name argument to %defines. Deprecate `=' in
7306 %file-prefix, %name-prefix, and %output. Discussed at
7307 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7308 * NEWS (2.3a+): Mention.
7309 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
7310 form of %defines, and remove `=' from entries for %file-prefix,
7311 %name-prefix, and %output.
7312 * src/parse-gram.y (prologue_declaration): Implement.
7313 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7314 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7315 all but one occurrence of %name-prefix.
7316 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7317 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7318 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7319 occurrence of each of %file-prefix and %output. Add check for %defines
7320 with argument.
7321 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7322 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7323 Remove the `=' from %output.
7324
7325 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7326
7327 Don't escape $ in test case titles since Autoconf 2.61 now does that
7328 correctly.
7329 * tests/actions.at (Default %printer and %destructor are not for error
7330 or $undefined): Here.
7331 (Default %printer and %destructor are not for $accept): Here.
7332 * tests/input.at (Invalid $n and @n): Here.
7333
7334 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7335
7336 Rename <!> to <>. Discussed starting at
7337 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7338 * NEWS (2.3a+): Update.
7339 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7340 Update.
7341 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7342 * src/scan-gram.l (INITIAL): Implement.
7343 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7344 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7345 comment.
7346 * tests/actions.at (Default tagless %printer and %destructor,
7347 Default tagged and per-type %printer and %destructor,
7348 Default %printer and %destructor are not for error or $undefined,
7349 Default %printer and %destructor are not for $accept,
7350 Default %printer and %destructor for mid-rule values): Update.
7351 * tests/input.at (Default %printer and %destructor redeclared,
7352 Unused values with default %destructor): Update.
7353
7354 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7355
7356 Don't let %prec take a nonterminal.
7357 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7358 token.
7359 * tests/input.at (%prec takes a token): New test checking that %prec
7360 won't take a nonterminal.
7361
7362 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7363
7364 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7365 it was double-quoted.
7366 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7367 grammar is maintained with Bison's highest standards.
7368 * src/getargs.c: Fix some typos in Doxygen comments.
7369
7370 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7371
7372 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7373 later. Reported by Paul Eggert in
7374 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7375 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7376 * src/scan-code.l (translate_action): Don't bother invoking
7377 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7378 (code_scanner_free): Instead of invoking
7379 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7380 which frees more.
7381 * src/scan-gram.l (gram_scanner_free): Likewise.
7382 * src/scan-skel.l (scan_skel): Likewise.
7383
7384 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
7385
7386 * src/files.c (tr): Change return type to void.
7387 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
7388 has been called previously for the same key.
7389 (muscle_find): Return storage instead of value so that
7390 --enable-gcc-warnings doesn't produce warnings that the return discards
7391 const. aver that the value and storage are the same since storage
7392 could potentially be NULL when value is not.
7393 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
7394 same as 0.
7395
7396 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7397
7398 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
7399 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
7400 us a slightly cleaner distribution, and also works.
7401 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
7402 gnulib changes.
7403
7404 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
7405 and Paul Eggert <eggert@cs.ucla.edu>
7406
7407 Don't let Bison leak memory except when it complains.
7408 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
7409 (spec_defines_file, dir_prefix): Now char *, not const char *,
7410 since they are freed.
7411 * src/files.c: Likewise.
7412 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
7413 Likewise.
7414 (tr): Now operates in-place. All uses changed.
7415 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
7416 values.
7417 (compute_file_name_parts, compute_output_file_names): Don't store
7418 read-only data in variables that will be freed.
7419 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
7420 src_extension, and header_extension.
7421 (output_file_names_free): New public function to free
7422 spec_verbose_file, spec_graph_file, spec_defines_file,
7423 parser_file_name, and dir_prefix.
7424 * src/getargs.c (getargs): Don't store read-only data in variables that
7425 will be freed.
7426 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
7427 (which previously existed but was unused), and quotearg_free.
7428 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
7429 * src/muscle_tab.c: Likewise.
7430 (muscle_entry): Make the value char const *,
7431 and add a new storage member that is char * and can be freed.
7432 (muscle_entry_free): New private function.
7433 (muscle_init): Use it instead of free.
7434 (muscle_insert, muscle_grow): Update and use new storage member.
7435 (muscle_code_grow): Free the string passed to muscle_grow
7436 since it's not needed anymore.
7437 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
7438 add a new `char *code' member.
7439 ("{...}"): Declare semantic type as code.
7440 * src/scan-code.h (translate_rule_action):
7441 (translate_symbol_action, translate_code, translate_action): Return
7442 `char const *' rather than `char *' since external code should not free
7443 these strings.
7444 * src/scan-code.l: Likewise.
7445 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
7446 which is "{...}" in the parser.
7447 * tests/Makefile.am (maintainer-check-valgrind): Set
7448 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
7449 Valgrind.
7450 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
7451 complain.
7452 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
7453 expecting a non-zero exit status sets --leak-check=summary and
7454 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
7455 this case, and we don't want to hear about it.
7456
7457 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7458
7459 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
7460 instead of from the template, to simplify configuration a bit.
7461 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
7462 and m4/wint_t.m4, as they are needed with the latest gnulib.
7463
7464 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7465
7466 Disable unset/unused mid-rule value warnings by default, and recognize
7467 --warnings=midrule-values to enable them. Discussed starting at
7468 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
7469 * NEWS (2.3a+): Mention.
7470 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
7471 warnings): Add entry for midrule-values subargument.
7472 * src/reader.c (symbol_should_be_used): Don't return true just because
7473 the value is a set/used mid-rule value unless
7474 --warnings=midrule-values was specified.
7475 * tests/input.at (Unused values, Unused values before symbol
7476 declarations): Run tests with and without --warnings=midrule-values.
7477
7478 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
7479 than LIST_FREE directly.
7480
7481 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7482
7483 Finish implementing --warnings=error, which should not be implied by
7484 --warnings=all (or by its synonyms -W and --warnings without
7485 subarguments).
7486 * src/complain.c (set_warning_issued): New function to report that
7487 warnings are being treated as errors and to record an error if so.
7488 Invoke...
7489 (warn_at, warn): ... here.
7490 * src/getargs.c (warnings_args, warnings_types): Reorder so that
7491 "error - warnings are errors" does not appear above "all - all of the
7492 above".
7493 (getargs): For -W and --warnings without subarguments, don't let
7494 FLAGS_ARGMATCH set warnings_error in warnings_flag.
7495 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
7496
7497 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7498
7499 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
7500 empty subargument list. For example: `bison --warnings= parser.y'.
7501
7502 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7503
7504 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
7505 the parser header file so that gcc doesn't warn.
7506
7507 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7508
7509 Split the default %destructor/%printer into two kinds: <*> and <!>.
7510 Discussed starting at
7511 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
7512 * NEWS (2.3a+): Mention.
7513 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
7514 previous change today related to mid-rules.
7515 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
7516 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
7517 (TYPE_TAG_ANY): Add as <*>.
7518 (TYPE_TAG_NONE): Add as <!>.
7519 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
7520 for <*> and <!>.
7521 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
7522 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
7523 * src/symlist.c (symbol_list_default_new): Split into tagged and
7524 tagless versions.
7525 (symbol_list_destructor_set, symbol_list_printer_set): Split
7526 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
7527 SYMLIST_DEFAULT_TAGLESS.
7528 * src/symlist.h: Update symbol_list_default*_new prototypes.
7529 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
7530 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
7531 * src/symtab.c (default_destructor, default_destructor_location,
7532 default_printer, default_printer_location): Split each into tagged and
7533 tagless versions.
7534 (symbol_destructor_get, symbol_destructor_location_get,
7535 symbol_printer_get, symbol_printer_location_get): Implement tagged
7536 default and tagless default cases.
7537 (default_destructor_set, default_printer_set): Split each into tagged
7538 and tagless versions.
7539 * src/symtab.h: Update prototypes.
7540 * tests/actions.at (Default %printer and %destructor): Rename to...
7541 (Default tagless %printer and %destructor): ... this, and extend.
7542 (Per-type %printer and %destructor): Rename to...
7543 (Default tagged and per-type %printer and %destructor): ... this, and
7544 extend.
7545 (Default %printer and %destructor for user-defined end token): Extend.
7546 (Default %printer and %destructor are not for error or $undefined):
7547 Update.
7548 (Default %printer and %destructor are not for $accept): Update.
7549 (Default %printer and %destructor for mid-rule values): Extend.
7550 * tests/input.at (Default %printer and %destructor redeclared): Extend.
7551 (Unused values with default %destructor): Extend.
7552
7553 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7554
7555 Don't apply the default %destructor/%printer to an unreferenced midrule
7556 value. Mentioned at
7557 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
7558 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
7559 like $@n instead of just @n so that the default %destructor/%printer
7560 logic doesn't see them as user-defined symbols.
7561 (symbol_is_dummy): Check for both forms of the name.
7562 * src/reader.c (packgram): Remove the `$' from each midrule symbol
7563 name for which the midrule value is referenced in any action.
7564 * tests/actions.at (Default %printer and %destructor for mid-rule
7565 values): New test.
7566 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
7567 for change to dummy symbol names.
7568
7569 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7570
7571 Warn about unset midrule $$ if the corresponding $n is used.
7572 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
7573 $n usage.
7574 (packgram): Before invoking grammar_rule_check on any rule, make sure
7575 all actions have already been scanned in order to set `used' flags.
7576 Otherwise, checking that a midrule's $$ is set will not always work
7577 properly because the midrule check must forward-reference the midrule's
7578 parent rule.
7579 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
7580 warning.
7581
7582 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7583
7584 More improvements to the documentation of the prologue alternatives:
7585 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
7586 Bison manual.
7587 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
7588 some text to clarify the relative importance of the new directives and
7589 to show how these directives may be viewed as code labels.
7590
7591 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
7592
7593 Similar to the recently removed %before-header, add %code-top as the
7594 alternative to the pre-prologue. Mentioned at
7595 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
7596 Also, let the prologue alternatives appear in the grammar section.
7597 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
7598 (prologue_declaration): Move the existing prologue alternatives to...
7599 (grammar_declaration): ... here and add %code-top.
7600 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
7601
7602 Clean up and extend documentation for the prologue alternatives.
7603 * NEWS (2.3a+): Describe prologue alternatives.
7604 * doc/bison.texinfo (Prologue): Move discussion of prologue
7605 alternatives to...
7606 (Prologue Alternatives): ... this new section, and extend it to discuss
7607 all 4 directives in detail.
7608 (Table of Symbols): Clean up discussion of prologue alternatives and
7609 add %code-top.
7610
7611 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7612
7613 DJGPP specific issues.
7614
7615 * djgpp/config.bat: config.hin has been moved to lib. Adjust
7616 config.bat accordingly.
7617 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
7618 * djgpp/config.site: Likewise.
7619
7620 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
7621
7622 Replace %*-header with %provides, %requires, %code. See discussion at
7623 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
7624
7625 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
7626 (b4_user_start_header): Remove.
7627 * data/glr.c: Use new macros instead of b4_*start_header
7628 and b4_*end_header.
7629 * data/glr.cc: Likewise.
7630 * data/lalr1.cc: Likewise.
7631 * data/push.c: Likewise.
7632 * data/yacc.c: Likewise.
7633
7634 * doc/bison.texinfo: Remove %before-header, rename
7635 %{start,end,after}-header to %requires, %provides, %code.
7636
7637 * src/parse-gram.y: Likewise (also rename token names accordingly).
7638 * src/scan-gram.l: Likewise.
7639 * tests/actions.at: Likewise.
7640
7641 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
7642
7643 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
7644 Problem reported by Joel E. Denny.
7645
7646 2006-10-14 Jim Meyering <jim@meyering.net>
7647
7648 (Sync from coreutils.)
7649 Work also when the working directory (with e.g. coreutils sources)
7650 is version controlled with git, rather than CVS.
7651 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
7652 rather than CVS.
7653 In messages and comments, say e.g., "checked-out sources",
7654 rather than "CVS sources".
7655 (version_controlled_file): New function. Work for git as well as
7656 for CVS. Don't use grep's -q option.
7657 (slurp): Call it here, in place of CVS-specific code.
7658
7659 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
7660
7661 Fix testsuite for ./configure --enable-gcc-warnings:
7662 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
7663 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
7664 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
7665 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
7666 * test/regression.at (Diagnostic that expects two alternatives):
7667 Likewise.
7668
7669 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7670
7671 * bootstrap.conf (gnulib_modules): Add config-h.
7672 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
7673 worry about HAVE_CONFIG_H.
7674 * lib/abitset.c: Likewise.
7675 * lib/bitset.c: Likewise.
7676 * lib/bitset_stats.c: Likewise.
7677 * lib/bitsetv-print.c: Likewise.
7678 * lib/bitsetv.c: Likewise.
7679 * lib/ebitset.c: Likewise.
7680 * lib/get-errno.c: Likewise.
7681 * lib/lbitset.c: Likewise.
7682 * lib/subpipe.c: Likewise.
7683 * lib/timevar.c: Likewise.
7684 * lib/vbitset.c: Likewise.
7685 * lib/bitset.c: Include "bitset.h" first, to test interface.
7686 * lib/bitset_stats.c: Include "bitset_stats.h" first.
7687 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
7688 * lib/bitsetv.c: Include "bitsetv.h" first.
7689 * lib/get-errno.c: Include "get-errno.h" first.
7690 * m4/.cvsignore: Add config-h.m4.
7691 * tests/actions.at (Default %printer and %destructor for ...):
7692 Adjust expected line numbers in output to reflect removal of #if
7693 HAVE_CONFIG_H lines.
7694 * tests/glr-regression.at (Missed %merge type warnings when ...):
7695 Likewise.
7696 * tests/regression.at (Braced code in declaration in rules section):
7697 Likewise.
7698 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
7699 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
7700 Include <config.h> unconditionally.
7701
7702 * bootstrap: Sync from coreutils, as follows:
7703
7704 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7705
7706 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
7707 variable was sometimes used without being initialized. This
7708 messed up the installation of the INSTALL file in some cases.
7709
7710 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7711
7712 * bootstrap (usage, main program, symlink_to_gnulib): Add option
7713 --copy. Inspired by a suggestion from Bruno Haible.
7714
7715 2006-10-03 Jim Meyering <jim@meyering.net>
7716
7717 * bootstrap: Undo last change to this file, since now gnulib-tool
7718 sticks with the automake default in generating dependencies.
7719
7720 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7721
7722 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
7723 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
7724
7725 * doc/bison.1: Add copyright notice.
7726
7727 * data/glr.c: Don't include <stdarg.h>; not used.
7728
7729 * NEWS: The -g and --graph options now output graphs in Graphviz
7730 DOT format, not VCG format.
7731 * doc/bison.1: Likewise.
7732 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
7733 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
7734 of this change in
7735 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
7736 * TODO: Remove Graphviz entry.
7737 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
7738 remove vcg.c, vcg.h, vcg_defaults.h.
7739 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
7740 * src/graphviz.c, src/graphviz.h: New files.
7741 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
7742 * src/files.h: Make comment more generic.
7743 * src/main.c (main): Likewise.
7744 * src/print_graph.h: Likewise.
7745 * src/getargs.c (usage): Make usage description more generic.
7746 * src/print_graph.c: Include graphviz.h rather than vcg.h.
7747 (static_graph, fgraph): Remove. All uses changed to pass
7748 arguments instead of sharing a static var.
7749 (print_core, print_actions, print_state, print_graph):
7750 Output graphviz format rather than VCG format.
7751 * tests/.cvsignore: Remove *.vcg; add *.dot.
7752 * tests/output.at: Expect *.dot files, not *.vcg files.
7753
7754 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
7755 accommodates the 2006-10-08 change.
7756
7757 2006-10-11 Bob Rossi <bob@brasko.net>
7758
7759 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
7760 (b4_yyssa, b4_yyerror_range): New macros.
7761 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
7762 (yypvarsinit): Remove init of removed fields.
7763 (yypushparse): Remove use of removed fields; use new macros instead.
7764
7765 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7766
7767 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
7768 in a push parser. Reindent slightly to match yacc.c better.
7769
7770 2006-10-11 Bob Rossi <bob@brasko.net>
7771
7772 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
7773 yymsg_alloc fields.
7774 (yypvarsinit, yypushparse): Remove init of removed fields.
7775 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
7776
7777 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7778
7779 * THANKS: Add Paolo Bonzini and Bob Rossi.
7780
7781 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
7782
7783 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
7784 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
7785 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
7786 b4_define_user_cde and uses): Remove.
7787 (b4_comment, b4_prefix, b4_sync_start): New.
7788 * data/bison.m4: New file, with most of the content removed from c.m4.
7789 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
7790 * src/output.c (output_skeleton): Pass bison.m4.
7791 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
7792 only if specified.
7793
7794 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
7795
7796 Fix test failure reported by Tom Lane in
7797 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
7798 and try to make such failures easier to catch in the future.
7799 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
7800 that's now the caller's responsibility.
7801 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
7802 Set yychar = YYEOF if it's negative.
7803 * tests/actions.at (yylex): Abort if asked to read past EOF.
7804 * tests/conflicts.at (yylex): Likewise.
7805 * tests/cxx-type.at (yylex): Likewise.
7806 * tests/glr-regression.at (yylex): Likewise.
7807 * tests/input.at (yylex): Likewise.
7808 * tests/regression.at (yylex): Likewise.
7809 * tests/torture.at (yylex): Likewise.
7810
7811 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
7812
7813 Fix problems with translating English-language diagnostics.
7814 * bootstrap: Fix bug introduced in recent bootstrap changes, with
7815 respect to bison-runtime pot generation. The YY_ stuff
7816 wasn't being captured.
7817 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
7818 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
7819 * runtime-po/POTFILES.in: Add data/push.c.
7820
7821 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
7822
7823 Merge bootstrap changes from coreutils.
7824
7825 2006-09-28 Jim Meyering <jim@meyering.net>
7826
7827 Automatically generated dependencies are important even
7828 when all of the sources in a directory come from gnulib.
7829 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
7830 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
7831
7832 2006-09-23 Jim Meyering <jim@meyering.net>
7833
7834 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
7835
7836 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7837
7838 * bootstrap: Add support for --force.
7839 (usage): New function. Describe usage less tersely.
7840 (CVS_only_file): New var.
7841
7842 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
7843
7844 * data/push.c (YYPUSH_MORE): Make it an enum instead.
7845 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
7846 Adjust white space and comments to match GNU style better.
7847
7848 2006-09-20 Bob Rossi <bob@brasko.net>
7849
7850 * data/push.c (yyresult_get): Remove function.
7851 (YYPUSH_MORE): Add #define.
7852 (yypushparse): Modify return value.
7853
7854 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7855
7856 * stamp-h.in: Remove; no longer needed.
7857 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7858 Remove config.h, config.hin, intl (no longer created).
7859 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7860 stamp-h1.
7861
7862 Sync bootstrap from coreutils, as follows:
7863
7864 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7865
7866 * bootstrap (symlink_to_gnulib): New function.
7867 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7868 to copies-of-gnulib.
7869 (cp_mark_as_generated, slurp, gnulib_files):
7870 Avoid making a copy if it's the same as the old version.
7871 (gnulib_files): Add support for this variable (used by Bison).
7872
7873 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7874
7875 * src/getargs.c (usage): Rework to use conventions similar to
7876 coreutils, to make translation a bit easier and the code a bit
7877 smaller. Problem reported by Tim Van Holder.
7878
7879 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7880
7881 Use some of gnulib's new modules, taken from coreutils.
7882
7883 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7884 * bootstrap.conf: New file.
7885 (gnulib_modules): Add configmake, inttypes, unistd.
7886 (XGETTEXT_OPTIONS): Add complain, complain_at,
7887 fatal, fatal_at, warn, warn_at, unexpected_end.
7888 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7889 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7890 (gl_EARLY): Add.
7891 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7892 (gl_INIT): Add
7893 (GNULIB_AUTOCONF_SNIPPET): Remove.
7894 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7895 the pickiest.
7896 * lib/.cvsignore: Add inttypes_.h.
7897 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7898 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7899 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7900 no-longer-necessary initializations.
7901 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7902 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7903 use the unistd module.
7904 * src/system.h: Likewise.
7905 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7906 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7907 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7908 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7909 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7910 * src/system.h: Include inttypes.h unconditionally, now that we
7911 use the inttypes module. Don't bother to include stdint.h, since
7912 inttypes.h now does that for us.
7913 (LOCALEDIR): Remove, now that we use the configmake module.
7914 * src/getargs.c: Include configmake.h.
7915 * src/main.c: Likewise.
7916 * src/output.c: Likewise.
7917 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7918 not from $abs_top_builddir, since config.h moved.
7919
7920
7921 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7922 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7923
7924 * src/parse-gram.y (symbol_declaration): Don't put statements
7925 before declarations; it's not portable to C89.
7926 * src/scan-code.l (handle_action_at): Likewise.
7927
7928 * src/scan-code.l: Always initialize braces_level; the old code
7929 left it uninitialized and therefore had undefined behavior.
7930
7931 Don't attempt to redefine 'assert', since it runs afoul of
7932 systems where standard headers (mistakenly) include <assert.h>.
7933 Instead, define and use our own alternative, called 'aver'.
7934 * src/reader.c: Don't include assert.h, since we no longer
7935 use assert.
7936 * src/scan-code.l: Likewise.
7937 * src/system.h (assert): Remove, replacing with....
7938 (aver): New function, taking a bool arg. All uses changed.
7939 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7940 not merely an integer.
7941
7942 2006-09-15 Bob Rossi <bob@brasko.net>
7943
7944 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7945 * data/c.m4 (YYPUSH): New.
7946 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7947 * src/getargs.c (push_parser): New var.
7948 * src/getargs.h (push_parser): New declaration.
7949 * src/output.c (prepare): Add macro insertion of `push_flag'.
7950 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7951 (prologue_declaration): Parse %push-parser.
7952 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7953 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7954 list of removed lines from the traces observed.
7955 (AT_CHECK_CALC_LALR): Added push parser tests.
7956
7957 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7958
7959 * NEWS: Version 2.3a.
7960 * configure.ac (AC_INIT): Likewise.
7961
7962 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7963 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7964 due to header ordering dependencies. I don't know why the #define
7965 was there.
7966
7967 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7968 runtime cost when YYDEBUG is not defined, and so that some tests
7969 that used to fail now work. Problem and initial suggestion by
7970 Paolo Bonzini.
7971 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7972 * data/glr.cc (b4_parser_class_name):
7973 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7974 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7975 (yydebug_) [YYDEBUG]: New member.
7976 (yycdebug_): Now defined only if YYDEBUG.
7977 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7978 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7979 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7980 if YYYDEBUG.
7981 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7982 Define only if YYDEBUG.
7983 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7984 set_debug_level.
7985 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7986 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7987 AT_CHECK_CALC_GLR_CC that are working now.
7988
7989 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7990
7991 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7992 We don't need them in glr.cc, and glr.c defines them.
7993 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7994 assumes that defining it to anything is the same as defining
7995 it to 1. Problem reported by Paolo Bonzini.
7996
7997 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7998
7999 * data/c.m4 (b4_null, b4_case): Define.
8000 * src/output.c (prepare_symbols): Use b4_null.
8001 (user_actions_output): Use b4_case.
8002
8003 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8004
8005 * data/glr.c (b4_shared_declarations): Put start-header first,
8006 before any #includes that we generate, so that feature-test
8007 macros work. Problem reported by Michael Deutschmann in
8008 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8009 * data/lalr1.cc: Likewise.
8010 * doc/bison.texinfo (Prologue): Document that feature-test macros
8011 should be defined before any Bison declarations.
8012 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8013 that depend on location.hh after, not before, Bison decls, since
8014 we now include location.hh after the first user prologue.
8015
8016 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8017 Sander Brandenburg in
8018 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8019 Also, fix minor white space and comment issues.
8020 (Prologue): Mention that it's better to define feature-test macros
8021 before Bison declarations. Problem reported by Michael Deutschmann.
8022
8023 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8024 by Jim Meyering.
8025 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8026 This adjusts to recent gnulib changes.
8027
8028 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8029
8030 Finish implementation of per-type %destructor/%printer. Discussed
8031 starting at
8032 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8033 and
8034 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8035 * NEWS (2.3+): Add a description of this feature to the default
8036 %destructor/%printer description.
8037 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8038 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8039 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8040 list node contains a semantic type.
8041 * src/symtab.c, src/symtab.h: Extend with a table that associates
8042 semantic types with their %destructor's and %printer's.
8043 (semantic_type_from_uniqstr, semantic_type_get,
8044 semantic_type_destructor_set, semantic_type_printer_set): New functions
8045 composing the public interface of that table.
8046 (symbol_destructor_get, symbol_destructor_location_get,
8047 symbol_printer_get, symbol_printer_location_get): If there's no
8048 per-symbol %destructor/%printer, look up the per-type before trying
8049 the default.
8050 * tests/actions.at (Per-type %printer and %destructor): New test case.
8051 * tests/input.at (Default %printer and %destructor redeclared):
8052 Extend to check that multiple occurrences of %symbol-default in a
8053 single %destructor/%printer declaration is an error.
8054 (Per-type %printer and %destructor redeclared, Unused values with
8055 per-type %destructor): New test cases.
8056
8057 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8058
8059 Require default %destructor/%printer to be declared using
8060 %symbol-default instead of an empty symbol list, and start working on
8061 new per-type %destructor/%printer. Discussed at
8062 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8063 * NEWS (2.3+): Add %symbol-default to example.
8064 * bison.texinfo (Freeing Discarded Symbols): Likewise.
8065 (Table of Symbols): Add entry for %symbol-default.
8066 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8067 (generic_symlist, generic_symlist_item): New nonterminals for creating
8068 a list in which each item is a symbol, semantic type, or
8069 %symbol-default.
8070 (grammar_declaration): Use generic_symlist in %destructor and %printer
8071 declarations instead of symbols.1 or an empty list.
8072 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8073 for changes to symbol_list.
8074 * src/reader.c: Update for changes to symbol_list.
8075 * src/scan-code.l: Likewise.
8076 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8077 * src/symlist.c, src/symlist.h: Extend such that a list node may
8078 represent a semantic type or a %symbol-default in addition to just an
8079 ordinary symbol. Add switched functions for setting %destructor's and
8080 %printer's.
8081 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8082 %destructor/%printer declarations.
8083
8084 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8085
8086 Whether the default %destructor/%printer applies to a particular symbol
8087 isn't a question of whether the user *declares* that symbol (in %token,
8088 for example). It's a question of whether the user by any means
8089 *defines* the symbol at all (by simply using a char token, for
8090 example). $end is defined by Bison whereas any other token with token
8091 number 0 is defined by the user. The error token is always defined by
8092 Bison regardless of whether the user declares it with %token, but we
8093 may one day let the user define error as a nonterminal instead.
8094 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8095 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8096 the meaning of "user-defined".
8097 * tests/actions.at (Default %printer and %destructor for user-declared
8098 end token): Rename to...
8099 (Default %printer and %destructor for user-defined end token): ...
8100 this.
8101
8102 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8103 computation of whether to apply the default, don't maintain a list of
8104 every Bison-defined symbol. Instead, just check for a first character
8105 of '$', which a user symbol cannot have, and check for the error token.
8106
8107 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8108
8109 Don't apply the default %destructor or %printer to the error token,
8110 $undefined, or $accept. This change fits the general rule that the
8111 default %destructor and %printer are only for user-declared symbols,
8112 and it solves several difficulties that are described in the new test
8113 cases listed below.
8114 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8115 * tests/actions.at (Default %printer and %destructor are not for error
8116 or $undefined, Default %printer and %destructor are not for $accept):
8117 New test cases.
8118
8119 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8120
8121 Allow %start after the first rule.
8122 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8123 when parsing the first rule.
8124 (check_and_convert_grammar): Search for it here after all grammar
8125 declarations have been parsed. Skip midrules, which have dummy LHS
8126 nonterminals.
8127 * src/symtab.c (symbol_is_dummy): New function.
8128 * src/symtab.h (symbol_is_dummy): Declare it.
8129 * tests/input.at (%start after first rule): New test.
8130
8131 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8132
8133 Redo some of the previous commit: add back the ability to use
8134 non-aliased/undeclared string literals since it might be useful to
8135 those declaring %token-table.
8136 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8137 commit: don't worry about complaints from symbols_pack.
8138 * src/symtab.c (symbol_new, symbol_class_set,
8139 symbol_check_alias_consistency): Undo changes in previous commit: count
8140 each string literal as a new symbol and token, assign it a symbol
8141 number, and don't complain about non-aliased string literals.
8142 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8143 and token counts but does still set aliased tokens to the same number,
8144 symbol_pack_processor now leaves empty slots in the symbols array.
8145 Remove those slots.
8146 * tests/regression.at (Undeclared string literal): Remove test case
8147 added in previous commit since non-aliased string literals are allowed
8148 again.
8149 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8150 remove unnecessary string literal declarations.
8151 * tests/sets.at (Firsts): Likewise.
8152
8153 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8154
8155 Don't allow an undeclared string literal, but allow a string literal to
8156 be used before its declaration.
8157 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8158 symbols_pack complained.
8159 * src/symtab.c (symbol_new): Don't count a string literal as a new
8160 symbol.
8161 (symbol_class_set): Don't count a string literal as a new token, and
8162 don't assign it a symbol number since symbol_make_alias does that.
8163 (symbol_make_alias): It's not necessary to decrement the symbol and
8164 token counts anymore. Don't assume that an alias declaration occurs
8165 before any uses of the identifier or string, and thus don't assert that
8166 one of them has the highest symbol number so far.
8167 (symbol_check_alias_consistency): Complain if there's a string literal
8168 that wasn't declared as an alias.
8169 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8170 symbol_pack asserts that every token has been assigned a symbol number
8171 although undeclared string literals have not.
8172 * tests/regression.at (String alias declared after use, Undeclared
8173 string literal): New test cases.
8174 (Characters Escapes, Web2c Actions): Declare string literals as
8175 aliases.
8176 * tests/sets.at (Firsts): Likewise.
8177
8178 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8179
8180 In the grammar scanner, STRING_FINISH unclosed constructs and return
8181 them to the parser in order to improve error messages.
8182 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8183 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8184 * tests/input.at (Unclosed constructs): New test case.
8185 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8186 seen.
8187
8188 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8189 unused global.
8190
8191 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8192
8193 Handle string aliases for character tokens correctly.
8194 * src/symtab.c (symbol_user_token_number_set): If the token has an
8195 alias, check and set its alias's user token number instead of its own,
8196 which is set to indicate the alias. Previously, every occurrence of
8197 the character token in the grammar overwrote that alias indicator with
8198 the character code.
8199 * tests/input.at (String aliases for character tokens): New test.
8200
8201 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8202
8203 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8204
8205 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8206
8207 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8208 to prevent failures when building on older platforms.
8209 Check for autopoint failure.
8210 Set XGETTEXT_OPTIONS to values that check for C format strings,
8211 so that translators are warned about them (this also helps
8212 prevent core dumps).
8213
8214 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8215 function, since it simplifies our code a bit.
8216
8217 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8218 rather than -W, so we don't get bogus warnings about sign comparisons.
8219 Add -Wpointer-arith, since that warning is useful (it reports code
8220 that does not conform to C89 and that some compilers reject).
8221 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8222 since it's no longer needed.
8223
8224 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8225
8226 Clean up scanners a bit.
8227 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8228 definitions so gcc won't warn when obstack_for_string is unused.
8229 * src/scan-code.l: config.h and system.h are already #include'd by
8230 scan-code-c.c, so get rid of them here.
8231 * src/scan-gram.l: Likewise.
8232 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8233 definitions rather than duplicating the rest of it.
8234 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8235
8236 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8237
8238 Suppress signed/unsigned comparison warnings for yycheck.
8239 * data/c.m4 (b4_safest_int_type): New macro.
8240 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8241 a signed int type, cast it to b4_safest_int_type first.
8242 * data/yacc.c: Likewise.
8243 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8244 also overwritten.
8245
8246 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8247
8248 * doc/bison.texinfo: Fix some typos.
8249
8250 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8251
8252 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8253 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8254
8255 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8256 the latest gnulib does this a different way.
8257 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8258 translation was patched, so stop omitting it.
8259
8260 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8261
8262 Enable declaration of default %printer/%destructor. Make the parser
8263 use these for all user-declared grammar symbols for which the user does
8264 not declare a specific %printer/%destructor. Thus, the parser uses it
8265 for token 0 if the user declares it but not if Bison generates it as
8266 $end. Discussed starting at
8267 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8268 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8269 and
8270 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8271 * NEWS (2.3+): Mention.
8272 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8273 declare a %destructor for a mid-rule's semantic value. It's just
8274 impossible to declare one specific to it.
8275 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8276 code. Describe default %destructor form.
8277 * src/parse-gram.y (grammar_declaration): Parse default
8278 %printer/%destructor declarations.
8279 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8280 and symbol_destructor_location_get rather than accessing the destructor
8281 and destructor_location members of struct symbol.
8282 (symbol_printers_output): Likewise but for %printer's.
8283 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8284 again.
8285 * src/symtab.c (default_destructor, default_destructor_location,
8286 default_printer, default_printer_location): New static global
8287 variables to record the default %destructor and %printer.
8288 (symbol_destructor_get, symbol_destructor_location_get,
8289 symbol_printer_get, symbol_printer_location_get): New functions to
8290 compute the appropriate %destructor and %printer for a symbol.
8291 (default_destructor_set, default_printer_set): New functions to set the
8292 default %destructor and %printer.
8293 * src/symtab.h: Prototype all those new functions.
8294 * tests/actions.at (Default %printer and %destructor): New test to
8295 check that the right %printer and %destructor are called, that they're
8296 not called for $end, and that $$ and @$ work correctly.
8297 (Default %printer and %destructor for user-declared end token): New
8298 test to check that the default %printer and %destructor are called for
8299 a user-declared end token.
8300 * tests/input.at (Default %printer and %destructor redeclared, Unused
8301 values with default %destructor): New tests to check related grammar
8302 warnings and errors.
8303
8304 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8305
8306 Clean up handling of %destructor for the end token (token 0).
8307 Discussed starting at
8308 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8309 and
8310 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8311
8312 Make the skeletons consistent in how they pop the end token and invoke
8313 its %destructor.
8314 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8315 state, which has token number 0, since this would invoke the
8316 %destructor for the end token.
8317 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8318 until after shifting the end token, or else it won't be popped.
8319 * data/yacc.c (yyparse): Likewise.
8320
8321 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8322 it's the end token. Upon termination, destroy an unshifted lookahead
8323 even when it's the end token.
8324 * data/lalr1.cc (yy::parser::parse): Likewise.
8325 * data/yacc.c (yyparse): Likewise.
8326
8327 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8328 value warnings for the end token when the user gives the end token a
8329 %destructor.
8330
8331 * tests/actions.at (Printers and Destructors): Test all the above.
8332
8333 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8334
8335 Update to latest gnulib and gettext versions.
8336 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8337 Add fopen-safer.
8338 (gnulib_files): Add m4/warning.m4. Don't worry about files
8339 overwritten by autopoint.
8340 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8341 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8342 rejects them.
8343 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8344 so that we can remove the intl files at a better time.
8345 (intl_files_to_remove): Remove aclocal.m4, since it gets
8346 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8347 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8348 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8349 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8350 Remove datarootdir hack; no longer needed.
8351 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8352 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8353 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8354 strdup.h.
8355 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8356 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8357
8358 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8359
8360 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8361 it with --assume-autoconf='latest-stable'.
8362
8363 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8364
8365 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8366 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8367 YYSTYPE' and `{'.
8368 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8369 those from muscle_tab.c since the old ones are misleading.
8370
8371 2006-07-13 Akim Demaille <akim@epita.fr>
8372
8373 Support %define "KEY" {VALUE}.
8374 * src/scan-code.h, src/scan-code.l (translate_action)
8375 (translate_rule_action, translate_symbol_action, translate_code):
8376 Return char *, not const char *.
8377 * src/parse-gram.y (declaration): Rename as...
8378 (prologue_declaration): this.
8379 (string_content): Remove this nonterminal, use STRING.
8380 (braceless, content, content.opt): New nonterminal.
8381 Use them.
8382 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
8383 as value.
8384 * src/scan-gram.l (getargs.h): Don't include it.
8385
8386 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
8387
8388 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
8389 rather than a for-loop that declares a local bool variable. This
8390 should work around a compatibility problem with a Cray x1e C++
8391 compiler reported by Hung Nguyen in
8392 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
8393 The for-loop was introduced in the 2004-11-17 change but I don't
8394 know why it was needed.
8395
8396 2006-07-12 Akim Demaille <akim@epita.fr>
8397
8398 * data/c.m4: Comment changes.
8399
8400 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
8401
8402 * src/complain.c (error_message, ERROR_MESSAGE): New.
8403 To factor...
8404 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
8405 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
8406
8407 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8408
8409 * NEWS: Instead of %union, you can define and use your own union type
8410 YYSTYPE if your grammar contains at least one <type> tag.
8411 Your YYSTYPE need not be a macro; it can be a typedef.
8412 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
8413 (Union Decl, Decl Summary): Document this.
8414 * data/glr.c (YYSTYPE): Implement this.
8415 * data/glr.cc (YYSTYPE): Likewise.
8416 * data/lalr1.cc (YYSTYPE): Likewise.
8417 * data/yacc.c (YYSTYPE): Likewise.
8418 * src/output.c (prepare): Output tag_seen_flag.
8419 * src/parse-gram.y (declaration, grammar_declaration):
8420 Use 'union_seen' rather than 'typed' to determine whether
8421 %union has been seen, since grammars can now be typed without
8422 %union.
8423 (symbol_declaration, type.opt, symbol_def):
8424 Keep track of whether a tag has been seen.
8425 * src/reader.c (union_seen, tag_seen): New vars.
8426 (typed): remove.
8427 * src/reader.h (union_seen, tag_seen, typed): Likewise.
8428 * src/scan-code.l (untyped_var_seen): New variable.
8429 (handle_action_dollar): Adjust to above changes.
8430 (handle_action_dollar, handle_action_at):
8431 Improve overflow checking for outlandish numbers.
8432 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
8433 avoid new diagnostics generated by above changes.
8434 * tests/regression.at (YYSTYPE typedef): Add test to check
8435 for type tags without %union.
8436
8437 * src/symlist.c (symbol_list_length): Return int, not unsigned
8438 int, since callers expect int. This may need to get revisited
8439 once we have proper integer overflow checking.
8440
8441 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
8442 object is now static.
8443
8444 * src/getargs.c (flags_argmatch): Return void, not int,
8445 to pacify ./configure --enable-gcc-warnings.
8446
8447 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
8448 since last_string is already defined to FLEX_PREFIX (last_string).
8449
8450 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8451
8452 Implement --warnings/-W.
8453 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
8454 replaced by...
8455 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
8456 Adjust callers.
8457 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
8458 (warnings_args, warnings_types): New.
8459 (getargs, short_options, long_options): Accept -W/--warnings.
8460 Sort the options by alphabetical order, upper case letter right
8461 before its lower case.
8462
8463 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
8464
8465 Change %merge result type clash warnings to errors. Discussed at
8466 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
8467 * src/reader.c (record_merge_function_type): Use complain_at.
8468 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8469 declared later): Update test case results.
8470
8471 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8472
8473 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
8474 to be in alphabetical order.
8475 (trace_args): Spelling fixes.
8476
8477 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8478
8479 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
8480 so they don't collide with user-defined macros.
8481 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
8482 this was never guaranteed, and now that we're using gnulib stdint,
8483 which defines int_fast16_t to long int, the problem is exposed.
8484
8485 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
8486
8487 * data/c.m4 (b4_basename): Simplify a bit, since we don't
8488 need the full POSIX semantics (and weren't implementing them
8489 anyway).
8490
8491 Adjust to Autoconf 2.60 and today's gnulib.
8492 * bootstrap (gnulib_modules): Add stdint.
8493 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
8494 no longer copies it.
8495 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
8496 since stdint needs the former and wcwidth (which is now required
8497 by mbswidth) needs the latter.
8498 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
8499 work around a compatibility glitch between gettext 0.14.6 and
8500 Autoconf 2.60.
8501 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
8502 Do not check for uintptr_t, since new stdint module does the right
8503 thing.
8504 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
8505 Add stdint.h, stdint_.h, wcwidth.h.
8506 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
8507 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
8508 stdint.m4, wchar_t.m4, wcwidth.m4.
8509 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
8510 usual order for ../lib/*.h files.
8511 (file_name_split): Use last_component, not base_name, to adjust
8512 to gnulib changes.
8513 * src/parse-gram.h: Include <strverscmp.h> in the usual order
8514 for ../lib/*.h files.
8515 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
8516 Define unconditionally, since we now assume the stdint module.
8517 * src/scan-skel.l: Include <dirname.h>.
8518 (BASE_QPUTS): Use last_component, not base_name.
8519 * src/system.h: Include <unlocked-io.h> in the usual order
8520 for ../lib/*.h files. Include <stdint.h> unconditionally,
8521 since we now use the stdint module.
8522 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
8523 HAVE_UINTPTR_T, since we now use the stdint module.
8524 (base_name): Remove decl, since files now include <dirname.h>
8525 to get the decl.
8526
8527 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8528
8529 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
8530 New, default to 1.
8531 * data/yacc.c, data/glr.c, data/location.cc: Use them.
8532 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
8533 default.
8534 * tests/calc.at: Adjust.
8535
8536 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8537
8538 * data/c.m4 (b4_basename): New.
8539 (b4_syncline): Also output the location of its invocation (from
8540 the skeleton).
8541 (b4_user_action, b4_define_user_action, b4_user_actions)
8542 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
8543 (b4_user_stype): New.
8544 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
8545
8546 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8547
8548 In the grammar file, the first column is 1 not 0 on the first line as
8549 on every other line.
8550 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
8551 * tests/input.at (Torturing the Scanner): Update output.
8552
8553 * src/scan-gram.l (scanner_cursor): Declare it static.
8554
8555 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8556
8557 In warnings, say "previous declaration" rather than "first
8558 declaration".
8559 * src/symtab.c (redeclaration): Do that here.
8560 * src/reader.c (record_merge_function_type): In the case of a result
8561 type clash, report the previous declaration rather than the very first
8562 one in the grammar file.
8563 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8564 declared later): Add a third declaration to check this behavior.
8565 * tests/input.at (Incompatible Aliases): Update output.
8566
8567 2006-06-27 Akim Demaille <akim@epita.fr>
8568
8569 * doc/Doxyfile.in: New.
8570 * doc/Makefile.am: Use it.
8571 * src/lalr.h, src/symtab.h: Initial doxygenation.
8572
8573 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8574
8575 Don't miss %merge result type warnings just because the LHS types are
8576 declared after the %merge. This continues the effort of the previous
8577 patch.
8578 * src/reader.c (get_merge_function): Don't set the merger type yet.
8579 (record_merge_function_type): New function for setting the merger type
8580 and checking for clashes.
8581 (grammar_current_rule_merge_set): Set the location of the %merge for
8582 the current rule.
8583 (packgram): Invoke record_merge_function_type for each rule now that
8584 all symbol type declarations have been parsed.
8585 * src/reader.h (merger_list.type_declaration_location): New member
8586 storing the location of the first %merge from which the type for this
8587 merging function was derived.
8588 * src/symlist.h (symbol_list.merger_declaration_location): New member
8589 storing the location of a rule's %merge, if any.
8590 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8591 declared later): New test to catch the error fixed by the above patch.
8592
8593 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8594
8595 Get action warnings (grammar_rule_check) right even when symbol
8596 declarations appear after the rules. Discussed at
8597 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
8598 and
8599 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
8600 Don't mistake the type of $$ in a midrule to be that of its parent
8601 rule's $$.
8602 * src/reader.c (grammar_current_rule_end): Don't invoke
8603 grammar_rule_check yet since not all symbol declarations may have been
8604 parsed yet.
8605 (grammar_midrule_action): Likewise.
8606 Don't record whether the midrule's $$ has been used yet since actions
8607 haven't been translated yet.
8608 Record the midrule's parent rule and its RHS index within the parent
8609 rule.
8610 (grammar_current_rule_action_append): Don't translate the action yet
8611 since not all symbol declarations may have been parsed yet and, thus,
8612 warnings about types for $$, $n, @$, and @n can't be reported yet.
8613 (packgram): Translate the action and invoke grammar_rule_check now that
8614 all symbol declarations have been parsed.
8615 * src/scan-code.l (handle_action_dollar): Now that this is invoked
8616 after parsing the entire grammar file, the symbol list here in the case
8617 of a midrule is actually the midrule's empty RHS, so reference its
8618 parent rule's RHS where necessary.
8619 On the other hand, now that you can already know it's a midrule, you
8620 aren't forced to think $$ has the same type as its parent rule's $$.
8621 (handle_action_at): In the case of a midrule, reference the parent rule
8622 where necessary.
8623 * src/symlist.c (symbol_list_new): Initialize new midrule-related
8624 members.
8625 (symbol_list_length): Now that this is invoked after all rules have
8626 been parsed, a NULL symbol (rather than a NULL symbol list node)
8627 terminates a rule. symbol_list_print already does this correctly.
8628 * src/symlist.h (symbol_list.midrule_parent_rule,
8629 symbol_list.midrule_parent_rhs_index): New members so that midrules can
8630 remember their relationships with their parents.
8631 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
8632 fixed by the above patch.
8633 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
8634 implementing...
8635 (Unused values): ... this old test case and...
8636 (Unused values before symbol declarations): ... this new test case.
8637 This one is the same as `Unused values' except that all symbol
8638 declarations appear after the rules in order to catch the rest of the
8639 errors fixed by the above patch.
8640
8641 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8642
8643 More cleanup.
8644 * src/reader.c (current_rule): Declare it static since it's no longer
8645 used outside this file.
8646 (grammar_current_rule_action_append): Remove redundant arguments from
8647 translate_rule_action invocation.
8648 * src/reader.h (current_rule): Remove this unused extern.
8649 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
8650 * src/scan-code.l (translate_rule_action): Likewise.
8651
8652 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
8653
8654 Clean up yesterday's patch.
8655 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
8656 to...
8657 * src/reader.c (grammar_current_rule_action_append): ... here for
8658 consistency with grammar_current_rule_symbol_append.
8659 * tests/regression.at (Braced code in declaration in rules section):
8660 Make yyerror and yylex static as usual.
8661
8662 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
8663
8664 Fix bug that mistakes braced code in a declaration in the rules section
8665 to be a rule action. Mentioned at
8666 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
8667 * src/scan-gram.l: Move midrule action detection from the start of the
8668 scanning of any braced code to...
8669 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
8670 action. For readability, use $2 and @2 rather than the equivalent
8671 global variables.
8672 * tests/regression.at (Braced code in declaration in rules section):
8673 New test to catch the error fixed by the above patch.
8674
8675 Work on code readability some.
8676 * src/scan-code.l (current_rule): Get rid of this misleading and
8677 redundant declaration: it's actually extern'ed in reader.h.
8678 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
8679 translate_action): Add a rule argument and use it instead of the global
8680 current_rule.
8681 (translate_rule_action): This already receives current_rule through an
8682 argument, so pass it on to translate_action instead of assigning
8683 current_rule to current_rule.
8684 (translate_symbol_action, translate_code): Pass rule = NULL to
8685 translate_action.
8686
8687 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
8688
8689 Rename %before-definitions to %start-header and %after-definitions to
8690 %end-header. Don't use these declarations to separate pre-prologue
8691 blocks from post-prologue blocks. Add new order-independent
8692 declarations %before-header and %after-header as alternatives to the
8693 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
8694 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
8695 * NEWS (2.3+): Update for these changes.
8696 * data/glr.c (b4_before_definitions): Update to...
8697 (b4_start_header): ... this.
8698 (b4_after_definitions): Update to...
8699 (b4_end_header): ... this.
8700 * data/glr.cc: Likewise.
8701 * data/lalr1.cc: Likewise.
8702 * data/yacc.c: Likewise.
8703 * doc/bison.texinfo (The prologue): Update names, and replace remaining
8704 prologue blocks with %*-header declarations.
8705 (Calc++ Parser): Likewise.
8706 (Decl Summary): Update names.
8707 (Table of Symbols): Update description.
8708 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
8709 (PERCENT_END_HEADER): ... this.
8710 (PERCENT_BEFORE_DEFINITIONS): Update to...
8711 (PERCENT_START_HEADER): ... this.
8712 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8713 (declaration): Update token names and m4 macro names.
8714 When parsing %end-header and %start-header, invoke translate_code
8715 before muscle_code_grow, and no longer set global booleans to remember
8716 whether these declarations have been seen.
8717 Parse new %after-header and %before-header.
8718 * src/reader.c (before_definitions, after_definitions): Remove.
8719 (prologue_augment): Accept a new bool argument to specify whether to
8720 augment the pre-prologue or post-prologue.
8721 * src/reader.h (before_definitions, after_definitions): Remove these
8722 extern's.
8723 (prologue_augment): Add new bool argument.
8724 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
8725 (PERCENT_END_HEADER): ... this.
8726 (PERCENT_BEFORE_DEFINITIONS): Update to...
8727 (PERCENT_START_HEADER): ... this.
8728 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8729 * tests/actions.at (Printers and Destructors): Update names.
8730
8731 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
8732
8733 Add comparison operators for C++ location classes. Discussed at
8734 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
8735 * data/c++.m4 (b4_define_location_comparison): New boolean %define
8736 declaration indicating whether filename_type has an operator==. If
8737 filename_type is `std::string', it defaults to `1', `0' otherwise.
8738 * data/location.cc: Iff b4_define_location_comparison is `1', add
8739 operator== and operator!= for class position and for class location.
8740
8741 Some minor fixes.
8742 * src/scan-action.l: Remove unused file.
8743 * src/symtab.c (symbol_printer_set): Use printer_location not
8744 destructor_location.
8745 * src/symtab.h (struct symbol): Replace incorrect source comment for
8746 printer members.
8747 * tests/input.at (Incompatible Aliases): Update output with correct
8748 printer location.
8749
8750 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
8751
8752 Don't put the pre-prologue in the header file. For the yacc.c code
8753 file and the glr.c header and code files, move the pre-prologue before
8754 the token definitions. Add new %before-definitions and
8755 %after-definitions to declare code that will go in both the header file
8756 and code file. Discussed at
8757 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
8758 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
8759 and
8760 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
8761 * NEWS (2.3+): Describe these changes.
8762 * data/glr.c (b4_pre_prologue): Move from within to before...
8763 (b4_shared_declarations): ... this.
8764 Add new b4_before_definitions before b4_token_enums.
8765 Add new b4_after_definitions at the end.
8766 * data/glr.cc (b4_pre_prologue): Replace with...
8767 (b4_before_definitions): ... this in the header file.
8768 (b4_after_definitions): New near the end of the header file.
8769 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
8770 code file right before including the header file.
8771 (b4_before_definitions): New in the previous position of
8772 b4_pre_prologue in the header file.
8773 (b4_after_definitions): New near the end of the header file.
8774 * data/yacc.c: Clean up some m4 quoting especially in the header file.
8775 (b4_token_enums_defines): In the code file, move to right before
8776 YYSTYPE for consistency with the header file.
8777 (b4_before_definitions): New right before b4_token_enums_defines in
8778 both the header and code file.
8779 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
8780 header and code file.
8781 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
8782 of prologues for %union dependencies.
8783 (Decl Summary): In %defines description, mention the effect of
8784 %before-definitions and %after-definitions on the header file.
8785 (Calc++ Parser): Forward declare driver in a %before-definitions rather
8786 than in the pre-prologue so that make check succeeds.
8787 (Table of Symbols): Add entries for %before-definitions and
8788 %after-definitions.
8789 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
8790 %before-definitions.
8791 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
8792 (declaration): Parse those declarations and append to
8793 b4_before_definitions and b4_after_definitions, respectively.
8794 * src/reader.c (before_definitions, after_definitions): New bools to
8795 track whether those declarations have been seen.
8796 (prologue_augment): Add to the post-prologue if %union,
8797 %before-definitions, or %after-definitions has been seen.
8798 * src/reader.h (before_definitions, after_definitions): New extern's.
8799 * src/scan-gram.l: Scan the new declarations.
8800 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
8801 prologue block in a %before-definitions or a %after-definitions based
8802 on whether the %union is declared.
8803 * tests/regression.at (Early token definitions with --yacc, Early token
8804 definitions without --yacc): Move tests for token definitions into the
8805 post-prologue since token names are no longer defined in the
8806 pre-prologue.
8807
8808 2006-06-20 Akim Demaille <akim@epita.fr>
8809
8810 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
8811 (symbol_get): Use it.
8812 * src/parse-gram.y: Use it.
8813
8814 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
8815
8816 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
8817 build succeeds when configured with --enable-gcc-warnings.
8818
8819 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
8820
8821 * src/parse-gram.y (char_name): New function.
8822 (CHAR, STRING, string_content): For %printer, properly escape.
8823 (ID): Prefer fputs to fprintf.
8824 (id): Reindent to be consistent with other rules.
8825 Properly quote char.
8826
8827 The Translation Project changed its way of publishing translations
8828 to maintainers. I haven't received any responses to my request
8829 for supporting the old way, or for documenting the new way. I
8830 have modified 'bootstrap' to use screen scraping
8831 (in this case, HTML scraping). This is unreliable and inelegant,
8832 but I don't see any better way. Yuck.
8833 * bootstrap (TP_URL, WGET_COMMAND): New vars.
8834 (get_translations): New function, which uses HTML scraping to
8835 deduce locations of latest translations.
8836 Use this function to grab both bison and bison-runtime .po files.
8837 Don't bother priming the pump for the runtime-po domain any more,
8838 as it's now translated better than bison is.
8839
8840 2006-06-19 Akim Demaille <akim@epita.fr>
8841
8842 * src/scan-gram.l: No longer "parse" things after `%union' until
8843 `{'. Rather, return a single "%union" token.
8844 No longer make symbols: return strings, and leave the conversion
8845 to symbols to the parser.
8846 (SC_PRE_CODE, token_type): Remove.
8847 * src/parse-gram.y (%union): New field `character'.
8848 Sort tokens.
8849 (CHAR): New token.
8850 (ID, ID_COLON): Now that the scanner no longer makes them
8851 identifiers, adjust all uses to invoke symbol_get.
8852 (id_colon): New, wraps the conversion from string to symbol.
8853 (%union): Accept a possible union_name.
8854 (symbol): Now can be a char.
8855 * data/c.m4 (b4_union_name): Leave a default value.
8856 * data/glr.c, data/yacc.c: Use it.
8857
8858 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8859
8860 For associating token numbers with token names for "yacc.c", don't use
8861 #define statements unless `--yacc' is specified; always use enum
8862 yytokentype. Most important discussions start at:
8863 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8864 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8865 and
8866 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8867 * NEWS (2.3+): Mention.
8868 * data/c.m4 (b4_yacc_if): New.
8869 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8870 token #define's.
8871 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8872 on token name definitions.
8873 * src/getargs.c (usage): Capitalize `Yacc' in English.
8874 * src/output.c (prepare): Define b4_yacc_flag.
8875 * tests/regression.at (Early token definitions): Test that tokens names
8876 are defined before the pre-prologue not just before the post-prologue.
8877 Remove this test case and copy to...
8878 (Early token definitions with --yacc): ... this to test #define's.
8879 (Early token definitions without --yacc): ... and this to test enums.
8880
8881 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8882
8883 * NEWS: Reword the post-2.3 change to not be so optimistic about
8884 removing the old "look-ahead" spelling.
8885 Update previous look-ahead/lookahead change reports.
8886 * REFERENCES: look-ahead -> lookahead (since that's
8887 what he actually wrote).
8888 * doc/refcard.tex: look ahead -> lookahead,
8889 look-ahead -> lookahead
8890
8891 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8892
8893 For consistency, use `lookahead' instead of `look-ahead' or
8894 `look_ahead'. Discussed starting at
8895 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8896 and then at
8897 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8898 * NEWS: For the next release, note the change to `--report'.
8899 * TODO, doc/bison.1: Update English.
8900 * doc/bison.texinfo: Update English.
8901 (Understanding Your Parser, Bison Options): Document as
8902 `--report=lookahead' rather than `--report=look-ahead'.
8903 * src/conflicts.c: Update English in comments.
8904 (lookahead_set): Rename from look_ahead_set.
8905 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8906 (resolve_sr_conflict): Rename local look_ahead_tokens to
8907 lookahead_tokens, and update other uses.
8908 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8909 count_rr_conflicts, conflicts_free): Update uses.
8910 * src/getargs.c (report_args): Move "lookahead" before alternate
8911 spellings.
8912 (report_types): Update uses.
8913 (usage): For `--report' usage description, state `lookahead' spelling
8914 rather than `look-ahead'.
8915 * src/getargs.h (report.report_lookahead_tokens): Rename from
8916 report_look_ahead_tokens.
8917 * src/lalr.c: Update English in comments.
8918 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8919 (state_lookahead_tokens_count): Rename from
8920 state_look_ahead_tokens_count.
8921 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8922 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8923 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8924 Update other uses.
8925 Update English in output.
8926 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8927 * src/print.c: Update English in comments.
8928 (lookahead_set): Rename from look_ahead_set.
8929 (print_reduction): Rename argument lookahead_token from
8930 look_ahead_token.
8931 (print_core, state_default_rule, print_reductions, print_results):
8932 Update uses.
8933 * src/print_graph.c: Update English in comments.
8934 (print_core): Update uses.
8935 * src/state.c: Update English in comments.
8936 (reductions_new): Update uses.
8937 (state_rule_lookahead_tokens_print): Rename from
8938 state_rule_look_ahead_tokens_print, and update other uses.
8939 * src/state.h: Update English in comments.
8940 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8941 (state_rule_lookahead_tokens_print): Rename from
8942 state_rule_look_ahead_tokens_print.
8943 * src/tables.c: Update English in comments.
8944 (conflict_row, action_row): Update uses.
8945 * tests/glr-regression.at
8946 (Incorrect lookahead during deterministic GLR,
8947 Incorrect lookahead during nondeterministic GLR): Rename
8948 print_look_ahead to print_lookahead.
8949 * tests/torture.at: Update English in comments.
8950 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8951 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8952 (Many lookahead tokens): Update uses.
8953 * data/glr.c: Update English in comments.
8954 * lalr1.cc: Likewise.
8955 * yacc.c: Likewise.
8956 * src/conflicts.h: Likewise.
8957 * src/lalr.h: Likewise.
8958 * src/main.c: Likewise.
8959 * src/output.c: Likewise.
8960 * src/parse-gram.c: Likewise.
8961 * src/tables.h: Likewise.
8962 * tests/calc.at: Likewise.
8963
8964 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8965
8966 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8967
8968 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8969
8970 * TODO: Add request from Nelson H. F. Beebe to be able to install
8971 Bison without installing the yacc script.
8972
8973 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8974
8975 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8976 and yytext if they're already #define'd.
8977 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8978 * src/scan-code-c.c: ... here.
8979 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8980 <config.h>.
8981
8982 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8983
8984 Get Bison to build again when configured with --enable-gcc-warnings.
8985 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8986 missing #include's.
8987 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8988 loc argument as it shadows a global.
8989 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8990 invocation.
8991
8992 * src/.cvsignore: Add scan-code.c.
8993
8994 2006-06-07 Akim Demaille <akim@epita.fr>
8995
8996 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8997 to...
8998 * src/scan-code.l: here.
8999 * tests/input.at (Torturing the Scanner): Fix another location
9000 error.
9001
9002 2006-06-07 Akim Demaille <akim@epita.fr>
9003
9004 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9005
9006 2006-06-06 Akim Demaille <akim@epita.fr>
9007
9008 Extract the parsing of user actions from the grammar scanner.
9009 As a consequence, the relation between the grammar scanner and
9010 parser is much simpler. We can also split "composite tokens" back
9011 into simple tokens.
9012 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9013 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9014 rename as...
9015 * src/location.h, src/location.c (add_column_width)
9016 (location_compute): these.
9017 Fix the column count: the initial column is 0.
9018 (location_print): Be robust to ending column being 0.
9019 * src/location.h (boundary_set): New.
9020 * src/main.c: Adjust to scanner_free being renamed as
9021 gram_scanner_free.
9022 * src/output.c: Include scan-code.h.
9023 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9024 Use boundary_set.
9025 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9026 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9027 which is now, again, a separate token.
9028 Adjust all dependencies.
9029 Whereever actions with $ and @ are used, use translate_code.
9030 (action): Remove this nonterminal which is now useless.
9031 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9032 (grammar_current_rule_action_append): Use translate_code.
9033 (packgram): Bound check ruleno, itemno, and rule_length.
9034 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9035 (last_string, last_braced_code_loc, max_left_semantic_context)
9036 (scanner_initialize, scanner_free, scanner_last_string_free)
9037 (gram_out, gram_lineno, YY_DECL_): Move to...
9038 * src/scan-gram.h: this new file.
9039 (YY_DECL): Rename as...
9040 (GRAM_DECL): this.
9041 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9042 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9043 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9044 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9045 Move these declarations, and...
9046 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9047 these to...
9048 * src/flex-scanner.h: this new file.
9049 * src/scan-gram.l (rule_length, rule_length_overflow)
9050 (increment_rule_length): Remove.
9051 (last_braced_code_loc): Rename as...
9052 (gram_last_braced_code_loc): this.
9053 Adjust to the changes of the parser.
9054 Move all the handling of $ and @ into...
9055 * src/scan-code.l: here.
9056 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9057 (handle_action_dollar, handle_action_at): Move to...
9058 * src/scan-code.l: here.
9059 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9060 scan-code.h, scan-code-c.c, scan-gram.h.
9061 (EXTRA_bison_SOURCES): Add scan-code.l.
9062 (BUILT_SOURCES): Add scan-code.c.
9063 (yacc): Be robust to white spaces.
9064
9065 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9066 * tests/regression.at: Adjust the column numbers.
9067 * tests/regression.at: Adjust the error message.
9068
9069 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9070
9071 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9072 Use Akim's wording from
9073 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9074
9075 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9076
9077 Between Bison releases, manually append `+' to the previous Bison
9078 release number, and use that as a signal to automatically print the
9079 ChangeLog's CVS Id keyword from --version. Discussed starting at
9080 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9081 * ChangeLog: Add Id header.
9082 * configure.ac (AC_INIT): Append `+' to `2.3'.
9083 * src/.cvsignore: Add revision.c.
9084 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9085 (BUILT_SOURCES): Add revision.c.
9086 (revision.c): New target rule. This file defines a new global variable
9087 named revision. It initializes it with either the Id from ChangeLog
9088 or, if VERSION doesn't contain `+', with the empty string.
9089 * src/getargs.c (version): Print the value of revision.
9090 * src/revision.h: Extern revision.
9091
9092 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9093
9094 * NEWS: Version 2.3.
9095 * configure.ac (AC_INIT): Likewise.
9096
9097 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9098
9099 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9100 with no arguments, not as an object-like macro. This is for
9101 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9102 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9103 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9104 Document this.
9105
9106 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9107
9108 * src/getargs.c (usage): Back out yesterday's modification of the
9109 --help output so that we don't have to wait for translation before
9110 releasing 2.3.
9111
9112 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9113
9114 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9115 Problem reported by Akim Demaille.
9116
9117 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9118
9119 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9120
9121 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9122
9123 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9124 generated source code. Problem reported by Frans Englich in
9125 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9126
9127 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9128
9129 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9130 shell, not within 'make', so that 'make' by an ordinary builder
9131 (using GNU make) does not worry about configuring gzip. This also
9132 works around a bug reported independently by Keith Thompson and by
9133 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9134 stderr rather than stdout, messing up the build logs.
9135
9136 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9137
9138 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9139 to make sure that YYID will never be unused. This fixes a 'make
9140 maintainer-check' failure caused by the recent changes to the 'Trivial
9141 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9142 not used.
9143 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9144
9145 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9146
9147 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9148 state before an empty RHS is always resolved here. Only the location
9149 of that state is guaranteed to be resolved, and that's enough. This
9150 fixes the remaining bug reported by Derek M. Jones in
9151 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9152 * tests/glr-regression.at (Uninitialized location when reporting
9153 ambiguity): Test the above case.
9154 Also, the embedded comments in this test case claim it checks the case
9155 of an empty RHS that has inherited the initial location. However, the
9156 corresponding LHS was already resolved, so yyresolveLocations didn't
9157 actually have reason to modify it. Fix this by forcing
9158 nondeterministic operation at the beginning of the parse.
9159
9160 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9161
9162 * data/c.m4 (b4_yy_symbol_print_generate):
9163 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9164 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9165 of the bugs reported today by Derek M Jones in
9166 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9167 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9168 defined to be a type name without parens or brackets.
9169 (Location Type): Similarly for YYLTYPE.
9170 * tests/regression.at (Trivial grammars): Put in a test for this
9171 bug that will be caught by 'make maintainer-check' (though not,
9172 alas, by 'make check' unless your compiler is picky).
9173
9174 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9175
9176 * NEWS: Version 2.2.
9177 * configure.ac (AC_INIT): Likewise.
9178
9179 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9180
9181 * data/glr.c (yyreportTree): Make room in yystates for the state
9182 preceding the RHS. This fixes the segmentation fault reported by Derek
9183 M. Jones in
9184 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9185 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9186 to the user. Reported for yyreportTree by Derek M. Jones later in the
9187 same thread.
9188 * THANKS: Add Derek M. Jones.
9189 Update my email address.
9190 Fix typo in Steve Murphy's name.
9191
9192 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9193
9194 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9195 checking against YYLAST that caused the parser to miss a potential
9196 alternative in its diagnostic.
9197 Problem reported by Maria Jose Moron Fernandez in
9198 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9199 * data/lalr1.cc (yysyntax_error_): Likewise.
9200 * data/yacc.c (yysyntax_error): Likewise.
9201 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9202 tokens, in case we run into an older C compiler.
9203 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9204 Use them to check for the off-by-one error fixed above.
9205
9206 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9207 YYSIZE_T, not size_t.
9208 * tests/regression.at (Trivial grammars): New test, to catch
9209 the error fixed by the above patch.
9210
9211 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9212
9213 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9214 scheme.
9215 Reported by Steve Murphy.
9216
9217 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9218
9219 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9220 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9221
9222 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9223
9224 Implement --trace=m4.
9225 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9226 * src/output.c (output_skeleton): When set, pass -dV to m4.
9227
9228 Factor the handling of flags in m4.
9229 * src/output.c (prepare): Rename the muscle names debug, defines,
9230 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9231 * data/c.m4: Adjust.
9232 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9233 Use b4_define_flag_if to define other b4_FLAG_if macros.
9234 (b4_location_if): As a consequence, rename as...
9235 (b4_locations_if): this, for consistency.
9236 Adjust all the skeletons.
9237
9238 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9239
9240 * etc/bench.pm: Shorten bench names.
9241
9242 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9243
9244 * src/output.h, src/output.c (error_verbose): Move to...
9245 * src/getargs.h, src/getargs.c: here.
9246 Sort the flags.
9247 Adjust dependencies.
9248
9249 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9250
9251 * data/c.m4 (b4_copyright): Put the special exception for Bison
9252 skeletons here, so we don't have to put it in each skeleton. All
9253 uses changed. Suggested by Akim Demaille. Also, wrap the
9254 copyright notice, in case it is longer than 80 columns. Replace
9255 comma by newline after title.
9256
9257 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9258
9259 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9260 incompatibility, not a bug. Mention that it wasn't fixed as of
9261 flex 2.5.33.
9262
9263 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9264
9265 * examples/extexi: Enforce the precedence of concatenation over
9266 >>.
9267 Reported by Tommy Nordgren.
9268
9269 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9270
9271 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9272 with the member "token".
9273 Reported by Martin Nylin.
9274
9275 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9276
9277 * data/glr.c: Switch to Bison 2.2 special-exception language in
9278 the copyright notice. Use more-regular format for titles and
9279 copyright notices.
9280 * data/glr.cc: Likewise.
9281 * data/location.cc: Likewise.
9282 * data/yacc.cc: Likewise.
9283 * doc/bison.texinfo (Conditions): Document this.
9284 * NEWS: likewise. Upgrade version to 2.2.
9285
9286 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
9287
9288 * data/glr.cc: Remove dead code.
9289
9290 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9291
9292 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9293 that variable and the line breaks the bootstrap. Problem reported
9294 by Juan M. Guerrero.
9295
9296 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9297
9298 * doc/bison.texinfo (Multiple start-symbols): New.
9299
9300 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9301
9302 * etc/README, etc/bench.pl: New.
9303
9304 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
9305
9306 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9307 rule.
9308 Reported by Mickael Labau.
9309 * tests/input.at (Torturing the Scanner): Test it.
9310
9311 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9312
9313 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9314 Problem reported by Bob Rossi.
9315
9316 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9317
9318 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9319 and didn't really work.
9320 For the index, use @ifnotinfo, not @iftex.
9321 Minor cleanups of spacing and terminology.
9322
9323 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9324
9325 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9326 of AT_NAME_PREFIX when %name-prefix is not used.
9327
9328 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9329
9330 Apply --prefix to C++ skeletons too: they change the namespace.
9331 The test suite already exercize these cases.
9332 * data/c++.m4 (b4_namespace): New.
9333 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9334 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9335 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9336 * doc/bison.texinfo: Document it.
9337 (Option Cross Key): Use @multitable in all formats. It looks
9338 nicer, even in TeX outputs.
9339 (Rules): Use the same code whatever the output type is.
9340 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9341 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9342 * tests/calc.at: Use it, instead of hard coding `yy'.
9343
9344 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9345
9346 * TODO: Remove dead items.
9347
9348 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9349
9350 * doc/FAQ: Remove, merged into...
9351 * doc/bison.texinfo (FAQ): this.
9352 * doc/Makefile.am (EXTRA_DIST): Adjust.
9353
9354 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9355
9356 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9357 even if empty.
9358 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9359 * doc/bison.texinfo (Calc++ Scanner): Use it.
9360
9361 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9362
9363 Fix two nits reported by twlevo, plus one more that I discovered.
9364
9365 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9366 this is the usual Bison style.
9367 * src/location.h (location_print): Likewise.
9368
9369 * src/reader.h (token_name): Likewise.
9370
9371 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9372
9373 Fix some nits reported by twlevo.
9374 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9375 and "POSIX". Use more-modern syntax for URLs. Mention C++
9376 and ask for Java. Don't hardwire OS version numbers. Add
9377 copyright notice.
9378 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9379 * src/conflicts.c (solved_conflicts_obstack): Now static.
9380
9381 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
9382
9383 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
9384 page. Say "you can use it" not "you may use it" as on the web page;
9385 we're describing capabilities not granting permission.
9386
9387 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
9388
9389 * data/glr.c (yyresolveLocations): Rename local variables to avoid
9390 shadowing warnings. Use usual patter for iterating through RHS.
9391 * tests/glr-regression.at
9392 (Uninitialized location when reporting ambiguity):
9393 Modify yylex so that it uses its argument, rather than trying
9394 to rely on ARGSUSED (which doesn't work for gcc with warnings).
9395 const char -> char const.
9396
9397 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
9398 Don't use tabs inside commands; it messes up 'ps'.
9399 Problem reported by twlevo.
9400
9401 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
9402
9403 * tests/glr-regression.at (Uninitialized location when reporting
9404 ambiguity): New test case.
9405 * data/glr.c (yyresolveLocations): New function, which uses
9406 YYLLOC_DEFAULT.
9407 (yyresolveValue): Invoke yyresolveLocations before reporting an
9408 ambiguity.
9409 * doc/bison.texinfo (Default Action for Locations): Note
9410 YYLLOC_DEFAULT's usage for ambiguity locations.
9411 (GLR Semantic Actions): Cross-reference those notes.
9412
9413 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
9414
9415 * tests/glr-regression.at (Leaked semantic values when reporting
9416 ambiguity): Remove unnecessary union and type declarations.
9417 (Leaked lookahead after nondeterministic parse syntax error): New test
9418 case.
9419 * data/glr.c (yyparse): Check for zero stacks remaining before
9420 attempting to shift the lookahead so that you don't lose it.
9421
9422 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9423
9424 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
9425 * tests/glr-regression.at (Leaked semantic values when reporting
9426 ambiguity): New test case.
9427 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
9428 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
9429 now unnecessary yystackp parameter.
9430 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
9431 destructors can be called.
9432
9433 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
9434 in existing testcases.
9435
9436 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9437
9438 Don't leak semantic values for parent RHS when a user action cuts the
9439 parser, and clean up related code a bit.
9440 * tests/glr-regression.at (Leaked merged semantic value if user action
9441 cuts parse): Rename to...
9442 (Leaked semantic values if user action cuts parse): ... this. Add check
9443 for leaked parent RHS values.
9444 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
9445 between an unresolved state (non-empty chain of semantic options) and
9446 an incomplete one (signaled by an empty chain).
9447 (yyresolveStates): Document the interface. Move all manipulation of a
9448 successfully or unsuccessfully resolved yyGLRState to...
9449 (yyresolveValue): ... here so that yyresolveValue always leaves a
9450 yyGLRState with consistent data and thus is easier to understand.
9451 Remove the yyvalp and yylocp parameters since they are always just
9452 taken from the yys parameter. When reporting a discarded merged value
9453 in debugging output, note that it is incompletely merged. Document the
9454 interface.
9455 (yyresolveAction): If resolving any of the RHS states fails, destroy
9456 them all rather than leaking them. Thus, as long as user actions are
9457 written to clean up the RHS correctly, yyresolveAction always cleans up
9458 the RHS of a semantic option. Document the interface.
9459
9460 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
9461
9462 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
9463 led to a segmentation fault in GNU Pascal. Problem reported
9464 by Waldek Hebisch.
9465
9466 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
9467
9468 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
9469 mid-rule action inside a nonterminal symbol in order to declare a
9470 destructor for its semantic value.
9471
9472 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
9473
9474 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
9475 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
9476 __cplusplus && ! defined _STDLIB_H && !
9477 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
9478 defined free))]: Include <stdlib.h> rather than rolling our own
9479 declarations of malloc and free, to avoid problems with
9480 incompatible declarations (using 'throw') C++'s stdlib.h. This
9481 should fix Debian bug 340012
9482 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
9483 reported by Guillaume Melquiond.
9484
9485 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9486
9487 * NEWS: Clarify symbols versus types in unused-value warnings.
9488
9489 * configure.ac (AC_INIT): Bump version number.
9490
9491 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9492
9493 * NEWS: Version 2.1a.
9494 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
9495 since C99 requires this.
9496
9497 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
9498
9499 * m4/c-working.m4: New file.
9500 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
9501
9502 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
9503
9504 * Makefile.maint: Merge from coreutils.
9505
9506 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
9507
9508 More portability fixes for problems summarized by Nelson H. F. Beebe.
9509
9510 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
9511 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
9512 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
9513 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
9514 messes up because C++ code is compiled in 32-bit mode but linked
9515 in 64-bit mode.
9516
9517 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
9518
9519 More portability fixes for problems summarized by Nelson H. F. Beebe.
9520
9521 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
9522 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
9523
9524 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
9525 nodist_PROGRAMS, since we don't need to actually compile the
9526 example if we're just doing a plain 'make'. This avoids bothering
9527 the installer unnecessarily about problems due to weird C++
9528 compilers.
9529
9530 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
9531
9532 More portability fixes for problems summarized by Nelson H. F. Beebe.
9533
9534 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
9535 than #include "...", and compile with -I'.'. The old method was
9536 not portable, according to Posix and the C standard, and it does
9537 not work with Sun C 5.7, where previous #line directives affect
9538 the working directory used in later #include "..." directives.
9539
9540 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9541
9542 Various DJGGP specific issues in /djgpp
9543
9544 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
9545
9546 More portability fixes for problems summarized by Nelson H. F. Beebe.
9547
9548 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
9549 '#include <map>' works and that you can apply ++ to iterators.
9550
9551 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
9552
9553 Work around portability problems summarized by Nelson H. F. Beebe in
9554 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
9555
9556 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9557 that '#include <string>' works.
9558
9559 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
9560 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
9561 "warning: sorry: semantics of inline function static data `const
9562 unsigned char translate_table[262]' are wrong (you'll wind up with
9563 multiple copies)".
9564
9565 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
9566 or, xor to not_, and_, or_, and xor_, respectively. This works
9567 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
9568 random system header somewhere that includes the equivalent of
9569 <iso646.h>.
9570
9571 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
9572 -E" works; it apparently doesn't work with PathScale EKO Compiler
9573 Suite Version 2.0.
9574
9575 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
9576
9577 During deterministic GLR operation, user actions should be able to
9578 influence the parse by changing yychar. To make this easier to fix and
9579 to make glr.c easier to evolve in general, don't maintain yytoken in
9580 parallel with yychar; just compute yytoken when needed.
9581 * tests/glr-regression.at (Incorrect lookahead during deterministic
9582 GLR): Check that setting yychar in a user action has the intended
9583 effect.
9584 * data/glr.c (yyGLRStack): Remove yytokenp member.
9585 (yyclearin): Don't set *yytokenp.
9586 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
9587 yychar rather than *yytokenp to determine the current lookahead.
9588 Compute yytoken locally when needed.
9589 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
9590 point to.
9591
9592 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
9593 after `--report' documentation.
9594
9595 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
9596
9597 * src/parse-gram.y (grammar_declaration): Location of printer
9598 symbol is @1, not list->location. Bug reported by twlevo.
9599 * tests/input.at (Incompatible Aliases): Adjust to above change.
9600
9601 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
9602
9603 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
9604 all the test at once. This makes the output easier to read in the
9605 normal case.
9606
9607 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
9608 got from <http://bro-ids.org/download.html>. The bug is that
9609 when two actions appeared in succession, the second one was
9610 scanned before the first one was added to the grammar rule
9611 as a midrule action. Bison then output the incorrect warning
9612 "parse.y:905.17-906.36: warning: unused value: $3".
9613 * src/parse-gram.y (BRACED_CODE, action): These are no longer
9614 associated with a value.
9615 (rhs): Don't invoke grammar_current_rule_action_append.
9616 (action): Invoke it here instead.
9617 * src/reader.c (grammar_midrule_action): Now extern.
9618 (grammar_current_rule_action_append): Don't invoke
9619 grammar_midrule_action; that is now the scanner's job.
9620 * src/reader.h (last_string, last_braced_code_loc):
9621 (grammar_midrule_action): New decls.
9622 * src/scan-gram.l (last_string): Now extern, sigh.
9623 (last_braced_code_loc): New extern variable.
9624 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
9625 rule already has an action.
9626 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
9627 * tests/input.at (AT_CHECK_UNUSED_VALUES):
9628 Add some tests to check that the above changes fixed the bug.
9629
9630 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
9631
9632 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
9633 All used changed. Check whether the symbol has a destructor,
9634 not whether it is typed.
9635 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
9636 that the values are still reported as unused. All line numbers
9637 adjusted.
9638
9639 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
9640
9641 Work around a bug in bro 0.8, which underparenthesizes its
9642 definition of YYLLOC_DEFAULT.
9643 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
9644 their arguments.
9645 * data/lalr1.cc: Likewise.
9646 * data/yacc.cc: Likewise.
9647
9648 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
9649
9650 Work around a bug in Pike 7.0, and give the Pike folks a
9651 better way to override the usual int widths.
9652 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
9653 user can override the types.
9654 (short): #undef, to work around a bug in Pike 7.0.
9655 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
9656 (union yyalloc.yyss): Use yytype_int16 rather than short.
9657 All uses changed.
9658 (yysigned_char): Remove.
9659 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
9660 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
9661 * tests/regression.at (Web2c Actions): Adjust to above changes.
9662
9663 * src/reader.c (check_and_convert_grammar): New function.
9664 (reader): Close the input file even if something went wrong during
9665 parsing. Minor file descriptor leak reported by twlevo.
9666
9667 * src/assoc.c (assoc_to_string): Use a default: abort (); case
9668 to pacify gcc -Wswitch-default.
9669 * src/scan-gram.l (adjust_location): Use a default: break; case
9670 to pacify gcc -Wswitch-default.
9671 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
9672 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9673 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9674 Move these decls to scan-skel.l, since they don't need to be
9675 visible elsewhere.
9676 * src/scan-skel.l: Accept the above decls.
9677 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
9678 is used.
9679
9680 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
9681
9682 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
9683 since we don't want to insist on a version number at the start
9684 of the changelog every time.
9685 * Makefile.maint: Sync from coreutils a bit better.
9686 (sc_trailing_blank): Renamed from sc_trailing_space.
9687 All uses changed.
9688 (sc_no_if_have_config_h, sc_require_config_h):
9689 (sc_prohibit_assert_without_use): New rules.
9690 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
9691 (sc_dd_max_sym_length): Fix leading spaces in rule.
9692 (sc_system_h_headers): Prefix with @.
9693 (sc_useless_cpp_parens, m4-check): Output line numbers.
9694 (changelog-check): Allow version only in head.
9695 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
9696 satisfy new Makefile.maint rule.
9697 * data/glr.c: Likewise.
9698 * data/glr.cc: Likewise.
9699 * data/lalr1.cc: Likewise.
9700 * data/yacc.c: Likewise.
9701 * lib/ebitsetv.c: Likewise.
9702 * lib/lbitset.c: Likewise.
9703 * lib/subpipe.c: Likewise.
9704 * lib/timevar.c: Likewise.
9705 * src/system.h: Likewise.
9706 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
9707 * djgpp/Makefile.maint: Add copyright notice.
9708 * djgpp/README.in: Likewise.
9709 * djgpp/config.bat: Likewise.
9710 * djgpp/config.site: Likewise.
9711 * djgpp/config_h.sed: Likewise.
9712 * djgpp/djunpack.bat: Likewise.
9713 * djgpp/config.sed: Fix copyright notice to match standard format.
9714 * djgpp/subpipe.h: Likewise.
9715 * lib/bitsetv-print.c: Likewise.
9716 * lib/bitsetv.c: Likewise.
9717 * lib/subpipe.h: Likewise.
9718 * lib/timevar.c: Likewise.
9719 * lib/timevar.h: Likewise.
9720 * djgpp/subpipe.c: Use standard recipe for config.h.
9721 * lib/abitset.c: Likewise.
9722 * lib/bitset.c: Likewise.
9723 * lib/bitset_stats.c: Likewise.
9724 * lib/bitsetv-print.c: Likewise.
9725 * lib/bitsetv.c: Likewise.
9726 * lib/ebitsetv.c: Likewise.
9727 * lib/get-errno.c: Likewise.
9728 * lib/lbitset.c: Likewise.
9729 * lib/subpipe.c: Likewise.
9730 * lib/timevar.c: Likewise.
9731 * lib/vbitset.c: Likewise.
9732 * tests/local.at: Likewise.
9733 * src/scan-gram.l: Don't include verify.h, since system.h does
9734 that for us.
9735 * .x-sc_require_config_h: New file.
9736 * .x-sc_unmarked_diagnostics: New file.
9737
9738 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
9739
9740 Be a bit more systematic about using 'abort'.
9741 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
9742 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
9743 Put 'default: abort ();' before some other case, to satisfy older
9744 pedantic compilers.
9745 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9746 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
9747 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
9748 * src/conflicts.c (resolve_sr_conflict): Likewise.
9749 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
9750 (get_decision_str, get_orientation_str, get_node_alignment_str):
9751 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
9752 (get_linestyle_str, get_arrowstyle_str): Likewise.
9753 * src/conflicts.c (resolve_sr_conflict):
9754 Use a default case rather than one for the one remaining enum
9755 value, to catch invalid enum values as well.
9756 * src/lalr.c (set_goto_map, map_goto):
9757 Prefer "assert (FOO);" to "if (!FOO) abort ();".
9758 * src/nullable.c (nullable_compute, token_definitions_output):
9759 Likewise.
9760 * src/reader.c (packgram, reader): Likewise.
9761 * src/state.c (transitions_to, state_new, state_reduction_find):
9762 Likewise.
9763 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
9764 (symbol_pack): Likewise.
9765 * src/tables.c (conflict_row, pack_vector): Likewise.
9766 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
9767 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
9768 * src/system.h: Don't include <assert.h>.
9769 (assert): New macro.
9770
9771 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
9772 (Destructor Decl, Parser Function, Pure Calling):
9773 Describe rules for braces inside C code more carefully.
9774
9775 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
9776
9777 Fix some porting glitches found by Nelson H. F. Beebe.
9778 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
9779 compilers that don't understand that abort () does not return.
9780 * src/state.c (transitions_to): Likewise.
9781 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9782 that '#include <cstdlib>' works.
9783 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
9784 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
9785 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
9786 for the benefit of some pre-C99 compilers.
9787
9788 * bootstrap: Undo changes to gnulib files that autoreconf made.
9789
9790 Minor fixups to get 'make maintainer-check' to work.
9791 * configure.ac: Don't use -Wnested-externs, as it's incompatible
9792 with the new verify.h implementation.
9793 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
9794 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
9795 * data/yacc.c (YYUSE): Likewise.
9796 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
9797 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
9798 * src/parse-gram.y (declaration): Don't pass a string constant
9799 to a function that expects char *, since GCC might complain
9800 about the constant value.
9801 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
9802 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
9803 before #defining them.
9804 * tests/glr-regression.at
9805 (Incorrectly initialized location for empty right-hand side in GLR):
9806 In yyerror, use the msg arg.
9807 (Corrupted semantic options if user action cuts parse):
9808 (Incorrect lookahead during deterministic GLR):
9809 (Incorrect lookahead during nondeterministic GLR):
9810 Don't name a local var 'index'; it shadows string.h's 'index'.
9811
9812 2006-01-19 Akim Demaille <akim@epita.fr>
9813
9814 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
9815 location, not just parts of it.
9816
9817 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
9818
9819 * NEWS: Document the fact that multiple %unions are now allowed.
9820 * doc/bison.texinfo (Union Decl): Likewise.
9821 * TODO: This feature is now implemented, so remove it from
9822 the wishlist.
9823
9824 * Makefile.maint: Merge with coreutils Makefile.maint.
9825 (CVS_LIST): Use build-aux version if available.
9826 (VERSION_REGEXP): New macro.
9827 (syntax-check-rules): Add sc_no_if_have_config_h,
9828 sc_prohibit_assert_without_use, sc_require_config_h,
9829 sc_useless_cpp_parens.
9830 (sc_obsolete_symbols): Check for O_NDELAY.
9831 (sc_dd_max_sym_length): Track coreutils.
9832 (sc_unmarked_diagnostics): Look in all files, not just *.c.
9833 (sc_useless_cpp_parens): New rule.
9834 (news-date-check): Look for version or today's date.
9835 (changelog-check): Don't require version number near head.
9836 (copyright-check): Use current year instead of hardwiring 2005.
9837 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
9838 (announcement): Add --gpg-key-ID.
9839
9840 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
9841 with "file system".
9842
9843 Avoid undefined behavior that addressed just before the start of an
9844 array. Problem reported by twlevo.
9845 * src/reader.c (packgram): Prepend a new sentinel before ritem.
9846 * src/lalr.c (build_relations): Rely on new sentinel.
9847 * src/gram.c (gram_free): Adjust to new sentinel.
9848
9849 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9850
9851 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9852 yylookaheadNeeds. All uses updated.
9853 (yysplitStack): Rename local yynewLookaheadStatuses to
9854 yynewLookaheadNeeds.
9855 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9856 GLR): In comments, change `lookahead status' to `lookahead need'.
9857
9858 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9859
9860 * data/glr.c (yysplitStack): A little stylistic rewrite.
9861
9862 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9863
9864 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9865
9866 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9867
9868 * doc/bison.texinfo: Fix some typos.
9869 (GLR Semantic Actions): New subsection discussing special
9870 considerations because GLR semantic actions might be deferred.
9871 (Actions): Mention look-ahead usage of yylval.
9872 (Actions and Locations): Mention look-ahead usage of yylloc.
9873 (Special Features for Use in Actions): Add YYEOF entry and mention it
9874 in the yychar entry.
9875 In the yychar entry, remove mention of the local yychar case (pure
9876 parser) since this is irrelevant information when writing semantic
9877 actions and since it's already discussed in `Table of Symbols' where
9878 yychar is otherwise described as an external variable.
9879 In the yychar entry, don't call it the `current' look-ahead since it
9880 isn't when semantic actions are deferred.
9881 In the yychar and yyclearin entries, add note about deferred semantic
9882 actions.
9883 Add yylloc and yylval entries discussing look-ahead usage.
9884 (Look-Ahead Tokens): When discussing yychar, don't call it the
9885 `current' look-ahead, and do mention yylval and yylloc.
9886 (Error Recovery): Cross-reference `Action Features' when mentioning
9887 yyclearin.
9888 (Table of Symbols): In the yychar entry, don't call it the `current'
9889 look-ahead.
9890 In the yylloc and yylval entries, mention look-ahead usage.
9891
9892 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9893
9894 * tests/glr-regression.at: Update copyright year to 2006.
9895
9896 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9897
9898 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9899 use during nondeterministic operation to track which stacks have
9900 actually needed the current lookahead.
9901 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9902 Allocate, deallocate, resize, and otherwise shuffle space for
9903 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9904 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9905 appropriately during nondeterministic operation.
9906 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9907 members to store the current lookahead to be used by the deferred
9908 user action.
9909 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9910 from which the RHS is taken. Set the lookahead members of the new
9911 yySemanticOption according to the lookahead status for stack yyk.
9912 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9913 yyaddDeferredAction.
9914 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9915 members of yySemanticOption before invoking yyuserAction, and then set
9916 them back to their current values afterward.
9917 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9918 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9919 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9920 titles for consistency.
9921 (Leaked merged semantic value if user action cuts parse): In order to
9922 suppress lint warnings, use arguments in merge function, and assign
9923 char value < 128 in main.
9924 (Incorrect lookahead during deterministic GLR): New test case.
9925 (Incorrect lookahead during nondeterministic GLR): New test case.
9926
9927 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9928
9929 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9930 !yyvaluep as signal that no semantic value is available to print.
9931 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9932 to print a semantic value.
9933
9934 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9935
9936 * tests/glr-regression.at: For consistency with my newer test cases,
9937 don't thank myself.
9938
9939 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9940
9941 * data/glr.c (yyresolveValue): When merging semantic options, if at
9942 least one user action succeeds but a later one cuts the parse, then
9943 destroy the semantic value before returning rather than leaking it.
9944 (yyresolveStates): If a user action cuts the parse and thus
9945 yyresolveValue fails, ignore the (unset) semantic value rather than
9946 corrupting the yyGLRState, and empty the semantic options list since
9947 the user actions should have called all necessary destructors.
9948 Simplify code with YYCHK.
9949 * tests/glr-regression.at (Corrupted semantic options if user action
9950 cuts parse): New test case.
9951 (Undesirable destructors if user action cuts parse): New test case.
9952 Before applying any of this patch, this test case never actually failed
9953 for me... but only because the corrupted semantic options usually
9954 masked this bug.
9955 (Leaked merged semantic value if user action cuts parse): New test
9956 case.
9957
9958 2006-01-05 Akim Demaille <akim@epita.fr>
9959
9960 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9961
9962 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9963
9964 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9965 _MSC_VER. Problem reported by Cenzato Marco.
9966 (b4_c_function_def): Use it.
9967 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9968 b4_c_modern.
9969 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9970 than rolling our own.
9971
9972 2006-01-04 Akim Demaille <akim@epita.fr>
9973
9974 Also warn about non-used mid-rule values.
9975 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9976 member.
9977 (symbol_list_new): Adjust.
9978 * src/reader.c (symbol_typed_p): New.
9979 (grammar_rule_check): Use it.
9980 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9981 Check its rule.
9982 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9983 Use it.
9984 * tests/actions.at (Exotic Dollars): Adjust.
9985
9986 2006-01-04 Akim Demaille <akim@epita.fr>
9987
9988 * src/reader.c (grammar_midrule_action): If $$ is set in a
9989 mid-rule, move the `used' bit to its lhs.
9990 * tests/input.at (Unused values): New.
9991 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9992
9993 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9994
9995 * doc/bison.texinfo (Bison Options): Say more accurately what
9996 --yacc does.
9997 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9998 about declarations in the grammar when in Yacc mode, as POSIX does
9999 not require a diagnostic when the grammar uses extensions.
10000
10001 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10002
10003 Warn about dubious constructions like "%token T T".
10004 Reported by twlevo.
10005 * src/symtab.h (struct symbol.declared): New member.
10006 * src/symtab.c (symbol_new): Initialize it to false.
10007 (symbol_class_set): New arg DECLARING, specifying whether
10008 this is a declaration that we want to warn about, if there
10009 is more than one of them. All uses changed.
10010
10011 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10012 Allow multiple %union directives, whose contents concatenate.
10013 * src/parse-gram.y (grammar_declaration): Likewise.
10014 Use muscle_code_grow, so that we don't need stype_line any more.
10015 All uses changed.
10016
10017 * src/muscle_tab.c (muscle_grow): Fix comment.
10018
10019 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10020 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10021 Update copyright year to 2006.
10022
10023 2006-01-03 Akim Demaille <akim@epita.fr>
10024
10025 Have glr.cc pass (some of) the calc.at tests.
10026 * data/glr.cc (b4_parse_param_orig): New.
10027 (b4_parse_param): Improve its definition, and bound it more
10028 clearly in the skeleton.
10029 (b4_epilogue): Append, instead of prepending, in order to keep
10030 #line consistency.
10031 Simplify the generation of auxiliary functions: locations and
10032 purity are mandated.
10033 (b4_global_tokens_and_yystype): Honor it.
10034 * data/location.cc (c++.m4): Don't include it.
10035 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10036 and AT_SKEL_CC_IF.
10037 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10038 AT_LALR1_CC_IF.
10039 Be sure to initialize the first position's filename.
10040 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10041 mandated anyway.
10042 (AT_CHECK_CALC_GLR_CC): New.
10043 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10044
10045 2006-01-02 Akim Demaille <akim@epita.fr>
10046
10047 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10048 c.m4.
10049 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
10050 * data/glr.cc: Do not include stack.hh.
10051
10052 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10053
10054 * data/glr.c: Reformat whitespace with tabs.
10055 (b4_lpure_formals): Remove this unused m4 macro.
10056 * tests/cxx-type.at: Reformat whitespace with tabs.
10057 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10058 since it's a member. Rename type to isNterm for clarity.
10059
10060 2005-12-29 Akim <akim@sulaco.local>
10061
10062 Let glr.cc catch up with symbol_value_print.
10063 * data/glr.cc (b4_yysymprint_generate): Replace by...
10064 (b4_yy_symbol_print_generate): this.
10065 (yy_symbol_print, yy_symbol_value_print): Declare them.
10066
10067 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10068
10069 * src/location.h (boundary): Note that a line or column equal
10070 to INT_MAX indicates an overflow.
10071 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10072 (rule_length_overflow, increment_rule_length, add_column_width):
10073 New functions.
10074 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10075 (<SC_BRACED_CODE>"}"):
10076 Use increment_rule_length rather than incrementing it by hand.
10077 (adjust_location, handle_syncline): Diagnose overflow.
10078 (handle_action_dollar, handle_action_at):
10079 Fix bug with monstrosities like $-2147483648.
10080 Remove now-unnecessary checks.
10081 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10082 (convert_ucn_to_byte): Verify assumptions.
10083 (handle_syncline): New arg LOC. All callers changed.
10084 Don't store through a value derived from char const * pointer.
10085
10086 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10087 GCC warnings.
10088
10089 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10090
10091 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10092 Remove unnecessary forward static decls.
10093
10094 2005-12-27 Akim Demaille <akim@epita.fr>
10095
10096 * src/reader.c (grammar_current_rule_check): Also check that $$
10097 is used.
10098 Take the rule to check as argument, hence rename as...
10099 (grammar_rule_check): this.
10100 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10101 Rename as...
10102 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10103 (grammar_midrule_action, grammar_symbol_append): Now static.
10104 * tests/torture.at (input): Don't rely on the default action
10105 being always performed.
10106 * tests/calc.at: "Set" $$ even when the action is "cut" with
10107 YYERROR or other.
10108 * tests/actions.at (Exotic Dollars): Instead of using unused
10109 values, check that the warning is issued.
10110
10111 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10112
10113 * NEWS: Improve wording for unused-value warnings.
10114
10115 2005-12-22 Akim Demaille <akim@epita.fr>
10116
10117 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10118 (b4_yysymprint_generate): Rename as...
10119 (b4_yy_symbol_print_generate): this.
10120 Generate yy_symbol_print instead of yysymprint.
10121 Generate also yy_symbol_value_print, and use it.
10122
10123 2005-12-22 Akim Demaille <akim@epita.fr>
10124
10125 * NEWS: Warn about unused values.
10126 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10127 a `used' member.
10128 (symbol_list_n_get, symbol_list_n_used_set): New.
10129 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10130 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10131 * src/reader.c (grammar_current_rule_check): Check that values are
10132 used.
10133 * src/symtab.c (symbol_print): Accept 0.
10134 * tests/existing.at: Remove the type information.
10135 Empty the actions.
10136 Remove useless actions (beware of mid-rule actions: perl -000
10137 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10138 * tests/actions.at (Exotic Dollars): Use unused values.
10139 * tests/calc.at: Likewise.
10140 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10141 Likewise.
10142
10143 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10144 rule_useful_p.
10145
10146 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10147
10148 Undo 2005-12-01 tentative license wording change. The wording is
10149 still being reviewed by the lawyers, and we don't want to wait for
10150 them before publishing a test release. For now, revert to the
10151 previous wording.
10152 * NEWS: Undo 2005-12-01 change.
10153 * data/glr.c: Revert to previous license wording.
10154 * data/glr.cc: Likewise.
10155 * data/lalr1.cc: Likewise.
10156 * data/location.cc: Likewise.
10157 * data/yacc.c: Likewise.
10158
10159 * NEWS: Reword %destructor vs YYABORT etc.
10160 * data/glr.c: Use American spacing, for consistency.
10161 * data/glr.cc: Likewise.
10162 * data/lalr1.cc: Likewise.
10163 * data/yacc.c: Likewise.
10164 * data/yacc.c: Reformat comments slightly.
10165 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10166 for consistency. Fix some spelling errors and reword recently-included
10167 text slightly.
10168 * tests/cxx-type.at: Cast results of malloc, for C++.
10169
10170 2005-12-21 Joel E. Denny <address@hidden>
10171
10172 * tests/cxx-type.at: Construct a tree, count the parents of shared
10173 nodes, and free each node once and only once. Previously, the memory
10174 for semantic values was leaked instead.
10175
10176 2005-12-21 Joel E. Denny <address@hidden>
10177
10178 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10179 (yylval, yylloc): If pure, #define to yystackp->yyval and
10180 yystackp->yyloc similar to yychar and yynerrs.
10181 (yyparse): If pure, remove local yylval and yylloc. Add local
10182 yystackp to accommodate pure definitions of yylval and yylloc.
10183 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10184 yylvalp and yyllocp to &yylval and &yylloc.
10185 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10186 namespace. Previously, nerrs and char were missing, but lval and lloc
10187 weren't necessary.
10188 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10189 yylvalp and yyllocp parameters since, if pure, these are now always
10190 accessible through yystackp. If not pure, they are still accessible
10191 globally.
10192 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10193 `if (YYID (N))' to pacify lint.
10194
10195 2005-12-21 Akim Demaille <akim@epita.fr>
10196
10197 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10198 destroy the RHS symbols of a rule.
10199 * data/yacc.c (yylen): Initialize to 0.
10200 Keep its value to the number of items to possibly shift.
10201 In particular, a regular successful parse that ends on YYFINAL by
10202 a (internal) YYACCEPT must not have yylen != 0.
10203 (yyerrorlab, yyreturn): Pop the RHS.
10204 Reorder a bit to emphasize the `shifting' bits of code.
10205 (YYPOPSTACK): Now accept a number of items to pop.
10206 * data/lalr1.cc: Likewise.
10207 * data/glr.c: Formatting changes.
10208 Use goto instead of fall through.
10209 * doc/bison.texinfo (Destructor Decl): Complete.
10210
10211 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10212
10213 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10214 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10215 * djgpp/config.bat: Replace every occurence of the file name
10216 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10217 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10218 * djgpp/config.sed: Replace every occurence of the file name
10219 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10220 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10221 * djgpp/djunpack.bat: DJGPP specific file.
10222 * djgpp/fnchange.lst: DJGPP specific file.
10223 * djgpp/README.in: Add new information about how to unpack the bison
10224 source on MSDOS and other systems which have 8.3 file name restrictions
10225 using djunpack.bat and fnchange.lst.
10226
10227 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10228
10229 * bootstrap (build_cvs_prefix): Remove; unused.
10230 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10231 when getting gnulib.
10232
10233 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10234
10235 * data/glr.c: Reorder typedef declarations for structs to match order
10236 of struct declarations.
10237 Rename yystack everywhere to yystackp except in yyparse where it's not
10238 a pointer.
10239 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10240 consistency.
10241 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10242 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10243 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10244 lint.
10245
10246 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10247
10248 * tests/sets.at (Accept): Fix typos in regular expression used to
10249 sed out the final state number.
10250
10251 Work around portability problem on Solaris 10: flex-generated
10252 files include <stdio.h> before <config.h>, which messes up
10253 because the latter defines __EXTENSIONS__. Address the problem
10254 by creating two new little files that include <config.h> first,
10255 then include the flex-generated files. Rewrite everyone else
10256 to include <config.h> first, as well.
10257 * lib/timevar.c: Always include "config.h".
10258 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10259 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10260 (EXTRA_bison_SOURCES): New macro.
10261 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10262 * src/system.h: Don't include config.h.
10263 * src/LR0.c: Include <config.h> first.
10264 * src/assoc.c: Likewise.
10265 * src/closure.c: Likewise.
10266 * src/complain.c: Likewise.
10267 * src/conflicts.c: Likewise.
10268 * src/derives.c: Likewise.
10269 * src/files.c: Likewise.
10270 * src/getargs.c: Likewise.
10271 * src/gram.c: Likewise.
10272 * src/lalr.c: Likewise.
10273 * src/location.c: Likewise.
10274 * src/main.c: Likewise.
10275 * src/muscle_tab.c: Likewise.
10276 * src/nullable.c: Likewise.
10277 * src/output.c: Likewise.
10278 * src/parse-gram.y: Likewise.
10279 * src/print.c: Likewise.
10280 * src/print_graph.c: Likewise.
10281 * src/reader.c: Likewise.
10282 * src/reduce.c: Likewise.
10283 * src/relation.c: Likewise.
10284 * src/state.c: Likewise.
10285 * src/symlist.c: Likewise.
10286 * src/symtab.c: Likewise.
10287 * src/tables.c: Likewise.
10288 * src/uniqstr.c: Likewise.
10289 * src/vcg.c: Likewise.
10290
10291 * src/parse-gram.y: Fix minor problems uncovered by lint.
10292 (current_lhs, current_lhs_location): Now static.
10293 (current_assoc): Remove unused variable.
10294
10295 Cleanups so that Bison-generated parsers have less lint.
10296 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10297 Prepend /*ARGSUSED*/, for lint's sake.
10298 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10299 definition if 'lint' is defined.
10300 (YYID): New macro (or function, if lint).
10301 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10302 * data/yacc.c: Likewise.
10303 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10304 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10305 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10306 is C++ only.
10307 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10308 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10309 Use YYID(0) rather than 0, for lint.
10310 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10311 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10312
10313 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10314
10315 * tests/glr-regression.at
10316 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10317 Close memory leak reported by twlevo.
10318
10319 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10320
10321 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10322 all stacks.
10323 (yyparse): Iterate another stack in order to call user destructors.
10324 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10325 New test case.
10326 (Duplicated user destructor for lookahead): This test now is expected
10327 to succeed.
10328
10329 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10330
10331 * NEWS: Document the following change.
10332 * data/yacc.c: Say "parser skeleton" rather than "file", since
10333 it's no longer just a file.
10334 * data/glr.c: Grant a special exception for C GLR parsers, that
10335 reads like the already-existing exception for C LALR(1) parsers.
10336 * data/glr.cc: Likewise.
10337 * data/lalr1.cc: Likewise.
10338 * data/location.cc: Likewise.
10339 * data/yacc.c: Reword the "written by" statement to clarify that
10340 it was the parser skeleton, not the entire output file.
10341 * data/glr.c: Written by Paul Hilfinger.
10342 * data/glr.cc: Written by Akim Demaille.
10343 * data/lalr1.cc: Likewise.
10344
10345 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10346
10347 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10348 Fix typos in previous change that broke 'make check'.
10349 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10350 supported in C.
10351 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10352 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10353 We can revert this once things settle down.
10354
10355 * src/conflicts.c (conflicts_print): Don't print file name twice
10356 when %expect fails because there were no conflicts.
10357 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10358 change.
10359 * tests/conflicts.at (%expect not enough, %expect too much):
10360 (%expect with reduce conflicts): Adjust to new behavior.
10361
10362 2005-11-18 Akim Demaille <akim@epita.fr>
10363
10364 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10365 errors.
10366 * NEWS: Document this.
10367 * doc/bison.texinfo (Expect Decl): Likewise.
10368
10369 2005-11-16 Akim Demaille <akim@epita.fr>
10370
10371 Generalize the display of semantic values and locations in traces.
10372 * data/glr.c (yy_reduce_print): Fix indices (again).
10373 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10374 literal integers.
10375 * data/lalr1.cc (yyreduce_print): Rename as...
10376 (yy_reduce_print): this.
10377 Display values and locations.
10378 * data/yacc.c (yy_reduce_print): Likewise.
10379 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10380 (yysymprint): Move higher to be visible from yy_reduce_print).
10381 (yyparse): Adjust.
10382 * tests/calc.at: Adjust the expected length of the traces.
10383
10384 2005-11-14 Akim Demaille <akim@epita.fr>
10385
10386 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
10387 from 1 to N, while values and location start at 0.
10388 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
10389
10390 2005-11-14 Akim Demaille <akim@epita.fr>
10391
10392 * data/glr.c (yy_reduce_print): Fix the $ number.
10393
10394 2005-11-14 Akim Demaille <akim@epita.fr>
10395
10396 "Use" parse parameters.
10397 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
10398 * data/glr.c, data/glr.cc: Use them.
10399 * data/glr.c (YYUSE): Have a C++ definition that supports
10400 non-pointer types.
10401
10402 2005-11-14 Akim Demaille <akim@epita.fr>
10403
10404 * data/glr.c (yyexpandGLRStack): Declare only if defined.
10405
10406 2005-11-14 Akim Demaille <akim@epita.fr>
10407
10408 * data/glr.cc: New.
10409 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
10410
10411 2005-11-12 Akim Demaille <akim@epita.fr>
10412
10413 Let position and location be PODs.
10414 * data/location.cc (position::initialize, location::initialize): New.
10415 (position::position, location::location): Define only if
10416 b4_location_constructors is defined.
10417 * data/lalr1.cc (b4_location_constructors): Define it for backward
10418 compatibility.
10419 * doc/bison.texinfo (Initial Action Decl): Use initialize.
10420
10421 2005-11-12 Akim Demaille <akim@epita.fr>
10422
10423 * data/lalr1.cc: Move the body of the ctor and dtor into the
10424 parser file (instead of the header).
10425 Wrap the implementations in a "namespace yy".
10426
10427 2005-11-12 Akim Demaille <akim@epita.fr>
10428
10429 Have glr.c include its header file when created.
10430 * data/glr.c (b4_shared_declarations): New.
10431 Output them verbatim in the parser if !%defines, otherwise
10432 output then in the header file, and include it instead.
10433
10434 2005-11-11 Akim Demaille <akim@epita.fr>
10435
10436 * data/glr.c: Comment changes.
10437
10438 2005-11-11 Akim Demaille <akim@epita.fr>
10439
10440 When yydebug, report semantic and location values for reductions.
10441 * data/glr.c (yy_reduce_print): Report the semantic values and the
10442 locations.
10443 (YY_REDUCE_PRINT): Adjust.
10444 (yyglrReduce): Use them.
10445 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
10446 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
10447 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
10448 traces.
10449
10450 2005-11-10 Akim Demaille <akim@epita.fr>
10451
10452 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
10453 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
10454 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
10455
10456 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
10457
10458 * m4/cxx.m4, examples/Makefile.am: Don't build
10459 examples/calc++ if no C++ compiler is available. (trivial change)
10460
10461 2005-11-09 Akim Demaille <akim@epita.fr>
10462
10463 * src/scan-skel.l: Use a couple of asserts.
10464
10465 2005-11-03 Akim Demaille <akim@epita.fr>
10466
10467 In some (weird) cases, the final state number is incorrect.
10468 Reported by Alexandre Duret-Lutz.
10469 * src/LR0.c (state_list_append): Remove the computation of
10470 final_state.
10471 (save_reductions): Do it here.
10472 (get_state): Alpha conversion.
10473 (generate_states): Use a for loop.
10474 * src/gram.h (item_number_is_rule_number)
10475 (item_number_is_symbol_number): New.
10476 * src/state.c: Use assert.
10477 * src/system.h: Include assert.h.
10478 * tests/sets.at (Accept): New.
10479
10480 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10481
10482 * data/glr.c (yyfill): Adjust comment.
10483 (yyresolveAction): Initialize default location properly
10484 for empty right-hand sides.
10485 (yydoAction): Ditto.
10486 Add comment explaining apparently dead code.
10487 * tests/glr-regression.at
10488 (Incorrectly initialized location for empty right-hand side in GLR):
10489 New test.
10490
10491 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
10492
10493 * bootstrap (cleanup_gnulib): New function. Use it to clean up
10494 gnulib when interrupted. This fixes some race conditions and
10495 works around some portability problems (one noted by Paul
10496 Hilfinger).
10497
10498 2005-10-22 Akim <akim@epita.fr>
10499
10500 * Makefile.cfg: Adjust to config -> build-aux.
10501 Reported by twledo.
10502
10503 2005-10-21 Akim Demaille <akim@epita.fr>
10504
10505 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
10506 the %parse-params.
10507 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
10508 * data/yacc.c (b4_Pure_if): Rename as...
10509 (b4_yacc_pure_if): this.
10510 (YY_SYMBOL_PRINT, yyparse): Adjust.
10511 * doc/bison.texinfo: Formatting changes.
10512
10513 2005-10-21 Akim Demaille <akim@epita.fr>
10514
10515 Finish the transition config -> build-aux.
10516 * configure.ac, Makefile.am: Use build-aux.
10517 * config/prev-version, config/announce-gen, config/Makefile.am:
10518 Move to...
10519 * build-aux/prev-version, build-aux/announce-gen,
10520 * build-aux/Makefile.am: here.
10521
10522 2005-10-14 Akim Demaille <akim@epita.fr>
10523
10524 * examples/calc++/test: Use set -x only when VERBOSE.
10525
10526 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
10527
10528 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
10529 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
10530
10531 2005-10-13 Akim Demaille <akim@epita.fr>
10532
10533 * src/scan-skel.l: Output the base name parts of the parser and
10534 header file names.
10535 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
10536 additional checks.
10537 Use this to exercise C++ outputs in subdirs.
10538 Reported by Oleg Smolsky.
10539
10540 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
10541
10542 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
10543 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
10544 Problem reported by John P. Hartmann.
10545 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
10546 already defined it.
10547
10548 2005-10-12 Akim Demaille <akim@epita.fr>
10549
10550 * src/parse-gram.y (version_check): Exit 63 to please missing
10551 (stands for "version mismatch).
10552 * tests/input.at, doc/bison.texinfo: Adjust.
10553
10554 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
10555
10556 Work around portability problems with Visual Age C compiler
10557 (xlc and xlC_r) reported by John P. Hartmann.
10558 * data/location.cc (initial_column, initial_line): Remove.
10559 All uses replaced by 0 and 1.
10560 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
10561 that xlc complains about.
10562 * src/scan-skel.l (skel_wrap): Likewise.
10563 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
10564 as __STDC__.
10565 * data/yacc.c (YYMODERN_C): New macro, which also looks at
10566 __STDC_VERSION__. Use it everywhere instead of looking at
10567 __STDC__ and __cplusplus.
10568
10569 2005-10-10 Akim Demaille <akim@epita.fr>
10570
10571 * examples/calc++/test: Be quiet unless VERBOSE.
10572
10573 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
10574
10575 * data/c.m4 (yydestruct, yysymprint):
10576 Use YYUSE instead of casting to void.
10577 * data/glr.c (YYUSE): New macro.
10578 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10579 Use it instead of rolling our own.
10580 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10581 (YYCHK1):
10582 Use /*CONSTCOND*/ to suppress lint warnings.
10583 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10584 (YY_STACK_PRINT): Use 'false' not '0'.
10585 (YYUSE): New macro.
10586 (yysymprint_, yydestruct_): Use it instead of rolling our own.
10587 * data/yacc.c (YYUSE): New macro.
10588 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
10589 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
10590 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
10591
10592
10593 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
10594 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
10595
10596 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
10597
10598 Undo the parts of the unlocked-I/O change that substituted
10599 putc or puts for printf. This might hurt performance a bit,
10600 but some people prefer the printf style.
10601 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
10602 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
10603 All uses replaced by YYFPRINTF and YYDPRINTF.
10604 * data/yacc.c: Likewise.
10605 * lib/bitset.c (bitset_print): Likewise.
10606 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
10607 putc and puts.
10608 * lib/lbitset.c (debug_lbitset): Likewise.
10609 * src/closure.c (print_firsts, print_fderives): Likewise.
10610 * src/gram.c (grammar_dump): Likewise.
10611 * src/lalr.c (look_ahead_tokens_print): Likewise.
10612 * src/output.c (escaped_output): Likewise.
10613 (user_actions_output): Break apart two printfs.
10614 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
10615 * src/reduce.c (reduce_print): Likewise.
10616 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10617 * src/system.h: Include unlocked-io.h rathe than stdio.h.
10618
10619 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10620 Use assignments rather than casts-to-void to suppress
10621 unused-variable warnings. This pacifies 'lint'.
10622 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
10623 unused-variable warnings.
10624
10625 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10626
10627 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10628
10629 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
10630
10631 Use unlocked I/O for a minor performance improvement on hosts like
10632 GNU/Linux and Solaris that support unlocked I/O. The basic idea
10633 is to use the gnlib unlocked-io module, and to prefer putc and
10634 puts to printf when either will work (since the latter doesn't
10635 come in an unlocked flavor).
10636 * bootstrap (gnulib_modules): Add unlocked-io.
10637 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
10638 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
10639 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
10640 and similarly for puts and putc and printf.
10641 * data/yacc.c: Likewise.
10642 * lib/bitset.c (bitset_print): Likewise.
10643 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
10644 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
10645 to printf.
10646 * lib/lbitset.c (debug_lbitset): Likewise.
10647 * src/closure.c (print_firsts, print_fderives): Likewise.
10648 * src/gram.c (grammar_dump): Likewise.
10649 * src/lalr.c (look_ahead_tokens_print): Likewise.
10650 * src/output.c (escaped_output): Likewise.
10651 (user_actions_output): Coalesce two printfs.
10652 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
10653 * src/reduce.c (reduce_print): Likewise.
10654 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10655 * src/system.h: Include unlocked-io.h rather than stdio.h.
10656
10657 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
10658 this confuses xgettext.
10659
10660 2005-10-02 Akim Demaille <akim@epita.fr>
10661
10662 * bootstrap (gnulib_modules): Add strverscmp.
10663 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
10664 * m4/.cvsignore: Add strverscmp.m4.
10665 * src/parse-gram.y (%require): New token, new rule.
10666 (version_check): New.
10667 * src/scan-gram.l (%require): Adjust.
10668 * tests/input.at (AT_REQUIRE): New.
10669 Use it.
10670 * doc/bison.texinfo (Require Decl): New.
10671 (Calc++ Parser): Use %require.
10672
10673 2005-10-02 Akim Demaille <akim@epita.fr>
10674
10675 * data/location.cc: New.
10676
10677 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
10678 Akim Demaille <akim@epita.fr>
10679
10680 Make sure -odir/foo.cc creates dir/location.hh etc.
10681 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
10682 (spec_file_prefix, spec_verbose_file, spec_graph_file)
10683 (spec_defines_file): Now const.
10684 (dir_prefix): New.
10685 (short_base_name): Remove.
10686 * src/files.c: Adjust.
10687 (dirname.h): Include.
10688 (base_name): Don't prototype it.
10689 (finput): Remove, duplicates gram_in.
10690 (full_base_name, short_base_name): Replace by...
10691 (all_but_ext, all_but_tab_ext): these.
10692 (compute_base_names): Rename as...
10693 (compute_file_name_parts): this.
10694 Update to compute the new variables, including dir_prefix.
10695 Adjust dependencies.
10696 * src/output.c (prepare): Output them.
10697 * src/reader.c: Adjust to use gram_in, not finput.
10698 * src/scan-skel.l (@dir_prefix@): New.
10699
10700 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10701
10702 * lib/subpipe.c: New function end_of_output_subpipe() added
10703 to allow support for non-posix systems. This is a no-op function
10704 for posix systems.
10705
10706 * lib/subpipe.h: New function end_of_output_subpipe() added
10707 to allow support for non-posix systems. This is a no-op function
10708 for posix systems.
10709
10710 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
10711 handle the lack of pipe/fork functionality on non-posix systems.
10712
10713 * djgpp/Makefile.maint: DJGPP specific file.
10714
10715 * djgpp/README.in: DJGPP specific file.
10716
10717 * djgpp/config.bat: DJGPP specific configuration file.
10718
10719 * djgpp/config.sed: DJGPP specific configuration file.
10720
10721 * djgpp/config.site: DJGPP specific configuration file.
10722
10723 * djgpp/config_h.sed: DJGPP specific configuration file.
10724
10725 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
10726
10727 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
10728
10729 2005-10-02 Akim Demaille <akim@epita.fr>
10730
10731 * data/location.cc: New, extract from...
10732 * data/lalr1.cc: here.
10733 (location.hh): Include it after the user prologue, in case the
10734 filename type is defined by the user.
10735 Forward declation location and position before the pre-prologue.
10736 (yyresult_): Rename as...
10737 (yyresult): this, it's a local variable, not an attribute.
10738 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
10739
10740 2005-10-01 Akim Demaille <akim@epita.fr>
10741
10742 * examples/extexi: Restore the #line generation.
10743
10744 2005-09-30 Akim Demaille <akim@epita.fr>,
10745 Alexandre Duret-Lutz <adl@gnu.org>
10746
10747 Move the token type and YYSTYPE in the parser class.
10748 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
10749 (parser::token): New, from the moved free definition of tokens.
10750 (parser::semantic_value): Now a full definition instead of an
10751 indirection to YYSTYPE.
10752 (b4_post_prologue): No longer included in the header file, but
10753 in the implementation file.
10754 * doc/bison.texi (C+ Language Interface): Update.
10755 * src/parse-gram.y: Support unary %define.
10756 * tests/actions.at: Define global_tokens_and_yystype for backward
10757 compatibility until we update the tests.
10758 * tests/calc.at: Idem.
10759 (first_line, first_column, last_line, last_column): Define for lalr1.cc
10760 to simplify the code.
10761
10762 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
10763
10764 Port to SunOS 4.1.4, which lacks strtoul and strerror.
10765 Ah, the good old days! Problem reported by Peter Klein.
10766 * bootstrap (gnulib_modules): Add strerror, strtoul.
10767 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
10768 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
10769
10770 2005-09-29 Akim Demaille <akim@epita.fr>
10771
10772 * data/c.m4 (b4_error_verbose_if): New.
10773 * data/lalr1.cc: Use it.
10774 (YYERROR_VERBOSE_IF): Remove.
10775 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
10776 parser members, replaced by...
10777 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
10778 local variables.
10779 (yysyntax_error_): Takes the state number as argument.
10780 (yyreduce_print_): Use the argument yyrule, not the former
10781 attribute yyn_.
10782
10783 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
10784
10785 * bootstrap (gnulib_modules): Add verify.
10786 * lib/.cvsignore: Add verify.h.
10787 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
10788 * src/system.h (verify): Remove.
10789 Include verify.h instead.
10790 * src/tables.c (tables_generate): Use new API for 'verify'.
10791
10792 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
10793
10794 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
10795 local variables whose names begin with 'yy'.
10796 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10797 Trivial changes from Joel E. Denny.
10798
10799 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
10800 it itself.
10801 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
10802 don't use alloca any more.
10803
10804 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
10805 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
10806 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
10807 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
10808 to match yacc.c, to test more hosts.
10809
10810 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
10811
10812 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
10813 doesn't affect behavior.
10814 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
10815 Solaris, AIX, MSC.
10816 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
10817 This works a bit better with glibc, if user code has already included
10818 stdlib.h.
10819 * doc/bison.texinfo (Bison Parser): Document that users can't
10820 arbitrarily use malloc and free for other purposes. Document
10821 that <alloca.h> and <malloc.h> might be included.
10822 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
10823 user must declare alloca.
10824
10825 * HACKING (release): Forwarn the Translation Project about
10826 stable releses.
10827
10828 2005-09-20 Akim Demaille <akim@epita.fr>
10829
10830 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
10831
10832 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
10833
10834 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
10835 (YYSTACK_ALLOC_MAXIMUM): Use it.
10836 (yysyntax_error): New function.
10837 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
10838 multiple syntax errors are reported, and alloca is being used.
10839 Instead, reallocate buffers twice as big each time, so that
10840 we waste at most half the allocated memory. Start with a small
10841 (128-byte) buffer that will suffice in most cases anyway.
10842 Use yysyntax_error to do most of the work.
10843
10844 * doc/bison.texinfo (Error Reporting, Table of Symbols):
10845 yynerrs is the number of errors reported, not the number of
10846 errors encountered.
10847
10848 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10849 Mark it as expected to fail.
10850 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10851 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10852 Don't start user-code symbols with "yy", to avoid name space problems.
10853
10854 2005-09-19 Akim Demaille <akim@epita.fr>
10855
10856 Remove the traits, failed experiment.
10857 It never proved useful, and anyway because of the current
10858 definition, it was not possible to have several specialization of
10859 this traits, making it useless.
10860 * data/lalr1.cc (yy:traits): Remove.
10861 Inline its definitions in the parser class.
10862
10863 2005-09-19 Akim Demaille <akim@epita.fr>
10864
10865 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10866 least Mac OSX with a /usr/local install of gettext.
10867
10868 2005-09-19 Akim Demaille <akim@epita.fr>
10869
10870 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10871 and yytoken for similarity with the other skeletons.
10872
10873 2005-09-19 Akim Demaille <akim@epita.fr>
10874
10875 * NEWS, configure.ac: update version number to 2.1a.
10876
10877 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10878
10879 * NEWS: Version 2.1.
10880
10881 * NEWS: Remove notice of yytname change, since it was never in an
10882 official release.
10883 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10884 diagnostic.
10885 * src/output.c (prepare): Likewise.
10886 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10887 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10888 is not defined. This is an awful hack, but it's enough for now.
10889 All callers changed.
10890 * tests/glr-regression-at (make_value): Args are const pointers now,
10891 to avoid GCC warning.
10892 (Duplicated user destructor for lookahead): New test. Currently
10893 skipped. It fails on my host but I'm not sure it'll always fail.
10894
10895 2005-09-16 Akim Demaille <akim@epita.fr>
10896
10897 * src/symtab.h (struct symbol): Declare the printer and destructor
10898 as const, to avoid accidental calls to free.
10899 (symbol_destructor_set, symbol_printer_set): Adjust.
10900 * src/symtab.c: Adjust.
10901
10902 2005-09-16 Akim Demaille <akim@epita.fr>
10903
10904 * data/c.m4 (b4_token_enums): New.
10905 (b4_token_defines): Rename as...
10906 (b4_token_enums_defines): this.
10907 (b4_token_defines): New, output only the #defines.
10908 * data/yacc.c, data/glr.c: Adjust.
10909 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10910 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10911 as default values.
10912
10913 2005-09-16 Akim Demaille <akim@epita.fr>
10914
10915 * data/lalr1.cc (yylex_): Remove, inline its code.
10916 (yyreport_syntax_error_): Remove, replaced by...
10917 (yysyntax_error_): this which returns a string and leaves to the
10918 caller the call to the users' error function.
10919 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10920 Move from members of the parser object...
10921 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10922 to local variables of the parse function.
10923
10924 2005-09-16 Akim Demaille <akim@epita.fr>
10925
10926 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10927 since it's in Bison's name space.
10928
10929 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10930
10931 * data/glr.c (yyresolveValue): Add default case to pacify
10932 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10933
10934 * NEWS: Document when yyparse started to return 2.
10935 * doc/bison.texinfo (Parser Function): Document when yyparse
10936 returns 2.
10937
10938 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10939 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10940 changed.
10941 (class position): file_name -> filename (reverting). All uses changed.
10942
10943 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10944
10945 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10946 do anything if $@ exists. This reverts part of the 2005-07-07
10947 patch.
10948
10949 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10950
10951 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10952 contains obsolete information and isn't worth distributing as a
10953 separate file anyway.
10954 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10955 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10956 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10957 (yyparse): Abort if user code uses longjmp to throw an unexpected
10958 value.
10959
10960 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10961
10962 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10963 Suggested by twlevo@xs4all.nl.
10964
10965 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10966 This avoids a diagnostic from gcc -Wswitch-enum.
10967 Problem reported by twlevo@xs4all.nl.
10968
10969 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10970 standards. Use "file name" or "file" or "name", depending on
10971 the context.
10972 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10973 not to hack/foo.tab.c.
10974 (Calc++ Top Level): 2nd arg of main is not const.
10975 * data/glr.c: b4_filename -> b4_file_name.
10976 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10977 All uses changed.
10978 (class position): filename -> file_name. All uses changed.
10979 * data/yacc.c: b4_filename -> b4_file_name.
10980 * lib/bitset.h: filename -> file_name in local vars.
10981 * lib/bitset_stats.c: Likewise.
10982 * src/files.c: Likewise.
10983 * src/scan-skel.l ("@output ".*\n): Likewise.
10984 * src/files.c (file_name_split): Renamed from filename_split.
10985 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10986
10987 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10988
10989 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10990 to accommodate latest gnulib.
10991
10992 * tests/glr-regression.at (Duplicate representation of merged trees):
10993 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10994
10995 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10996 needed.
10997
10998 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10999
11000 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11001 All uses changed. Invoke user destructor after an error during a
11002 split parse (trivial change from Joel E. Denny).
11003
11004 * tests/glr-regression.at
11005 (User destructor after an error during a split parse): New test case.
11006 Problem reported by Joel E. Denny in:
11007 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11008
11009 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11010
11011 * README-cvs: Give URLs for recommended tools.
11012 Mention Gzip version problem, and bootstrapping issues.
11013 Remove troubleshooting section, as it's somewhat obsolete.
11014
11015 * bootstrap (no_cache): New var, to accommodate different wget
11016 variants. Use it instead of '-C off'. Problem reported by
11017 twlevo@xs4all.nl.
11018
11019 * data/glr.c (yydestroyStackItem): New function.
11020 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11021 debugging information. Problem reported by Joel E. Denny.
11022
11023 2005-08-25 Akim Demaille <akim@epita.fr>
11024
11025 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11026
11027 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11028
11029 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11030 Don't invoke destructor on unresolved entries.
11031 * tests/glr-regression.at
11032 (User destructor for unresolved GLR semantic value): New test case.
11033 Problem reported by Joel E. Denny in:
11034 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11035
11036 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11037
11038 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11039 Add strnlen.c.
11040 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11041 lib-prefix.m4, po.m4.
11042
11043 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11044 in yydestruct diagnostic, since it might not be an error.
11045 Problem reported by Joel Denny near end of
11046 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11047 * data/lalr1.cc (yyerturn): Likewise.
11048 * data/yacc.c (yyreturn): Likewise.
11049 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11050
11051 * src/files.c: Remove obsolete FIXME comment.
11052
11053 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11054 with the other templates, and to fix bogus run-on messages such
11055 as the one reported at the end of
11056 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11057 All callers changed to avoid the newline.
11058 (yyprocessOneStack): Output two lines rather than one, to accommodate
11059 the above change. This changes the debug output format slightly.
11060
11061 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11062 reported by Joel E. Denny in
11063 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11064 (trivial change).
11065 * tests/glr-regression.at (Duplicate representation of merged trees):
11066 New test, from Joel E. Denny in:
11067 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11068 * THANKS: Add Joel E. Denny.
11069
11070 * configure.ac (AC_INIT): Bump to 2.0c.
11071
11072 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11073
11074 * NEWS: Version 2.0b.
11075
11076 * Makefile.am (SUBDIRS): Put examples before tests, so that
11077 "make check" doesn't finish with "All 1 tests passed".
11078
11079 * tests/regression.at (Token definitions): Don't rely on
11080 AT_PARSER_CHECK for data that contains backslashes. It currently
11081 uses 'echo', and 'echo' isn't portable if its argument contains
11082 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11083 that the byte '\0xff' is not printable in the C locale; it is,
11084 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11085 not printable, so use '\0x81' to test.
11086
11087 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11088 version of GCC, since the macro is used with non-GCC compilers.
11089
11090 Fix core dump reported by Pablo De Napoli in
11091 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11092 * tests/regression.at (Invalid inputs with {}): New test.
11093 * src/parse-gram.y (token_name): Translate type before using
11094 it as an index.
11095
11096 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11097 the user's name space. All uses changed to __attribute__
11098 ((__unused__)).
11099 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11100 Add __attribute__ ((__noreturn__)).
11101
11102 * etc/clcommit: Remove. We weren't using it, and it failed
11103 "make maintainer-distcheck".
11104 * Makefile.maint: Merge from coreutils.
11105 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11106 (syntax-check-rules): Change list of rules as described below.
11107 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11108 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11109 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11110 (sc_trailing_space): New rules.
11111 (sc_xalloc_h_in_src): Remove.
11112 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11113 (sc_space_tab, sc_error_exit_success, sc_changelog):
11114 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11115 (makefile-check, po-check, author_mark_check):
11116 (makefile_path_separator_check, copyright-check):
11117 Use grep -n, to make it easier to find violations.
11118 Use CVS_LIST and CVS_LIST_EXCEPT.
11119 (header_regexp, h_re): Remove.
11120 (dd_c): New macro.
11121 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11122 (my-distcheck): Use more-modern GCC flags.
11123 (signatures, %.asc): Remove.
11124 (rel-files, announcement): Remove signatures.
11125 Restore old updating code, even though we don't use it, so
11126 that we're the same as coreutils.
11127 (alpha, beta, major): Depend on news-date-check.
11128 Make the upload commands.
11129
11130 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11131 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11132 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11133 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11134 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11135 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11136 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11137 * tests/sets.at: Likewise.
11138
11139 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11140 we comment out the Autoconf version number.
11141 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11142 it's error-prone and "make maintainer-distcheck" rejects it.
11143
11144 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11145 Indent calls to "error" to pacify "make maintainer-distcheck",
11146 when the calls are not intended to be translated.
11147 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11148
11149 * src/Makefile.am (DEFS): Use +=, to pacify
11150 "make maintainer-distcheck".
11151 (bison_SOURCES): Add scan-skel.h.
11152 (sc_tight_scope): New rule, from coreutils.
11153
11154 * src/files.c (src_extension, header_extension):
11155 Now static, not extern.
11156 * src/getargs.c (short_options): Likewise.
11157 * src/muscle_tab.c (muscle_table): Likewise.
11158 * src/parse-gram.y (current_class, current_type, current_prec):
11159 Likewise.
11160 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11161 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11162 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11163 void, to avoid warning when NLS is disabled.
11164 * src/output.c: Include scan-skel.h.
11165 (scan_skel): Remove decl, since scan-skel.h does this.
11166 (output_skeleton):
11167 Indent calls to "error" to pacify "make maintainer-distcheck".
11168 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11169 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11170 "make maintainer-distcheck".
11171 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11172 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11173 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11174 (skel_lex_destroy, scan_skel): Move these decls to...
11175 * src/scan-skel.h: New file.
11176 * src/uniqstr.c (uniqstr_assert):
11177 Indent calls to "error" to pacify "make maintainer-distcheck".
11178
11179 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11180 not @VAR@.
11181
11182 * tests/torture.at: Revamp to avoid misuse of atoi that
11183 "make maintainer-distcheck" complained about.
11184
11185 * examples/extexi (message): Don't print a message more than once,
11186 and omit line-number decoration that makes Emacs compile think
11187 that informative messages are worth worrying about.
11188
11189 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11190
11191 * configure.ac: Update version number.
11192
11193 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11194 accidentally.
11195 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11196 autogenerated by the maintainer.
11197 * examples/calc++/.cvsignore: Add *.yy.
11198
11199 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11200 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11201 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11202
11203 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11204
11205 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11206 from maintainer-distcheck about casting the argument of 'free'.
11207
11208 * NEWS: Mention recent yytname changes.
11209 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11210
11211 * bootstrap: For translations that have not yet been upgraded to
11212 the new runtime-po domain, prime the pump by extracting the
11213 relevant strings from the obsolete translations. This code can be
11214 removed once the bison-runtime domain has been translated by each
11215 team.
11216
11217 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11218 now that token names are already quoted.
11219
11220 Fix problem reported by Anthony Heading.
11221 * data/glr.c (YYTOKEN_TABLE): New macro.
11222 (yytname): Define if YYTOKEN_TABLE.
11223 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11224 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11225 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11226 * src/output.c (prepare_symbols): Output token_table_flag.
11227
11228 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11229
11230 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11231 again if the first call fails.
11232
11233 * data/glr.c (yytnamerr): New function.
11234 (yyreportSyntaxError): Use it to dequote most string literals.
11235 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11236 with other skeletons. All uses changed.
11237 (yytnameerr_): New function.
11238 (yyreport_syntax_error): Use it to dequote most string literals.
11239 * data/yacc.c (yytnamerr): New function.
11240 (yyerrlab): Use it to decode most string literals.
11241 * doc/bison.texinfo (Decl Summary, Calling Convention):
11242 Clarify quoting convention of yytname.
11243 * src/output.c (prepare_symbols): Quote all names. This undoes
11244 the 2005-04-17 change, which is now accomplished (mostly) via
11245 changes in the parsers as described above.
11246 * tests/regression.at (Token definitions, Web2c Actions):
11247 Undo most 2005-04-17 change here, too.
11248
11249 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11250
11251 Fix more problems reported by twlevo@xs4all.nl.
11252 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11253 remove trailing spaces. This loses the exit status of ./types,
11254 and isn't needed since ./types shouldn't be emitting trailing
11255 spaces.
11256 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11257 as the stack isn't valid in that case.
11258
11259 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11260 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11261 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11262 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11263 is used.
11264 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11265 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11266 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11267 Likewise.
11268
11269 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11270 overly-picky compilers that reject 'char *foo = "bar";'.
11271
11272 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11273 to FILE * parameter, not to stderr. This fixes a typo introduced
11274 in the 2005-07-12 change.
11275
11276 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11277 warnings from GCC 4.
11278
11279 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11280 (yyglrShiftDefer, yysplitStack):
11281 Remove unused parameters b4_pure_formals. All uses changed.
11282 (yyglrShift): Remove unused parameters b4_user_formals.
11283 All uses changed.
11284 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11285
11286 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11287
11288 Destructor cleanups and regularization among the three skeletons.
11289 * NEWS: Document the behavior changes.
11290 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11291 stack before failing, as the cleanup code will do it for us now.
11292 * data/lalr1.cc (yyerrlab): Likewise.
11293 * data/glr.c (yyparse): Pop everything off the stack before
11294 freeing it, so that destructors get called properly.
11295 * data/lalr1.cc (yyreturn): Likewise.
11296 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11297 This is more consistent.
11298 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11299 why destructors might be called. 1.875 -> 2.1.
11300 (Destructor Decl, Decl Summary, Table of Symbols):
11301 Some English-language cleanups for %destructor.
11302 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11303 Add output line for destructor of start symbol.
11304 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11305 because of that same extra output line.
11306
11307 * NEWS: Document minor wording changes in diagnostics of
11308 Bison-generated parsers.
11309 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11310 Remove unused formals. All uses changed.
11311 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11312 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11313 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11314 Rename yyoverflowab to yyexhaustedlab.
11315 When memory exhaustion occurs during syntax-error reporting,
11316 report it separately rather than in a single diagnostic; this
11317 eases translation.
11318 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11319 (Memory Exhausted): Renamed from Parser Stack Overflow.
11320 Revamp wording slightly to prefer "memory exhaustion".
11321 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11322
11323 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11324
11325 Add i18n support to the GLR skeleton. Partially fix the C++
11326 skeleton; a C++ expert needs to finish this. Remove debugging
11327 msgids; there's little point to having them translated, since they
11328 can be understood only by someone who can read the
11329 (English-language) source code.
11330
11331 Generate runtime-po/bison-runtime.pot automatically, so that we
11332 don't have to worry about garbage getting in that file. We'll
11333 make sure after the next official release that old msgids don't
11334 get lost. See
11335 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11336
11337 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11338 Now auto-generated.
11339 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11340 Fix typos in explanations of the runtime file.
11341 * bootstrap: Change gettext keyword from YYI18N to YY_.
11342 Use standard Makefile.in.in in runtime-po, since we'll arrange
11343 for backward-compatible bison-runtime.po files in a different way.
11344 * data/glr.c (YY_): New macro, from yacc.c.
11345 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11346 Translate messages intended for users.
11347 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11348 the wording in the other skeletons. We don't know that the memory
11349 is virtual.
11350 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11351 Use same method that yacc.c uses.
11352 Don't translate debugging messages.
11353 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11354 it doesn't work (yet), and requires C++ expertise to fix.
11355 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11356 Move defn to a more logical place, to be consistent with other
11357 skeletons.
11358 Don't translate debugging messages.
11359 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11360 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11361 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11362 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11363
11364 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11365 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11366 void, not int.
11367 * tests/glr-regression.at (Badly Collapsed GLR States):
11368 Likewise.
11369 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11370 yylex should return 0 at EOF rather than aborting.
11371
11372 Improve tests for stack overflow in GLR parser.
11373 Problem reported by twlevo@xs4all.nl.
11374 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11375 All uses removed.
11376 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11377 can handle the problem.
11378 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11379 (yyparse): New local variable yyresult to record the result.
11380 Use result of setjmp to set it, rather than storing itinto
11381 struct.
11382 (yyDone): Remove label.
11383 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
11384 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
11385 if YYABORT is used).
11386 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
11387 yyparse status; put status > 1 into diagnostic.
11388 Check that status==2 works.
11389 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
11390 Use exit status 3 for failure to open (which shouldn't happen).
11391
11392 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
11393
11394 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
11395 1 on syntax error; just let yyparse do its thing.
11396 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
11397 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
11398 (Exploding the Stack Size with Alloca):
11399 (Exploding the Stack Size with Malloc):
11400 Expect exit status 2, not 1, since the parser is supposed to blow
11401 its stack. Problem reported by twlevo@xs4all.nl.
11402
11403 * data/glr.c (yyparse): Don't assume that the initial calls
11404 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
11405 Print a stack-overflow message and fail instead.
11406 Initialize the line-number information before creating the stack,
11407 so that the stack-overflow message can report line zero safely.
11408
11409 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
11410
11411 Fix problems reported by twlevo@xs4all.nl.
11412 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
11413 (yyuserMerge): Provide a default case if b4_mergers is empty.
11414 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
11415 * tests/glr-regression.at
11416 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11417 Add casts to pacify C++ compilers.
11418 * tests/glr-regression.at (Improper merging of GLR delayed action
11419 sets): Declare yylex before using it.
11420 * tests/Makefile.am (maintainer-check-g++): Fix a stray
11421 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
11422 test for valgrind; valgrind is independent of g++.
11423 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
11424 for compatibility with POSIX 1003.1-2001 (if running coreutils).
11425 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
11426 Use a destructor, so that we can expand the stack. Change
11427 YYSTYPE to char * so that we can free it. Cast result of malloc.
11428
11429 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11430
11431 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
11432 a valgrind failure. Problem reported by twlevo@xs4all.nl.
11433
11434 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
11435
11436 * PACKAGING: New file, suggested by Bruno Haible and taken from
11437 similar wording in gettext's PACKAGING file.
11438 * NEWS: Mention PACKAGING.
11439 * Makefile.am (EXTRA_DIST): Add PACKAGING.
11440
11441 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
11442
11443 * NEWS: Document recent i18n improvements.
11444 * bootstrap: Get runtime translations into runtime-po.
11445 Create runtime-po files automatically, if possible.
11446 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
11447 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
11448 does not infringe on the user's name space.
11449 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
11450 * doc/bison.texinfo (Internationalization): Revamp the English
11451 and Texinfo syntax a bit, to try to make it clearer.
11452 (Bison Options, Option Cross Key): Mention --print-localedir.
11453 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
11454 YYENABLE_NLS. Quote a bit more.
11455 * runtime-po/.cvsignore: New file.
11456 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
11457 * runtime-po/Rules-quot: Remove; now created by bootstrap.
11458 * runtime-po/quot.sed: Likewise.
11459 * runtime-po/boldquot.sed: Likewise.
11460 * runtime-po/en@quot.header: Likewise.
11461 * runtime-po/en@boldquot.header: Likewise.
11462 * runtime-po/insert-header.sin: Likewise.
11463 * runtime-po/remove-potcdate.sin: Likewise.
11464 * runtime-po/Makevars: Likewise.
11465 * runtime-po/LINGUAS: Likewise.
11466 * runtime-po/de.po: Likewise; we will rely on the translation project
11467 to maintain this, so "bootstrap" should get it.
11468 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
11469 its value.
11470 * src/main.c (main): Bind the bison-runtime domain, too.
11471
11472 2005-07-12 Bruno Haible <bruno@clisp.org>
11473
11474 * data/yacc.c: Include <libintl.h> when NLS is enabled.
11475 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
11476 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
11477 * runtime-po: New directory.
11478 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
11479 $(DOMAIN).pot-update rule, so that old messages are never dropped.
11480 * runtime-po/Rules-quot: New file, copied from po/.
11481 * runtime-po/quot.sed: Likewise.
11482 * runtime-po/boldquot.sed: Likewise.
11483 * runtime-po/en@quot.header: Likewise.
11484 * runtime-po/en@boldquot.header: Likewise.
11485 * runtime-po/insert-header.sin: Likewise.
11486 * runtime-po/remove-potcdate.sin: Likewise.
11487 * runtime-po/Makevars: New file.
11488 * runtime-po/POTFILES.in: New file.
11489 * runtime-po/LINGUAS: New file.
11490 * runtime-po/bison-runtime.pot: New file.
11491 * runtime-po/de.po: New file.
11492 * m4/bison.m4: New file.
11493 * Makefile.am (SUBDIRS): Add runtime-po.
11494 (aclocaldir, aclocal_DATA): New variables.
11495 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
11496 Define aclocaldir.
11497 * src/getargs.c (usage): Document --print-localedir option.
11498 (PRINT_LOCALEDIR_OPTION): New enum item.
11499 (long_options): Add --print-localedir option.
11500 (getargs): Handle --print-localedir option.
11501 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
11502 (Internationalization): New section.
11503
11504 2005-07-12 Akim Demaille <akim@epita.fr>
11505
11506 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
11507 for consistency with the rest of the code.
11508 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
11509 Add separators.
11510
11511 2005-07-12 Akim Demaille <akim@epita.fr>
11512
11513 * src/parse-gram.y: Use %printer instead of YYPRINT.
11514
11515 2005-07-12 Akim Demaille <akim@epita.fr>
11516
11517 * src/symtab.h, src/symtab.c (symbol_print): New.
11518 * src/symlist.h, src/symlist.c (symbol_list_print): New.
11519 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
11520
11521 2005-07-12 Akim Demaille <akim@epita.fr>
11522
11523 * data/glr.c (b4_syncline): Fix (swap) the definitions of
11524 b4_at_dollar and b4_dollar_dollar.
11525
11526 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
11527
11528 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
11529 and Pennello's paper.
11530
11531 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
11532
11533 * data/yacc.c (yyparse): Undo previous patch. Instead,
11534 set yylsp[0] and yyvsp[0] only if the initial action
11535 sets yylloc and yylval, respectively.
11536
11537 * data/yacc.c (yyparse): In the initial action, set
11538 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
11539 This avoids the use of undefined variables if the initial
11540 action does not set yylloc and/or yylval.
11541
11542 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
11543
11544 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
11545 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
11546 Remove from CVS. These files are automatically generated.
11547 * examples/extexi: Clarify that this file is now part of Bison,
11548 not GNU M4, and that it works with any POSIX-compatible Awk.
11549 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
11550 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
11551 so that we also get calc++-parser.yy. Geneate it.
11552 Use $(AWK), not gawk, since any conforming Awk will do.
11553 Put comment before action, since older 'make' can't handle comment
11554 in action.
11555 $(BUILT_SOURCES): List all built sources, not just some of them.
11556 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
11557 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
11558 $($(calc_sources_generated)): Remove unnecessary test for existence
11559 of target. (This had a shell syntax error anyway; a stray "x".)
11560 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
11561 calc++-parser.yy.
11562 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
11563
11564 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
11565 implied by the other modules.
11566
11567 2005-07-06 Akim Demaille <akim@epita.fr>
11568
11569 Bind examples/calc++ to the package.
11570 * examples/calc++/Makefile: Remove, replaced by...
11571 * examples/calc++/Makefile.am: ... this new file.
11572 * examples/calc++/test: Remove input.
11573 * examples/calc++/compile: Remove.
11574 * examples/Makefile.am: New.
11575 * configure.ac, Makefile.am: Adjust.
11576 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
11577
11578 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
11579
11580 * data/glr.c (yyFail): Drastically simplify; since the format argument
11581 never had any % directives, we can simply pass it to yyerror.
11582 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
11583 be modified later, as that is the usual style in glr.c.
11584 Problems reported by Paul Hilfinger.
11585
11586 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
11587 and size overflow errors.
11588 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
11589 in case the user prolog sets feature-test macros like _GNU_SOURCE.
11590 (YYSIZEMAX): New macro.
11591 (yystpcpy): New function, taken from yacc.c.
11592 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
11593 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
11594 so that we don't have to maintain their signatures.
11595 (yyFail): Check for buffer overflow, by using vsnprintf rather
11596 than vsprintf. Allocate a bigger buffer if possible.
11597 Report an error if buffer allocation fails.
11598 (yyStackOverflow): New function.
11599 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
11600 the initialization was successful. It might fail if storage was
11601 exhausted.
11602 (yyexpandGLRStack): Add more checks for storage allocation failure.
11603 Use yyStackOverflow to report failures.
11604 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
11605 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
11606 Don't assume stack number fits in int.
11607 (yysplitStack): Check for storage allocation failure.
11608 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
11609 can print diagnostics on storage allocation failure. All callers
11610 changed.
11611 (yyresolveValue): Use yybool for boolean.
11612 (yyreportSyntaxError): Check for size-calculation overflow.
11613 This code is taken from yacc.c.
11614 (yyparse): Check for storage allocation errors when allocating
11615 the initial stack.
11616
11617 2005-07-05 Akim Demaille <akim@epita.fr>
11618
11619 Extract calc++ from the documentation.
11620 * doc/bison.texinfo (Calc++): Add the extraction marks.
11621 * examples/extexi: New, from the aborted GNU Programming 2E.
11622 Separate the different paragraph of a file with empty lines.
11623 * examples/Makefile: Use it to extract the whole calc++ example.
11624
11625 2005-06-24 Akim Demaille <akim@epita.fr>
11626
11627 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
11628 class typedefs.
11629
11630 2005-06-22 Akim Demaille <akim@epita.fr>
11631
11632 * doc/bison.texinfo (C++ Language Interface): First stab.
11633 (C++ Parsers): Remove.
11634
11635 2005-06-22 Akim Demaille <akim@epita.fr>
11636
11637 * data/lalr1.cc (yylex_): Honor %lex-param.
11638
11639 2005-06-22 Akim Demaille <akim@epita.fr>
11640
11641 Start a set of simple examples.
11642 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
11643 * examples/calc++/calc++-driver.hh,
11644 * examples/calc++/calc++-parser.yy,
11645 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
11646 * examples/calc++/compile, examples/calc++/test: New.
11647
11648 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
11649
11650 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
11651 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
11652 which stems from the 2005-05-27 patch.
11653
11654 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11655
11656 * data/glr.c: Modify treatment of unused parameters to permit use
11657 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
11658
11659 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
11660
11661 Fix infringement on user name space reported by Janos Zoltan Szabo.
11662 * data/yacc.c (yyparse): strlen -> yystrlen.
11663
11664 2005-05-30 Akim Demaille <akim@epita.fr>
11665
11666 * data/lalr1.cc (_): New.
11667 Translate the various messages.
11668
11669 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
11670
11671 Fix infringement on user name space reported by Bruno Haible.
11672 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
11673 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
11674 the user's name space.
11675 (alloca): Include <stdlib.h> to get it, if it's not built in.
11676 (YYMALLOC, YYFREE): Define only if needed.
11677 (malloc, free): Declare, but only if needed, as this infringes on
11678 the user name space.
11679
11680 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
11681
11682 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
11683 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
11684 with %d format.
11685 * lib/ebitset.c (min, max): Undef before defining.
11686 * lib/vbitset.c (min, max): Likewise.
11687 * lib/subpipe.c (create_subpipe): Save local variables in case
11688 vfork clobbers them.
11689
11690 2005-05-24 Bruno Haible <bruno@clisp.org>
11691
11692 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
11693 error message syntax used by gcc-4.0.
11694
11695 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
11696
11697 * README: Mention m4 1.4.3. Remove obsolete advice about
11698 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
11699
11700 * bootstrap: Remove workaround for problem I encountered with
11701 gettext 0.14.1; it seems to be fixed now.
11702
11703 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
11704
11705 * NEWS: Version 2.0a.
11706
11707 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
11708 the previous change.
11709
11710 Various maintainer cleanups.
11711 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
11712 conftest*, for benefit of CVS commands run at the same time as
11713 "configure". Add build-aux, since "bootstrap" now creates it and
11714 its subfiles.
11715 * Makefile.cfg (move_if_change): Remove.
11716 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
11717 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
11718 (po_repo, do-po-update, po-update, wget_files, get-targets):
11719 (config.guess-url_prefix, config.sub-url_prefix):
11720 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
11721 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
11722 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
11723 Remove.
11724 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
11725 this is now the recommended name.
11726 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
11727 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
11728 ylwrap. These files now go into build-aux.
11729 * config/move-if-change: Remove.
11730 * config/prev-version.txt: Bump from 1.75 to 2.0.
11731
11732 * bootstrap: Add stdio-safer, unistd-safer modules.
11733 Remove m4/glibc2.m4 (introduced by latest gnulib, but
11734 we don't need it).
11735 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
11736 fopen-safer.c, stdio-safer.h, unistd-safer.h.
11737 * lib/subpipe.c: Include "unistd-safer.h".
11738 (create_subpipe): Make sure all the newly-created
11739 file descriptors are > 2, so that diagnostics don't
11740 get sent down them (which might cause Bison to hang, in theory).
11741 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
11742 * src/files.c (xfopen): Use fopen_safer, not fopen.
11743
11744 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
11745 yesterday's yacc.c fix.
11746
11747 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
11748
11749 * data/glr.c, data/lalr1.cc: Update copyright date.
11750
11751 Fix a destructor bug reported by Wolfgang Spraul in
11752 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
11753 * data/yacc.c (yyabortlab): Don't call destructor, and
11754 don't set yychar to EMPTY.
11755 (yyoverflowlab): Don't call destructor.
11756 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
11757 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
11758 since we no longer output the message "discarding lookahead token
11759 end of input ()".
11760
11761 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11762
11763 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
11764 fix a small glitch in debugging output.
11765 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
11766 after YY_SYMBOL_PRINT where needed.
11767
11768 (struct yyGLRState): Add some comments.
11769 (struct yySemanticOption): Add some comments.
11770 (union yyGLRStackItem): Add comment.
11771
11772 (yymergeOptionSets): Correct this to properly perform the union,
11773 avoiding infinite reported by Michael Rosien.
11774 Update comment.
11775
11776 * tests/glr-regression.at: Add test for GLR merging error reported
11777 by M. Rosien.
11778
11779 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
11780
11781 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
11782 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
11783 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
11784 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
11785 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
11786 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
11787 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
11788 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
11789 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
11790 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
11791 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
11792 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
11793 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
11794 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
11795 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
11796 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
11797 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
11798 src/derives.h, src/files.c, src/files.h, src/getargs.c,
11799 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
11800 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
11801 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
11802 src/output.h, src/parse-gram.c, src/parse-gram.h,
11803 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
11804 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
11805 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
11806 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
11807 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
11808 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
11809 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
11810 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
11811 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
11812 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
11813 tests/reduce.at, tests/regression.at, tests/sets.at,
11814 tests/synclines.at, tests/testsuite.at, tests/torture.at:
11815 Update FSF postal mail address.
11816
11817 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
11818
11819 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
11820 Problem reported by Ralf Menzel.
11821
11822 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
11823
11824 * tests/actions.at: Test that stack overflow invokes destructors.
11825 From Marcus Holland-Moritz.
11826 * data/yacc.c (yyerrlab): Move the code that destroys the stack
11827 from here....
11828 (yyreturn): to here. That way, destructors are called properly
11829 even if the stack overflows, or the user calls YYACCEPT or
11830 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
11831 (yyoverflowlab): Destroy the lookahead.
11832
11833 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
11834
11835 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
11836
11837 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
11838
11839 * NEWS: Bison-generated C parsers no longer quote literal strings
11840 associated with tokens.
11841 * src/output.c (prepare_symbols): Don't escape strings,
11842 since users don't want to see C escapes.
11843 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
11844 in diagnostics.
11845 * tests/input.at (Torturing the Scanner): Likewise.
11846 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
11847
11848 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11849
11850 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11851 the data size is known to be too small and we can't increase it.
11852 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11853
11854 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11855
11856 * src/parse-gram.y: Include quotearg.h.
11857 (string_as_id): Quote $1 before using it as a key, since the
11858 lexer no longer quotes it for us.
11859 (string_content): Don't strip quotes, since lexer no longer
11860 quotes it for us.
11861 * src/scan-gram.l: Include quotearg.h.
11862 ("\""): Omit quote.
11863 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11864 a key, since the rest of the lexer doesn't quote it.
11865 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11866 * tests/regression.at (Token definitions): Check for backslashes
11867 in token strings.
11868
11869 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11870 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11871 (yyparse): Revamp code to generate long syntax error message, to
11872 make it easier to translate, and to avoid problems with arithmetic
11873 overflow. Change "virtual memory" to "memory" in diagnostic, since
11874 we don't know whether the memory is virtual.
11875
11876 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11877
11878 * NEWS: Bison-generated C parsers now use the _ macro to
11879 translate strings.
11880 * data/yacc.c (_) [!defined _]: New macro.
11881 All English strings wrapped inside this macro.
11882 * doc/bison.texinfo (Bison Parser): Document _.
11883 * po/POTFILES.in: Include src/parse-gram.c, since it now
11884 includes translateable strings that parse-gram.y doesn't.
11885
11886 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11887
11888 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11889 reverting the 2004-10-11 change to this function.
11890 (symbol_check_alias_consistency): Don't call symbol_type_set
11891 if the type name is already correct.
11892 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11893
11894 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11895
11896 * tests/regression.at (Token definitions): Don't use a token named
11897 c, as that generates a "#define c ..." that runs afoul of buggy
11898 stdlib.h that uses the identifier c as a member of struct
11899 drand48_data. Problem reported by Horst Wente.
11900
11901 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11902
11903 * bootstrap: Change translation URL from
11904 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11905 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11906 redirection glitches. Problem reported by twlevo@xs4all.nl.
11907
11908 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11909
11910 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11911 after operands; POSIX says this isn't portable for the c99 command.
11912
11913 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11914
11915 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11916 immediately if a data overrun has occurred; this may help us track
11917 down what may be a spurious failure on MacOS.
11918
11919 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11920
11921 Respond to problems reported by twlevo@xs4all.nl.
11922
11923 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11924
11925 * src/vcg.h: Comment fix.
11926 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11927 (G_CMAX): Change to -1 instead of INT_MAX.
11928
11929 * data/yacc.c (yyparse): Omit spaces before #line.
11930
11931 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11932
11933 * src/tables.c (state_number_to_vector_number): Put it inside an
11934 "#if 0", since it's not currently used. Problem reported by
11935 Roland McGrath.
11936
11937 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11938
11939 * src/output.c (escaped_output): Renamed from
11940 escaped_file_name_output, since we now use it for symbol tags as
11941 well. All uses changed.
11942 (symbol_destructors_output, symbol_printers_output):
11943 Escape symbol tags too.
11944 Problem reported by Matyas Forstner in
11945 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11946
11947 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11948 not needed.
11949 * src/output.c (user_actions_output, token_definitions_output,
11950 symbol_destructors_output, symbol_printers_output): Likewise.
11951 * src/reader.c (prologue_augment): Likewise.
11952 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11953
11954 * src/vcg.c (output_edge): Don't quote linestyle arg.
11955 Problem reported by twlevo@xs4all.nl.
11956
11957 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11958
11959 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11960 example, reported by Derek M Jones. Also, make the example even
11961 more outrageous, to better illustrate how bad the problem is.
11962
11963 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11964
11965 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11966 putsym. Typo reported by Sebastian Piping.
11967
11968 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11969
11970 * doc/bison.texinfo (Language and Grammar): some -> same
11971 (Epilogue): int he -> in the
11972 Typos reported by Sebastian Piping via Justin Pence.
11973
11974 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11975
11976 * tests/glr-regression.at (Improper handling of embedded actions
11977 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11978 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11979 with dollar signs in test names.
11980 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11981 for a similar reason.
11982
11983 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11984
11985 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11986 wants to redefine G_VIEW.
11987
11988 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11989
11990 * src/vcg.c (get_view_str): Remove case for normal_view.
11991 Problem reported by twlevo@xs4all.nl.
11992
11993 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11994
11995 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11996 Problem reported by twlevo@xs4all.nl.
11997
11998 * doc/bison.texinfo: Change @dircategory from "GNU programming
11999 tools" to "Software development". Requested by Richard Stallman
12000 via Karl Berry.
12001
12002 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12003
12004 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12005 Problem reported by twlevo@xs4all.nl.
12006
12007 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12008
12009 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12010 keyword; it's not needed with modern compilers, and it doesn't
12011 affect correctness with older compilers. Suggested by
12012 twlevo@xs4all.nl.
12013
12014 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12015
12016 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12017 gcc -Wswitch-default.
12018 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12019 * data/yacc.c (yyparse): Likewise.
12020
12021 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12022
12023 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12024 already. Let config.h define any nonstandard values.
12025
12026 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12027
12028 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12029 for the benefit of slower hosts. Problem reported by
12030 Nelson H. F. Beebe.
12031
12032 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12033
12034 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12035 being defined and not used.
12036 * data/lalr1.cc (yyparse): Likewise.
12037 Use "if (false)" rather than "if (0)".
12038
12039 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12040
12041 * TODO: Mention that we should allow NUL bytes in tokens.
12042
12043 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12044
12045 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12046 Problem reported by Hans Aberg.
12047
12048 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12049
12050 * src/getargs.c (version): Happy new year; update overall
12051 program copyright date from 2004 to 2005.
12052
12053 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12054 Problem reported by Hans Aberg.
12055 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12056 (Output file names.): Add a test for the case when standard output
12057 is closed.
12058
12059 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12060
12061 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12062 to fix an oversight in the Bison 2.0 manual.
12063
12064 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12065
12066 * NEWS: Version 2.0. Reformat the existing news items since
12067 1.875, so that related items are grouped together.
12068 * configure.ac (AC_INIT): Bump version to 2.0.
12069 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12070
12071 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12072 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12073 otherwise, we're not testing alloca. Unfortunately there's no
12074 simple way to consult HAVE_ALLOCA here.
12075
12076 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12077 for yymsg, too.
12078
12079 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12080 hand. This avoids a warning about comparing int to size_t when
12081 GCC warnings are enabled.
12082
12083 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12084
12085 * NEWS: Bison-generated parsers no longer default to using the
12086 alloca function (when available) to extend the parser stack, due
12087 to widespread problems in unchecked stack-overflow detection.
12088 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12089 responsibility to set it to a positive value. This lets the user
12090 specify a value that is not a preprocessor constant.
12091 * data/yacc.c (YYMAXDEPTH): Likewise.
12092 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12093 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12094 to be a compile-time constant. However, explain the constraints on it.
12095 Also, explain the constraints on YYINITDEPTH.
12096 (Table of Symbols): Explain that alloca is no longer the default.
12097 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12098 to 1.
12099
12100 * doc/bison.texinfo (Location Default Action): Mention that n must
12101 be zero when k is zero. Suggested by Frank Heckenbach.
12102
12103 2004-12-22 Akim Demaille <akim@epita.fr>
12104
12105 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12106 (parser::state_type, parser::semantic_type, parser::location_type):
12107 Private, not public.
12108 (parser::parse): Return ints, not bool.
12109 Returning a bool introduces a problem: 0 corresponds to false, and
12110 it seems weird to return false on success. Returning true changes
12111 the conventions for yyparse.
12112 Alternatively we could return void and send an exception.
12113 There is no clear consensus (yet?).
12114 (state_stack, semantic_stack, location_stack): Rename as...
12115 (state_stack_type, semantic_stack_type, location_stack_type): these.
12116 Private, not public.
12117 * tests/c++.at: New.
12118 * tests/testsuite.at, tests/Makefile.am: Adjust.
12119
12120 2004-12-21 Akim Demaille <akim@epita.fr>
12121
12122 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12123
12124 2004-12-21 Akim Demaille <akim@epita.fr>
12125
12126 Don't impose std::string for filenames.
12127
12128 * data/lalr1.cc (b4_filename_type): New.
12129 (position::filename): Use it.
12130 (parser.hh): Move the inclusion of stack.hh and location.hh below
12131 the user code, so that needed headers for the filename type can be
12132 included first.
12133 Forward declare them before the user code.
12134 * tests/Makefile.am (check-local, installcheck-local): Pass
12135 TESTSUITEFLAGS to the TESTSUITE.
12136
12137 2004-12-20 Akim Demaille <akim@epita.fr>
12138
12139 Use more STL like names: my_class instead of MyClass.
12140
12141 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12142 (SemanticStack, SemanticType, StateStack, StateType)
12143 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12144 (Parser::value): Rename as...
12145 (location_stack, location_type, rhs_number_type, semantic_stack)
12146 (semantic_type, state_stack, state_type, token_number_type, stack)
12147 (slice, traits, parser::yylloc, parser::yylval): these.
12148
12149 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12150
12151 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12152
12153 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12154 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12155
12156 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12157
12158 Remove uses of 'short int' and 'unsigned short int'. This raises
12159 some arbitrary limits. It uses more memory but nowadays that's
12160 not much of an issue.
12161
12162 This change does not affect the generated parsers; that's a different
12163 task, as some users will want to conserve memory there.
12164
12165 Ideally we should use size_t to represent all object counts, and
12166 something like ptrdiff_t to represent signed differences of object
12167 counts; but that will require more code-cleanup than I have the
12168 time to do right now.
12169
12170 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12171 Use size_t, not int or short int, to count objects.
12172 * src/closure.c (nritemset, closure): Likewise.
12173 * src/closure.h (nritemset, closure): Likewise.
12174 * src/nullable.c (nullable_compute): Likewise.
12175 * src/print.c (print_core): Likewise.
12176 * src/print_graph.c (print_core): Likewise.
12177 * src/state.c (state_compare, state_hash): Likewise.
12178 * src/state.h (struct state): Likewise.
12179 * src/tables.c (default_goto, goto_actions): Likewise.
12180
12181 * src/gram.h (rule_number, rule): Use int, not short int.
12182 * src/output.c (prepare_rules): Likewise.
12183 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12184 errs, reductions): Likewise.
12185 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12186 Likewise.
12187 * src/tables.c (vector_number, tally, action_number,
12188 ACTION_NUMBER_MINIMUM): Likewise.
12189 * src/output.c (muscle_insert_short_int_table): Remove.
12190
12191 2004-12-17 Akim Demaille <akim@epita.fr>
12192
12193 * data/lalr1.cc: Extensive Doxygenation.
12194 (error_): Rename as...
12195 (error): this, since it is visible to the user.
12196 Adjust callers.
12197 (Parser::message): Now an automatic variable from...
12198 (Parser::yyreport_syntax_error_): here.
12199 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12200 Parser::error.
12201 * tests/input.at: Escape $.
12202
12203 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12204
12205 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12206 Parenthesize rhs to avoid obscure problems with mistakes like
12207 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12208 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12209 b4_rhs_location): Likewise.
12210 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12211 b4_rhs_location): Likewise.
12212
12213 2004-12-16 Akim Demaille <akim@epita.fr>
12214
12215 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12216 yacc.c: be sure to stay within yycheck_.
12217 * tests/actions.at: Re-enable C++ tests.
12218
12219 2004-12-16 Akim Demaille <akim@epita.fr>
12220
12221 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12222 real.
12223
12224 2004-12-16 Akim Demaille <akim@epita.fr>
12225
12226 Use #define to handle the %name-prefix.
12227
12228 * data/glr.c, data/yacc.c: Comment changes.
12229 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12230 so that one can refer to yylex in the parser file, and have it
12231 renamed, as is the case with other skeletons.
12232
12233 2004-12-16 Akim Demaille <akim@epita.fr>
12234
12235 Move lalr1.cc internals into yy*.
12236
12237 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12238 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12239 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12240 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12241 (empty_, final_, terror_, errcode_, ntokens_)
12242 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12243 (looka_, ilooka_, error_range_, nerrs_):
12244 Rename as...
12245 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12246 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12247 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12248 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12249 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12250 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12251 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12252 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12253 these.
12254
12255 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12256
12257 Fix some problems reported by twlevo at xs4all.
12258 * src/symtab.c (symbol_new): Report an error if the input grammar
12259 contains too many symbols. This is better than calling abort() later.
12260 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12261 (struct node, struct graph):
12262 Rename member expand to stretch. All uses changed.
12263 (struct graph): Remove member layoutalgorithm. All uses removed.
12264 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12265 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12266 All uses changed.
12267 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12268
12269 2004-12-15 Akim Demaille <akim@epita.fr>
12270
12271 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12272 Add more Doxygen comments.
12273 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12274 (report_syntax_error_, translate_): Rename as...
12275 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12276 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12277
12278 2004-12-15 Akim Demaille <akim@epita.fr>
12279
12280 * data/lalr1.cc (lex_): Rename as...
12281 (yylex_): this.
12282 Move the trace here.
12283 Take the %name-prefix into account.
12284 Reported by Alexandre Duret-Lutz.
12285
12286 2004-12-15 Akim Demaille <akim@epita.fr>
12287
12288 Simplify the C++ parser constructor.
12289
12290 * data/lalr1.cc (debug_): Rename as...
12291 (yydebug_): so that the parser's internals are always in the yy*
12292 pseudo namespace.
12293 Adjust uses.
12294 (b4_parse_param_decl): Remove the leading comma as it is now only
12295 called as unique argument list.
12296 (Parser::Parser): Remove the constructor accepting a location and
12297 an initial debugging level.
12298 Remove from the other ctor the argument for the debugging level.
12299 (debug_level_type, debug_level, set_debug_level): New.
12300
12301 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12302 constructor calls.
12303
12304 2004-12-15 Akim Demaille <akim@epita.fr>
12305
12306 Remove b4_root related material: failure experiment
12307 (which goal was to allow to derive from a class).
12308
12309 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12310 definitions and uses.
12311
12312 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12313
12314 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12315 not 2, since it's not portable to subtract 1 from the start of an
12316 array. The new item 0 is never set or used. All uses changed.
12317
12318 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12319 the default definition of YYLLOC_DEFAULT. Problem reported
12320 by Frank Heckenbach.
12321
12322 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12323
12324 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12325 the normal case and one for the error case. Just use the
12326 first one uniformly. Problem reported by Frank Heckenbach.
12327 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12328 use exactly the same macro in both places.
12329 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12330 so that the normal-case YYRHSLOC works for the error case too.
12331 All uses changed.
12332 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12333 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12334 * doc/bison.texinfo (Location Default Action): Don't claim that
12335 we have an array of locations. Use the same macro for both glr
12336 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12337 the index is 0.
12338
12339 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12340
12341 * HACKING: Update email addresses to send announcements to.
12342
12343 * configure.ac (AC_INIT): Bump version to 1.875f.
12344
12345 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12346
12347 * NEWS: Version 1.875e.
12348 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12349
12350 * src/scan-skel.l: Include "complain.h", for "fatal".
12351
12352 * src/relation.h (relation_print, relation_digraph):
12353 Relation sizes are of type relation_node, not size_t (this is
12354 merely a doc fix, since the two types are equivalent).
12355 (relation_transpose): Relation sizes are of type relation_node,
12356 not int.
12357 * src/relation.c: Likewise.
12358 (top, infinity): Now of type relation_node, not int.
12359 (traverse, relation_transpose): Use relation_node, not int.
12360
12361 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12362 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12363 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12364
12365 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
12366 specifying whether the test should be skipped. Use it tp
12367 specify that the [%defines %skeleton "lalr1.cc"] tests currently
12368 fail on some hosts, and should be skipped.
12369
12370 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12371
12372 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12373 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12374 unless otherwise specified below.
12375
12376 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12377 to allocate kernel_base, kernel_items, kernel_size, since
12378 they needn't be initialized to 0.
12379 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12380 * src/closure.c (new_closure): Likewise, for itemset.
12381 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
12382 * src/lalr.c (set_goto_map): Likewise, for temp_map.
12383 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
12384 (build_relations): Likewise for edge, states1, includes.
12385 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
12386 * src/reader.c (packgram): Likewise, for ritem, rules.
12387 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
12388 * src/relation.c (relation_digraph): Likewise for VERTICES.
12389 (relation_transpose): Likewise for new_R, end_R.
12390 * src/symtab.c (symbols_token_translations_init): Likewise for
12391 token_translations.
12392 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
12393 (token_actions): Likewise for yydefact, actrow, conflrow,
12394 conflict_list.
12395 (save_column): Likewise for froms[symno], tos[symno].
12396 (goto_actions): Likewise for state_count.
12397 (pack_table): Likewise for base, pos, check.
12398 (tables_generate): Likewise for width.
12399
12400 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
12401 for initial core. Just have a separate core, so we needn't worry
12402 about whether kernel_size and kernel_base are initialized.
12403
12404 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
12405 kernel_size, kernel_items): Remove unnecessary initialization.
12406 * src/conflicts.c (conflicts): Likewise.
12407 * src/derives.c (derives): Likewise.
12408 * src/muscle_tablc (muscle_insert): Likewise.
12409 * src/relation.c (relation_digraph): Likewise.
12410 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
12411 conflrow, conflict_table, conflict_list, table, check):
12412 Likewise.
12413
12414 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
12415 This is because all callers pass unsigned int.
12416 * src/closure.h (new_closure): Likewise.
12417
12418 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
12419 (build_relations): Initialize includes[i] in all cases.
12420 * src/reader.c (packgram): Always initialize rules[ruleno].prec
12421 and rules[ruleno].precsym. Initialize members in order.
12422 * src/relation.c (relation_transpose): Always initialize new_R[i]
12423 and end_R[i].
12424 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
12425
12426 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
12427 conflict_list[0] was always 0, but now it isn't initialized.
12428
12429 * src/table.c (table_grow): When conflict_table grew, the grown
12430 area wasn't cleared. Fix this.
12431
12432 * lib/.cvsignore: Add strdup.c, strdup.h.
12433 * m4/.cvsignore: Add strdup.m4.
12434
12435 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
12436
12437 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
12438 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
12439 GOTO_NUMBER_MAXIMUM, since we occasionally compute
12440 ngotos + 1 without checking for overflow.
12441 (build_relations): Use END_NODE, not -1, to denote end of edges.
12442 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
12443 build_relations): Use goto_number, not int, for goto numbers.
12444 * src/tables.c (save_column, default_goto): Likewise.
12445
12446 2004-11-23 Akim Demaille <akim@epita.fr>
12447
12448 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
12449 of #defining from yystype.
12450 Don't typedef yystype, C++ does not need it.
12451 This lets it possible to forward declare it as union.
12452
12453 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
12454
12455 * bootstrap (gnulib_modules): Add extensions.
12456 Problem reported by Jim Meyering.
12457
12458 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
12459
12460 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
12461 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
12462 src/system.h, src/tables.c: XFREE -> free, to accommodate
12463 recent change to gnulib xalloc.h.
12464 Problem reported by Jim Meyering.
12465
12466 2004-11-17 Akim Demaille <akim@epita.fr>
12467
12468 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
12469
12470 2004-11-17 Akim Demaille <akim@epita.fr>,
12471 Alexandre Duret-Lutz <adl@gnu.org>
12472
12473 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
12474 changes.
12475 (YYCDEBUG): Adjust.
12476 Use it instead of cdebug_.
12477 (Parser::debug_stream, Parser::set_debug_stream): New.
12478 (Parser::symprint_): Define cdebug_ for temporary backward
12479 compatibility.
12480 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
12481 debug_stream ().
12482
12483 2004-11-17 Akim Demaille <akim@epita.fr>
12484
12485 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
12486 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
12487 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
12488 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12489
12490 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
12491
12492 * data/glr.c (yyloc_default): Remove; not used.
12493 Problem reported by Frank Heckenbach.
12494
12495 2004-10-25 Akim Demaille <akim@epita.fr>
12496
12497 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
12498 Introduce another definition to address simple location arrays.
12499 (yyGLRStack): New member: yyerror_range.
12500 (yyrecoverSyntaxError, yyparse): Update it.
12501 (yyrecoverSyntaxError): Use it when shifting the error token to
12502 have an accurate range, equivalent to the one computed by both
12503 yacc.c and lalr1.cc.
12504 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
12505 that column numbers start at column 0, as per GNU Coding
12506 Standards, the others tests, and the doc.
12507 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
12508 Adjust to the above change (first column is 0).
12509 And adjust the location of the "<error>", now covering the whole
12510 line.
12511
12512 2004-10-22 Akim Demaille <akim@epita.fr>
12513 and Paul Eggert <eggert@cs.ucla.edu>
12514
12515 Remove some arbitrary limits on goto numbers and relations.
12516 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
12517 initial values, since they're never used.
12518 (set_goto_map): ngotos is now unsigned, so test for overflow
12519 by seeing whether it wraps around to zero.
12520 * src/lalr.h (goto_number): Now size_t, not short int.
12521 (GOTO_NUMBER_MAXIMUM): Remove.
12522 * src/relation.c (relation_print, traverse, relation_transpose):
12523 Check for END_NODE rather than looking at sign.
12524 * src/relation.h (END_NODE): New macro.
12525 (relation_node): Now size_t, not short int.
12526
12527 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
12528
12529 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
12530 keyword, not an identifier. Problem reported by Baron Schwartz in
12531 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
12532
12533 2004-10-11 Akim Demaille <akim@epita.fr>
12534
12535 * src/symtab.c (symbol_check_alias_consistency): Also check
12536 type names, destructors, and printers.
12537 Reported by Alexandre Duret-Lutz.
12538 Recode the handling of associativity and precedence in terms
12539 of symbol_precedence_set.
12540 Accept no redeclaration at all, not even equal to the previous
12541 value.
12542 (redeclaration): New.
12543 Use it to factor redeclaration complaints.
12544 (symbol_make_alias): Don't set the type of the alias, let
12545 symbol_check_alias_consistency do it as for other features.
12546 * src/symtab.h (symbol): Add new member prec_location, and
12547 type_location.
12548 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
12549 * tests/input.at (Incompatible Aliases): New.
12550
12551 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
12552
12553 .cvsignore fixes to accommodate gnulib changes,
12554 and the practice of naming build directories "_build".
12555 * .cvsignore: Add "_*". Sort.
12556 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
12557 * m4/.cvsignore: Add "*_gl.m4".
12558
12559 2004-10-06 Akim Demaille <akim@epita.fr>
12560
12561 * src/parse-gram.y (add_param): Fix the truncation of trailing
12562 spaces.
12563
12564 2004-10-05 Akim Demaille <akim@epita.fr>
12565
12566 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
12567 whether the reducion was empty or not. This leaves room to
12568 improve the use of YYLLOC_DEFAULT in such a case.
12569 lalr1.cc is still experimental, so changing this is acceptable.
12570 And finally, there are probably not many users who changed the
12571 handling of locations in GLR, so changing is admissible too.
12572
12573 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
12574 empty reduction, set @$ to an empty location ending the previously
12575 stacked symbol.
12576 Adjust uses to make sure the code is triggered on empty
12577 reductions.
12578 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
12579 expected output: empty reductions have empty locations.
12580
12581 2004-09-29 Akim Demaille <akim@epita.fr>
12582
12583 * data/lalr1.cc: Move towards a more standard C++ coding style
12584 for templates: Class < T > -> Class<T>.
12585
12586 2004-09-29 Akim Demaille <akim@epita.fr>
12587
12588 * data/lalr1.cc: Reinstall the former ctor, for sake of
12589 compatibility, but warn it will be removed.
12590 Move towards a more standard C++ coding style (i.e., type *var ->
12591 type* var).
12592
12593 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
12594
12595 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
12596 since it's less likely to work if NULs are involved in the future.
12597
12598 2004-09-27 Akim Demaille <akim@epita.fr>
12599
12600 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
12601
12602 2004-09-27 Akim Demaille <akim@epita.fr>
12603
12604 * data/lalr1.cc (b4_parse_param_decl_1): New.
12605 (b4_parse_param_decl): Use it to have different names between attribute
12606 and argument names.
12607 (b4_cc_constructor_call): Likewise.
12608
12609 2004-09-24 Akim Demaille <akim@epita.fr>
12610
12611 * src/parse-gram.y (add_param): Strip the leading and trailing
12612 blanks from a formal argument declaration.
12613 (YY_LOCATION_PRINT): New.
12614
12615 2004-09-24 Akim Demaille <akim@epita.fr>
12616
12617 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
12618 after the location.
12619
12620 2004-09-24 Akim Demaille <akim@epita.fr>
12621
12622 * doc/bison.texinfo (Table of Symbols): Sort.
12623
12624 2004-09-21 Akim Demaille <akim@epita.fr>
12625
12626 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
12627 the useless parentheses.
12628 Suggested by Paul Eggert.
12629
12630 2004-09-20 Akim Demaille <akim@epita.fr>
12631
12632 Let the initial-action act on the look-ahead, and use it for the
12633 "initial push" (corresponding to an hypothetical beginning-of-file).
12634 And let lalr1.cc honor %initial-action.
12635
12636 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
12637 example.
12638 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
12639 (Parser::Parser): Remove the ctor that used to initialize it.
12640 (Parser::parse): Like in the other skeletons, issue the "starting
12641 parse" message before any action.
12642 Honor %initial-action.
12643 Initialize the stacks with the lookahead.
12644 * data/yacc.c: Let $$ and @$ in %initial-action designate the
12645 look-ahead.
12646 Push them in the stacks.
12647 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
12648
12649 2004-09-20 Akim Demaille <akim@epita.fr>
12650
12651 * doc/bison.texinfo (Initial Action Decl): New.
12652
12653 2004-09-20 Akim Demaille <akim@epita.fr>
12654
12655 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
12656 clearer criterion to define it.
12657 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
12658 When reducing on an empty RHS, use the latest stacked location as
12659 location.
12660 yylloc is not always available.
12661 * data/glr.c: Likewise.
12662 Also, honor initial-actions.
12663
12664 2004-09-20 Akim Demaille <akim@epita.fr>
12665
12666 * data/yacc.c (YY_LOCATION_PRINT): New.
12667 Define when we know YYLTYPE's structure, i.e., when the default
12668 YYLLOC_DEFAULT is used.
12669 * data/c.m4 (b4_yysymprint_generate): Use it.
12670 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
12671 value of the result.
12672 (error_start_): Replace with...
12673 (error_range_): this location array.
12674 This allows to replace code relying on the implementation of
12675 locations by portable code.
12676 * data/yacc.c (yylerrsp): Replace with...
12677 (yyerror_range): this.
12678 Every time a token is popped, update yyerror_range[0], to have an
12679 accurate location for the error token.
12680 * data/glr.c (YY_LOCATION_PRINT): New.
12681 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
12682 deference a pointer.
12683 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
12684 report the location in %printers.
12685
12686 * src/scan-skel.l: Instead of abort, report error messages to ease
12687 understanding skeleton scanning failures.
12688
12689 2004-09-16 Akim Demaille <akim@epita.fr>
12690
12691 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
12692 (iterator, const_iterator): these, to be more in the C++ spirit.
12693 Also, return reverse iterators so that when displaying the stack
12694 we display its bottom first.
12695 (Parser::stack_print_, Parser::reduce_print_): Match the messages
12696 from yacc.c.
12697 We should probably use vector here though.
12698
12699 2004-09-16 Akim Demaille <akim@epita.fr>
12700
12701 Have more complete shift traces.
12702
12703 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
12704 to report Shifts instead of ad hoc YYDPRINTF invocations,
12705 including for the error token.
12706 * data/lalr1.cc (symprint_): Output the location.
12707 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
12708 output the location within the %printer.
12709 Activate GLR tests, at least to make sure they compile properly.
12710 They still don't pass though.
12711 * tests/calc.at: Adjust expect verbose output, since now "Entering
12712 state..." is on a different line than the "Shifting" message.
12713
12714 2004-09-08 Akim Demaille <akim@epita.fr>
12715
12716 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
12717 Bison directive from the Bison file to the invocation of this
12718 macro, so that these directives are passed to
12719 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
12720 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
12721 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
12722 the extra Bison directives instead of the whole series.
12723 Change the grammar so that there are recoverable errors, and
12724 unrecoverable errors. Now we can have the parser give up before
12725 consuming the whole input. As a result we now can observe that
12726 the lookahead is freed when needed.
12727 Change the parser source to parse argv[1] instead of a hard coded
12728 string.
12729 Simplify yylex, and give a value and location to EOF.
12730 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
12731 passed directives already coded in the file.
12732 Add some tests to check the location of "error".
12733 For some tests, the C++ parser is correct, and not yacc.c.
12734 For other tests, they provide different, but unsatisfying, values,
12735 so keep the C++ value so that at least one parser is "correct"
12736 according to the test suite.
12737 (Actions after errors): Remove, this is subsumed by the
12738 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
12739
12740 2004-09-06 Akim Demaille <akim@epita.fr>
12741
12742 * data/lalr1.cc: Adjust the indentation of the labels.
12743 (Parser::pop): New.
12744 Use it.
12745
12746 2004-09-06 Akim Demaille <akim@epita.fr>
12747
12748 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
12749 argument, an informative message.
12750 Call YY_SYMBOL_PRINT.
12751 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
12752 * data/lalr1.cc (destruct_): Likewise.
12753 In addition, no longer depend on b4_yysymprint_generate and
12754 b4_yydestruct_generate to generate these functions, do it "by
12755 hand".
12756
12757 2004-09-03 Akim Demaille <akim@epita.fr>
12758
12759 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
12760 invoked, yydestruct the lookahead.
12761 * tests/calc.at (Calculator $1): Update the expected lengths of
12762 traces: there is an added line for the discarded lookahead.
12763 * doc/bison.texinfo (Destructor Decl): Some rewording.
12764 Define "discarded" symbols.
12765
12766 2004-09-02 Akim Demaille <akim@epita.fr>
12767
12768 * data/lalr1.cc (translate_, destruct_): No reason to be static.
12769
12770 2004-09-02 Akim Demaille <akim@epita.fr>
12771
12772 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
12773 (YYDSYMPRINTF): Rename as...
12774 (YY_SYMBOL_PRINT): this.
12775 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
12776 two.
12777 Use it instead of direct symprint_ calls.
12778 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
12779 one.
12780
12781 2004-09-02 Akim Demaille <akim@epita.fr>
12782
12783 * data/lalr1.cc (b4_yysymprint_generate): New.
12784 (symprint_): New member function, defined when YYDEBUG.
12785 Use it consistently instead of token/nterm debugging output by
12786 hand.
12787 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
12788 %printer calls to use cdebug_ when using lalr1.cc.
12789
12790 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
12791
12792 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
12793 with #ifdef YYDEBUG.
12794
12795 2004-08-26 Akim Demaille <akim@epita.fr>
12796
12797 * doc/bison.texinfo (Implementing Loops): Rename as...
12798 (Implementing Gotos/Loops): this.
12799
12800 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
12801
12802 Adjust to latest gnulib.
12803 * bootstrap (gnulib_modules): Add xalloc-die.
12804 Set LC_ALL=C so that file names sort consistently.
12805 Prefer the gnulib copies of gettext.m4, glibc21.m4,
12806 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
12807 uintmax_t.m4, ulonglong.m4.
12808 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
12809 po.m4 since we are now using _gl.m4 instead.
12810
12811 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
12812
12813 * src/scan-action.l: Remove. Scanning of semantic actions is
12814 handled in scan-gram.l.
12815
12816 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
12817
12818 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
12819
12820 * src/location.h (struct): The file member is a uniqstr.
12821 (equal_boundaries): Use UNIQSTR_EQ for comparison.
12822
12823 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
12824
12825 Fix bug with non-%union parsers that have printers or destructors,
12826 which led to a Bison core dump. Reported by Peter Fales in
12827 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
12828
12829 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
12830 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
12831 not to our own type.
12832 * src/output.c (symbol_destructors_output, symbol_printers_output):
12833 Don't assume %union.
12834 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
12835 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
12836 UNION-FLAG. All callers changed.
12837 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
12838 Use type char, not unsigned int, when declaring an array of char;
12839 this lets us remove a cast.
12840 (Printers and Destructors): Add non-%union test cases.
12841
12842 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12843
12844 * doc/bison.texinfo: Minor editorial changes, mostly to the new
12845 GLR writeups. E.g., avoid frenchspacing and the future tense,
12846 change "lookahead" to "look-ahead", and change "wrt" to "with
12847 respect to".
12848
12849 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12850
12851 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12852 New sections, split off from the GLR Parsers section. Put the new
12853 Simple GLR Parser near the start of the GLR section, for clarity.
12854 Rewrite connective text.
12855
12856 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
12857
12858 * doc/bison.texinfo (Simple GLR Parsers): New section.
12859
12860 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12861
12862 * NEWS, TODO, doc/bison.texinfo:
12863 Use "look-ahead" instead of "lookahead", to be consistent.
12864 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12865 while we're fixing "look-ahead".
12866 * src/conflicts.c (shift_set): Renamed from shiftset.
12867 (look_ahead_set): Renamed from lookaheadset.
12868 * src/print.c: Likewise.
12869 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12870 name for "lookahead".
12871 (report_types, usage): Likewise.
12872 * src/getargs.h (report_look_ahead_tokens): Renamed from
12873 report_lookaheads.
12874 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12875 compute_lookaheads.
12876 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12877 (look_ahead_tokens_print): Renamed from lookaheads_print.
12878 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12879 state_rule_lookaheads_print.
12880 * src/state.h: Likewise.
12881 (reductions.look_ahead_tokens): Renamed from lookaheads.
12882 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12883 AT_DATA_LOOKAHEADS_GRAMMAR.
12884
12885 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12886
12887 * README: Update location of patched M4 distribution.
12888
12889 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12890
12891 Don't assume the C++ compiler takes the same arguments as the C compiler
12892 (trivial change).
12893 * configure.ac (O0CXXFLAGS): New var.
12894 * tests/atlocal.in (CXXFLAGS): Use it.
12895
12896 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12897
12898 Fix some "make check" problems with C++ reported by
12899 Albert Chin-A-Young for Tru64 C++ in this thread:
12900 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12901
12902 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12903 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12904 Output to a .cc file for C++, not to a .c file.
12905 * tests/calc.at (AT_CHECK_CALC): Likewise.
12906 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12907 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12908
12909 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12910
12911 * tests/calc.at, tests/actions.at: Workaround for SGI
12912 C++ compiler. (trivial change)
12913
12914 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12915
12916 Spent a few hours checking out which prerequisite versions the
12917 current sources actually require. I went all the way back to
12918 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12919 a seemingly endless set of combinations of versions more recent
12920 than that. The bottom line is that the current sources require
12921 fairly recent versions of the build tools, and it'll be some work
12922 to change this.
12923 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12924 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12925 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12926 Add comments explaining why those particular versions are
12927 currently needed.
12928
12929 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12930 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12931 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12932
12933 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12934 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12935
12936 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12937
12938 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12939 0.11.5. Suggested by Bruno Haible.
12940 * bootstrap: Remove gettext version checking.
12941
12942 * doc/bison.texinfo (Decl Summary): Also mention that %union
12943 can depend on prerequisite types. Problem reported by Tim
12944 Van Holder.
12945
12946 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12947
12948 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12949 * README-alpha: Don't tell people not to package this.
12950
12951 * bootstrap: Don't assume $(...) works; use `...` instead.
12952 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12953 gettext better.
12954
12955 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12956 put into the -d output file, and mention what to do if YYSTYPE is
12957 defined as a macro.
12958
12959 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12960
12961 Undo change made earlier today: it caused autopoint to not bring
12962 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12963 autopoint's.
12964
12965 * bootstrap: Check that gettext version matches what's in
12966 configure.ac. Warn users to ignore robots.txt ERROR 404.
12967 * bootstrap: Undo today's earlier change (logged below).
12968 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12969
12970 The gettext version checking is causing more trouble than it's
12971 curing; remove it. Problem reported by Paul Hilfinger.
12972
12973 * bootstrap: Issue a warning that one can expect a message
12974 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12975 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12976
12977 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12978
12979 Ensure that the C++ compiler used for testing actually works on a
12980 simple test program; if not, skip the C++-related tests. Problem
12981 reported by Vin Shelton in:
12982 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12983
12984 * m4/cxx.m4: New file.
12985 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12986 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12987 * tests/local.at (AT_COMPILE_CXX): Use it.
12988
12989 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12990
12991 * data/glr.c (yylloc): Output this macro even if locations are not
12992 being generated, as the GLR parser needs it even in that case.
12993 Problem reported by Troy A. Johnson
12994 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12995
12996 * configure.ac (AC_INIT): Update to 1.875e.
12997
12998 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12999
13000 * NEWS: Version 1.875d.
13001 * configure.ac (AC_INIT): Likewise.
13002 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13003
13004 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13005 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13006 lalr1.cc runs afoul of the first, and the last two are no longer
13007 supported by GCC 3.4.0.
13008 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13009 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13010
13011 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13012
13013 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13014 unsigned int, for compatibility with latest gnulib hash module.
13015 * src/state.c (state_hash, state_hasher): Likewise.
13016 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13017 * src/uniqstr.c (hash_uniqstr): Likewise.
13018
13019 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13020
13021 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13022
13023 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13024 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13025 character and string literals.
13026 (unexpected_end): New function.
13027 (unexpected_eof): Use it.
13028 (unexpected_newline): New function.
13029 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13030 actions.
13031
13032 * NEWS: Document %expect-rr.
13033
13034 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13035 Fix typo by replacing $1 with $option.
13036 Remove more 'intl'-related files.
13037 Don't DEFUN AM_INTL_SUBDIR twice.
13038
13039 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13040 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13041 strtoul.c.
13042 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13043 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13044 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13045 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13046 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13047 * src/.cvsignore: Add *.output.
13048
13049 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13050 gets copied to the output file.
13051
13052 2004-04-28 Paul Eggert <eggert@twinsun.com>
13053
13054 Get files from the gnulib and po repositories, instead of relying
13055 on them being in our CVS. Upgrade to latest versions of gnulib
13056 and Automake.
13057
13058 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13059 * bootstrap: Bootstrap from gnulib and po repositories.
13060 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13061 * README-cvs: Document these changes. Remove version numbers from
13062 mentions of build tools, since they change so often. Mention Flex.
13063
13064 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13065 (gl_USE_SYSTEM_EXTENSIONS): Add.
13066 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13067 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
13068 does this for us.
13069 (AC_ISC_POSIX): Remove; we no longer support this
13070 ancient OS, as it gets in the way of latest Autoconf & gnulib.
13071 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13072 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13073 Do not check for C89 headers, except for locale.h which is used
13074 by the Yacc library and must port to K&R hosts.
13075 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13076 Do not check for C89 functions, except for setlocale which is
13077 used by the Yacc library.
13078 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13079 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13080 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13081 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13082 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13083 AM_GNU_GETTEXT): Remove; now done by:
13084 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13085 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13086 for us.
13087
13088 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13089 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13090 Define to empty, as gnulib.mk will do the rest for us.
13091 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13092 for us.
13093 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13094 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13095
13096 * src/files.c: Include gnulib's xstrndup.h.
13097
13098 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13099 (REALLOC): Use xnrealloc, for likewise.
13100 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13101 (strnlen, memrchr): Remove decls; functions no longer used.
13102 Include <stpcpy.h>.
13103
13104 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13105 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13106 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13107 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13108 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13109 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13110 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13111 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13112 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13113 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13114 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13115 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13116 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13117 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13118 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13119 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13120 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13121 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13122 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13123 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13124 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13125 Remove, as these files are now generated automatically
13126 by bootstrap or automake.
13127
13128 * po/ChangeLog: Remove: all but one entry was a duplicate
13129 of this file, and I moved that 2000-11-02 entry here.
13130
13131 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13132 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13133 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13134 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13135 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13136 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13137 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13138 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13139 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13140 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13141 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13142 xstrndup.h.
13143 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13144 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13145 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13146 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13147 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13148 * src/.cvsignore: Remove *_.c.
13149
13150
13151 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13152 support it. (The latest stable gzip doesn't.)
13153
13154 2004-04-27 Paul Eggert <eggert@twinsun.com>
13155
13156 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13157 case, as stos_ is now used by destructors due to the 2004-02-09
13158 change.
13159
13160 Remove more K&R C support.
13161 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13162 * lib/subpipe.c (errno): Remove decl.
13163 Include <stdlib.h> unconditionally.
13164 (EXIT_FAILURE): Remove macro.
13165 * src/complain.c (vfprintf, strerror): Remove.
13166 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13167 unconditionally.
13168 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13169 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13170 (strchr, strspn, memchr): Remove decls.
13171 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13172 unconditionally. Do not declare perror.
13173 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13174 unconditionally.
13175
13176 * src/complain.c (_): Remove useless defn, as system.h defines this.
13177
13178 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13179 with latest obstack.h.
13180 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13181 to procedure types, as obstack.h now does that for us.
13182 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13183
13184 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13185 so that this include file can stand alone.
13186 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13187 does this now. Include subpipe.h first after config.h, to
13188 test whether it can stand alone.
13189
13190 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13191 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13192 unused declaration.
13193
13194 * tests/synclines.at (%union synch line): Put a dummy member in
13195 the union, because empty unions aren't allowed in C. Caught
13196 by GCC 3.4.0.
13197
13198 2004-04-13 Jim Meyering <jim@meyering.net>
13199
13200 * src/conflicts.c (conflicts_print): Correct format string typo:
13201 use `%%' to produce literal `%'. (trivial change)
13202
13203 2004-03-30 Paul Eggert <eggert@twinsun.com>
13204
13205 * src/getargs.c (version): Update copyright year to 2004.
13206
13207 * data/c.m4 (b4_int_type): Use 'short int' rather than
13208 'short', and similarly for 'long', 'unsigned', etc.
13209 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13210 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13211 yy_yypstack, yydumpstack): Likewise.
13212 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13213 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13214 Likewise.
13215 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13216 yy_stack_print, yyparse): Likewise.
13217 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13218 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13219 * lib/bitset.c (bitset_print): Likewise.
13220 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13221 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13222 * lib/bitsetv.c (bitsetv_dump): Likewise.
13223 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13224 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13225 Likewise.
13226 * src/LR0.c (allocate_itemsets): Likewise.
13227 * src/gram.h (rule_number, rule): Likewise.
13228 * src/lalr.h (goto_number): Likewise.
13229 * src/nullable.c (nullable_compute): Likewise.
13230 * src/output.c (prepare_rules): Likewise.
13231 * src/relation.c (relation_print, relation_digraph): Likewise.
13232 * src/relation.h (relation_node): Likewise.
13233 * src/state.h (state_number, transitions, errs, reductions,
13234 struct state): Likewise.
13235 * src/symtab.h (symbol_number, struct symbol): Likewise.
13236 * src/tables.c (vector_number, tally, action_number,
13237 default_goto, goto_actions): Likewise.
13238 * tests/existing.at (GNU Cim Grammar): Likewise.
13239 * tests/regression.at (Web2c Actions): Likewise.
13240
13241 * src/output.c (muscle_insert_short_int_table): Renamed from
13242 muscle_insert_short_table. All uses changed.
13243
13244 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13245
13246 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13247 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13248 Add %expect-rr rule.
13249
13250 * src/scan-gram.l: Recognize %expect-rr.
13251
13252 * src/conflicts.h (expected_sr_conflicts): Rename from
13253 expected_conflicts.
13254 (expected_rr_conflicts): Declare.
13255
13256 * src/conflicts.c (expected_sr_conflicts): Rename from
13257 expected_conflicts.
13258 (expected_rr_conflicts): Define.
13259 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13260 for GLR parsers.
13261 Use expected_sr_conflicts in place of expected_conflicts.
13262 Warn if expected_rr_conflicts used in non-GLR parser.
13263
13264 * doc/bison.texinfo: Add documentation for %expect-rr.
13265
13266 2004-03-08 Paul Eggert <eggert@gnu.org>
13267
13268 Add support for hex token numbers. Suggested by Odd Arild Olsen in
13269 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
13270
13271 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13272 in lalr1.cc.
13273 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13274 * src/scan-gram.l (scan_integer): New function.
13275 ({int}): Use it.
13276 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13277 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13278 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13279 Say "long int", not "long", for uniformity with GNU style.
13280
13281 2004-02-25 Paul Eggert <eggert@twinsun.com>
13282
13283 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13284 compilers. This fixes a problem with Intel's C++ compiler being
13285 chatty, reported by Guido Trentalancia in
13286 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
13287
13288 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13289
13290 Support %destructor and merge error locations in lalr1.cc.
13291
13292 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13293 (Parser::stos_): Define unconditionally.
13294 (Parser::destruct_): New method. Generate its body with
13295 b4_yydestruct_generate.
13296 (Parser::error_start_): New attribute.
13297 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13298 token which are discarded.
13299 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13300 error_start_ when erroneous token are discarded.
13301 (Parser::parse) <yyerrlab1>: Compute the location of the error
13302 token so that it covers all the discarded tokens.
13303 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13304 it can be called with `%skeleton "lalr1.cc"', and do that.
13305
13306 2004-02-02 Paul Eggert <eggert@twinsun.com>
13307
13308 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13309 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13310 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13311 There's no need to mention top_builddir since Automake does that
13312 for us.
13313 (INCLUDES): Remove, as Automake says it's obsolescent.
13314 Contents migrated into AM_CPPFLAGS as described above.
13315 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13316
13317 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13318
13319 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13320 (yyreportSyntaxError): Handle case where lookahead token is
13321 YYEMPTY.
13322
13323 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13324
13325 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13326 resulting parsers are compilable with C++.
13327
13328 2003-12-23 Paul Eggert <eggert@twinsun.com>
13329
13330 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13331 * src/output.c (output_skeleton): Rename local var.
13332 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13333 Bison tokens, as this runs afoul of the 2003-10-07 change that
13334 disallowed NUL bytes in character constants or string literals.
13335
13336 * tests/local.at: Require Autoconf 2.59's Autotest.
13337 * tests/testsuite.at: Don't include local.at, since we now assume
13338 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13339 including it.
13340 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13341 multiple inclusion warnings.
13342
13343 2003-12-02 Akim Demaille <akim@epita.fr>
13344
13345 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13346 conditions.
13347 From Bruno Haible.
13348
13349 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13350
13351 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13352
13353 2003-10-07 Paul Eggert <eggert@twinsun.com>
13354
13355 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13356 if testsuite doesn't exist.
13357
13358 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13359 literals, unfortunately.
13360 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13361 Complain about NUL bytes in character constants or string literals.
13362
13363 2003-10-05 Paul Eggert <eggert@twinsun.com>
13364
13365 * NEWS: Don't document %no-default-prec, as it's still
13366 too experimental.
13367 * doc/bison.texinfo: Document %no-default-prec only if
13368 the defaultprec flag is set. Normally it's not.
13369
13370 2003-10-04 Paul Eggert <eggert@twinsun.com>
13371
13372 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13373 non-modifiable lvalue, instead of a modifiable one.
13374 * doc/bison.texinfo (Actions): Document that $$ can
13375 be assigned to. Do not claim that $$ and $N are
13376 array element references: user code should not rely on this.
13377
13378 2003-10-01 Paul Eggert <eggert@twinsun.com>
13379
13380 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
13381 (grammar_declaration): Use it.
13382 * src/scan-gram.l: New token %no-default-prec.
13383 * tests/conflicts.at: Revamp tests to use %no-default-prec.
13384 * NEWS, doc/bison.texinfo: Document the above.
13385
13386 2003-10-01 Akim Demaille <akim@epita.fr>
13387
13388 VCG no longer supports long_straight_phase.
13389
13390 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
13391 * src/print_graph.c (print_graph): Adjust.
13392
13393 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
13394 and Paul Eggert <eggert@twinsun.com>
13395
13396 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
13397 Table of Symbols): Document %default-prec.
13398 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
13399 (grammar_declaration): Set default_prec on %default-prec.
13400 * src/scan-gram.l (%default-prec): New token.
13401 * src/reader.h (default_prec): New flag.
13402 * src/reader.c: Likewise.
13403 (packgram): Handle it.
13404 * tests/conflicts.at (%default-prec without %prec,
13405 %default-prec with %prec, %default-prec 1): New tests.
13406
13407 2003-09-30 Paul Eggert <eggert@twinsun.com>
13408
13409 * tests/testsuite.at: Include local.at, not input.at, fixing
13410 a typo in the 2003-08-25 patch.
13411
13412 2003-08-27 Akim Demaille <akim@epita.fr>
13413
13414 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
13415 GCC warnings.
13416
13417 2003-08-26 Akim Demaille <akim@epita.fr>
13418
13419 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
13420 "<\#" to avoid magic from Gnus when posting parts of this script.
13421
13422 2003-08-26 Akim Demaille <akim@epita.fr>
13423
13424 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
13425 (Parser::parse): here.
13426 Adjust: nerrs and errstatus is now replaced by...
13427 (Parser::nerrs_, Parser::errstatus_): New.
13428
13429 2003-08-25 Akim Demaille <akim@epita.fr>
13430
13431 * config/announce-gen, Makefile.cfg: New.
13432 * Makefile.am: Adjust.
13433 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
13434 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
13435
13436 2003-08-25 Akim Demaille <akim@epita.fr>
13437
13438 When reducing initial empty rules, Bison parser read an initial
13439 location that is not defined. This results in garbage, and that
13440 affects Bison's own parser. Therefore we need (i) to extend Bison
13441 to support a means to initialize this location, and (ii) to use
13442 this CVS Bison to fix CVS Bison's parser.
13443
13444 * src/reader.h, reader.c (epilogue_augment): Remove, replace
13445 with...
13446 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
13447 * src/parse-gram.y: Adjust.
13448 (%initial-action): New.
13449 (%error-verbose): Since we require CVS Bison, there is no reason
13450 not to use it.
13451 * src/scan-gram.l: Adjust.
13452 * src/Makefile.am (YACC): New, to make sure we use our own parser.
13453 * data/yacc.c (yyparse): Use b4_initial_action.
13454
13455 2003-08-25 Akim Demaille <akim@epita.fr>
13456
13457 * doc/bison.texinfo: Don't promote stdout for error messages.
13458
13459 2003-08-25 Akim Demaille <akim@epita.fr>
13460
13461 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
13462 From Alexandre Duret-Lutz.
13463
13464 2003-08-25 Akim Demaille <akim@epita.fr>
13465
13466 Version 1.875c.
13467
13468 2003-08-25 Akim Demaille <akim@epita.fr>
13469
13470 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
13471 Use them.
13472
13473 2003-08-25 Akim Demaille <akim@epita.fr>
13474
13475 * data/lalr1.cc (Parser::reduce_print_): New.
13476 Use it.
13477
13478 2003-08-25 Akim Demaille <akim@epita.fr>
13479
13480 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
13481 error recovery loops. This patch is based on
13482 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
13483 Also, augment the similarity between lalr1.cc and yacc.c.
13484 Note: the locations of error recovery rules are not correct yet.
13485
13486 * data/lalr1.cc: Comment changes to augment the similarity between
13487 lalr1.cc and yacc.c.
13488 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
13489 (yyerrlab1): Remove, but where it used to be (now the bottom part of
13490 yyerrlab), when hitting EOF, pop the whole stack here instead of
13491 merely falling thru the default error handling mechanism.
13492 (yyerrorlab): New label, with the old contents of YYERROR,
13493 plus the following change: pop the stack of rhs corresponding
13494 to the production that invoked YYERROR. That is how Yacc
13495 behaves (required by POSIX).
13496 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
13497 fail.
13498
13499 2003-08-25 Akim Demaille <akim@epita.fr>
13500
13501 Tune local.at so that people can "autom4te -l autotest calc.at -o
13502 calc" for instance, to extract a sub test suite.
13503
13504 * tests/testsuite.at: Move the initialization, Autotest version
13505 requirement, and AT_TESTED invocation into...
13506 * tests/local.at: here.
13507 * tests/testsuite.at: Include it for compatibility with Autoconf
13508 2.57.
13509 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
13510 be ignore.
13511
13512 2003-08-04 Paul Eggert <eggert@twinsun.com>
13513
13514 Rework code slightly to avoid gcc -Wtraditional warnings.
13515 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
13516 The returned value is now stored in *YY0. All callers changed.
13517 * src/output.c (merge_output): Adjust to the above change.
13518
13519 2003-07-26 Paul Eggert <eggert@twinsun.com>
13520
13521 * data/glr.c (YYASSERT): New macro.
13522 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
13523 yyresolveStates, yyprocessOneStack):
13524 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
13525 Derived from a suggestion by Frank Heckenbach.
13526
13527 2003-07-25 Paul Eggert <eggert@twinsun.com>
13528
13529 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
13530 for portability to K&R C (after ansi2knr, presumably). See
13531 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
13532 by Frank Heckenbach, though I have omitted the structure-initialization
13533 part of his glr-knr.diff patch since I recall that the Portable
13534 C Compiler didn't require that change.
13535
13536 Let the user specify how to allocate and free memory.
13537 Derived from a suggestion by Frank Heckenbach in
13538 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
13539 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
13540 All uses of free, malloc, realloc changed to use these macros,
13541 and unnecessary casts removed.
13542 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
13543
13544 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
13545
13546 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
13547 use s.empty() rather than s == "" to test for empty string; see
13548 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
13549 (trivial change)
13550
13551 2003-06-25 Akim Demaille <akim@epita.fr>
13552
13553 * config/depcomp, config/install-sh: Update from masters.
13554
13555 2003-06-20 Paul Eggert <eggert@twinsun.com>
13556
13557 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
13558 and return properly parenthesized result.
13559 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
13560 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13561 Remove unnecessary parentheses from uses.
13562 * doc/bison.texinfo (Location Default Action): Describe the
13563 conventions for parentheses.
13564
13565 2003-06-19 Paul Eggert <eggert@twinsun.com>
13566
13567 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
13568 yyreportTree): Do not assume that size_t is the same width as int,
13569 when printing sizes. Print sizes using an unsigned format.
13570 Problem reported by Frank Heckenbach in
13571 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
13572
13573 Port to Forte Developer 7 C compiler.
13574 * data/glr.c (struct YYLTYPE): If locations are not being used,
13575 declare a single dummy member, as empty structs do not conform
13576 to the C standard.
13577 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
13578 the Forte Developer 7 C compiler complains that end-of-loop
13579 code is not reached.
13580
13581 2003-06-17 Paul Eggert <eggert@twinsun.com>
13582
13583 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
13584 avoid warnings from picky compilers about redefinition of PARAMS.
13585
13586 2003-06-17 Paul Eggert <eggert@twinsun.com>
13587
13588 Version 1.875b.
13589
13590 * NEWS: Document 1.875b.
13591
13592 * lib/bbitset.h: Do not include config.h; that's the includer's job.
13593 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
13594 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
13595 Don't use 'index' in comments, as it's a builtin fn on some hosts.
13596 * lib/bitset_stats.c: Include gettext.h unconditionally, as
13597 per recent gettext manual's suggestion.
13598 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
13599 Use prototypes, not old-style definitions.
13600 * lib/lbitset.c (lbitset_unused_clear): Likewise.
13601 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
13602 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
13603 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
13604 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
13605 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
13606 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
13607 vbitset_or_and_cmp, vbitset_copy): Likewise.
13608
13609 * lib/libiberty.h: Do not include config.h; that's the includer's job.
13610 Do not include <stdlib.h>.
13611 (PARAMS): Define unconditionally for C89.
13612 (ATTRIBUTE_NORETURN): Remove.
13613 (ATTRIBUTE_UNUSED): Define unconditionally.
13614
13615 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
13616 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
13617 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
13618 * lib/vbitset.c, lib/vbitset.h: New files.
13619 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13620 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
13621 from libbitset.
13622
13623 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
13624 `How Can I Reset @code{yyparse}', since texinfo does not allow
13625 arbitrary @ in node names.
13626
13627 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
13628 shouldn't be needed according to the gettext 0.12.1 documentation
13629 but which seem to be needed anyway: codeset.m4 glibc21.m4
13630 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
13631 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
13632 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
13633
13634 * lib/.cvsignore: Add stdbool.h.
13635 * m4/.cvsignore: Add nls.m4, po.m4.
13636
13637 Upgrade to CVS gnulib.
13638 * stdbool_.h: File renamed from stdbool.h.in.
13639 * configure.ac (AM_STDBOOL_H): Invoke this instead of
13640 AC_HEADER_STDBOOL.
13641 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
13642 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
13643 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
13644 (MOSTLYCLEANFILES): New var.
13645 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
13646 (stdbool.h): New rule.
13647 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
13648 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
13649 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
13650 m4/quote.m4: Upgrade to today's gnulib.
13651
13652 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
13653 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
13654 the tests right now.
13655 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
13656 yyerror are declared before use; C99 requires this.
13657
13658 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13659
13660 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
13661 first.
13662 (yyrecoverSyntaxError): Correct the logic for setting and testing
13663 yyerrState.
13664 Correct comment on handling EOF.
13665 Allow states with only a default reduction, rather than failing
13666 (I can't quite reconstruct why these were not allowed before).
13667
13668 Fixes to avoid problem that $-N rules in GLR parsers can cause
13669 buffer overruns, corrupting state.
13670
13671 * src/output.c (prepare_rules): Output max_left_semantic_context
13672 definition.
13673 * src/reader.h (max_left_semantic_context): New variable declaration.
13674 * src/scan-gram.l (max_left_semantic_context): Define.
13675 (handle_action_dollar): Update max_left_semantic_context.
13676 * data/glr.c (YYMAXLEFT): New definition.
13677 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
13678 (yyresolveAction): Ditto.
13679
13680 Fixes to problems with location handling in GLR parsers reported by
13681 Frank Heckenbach (2003/06/05).
13682
13683 * data/glr.c (YYLTYPE): Make trivial if locations not used.
13684 (YYRHSLOC): Add parentheses, and define only if locations used.
13685 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
13686 locations not used.
13687 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
13688 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
13689
13690 * tests/cxx-type.at: Exercise location information; update tests
13691 to differentiate output with and without locations.
13692 Remove forward declarations of yylex and yyerror---caused errors
13693 because default YYLTYPE not yet defined.
13694 Change semantic actions to compute strings, rather than printing
13695 them directly (to test proper passing of semantics values). Change
13696 output to prefix notation and update test data and expected results.
13697 (yylex): Track locations.
13698 (stmtMerge): Return value rather than printing, and include arguments
13699 in value.
13700
13701 2003-06-03 Paul Eggert <eggert@twinsun.com>
13702
13703 Avoid warnings generated by GCC 2.95.4 when Bison is
13704 configured with --enable-gcc-warnings.
13705 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
13706 yy::]b4_parser_class_name[::translate_,
13707 yy::Stack::operator[] (unsigned),
13708 yy::Stack::operator[] (unsigned) const,
13709 yy::Slice::operator[] (unsigned),
13710 yy::Slice::operator[] (unsigned) const):
13711 Rename local vars to avoid warnings.
13712 * tests/glr-regression.at (Improper handling of embedded actions
13713 and $-N in GLR parsers): Remove unused local variable from yylex.
13714 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
13715 (void) as arg when not pure, since we now assume C89 when building
13716 Bison. Pacify GCC by using parameter.
13717
13718 2003-06-02 Paul Eggert <eggert@twinsun.com>
13719
13720 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
13721 yy::Location::lines, yy::Location::columns): Rename arguments
13722 to avoid shadowing; this removes a warning generated by GCC 3.3.
13723
13724 2003-06-01 Paul Eggert <eggert@twinsun.com>
13725
13726 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
13727 to g++, as GCC 3.3 complains if you do it.
13728 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
13729 everything that WARNING_CFLAGS has, except omit warnings
13730 not suitable for C++.
13731 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
13732 * tests/atlocal.in (CXXFLAGS): New var.
13733 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
13734
13735 Fix a GLR parser bug I reported in February; see
13736 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
13737 The problem was that GLR parsers did not conform to the C standard,
13738 because actions like { $1 = $2 + $3; } expanded to expressions
13739 that invoked YYFILL in separate subexpressions, and YYFILL assigned
13740 to a local variable. The C standard says that expressions
13741 like (var = f ()) + (var = f ()) have undefined behavior.
13742 Another problem was that GCC sometimes issues warnings that
13743 yyfill and its parameters are unused.
13744
13745 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
13746 as possibly unused.
13747 (yyfill): New function.
13748 (YYFILL): Use it.
13749 (yyuserAction): Change type of yynormal to bool, so that it matches
13750 the new yyfill signature. Mark it as possibly unused.
13751
13752
13753 Follow up on a bug I reported in February, where a Bison-generated
13754 parser can loop. Provide a test case and a fix for yacc.c. I
13755 don't have a fix for lalr1.cc or for glr.c, unfortunately.
13756 The original bug report is in:
13757 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
13758
13759 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
13760 macro's size was becoming unwieldy.
13761 (yyerrlab): Do not discard an empty lookahead symbol, as this
13762 might destroy garbage.
13763 (yyerrorlab): New label, with the old contents of YYERROR,
13764 plus the following change: pop the stack of rhs corresponding
13765 to the production that invoked YYERROR. That is how Yacc
13766 behaves, and POSIX requires this behavior.
13767 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
13768 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
13769 Define 'alarm' to do nothing if unistd.h is not available.
13770 Add a new rule "exp: '-' error;" to test the above change to
13771 data/yacc.c. Use 'alarm' to abort any test taking longer than
13772 10 seconds, as it's probably looping.
13773 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
13774 Also, the new yacc.c generates two fewer diagnostics for an
13775 existing test.
13776
13777 2003-05-24 Paul Eggert <eggert@twinsun.com>
13778
13779 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
13780 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
13781 This fixes a problem reported by John Bowman when the Compaq/HP
13782 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
13783 -ansi -Wall -gall).
13784 * data/yacc.c (union yyalloc): Likewise.
13785 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
13786
13787 Switch from 'int' to 'bool' where that makes sense.
13788
13789 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
13790 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
13791 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
13792 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
13793 Return or accept bool, not int. All callers changed.
13794 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
13795 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
13796 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
13797 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
13798 bitset_or_and_cmp_): Likewise.
13799 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
13800 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
13801 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
13802 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
13803 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
13804 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
13805 bitset_stats_or_and_cmp): Likewise.
13806 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
13807 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
13808 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
13809 ebitset_xor_cmp): Likewise.
13810 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
13811 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
13812 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
13813 lbitset_xor_cmp): Likewise.
13814 * lib/bbitset.h: Include <stdbool.h>.
13815 (struct bitset_vtable): The following members now return bool, not
13816 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
13817 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
13818 or_and_cmp).
13819 * src/conflicts.c (count_rr_conflicts): Likewise.
13820 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
13821 All uses changed.
13822 * lib/ebitset.c (ebitset_obstack_init): Likewise.
13823 * lib/lbitset.c (lbitset_obstack_init): Likewise.
13824 * src/getargs.c (debug_flag, defines_flag, locations_flag,
13825 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13826 graph_flag): Likewise.
13827 * src/getargs.h (debug_flag, defines_flag, locations_flag,
13828 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13829 graph_flag): Likewise.
13830 * src/output.c (error_verbose): Likewise.
13831 * src/output.h (error_verbose): Likewise.
13832 * src/reader.c (start_flag, typed): Likewise.
13833 * src/reader.h (typed): Likewise.
13834 * src/getargs.c (LOCATIONS_OPTION): New constant.
13835 (long_options, getargs): Use it.
13836 * src/lalr.c (build_relations): Use bool, not int.
13837 * src/nullable.c (nullable_compute): Likewise.
13838 * src/print.c (print_reductions): Likewise.
13839 * src/tables.c (action_row, pack_vector): Likewise.
13840 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
13841 * src/output.c (prepare): Use it.
13842 * src/output.c (token_definitions_output,
13843 symbol_destructors_output, symbol_destructors_output): Use string,
13844 not boolean integer, to keep track of whether to output separator.
13845 * src/print_graph.c (print_core): Likewise.
13846 * src/state.c (state_rule_lookaheads_print): Likewise.
13847
13848 * config/install-sh: Sync from automake 1.7.5.
13849
13850 2003-05-14 Paul Eggert <eggert@twinsun.com>
13851
13852 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13853 semicolon after a grammar declaration, in the interest of possible
13854 future changes to the Bison input language.
13855 Do not allow a stray semicolon at the start of the grammar.
13856 (rhses.1): Allow one or more semicolons after any rule, including
13857 just before "|" as required by POSIX.
13858 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13859 grammar.
13860
13861 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13862
13863 %parse-param support for lalr1.cc.
13864
13865 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13866 b4_cc_constructor_calls, b4_cc_constructor_call,
13867 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13868 definitions.
13869 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13870 parse-param arguments.
13871 (yy::b4_parser_class_name): Declare instance variables to
13872 hold parse-param arguments.
13873 * tests/calc.at: s/value/semantic_value/ because value clashes
13874 with a member of yy::b4_parser_class_name. Adjust C++ code
13875 to handle %parse-param. Enable %parse-param test in C++.
13876
13877 2003-05-12 Paul Eggert <eggert@twinsun.com>
13878
13879 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13880 English a bit. Fix fclose typo. Change "const char" to "char
13881 const", and use ANSI C rather than K&R for "main". Suggest
13882 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13883 and suggest yy_switch_to_buffer.
13884
13885 2003-05-05 Paul Eggert <eggert@twinsun.com>
13886
13887 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13888 C89. This avoids a diagnostic on compilers that define __STDC__
13889 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13890 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13891
13892 2003-05-03 Paul Eggert <eggert@twinsun.com>
13893
13894 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13895 Do not overrun array bounds.
13896 This should fix a bug reported today by Olatunji Oluwabukunmi in
13897 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13898
13899 2003-04-29 Akim Demaille <akim@epita.fr>
13900
13901 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13902 * src/getargs.c, src/getargs.h: here, as bool, not int.
13903 (nondeterministic_parser): New.
13904 * src/parse-gram.y, src/scan-gram.l: Support
13905 %nondeterministic-parser.
13906 * src/output.c (prepare): Use nondeterministic_parser instead
13907 of glr_parser where appropriate.
13908 * src/tables.c (conflict_row, action_row, save_row)
13909 (token_actions, token_actions, pack_vector): Ditto.
13910
13911 2003-04-29 Akim Demaille <akim@epita.fr>
13912
13913 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13914
13915 2003-04-29 Akim Demaille <akim@epita.fr>
13916
13917 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13918 with %pure-parser and %locations to exercise the patch from Yakov
13919 Markovitch below.
13920
13921 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13922
13923 * data/yacc.c: (b4_lex_param): Corrected for the case where
13924 %lex-param is provided and %pure-parser isn't.
13925
13926 2003-04-27 Paul Eggert <eggert@twinsun.com>
13927
13928 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13929 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13930 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13931 if it is not defined.
13932 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13933
13934 2003-04-26 Paul Eggert <eggert@twinsun.com>
13935
13936 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13937 Declare to be of type suitable for the ninf value itself, not of
13938 type suitable for the corresponding table, since the latter might
13939 be unsigned but the ninf value might be negative. This fixes a
13940 bug reported by Alexandre Duret-Lutz in
13941 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13942
13943 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13944 invokes it. We shouldn't invoke it twice because it will attempt
13945 to put error.o in the archive twice. This fixes a glitch reported
13946 by Martin Mokrejs in
13947 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13948
13949 2003-04-21 Paul Eggert <eggert@twinsun.com>
13950
13951 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13952 to gnulib.
13953
13954 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13955
13956 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13957 Fix obvious typo that results in uncompilable GLR parsers
13958 when both %pure-parser and %locations are used. (trivial change)
13959
13960 2003-04-17 Paul Eggert <eggert@twinsun.com>
13961
13962 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13963 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13964 Do not insert the expected token via unput, as this runs afoul
13965 of a POSIX-compatibility bug in flex 2.5.31.
13966 All uses changed to BEGIN the parent state,
13967 since we no longer insert the expected token via unput.
13968 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13969 that is no longer emitted after the above change.
13970
13971 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13972 the first one. This change is from Paul Hilfinger, and it fixes
13973 regression reported by Werner Lemberg in
13974 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13975
13976 (resolve_sr_conflict): Don't invoke state_errs_set
13977 unless one or more tokens have been explicitly made errors.
13978 Otherwise, the above change causes Bison to abort.
13979
13980 * tests/existing.at (GNU pic Grammar): New test case, taken from
13981 Lemberg's email.
13982
13983 2003-03-31 Akim Demaille <akim@epita.fr>
13984
13985 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13986
13987 2003-03-31 Akim Demaille <akim@epita.fr>
13988
13989 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13990 output.
13991
13992 2003-03-31 Akim Demaille <akim@epita.fr>
13993
13994 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13995 From Paul Hilfinger.
13996
13997 2003-03-29 Akim Demaille <akim@epita.fr>
13998
13999 * m4/error.m4: Do not put under dynamic conditions some code which
14000 expansion is under static control.
14001
14002 2003-03-29 Akim Demaille <akim@epita.fr>
14003
14004 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14005
14006 2003-03-29 Akim Demaille <akim@epita.fr>
14007
14008 * doc/bison.texinfo (Strings are Destroyed): New.
14009
14010 2003-03-13 Paul Eggert <eggert@twinsun.com>
14011
14012 * .cvsignore: Add configure.lineno.
14013 * src/.cvsignore: Add yacc.
14014 * tests/.cvsignore: Add testsuite.log.
14015 * doc/fdl.texi: Sync with latest FSF version.
14016
14017 2003-03-12 Paul Eggert <eggert@twinsun.com>
14018
14019 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14020 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14021 cursor, instead of leaving it undefined. This fixes a bug
14022 reported by Tim Van Holder in
14023 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14024 * tests/input.at (Torturing the Scanner): Test the scanner on
14025 an empty input file, which was Tim Van Holder's test case.
14026
14027 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14028 <sys/resource.h> can be included, include sys/time.h and
14029 sys/times.h first, if available. This works around the SunOS
14030 4.1.4 porting bug reported by Bruce Becker in
14031 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14032
14033 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14034 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14035 AC_HEADER_SYS_WAIT.
14036
14037 Merge changes from gnulib. This was prompted because the CVS
14038 snapshot didn't build on Solaris 7 due to strnlen problems.
14039
14040 These changes need to be merged back into gnulib:
14041 * lib/hash.c: Include <stdbool.h> unconditionally.
14042 * m4/onceonly.m4 (m4_quote): New macro.
14043 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14044 Quote AC_FOREACH variable-expansions properly.
14045 The 2003-01-03 obstack.h change also needs merging.
14046 {end of changes requiring merging}
14047
14048 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14049 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14050 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14051 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14052 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14053 New files, imported from gnulib.
14054 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14055 above.
14056
14057 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14058 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14059 gnulib sources.
14060
14061 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14062 Add.
14063 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14064 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14065 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14066 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14067 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14068 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14069 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14070 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14071 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14072 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14073 (jm_PREREQ_ARGMATCH): Remove.
14074 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14075 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14076
14077 * src/system.h: Include <stdbool.h> unconditionally.
14078
14079 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14080 assuming at least C89 in the bitset code for some time now.
14081
14082 2003-03-03 Akim Demaille <akim@epita.fr>
14083
14084 * ro.po: New.
14085
14086 2003-03-02 Akim Demaille <akim@epita.fr>
14087
14088 * doc/bison.texinfo (Table of Symbols): Reactivate the
14089 documentation for %lex-param, and %parse-param.
14090
14091 2003-03-02 Akim Demaille <akim@epita.fr>
14092
14093 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14094 generate verbose error messages.
14095 Use the number of tokens as an upper bound in yytname, as it
14096 cannot be a non terminal.
14097
14098 2003-03-02 Akim Demaille <akim@epita.fr>
14099
14100 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14101 message.
14102
14103 2003-03-02 Akim Demaille <akim@epita.fr>
14104
14105 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14106 Use them to exercise yycheck overrun.
14107 Based on Andrew Suffield's grammar.
14108
14109 2003-03-02 Akim Demaille <akim@epita.fr>
14110
14111 Create tests/local.at for Bison generic testing macros.
14112
14113 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14114 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14115 This new file.
14116 * tests/calc.at (AT_CHECK_CALC): Adjust.
14117 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14118 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14119 * tests/local.at: here.
14120 (AT_COMPILE_CXX): Tags the tests using it as c++.
14121 Ignore the test if CXX is not functional.
14122
14123 2003-03-01 Paul Eggert <eggert@twinsun.com>
14124
14125 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14126 not loc->end, since loc->end might contain garbage and this leads
14127 to undefined behavior on some platforms.
14128 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14129 depend on *loc, so that the reader doesn't give the the false
14130 impression that *loc is initialized.
14131 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14132 does not survive the return.
14133
14134 2003-03-01 Akim Demaille <akim@epita.fr>
14135
14136 * src/scan-gram.l (code_start): Always initialize it when entering
14137 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14138 yylex invocation. An alternative would be making it static, but
14139 then it starts with the second %%'s beginning, instead of its end.
14140
14141 2003-02-28 Paul Eggert <eggert@twinsun.com>
14142
14143 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14144 around a UnixWare 7.1.1 porting bug reported by John Hughes in
14145 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
14146
14147 2003-02-26 Paul Eggert <eggert@twinsun.com>
14148
14149 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14150 Remove Sequent/Pyramid discussion (nobody uses them any more).
14151 Merge VMS and MS-DOS discussion; these ports may well be dead
14152 but let's keep mentioning them for now. Put <> around email
14153 addresses. Add copyright notice.
14154
14155 2003-02-24 Paul Eggert <eggert@twinsun.com>
14156
14157 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14158 to avoid collision with flex use of yylineno.
14159 Problem reported by Bruce Lilly in
14160 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
14161 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14162 * data/yacc.c (yy_reduce_print): Likewise.
14163
14164 * config/depcomp: Sync with Automake 1.7.3.
14165
14166 2003-02-21 Akim Demaille <akim@epita.fr>
14167
14168 * data/lalr1.cc: Use temporary variables instead of casts to
14169 change integer types.
14170 Suggested by Paul Eggert.
14171
14172 2003-02-21 Akim Demaille <akim@epita.fr>
14173
14174 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14175 to avoid confusions with lalr1.cc's notion of Position.
14176 Suggested by Paul Eggert.
14177
14178 2003-02-20 Akim Demaille <akim@epita.fr>
14179
14180 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14181 before initial_columns.
14182 (location.hh): Use consistent variable names when defining the
14183 operator<<.
14184 Use "last" so that we subtract from Positions, not from unsigned.
14185
14186 2003-02-20 Akim Demaille <akim@epita.fr>
14187
14188 * data/lalr1.cc (position.hh): New subfile, including the extended
14189 and Doxygen'ed documentation of class Position.
14190 (location.hh): Use it.
14191 Document a` la Doxygen.
14192 With the help of Benoit Perrot.
14193
14194 2003-02-20 Akim Demaille <akim@epita.fr>
14195
14196 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14197 AT_YACC_IF.
14198 Redefine AT_YYERROR_SEES_LOC_IF using it.
14199 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14200 not defined.
14201 Don't use the location in yy::Parser::error_ and
14202 yy::Parser::print_ when not %locations.
14203 Activate more lalr1.cc tests.
14204
14205 2003-02-19 Akim Demaille <akim@epita.fr>
14206
14207 * data/lalr1.cc: When displaying a line number, be sure to make it
14208 an int.
14209
14210 2003-02-19 Akim Demaille <akim@epita.fr>
14211
14212 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14213 Remove, useless.
14214 (YYABORT, YYACCEPT, YYERROR): New.
14215 * tests/calc.at: Renable the lalr1.cc test.
14216
14217 2003-02-19 Akim Demaille <akim@epita.fr>
14218
14219 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14220 error recovery, mixing with/without pops and discarding of the
14221 lookahead.
14222 Exercise YYERROR.
14223 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14224
14225 2003-02-17 Paul Eggert <eggert@twinsun.com>
14226
14227 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14228 * tests/testsuite.at (AT_COMPILE): Use them.
14229 This fixes the testsuite problem reported by Robert Lentz in
14230 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
14231
14232 2003-02-12 Paul Eggert <eggert@twinsun.com>
14233
14234 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14235 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
14236 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
14237 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14238 Check for malloc failure, for consistency with yacc.c.
14239 (yytname_size): Remove, for consistency with yacc.c.
14240
14241 The bug still remains in data/lalr1.cc, as I didn't have time
14242 to fix it there.
14243
14244 2003-02-06 Akim Demaille <akim@epita.fr>
14245
14246 * configure.ac (GXX): Rename as...
14247 (CXX): this, to keep the original Autoconf semantics.
14248 Require 2.57.
14249 * data/lalr1.cc: Fix b4_copyright invocations.
14250 If YYDEBUG is not defined, don't depend upon name_ being defined.
14251 (location.hh): Include string and iostream.
14252 (Position::filename): New member.
14253 (Position::Position ()): New.
14254 (operator<< (Position)): New.
14255 (operator- (Position, int)): New.
14256 (Location::first, Location::last): Rename as...
14257 (Location::begin, Location::end): these, to mock the conventional
14258 iterator names.
14259 (operator<< (Location)): New.
14260 * tests/atlocal.in (CXX): New.
14261 * tests/testsuite.at (AT_COMPILE_CXX): New.
14262 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14263 locations in a more synthetic way.
14264 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14265 lalr1.cc is used.
14266 Adjust the C locations to match those from Emacs: first column is
14267 column 0.
14268 Change all the expected results.
14269 Conform to the GCS: simplify the locations when applicable.
14270 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14271 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14272 these CPP macros with the m4 macros new defined by...
14273 (AT_CHECK_PUSHDEFS): this, i.e.:
14274 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
14275 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
14276 New macros.
14277 (AT_CHECK_POPDEFS): Undefine them.
14278 (AT_CHECK_CALC_LALR1_CC): New.
14279 Use it for the first lalr1.cc test.
14280
14281 2003-02-04 Akim Demaille <akim@epita.fr>
14282
14283 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14284 Location as is defined.
14285
14286 2003-02-04 Akim Demaille <akim@epita.fr>
14287
14288 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14289 name_ being defined.
14290
14291 2003-02-03 Paul Eggert <eggert@twinsun.com>
14292
14293 * src/gram.h (start_symbol): Remove unused decl.
14294
14295 Use more-consistent naming conventions for local vars.
14296
14297 * src/derives.c (derives_compute): Change type of local var from
14298 int to rule_number.
14299 * src/gram.c (grammar_rules_partial_print): Likewise.
14300 * src/print.c (print_core): Likewise.
14301 * src/reduce.c (reduce_grammar_tables): Likewise.
14302
14303 * src/gram.c (grammar_dump): Change name of item_number *
14304 local var from r to rp.
14305 * src/nullable.c (nullable_compute): Likewise.
14306
14307 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14308
14309 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14310 for symbol or symbol_number var.
14311 * src/reader.c (grammar_start_symbol_set): Likewise.
14312 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14313 Likewise.
14314 * src/state.c (transitions_to): Likewise.
14315 * src/state.h: Likewise.
14316 * src/tables.c (symbol_number_to_vector_number): Likewise.
14317
14318 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14319 char * var.
14320
14321 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14322 var.
14323
14324 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14325 var.
14326
14327 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14328 Use str, not s, for char * var. Use ch, not c, for character var.
14329 Use size for size var.
14330
14331 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14332 char * var.
14333 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14334 uniqstr var.
14335 * src/uniqstr.h: Likewise.
14336
14337 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14338 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14339 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14340 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14341 param to have same name as that of enum, so that we don't use
14342 "s" to stand for a non-state.
14343
14344 2003-02-02 Akim Demaille <akim@epita.fr>
14345
14346 * src/scan-skel.l: Scan more than one inert character per yylex
14347 invocation.
14348
14349 2003-02-01 Paul Eggert <eggert@twinsun.com>
14350
14351 Version 1.875a.
14352
14353 * po/LINGUAS: Add ms.
14354
14355 2003-01-30 Akim Demaille <akim@epita.fr>
14356
14357 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14358
14359 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14360
14361 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14362 of $1.
14363
14364 Changes in response to error report by S. Eken: GLR mode does not
14365 handle negative $ indices or $ indices in embedded rules correctly.
14366 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
14367
14368 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14369 (b4_rhs_location): Ditto.
14370 (yyfill): New function to copy from stack tree into array
14371 incrementally.
14372 (yyuserAction): Modify to allow incremental move of semantic values
14373 to rhs array when in GLR mode.
14374 Define YYFILL to use in user-defined actions to fill semantic array
14375 as needed.
14376 Remove dummy use of yystack, as there is now a guaranteed use.
14377 (yydoAction): Modify to allow incremental move of semantic values
14378 to rhs array when in GLR mode.
14379 (yyresolveAction): Ditto.
14380 (yyglrShiftDefer): Update comment.
14381 (yyresolveStates): Use X == NULL for pointers, not !X.
14382 (yyglrReduce): Ditto.
14383 (yydoAction): Ditto
14384
14385 * tests/glr-regr1.at: Rename to ...
14386 * tests/glr-regression.at: Add new regression test for the problems
14387 described above (adapted from S. Eken).
14388 Update copyright notice.
14389 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
14390 * tests/Makefile.am: Ditto.
14391
14392 2003-01-28 Paul Eggert <eggert@twinsun.com>
14393
14394 * data/lalr1.cc: Do not use @output_header_name@ unless
14395 b4_defines_flag is set. This fixes two bugs reported by
14396 Tim Van Holder in
14397 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
14398 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
14399
14400 2003-01-21 Paul Eggert <eggert@twinsun.com>
14401
14402 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
14403 we don't need to worry about yyerrlab1 being reported as an
14404 "unused label" by non-GCC C compilers. The downside is that if
14405 locations are used then a couple of statements are duplicated each
14406 time YYERROR is invoked, but the upside is that the warnings
14407 should vanish.
14408 (yyerrlab1): Move code to YERROR.
14409 (yyerrlab2): Remove. Change uses back to yyerrlab1.
14410 This reverts some of the 2002-12-27 change.
14411
14412 2003-01-17 Paul Eggert <eggert@twinsun.com>
14413
14414 * src/output.c (symbol_printers_output): Fix typo that led
14415 to core dump. Problem reported by Antonio Rus in
14416 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
14417
14418 2003-01-13 Akim Demaille <akim@epita.fr>,
14419 Quoc Peyrot <chojin@lrde.epita.fr>,
14420 Robert Anisko <anisko_r@lrde.epita.fr>
14421
14422 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
14423 when the stacks contain one element, as the loop would otherwise
14424 free the last state, and then use the top state (the one we just
14425 popped). This means that the initial elements will not be freed
14426 explicitly, as is the case in yacc.c; it is not a problem, as
14427 these elements have fake values.
14428
14429 2003-01-11 Paul Eggert <eggert@twinsun.com>
14430
14431 * NEWS: %expect-violations are now just warnings, reverting
14432 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
14433 bootstrapping problem reported by Matthias Klose; see
14434 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
14435 * src/conflicts.c (conflicts_print): Likewise.
14436 * tests/conflicts.at (%expect not enough, %expect too much,
14437 %expect with reduce conflicts): Likewise.
14438 * doc/bison.texinfo (Expect Decl): Document this. Also mention
14439 that the warning is enabled if the number of conflicts changes
14440 (not necessarily increases).
14441
14442 * src/getargs.c (version): Update copyright year.
14443
14444 2003-01-09 Akim Demaille <akim@epita.fr>
14445
14446 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
14447
14448 2003-01-08 Paul Eggert <eggert@twinsun.com>
14449
14450 * Makefile.maint (WGETFLAGS):
14451 New macro, containing "-C off" to disable proxy caches.
14452 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
14453 (rel-check): Use $(WGET) instead of wget.
14454
14455 2003-01-06 Paul Eggert <eggert@twinsun.com>
14456
14457 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
14458 the GLR paper of Scott, Johnstone and Hussain.
14459
14460 2003-01-04 Paul Eggert <eggert@twinsun.com>
14461
14462 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
14463 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
14464 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
14465 (EXTRA_LIBRARIES): New var, for liby.a.
14466 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
14467 (EXTRA_SCRIPTS): New var, for yacc.
14468
14469 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
14470 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
14471 Problem reported by Nelson H. F. Beebe.
14472
14473 2003-01-03 Paul Eggert <eggert@twinsun.com>
14474
14475 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
14476 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
14477 when compiling Bison 1.875's `bitset bset = obstack_alloc
14478 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
14479
14480 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
14481 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
14482 grow to a huge size with typical invocation.
14483
14484 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
14485 Use the pattern recommended by Autoconf 2.57, except also protect
14486 against double-definition.
14487 * src/system.h: Likewise.
14488 Portability issues reported by Nelson H. F. Beebe.
14489
14490 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
14491 All uses changed. Provide a definition in both C and C++.
14492 (yytrue, yyfalse): Define even if defined (__cplusplus).
14493
14494 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
14495 Reported by Nelson H. F. Beebe.
14496
14497 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
14498
14499 2003-01-02 Paul Eggert <eggert@twinsun.com>
14500
14501 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
14502 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
14503 Bug reported by Nelson H. F. Beebe.
14504
14505 2003-01-01 Paul Eggert <eggert@twinsun.com>
14506
14507 * Version 1.875.
14508
14509 2002-12-30 Paul Eggert <eggert@twinsun.com>
14510
14511 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
14512 Moved here from...
14513 (<INITIAL>","): Here. This causes stray "," to be treated
14514 more uniformly.
14515
14516 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
14517 last brace in braced code when not in Yacc mode, for compatibility
14518 with Bison 1.35. This resurrects the 2001-12-15 patch to
14519 src/reader.c.
14520
14521 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
14522 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
14523
14524 2002-12-28 Paul Eggert <eggert@twinsun.com>
14525
14526 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
14527 that of SYM's type. This fixes Debian bug 168069, reported by
14528 Thomas Olsson.
14529
14530 2002-12-28 Paul Eggert <eggert@twinsun.com>
14531
14532 Version 1.75f.
14533
14534 Switch back to the Yacc style of conflict reports, undoing some
14535 of the 2002-07-30 change.
14536 * doc/bison.texinfo (Understanding): Use Yacc style for
14537 conflict reports. Also, use new way of locating rules.
14538 * src/conflicts.c (conflict_report):
14539 Renamed from conflict_report_yacc, removing the old
14540 'conflict_report'. Translate the entire conflict report at once,
14541 so that we don't assume that "," has the same interpretation in
14542 all languages.
14543 (conflicts_output): Use Yacc-style conflict report for each state,
14544 instead of our more-complicated style.
14545 (conflicts_print): Use Yacc-style conflict report, except print
14546 the input file name when not emulating Yacc.
14547 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
14548 Conflicted Reduction, %expect not enough, %expect too much,
14549 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
14550 * tests/existing.at (GNU Cim Grammar): Likewise.
14551 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
14552
14553 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
14554 fatal): Don't invoke fflush; it's not needed and it might even be
14555 harmful for stdout, as stdout might not be open.
14556 * src/reduce.c (reduce_print): Likewise.
14557
14558 2002-12-27 Paul Eggert <eggert@twinsun.com>
14559
14560 Fix a bug where error locations were not being recorded correctly.
14561 This problem was originally reported by Paul Hilfinger in
14562 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
14563
14564 * data/yacc.c (yyparse): New local var yylerrsp, to record the
14565 top of the location stack's error locations.
14566 (yyerrlab): Set it. When discarding a token, push its location
14567 onto yylerrsp so that we don't lose track of the error's end.
14568 (yyerrlab1): Now is only the target of YYERROR, so that we can
14569 properly record the location of the action that failed. For GCC
14570 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
14571 GCC warning about yyerrlab1 being unused if YYERROR is unused.
14572 (yyerrlab2): New label, which yyerrlab now falls through to.
14573 Compute the error's location by applying YYLLOC_DEFAULT to
14574 the locations of all the symbols that went into the error.
14575 * doc/bison.texinfo (Location Default Action): Mention that
14576 YYLLOC_DEFAULT is also invoked for syntax errors.
14577 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14578 Error locations include the locations of all the tokens that were
14579 discarded, not just the last token.
14580
14581 2002-12-26 Paul Eggert <eggert@twinsun.com>
14582
14583 * src/files.c: Include quote.h.
14584 (compute_output_file_names): Warn if we detect conflicting
14585 outputs to the same file. This should catch the misunderstanding
14586 exemplified by Debian Bug 165349, reported by Bruce Stephens..
14587
14588 * src/conflicts.c (conflicts_print): If the user specifies
14589 "%expect N", report an error if there are any reduce/reduce
14590 conflicts. This is what the manual says should happen.
14591 This fixes Debian bug 130890, reported by Anthony DeRobertis.
14592 * tests/conflicts.at (%expect with reduce conflicts): New test.
14593
14594 Don't use m4_include on relative file names, as it doesn't work as
14595 desired if there happens to be a file with that name under ".".
14596
14597 * m4sugar/version.m4: Remove; it was included but it wasn't used.
14598 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
14599 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
14600 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
14601 * src/output.c (output_skeleton): Use full path names when
14602 specifying a file to include; don't rely on include path, as
14603 it's unreliable when the working file contains a file with
14604 that name.
14605
14606 2002-12-25 Paul Eggert <eggert@twinsun.com>
14607
14608 Remove obsolete references to bison.simple and bison.hairy.
14609 Problem mentioned by Aubin Mahe in
14610 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
14611 * data/glr.c: Comment fix.
14612 * doc/bison.1: Remove references. Also, mention "yacc".
14613
14614 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
14615 with -g option.
14616
14617 * src/parse-gram.y (declaration): Use enum "report_states" rather
14618 than its numeric value 1.
14619
14620 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
14621 opening a new one. This fixes Debian bug 165349, reported by
14622 Bruce Stephens.
14623
14624 2002-12-24 Paul Eggert <eggert@twinsun.com>
14625
14626 Version 1.75e.
14627
14628 * Makefile.maint (cvs-update): Don't assume that the shell
14629 supports $(...), as Solaris sh doesn't.
14630
14631 * src/parse-gram.y (lloc_default): Remove test for empty
14632 nonterminals at the end, since it didn't change the result.
14633
14634 2002-12-24 Paul Eggert <eggert@twinsun.com>
14635
14636 If the user does not define YYSTYPE as a macro, Bison now declares it
14637 using typedef instead of defining it as a macro. POSIX requires this.
14638 For consistency, YYLTYPE is also declared instead of defined.
14639
14640 %union directives can now have a tag before the `{', e.g., the
14641 directive `%union foo {...}' now generates the C code
14642 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
14643 The default union tag is `YYSTYPE', for compatibility with Solaris 9
14644 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
14645 instead of `yyltype'.
14646
14647 `yystype' and `yyltype' are now obsolescent macros instead of being
14648 typedefs or tags; they are no longer documented and will be
14649 withdrawn in a future release.
14650
14651 * data/glr.c (b4_location_type): Remove.
14652 (YYSTYPE): Renamed from yystype.
14653 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
14654 (struct YYLTYPE): Renamed from struct yyltype.
14655 (YYLTYPE): Renamed from yyltype.
14656 (yyltype, yystype): New (and obsolescent) macros,
14657 for backward compatibility.
14658 * data/yacc.c: Likewise.
14659
14660 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
14661 does not specify a union tag. This is for compatibility with
14662 Solaris 9 yacc.
14663
14664 * src/parse-gram.y (add_param): 2nd arg is now char * not char
14665 const *, since it is now modified by stripping surrounding { }.
14666 (current_braced_code): Remove.
14667 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
14668 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
14669 trailing " {...}". Now of type <chars>.
14670 (grammar_declaration): Adjust to bundled tokens.
14671 (code_content): Remove; stripping is now done by add_param.
14672 (print_token_value): Print contents of bundled tokens.
14673 (token_name): New function.
14674
14675 * src/reader.h (braced_code, current_braced_code): Remove.
14676 (token_name): New decl.
14677
14678 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
14679 token_type, not braced_code code_kind. All uses changed.
14680 (SC_PRE_CODE): New state, for scanning after a keyword that
14681 has (or usually has) an immediately-following braced code.
14682 (token_type): New local var, to keep track of which token type
14683 to return when scanning braced code.
14684 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
14685 <INITIAL>"%parse-param", <INITIAL>"%printer",
14686 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
14687 instead of returning a token type immediately.
14688 (<INITIAL>"{"): Set token type.
14689 (<SC_BRACED_CODE>"}"): Use it.
14690 (handle_action_dollar, handle_action_at): Now returns bool
14691 indicating success. Fail if ! current_rule; this prevents a core dump.
14692 (handle_symbol_code_dollar, handle_symbol_code_at):
14693 Remove; merge body into caller.
14694 (handle_dollar, handle_at): Complain in invalid contexts.
14695
14696 * NEWS, doc/bison.texinfo: Document the above.
14697 * NEWS: Fix years and program names in copyright notice.
14698
14699 2002-12-17 Paul Eggert <eggert@twinsun.com>
14700
14701 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
14702 Reporting, Table of Symbols): Omit mentions of %lex-param and
14703 %parse-param from the documentation for now.
14704
14705 2002-12-15 Paul Eggert <eggert@twinsun.com>
14706
14707 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
14708 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
14709 lookahead symbol, and which sets yychar in parser actions) and it
14710 disagreed with the Bison documentation. Bug
14711 reported by Andrew Walrond.
14712
14713 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
14714 as the caller now does that.
14715 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
14716 (YYEMPTY): Parenthesize right hand side, since others use it.
14717 (yyparse): Don't assume that our generated code is the only code
14718 that sets yychar.
14719
14720 2002-12-13 Paul Eggert <eggert@twinsun.com>
14721
14722 Version 1.75d.
14723
14724 POSIX requires a "yacc" command.
14725 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
14726 (MOSTLYCLEANFILES): Add yacc.
14727 (yacc): New rule.
14728 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
14729 as an alias for bison y.
14730
14731 * po/LINGUAS: Add da.
14732
14733 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
14734 problem with latest <getopt.h>.
14735 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
14736
14737 * doc/fdl.texi: Upgrade to 1.2.
14738 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
14739 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
14740 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
14741 gnulib.
14742 * config/install-sh: Sync with autotools.
14743
14744 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
14745 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14746 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
14747 locations are requested.
14748 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
14749 locations are requested.
14750
14751 2002-12-12 Paul Eggert <eggert@twinsun.com>
14752
14753 Remove unportable casts and storage allocation tricks.
14754 While we're at it, remove almost all casts, since they
14755 usually aren't needed and are a sign of trouble.
14756
14757 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
14758
14759 * src/derives.c (derives_compute): Do not subtract NTOKENS from
14760 the pointer DSET returned by malloc; this isn't portable.
14761 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
14762 Similarly for DERIVES.
14763 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
14764 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
14765 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
14766
14767 * src/derives.c (derives_compute): Do not bother invoking
14768 int_of_rule_number, since rule numbers are integers.
14769
14770 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
14771 rather than XMALLOC (char, N).
14772
14773 * src/files.c (filename_split): Rewrite to avoid cast.
14774
14775 * src/gram.h (symbol_number_as_item_number,
14776 item_number_as_symbol_number, rule_number_as_item_number,
14777 item_number_as_rule_number):
14778 Now inline functions rather than macros, to avoid casts.
14779 * src/state.h (state_number_as_int): Likewise.
14780 * src/tables.c (state_number_to_vector_number,
14781 symbol_number_to_vector_number): Likewise.
14782
14783 * src/gram.h (int_of_rule_number): Remove; no longer used.
14784
14785 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
14786 since the resulting storage is always stored into.
14787
14788 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
14789 where it's needed.
14790
14791 * src/muscle_tab.c (muscle_m4_output):
14792 Now inline. Return bool, not int.
14793 * src/state.c (state_compare): Likewise.
14794 * src/symtab.c (symbol_check_defined,
14795 symbol_check_alias_consistency, symbol_pack, symbol_translation,
14796 hash_compare_symbol, hash_symbol):
14797 Likewise.
14798 * src/uniqstr.c (uniqstr_print): Likewise.
14799 * src/muscle_tab.c (muscle_m4_output_processor):
14800 New function, to avoid casts.
14801 * src/state.c (state_comparator, stage_hasher): Likewise.
14802 * src/symtab.c (symbol_check_defined_processor,
14803 symbol_check_alias_consistency_processor, symbol_pack_processor,
14804 symbol_translation_processor, hash_symbol_comparator,
14805 hash_symbol_hasher): Likewise.
14806 * src/uniqstr.c (uniqstr_print_processor): Likewise.
14807 * src/muscle_tab.c (muscles_m4_output):
14808 Use new functions instead of casting old functions unportably.
14809 * src/state.c (state_hash_new): Likewise.
14810 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
14811 symbols_token_translations_init):
14812 Likewise.
14813 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
14814
14815 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
14816 var instead of casting to long, to avoid casts.
14817 (prepare_states): Use MALLOC rather than alloca, so that we don't
14818 have to worry about alloca.
14819 * src/state.c (state_hash_lookup): Likewise.
14820
14821 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
14822 local var instead of casting to unsigned char, to avoid casts.
14823
14824 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
14825 STATE_ALLOC): Remove.
14826 (transitions_new, errs_new, reductions_new, state_new): Use malloc
14827 rather than calloc, and use offsetof to avoid allocating slightly
14828 too much storage.
14829 (state_new): Initialize all members.
14830
14831 * src/state.c (state_hash): Use unsigned accumulator, not signed.
14832
14833 * src/symtab.c (symbol_free): Remove; unused.
14834 (symbol_get): Remove cast in lhs of assignment.
14835 (symbols_do): Now static. Accept generic arguments, not
14836 hashing-related ones.
14837
14838 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
14839 (symbol_processor): Remove.
14840 (symbols_do): Remove decl; now static.
14841
14842 * src/system.h (alloca): Remove; decl no longer needed.
14843 (<stddef.h>): Include, for offsetof.
14844 (<inttypes.>, <stdint.h>): Include if available.
14845 (uintptr_t): New type, if system lacks it.
14846 (CALLOC, MALLOC, REALLOC): New macros.
14847 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
14848 new macros.
14849
14850 * src/tables.c (table_size): Now int, to pacify GCC.
14851 (table_grow, table_ninf_remap): Use signed table size.
14852 (save_row): Don't bother initializing locals when not needed.
14853 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14854 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14855
14856 * src/vcg.h: Correct misspellings.
14857
14858 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14859
14860
14861 * src/getargs.c (getargs): Don't assume EOF == -1.
14862
14863 2002-12-09 Paul Eggert <eggert@twinsun.com>
14864
14865 Change identifier spellings to avoid collisions with names
14866 that are reserved by POSIX.
14867
14868 Don't use names ending in _t, since POSIX reserves them.
14869 For consistency, remove _e and _s endings -- they're weren't
14870 needed to remove ambiguity. All uses changed.
14871 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14872 turn was just renamed from struniq_t.
14873 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14874 which in turn was just renamed from struniq_processor_t.
14875 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14876 in turn was renamed from hash_compare_struniq_t.
14877 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14878 (state_list): Renamed from state_list_t.
14879 * src/assoc.h (assoc): Renamed from assoc_t.
14880 * src/conflicts.c (enum conflict_resolution): Renamed from
14881 enum conflict_resolution_e.
14882 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14883 (rule_list): Renamed from rule_list_t.
14884 * src/getargs.h (enum trace): Renamed from enum trace_e.
14885 (enum report): Renamed from enum report_e.
14886 * src/gram.h (item_number): Renamed from item_number_t.
14887 (rule_number): Renamed from rule_number_t.
14888 (struct rule_s): Remove the "rule_s" part; not used.
14889 (rule): Renamed from rule_t.
14890 (rule_filter): Renamed from rule_filter_t.
14891 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14892 (goto_list): Renamed from goto_list_t.
14893 * src/lalr.h (goto_number): Renamed from goto_number_t.
14894 * src/location.h (location): Renamed from location_t.
14895 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14896 and moved here from:
14897 * src/muscle_tab.h (muscle_entry_t): here.
14898 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14899 (rule_list): Renamed from rule_list_t.
14900 * src/print_graph.c (static_graph): Renamed from graph.
14901 * src/reader.h (braced_code): Renamed from braced_code_t.
14902 Remove brace_code_e tag.
14903 * src/relation.h (relation_node): Renamed from relation_node_t.
14904 (relation_nodes): Renamed from relation_nodes_t.
14905 (relation): Renamed from relation_t.
14906 * src/state.h (state_number): Renamed from state_number_t.
14907 (struct state): Renamed from struct state_s.
14908 (state): Renamed from state_t.
14909 (transitions): Renamed from transitions_t. Unused (and
14910 misspelled) transtion_s tag removed.
14911 (errs): Renamed from errs_t. Unused errs_s tag removed.
14912 (reductions): Renamed from reductions_t. Unused tag
14913 reductions_s removed.
14914 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14915 (struct symbol_list): Renamed from struct symbol_list_s.
14916 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14917 (struct symbol): Renamed from struct symbol_s.
14918 (symbol): Renamed from symbol_t.
14919 * src/tables.c (vector_number): Renamed from vector_number_t.
14920 (action_number): Renamed from action_t.
14921 * src/tables.h (base_number): Renamed from base_t.
14922 * src/vcg.h (enum color): Renamed from enum color_e.
14923 (enum textmode): Renamed from enum textmode_e.
14924 (enum shape): Renamed from enum shape_e.
14925 (struct colorentry): Renamed from struct colorentry_s.
14926 (struct classname): Renamed from struct classname_s.
14927 (struct infoname): Renamed from struct infoname_s.
14928 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14929 (enum decision): Renamed from enum decision_e.
14930 (enum orientation): Renamed from enum orientation_e.
14931 (enum alignment): Renamed from enum alignment_e.
14932 (enum arrow_mode): Renamed from enum arrow_mode_e.
14933 (enum crossing_type): Renamed from enum crossing_type_e.
14934 (enum view): Renamed from enum view_e.
14935 (struct node): Renamed from struct node_s.
14936 (node): Renamed from node_t.
14937 (enum linestyle): Renamed from enum linestyle_e.
14938 (enum arrowstyle): Renamed from enum arrowstyle_e.
14939 (struct edge): Renamed from struct edge.
14940 (edge): Renamed from edge_t.
14941 (struct graph): Renamed from struct graph_s.
14942 (graph): Renamed from graph_t.
14943 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14944 Rename value_t -> value.
14945 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14946 value_t_as_yystype -> value_as_yystype.
14947
14948 Don't include <errno.h> in the mainstream code, since it
14949 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14950 * lib/get-errno.c, lib/get-errno.h: New files.
14951 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14952 get-errno.c.
14953 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14954 * src/output.c (output_skeleton): Likewise.
14955 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14956 instead of errno.
14957 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14958 Likewise.
14959 (handle_action_dollar, handle_action_at): Likewise.
14960 * src/system.h: Do not include <errno.h>.
14961 (TAB_EXT): Renamed from EXT_TAB.
14962 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14963
14964 Avoid str[a-z]*, since <string.h> reserves that name space.
14965 Change all instances of "struniq" in names to "uniqstr", and
14966 likewise for "STRUNIQ" and "UNIQSTR".
14967 * src/uniqstr.c: Renamed from src/struniq.c.
14968 * src/uniqstr.h: Renamed from src/struniq.h.
14969 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14970 * src/files.c (strsuffix): Remove; unused.
14971 (concat2): Renamed from stringappend. Now static.
14972 * src/files.h (strsuffix, stringappend): Remove; unused.
14973 * src/parse-gram.y (<chars>): Renamed from <string>.
14974 (<uniqstr>): Renamed from <struniq>.
14975 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14976 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14977 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14978 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14979 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14980 (N_EXPAND): Renamed from N_STRETCH.
14981
14982 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14983 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14984 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14985 Remove; unused.
14986 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14987 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14988 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14989 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14990 (BASE_MAXIMUM): Renamed from BASE_MAX.
14991 (BASE_MINIMUM): Renamed from BASE_MIN.
14992 (ACTION_MAX): Remove; unused.
14993 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14994 Unnecessary casts removed from above defines.
14995
14996
14997 Fix misspelling in names.
14998 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14999 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15000 G_NODE_ALIGNEMENT.
15001
15002
15003 * lib/timevar.c (timevar_report): Renamed from time_report,
15004 for consistency with other names.
15005 * lib/timevar.h (timevar_report): New decl.
15006 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15007
15008
15009 Sort include-file uses.
15010
15011 Reorder all include files under src to be in the order "system.h".
15012 then the ../lib include files in angle brackets (alphabetized),
15013 then the . include files in double-quotes (alphabetized). Fix
15014 dependency breakages encountered in this process, as follows:
15015 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15016 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15017 * src/state.h: Include "symtab.h".
15018
15019 2002-12-08 Paul Eggert <eggert@twinsun.com>
15020
15021 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15022 since this causes problems when __file__ contains character
15023 sequences like "@" that are treated specially by src/scan-skel.l.
15024 Instead, just use the file's basename. This fixes the bug
15025 reported by Martin Mokrejs in
15026 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15027
15028 2002-12-06 Paul Eggert <eggert@twinsun.com>
15029
15030 Add support for rules that do not have trailing semicolons, as
15031 POSIX requires. Improve the quality of locations in Bison
15032 diagnostics.
15033
15034 * src/location.c: Include <quotearg.h>.
15035 (empty_location): Now const.
15036 (location_print): New function. Follow the recommendation of the
15037 GNU Coding Standards for locations that span file boundaries.
15038 * src/location.h: Do not include <quotearg.h>; no longer needed.
15039 (boundary): New type.
15040 (location_t): Use it. This allows locations to span file boundaries.
15041 All member uses changed: file -> start.file or end.file (as needed),
15042 first_line -> start.line, first_column -> start.column,
15043 last_line -> end.line, last_column -> end.column.
15044 (equal_boundaries): New function.
15045 (LOCATION_RESET, LOCATION_STEP): Remove.
15046 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15047 (empty_location): Now const.
15048 (location_print): New decl.
15049 * src/parse-gram.y (lloc_default): New function, which handles
15050 empty locations more accurately.
15051 (YYLLOC_DEFAULT): Use it.
15052 (%token COLON): Remove.
15053 (%token ID_COLON): New token.
15054 (rules): Use it.
15055 (declarations, rules): Remove trailing semicolon.
15056 (declaration, rules_or_grammar_declaration):
15057 Allow empty (";") declaration.
15058 (symbol_def): Remove empty actions; no longer needed.
15059 (rules_or_grammar_declaration): Remove trailing semicolon.
15060 (semi_colon.opt): Remove.
15061 * src/reader.h: Include location.h.
15062 (scanner_cursor): New decl.
15063 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15064 rolling our own.
15065 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15066 of *loc.
15067 (STEP): Remove. No longer needed, now that adjust_location does
15068 the work. All uses removed.
15069 (scanner_cursor): New var.
15070 (adjust_location): Renamed from extend_location. It now sets
15071 *loc and adjusts the scanner cursor. All uses changed.
15072 Don't bother testing for CR.
15073 (handle_syncline): Remove location arg; now updates scanner cursor.
15074 All callers changed.
15075 (unexpected_end_of_file): Now accepts start boundary of token or
15076 comment, not location. All callers changed. Update scanner cursor,
15077 not the location.
15078 (SC_AFTER_IDENTIFIER): New state.
15079 (context_state): Renamed from c_context. All uses changed.
15080 (id_loc, code_start, token_start): New local vars.
15081 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15082 processing of Yacc white space and equivalents here.
15083 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15084 instead of returning ID immediately, since we need to search for
15085 a subsequent colon.
15086 (<INITIAL>"'", "\""): Save token_start.
15087 (<INITIAL>"%{", "{", "%%"): Save code_start.
15088 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15089 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15090 BEGIN context_state at end, not INITIAL.
15091 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15092 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15093 Return correct token start.
15094 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15095 the start of a character, string or multiline comment is found.
15096 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15097 Reduction): Adjust reported locations to match the more-precise
15098 results now expected.
15099 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15100 * tests/reduce.at (Useless Rules, Reduced Automaton,
15101 Underivable Rules): Likewise.
15102 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15103 or "|"' now that so many other tokens are allowed by the new grammar.
15104
15105 * src/complain.h (current_file): Remove duplicate decl;
15106 current_file is now owned by files.h.
15107 * src/complain.c, src/scan-gram.l: Include files.h.
15108
15109 2002-12-06 Paul Eggert <eggert@twinsun.com>
15110
15111 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15112 promotes to int; it might be unsigned int.
15113 * data/yacc.c (yy_reduce_print): Likewise.
15114
15115 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15116 be #defined in the prologue, not in the Bison declarations.
15117 This fixes Debian Bug 102878, reported by Shaul Karl.
15118
15119 2002-12-02 Paul Eggert <eggert@twinsun.com>
15120
15121 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15122 * lib/strtoul.c: New file, from gnulib.
15123 This fixes a porting bug reported by Peter Klein in
15124 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
15125
15126 2002-11-30 Paul Eggert <eggert@twinsun.com>
15127
15128 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15129 and put only a forward declaration in the prologue. This is for
15130 consistency with the other scanner helper functions.
15131
15132 Type clashes now generate warnings, not errors, since it
15133 appears that POSIX may allow some grammars with type clashes.
15134 * src/reader.c (grammar_current_rule_check): Warn about
15135 type clashes instead of complaining.
15136 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15137
15138 Add Yacc library, since POSIX requires it.
15139 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15140 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15141 * lib/main.c, lib/yyerror.c: New files.
15142
15143 gram_error can be static; it need not be extern.
15144 * src/reader.h (gram_error): Remove decl.
15145 * src/parse-gram.y (gram_error): Now static. Add static decl.
15146 (print_token_value): Omit parameter names from forward decl,
15147 for consistency.
15148
15149 2002-11-29 Paul Eggert <eggert@twinsun.com>
15150
15151 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15152 be declared before being used. E.g., one should typically
15153 declare them in the prologue. Use GNU coding style in examples.
15154 Put "const" consistently after the type it modifies. Mention
15155 that C99 supports "inline". Mention that yyerror traditionally
15156 returns "int".
15157
15158 %parse-param and %lex-param now take just one argument, the
15159 declaration; the argument name is deduced from the declaration.
15160
15161 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15162 Reporting, Table of Symbols): Document this.
15163 * src/parse-gram.y (add_param): New function.
15164 (COMMA): Remove.
15165 (declaration): Implement new rule for %parse-param and %lex-param.
15166 * src/scan-gram.l: "," now elicits a warning, rather than being
15167 a token; this is more compatible with byacc.
15168 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15169
15170 2002-11-27 Paul Eggert <eggert@twinsun.com>
15171
15172 Rename identifiers to avoid real and potential collisions.
15173
15174 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15175 to avoid collision with lex macro described by Bruce Lilly in
15176 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15177 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15178 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15179 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15180 All uses changed.
15181 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15182 The name "yycontrol" violates the name space rules, and this stuff
15183 wasn't being used anyway.
15184 (input): Remove action; this stuff wasn't being used.
15185 (gram_error): Rename local variable yylloc -> loc.
15186 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15187 (YY_DECL): Don't use "yy" at start of local variables.
15188 All uses changed, e.g., yylloc -> loc.
15189 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15190 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15191 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15192 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15193
15194 * src/parse-gram.y (gram_error): loc is now const *.
15195 * src/reader.h (gram_error): Likewise.
15196
15197 2002-11-24 Paul Eggert <eggert@twinsun.com>
15198
15199 Version 1.75c.
15200
15201 * tests/actions.at (Actions after errors): Use an output format
15202 more similar to that of the Printers and Destructors test.
15203 Test the position of the ';' token too.
15204 (Printers and Destructors): Likewise.
15205 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15206 unnecessarily alarming people when the test fails.
15207
15208 * data/yacc.c (yyerrlab1): Move this label down, so that the
15209 parser does not discard the lookahead token if the user code
15210 invokes YYERROR. This change is required for POSIX conformance.
15211
15212 * lib/error.c: Sync with gnulib.
15213
15214 2002-11-22 Paul Eggert <eggert@twinsun.com>
15215
15216 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15217 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15218 * lib/xmalloc.c: Likewise.
15219
15220 2002-11-20 Paul Eggert <eggert@twinsun.com>
15221
15222 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15223
15224 2002-11-20 Paul Eggert <eggert@twinsun.com>
15225
15226 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15227 should use `if (! x) abort ();' rather than `assert (x);', and
15228 anyway it's one less thing to worry about configuring.
15229
15230 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15231 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15232 and replace all instances of assert with abort.
15233 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15234 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15235
15236 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15237 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15238 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15239 hash_find_entry, hash_rehash, hash_insert): Likewise.
15240 * src/conflicts.c (resolve_sr_conflict): Likewise.
15241 * src/lalr.c (set_goto_map, map_goto): Likewise.
15242 * src/nullable.c (nullable_compute): Likewise.
15243 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15244 * src/reader.c (packgram, reader): Likewise.
15245 * src/state.c (state_new, state_free, state_transitions_set,
15246 state_reduction_find): Likewise.
15247 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15248 symbol_pack): Likewise.
15249 * src/tables.c (conflict_row, pack_vector): Likewise.
15250 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15251 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15252 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15253 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15254
15255 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15256 (ARGMATCH_CONSTRAINT): New macro.
15257 (ARGMATCH_ASSERT): Use it.
15258
15259 * src/system.h (verify): New macro.
15260 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15261 rather than assert.
15262 * src/tables.c (tables_generate): Likewise.
15263
15264 * src/struniq.c (struniq_assert): Now returns void, and aborts
15265 if the assertion is false.
15266 (struniq_assert_p): Remove.
15267 * src/struniq.h: Likewise.
15268
15269 2002-11-18 Paul Eggert <eggert@twinsun.com>
15270
15271 * data/glr.c (yygetLRActions): Replace `yyindex' with
15272 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15273 This fixes the regression with Sun ONE Studio 7 cc that I reported in
15274 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
15275
15276 2002-11-18 Akim Demaille <akim@epita.fr>
15277
15278 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15279 space.
15280 From Tim Van Holder.
15281
15282 2002-11-17 Paul Eggert <eggert@twinsun.com>
15283
15284 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15285 to "SyntaxError" for consistency with my 2002-11-15 change.
15286
15287 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15288 not define to {}, since this breaks the common use of `YYDPRINTF
15289 ((...));' if a single statement is desired (e.g. before `else').
15290 Work around GCC warnings by surrounding corresponding calls with
15291 {} if needed.
15292 (yyhasResolvedValue): Remove unused function.
15293 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15294 loop body.
15295 (yyreportSyntaxError): Renamed from yyreportParseError.
15296 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15297 All uses changed.
15298 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15299 extern when possible. Remove unused initializations.
15300
15301 2002-11-16 Akim Demaille <akim@epita.fr>
15302
15303 Augment the similarity between GLR and LALR traces.
15304
15305 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15306 (YY_REDUCE_PRINT): New.
15307 (yyparse): Use them.
15308 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15309 YYDPRINT here.
15310 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15311 state reached after the reduction/recovery, since...
15312 (yyparse, yyprocessOneStack): Report the state we are entering in.
15313
15314 2002-11-16 Akim Demaille <akim@epita.fr>
15315
15316 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15317 Add support for --trace=skeleton.
15318 * src/scan-skel.l: %option debug.
15319 Scan strings of non-@ or \n instead of character by character.
15320 (scan_skel): Handle trace_skeleton.
15321 (QPUTS): New.
15322 (@output_parser_name@, @output_header_name@): ``Restore'' their
15323 support (used to be M4 macros).
15324 * data/yacc.c: Quote larger chunks, a la glr.c.
15325 * data/lalr1.cc: Likewise.
15326 The header guards are no longer available, so use some other
15327 string than `YYLSP_NEEDED'.
15328
15329 2002-11-16 Akim Demaille <akim@epita.fr>
15330
15331 Make the ``Printers and Destructors'' test more verbose, taking
15332 `yacc.c''s behavior as (possibly wrong) reference.
15333
15334 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15335 instead of fprint on stdout.
15336 Set and report the last_line of the symbols.
15337 Consistently display values and locations.
15338
15339 2002-11-16 Paul Eggert <eggert@twinsun.com>
15340
15341 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15342
15343 2002-11-15 Paul Eggert <eggert@twinsun.com>
15344
15345 * tests/actions.at (Actions after errors): New test case.
15346
15347 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15348 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15349 tests/action.at, tests/calc.at, tests/conflicts.at,
15350 tests/cxx-type.at, tests/regression.at:
15351 "parse error" -> "syntax error" for POSIX compatibility.
15352 "parsing stack overflow..." -> "parser stack overflow" so
15353 that code matches Bison documentation.
15354
15355 2002-11-15 Akim Demaille <akim@epita.fr>
15356
15357 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15358 take two BRACED_CODE, not two string_content.
15359 Free the scanner's obstack when we are done.
15360 (code_content): New.
15361 * tests/calc.at: Adjust.
15362 * doc/bison.texinfo: Adjust.
15363 Also, make sure to include the `,' for these declarations.
15364
15365 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15366
15367 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15368 definition; avoids potential autoreconf problems.
15369
15370 2002-11-15 Akim Demaille <akim@epita.fr>
15371
15372 Always check the value returned by yyparse.
15373
15374 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15375 returned by yyparse.
15376 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15377 Adjust calls.
15378 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15379 returned by yyparse.
15380
15381 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15382
15383 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
15384 on input.at test.
15385
15386 2002-11-14 Paul Eggert <eggert@twinsun.com>
15387
15388 * src/output.c (output_skeleton): Call xfopen instead of
15389 duplicating xfopen's body.
15390
15391 Fix bugs reported by Nelson H. F. Beebe in
15392 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
15393
15394 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
15395 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
15396 Group compiler. Instead, use "$CC -E bar.c". Include the .h
15397 file twice in the grammar, as an extra check.
15398
15399 * tests/input.at (Torturing the Scanner): Surround the
15400 backslash-newline tests with "#if 0", to make it less likely that
15401 we'll run into compiler bugs. Bring back solitary \ inside
15402 comment, but add a closing comment to work around HP C bug. Don't
15403 test backslash-newline in C character constant.
15404
15405 2002-11-14 Akim Demaille <akim@epita.fr>
15406
15407 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
15408 status of the compiler.
15409 Calling `exit 1' is no longer needed.
15410 Reported by Nelson H. F. Beebe.
15411
15412 2002-11-14 Akim Demaille <akim@epita.fr>
15413
15414 * tests/atlocal.in (CPPFLAGS): We have config.h.
15415 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
15416 New.
15417 * tests/actions.at, tests/calc.at, tests/conflicts.at,
15418 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
15419 * tests/regression.at, tests/torture.at: Use them for all the
15420 grammars that are to be compiled.
15421 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
15422 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
15423 * doc/bison.texinfo (GLR Parsers): Document `inline'.
15424
15425 2002-11-14 Akim Demaille <akim@epita.fr>
15426
15427 * doc/bison.texinfo: Various formatting changes (alignments in
15428 samples, additional @group/@end group, GCS in samples.
15429 Use @deffn instead of simple @table to define the directives,
15430 macros, variables etc.
15431
15432 2002-11-13 Paul Eggert <eggert@twinsun.com>
15433
15434 Fix some bugs reported by Albert Chin-A-Young in
15435 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
15436
15437 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
15438 -o c"; the HP C compiler chatters during compilation.
15439 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
15440 * tests/headers.at (export YYLTYPE): Likewise.
15441
15442 * tests/input.at (Torturing the Scanner): Remove lines containing
15443 solitary backslashes, as they tickle a bug in the HP C compiler.
15444
15445 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
15446 comments, since they're not portable. Use GNU coding style.
15447
15448 2002-11-13 Akim Demaille <akim@epita.fr>
15449
15450 * data/yacc.c: Leave bigger chunks of quoted text.
15451 (YYDSYMPRINTF): New.
15452 Use it to report symbol activities.
15453 * data/glr.c (YYDSYMPRINTF): New.
15454 Use it.
15455
15456 2002-11-12 Paul Eggert <eggert@twinsun.com>
15457
15458 Version 1.75b.
15459
15460 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
15461 (yyglrReduce): Return yyok, not 0.
15462 This should avoid the enumerated-type warnings reported
15463 by Nelson H. F. Beebe in
15464 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
15465
15466 * lib/bbitset.h (BITSET_INLINE): Remove.
15467 * lib/bitset.h [! BITSET_INLINE]: Remove.
15468 (bitset_set, bitset_reset, bitset_test): Rename local vars
15469 to avoid shadowing warnings by GCC.
15470
15471 * data/glr.c (inline): Remove #define. It's the user's
15472 responsibility to #define it away, just like 'const'.
15473 This fixes one of the bugs reported by Nelson H. F. Beebe in
15474 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
15475
15476 * Makefile.maint (po-check): Scan .l and .y files instead of the
15477 .c and the .h files that they generate. This fixes the bug
15478 reported by Tim Van Holder in:
15479 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
15480 Look for N_ as well as for _. Try to avoid matching #define for
15481 N_ and _.
15482 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
15483 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
15484 * src/scan-gram.l: Revamp regular expressions so that " and '
15485 do not confuse xgettext.
15486
15487 * src/struniq.h (struniq_new): Do not declare the return type
15488 to be 'const'; this violates the C standard.
15489 * src/struniq.c (struniq_new): Likewise.
15490
15491 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
15492
15493 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
15494 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
15495 linker.
15496
15497 2002-11-12 Akim Demaille <akim@epita.fr>
15498
15499 * Makefile.maint: Sync with Autoconf:
15500 (local_updates): New.
15501
15502 2002-11-12 Akim Demaille <akim@epita.fr>
15503
15504 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
15505
15506 2002-11-12 Akim Demaille <akim@epita.fr>
15507
15508 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
15509 locations.
15510
15511 2002-11-12 Akim Demaille <akim@epita.fr>
15512
15513 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
15514 not yyvalue.
15515
15516 2002-11-12 Akim Demaille <akim@epita.fr>
15517
15518 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
15519 Use it to test the GLR parser.
15520
15521 2002-11-12 Akim Demaille <akim@epita.fr>
15522
15523 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
15524 defines it.
15525 * data/glr.c (yystos): New.
15526 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
15527 (YYDSYMPRINT): New.
15528 (yyval): Don't define it, it is handled via M4.
15529 (yyrecoverParseError): Free verbosely the discarded symbols.
15530 * data/yacc.c (yysymprint): Remove, rather...
15531 (b4_yysymprint_generate): invoke.
15532 * data/c.m4 (b4_yysymprint_generate): New.
15533 Accept pointers as arguments, as opposed to the version from
15534 yacc.c.
15535 (b4_yydestruct_generate): Likewise.
15536 * tests/cations.at (Printers and Destructors): Use Bison directives
15537 instead of CPP macros.
15538 Don't rely on internal details.
15539
15540 2002-11-12 Akim Demaille <akim@epita.fr>
15541
15542 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
15543 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
15544 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
15545 it against YYEMPTY and so forth), work on yytoken (i.e., set
15546 it to YYEMPTY etc.).
15547 (yydestruct): Replace with a b4_yydestruct_generate invocation.
15548 (b4_symbol_actions): Remove.
15549 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
15550 for 0, end-of-input.
15551
15552 2002-11-12 Akim Demaille <akim@epita.fr>
15553
15554 * doc/bison.texinfo (Destructor Decl): New.
15555
15556 2002-11-12 Akim Demaille <akim@epita.fr>
15557
15558 * src/tables.c (tables_generate): Use free for pointers that
15559 cannot be NULL, not XFREE.
15560 (pack_vector): Use assert, not fatal, for bound violations.
15561 * src/state.c (state_new): Likewise.
15562 * src/reader.c (reader): Likewise.
15563 * src/lalr.c (set_goto_map): Likewise.
15564 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
15565 the file name.
15566
15567 2002-11-12 Akim Demaille <akim@epita.fr>
15568
15569 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
15570 Restore.
15571 * src/scan-gram.l (last_string): Is global to the file, not to
15572 yylex.
15573 * src/parse-gram.y (input): Don't append the epilogue here,
15574 (epilogue.opt): do it here, and free the scanner's obstack.
15575 * src/reader.c (epilogue_set): Rename as...
15576 (epilogue_augment): this.
15577 * data/c.m4 (b4_epilogue): Defaults to empty.
15578
15579 2002-11-12 Akim Demaille <akim@epita.fr>
15580
15581 * src/getargs.c (long_options): Remove duplicates.
15582 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
15583 Remove.
15584 * doc/bison.rnh: Remove.
15585 * doc/bison.texinfo (VMS Invocation): Remove.
15586
15587 2002-11-12 Akim Demaille <akim@epita.fr>
15588
15589 * src/struniq.h, src/struniq.c (struniq_t): Is const.
15590 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
15591
15592 Use struniq for symbols.
15593
15594 * src/symtab.h (symbol_t): The tag member is a struniq.
15595 (symbol_type_set): Adjust.
15596 * src/symtab.c (symbol_new): Takes a struniq.
15597 (symbol_free): Don't free the tag member.
15598 (hash_compare_symbol_t, hash_symbol_t): Rename as...
15599 (hash_compare_symbol, hash_symbol): these.
15600 Use the fact that tags as struniqs.
15601 (symbol_get): Use struniq_new.
15602 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
15603 Returns a strniq.
15604 * src/reader.h (merger_list, grammar_currentmerge_set): The name
15605 and type members are struniqs.
15606 * src/reader.c (get_merge_function)
15607 (grammar_current_rule_merge_set): Adjust.
15608 (TYPE, current_type): Are struniq.
15609
15610 Use struniq for file names.
15611
15612 * src/files.h, src/files.c (infile): Split into...
15613 (grammar_file, current_file): these.
15614 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
15615 * src/reduce.c (reduce_print): Likewise.
15616 * src/getargs.c (getargs): Likewise.
15617 * src/complain.h, src/complain.c: Likewise.
15618 * src/main.c (main): Call struniqs_new early enough to use it for
15619 file names.
15620 Don't free the input file name.
15621
15622 2002-11-12 Akim Demaille <akim@epita.fr>
15623
15624 * src/symtab.c (symbol_free): Remove dead deactivated code:
15625 type_name are properly removed.
15626 Don't use XFREE to free items that cannot be NULL.
15627 * src/struniq.h, src/struniq.c: New.
15628 * src/main.c (main): Initialize/free struniqs.
15629 * src/parse-gram.y (%union): Add astruniq member.
15630 (yyprint): Adjust.
15631 * src/scan-gram.l (<{tag}>): Return a struniq.
15632 Free the obstack bit that used to store it.
15633 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
15634
15635 2002-11-11 Paul Eggert <eggert@twinsun.com>
15636
15637 Revamp to fix many (but not all) of the C- and M4-related quoting
15638 problems. Among other things, this fixes the Bison bug reported
15639 by Jan Hubicka when processing the Bash grammar; see:
15640 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
15641
15642 Use new @ escapes consistently. Represent brackets with @{ and @}
15643 rather than @<:@ and @:>@, since this works a bit better with dumb
15644 editors like vi. Represent @ with @@, since @ is now consistently
15645 an escape. Use @oline@ and @ofile@ rather than __oline__ and
15646 __ofile__, to avoid unexpected expansions. Similarly, use @output
15647 rather than #output.
15648
15649 * data/c.m4 (b4_copyright): Omit file name from comment, since
15650 the file name could contain "*/".
15651 (b4_synclines_flag): Don't quote the 2nd argument; it should already
15652 be quoted. All uses changed.
15653
15654 * data/glr.c: Use new @ escapes consistently.
15655 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
15656 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
15657 Remove, since they couldn't handle arbitrary characters in file
15658 names.
15659 * data/lalr1.cc: Likewise.
15660 * data/yacc.c: Likewise.
15661
15662 * src/files.c (output_infix): Remove; all uses removed.
15663 * src/files.h: Likewise.
15664
15665 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
15666 mishandled funny characters in file names, and anyway it isn't
15667 needed any more.
15668 * data/yacc.c: Likewise.
15669 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
15670
15671 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
15672 * data/yacc.c: Likewise.
15673
15674 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
15675 strings now.
15676 (muscle_init): Quote filename as a C string.
15677 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
15678 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
15679 * src/output.c (escaped_file_name_output): New function.
15680 (prepare_symbols): Quote tokens for M4.
15681 (prepare): Don't insert output_infix, output_prefix,
15682 output_parser_name, output_header_name; this is now down by scan-skel.
15683 Insert skeleton as a C string.
15684
15685 * src/output.c (user_actions_output, symbol_destructors_output,
15686 symbol_printers_output): Quote filenames for C and M4.
15687 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15688
15689 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
15690 escapes other than \\ and \'; this simplifies the code.
15691 (<SC_STRING>): Likewise, for \\ and \".
15692 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
15693 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
15694 Use new escapes @{ and @} for [ and ].
15695
15696 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
15697 them with auto vars.
15698 Switch to new escape scheme, where @ is the escape character uniformly.
15699 Abort if a stray escape character is found. Avoid unbounded input
15700 buffer when parsing non-escaped text.
15701
15702 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
15703 __oline__, #output, $@, and @{ do not have unintended meanings.
15704
15705 2002-11-09 Paul Eggert <eggert@twinsun.com>
15706
15707 Fix the test failure due to GCC warnings described in
15708 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
15709 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
15710 evaluate to 0 if it's impossible for NINF to be in the respective
15711 table.
15712 (yygetLRActions, yyrecoverParseError): Use them.
15713
15714 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
15715 counted in the token inserted at end of file. Now takes
15716 location_t *, not location_t, so that the location can be
15717 adjusted. All uses changed.
15718
15719 * tests/regression.at (Invalid inputs): Adjust wording in
15720 diagnostic to match the new behavior.
15721
15722 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
15723 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
15724 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
15725 abort ();'. This reduces the runtime of the "Many lookaheads"
15726 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
15727 GCC 3.2.
15728
15729 2002-11-07 Paul Eggert <eggert@twinsun.com>
15730
15731 * src/parse-gram.y (CHARACTER): Remove unused token.
15732 All uses removed.
15733
15734 * src/scan-gram.l: Remove stack option. We no longer use the
15735 stack, since the stack was never deeper than 1; instead, use the
15736 new auto var c_context to record the stacked value.
15737
15738 Remove nounput option. At an unexpected end of file, we now unput
15739 the minimal input necessary to end cleanly; this simplifies the
15740 code.
15741
15742 Avoid unbounded token sizes where this is easy.
15743
15744 (unexpected_end_of_file): New function.
15745 Use it to systematize the error message on unexpected EOF.
15746 (last-string): Now auto, not static.
15747 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
15748 (scanner_last_string_free): Remove; not used.
15749 (percent_percent_count): Move decl to just before use.
15750 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
15751 not the (never otherwised-used) CHARACTER.
15752
15753 2002-11-07 Akim Demaille <akim@epita.fr>
15754
15755 Let yyerror always receive the msg as last argument, so that
15756 yyerror can be variadic.
15757
15758 * data/yacc.c (b4_yyerror_args): New.
15759 Use it when calling yyerror.
15760 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
15761 Use it when calling yyerror.
15762 * doc/bison.texinfo (Error Reporting): Adjust.
15763 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
15764 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
15765
15766 2002-11-06 Akim Demaille <akim@epita.fr>
15767
15768 #line should have quoted strings.
15769 Ideally, this should be done by m4_quotearg.
15770
15771 * src/scan-skel.l: Include quotearg.h.
15772 Quote __ofile__.
15773 * src/output.c (symbol_printers_output)
15774 (symbol_destructors_output): Quote the file name.
15775
15776 2002-11-06 Akim Demaille <akim@epita.fr>
15777
15778 * tests/regression.at (Invalid inputs): Adjust to the recent
15779 messages.
15780
15781 2002-11-06 Akim Demaille <akim@epita.fr>
15782
15783 Restore --no-lines.
15784 Reported by Jim Kent.
15785
15786 * data/c.m4 (b4_syncline): New.
15787 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
15788 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
15789 * src/output.c (user_actions_output): Likewise.
15790 (prepare): Define 'b4_synclines_flag'.
15791 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
15792
15793 2002-11-06 Akim Demaille <akim@epita.fr>
15794
15795 * src/main.c (main): Free `infile'.
15796 * src/scan-gram.l (handle_syncline): New.
15797 Recognize `#line'.
15798 * src/output.c (user_actions_output, symbol_destructors_output)
15799 (symbol_printers_output): Use the location's file name, not
15800 infile.
15801 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15802
15803 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15804
15805 * src/tables.c (matching_state): Don't allow states to match if
15806 either has GLR conflict entries.
15807
15808 2002-11-05 Paul Eggert <eggert@twinsun.com>
15809
15810 * src/scan-gram.l: Use more accurate diagnostics, e.g.
15811 "integer out of range" rather than "invalid value".
15812 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
15813 accordingly.
15814
15815 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
15816 Also, remove one static variable in the scanner.
15817
15818 * src/scan-gram.l (braces_level): Now auto, not static.
15819 Initialize to zero if the compiler is being picky.
15820 (INITIAL): Clear braces_level instead of incrementing it.
15821 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
15822 as POSIX 1003.1-2001 requires.
15823 * src/system.h (IF_LINT): New macro, taken from coreutils.
15824 * configure.ac: Define "lint" if --enable-gcc-warnings.
15825
15826 2002-11-05 Akim Demaille <akim@epita.fr>
15827
15828 * src/scan-gram.l: When it starts with `%', complain about the
15829 whole directive, not just that `invalid character: %'.
15830
15831 2002-11-04 Akim Demaille <akim@epita.fr>
15832
15833 * Makefile.maint: Update from Autoconf.
15834 (update, cvs-update, po-update, do-po-update): New.
15835
15836 2002-11-04 Akim Demaille <akim@epita.fr>
15837
15838 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
15839 and yyerror.
15840 Have yyerror `use' its arguments.
15841 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
15842 returns true when location & yacc & pure & parse-param.
15843 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
15844
15845 2002-11-04 Akim Demaille <akim@epita.fr>
15846
15847 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
15848 clashes.
15849 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15850 font-lock-mode.
15851 Use complain_at.
15852 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15853 slot 0.
15854
15855 2002-11-03 Paul Eggert <eggert@twinsun.com>
15856
15857 * src/reader.c (get_merge_function, grammar_current_rule_check):
15858 Use consistent diagnostics for reporting type name clashes.
15859 Quote the types with <>, for consistency with Yacc.
15860 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15861
15862 2002-11-03 Akim Demaille <akim@epita.fr>
15863
15864 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15865 New.
15866 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15867 (b4_parse_param): Remove.
15868 Use b4_identification.
15869 Propagate b4_pure_args where needed to pass them to yyerror.
15870 * data/glr.m4 (b4_parse_param): Remove.
15871 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15872 (b4_lpure_formals): New.
15873 Use b4_identification.
15874 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15875 b4_user_formals and b4_user_args.
15876 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15877 (yyreportAmbiguity): When using a pure parser, also need
15878 the location, and the parse-params.
15879 Adjust callers.
15880 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15881 When using a pure parser, also need the parse-params.
15882 Adjust callers.
15883 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15884 (%pure-parser + %parse-param) LALR and GLR parsers.
15885 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15886 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15887 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15888 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15889 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15890 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15891 * doc/bison.texinfo: Untabify the whole file.
15892 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15893 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15894 (Error Reporting): Adjust to these new directives.
15895 Document %error-verbose, deprecate YYERROR_VERBOSE.
15896
15897 2002-11-03 Akim Demaille <akim@epita.fr>
15898
15899 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15900 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15901 command line options.
15902 * tests/cxx-type.at: Formatting changes.
15903
15904 2002-11-03 Paul Eggert <eggert@twinsun.com>
15905
15906 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15907 to count columns correctly, and to check for invalid inputs.
15908
15909 Use mbsnwidth to count columns correctly. Account for tabs, too.
15910 Include mbswidth.h.
15911 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15912 (extend_location): New function.
15913 (YY_LINES): Remove.
15914
15915 Handle CRLF in C code rather than in Lex code.
15916 (YY_INPUT): New macro.
15917 (no_cr_read): New function.
15918
15919 Scan UCNs, even though we don't fully handle them yet.
15920 (convert_ucn_to_byte): New function.
15921
15922 Handle backslash-newline correctly in C code.
15923 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15924 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15925 all uses changed.
15926 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15927 Use {splice} wherever C allows backslash-newline.
15928 YY_STEP after space, newline, vertical-tab.
15929 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15930
15931 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15932
15933 ({int}, handle_action_dollar, handle_action_at): Check for integer
15934 overflow.
15935
15936 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15937
15938 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15939 as well as \000. Check for UCHAR_MAX, not 255.
15940 Allow \x with an arbitrary positive number of digits, as in C.
15941 Check for overflow here.
15942 Allow \? and UCNs, for compatibility with C.
15943
15944 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15945 with quote slot used by complain_at.
15946
15947 * tests/input.at: Add tests for backslash-newline, m4 quotes
15948 in symbols, long literals, and funny escapes in strings.
15949
15950 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15951 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15952 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15953 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15954 * m4/mbswidth.m4: New file, from GNU coreutils.
15955
15956 * doc/bison.texinfo (Grammar Outline): Document // comments.
15957 (Symbols): Document that trigraphs have no special meaning in Bison,
15958 nor is backslash-newline allowed.
15959 (Actions): Document that trigraphs have no special meaning.
15960
15961 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15962 no longer used.
15963
15964 2002-11-02 Paul Eggert <eggert@twinsun.com>
15965
15966 * src/reader.c: Don't include quote.h; not needed.
15967 (get_merge_function): Reword warning to be consistent with
15968 type clash diagnostic in grammar_current_rule_check.
15969
15970 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15971 bug in trigraph handling.
15972
15973 * src/output.c (prepare_symbols): When printing token names,
15974 escape "[" as "@<:@" and likewise for "]".
15975
15976 * src/system.h (errno): Remove declaration, as we are now
15977 assuming C89 or better, and C89 guarantees errno.
15978
15979 2002-10-30 Paul Eggert <eggert@twinsun.com>
15980
15981 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15982 Check for close failures.
15983 * src/files.h (xfclose): Return void, not int, since it always
15984 returned zero.
15985 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15986 indicates one.
15987 * src/output.c (output_skeleton): Use xfclose rather than fclose
15988 and ferror. xfclose now checks ferror.
15989
15990 * data/glr.c (YYLEFTMOST_STATE): Remove.
15991 (yyreportTree): Use a stack-based leftmost state. This avoids
15992 our continuing battles with bogus warnings about initializers.
15993
15994 2002-10-30 Akim Demaille <akim@epita.fr>
15995
15996 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15997 #if.
15998
15999 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16000
16001 * tests/glr-regr1.at: New test for reported regressions.
16002 * tests/testsuite.at: Add glr-regr1.at test.
16003 * tests/Makefile.am: Add glr-regr1.at test.
16004
16005 2002-10-24 Paul Eggert <eggert@twinsun.com>
16006
16007 Version 1.75a.
16008
16009 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16010 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16011 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16012 Don't assume strdup exists; POSIX says its an XSI extension.
16013 Check for buffer overflow on input.
16014
16015 2002-10-24 Akim Demaille <akim@epita.fr>
16016
16017 * src/output.c (output_skeleton): Don't disable M4sugar comments
16018 too soon: it results in comments being expanded.
16019 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16020 first output.
16021
16022 2002-10-24 Akim Demaille <akim@epita.fr>
16023
16024 * data/yacc.c (m4_int_type): New.
16025 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16026 char' as only yacc.c wants K&R portability.
16027 * data/glr.c (yysigned_char): Remove.
16028 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16029 Reported by Quoc Peyrot.
16030
16031 2002-10-23 Paul Eggert <eggert@twinsun.com>
16032
16033 * src/main.c (main): With --trace=time, report times even if a
16034 non-fatal error occurs. Formerly, the times were reported in some
16035 such cases but not in others.
16036 * src/reader.c (reader): Just return if a complaint has been issued,
16037 instead of exiting, so that 'main' can report times.
16038
16039 2002-10-22 Akim Demaille <akim@epita.fr>
16040
16041 * src/system.h: Include sys/types.
16042 Reported by Bert Deknuydt.
16043
16044 2002-10-23 Paul Eggert <eggert@twinsun.com>
16045
16046 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16047 Suggested by Art Haas.
16048
16049 2002-10-22 Paul Eggert <eggert@twinsun.com>
16050
16051 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16052 decl; not needed any more.
16053 * src/main.c (main): Use return to exit, undoing yesterday's change.
16054 The last OS that we could find where this wouldn't work is
16055 SunOS 3.5, and that's too old to worry about now.
16056
16057 * data/glr.c (struct yyltype): Define members even when not
16058 doing locations. This is more consistent with yacc.c, and it
16059 works around the following bug reports:
16060 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16061 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
16062
16063 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16064 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16065 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16066
16067 2002-10-22 Akim Demaille <akim@epita.fr>
16068
16069 * data/README: New.
16070
16071 2002-10-21 Paul Eggert <eggert@twinsun.com>
16072
16073 Be consistent about 'bool'; the old code used an enum in one
16074 module and an int in another, and this violates the C standard.
16075 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16076 * configure.ac (AC_HEADER_STDBOOL): Add.
16077 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16078 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16079 * src/symtab.c (hash_compare_symbol_t): Likewise.
16080 * src/system.h (bool, false, true): Use a definition consistent
16081 with ../lib/hash.c. All uses changed.
16082
16083 * src/complain.c (warning_issued): Renamed from warn_message_count,
16084 so that we needn't worry about integer overflow (!).
16085 Now of type bool. All uses changed.
16086 (complaint_issued): Renamed from complain_message_count; likewise.
16087
16088 * src/main.c (main): Use exit to exit with failure.
16089
16090 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16091 rather than 1 and 0.
16092 * src/main.c (main): Likewise.
16093 * src/getargs.c (getargs): Likewise.
16094 * src/reader.c (reader): Likewise.
16095
16096 * src/getarg.c (getargs): Remove duplicate code for
16097 "Try `bison --help'".
16098
16099 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16100 What was that "2" for?
16101
16102 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16103 * src/getargs.c (usage): Likewise.
16104
16105 * src/getargs.c (getargs): When there are too few operands, report
16106 the last one. When there are too many, report the first extra
16107 one. This is how diffutils does it.
16108
16109 2002-10-20 Paul Eggert <eggert@twinsun.com>
16110
16111 Remove K&R vestiges.
16112 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16113 * src/complain.c (VA_START): Remove. Assume prototypes.
16114 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16115 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16116 fatal): Assume prototypes.
16117 * src/complain.h: Assume prototypes.
16118 * src/system.h (PARAMS): Remove.
16119 Include <limits.h> unconditionally, since it's guaranteeed even
16120 for a freestanding C89 compiler.
16121 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16122 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
16123
16124 2002-10-20 Akim Demaille <akim@epita.fr>
16125
16126 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16127 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16128 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16129 (yyresolveStates, yyresolveAction, yyresolveStack)
16130 (yyprocessOneStack): Use them.
16131 (yy_reduce_print): New.
16132 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16133
16134 2002-10-20 Akim Demaille <akim@epita.fr>
16135
16136 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16137 arguments and output `void'.
16138 (b4_c_function): Rename as...
16139 (b4_c_function_def): this.
16140 (b4_c_function_decl, b4_c_ansi_function_def)
16141 (b4_c_ansi_function_decl): New.
16142 Change the interpretation of the arguments: before `int, foo', now
16143 `int foo, foo'.
16144 * data/yacc.c (yyparse): Prototype and define thanks to these.
16145 Adjust b4_c_function_def uses.
16146 * data/glr.c (yyparse): Likewise, but ANSI only.
16147
16148 2002-10-20 Akim Demaille <akim@epita.fr>
16149
16150 * src/output.c (prepare): Move the definition of `tokens_number',
16151 `nterms_number', `undef_token_number', `user_token_number_max'
16152 to...
16153 (prepare_tokens): Here.
16154 (prepare_tokens): Rename as...
16155 (prepare_symbols): this.
16156 (prepare): Move the definition of `rules_number' to...
16157 (prepare_rules): here.
16158 (prepare): Move the definition of `last', `final_state_number',
16159 `states_number' to...
16160 (prepare_states): here.
16161 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16162
16163 2002-10-20 Akim Demaille <akim@epita.fr>
16164
16165 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16166
16167 2002-10-20 Akim Demaille <akim@epita.fr>
16168
16169 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16170 * data/c.m4: here.
16171
16172 2002-10-20 Akim Demaille <akim@epita.fr>
16173
16174 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16175 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16176 `pair'.
16177 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16178 `name' to...
16179 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16180 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16181 These.
16182
16183 2002-10-19 Paul Eggert <eggert@twinsun.com>
16184
16185 Do not create a temporary file, as that involves security and
16186 cleanup headaches. Instead, use a pair of pipes.
16187 Derived from a suggestion by Florian Krohm.
16188 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16189 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16190 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16191 (BISON_PREREQ_SUBPIPE): Add.
16192 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16193 Add subpipe.h, subpipe.c.
16194 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16195 * po/POTFILES.in: Add lib/subpipe.c.
16196 * src/output.c: Include "subpipe.h".
16197 (m4_invoke): Remove decl.
16198 (scan_skel): New decl.
16199 (output_skeleton): Use pipe rather than temporary file for m4 input.
16200 Check that m4sugar.m4 is readable, to avoid deadlock.
16201 Check for pipe I/O error.
16202 * src/scan-skel.l (readpipe): Remove decl.
16203 (scan_skel): New function, to be used in place of m4_invoke.
16204 Read from stream rather than file.
16205
16206 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16207 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16208 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16209 this generates a more-accurate value anyway.
16210
16211 * lib/timevar.c (timervar_accumulate): Rename locals to
16212 avoid confusion with similarly-named more-global.
16213 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16214
16215 * src/output.c (prepare): Use xstrdup to convert char const *
16216 to char *, to avoid GCC warning.
16217
16218 2002-10-19 Akim Demaille <akim@epita.fr>
16219
16220 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16221 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16222 Use them to have `calc.y' ready for %pure-parser.
16223 * data/yacc.c (YYLEX): Pass a yylex return type to
16224 b4_c_function_call.
16225
16226 2002-10-19 Akim Demaille <akim@epita.fr>
16227
16228 Prototype support of %lex-param and %parse-param.
16229
16230 * src/parse-gram.y: Add the definition of the %lex-param and
16231 %parse-param tokens, plus their rules.
16232 Drop the `_' version of %glr-parser.
16233 Add the "," token.
16234 * src/scan-gram.l (INITIAL): Scan them.
16235 * src/muscle_tab.c: Comment changes.
16236 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16237 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16238 (muscle_entry_s): The `value' member is no longer const.
16239 Adjust all dependencies.
16240 * src/muscle_tab.c (muscle_init): Adjust: use
16241 MUSCLE_INSERT_STRING.
16242 Initialize the obstack earlier.
16243 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16244 (muscle_pair_list_grow): New.
16245 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16246 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16247 * tests/calc.at: Use %locations, not --locations.
16248 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16249
16250 2002-10-19 Akim Demaille <akim@epita.fr>
16251
16252 * src/getargs.c (usage): Take status as argument and exit
16253 accordingly.
16254 Report the traditional `Try ... --help' message when status != 0.
16255 (usage, version): Don't take a FILE * as arg, it is pointless.
16256 (getargs): When there is an incorrect number of arguments, make it
16257 an error, and report it GNUlically thanks to `usage ()'.
16258
16259 2002-10-18 Paul Eggert <eggert@twinsun.com>
16260
16261 * data/glr.c (yyreportParseError): Don't assume that sprintf
16262 yields the length of the printed string, as this is not true
16263 on SunOS 4.1.4. Reported by Peter Klein.
16264
16265 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16266 * tests/conflicts.at (%nonassoc and eof): Likewise.
16267 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16268
16269 2002-10-17 Akim Demaille <akim@epita.fr>
16270
16271 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16272 * src/getargs.c (trace_types, trace_args): Adjust.
16273 * src/reader.c (grammar_current_rule_prec_set)
16274 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16275 Standardize error messages.
16276 And s/@prec/%prec/!
16277 (reader): Use trace_flag to enable scanner/parser debugging,
16278 instead of an adhoc scheme.
16279 * src/scan-gram.l: Remove trailing debugging code.
16280
16281 2002-10-16 Paul Eggert <eggert@twinsun.com>
16282
16283 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16284 MUSCLE_TAB_H.
16285
16286 * NEWS: Officially drop support for building Bison with K&R C,
16287 since it didn't work anyway and it's not worth worrying about.
16288 * Makefile.maint (wget_files): Remove ansi2knr.c.
16289 (ansi2knr.c-url_prefix): Remove.
16290 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16291 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16292 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16293
16294 2002-10-15 Paul Eggert <eggert@twinsun.com>
16295
16296 Stop using the "enum_" trick for K&R-style function definitions;
16297 it confused me, and I was the author! Instead, assume that people
16298 who want to use K&R C compilers (when using these modules in GCC,
16299 perhaps?) will run ansi2knr.
16300
16301 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16302 All uses of "enum_" changed to "enum ".
16303 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16304 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16305
16306 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16307 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16308 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16309 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16310 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16311 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16312 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16313 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16314 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16315 Use function prototypes; this removes the need for declaring
16316 static functions simply to provide their prototypes.
16317 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16318 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16319 bitset_count_, bitset_create, bitset_dump, bitset_first,
16320 bitset_free, bitset_init, bitset_last, bitset_next,
16321 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16322 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16323 bitset_print, bitset_release_memory, bitset_toggle_,
16324 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16325 debug_bitset): Likewise.
16326 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16327 * lib/bitset_stats.c (bitset_log_histogram_print,
16328 bitset_percent_histogram_print, bitset_stats_and,
16329 bitset_stats_and_cmp, bitset_stats_and_or,
16330 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16331 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16332 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16333 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16334 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16335 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16336 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16337 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16338 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16339 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16340 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16341 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16342 bitset_stats_zero): Likewise.
16343 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16344 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16345 bitsetv_dump, debug_bitsetv): Likewise.
16346 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16347 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16348 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16349 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16350 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16351 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16352 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16353 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16354 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16355 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16356 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16357 Likewise.
16358 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16359 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16360 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16361 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16362 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16363 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16364 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16365 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16366 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16367 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16368 lbitset_xor_cmp, lbitset_zero): Likewise.
16369
16370 2002-10-14 Akim Demaille <akim@epita.fr>
16371
16372 Version 1.75.
16373
16374 2002-10-14 Akim Demaille <akim@epita.fr>
16375
16376 * tests/Makefile.am (maintainer-check-posix): New.
16377
16378 2002-10-14 Akim Demaille <akim@epita.fr>
16379
16380 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
16381 member.
16382
16383 2002-10-14 Akim Demaille <akim@epita.fr>
16384
16385 * src/tables.c (table_ninf_remap): base -> tab.
16386 Reported by Matt Rosing.
16387
16388 2002-10-14 Paul Eggert <eggert@twinsun.com>
16389
16390 * tests/action.at, tests/calc.at, tests/conflicts.at,
16391 tests/cxx-type.at, tests/headers.at, tests/input.at,
16392 tests/regression.at, tests/synclines.at, tests/torture.at:
16393 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
16394 so that the tests still work even if POSIXLY_CORRECT is set.
16395 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
16396
16397 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
16398 for portability to K&R hosts. Fix typo: signed char is guaranteed
16399 only to 127, not to 128.
16400 * data/glr.c (yysigned_char): New type.
16401 * data/yacc.c (yysigned_char): Likewise.
16402 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
16403
16404 2002-10-13 Paul Eggert <eggert@twinsun.com>
16405
16406 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
16407 true due to limited range of data type" warning from GCC.
16408
16409 * data/c.m4 (b4_token_defines): Protect against double-inclusion
16410 by wrapping enum yytokentype's definition inside #ifndef
16411 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
16412
16413 2002-10-13 Akim Demaille <akim@epita.fr>
16414
16415 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
16416 Un yy- yyrhs to avoid the name clash with the global YYRHS.
16417
16418 2002-10-13 Akim Demaille <akim@epita.fr>
16419
16420 * Makefile.maint: Update from Autoconf 2.54.
16421 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
16422
16423 2002-10-13 Akim Demaille <akim@epita.fr>
16424
16425 * src/print.c (print_state): Separate the list of solved conflicts
16426 from the other items.
16427 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
16428
16429 2002-10-13 Akim Demaille <akim@epita.fr>
16430
16431 Let nondeterministic skeletons be usable with deterministic
16432 tables.
16433
16434 With the patch, GAWK compiled by GCC without -O2 passes its test
16435 suite using a GLR parser driven by LALR tables. It fails with -O2
16436 because `struct stat' gives two different answers on my machine:
16437 88 (definition of an auto var) and later 96 (memset on this var).
16438 Hence the stack is badly corrumpted. The headers inclusion is to
16439 blame: if I move the awk.h inclusion before GLR's system header
16440 inclusion, the two struct stat have the same size.
16441
16442 * src/tables.c (pack_table): Always create conflict_table.
16443 (token_actions): Always create conflict_list.
16444 * data/glr.c (YYFLAG): Remove, unused.
16445
16446 2002-10-13 Akim Demaille <akim@epita.fr>
16447
16448 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
16449 (O0FLAGS): New.
16450 (VALGRIND, GXX): New.
16451 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
16452 * tests/bison.in: Run $PREBISON a pre-command.
16453 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
16454 (maintainer-check-g++): New.
16455 * Makefile.am (maintainer-check): New.
16456
16457 2002-10-13 Akim Demaille <akim@epita.fr>
16458
16459 * data/glr.c: Formatting changes.
16460 Tweak some trace messages to match yacc.c's.
16461
16462 2002-10-13 Akim Demaille <akim@epita.fr>
16463
16464 GLR parsers sometimes raise parse errors instead of performing the
16465 default reduction.
16466 Reported by Charles-Henry de Boysson.
16467
16468 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
16469 check the length of the traces when %glr.
16470 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
16471 GLR's traces.
16472 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
16473 Test GLR parsers.
16474 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
16475 (yyltype): Remove the yy prefix from the member names.
16476 (yytable): Complete its comment.
16477 (yygetLRActions): Map error action number from YYTABLE from
16478 YYTABLE_NINF to 0.
16479 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
16480 (which was a bug: it should have been YYTABEL_NINF, and yet it was
16481 not satisfying as we could compare an YYACTION computed from
16482 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
16483 only value for error actions.
16484 (yyreportParseError): In verbose parse error messages, don't issue
16485 `error' in the list of expected tokens.
16486 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
16487 next action to perform to match glr.c's decoding.
16488 (yytable): Complete its comment.
16489
16490 2002-10-13 Paul Eggert <eggert@twinsun.com>
16491
16492 Fix problem reported by Henrik Grubbstroem in
16493 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
16494 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
16495 because the Bison parser reads the second action before reducing
16496 the first one.
16497 * src/scan-gram.l (rule_length): New static var.
16498 Use it to keep track of the rule length in the scanner, since
16499 we can't expect the parser to be in lock-step sync with the scanner.
16500 (handle_action_dollar, handle_action_at): Use this var.
16501 * tests/actions.at (Exotic Dollars): Test for the problem.
16502
16503 2002-10-12 Paul Eggert <eggert@twinsun.com>
16504
16505 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
16506 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
16507 Include <sys/time.h> when checking for clock_t and struct tms.
16508 Use same include order as source.
16509 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
16510 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
16511
16512 * lib/timevar.c: Update copyright date and clarify comments.
16513 (get_time) [IN_GCC]: Keep the GCC version for reference.
16514
16515 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
16516 GCC version as of today, then merge Bison's changes.
16517 Change "GCC" to "Bison" in copyright notice. timevar.def's
16518 author is Akim, so change that too.
16519
16520 * src/reader.c (grammar_current_rule_check):
16521 Don't worry about the default action if $$ is untyped.
16522 Prevents bogus warnings reported by Jim Gifford in
16523 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
16524
16525 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
16526 * data/glr.c, data/lalr1.cc, data/yacc.c:
16527 Output token definitions before the first part of user declarations.
16528 Fixes compatibility problem reported by Jim Gifford for kbd in
16529 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
16530
16531 2002-10-11 Paul Eggert <eggert@twinsun.com>
16532
16533 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
16534 (yyparse): here. This undoes some of the 2002-07-25 change.
16535 Compatibility problem reported by Ralf S. Engelschall with
16536 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
16537
16538 2002-10-11 Akim Demaille <akim@epita.fr>
16539
16540 * tests/regression.at Characters Escapes): New.
16541 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
16542 characters.
16543 Reported by Jan Nieuwenhuizen.
16544
16545 2002-10-11 Akim Demaille <akim@epita.fr>
16546
16547 * po/id.po: New.
16548
16549 2002-10-10 Paul Eggert <eggert@twinsun.com>
16550
16551 Portability fixes for bitsets; this also avoids several GCC
16552 warnings.
16553
16554 * lib/abitset.c: Include <stddef.h>, for offsetof.
16555 * lib/lbitset.c: Likewise.
16556
16557 * lib/abitset.c (abitset_bytes): Return a size that is aligned
16558 properly for vectors of objects. Do not assume that adding a
16559 header size to a multiple of a word size yields a value that is
16560 properly aligned for the whole union.
16561 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16562
16563 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
16564 unique names for structures.
16565 * lib/ebitset.c (ebitset_bytes): Likewise.
16566 * lib/lbitset.c (lbitset_bytes): Likewise.
16567
16568 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
16569 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
16570 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
16571 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
16572 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
16573 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
16574 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
16575 to improve the type-checking that GCC can do.
16576 * lib/bitset.c (bitset_op4_cmp): Likewise.
16577 * lib/bitset_stats.c (bitset_stats_count,
16578 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
16579 bitset_stats_copy, bitset_stats_disjoint_p,
16580 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
16581 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
16582 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
16583 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
16584 bitset_stats_and_or_cmp, bitset_stats_andn_or,
16585 bitset_stats_andn_or_cmp, bitset_stats_or_and,
16586 bitset_stats_or_and_cmp): Likewise.
16587 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
16588 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
16589 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
16590 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
16591
16592 * lib/abitset.h: Include bitset.h, not bbitset.h.
16593 * lib/ebitset.h: Likewise.
16594 * lib/lbitset.h: Likewise.
16595
16596 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
16597 All instances of parameters of type enum bitset_opts are now of
16598 type enum_bitset_opts, to conform to the C Standard, and similarly
16599 for enum_bitset_type.
16600 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16601 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16602
16603 Do not use "struct bitset_struct" to mean different things in
16604 different modules. Not only is this confusing, it violates
16605 the C Standard, which requires that structure types in different
16606 modules must be compatible if one is to be passed to the other.
16607 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
16608 All instances of "struct bitset_struct *" replaced with "bitset".
16609 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
16610 (union bitset_union, struct abitset_struct, struct ebitset_struct,
16611 struct lbitset_struct, struct bitset_stats_struct): New types.
16612 All uses of struct bitset_struct changed to union bitset_union,
16613 etc.
16614 * lib/abitset.c (struct abitset_struct, abitset,
16615 struct bitset_struct): Remove.
16616 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
16617 struct bitset_struct): Remove.
16618 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
16619 bitset_struct): Remove.
16620 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
16621 Likewise.
16622
16623 Do not call a function of type T using a call that assumes the
16624 function is of a different type U. Standard C requires that a
16625 function must be called with a type that is compatible with its
16626 definition.
16627 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16628 New decls.
16629 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16630 New functions.
16631 * lib/ebitset.c (PFV): Remove.
16632 * lib/lbitset.c (PFV): Likewise.
16633 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
16634 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
16635 decls.
16636 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
16637 (ebitset_vtable): Use them.
16638 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
16639 lbitset_xor): New functions.
16640 (lbitset_vtable): Use them.
16641
16642 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
16643 Declare.
16644
16645 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
16646 GCC warning.
16647 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
16648 Use offsetof, for simplicity.
16649
16650 2002-10-06 Paul Eggert <eggert@twinsun.com>
16651
16652 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
16653 the same width as int. This reapplies a hunk of the 2002-08-12 patch
16654 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
16655 which was inadvertently undone by the 2002-09-30 patch.
16656 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
16657 the same width as int.
16658
16659 2002-10-04 Paul Eggert <eggert@twinsun.com>
16660
16661 Version 1.50.
16662
16663 * configure.ac (AC_INIT), NEWS: Increment version number.
16664
16665 * doc/bison.texinfo: Minor spelling, grammar, and white space
16666 fixes.
16667 (Symbols): Mention that any negative value returned from yylex
16668 signifies end-of-input. Warn about negative chars. Mention
16669 the portable Standard C character set.
16670
16671 The GNU coding standard says CFLAGS and YFLAGS are reserved
16672 for the installer to set.
16673 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
16674 * src/Makefile.am (AM_CFLAGS): Likewise.
16675 (AM_YFLAGS): Renamed from YFLAGS.
16676
16677 Fix some MAX and MIN problems.
16678 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
16679 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
16680 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
16681 * src/reader.c (reader): Use it.
16682
16683 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
16684 POSIX 1003.1-2001 has removed fgrep.
16685
16686 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
16687
16688 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
16689 interpreted as signed.
16690 * lib/ebitset.c (ebitset_list): Fix bug.
16691
16692 2002-10-01 Paul Eggert <eggert@twinsun.com>
16693
16694 More fixes for 64-bit hosts and large bitsets.
16695
16696 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
16697 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
16698 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
16699 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
16700 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
16701 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
16702 bitset_count_): Likewise.
16703 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
16704 bitset_first, bitset_last): Likewise.
16705 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
16706 bitset_stats_list_reverse, bitset_stats_size,
16707 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
16708 Likewise.
16709 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16710 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16711 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16712 bitsetv_reflexive_transitive_closure): Likewise.
16713 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
16714 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
16715 Likewise.
16716 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
16717 Likewise.
16718
16719 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
16720 Use size_t, not unsigned int, to count bytes.
16721 * lib/abitset.h (abitset_bytes): Likewise.
16722 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
16723 Likewise.
16724 * lib/bitset.h (bitset_bytes): Likewise.
16725 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
16726 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
16727 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16728 * lib/ebitset.c (ebitset_bytes): Likewise.
16729 * lib/ebitset.h (ebitset_bytes): Likewise.
16730 * lib/lbitset.c (lbitset_bytes): Likewise.
16731 * lib/lbitset.h (lbitset_bytes): Likewise.
16732
16733 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
16734 abitset_subset_p, abitset_disjoint_p, abitset_and,
16735 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
16736 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
16737 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
16738 abitset_or_and, abitset_or_and_cmp):
16739 Use bitset_windex instead of unsigned int.
16740 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16741 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
16742 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
16743 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
16744 Likewise.
16745 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
16746
16747 * lib/bitset.c (bitset_print):
16748 Use proper printf formats for widths of integer types.
16749 * lib/bitset_stats.c (bitset_percent_histogram_print,
16750 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
16751 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16752 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16753 * lib/lbitset.c (lbitset_bytes): Likewise.
16754
16755 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
16756 BITSET_SIZE_MAX): New macros.
16757 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
16758 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
16759 to BITSET_WINDEX_MAX.
16760
16761 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
16762 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
16763 since we now return the bitset_bindex type (not int).
16764
16765 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
16766 when computing sizes.
16767 * lib/ebitset.c (ebitset_elts_grow): Likewise.
16768
16769 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
16770 and avoid cast to unsigned.
16771
16772 2002-09-30 Akim Demaille <akim@epita.fr>
16773
16774 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
16775 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
16776 Updates from Michael Hayes.
16777
16778 2002-09-30 Art Haas <ahaas@neosoft.com>
16779
16780 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
16781 invocations.
16782 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
16783 defined.
16784
16785 2002-09-27 Akim Demaille <akim@epita.fr>
16786
16787 Version 1.49c.
16788
16789 2002-09-27 Akim Demaille <akim@epita.fr>
16790
16791 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
16792 (Because of AC_LIBSOURCE).
16793
16794 2002-09-27 Akim Demaille <akim@epita.fr>
16795
16796 Playing with Autoscan.
16797
16798 * configure.ac: Remove the old LIBOBJ tweaks.
16799 (AC_REPLACE_FUNCS): Add strrchr and strtol.
16800 * lib/strrchr.c: New.
16801 * lib/strtol.c: New, from the Coreutils 4.5.1.
16802
16803 2002-09-27 Akim Demaille <akim@epita.fr>
16804
16805 Playing with Autoscan.
16806
16807 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
16808 * lib/Makefile.am (libbison_a_SOURCES): No longer include
16809 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
16810 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
16811 Coreutils 4.5.1.
16812
16813 2002-09-24 Akim Demaille <akim@epita.fr>
16814
16815 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
16816 (Frequently Asked Questions, Parser Stack Overflow): New.
16817
16818 2002-09-13 Akim Demaille <akim@epita.fr>
16819
16820 Playing with autoscan.
16821
16822 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
16823 * src/files.c (skeleton_find): Remove, unused.
16824 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
16825 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
16826
16827 2002-09-13 Akim Demaille <akim@epita.fr>
16828
16829 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
16830 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
16831
16832 2002-09-13 Akim Demaille <akim@epita.fr>
16833
16834 * configure.ac: Require 2.54.
16835 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
16836 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
16837 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
16838 Remove, provided by Autoconf macros.
16839
16840 2002-09-12 Akim Demaille <akim@epita.fr>
16841
16842 * m4/prereq.m4: Update, from Coreutils 4.5.1.
16843
16844 2002-09-12 Akim Demaille <akim@epita.fr>
16845
16846 * m4/prereq.m4: Update, from Fileutils 4.1.5.
16847 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
16848 Reported by Martin Mokrejs.
16849
16850 2002-09-10 Akim Demaille <akim@epita.fr>
16851
16852 * src/parse-gram.y: Associate a human readable string to each
16853 token type.
16854 * tests/regression.at (Invalid inputs): Adjust.
16855
16856 2002-09-10 Gary V. Vaughan <gary@gnu.org>
16857
16858 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16859 with an Autoconf-2.5x style configure.ac.
16860
16861 2002-09-06 Paul Eggert <eggert@twinsun.com>
16862
16863 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16864 exception applies only to yacc.c. This is a modification of a
16865 patch originally suggested by Akim Demaille.
16866
16867 2002-09-06 Akim Demaille <akim@epita.fr>
16868
16869 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16870 here to...
16871 * data/yacc.c: here.
16872
16873 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16874 LocationType.
16875 (b4_ltype): Default to yy::Location from location.hh.
16876
16877 2002-09-04 Jim Meyering <jim@meyering.net>
16878
16879 * data/yacc.c: Guard the declaration of yytoknum also with
16880 `#ifdef YYPRINT', so it is declared only when used.
16881
16882 2002-09-04 Akim Demaille <akim@epita.fr>
16883
16884 * configure.in: Rename as...
16885 * configure.ac: this.
16886 Bump to 1.49c.
16887
16888 2002-09-04 Akim Demaille <akim@epita.fr>
16889
16890 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16891 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16892 translate maintainer only messages.
16893
16894 2002-08-12 Paul Eggert <eggert@twinsun.com>
16895
16896 Version 1.49b.
16897
16898 * Makefile.am (SUBDIRS): Remove intl.
16899 (DISTCLEANFILES): Remove.
16900 * NEWS: Mention that GNU M4 is now required. Clarify what is
16901 meant by "larger grammars". Mention the pt_BR translation.
16902 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16903 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16904 Bump version from 0.11.2 to 0.11.5.
16905 (BISON_PREREQ_STAGE): Remove.
16906 (AM_GNU_GETTEXT): Use external gettext.
16907 (AC_OUTPUT): Remove intl/Makefile.
16908
16909 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16910
16911 * data/glr.c: Include string.h, for strlen.
16912 (yyreportParseError): Use size_t for yysize.
16913 (yy_yypstack): No longer nested inside yypstates, as nested
16914 functions are not portable. Do not assume size_t is the
16915 same width as int.
16916 (yypstates): Do not assume that ptrdiff_t is the same width
16917 as int, and similarly for yyposn and YYINDEX.
16918
16919 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16920
16921 * lib/Makefile.am (INCLUDES): Do not include from the intl
16922 directory, which has been removed.
16923 * src/Makefile.am (INCLUDES): Likewise.
16924
16925 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16926 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16927 New vars.
16928
16929 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16930 * tests/Makefile.am (EXTRA_DIST): Likewise.
16931
16932 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16933 Do not assume that bitset_windex is the same width as unsigned.
16934
16935 * lib/abitset.c (abitset_unused_clear): Do not assume that
16936 bitset_word is the same width as int.
16937 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16938 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16939 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16940 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16941 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16942
16943 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16944 portability to one's complement hosts!).
16945 * lib/ebitset.c (ebitset_op1): Likewise.
16946 * lib/lbitset.c (lbitset_op1): Likewise.
16947
16948 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16949 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16950 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16951 Sync with fileutils.
16952 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16953 lib/gettext.h: Sync with diffutils.
16954
16955 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16956 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16957
16958 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16959 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16960 check for void *.
16961
16962 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16963 size_t; the old version tried to do this but casted improperly.
16964 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16965 (bitset_test): Now returns int, not unsigned long.
16966
16967 * lib/bitset_stats.c: Include "gettext.h".
16968 (_): New macro.
16969 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16970 name locals "index", as it generates unnecessary warnings on some
16971 hosts that have an "index" function.
16972
16973 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16974 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16975 they need translation.
16976 * src/LR0.c (state_list_append, new_itemsets, get_state,
16977 append_states, generate_states): Likewise.
16978 * src/assoc.c (assoc_to_string): Likewise.
16979 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16980 * src/gram.c (grammar_dump): Likewise.
16981 * src/injections.c (injections_compute): Likewise.
16982 * src/lalr.c (lookaheads_print): Likewise.
16983 * src/relation.c (relation_transpose): Likewise.
16984 * src/scan-gram.l: Likewise.
16985 * src/tables.c (table_grow, pack_vector): Likewise.
16986
16987 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16988 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16989 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16990 * m4/mbstate_t.m4: Sync with fileutils.
16991 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16992
16993 * po/LINGUAS: Add pt_BR.
16994 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16995 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16996 lib/timevar.c.
16997 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16998 manual recommends.
16999 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17000
17001 * src/complain.c (strerror_r): Remove decl; not needed.
17002 (strerror): Use same pattern as ../lib/error.c.
17003
17004 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17005
17006 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17007
17008 * src/main.c (main): Cast result of bindtextdomain and textdomain
17009 to void, to avoid a GCC warning when --disable-nls is in effect.
17010
17011 * src/scan-gram.l: Use strings rather than escapes when possible,
17012 to minimize the number of warnings from xgettext.
17013 (handle_action_dollar, handle_action_at): Don't use isdigit,
17014 as it mishandles negative chars and it may not work as expected
17015 outside the C locale.
17016
17017 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17018 this is a GCC extension and is not portable to other compilers.
17019
17020 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17021 Do not include <ctype.h>; no longer needed.
17022 Do not include <malloc.h>; no longer needed (and generates
17023 warnings on OpenBSD 3.0).
17024
17025 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17026 it's not portable.
17027
17028 * tests/regression.at: Do not use 'cc -c input.c -o input';
17029 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17030
17031 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17032 exit status as failure, not just exit status 1. Sun C exits
17033 with status 2 sometimes.
17034
17035 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17036 Use it for the two large tests.
17037
17038 2002-08-02 Akim Demaille <akim@epita.fr>
17039
17040 * src/conflicts.c (conflicts_output): Don't output rules never
17041 reduced here, since anyway that computation doesn't work.
17042 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17043 (rule_useless_p, rule_never_reduced_p): New.
17044 (grammar_rules_partial_print): Use a filter instead of a range.
17045 Display the title only if needed.
17046 (grammar_rules_print): Adjust.
17047 (grammar_rules_never_reduced_report): New.
17048 * src/tables.c (action_row): Move the computation of rules never
17049 reduced to...
17050 (token_actions): here.
17051 * src/main.c (main): Make the parser before making the report, so
17052 that rules never reduced are computed.
17053 Call grammar_rules_never_reduced_report.
17054 * src/print.c (print_results): Report rules never reduced.
17055 * tests/conflicts.at, tests/reduce.at: Adjust.
17056
17057 2002-08-01 Akim Demaille <akim@epita.fr>
17058
17059 Instead of attaching lookaheads and duplicating the rules being
17060 reduced by a state, attach the lookaheads to the reductions.
17061
17062 * src/state.h (state_t): Remove the `lookaheads',
17063 `lookaheads_rule' member.
17064 (reductions_t): Add a `lookaheads' member.
17065 Use a regular array for the `rules'.
17066 * src/state.c (reductions_new): Initialize the lookaheads member
17067 to 0.
17068 (state_rule_lookaheads_print): Adjust.
17069 * src/state.h, src/state.c (state_reductions_find): New.
17070 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17071 (count_rr_conflicts): Adjust.
17072 * src/lalr.c (LArule): Remove.
17073 (add_lookback_edge): Adjust.
17074 (state_lookaheads_count): New.
17075 (states_lookaheads_initialize): Merge into...
17076 (initialize_LA): this.
17077 (lalr_free): Adjust.
17078 * src/main.c (main): Don't free nullable and derives too early: it
17079 is used by --verbose.
17080 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17081
17082 2002-08-01 Akim Demaille <akim@epita.fr>
17083
17084 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17085 `rule_number_t**'.
17086 (set_derives, free_derives): Rename as...
17087 (derives_compute, derives_free): this.
17088 Adjust all dependencies.
17089 * src/nullable.c (set_nullable, free_nullable): Rename as...
17090 (nullable_compute, nullable_free): these.
17091 (rule_list_t): Store rule_t *, not rule_number_t.
17092 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17093 pointers, instead of their numbers.
17094 * src/main.c (main): Call nullable_free, and derives_free earlier,
17095 as they were lo longer used.
17096
17097 2002-08-01 Akim Demaille <akim@epita.fr>
17098
17099 * lib/timevar.c (get_time): Include children time.
17100 * src/lalr.h (LA, LArule): Don't export them: used with the
17101 state_t.
17102 * src/lalr.c (LA, LArule): Static.
17103 * src/lalr.h, src/lalr.c (lalr_free): New.
17104 * src/main.c (main): Call it.
17105 * src/tables.c (pack_vector): Check whether loc is >= to the
17106 table_size, not >.
17107 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17108 (tables_generate): do it, since that's also it which allocates
17109 them.
17110 Don't free LA and LArule, main does.
17111
17112 2002-07-31 Akim Demaille <akim@epita.fr>
17113
17114 Separate parser tables computation and output.
17115
17116 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17117 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17118 (yydefgoto, yydefact, high): Move to...
17119 * src/tables.h, src/tables.c: here.
17120 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17121 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17122 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17123 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17124 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17125 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17126 (action_row, save_row, token_actions, save_column, default_goto)
17127 (goto_actions, sort_actions, matching_state, pack_vector)
17128 (table_ninf_remap, pack_table, prepare_actions): Move to...
17129 * src/tables.c: here.
17130 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17131 * src/output.c (token_actions, output_base, output_conflicts)
17132 (output_check): Merge into...
17133 (prepare_actions): this.
17134 (actions_output): Rename as...
17135 (user_actions_output): this.
17136 * src/main.c (main): Call tables_generate and tables_free.
17137
17138 2002-07-31 Akim Demaille <akim@epita.fr>
17139
17140 Steal GCC's --time-report support.
17141
17142 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17143 stolen/adjusted from GCC.
17144 * m4/stage.m4: Remove time related checks.
17145 * m4/timevar.m4: New.
17146 * configure.in: Adjust.
17147 * src/system.h: Adjust to using timevar.h.
17148 * src/getargs.h, src/getargs.c: Support trace_time for
17149 --trace=time.
17150 * src/main.c (stage): Remove.
17151 (main): Replace `stage' invocations with timevar calls.
17152 * src/output.c: Insert pertinent timevar calls.
17153
17154 2002-07-31 Akim Demaille <akim@epita.fr>
17155
17156 Let --trace have arguments.
17157
17158 * src/getargs.h (enum trace_e): New.
17159 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17160 (long_options, short_options): --trace/-T takes an optional
17161 argument.
17162 Change all the uses of trace_flag to reflect the new flags.
17163 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17164
17165 Strengthen `stage' portability.
17166
17167 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17168 * configure.in: Use it.
17169 Don't check for malloc.h and sys/times.h.
17170 * src/system.h: Include them when appropriate.
17171 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17172 times and struct tms are available.
17173
17174 2002-07-30 Akim Demaille <akim@epita.fr>
17175
17176 In verbose parse error message, don't report `error' as an
17177 expected token.
17178 * tests/actions.at (Printers and Destructors): Adjust.
17179 * tests/calc.at (Calculator $1): Adjust.
17180 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17181 error message, do not report the parser accepts the error token in
17182 that state.
17183
17184 2002-07-30 Akim Demaille <akim@epita.fr>
17185
17186 Normalize conflict related messages.
17187
17188 * src/complain.h, src/complain.c (warn, complain): New.
17189 * src/conflicts.c (conflicts_print): Use them.
17190 (conflict_report_yacc): New, extracted from...
17191 (conflicts_print): here.
17192 * tests/conflicts.at, tests/existing.at: Adjust.
17193
17194 2002-07-30 Akim Demaille <akim@epita.fr>
17195
17196 Report rules which are never reduced by the parser: those hidden
17197 by conflicts.
17198
17199 * src/LR0.c (save_reductions): Don't make the final state too
17200 different: save its reduction (accept) instead of having a state
17201 without any action (no shift or goto, no reduce).
17202 Note: the final state is now a ``regular'' state, i.e., the
17203 parsers now contain `reduce 0' as default reduction.
17204 Nevertheless, since they decide to `accept' when yystate =
17205 final_state, they still will not reduce rule 0.
17206 * src/print.c (print_actions, print_reduction): Adjust.
17207 * src/output.c (action_row): Track reduced rules.
17208 (token_actions): Report rules never reduced.
17209 * tests/conflicts.at, tests/regression.at: Adjust.
17210
17211 2002-07-30 Akim Demaille <akim@epita.fr>
17212
17213 `stage' was accidently included in a previous patch.
17214 Initiate its autoconfiscation.
17215
17216 * configure.in: Look for malloc.h and sys/times.h.
17217 * src/main.c (stage): Adjust.
17218 Report only when trace_flag.
17219
17220 2002-07-29 Akim Demaille <akim@epita.fr>
17221
17222 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17223 state_number_t.
17224 (errs_t): symbol_t*, not symbol_number_t.
17225 (reductions_t): rule_t*, not rule_number_t.
17226 (FOR_EACH_SHIFT): New.
17227 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17228 * src/print.c, src/print_graph.c: Adjust.
17229
17230 2002-07-29 Akim Demaille <akim@epita.fr>
17231
17232 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17233
17234 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17235 (endtoken, accept): these.
17236 * src/reader.c (reader): Set endtoken's default tag to "$end".
17237 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17238 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17239 Adjust.
17240
17241 2002-07-29 Akim Demaille <akim@epita.fr>
17242
17243 * src/reduce.c (reduce_grammar): When the language is empty,
17244 complain about the start symbol, not the axiom.
17245 Use its location.
17246 * tests/reduce.at (Empty Language): New.
17247
17248 2002-07-26 Akim Demaille <akim@epita.fr>
17249
17250 * src/reader.h, src/reader.c (gram_error): ... can't get
17251 yycontrol without making too strong assumptions on the parser
17252 itself.
17253 * src/output.c (prepare_tokens): Use the real 0th value of
17254 token_translations instead of `0'.
17255 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17256 visible here.
17257 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17258 for the time being: %locations ought to provide it to yyerror.
17259
17260 2002-07-25 Akim Demaille <akim@epita.fr>
17261
17262 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17263 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17264 * tests/regression.at (Web2c Actions): Adjust.
17265
17266 2002-07-25 Akim Demaille <akim@epita.fr>
17267
17268 Stop storing rules from 1 to nrules + 1.
17269
17270 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17271 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17272 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17273 Iterate from 0 to nrules.
17274 Use rule_number_as_item_number and item_number_as_rule_number.
17275 Adjust to `derive' now containing possibly 0.
17276 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17277 Handle the `- 1' part in rule numbers from/to item numbers.
17278 * src/conflicts.c (log_resolution): Fix the message which reversed
17279 shift and reduce.
17280 * src/output.c (action_row): Initialize default_rule to -1.
17281 (token_actions): Adjust.
17282 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17283 expected output.
17284 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17285
17286 2002-07-25 Akim Demaille <akim@epita.fr>
17287
17288 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17289 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17290 (b4_c_knr_arg_decl): New.
17291 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17292 yyreport_parse_error.
17293
17294 2002-07-25 Akim Demaille <akim@epita.fr>
17295
17296 * data/yacc.c (yyreport_parse_error): New, extracted from...
17297 (yyparse): here.
17298 (yydestruct, yysymprint): Move above yyparse.
17299 Be K&R compliant.
17300
17301 2002-07-25 Akim Demaille <akim@epita.fr>
17302
17303 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17304 replace...
17305 (b4_sint_type, b4_uint_type): these.
17306 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17307 * tests/regression.at (Web2c Actions): Adjust.
17308
17309 2002-07-25 Akim Demaille <akim@epita.fr>
17310
17311 * src/gram.h (TIEM_NUMBER_MAX): New.
17312 (item_number_of_rule_number, rule_number_of_item_number): Rename
17313 as...
17314 (rule_number_as_item_number, item_number_as_rule_number): these.
17315 Adjust dependencies.
17316 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17317 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17318 (symbol_number_to_vector_number): New.
17319 (order): Of vector_number_t* type.
17320 (base_t, BASE_MAX, BASE_MIN): New.
17321 (froms, tos, width, pos, check): Of base_t type.
17322 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17323 (actrow): Of action_number_t type.
17324 (conflrow): Of unsigned int type.
17325 (table_ninf, base_ninf): New.
17326 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17327 (muscle_insert_int_table, muscle_insert_base_table)
17328 (muscle_insert_rule_number_table): New.
17329 (prepare_tokens): Output `toknum' as int_table.
17330 (action_row): Returns a rule_number_t.
17331 Use ACTION_MIN, not SHRT_MIN.
17332 (token_actions): yydefact is rule_number_t*.
17333 (table_ninf_remap): New.
17334 (pack_table): Use it for `base' and `table'.
17335 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17336 replaced with...
17337 (YYPACT_NINF, YYTABLE_NINF): these.
17338 (yypact, yytable): Compute their types instead of hard-coded
17339 `short'.
17340 * tests/regression.at (Web2c Actions): Adjust.
17341
17342 2002-07-19 Akim Demaille <akim@epita.fr>
17343
17344 * src/scan-gram.l (id): Can start with an underscore.
17345
17346 2002-07-16 Akim Demaille <akim@epita.fr>
17347
17348 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17349 Adjust all former `associativity' dependencies.
17350 * src/symtab.c (symbol_new): Default associativity is `undef', not
17351 `right'.
17352 (symbol_check_alias_consistence): Adjust.
17353
17354 2002-07-09 Akim Demaille <akim@epita.fr>
17355
17356 * doc/bison.texinfo: Properly set the ``header'' part.
17357 Use @dircategory ``GNU programming tools'' as per Texinfo's
17358 documentation.
17359 Use @copying.
17360
17361 2002-07-09 Akim Demaille <akim@epita.fr>
17362
17363 * lib/quotearg.h: Protect against multiple inclusions.
17364 * src/location.h (location_t): Add a `file' member.
17365 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17366 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17367 `error_one_per_line' support.
17368
17369 2002-07-09 Akim Demaille <akim@epita.fr>
17370
17371 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17372 * src/reader.c (lineno): Remove.
17373 Adjust all dependencies.
17374 (get_merge_function): Take a location and use complain_at.
17375 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17376 * tests/regression.at (Invalid inputs, Mixing %token styles):
17377 Adjust.
17378
17379 2002-07-09 Akim Demaille <akim@epita.fr>
17380
17381 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
17382 recovery rule, and forbid extensions when --yacc.
17383 (gram_error): Use complain_at.
17384 * src/reader.c (reader): Exit if there were parse errors.
17385
17386 2002-07-09 Akim Demaille <akim@epita.fr>
17387
17388 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
17389 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
17390 Reported by R Blake <blakers@mac.com>.
17391
17392 2002-07-09 Akim Demaille <akim@epita.fr>
17393
17394 * data/yacc.c: Output the copyright notive in the header.
17395
17396 2002-07-03 Akim Demaille <akim@epita.fr>
17397
17398 * src/output.c (froms, tos): Are state_number_t.
17399 (save_column): sp, sp1, and sp2 are state_number_t.
17400 (prepare): Rename `final' as `final_state_number', `nnts' as
17401 `nterms_number', `nrules' as `rules_number', `nstates' as
17402 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
17403 unused.
17404 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
17405 * data/lalr1.cc (nsym_): Remove, unused.
17406
17407 2002-07-03 Akim Demaille <akim@epita.fr>
17408
17409 * src/lalr.h, src/lalr.c (goto_number_t): New.
17410 * src/lalr.c (goto_list_t): New.
17411 Propagate them.
17412 * src/nullable.c (rule_list_t): New.
17413 Propagate.
17414 * src/types.h: Remove.
17415
17416 2002-07-03 Akim Demaille <akim@epita.fr>
17417
17418 * src/closure.c (print_fderives): Use rule_rhs_print.
17419 * src/derives.c (print_derives): Use rule_rhs_print.
17420 (rule_list_t): New, replaces `shorts'.
17421 (set_derives): Add comments.
17422 * tests/sets.at (Nullable, Firsts): Adjust.
17423
17424 2002-07-03 Akim Demaille <akim@epita.fr>
17425
17426 * src/output.c (prepare_actions): Free `tally' and `width'.
17427 (prepare_actions): Allocate and free `order'.
17428 * src/symtab.c (symbols_free): Free `symbols'.
17429 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
17430 * src/output.c (m4_invoke): Move to...
17431 * src/scan-skel.l: here.
17432 (<<EOF>>): Close yyout, and free its name.
17433
17434 2002-07-03 Akim Demaille <akim@epita.fr>
17435
17436 Fix some memory leaks, and fix a bug: state 0 was examined twice.
17437
17438 * src/LR0.c (new_state): Merge into...
17439 (state_list_append): this.
17440 (new_states): Merge into...
17441 (generate_states): here.
17442 (set_states): Don't ensure a proper `errs' state member here, do it...
17443 * src/conflicts.c (conflicts_solve): here.
17444 * src/state.h, src/state.c: Comment changes.
17445 (state_t): Rename member `shifts' as `transitions'.
17446 Adjust all dependencies.
17447 (errs_new): For consistency, also take the values as argument.
17448 (errs_dup): Remove.
17449 (state_errs_set): New.
17450 (state_reductions_set, state_transitions_set): Assert that no
17451 previous value was assigned.
17452 (state_free): New.
17453 (states_free): Use it.
17454 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
17455 temporary storage: use `errs' and `nerrs' as elsewhere.
17456 (set_conflicts): Allocate and free this `errs'.
17457
17458 2002-07-02 Akim Demaille <akim@epita.fr>
17459
17460 * lib/libiberty.h: New.
17461 * lib: Update the bitset implementation from upstream.
17462 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
17463 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
17464 * src/main.c: Adjust bitset stats calls.
17465
17466 2002-07-01 Paul Eggert <eggert@twinsun.com>
17467
17468 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
17469 char, so that negative chars don't collide with $.
17470
17471 2002-06-30 Akim Demaille <akim@epita.fr>
17472
17473 Have the GLR tests be `warning' checked, and fix the warnings.
17474
17475 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
17476 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
17477 (yyremoveDeletes): `yyi' and `yyj' are size_t.
17478 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
17479 (yyaddDeferredAction): static.
17480 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
17481 (yyreportParseError): yyprefix is const.
17482 yytokenp is used only when verbose.
17483 (yy__GNUC__): Replace with __GNUC__.
17484 (yypdumpstack): yyi is size_t.
17485 (yypreference): Un-yy local variables and arguments, to avoid
17486 clashes with `yyr1'. Anyway, we are not in the user name space.
17487 (yytname_size): be an int, as is compared with ints.
17488 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
17489 Use them.
17490 * tests/cxx-gram.at: Use quotation to protect $1.
17491 Use AT_COMPILE to enable warnings hunts.
17492 Prototype yylex and yyerror.
17493 `Use' argc.
17494 Include `string.h', not `strings.h'.
17495 Produce and prototype stmtMerge only when used.
17496 yylex takes a location.
17497
17498 2002-06-30 Akim Demaille <akim@epita.fr>
17499
17500 We spend a lot of time in quotearg, in particular when --verbose.
17501
17502 * src/symtab.c (symbol_get): Store a quoted version of the key.
17503 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
17504 Adjust all callers.
17505
17506 2002-06-30 Akim Demaille <akim@epita.fr>
17507
17508 * src/state.h (reductions_t): Rename member `nreds' as num.
17509 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
17510 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
17511
17512 2002-06-30 Akim Demaille <akim@epita.fr>
17513
17514 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
17515 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
17516 (shifts_to): Rename as...
17517 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
17518 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
17519 (TRANSITION_IS_DISABLED, transitions_to): these.
17520
17521 2002-06-30 Akim Demaille <akim@epita.fr>
17522
17523 * src/print.c (print_shifts, print_gotos): Merge into...
17524 (print_transitions): this.
17525 (print_transitions, print_errs, print_reductions): Align the
17526 lookaheads columns.
17527 (print_core, print_transitions, print_errs, print_state,
17528 print_grammar): Output empty lines separator before, not after.
17529 (state_default_rule_compute): Rename as...
17530 (state_default_rule): this.
17531 * tests/conflicts.at (Defaulted Conflicted Reduction),
17532 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
17533 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
17534
17535 2002-06-30 Akim Demaille <akim@epita.fr>
17536
17537 Display items as we display rules.
17538
17539 * src/gram.h, src/gram.c (rule_lhs_print): New.
17540 * src/gram.c (grammar_rules_partial_print): Use it.
17541 * src/print.c (print_core): Likewise.
17542 * tests/conflicts.at (Defaulted Conflicted Reduction),
17543 (Unresolved SR Conflicts): Adjust.
17544 (Unresolved SR Conflicts): Adjust and rename as...
17545 (Resolved SR Conflicts): this, as was meant.
17546 * tests/regression.at (Web2c Report): Adjust.
17547
17548 2002-06-30 Akim Demaille <akim@epita.fr>
17549
17550 * src/print.c (state_default_rule_compute): New, extracted from...
17551 (print_reductions): here.
17552 Pessimize, but clarify the code.
17553 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
17554
17555 2002-06-30 Akim Demaille <akim@epita.fr>
17556
17557 * src/output.c (action_row): Let default_rule be always a rule
17558 number.
17559
17560 2002-06-30 Akim Demaille <akim@epita.fr>
17561
17562 * src/closure.c (print_firsts, print_fderives, closure):
17563 Use BITSET_EXECUTE.
17564 * src/lalr.c (lookaheads_print): Likewise.
17565 * src/state.c (state_rule_lookaheads_print): Likewise.
17566 * src/print_graph.c (print_core): Likewise.
17567 * src/print.c (print_reductions): Likewise.
17568 * src/output.c (action_row): Likewise.
17569 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
17570
17571 2002-06-30 Akim Demaille <akim@epita.fr>
17572
17573 * src/print_graph.c: Use report_flag.
17574
17575 2002-06-30 Akim Demaille <akim@epita.fr>
17576
17577 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
17578 to...
17579 * src/relation.h, src/relation.c (traverse, relation_digraph)
17580 (relation_print, relation_transpose): New.
17581
17582 2002-06-30 Akim Demaille <akim@epita.fr>
17583
17584 * src/state.h, src/state.c (shifts_to): New.
17585 * src/lalr.c (build_relations): Use it.
17586
17587 2002-06-30 Akim Demaille <akim@epita.fr>
17588
17589 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
17590 (item_number_of_rule_number, rule_number_of_item_number): New.
17591 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
17592 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17593 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
17594 Propagate their use.
17595 Much remains to be done, in particular wrt `shorts' from types.h.
17596
17597 2002-06-30 Akim Demaille <akim@epita.fr>
17598
17599 * src/symtab.c (symbol_new): Initialize the `printer' member.
17600
17601 2002-06-30 Akim Demaille <akim@epita.fr>
17602
17603 * src/LR0.c (save_reductions): Remove, replaced by...
17604 * src/state.h, src/state.c (state_reductions_set): New.
17605 (reductions, errs): Rename as...
17606 (reductions_t, errs_t): these.
17607 Adjust all dependencies.
17608
17609 2002-06-30 Akim Demaille <akim@epita.fr>
17610
17611 * src/LR0.c (state_list_t, state_list_append): New.
17612 (first_state, last_state): Now symbol_list_t.
17613 (this_state): Remove.
17614 (new_itemsets, append_states, save_reductions): Take a state_t as
17615 argument.
17616 (set_states, generate_states): Adjust.
17617 (save_shifts): Remove, replaced by...
17618 * src/state.h, src/state.c (state_shifts_set): New.
17619 (shifts): Rename as...
17620 (shifts_t): this.
17621 Adjust all dependencies.
17622 * src/state.h (state_t): Remove the `next' member.
17623
17624 2002-06-30 Akim Demaille <akim@epita.fr>
17625
17626 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
17627 escaped in slot 0.
17628
17629 2002-06-30 Akim Demaille <akim@epita.fr>
17630
17631 Use hash.h for the state hash table.
17632
17633 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
17634 (allocate_storage): Use state_hash_new.
17635 (free_storage): Use state_hash_free.
17636 (new_state, get_state): Adjust.
17637 * src/lalr.h, src/lalr.c (states): Move to...
17638 * src/states.h (state_t): Remove the `link' member, no longer
17639 used.
17640 * src/states.h, src/states.c: here.
17641 (state_hash_new, state_hash_free, state_hash_lookup)
17642 (state_hash_insert, states_free): New.
17643 * src/states.c (state_table, state_compare, state_hash): New.
17644 * src/output.c (output_actions): Do not free states now, since we
17645 still need to know the final_state number in `prepare', called
17646 afterwards. Do it...
17647 * src/main.c (main): here: call states_free after `output'.
17648
17649 2002-06-30 Akim Demaille <akim@epita.fr>
17650
17651 * src/state.h, src/state.c (state_new): New, extracted from...
17652 * src/LR0.c (new_state): here.
17653 * src/state.h (STATE_ALLOC): Move to...
17654 * src/state.c: here.
17655 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
17656 * src/state.h, src/state.c: here.
17657
17658 2002-06-30 Akim Demaille <akim@epita.fr>
17659
17660 * src/reader.c (gensym): Rename as...
17661 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
17662 (getsym): Rename as...
17663 (symbol_get): this.
17664
17665 2002-06-30 Akim Demaille <akim@epita.fr>
17666
17667 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
17668 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
17669 * src/output.c, src/print.c, src/print_graph.c: Propagate.
17670 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
17671
17672 2002-06-30 Akim Demaille <akim@epita.fr>
17673
17674 Make the test suite pass with warnings checked.
17675
17676 * tests/actions.at (Printers and Destructors): Improve.
17677 Avoid unsigned vs. signed issues.
17678 * tests/calc.at: Don't exercise the scanner here, do it...
17679 * tests/input.at (Torturing the Scanner): here.
17680
17681 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17682
17683 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
17684 reorganize first lines parallel to yacc.c.
17685
17686 2002-06-28 Akim Demaille <akim@epita.fr>
17687
17688 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
17689 (b4_token_enum, b4_token_defines): New, factored from...
17690 * data/lalr1.cc, data/yacc.c, glr.c: here.
17691
17692 2002-06-28 Akim Demaille <akim@epita.fr>
17693
17694 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
17695 unused variables.
17696 * src/output.c (merger_output): static.
17697
17698 2002-06-28 Akim Demaille <akim@epita.fr>
17699
17700 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
17701 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
17702 pacify GCC.
17703 * src/output.c (save_row): Initialize all the variables to pacify GCC.
17704
17705 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17706
17707 Accumulated changelog for new GLR parsing features.
17708
17709 * src/conflicts.c (count_total_conflicts): Change name to
17710 conflicts_total_count.
17711 * src/conflicts.h: Ditto.
17712 * src/output.c (token_actions): Use the new name.
17713 (output_conflicts): Change conflp => conflict_list_heads, and
17714 confl => conflict_list for better readability.
17715 * data/glr.c: Use the new names.
17716 * NEWS: Add self to GLR announcement.
17717
17718 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
17719
17720 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
17721 Akim Demaille.
17722
17723 * data/bison.glr: Change name to glr.c
17724 * data/glr.c: Renamed from bison.glr.
17725 * data/Makefile.am: Add glr.c
17726
17727 * src/getargs.c:
17728
17729 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
17730 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
17731
17732 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17733
17734 * data/bison.glr: Be sure to restore the
17735 current #line when returning to the skeleton contents after having
17736 exposed the input file's #line.
17737
17738 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17739
17740 * data/bison.glr: Bring up to date with changes to bison.simple.
17741
17742 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17743
17744 * data/bison.glr: Correct definitions that use b4_prefix.
17745 Various reformatting.
17746 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
17747 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
17748 yytokenp argument; now part of stack.
17749 (yychar): Define to behave as documented.
17750 (yyclearin): Ditto.
17751
17752 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17753
17754 * src/reader.h: Add declaration for free_merger_functions.
17755
17756 * src/reader.c (merge_functions): New variable.
17757 (get_merge_function): New function.
17758 (free_merger_functions): New function.
17759 (readgram): Check for %prec that is not followed by a symbol.
17760 Handle %dprec and %merge declarations.
17761 (packgram): Initialize dprec and merger fields in rules array.
17762
17763 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
17764 conflict_list_cnt, conflict_list_free): New variables.
17765 (table_grow): Also grow conflict_table.
17766 (prepare_rules): Output dprec and merger tables.
17767 (conflict_row): New function.
17768 (action_row): Output conflict lists for GLR parser. Don't use
17769 default reduction in conflicted states for GLR parser so that there
17770 are spaces for the conflict lists.
17771 (save_row): Also save conflict information.
17772 (token_actions): Allocate conflict list.
17773 (merger_output): New function.
17774 (pack_vector): Pack conflict table, too.
17775 (output_conflicts): New function to output yyconflp and yyconfl.
17776 (output_check): Allocate conflict_tos.
17777 (output_actions): Output conflict tables, also.
17778 (output_skeleton): Output b4_mergers definition.
17779 (prepare): Output b4_max_rhs_length definition.
17780 Use 'bison.glr' as default skeleton for GLR parsers.
17781
17782 * src/gram.c (glr_parser): New flag.
17783 (grammar_free): Call free_merger_functions.
17784
17785 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
17786 all pairs of conflicting reductions, rather than just all tokens
17787 causing conflicts. Needed to size conflict tables.
17788 (conflicts_output): Modify call to count_rr_conflicts for new
17789 interface.
17790 (conflicts_print): Ditto.
17791 (count_total_conflicts): New function.
17792
17793 * src/reader.h (merger_list): New type.
17794 (merge_functions): New variable.
17795
17796 * src/lex.h (tok_dprec, tok_merge): New token types.
17797
17798 * src/gram.h (rule_s): Add dprec and merger fields.
17799 (glr_parser): New flag.
17800
17801 * src/conflicts.h (count_total_conflicts): New function.
17802
17803 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
17804
17805 * doc/bison.texinfo (Generalized LR Parsing): New section.
17806 (GLR Parsers): New section.
17807 (Language and Grammar): Mention GLR parsing.
17808 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
17809 Correct typo ("tge" -> "the").
17810
17811 * data/bison.glr: New skeleton for GLR parsing.
17812
17813 * tests/cxx-gram.at: New tests for GLR parsing.
17814
17815 * tests/testsuite.at: Include cxx-gram.at.
17816
17817 * tests/Makefile.am: Add cxx-gram.at.
17818
17819 * src/parse-gram.y:
17820
17821 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
17822
17823 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
17824
17825 2002-06-27 Akim Demaille <akim@epita.fr>
17826
17827 * src/options.h, src/options.c: Remove.
17828 * src/getargs.c (short_options, long_options): New.
17829
17830 2002-06-27 Akim Demaille <akim@epita.fr>
17831
17832 * data/bison.simple, data/bison.c++: Rename as...
17833 * data/yacc.c, data/lalr1.cc: these.
17834 * doc/bison.texinfo (Environment Variables): Remove.
17835
17836 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
17837
17838 * src/getargs.c (report_argmatch): Initialize strtok().
17839
17840 2002-06-20 Akim Demaille <akim@epita.fr>
17841
17842 * data/bison.simple (b4_symbol_actions): New, replaces...
17843 (b4_symbol_destructor, b4_symbol_printer): these.
17844 (yysymprint): Be sure to call YYPRINT only for tokens, and using
17845 user token numbers.
17846
17847 2002-06-20 Akim Demaille <akim@epita.fr>
17848
17849 * data/bison.simple (yydestructor): Rename as...
17850 (yydestruct): this.
17851
17852 2002-06-20 Akim Demaille <akim@epita.fr>
17853
17854 * src/symtab.h, src/symtab.c (symbol_type_set)
17855 (symbol_destructor_set, symbol_precedence_set): The location is
17856 the last argument.
17857 Adjust all callers.
17858
17859 2002-06-20 Akim Demaille <akim@epita.fr>
17860
17861 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17862 internals.
17863 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17864 Takes a location.
17865 * src/symtab.h, src/symtab.c (symbol_class_set)
17866 (symbol_user_token_number_set): Likewise.
17867 Adjust all callers.
17868 Promote complain_at.
17869 * tests/input.at (Type Clashes): Adjust.
17870
17871 2002-06-20 Akim Demaille <akim@epita.fr>
17872
17873 * data/bison.simple (YYLEX): Fix the declaration when
17874 %pure-parser.
17875
17876 2002-06-20 Akim Demaille <akim@epita.fr>
17877
17878 * data/bison.simple (yysymprint): Don't print the token number,
17879 just its name.
17880 * tests/actions.at (Destructors): Rename as...
17881 (Printers and Destructors): this.
17882 Also exercise %printer.
17883
17884 2002-06-20 Akim Demaille <akim@epita.fr>
17885
17886 * data/bison.simple (YYDSYMPRINT): New.
17887 Use it to remove many of the #if YYDEBUG/if (yydebug).
17888
17889 2002-06-20 Akim Demaille <akim@epita.fr>
17890
17891 * src/symtab.h, src/symtab.c (symbol_t): printer and
17892 printer_location are new members.
17893 (symbol_printer_set): New.
17894 * src/parse-gram.y (PERCENT_PRINTER): New token.
17895 Handle its associated rule.
17896 * src/scan-gram.l: Adjust.
17897 (handle_destructor_at, handle_destructor_dollar): Rename as...
17898 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17899 * src/output.c (symbol_printers_output): New.
17900 (output_skeleton): Call it.
17901 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17902 since there are already many grammar files with a user `yyprint'.
17903 Replace the calls to YYPRINT to calls to yysymprint.
17904 * tests/calc.at: Adjust.
17905 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17906 taking advantage of parser very internal details (stack size!).
17907
17908 2002-06-20 Akim Demaille <akim@epita.fr>
17909
17910 * src/scan-gram.l: Complete the scanner with the missing patterns
17911 to pacify Flex.
17912 Use `quote' and `symbol_tag_get' where appropriate.
17913
17914 2002-06-19 Akim Demaille <akim@epita.fr>
17915
17916 * tests/actions.at (Destructors): Augment to test locations.
17917 * data/bison.simple (yydestructor): Pass it the current location
17918 if locations are enabled.
17919 Prototype only when __STDC__ or C++.
17920 Change the argument names to move into the yy name space: there is
17921 user code here.
17922
17923 2002-06-19 Akim Demaille <akim@epita.fr>
17924
17925 * data/bison.simple (b4_pure_if): New.
17926 Use it instead of #ifdef YYPURE.
17927
17928 2002-06-19 Akim Demaille <akim@epita.fr>
17929
17930 * data/bison.simple (b4_location_if): New.
17931 Use it instead of #ifdef YYLSP_NEEDED.
17932
17933 2002-06-19 Akim Demaille <akim@epita.fr>
17934
17935 Prepare @$ in %destructor, but currently don't bind it in the
17936 skeleton, as %location use is not cleaned up yet.
17937
17938 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17939 (handle_action_at): New.
17940 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17941 a braced_code_t and a location as additional arguments.
17942 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17943 unquote one when outputting `b4_dollar_dollar'.
17944 Adjust callers.
17945 * data/bison.simple (b4_eval): Remove.
17946 (b4_symbol_destructor): Adjust.
17947 * tests/input.at (Invalid @n): Adjust.
17948
17949 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17950
17951 * doc/bison.texinfo: Document ability to have multiple
17952 prologue sections.
17953
17954 2002-06-18 Akim Demaille <akim@epita.fr>
17955
17956 * src/files.c (compute_base_names): When computing the output file
17957 names from the input file name, strip the directory part.
17958
17959 2002-06-18 Akim Demaille <akim@epita.fr>
17960
17961 * data/bison.simple.new: Comment changes.
17962 Reported by Andreas Schwab.
17963
17964 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17965
17966 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17967 there are no `label `yyoverflowlab' defined but not used' warnings
17968 when yyoverflow is defined.
17969
17970 2002-06-18 Akim Demaille <akim@epita.fr>
17971
17972 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17973 new member.
17974 (symbol_destructor_set): Adjust.
17975 * src/output.c (symbol_destructors_output): Output the destructor
17976 locations.
17977 Output the symbol name.
17978 * data/bison.simple (b4_symbol_destructor): Adjust.
17979
17980 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17981 and Akim Demaille <akim@epita.fr>
17982
17983 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17984 what's left on the stack when the error recovery hits EOF.
17985 * tests/actions.at (Destructors): Complete to exercise this case.
17986
17987 2002-06-17 Akim Demaille <akim@epita.fr>
17988
17989 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17990 arguments is really empty, not only equal to `[]'.
17991 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17992 member.
17993 (symbol_destructor_set): New.
17994 * src/output.c (symbol_destructors_output): New.
17995 * src/reader.h (brace_code_t, current_braced_code): New.
17996 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17997 (handle_dollar): Rename as...
17998 (handle_action_dollar): this.
17999 (handle_destructor_dollar): New.
18000 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18001 (grammar_declaration): Use it.
18002 * data/bison.simple (yystos): Is always defined.
18003 (yydestructor): New.
18004 * tests/actions.at (Destructors): New.
18005 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18006
18007 2002-06-17 Akim Demaille <akim@epita.fr>
18008
18009 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18010 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18011 rule_length only when needed.
18012 * src/output.c (actions_output, token_definitions_output): Output
18013 the full M4 block.
18014 * src/symtab.c: Don't access directly to the symbol tag, use
18015 symbol_tag_get.
18016 * src/parse-gram.y: Use symbol_list_free.
18017
18018 2002-06-17 Akim Demaille <akim@epita.fr>
18019
18020 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18021 (symbol_list_prepend, get_type_name): Move to...
18022 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18023 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18024 Adjust all callers.
18025 (symbol_list_free): New.
18026 * src/scan-gram.l (handle_dollar): Takes a location.
18027 * tests/input.at (Invalid $n): Adjust.
18028
18029 2002-06-17 Akim Demaille <akim@epita.fr>
18030
18031 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18032 (symbol_list_prepend): New.
18033 * src/parse-gram.y (%union): `list' is a new member.
18034 (symbols.1): New, replaces...
18035 (terms_to_prec.1, nterms_to_type.1): these.
18036 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18037 Take a location as additional argument.
18038 Adjust all callers.
18039
18040 2002-06-15 Akim Demaille <akim@epita.fr>
18041
18042 * src/parse-gram.y: Move %token in the declaration section so that
18043 we don't depend upon CVS Bison.
18044
18045 2002-06-15 Akim Demaille <akim@epita.fr>
18046
18047 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18048 * src/print.c (print_core): Use it.
18049
18050 2002-06-15 Akim Demaille <akim@epita.fr>
18051
18052 * src/conflicts.c (log_resolution): Accept the rule involved in
18053 the sr conflicts instead of the lookahead number that points to
18054 that rule.
18055 (flush_reduce): Accept the current lookahead vector as argument,
18056 instead of the index in LA.
18057 (resolve_sr_conflict): Accept the current number of lookahead
18058 bitset to consider for the STATE, instead of the index in LA.
18059 (set_conflicts): Adjust.
18060 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18061
18062 2002-06-15 Akim Demaille <akim@epita.fr>
18063
18064 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18065 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18066 Adjust all dependencies.
18067 * src/lalr.c (initialize_lookaheads): Split into...
18068 (states_lookaheads_count, states_lookaheads_initialize): these.
18069 (lalr): Adjust.
18070
18071 2002-06-15 Akim Demaille <akim@epita.fr>
18072
18073 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18074 out of...
18075 (grammar_rules_print): here.
18076 * src/reduce.c (reduce_output): Use it.
18077 * tests/reduce.at (Useless Rules, Reduced Automaton)
18078 (Underivable Rules): Adjust.
18079
18080 2002-06-15 Akim Demaille <akim@epita.fr>
18081
18082 Copy BYacc's nice way to report the grammar.
18083
18084 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18085 New.
18086 Don't print the rules' location, it is confusing and useless.
18087 (rule_print): Use grammar_rhs_print.
18088 * src/print.c (print_grammar): Use grammar_rules_print.
18089
18090 2002-06-15 Akim Demaille <akim@epita.fr>
18091
18092 Complete and rationalize `useless thing' warnings.
18093
18094 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18095 (symbol_tag_print): New.
18096 Use them everywhere in place of accessing directly the tag member.
18097 * src/gram.h, src/gram.c (rule_print): New.
18098 Use it where a rule used to be printed `by hand'.
18099 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18100 (reduce_grammar_tables): Report the useless rules.
18101 (reduce_print): Useless things are a warning, not an error.
18102 Report it as such.
18103 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18104 (Reduced Automaton, Underivable Rules): Adjust.
18105 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18106 * tests/conflicts.at (Unresolved SR Conflicts)
18107 (Solved SR Conflicts): Adjust.
18108
18109 2002-06-15 Akim Demaille <akim@epita.fr>
18110
18111 Let symbols have a location.
18112
18113 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18114 (getsym): Adjust.
18115 Adjust all callers.
18116 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18117 Use location_t, not int.
18118 * src/symtab.c (symbol_check_defined): Take advantage of the
18119 location.
18120 * tests/regression.at (Invalid inputs): Adjust.
18121
18122 2002-06-15 Akim Demaille <akim@epita.fr>
18123
18124 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18125 (input): Don't try to initialize yylloc here, do it in the
18126 scanner.
18127 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18128 * src/gram.h (rule_t): Change line and action_line into location
18129 and action_location, of location_t type.
18130 Adjust all dependencies.
18131 * src/location.h, src/location.c (empty_location): New.
18132 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18133 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18134 (grammar_current_rule_symbol_append)
18135 (grammar_current_rule_action_append): Expect a location as argument.
18136 * src/reader.c (grammar_midrule_action): Adjust to attach an
18137 action's location as dummy symbol location.
18138 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18139 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18140 the line numbers.
18141
18142 2002-06-14 Akim Demaille <akim@epita.fr>
18143
18144 Grammar declarations may be found in the grammar section.
18145
18146 * src/parse-gram.y (rules_or_grammar_declaration): New.
18147 (declarations): Each declaration may end with a semicolon, not
18148 just...
18149 (grammar_declaration): `"%union"'.
18150 (grammar): Branch to rules_or_grammar_declaration.
18151
18152 2002-06-14 Akim Demaille <akim@epita.fr>
18153
18154 * src/main.c (main): Invoke scanner_free.
18155
18156 2002-06-14 Akim Demaille <akim@epita.fr>
18157
18158 * src/output.c (m4_invoke): Extracted from...
18159 (output_skeleton): here.
18160 Free tempfile.
18161
18162 2002-06-14 Akim Demaille <akim@epita.fr>
18163
18164 * src/parse-gram.y (directives, directive, gram)
18165 (grammar_directives, precedence_directives, precedence_directive):
18166 Rename as...
18167 (declarations, declaration, grammar, grammar_declaration)
18168 (precedence_declaration, precedence_declarator): these.
18169 (symbol_declaration): New.
18170
18171 2002-06-14 Akim Demaille <akim@epita.fr>
18172
18173 * src/files.c (action_obstack): Remove, unused.
18174 (output_obstack): Remove it, and all its dependencies, as it is no
18175 longer needed.
18176 * src/reader.c (epilogue_set): Build the epilogue in the
18177 muscle_obstack.
18178 * src/output.h, src/output.c (muscle_obstack): Move to...
18179 * src/muscle_tab.h, src/muscle_tab.h: here.
18180 (muscle_init): Initialize muscle_obstack.
18181 (muscle_free): New.
18182 * src/main.c (main): Call it.
18183
18184 2002-06-14 Akim Demaille <akim@epita.fr>
18185
18186 * src/location.h: New, extracted from...
18187 * src/reader.h: here.
18188 * src/Makefile.am (noinst_HEADERS): Merge into
18189 (bison_SOURCES): this.
18190 Add location.h.
18191 * src/parse-gram.y: Use location_t instead of Bison's.
18192 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18193 Use location_t instead of ints.
18194
18195 2002-06-14 Akim Demaille <akim@epita.fr>
18196
18197 * data/bison.simple, data/bison.c++: Be sure to restore the
18198 current #line when returning to the skeleton contents after having
18199 exposed the input file's #line.
18200
18201 2002-06-12 Akim Demaille <akim@epita.fr>
18202
18203 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18204 eager.
18205 * tests/actions.at (Exotic Dollars): New.
18206
18207 2002-06-12 Akim Demaille <akim@epita.fr>
18208
18209 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18210 ['"/] too eagerly.
18211 * tests/input.at (Torturing the Scanner): New.
18212
18213 2002-06-11 Akim Demaille <akim@epita.fr>
18214
18215 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18216 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18217 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18218 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18219 * src/reader.c (reader): Use it.
18220
18221 2002-06-11 Akim Demaille <akim@epita.fr>
18222
18223 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18224 Adjust all callers.
18225 (scanner_last_string_free): New.
18226
18227 2002-06-11 Akim Demaille <akim@epita.fr>
18228
18229 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18230 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18231 (last_string, YY_OBS_FREE): New.
18232 Use them when returning an ID.
18233
18234 2002-06-11 Akim Demaille <akim@epita.fr>
18235
18236 Have Bison grammars parsed by a Bison grammar.
18237
18238 * src/reader.c, src/reader.h (prologue_augment): New.
18239 * src/reader.c (copy_definition): Remove.
18240
18241 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18242 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18243 (grammar_current_rule_prec_set, grammar_current_rule_check)
18244 (grammar_current_rule_symbol_append)
18245 (grammar_current_rule_action_append): Export.
18246 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18247 (symbol_list_action_append): Remove.
18248 Hook the routines from reader.
18249 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18250 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18251
18252 * src/reader.c (read_declarations): Remove, unused.
18253
18254 * src/parse-gram.y: Handle the epilogue.
18255 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18256 (grammar_start_symbol_set): this.
18257 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18258 * src/reader.c (readgram): Remove, unused.
18259 (reader): Adjust to insert eoftoken and axiom where appropriate.
18260
18261 * src/reader.c (copy_dollar): Replace with...
18262 * src/scan-gram.h (handle_dollar): this.
18263 * src/parse-gram.y: Remove `%thong'.
18264
18265 * src/reader.c (copy_at): Replace with...
18266 * src/scan-gram.h (handle_at): this.
18267
18268 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18269 New.
18270
18271 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18272 time being.
18273
18274 * src/reader.h, src/reader.c (grammar_rule_end): New.
18275
18276 * src/parse.y (current_type, current_class): New.
18277 Implement `%nterm', `%token' support.
18278 Merge `%term' into `%token'.
18279 (string_as_id): New.
18280 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18281 type name.
18282
18283 * src/parse-gram.y: Be sure to handle properly the beginning of
18284 rules.
18285
18286 * src/parse-gram.y: Handle %type.
18287 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18288
18289 * src/parse-gram.y: More directives support.
18290 * src/options.c: No longer handle source directives.
18291
18292 * src/parse-gram.y: Fix %output.
18293
18294 * src/parse-gram.y: Handle %union.
18295 Use the prologue locations.
18296 * src/reader.c (parse_union_decl): Remove.
18297
18298 * src/reader.h, src/reader.c (epilogue_set): New.
18299 * src/parse-gram.y: Use it.
18300
18301 * data/bison.simple, data/bison.c++: b4_stype is now either not
18302 defined, then default to int, or to the contents of %union,
18303 without `union' itself.
18304 Adjust.
18305 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18306
18307 * src/output.c (actions_output): Don't output braces, as they are
18308 already handled by the scanner.
18309
18310 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18311 characters to themselves.
18312
18313 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18314 that the epilogue has a proper #line.
18315
18316 * src/parse-gram.y: Handle precedence/associativity.
18317
18318 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18319 a terminal.
18320 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18321 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18322 at all to define terminals that cannot be emitted.
18323
18324 * src/scan-gram.l: Escape M4 characters.
18325
18326 * src/scan-gram.l: Working properly with escapes in user
18327 strings/characters.
18328
18329 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18330 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18331 grammar.
18332 Use more modest sizes, as for the time being the parser does not
18333 release memory, and therefore the process swallows a huge amount
18334 of memory.
18335
18336 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18337 stricter %token grammar.
18338
18339 * src/symtab.h (associativity): Add `undef_assoc'.
18340 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18341 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18342
18343 * tests/regression.at (Invalid %directive): Remove, as it is now
18344 meaningless.
18345 (Invalid inputs): Adjust to the new error messages.
18346 (Token definitions): The new grammar doesn't allow too many
18347 eccentricities.
18348
18349 * src/lex.h, src/lex.c: Remove.
18350 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18351 (copy_character, copy_string2, copy_string, copy_identifier)
18352 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18353 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18354 (parse_action): Remove.
18355 * po/POTFILES.in: Adjust.
18356
18357 2002-06-11 Akim Demaille <akim@epita.fr>
18358
18359 * src/reader.c (parse_action): Don't store directly into the
18360 rule's action member: return the action as a string.
18361 Don't require `rule_length' as an argument: compute it.
18362 (grammar_current_rule_symbol_append)
18363 (grammar_current_rule_action_append): New, eved out from
18364 (readgram): here.
18365 Remove `action_flag', `rulelength', unused now.
18366
18367 2002-06-11 Akim Demaille <akim@epita.fr>
18368
18369 * src/reader.c (grammar_current_rule_prec_set).
18370 (grammar_current_rule_check): New, eved out from...
18371 (readgram): here.
18372 Remove `xaction', `first_rhs': useless.
18373 * tests/input.at (Type clashes): New.
18374 * tests/existing.at (GNU Cim Grammar): Adjust.
18375
18376 2002-06-11 Akim Demaille <akim@epita.fr>
18377
18378 * src/reader.c (grammar_midrule_action): New, Eved out from
18379 (readgram): here.
18380
18381 2002-06-11 Akim Demaille <akim@epita.fr>
18382
18383 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
18384 New.
18385 (readgram): Use them as replacement of inlined code, crule and
18386 crule1.
18387
18388 2002-06-11 Akim Demaille <akim@epita.fr>
18389
18390 * src/reader.c (grammar_end, grammar_symbol_append): New.
18391 (readgram): Use them.
18392 Make the use of `p' as local as possible.
18393
18394 2002-06-10 Akim Demaille <akim@epita.fr>
18395
18396 GCJ's parser requires the tokens to be defined before the prologue.
18397
18398 * data/bison.simple: Output the token definition before the user's
18399 prologue.
18400 * tests/regression.at (Braces parsing, Duplicate string)
18401 (Mixing %token styles): Check the output from bison.
18402 (Early token definitions): New.
18403
18404 2002-06-10 Akim Demaille <akim@epita.fr>
18405
18406 * src/symtab.c (symbol_user_token_number_set): Don't complain when
18407 assigning twice the same user number to a token, so that we can
18408 use it in...
18409 * src/lex.c (lex): here.
18410 Also use `symbol_class_set' instead of hand written code.
18411 * src/reader.c (parse_assoc_decl): Likewise.
18412
18413 2002-06-10 Akim Demaille <akim@epita.fr>
18414
18415 * src/symtab.c, src/symtab.c (symbol_class_set)
18416 (symbol_user_token_number_set): New.
18417 * src/reader.c (parse_token_decl): Use them.
18418 Use a switch instead of ifs.
18419 Use a single argument.
18420
18421 2002-06-10 Akim Demaille <akim@epita.fr>
18422
18423 Remove `%thong' support as it is undocumented, unused, duplicates
18424 `%token's job, and creates useless e-mail traffic with people who
18425 want to know what it is, why it is undocumented, unused, and
18426 duplicates `%token's job.
18427
18428 * src/reader.c (parse_thong_decl): Remove.
18429 * src/options.c (option_table): Remove "thong".
18430 * src/lex.h (tok_thong): Remove.
18431
18432 2002-06-10 Akim Demaille <akim@epita.fr>
18433
18434 * src/symtab.c, src/symtab.c (symbol_type_set)
18435 (symbol_precedence_set): New.
18436 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
18437 (value_components_used): Remove, unused.
18438
18439 2002-06-09 Akim Demaille <akim@epita.fr>
18440
18441 Move symbols handling code out of the reader.
18442
18443 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
18444 (axiom): Move to...
18445 * src/symtab.h, src/symtab.c: here.
18446
18447 * src/gram.c (start_symbol): Remove: use startsymbol->number.
18448 * src/reader.c (startval): Rename as...
18449 * src/symtab.h, src/symtab.c (startsymbol): this.
18450 * src/reader.c: Adjust.
18451
18452 * src/reader.c (symbol_check_defined, symbol_make_alias)
18453 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18454 (token_translations_init)
18455 Move to...
18456 * src/symtab.c: here.
18457 * src/reader.c (packsymbols): Move to...
18458 * src/symtab.h, src/symtab.c (symbols_pack): here.
18459 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
18460 argument.
18461
18462 2002-06-03 Akim Demaille <akim@epita.fr>
18463
18464 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
18465 then statements.
18466
18467 2002-06-03 Akim Demaille <akim@epita.fr>
18468
18469 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
18470 structs with non literals.
18471 * src/scan-skel.l: never-interactive.
18472 * src/conflicts.c (enum conflict_resolution_e): No trailing
18473 comma.
18474 * src/getargs.c (usage): Split long literal strings.
18475 Reported by Hans Aberg.
18476
18477 2002-05-28 Akim Demaille <akim@epita.fr>
18478
18479 * data/bison.c++: Use C++ ostreams.
18480 (cdebug_): New member.
18481
18482 2002-05-28 Akim Demaille <akim@epita.fr>
18483
18484 * src/output.c (output_skeleton): Be sure to allocate enough room
18485 for `/' _and_ for `\0' in full_skeleton.
18486
18487 2002-05-28 Akim Demaille <akim@epita.fr>
18488
18489 * data/bison.c++: Catch up with bison.simple:
18490 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18491 and Paul Eggert <eggert@twinsun.com>: `error' handing.
18492 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
18493 and popping traces.
18494
18495 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18496
18497 * src/output.c (output_skeleton): Put an explicit path in front of
18498 the skeleton file name, rather than relying on the -I directory,
18499 to partially alleviate effects of having a skeleton file lying around
18500 in the current directory.
18501
18502 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18503
18504 * src/conflicts.c (log_resolution): Correct typo:
18505 obstack_printf should be obstack_fgrow1.
18506
18507 2002-05-26 Akim Demaille <akim@epita.fr>
18508
18509 * src/state.h (state_t): `solved_conflicts' is a new member.
18510 * src/LR0.c (new_state): Set it to 0.
18511 * src/conflicts.h, src/conflicts.c (print_conflicts)
18512 (free_conflicts, solve_conflicts): Rename as...
18513 (conflicts_print, conflicts_free, conflicts_solve): these.
18514 Adjust callers.
18515 * src/conflicts.c (enum conflict_resolution_e)
18516 (solved_conflicts_obstack): New, used by...
18517 (log_resolution): this.
18518 Adjust to attach the conflict resolution to each state.
18519 Complete the description with the precedence/associativity
18520 information.
18521 (resolve_sr_conflict): Adjust.
18522 * src/print.c (print_state): Output its solved_conflicts.
18523 * tests/conflicts.at (Unresolved SR Conflicts)
18524 (Solved SR Conflicts): Exercise --report=all.
18525
18526 2002-05-26 Akim Demaille <akim@epita.fr>
18527
18528 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18529 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18530 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
18531 (token_number_t, item_number_as_token_number)
18532 (token_number_as_item_number, muscle_insert_token_number_table):
18533 Rename as...
18534 (symbol_number_t, item_number_as_symbol_number)
18535 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
18536 these, since it is more appropriate.
18537
18538 2002-05-26 Akim Demaille <akim@epita.fr>
18539
18540 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
18541 `Error:' lines.
18542 * data/bison.simple (yystos) [YYDEBUG]: New.
18543 (yyparse) [YYDEBUG]: Display the symbols which are popped during
18544 error recovery.
18545 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
18546
18547 2002-05-25 Akim Demaille <akim@epita.fr>
18548
18549 * doc/bison.texinfo (Debugging): Split into...
18550 (Tracing): this new section, its former contents, and...
18551 (Understanding): this new section.
18552 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
18553 by...
18554 (report_flag): this.
18555 Adjust all dependencies.
18556 (report_args, report_types, report_argmatch): New.
18557 (usage, getargs): Report/support -r, --report.
18558 * src/options.h
18559 (struct option_table_struct): Rename as..,
18560 (struct option_table_s): this.
18561 Rename the `set_flag' member to `flag' to match with getopt_long's
18562 struct.
18563 * src/options.c (option_table): Split verbose into an entry for
18564 %verbose, and another for --verbose.
18565 Support --report/-r, so remove -r from the obsolete --raw.
18566 * src/print.c: Attach full item sets and lookaheads reports to
18567 report_flag instead of trace_flag.
18568 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
18569
18570 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18571 and Paul Eggert <eggert@twinsun.com>
18572
18573 * data/bison.simple (yyparse): Correct error handling to conform to
18574 POSIX and yacc. Specifically, after syntax error is discovered,
18575 do not reduce further before shifting the error token.
18576 Clean up the code a bit by removing the labels yyerrdefault,
18577 yyerrhandle, yyerrpop.
18578 * NEWS: Document the above.
18579
18580 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18581
18582 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
18583 type; it isn't always big enough, since it doesn't necessarily
18584 include non-terminals.
18585 (yytranslate): Expand definition of yy_token_number_type, so that
18586 the latter can be removed.
18587 (yy_token_number_type): Remove, only one use.
18588 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
18589 don't use TokenNumberType as element type.
18590
18591 * tests/regression.at: Modify expected output to agree with change
18592 to yyr1 and yytranslate.
18593
18594 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
18595
18596 * src/reader.c (parse_action): Use copy_character instead of
18597 obstack_1grow.
18598
18599 2002-05-13 Akim Demaille <akim@epita.fr>
18600
18601 * tests/regression.at (Token definitions): Prototype yylex and
18602 yyerror.
18603
18604 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18605
18606 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
18607 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
18608 32-bit arithmetic.
18609 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
18610
18611 2002-05-07 Akim Demaille <akim@epita.fr>
18612
18613 * tests/synclines.at: Be sure to prototype yylex and yyerror to
18614 avoid GCC warnings.
18615
18616 2002-05-07 Akim Demaille <akim@epita.fr>
18617
18618 Kill GCC warnings.
18619
18620 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
18621 over the RHS of each rule.
18622 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
18623 * src/state.h (state_t): Member `nitems' is unsigned short.
18624 * src/LR0.c (get_state): Adjust.
18625 * src/reader.c (packgram): Likewise.
18626 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
18627 `Type'.
18628 (muscle_insert_int_table): Remove, unused.
18629 (prepare_rules): Remove `max'.
18630
18631 2002-05-06 Akim Demaille <akim@epita.fr>
18632
18633 * src/closure.c (print_firsts): Display of the symbol tags.
18634 (bitmatrix_print): Move to...
18635 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
18636 here.
18637 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
18638
18639 2002-05-06 Akim Demaille <akim@epita.fr>
18640
18641 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
18642 hash_do_for_each.
18643
18644 2002-05-06 Akim Demaille <akim@epita.fr>
18645
18646 * src/LR0.c (new_state, get_state): Instead of using the global
18647 `kernel_size' and `kernel_base', have two new arguments:
18648 `core_size' and `core'.
18649 Adjust callers.
18650
18651 2002-05-06 Akim Demaille <akim@epita.fr>
18652
18653 * src/reader.c (packgram): No longer end `ritem' with a 0
18654 sentinel: it is not used.
18655
18656 2002-05-05 Akim Demaille <akim@epita.fr>
18657
18658 New experimental feature: display the lookaheads in the report and
18659 graph.
18660
18661 * src/print (print_core): When --trace-flag, display the rules
18662 lookaheads.
18663 * src/print_graph.c (print_core): Likewise.
18664 Swap the arguments.
18665 Adjust caller.
18666
18667 2002-05-05 Akim Demaille <akim@epita.fr>
18668
18669 * tests/torture.at (Many lookaheads): New test.
18670
18671 2002-05-05 Akim Demaille <akim@epita.fr>
18672
18673 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
18674 (GENERATE_MUSCLE_INSERT_TABLE): this.
18675 (output_int_table, output_unsigned_int_table, output_short_table)
18676 (output_token_number_table, output_item_number_table): Replace with...
18677 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
18678 (muscle_insert_short_table, muscle_insert_token_number_table)
18679 (muscle_insert_item_number_table): these.
18680 Adjust all callers.
18681 (prepare_tokens): Don't free `translations', since...
18682 * src/reader.h, src/reader.c (grammar_free): do it.
18683 Move to...
18684 * src/gram.h, src/gram.c (grammar_free): here.
18685 * data/bison.simple, data/bison.c++: b4_token_number_max is now
18686 b4_translate_max.
18687
18688 2002-05-05 Akim Demaille <akim@epita.fr>
18689
18690 * src/output.c (output_unsigned_int_table): New.
18691 (prepare_rules): `i' is unsigned.
18692 `prhs', `rline', `r2' are unsigned int.
18693 Rename muscle `rhs_number_max' as `rhs_max'.
18694 Output muscles `prhs_max', `rline_max', and `r2_max'.
18695 Free rline and r1.
18696 * data/bison.simple, data/bison.c++: Adjust to use these muscles
18697 to compute types instead of constant types.
18698 * tests/regression.at (Web2c Actions): Adjust.
18699
18700 2002-05-04 Akim Demaille <akim@epita.fr>
18701
18702 * src/symtab.h (SALIAS, SUNDEF): Rename as...
18703 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
18704 Adjust dependencies.
18705 * src/output.c (token_definitions_output): Be sure not to output a
18706 `#define 'a'' when fed with `%token 'a' "a"'.
18707 * tests/regression.at (Token definitions): New.
18708
18709 2002-05-03 Paul Eggert <eggert@twinsun.com>
18710
18711 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
18712 for K&R C.
18713
18714 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
18715
18716 * Makefile.am (SUBDIRS): Remove intl.
18717 (EXTRA_DIST): Add config/config.rpath.
18718
18719 2002-05-03 Akim Demaille <akim@epita.fr>
18720
18721 * data/bison.simple (m4_if): Don't output empty enums.
18722 And actually, output valid enum definitions :(.
18723
18724 2002-05-03 Akim Demaille <akim@epita.fr>
18725
18726 * configure.bat: Remove, completely obsolete.
18727 * Makefile.am (EXTRA_DIST): Adjust.
18728 Don't distribute config.rpath...
18729 * config/Makefile.am (EXTRA_DIST): Do it.
18730
18731 2002-05-03 Akim Demaille <akim@epita.fr>
18732
18733 * configure.in (GETTEXT_VERSION): New.
18734 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
18735
18736 2002-05-03 Akim Demaille <akim@epita.fr>
18737
18738 * data/bison.simple (b4_token_enum): New.
18739 (b4_token_defines): Use it to output tokens both as #define and
18740 enums.
18741 Suggested by Paul Eggert.
18742 * src/output.c (token_definitions_output): Don't output spurious
18743 white spaces.
18744
18745 2002-05-03 Akim Demaille <akim@epita.fr>
18746
18747 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18748
18749 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
18750
18751 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
18752 Update the stack class, give a try to deque as the default container.
18753
18754 2002-05-02 Akim Demaille <akim@epita.fr>
18755
18756 * data/bison.simple (yyparse): Do not implement @$ = @1.
18757 (YYLLOC_DEFAULT): Adjust to do it.
18758 * doc/bison.texinfo (Location Default Action): Fix.
18759
18760 2002-05-02 Akim Demaille <akim@epita.fr>
18761
18762 * src/reader.c (parse_braces): Merge into...
18763 (parse_action): this.
18764
18765 2002-05-02 Akim Demaille <akim@epita.fr>
18766
18767 * configure.in (ALL_LINGUAS): Remove.
18768 * po/LINGUAS, hr.po: New.
18769
18770 2002-05-02 Akim Demaille <akim@epita.fr>
18771
18772 Remove the so called hairy (semantic) parsers.
18773
18774 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
18775 * src/gram.h, src/gram.c (semantic_parser): Remove.
18776 (rule_t): Remove the guard and guard_line members.
18777 * src/lex.h (token_t): remove tok_guard.
18778 * src/options.c (option_table): Remove %guard and %semantic_parser
18779 support.
18780 * src/output.c, src/output.h (guards_output): Remove.
18781 (prepare): Adjust.
18782 (token_definitions_output): Don't output the `T'
18783 tokens (???).
18784 (output_skeleton): Don't output the guards.
18785 * src/files.c, src/files.c (attrsfile): Remove.
18786 * src/reader.c (symbol_list): Remove the guard and guard_line
18787 members.
18788 Adjust dependencies.
18789 (parse_guard): Remove.
18790 * data/bison.hairy: Remove.
18791 * doc/bison.texinfo (Environment Variables): Remove occurrences of
18792 BISON_HAIRY.
18793
18794 2002-05-02 Akim Demaille <akim@epita.fr>
18795
18796 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
18797 (parse_guard): Rename the formal argument `stack_offset' as
18798 `rule_length', which is more readable.
18799 Adjust callers.
18800 (copy_at, copy_dollar): Instead of outputting the hard coded
18801 values of $$, $n and so forth, output invocation to b4_lhs_value,
18802 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
18803 Note: this patch partially drops `semantic-parser' support: it
18804 always does `rule_length - n', where semantic parsers ought to
18805 always use `-n'.
18806 * data/bison.simple, data/bison.c++ (b4_lhs_value)
18807 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
18808
18809 2002-05-02 Akim Demaille <akim@epita.fr>
18810
18811 * configure.in (AC_INIT): Bump to 1.49b.
18812 (AM_INIT_AUTOMAKE): Short invocation.
18813
18814 2002-05-02 Akim Demaille <akim@epita.fr>
18815
18816 Version 1.49a.
18817
18818 2002-05-01 Akim Demaille <akim@epita.fr>
18819
18820 * src/skeleton.h: Remove.
18821
18822 2002-05-01 Akim Demaille <akim@epita.fr>
18823
18824 * src/skeleton.h: Fix the #endif.
18825 Reported by Magnus Fromreide.
18826
18827 2002-04-26 Paul Eggert <eggert@twinsun.com>
18828
18829 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
18830 Define if we define YYSTYPE and YYLTYPE, respectively.
18831 (YYCOPY): Fix [] quoting problem in the non-GCC case.
18832
18833 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
18834
18835 * src/scan-skel.l: Postprocess quadrigraphs.
18836
18837 * src/reader.c (copy_character): New function, used to output
18838 single characters while replacing `[' and `]' with quadrigraphs, to
18839 avoid troubles with M4 quotes.
18840 (copy_comment): Output characters with copy_character.
18841 (read_additionnal_code): Likewise.
18842 (copy_string2): Likewise.
18843 (copy_definition): Likewise.
18844
18845 * tests/calc.at: Exercise M4 quoting.
18846
18847 2002-04-25 Akim Demaille <akim@epita.fr>
18848
18849 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18850 between `!' and the command.
18851 Reported by Paul Eggert.
18852
18853 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
18854
18855 * tests/calc.at: Exercise prologue splitting.
18856
18857 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18858 `b4_post_prologue' instead of `b4_prologue'.
18859
18860 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18861 muscles.
18862 (output): Free pre_prologue_obstack and post_prologue_obstack.
18863 * src/files.h, src/files.c (attrs_obstack): Remove.
18864 (pre_prologue_obstack, post_prologue_obstack): New.
18865 * src/reader.c (copy_definition): Add a parameter to specify the
18866 obstack to fill, instead of using attrs_obstack unconditionally.
18867 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18868 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18869
18870 2002-04-23 Paul Eggert <eggert@twinsun.com>
18871
18872 * data/bison.simple: Remove unnecessary commentary and white
18873 space differences from 1_29-branch.
18874 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18875
18876 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18877 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18878 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18879 constructors or destructors.
18880
18881 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18882
18883 2002-04-23 Akim Demaille <akim@epita.fr>
18884
18885 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18886 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18887 location with columns.
18888 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18889 All reported by Paul Eggert.
18890
18891 2002-04-22 Akim Demaille <akim@epita.fr>
18892
18893 * src/reduce.c (dump_grammar): Move to...
18894 * src/gram.h, src/gram.c (grammar_dump): here.
18895 Be sure to separate long item numbers.
18896 Don't read the members of a rule's prec if its nil.
18897
18898 2002-04-22 Akim Demaille <akim@epita.fr>
18899
18900 * src/output.c (table_size, table_grow): New.
18901 (MAXTABLE): Remove, replace uses with table_size.
18902 (pack_vector): Instead of dying when the table is too big, grow it.
18903
18904 2002-04-22 Akim Demaille <akim@epita.fr>
18905
18906 * data/bison.simple (yyr1): Its type is that of a token number.
18907 * data/bison.c++ (r1_): Likewise.
18908 * tests/regression.at (Web2c Actions): Adjust.
18909
18910 2002-04-22 Akim Demaille <akim@epita.fr>
18911
18912 * src/reader.c (token_translations_init): 256 is now the default
18913 value for the error token, i.e., it will be assigned another
18914 number if the user assigned 256 to one of her tokens.
18915 (reader): Don't force 256 to error.
18916 * doc/bison.texinfo (Symbols): Adjust.
18917 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18918 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18919 etc. instead of 10, 20, 30 (which was used to `jump' over error
18920 (256) and undefined (2)).
18921
18922 2002-04-22 Akim Demaille <akim@epita.fr>
18923
18924 Propagate more token_number_t.
18925
18926 * src/gram.h (token_number_as_item_number)
18927 (item_number_as_token_number): New.
18928 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18929 Use it to create output_item_number_table and
18930 output_token_number_table.
18931 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18932 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18933 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18934 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18935
18936 2002-04-22 Akim Demaille <akim@epita.fr>
18937
18938 * src/output.h, src/output.c (get_lines_number): Remove.
18939
18940 2002-04-19 Akim Demaille <akim@epita.fr>
18941
18942 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18943 as Lex/Flex'.
18944 (Debugging): More details about enabling the debugging features.
18945 (Table of Symbols): Describe $$, $n, @$, and @n.
18946 Suggested by Tim Josling.
18947
18948 2002-04-19 Akim Demaille <akim@epita.fr>
18949
18950 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18951
18952 2002-04-10 Akim Demaille <akim@epita.fr>
18953
18954 * src/system.h: Rely on HAVE_LIMITS_H.
18955 Suggested by Paul Eggert.
18956
18957 2002-04-09 Akim Demaille <akim@epita.fr>
18958
18959 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18960 full stderr, and strip it according to the bison options, instead
18961 of composing the error message from different bits.
18962 This makes it easier to check for several error messages.
18963 Adjust all the invocations.
18964 Add an invocation exercising the error token.
18965 Add an invocation demonstrating a stupid error message.
18966 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18967 Adjust the tests.
18968 Error message are for stderr, not stdout.
18969
18970 2002-04-09 Akim Demaille <akim@epita.fr>
18971
18972 * src/gram.h, src/gram.c (error_token_number): Remove, use
18973 errtoken->number.
18974 * src/reader.c (reader): Don't specify the user token number (2)
18975 for $undefined, as it uselessly prevents using it.
18976 * src/gram.h (token_number_t): Move to...
18977 * src/symtab.h: here.
18978 (state_t.number): Is a token_number_t.
18979 * src/print.c, src/reader.c: Use undeftoken->number instead of
18980 hard coded 2.
18981 (Even though this 2 is not the same as above: the number of the
18982 undeftoken remains being 2, it is its user token number which
18983 might not be 2).
18984 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18985 `user_token_number_max'.
18986 Output `undef_token_number'.
18987 * data/bison.simple, data/bison.c++: Use them.
18988 Be sure to map invalid yylex return values to
18989 `undef_token_number'. This saves us from gratuitous SEGV.
18990
18991 * tests/conflicts.at (Solved SR Conflicts)
18992 (Unresolved SR Conflicts): Adjust.
18993 * tests/regression.at (Web2c Actions): Adjust.
18994
18995 2002-04-08 Akim Demaille <akim@epita.fr>
18996
18997 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18998 Adding #line.
18999 Remove the duplicate `typedefs'.
19000 (RhsNumberType): Fix the declaration and various other typos.
19001 Use __ofile__.
19002 * data/bison.simple: Use __ofile__.
19003 * src/scan-skel.l: Handle __ofile__.
19004
19005 2002-04-08 Akim Demaille <akim@epita.fr>
19006
19007 * src/gram.h (item_number_t): New, the type of item numbers in
19008 RITEM. Note that it must be able to code symbol numbers as
19009 positive number, and the negation of rule numbers as negative
19010 numbers.
19011 Adjust all dependencies (pretty many).
19012 * src/reduce.c (rule): Remove this `short *' pointer: use
19013 item_number_t.
19014 * src/system.h (MINSHORT, MAXSHORT): Remove.
19015 Include `limits.h'.
19016 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19017 (shortcpy): Remove.
19018 (MAXTABLE): Move to...
19019 * src/output.c (MAXTABLE): here.
19020 (prepare_rules): Use output_int_table to output rhs.
19021 * data/bison.simple, data/bison.c++: Adjust.
19022 * tests/torture.at (Big triangle): Move the limit from 254 to
19023 500.
19024 * tests/regression.at (Web2c Actions): Ajust.
19025
19026 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19027 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19028 passes, but produces negative #line number, once fixed, GCC is
19029 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19030 C), it passes.
19031 * src/state.h (state_h): Code input lines on ints, not shorts.
19032
19033 2002-04-08 Akim Demaille <akim@epita.fr>
19034
19035 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19036 and then the grammar.
19037
19038 2002-04-08 Akim Demaille <akim@epita.fr>
19039
19040 * src/system.h: No longer using strndup.
19041
19042 2002-04-07 Akim Demaille <akim@epita.fr>
19043
19044 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19045 * src/output.c (output_table_data): Return the longest number.
19046 (prepare_tokens): Output `token_number_max').
19047 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19048 New.
19049 Use them to define yy_token_number_type/TokenNumberType.
19050 Use this type for yytranslate.
19051 * tests/torture.at (Big triangle): Push the limit from 124 to
19052 253.
19053 * tests/regression.at (Web2c Actions): Adjust.
19054
19055 2002-04-07 Akim Demaille <akim@epita.fr>
19056
19057 * tests/torture.at (Big triangle): New.
19058 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19059 * tests/existing.at: here.
19060
19061 2002-04-07 Akim Demaille <akim@epita.fr>
19062
19063 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19064 nritems.
19065 Adjust dependencies.
19066
19067 2002-04-07 Akim Demaille <akim@epita.fr>
19068
19069 * src/reader.c: Normalize increments to prefix form.
19070
19071 2002-04-07 Akim Demaille <akim@epita.fr>
19072
19073 * src/reader.c, symtab.c: Remove debugging code.
19074
19075 2002-04-07 Akim Demaille <akim@epita.fr>
19076
19077 Rename all the `bucket's as `symbol_t'.
19078
19079 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19080 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19081 * src/symtab.c, src/symtab.h (bucket): Rename as...
19082 (symbol_t): this.
19083 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19084 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19085 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19086 (buckets_new, buckets_free, buckets_do): Rename as...
19087 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19088 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19089 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19090 (symbols_new, symbols_free, symbols_do): these.
19091
19092 2002-04-07 Akim Demaille <akim@epita.fr>
19093
19094 Use lib/hash for the symbol table.
19095
19096 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19097 EOF.
19098 * src/lex.c (lex): Set the `number' member of new terminals.
19099 * src/reader.c (bucket_check_defined, bucket_make_alias)
19100 (bucket_check_alias_consistence, bucket_translation): New.
19101 (reader, grammar_free, readgram, token_translations_init)
19102 (packsymbols): Adjust.
19103 (reader): Number the predefined tokens.
19104 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19105 for predefined tokens.
19106 * src/symtab.h (bucket): Remove all the hash table related
19107 members.
19108 * src/symtab.c (symtab): Replace by...
19109 (bucket_table): this.
19110 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19111 (buckets_new, buckets_do): New.
19112
19113 2002-04-07 Akim Demaille <akim@epita.fr>
19114
19115 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19116 (start_symbol, max_user_token_number, semantic_parser)
19117 (error_token_number): Initialize.
19118 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19119 Initialize.
19120 (reader): Don't.
19121 (errtoken, eoftoken, undeftoken, axiom): Extern.
19122
19123 2002-04-07 Akim Demaille <akim@epita.fr>
19124
19125 * src/gram.h (rule_s): prec and precsym are now pointers
19126 to the bucket giving the priority/associativity.
19127 Member `associativity' removed: useless.
19128 * src/reduce.c, src/conflicts.c: Adjust.
19129
19130 2002-04-07 Akim Demaille <akim@epita.fr>
19131
19132 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19133 Properly escape the symbols' TAG when outputting them.
19134
19135 2002-04-07 Akim Demaille <akim@epita.fr>
19136
19137 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19138
19139 2002-04-07 Akim Demaille <akim@epita.fr>
19140
19141 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19142 (LArule): this, which is an array to rule_t*.
19143 * src/print.c, src/conflicts.c: Adjust.
19144
19145 2002-04-07 Akim Demaille <akim@epita.fr>
19146
19147 * src/gram.h (rule_t): Rename `number' as `user_number'.
19148 `number' is a new member.
19149 Adjust dependencies.
19150 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19151
19152 2002-04-07 Akim Demaille <akim@epita.fr>
19153
19154 As a result of the previous patch, it is no longer needed
19155 to reorder ritem itself.
19156
19157 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19158
19159 2002-04-07 Akim Demaille <akim@epita.fr>
19160
19161 Be sure never to walk through RITEMS, but use only data related to
19162 the rules themselves. RITEMS should be banished.
19163
19164 * src/output.c (output_token_translations): Rename as...
19165 (prepare_tokens): this.
19166 In addition to `translate', prepare the muscles `tname' and
19167 `toknum', which were handled by...
19168 (output_rule_data): this.
19169 Remove, and move the remainder of its outputs into...
19170 (prepare_rules): this new routines, which also merges content from
19171 (output_gram): this.
19172 (prepare_rules): Be sure never to walk through RITEMS.
19173 (output_stos): Rename as...
19174 (prepare_stos): this.
19175 (output): Always invoke prepare_states, after all, just don't use it
19176 in the output if you don't need it.
19177
19178 2002-04-07 Akim Demaille <akim@epita.fr>
19179
19180 * src/LR0.c (new_state): Display `nstates' as the name of the
19181 newly created state.
19182 Adjust to initialize first_state and last_state if needed.
19183 Be sure to distinguish the initial from the final state.
19184 (new_states): Create the itemset of the initial state, and use
19185 new_state.
19186 * src/closure.c (closure): Now that the initial state has its
19187 items properly set, there is no need for a special case when
19188 creating `ruleset'.
19189
19190 As a result, now the rule 0, reducing to $axiom, is visible in the
19191 outputs. Adjust the test suite.
19192
19193 * tests/conflicts.at (Solved SR Conflicts)
19194 (Unresolved SR Conflicts): Adjust.
19195 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19196 * tests/conflicts.at (S/R in initial): New.
19197
19198 2002-04-07 Akim Demaille <akim@epita.fr>
19199
19200 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19201 the RHS of the rules.
19202 * src/output.c (output_gram): Likewise.
19203
19204 2002-04-07 Akim Demaille <akim@epita.fr>
19205
19206 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19207 bucket.
19208 Adjust all dependencies.
19209 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19210 `number' of the buckets too.
19211 * src/gram.h: Include `symtab.h'.
19212 (associativity): Move to...
19213 * src/symtab.h: here.
19214 No longer include `gram.h'.
19215
19216 2002-04-07 Akim Demaille <akim@epita.fr>
19217
19218 * src/gram.h, src/gram.c (rules_rhs_length): New.
19219 (ritem_longest_rhs): Use it.
19220 * src/gram.h (rule_t): `number' is a new member.
19221 * src/reader.c (packgram): Set it.
19222 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19223 the end of `rules', and count them out of `nrules'.
19224 (reduce_output, dump_grammar): Adjust.
19225 * src/print.c (print_grammar): It is no longer needed to check for
19226 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19227 * tests/reduce.at (Reduced Automaton): New test.
19228
19229 2002-04-07 Akim Demaille <akim@epita.fr>
19230
19231 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19232 lacking `+ 1' to nrules, Bison reported as useless a token if it
19233 was used solely to set the precedence of the last rule...
19234
19235 2002-04-07 Akim Demaille <akim@epita.fr>
19236
19237 * data/bison.c++, data/bison.simple: Don't output the current file
19238 name in #line, to avoid useless diffs between two identical
19239 outputs under different names.
19240
19241 2002-04-07 Akim Demaille <akim@epita.fr>
19242
19243 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19244 Normalize loops to using `< nrules + 1', not `<= nrules'.
19245
19246 2002-04-07 Akim Demaille <akim@epita.fr>
19247
19248 * TODO: Update.
19249
19250 2002-04-07 Akim Demaille <akim@epita.fr>
19251
19252 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19253 bucket.value as bucket.number.
19254
19255 2002-04-07 Akim Demaille <akim@epita.fr>
19256
19257 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19258 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19259 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19260 RHS, instead of being an index in RITEMS.
19261
19262 2002-04-04 Paul Eggert <eggert@twinsun.com>
19263
19264 * doc/bison.texinfo: Update copyright date.
19265 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19266 (Symbols): Warn about running Bison in one character set,
19267 but compiling and/or running in an incompatible one.
19268 Warn about character code 256, too.
19269
19270 2002-04-03 Paul Eggert <eggert@twinsun.com>
19271
19272 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19273 YYERROR_VERBOSE is nonzero, not whether it is defined.
19274
19275 Merge changes from bison-1_29-branch.
19276
19277 2002-03-20 Paul Eggert <eggert@twinsun.com>
19278
19279 Merge fixes from Debian bison_1.34-1.diff.
19280
19281 * configure.in (AC_PREREQ): 2.53.
19282
19283 2002-03-20 Akim Demaille <akim@epita.fr>
19284
19285 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19286
19287 2002-03-19 Paul Eggert <eggert@twinsun.com>
19288
19289 * src/bison.simple (YYCOPY): New macro.
19290 (YYSTACK_RELOCATE): Use it.
19291 Remove Type arg; no longer needed. All callers changed.
19292 (yymemcpy): Remove; no longer needed.
19293
19294 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19295 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19296
19297 2002-03-19 Akim Demaille <akim@epita.fr>
19298
19299 Test and fix the #line outputs.
19300
19301 * tests/atlocal.at (GCC): New.
19302 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
19303 (Prologue synch line, %union synch line, Postprologue synch line)
19304 (Action synch line, Epilogue synch line): New tests.
19305 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19306 * data/bison.simple, data/bison.c++: Use it.
19307
19308 2002-03-19 Akim Demaille <akim@epita.fr>
19309
19310 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19311 (Solved SR Conflicts, %expect not enough, %expect right)
19312 (%expect too much): Move to...
19313 * tests/conflicts.at: this new file.
19314
19315 2002-03-19 Akim Demaille <akim@epita.fr>
19316
19317 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19318 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19319 that we can move to enums for instance.
19320 * src/output.c (token_definitions_output): Output a list of
19321 `token-name, token-number' instead of the #define.
19322 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19323
19324 2002-03-14 Akim Demaille <akim@epita.fr>
19325
19326 Use Gettext 0.11.1.
19327
19328 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
19329
19330 * data/bison.c++: Make the user able to add members to the generated
19331 parser by subclassing.
19332
19333 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
19334
19335 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19336 a character.
19337 Reported by Nicolas Tisserand and Nicolas Burrus.
19338
19339 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19340
19341 * src/reader.c: Warn about lacking semi-colons, do not complain.
19342
19343 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19344
19345 * data/bison.c++: Remove a debug line.
19346
19347 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19348
19349 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19350 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19351 provide a default implementation.
19352
19353 2002-03-04 Akim Demaille <akim@epita.fr>
19354
19355 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19356 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19357 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19358 * tests/semantic.at (Parsing Guards): Similarly.
19359 * src/reader.at (readgram): Complain if the last rule is not ended
19360 with a semi-colon.
19361
19362 2002-03-04 Akim Demaille <akim@epita.fr>
19363
19364 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19365 * src/closure.c: here.
19366 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19367 RTC.
19368 * src/warshall.h, src/warshall.c: Remove.
19369 * tests/sets.at (Broken Closure): Adjust.
19370
19371 2002-03-04 Akim Demaille <akim@epita.fr>
19372
19373 * src/output.c (output_skeleton): tempdir is const.
19374 bytes_read is unused.
19375
19376 2002-03-04 Akim Demaille <akim@epita.fr>
19377
19378 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19379 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19380 Update.
19381 From Michael Hayes.
19382
19383 2002-03-04 Akim Demaille <akim@epita.fr>
19384
19385 * src/closure.c (closure): `r' is unused.
19386
19387 2002-03-04 Akim Demaille <akim@epita.fr>
19388
19389 * tests/sets.at (Broken Closure): Add the ending `;'.
19390 * src/reader.at (readgram): Complain if a rule is not ended with a
19391 semi-colon.
19392
19393 2002-03-04 Akim Demaille <akim@epita.fr>
19394
19395 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
19396 (count_sr_conflicts): Use bitset_count.
19397 * src/reduce.c (inaccessable_symbols): Ditto.
19398 (bits_size): Remove.
19399 * src/warshall.h, src/warshall.c: Convert to bitsetv.
19400
19401 2002-03-04 Akim Demaille <akim@epita.fr>
19402
19403 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
19404 * src/reduce.c: Remove the `bitset_zero's following the
19405 `bitset_create's, as now it is performed by the latter.
19406
19407 2002-03-04 Akim Demaille <akim@epita.fr>
19408
19409 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
19410 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
19411 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
19412 latest sources from Michael.
19413
19414 2002-03-04 Akim Demaille <akim@epita.fr>
19415
19416 * src/output.c (output): Don't free the grammar.
19417 * src/reader.c (grammar_free): New.
19418 * src/main.c (main): Call it and don't free symtab here.
19419
19420 2002-03-04 Akim Demaille <akim@epita.fr>
19421
19422 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
19423 before returning.
19424 Reported by Benoit Perrot.
19425
19426 2002-03-04 Akim Demaille <akim@epita.fr>
19427
19428 Use bitset operations when possible, not loops over bits.
19429
19430 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
19431 bitset_or.
19432 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
19433 * src/reduce.c (useless_nonterminals): Formatting changes.
19434 * src/warshall.c (TC): Use bitset_or.
19435
19436 2002-03-04 Akim Demaille <akim@epita.fr>
19437
19438 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
19439 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
19440 Ditto.
19441
19442 2002-03-04 Akim Demaille <akim@epita.fr>
19443
19444 * src/lalr.c (F): Now a bitset*.
19445 Adjust all dependencies.
19446
19447 2002-03-04 Akim Demaille <akim@epita.fr>
19448
19449 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
19450 Adjust all dependencies.
19451
19452 2002-03-04 Akim Demaille <akim@epita.fr>
19453
19454 * src/L0.c, src/LR0.h (nstates): Be size_t.
19455 Adjust comparisons (signed vs unsigned).
19456 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
19457 bitset*.
19458 Adjust all dependencies.
19459
19460 2002-03-04 Akim Demaille <akim@epita.fr>
19461
19462 * src/closure.c (firsts): Now, also a bitset.
19463 Adjust all dependencies.
19464 (varsetsize): Remove, now unused.
19465 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
19466
19467 2002-03-04 Akim Demaille <akim@epita.fr>
19468
19469 * src/print.c: Convert to use bitset.h, not hand coded iterations
19470 over ints.
19471
19472 2002-03-04 Akim Demaille <akim@epita.fr>
19473
19474 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
19475
19476 2002-03-04 Akim Demaille <akim@epita.fr>
19477
19478 * src/closure.c (ruleset): Be a bitset.
19479 (rulesetsize): Remove.
19480
19481 2002-03-04 Akim Demaille <akim@epita.fr>
19482
19483 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19484 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
19485 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
19486 * src/closure.c (fderives): Be an array of bitsets.
19487
19488 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
19489
19490 * data/bison.c++: Merge the two generated headers. Insert a copyright
19491 notice in each output file.
19492
19493 2002-02-28 Akim Demaille <akim@epita.fr>
19494
19495 * data/bison.c++: Copy the prologue of bison.simple to fetch
19496 useful M4 definitions, such as b4_header_guard.
19497
19498 2002-02-25 Akim Demaille <akim@epita.fr>
19499
19500 * src/getargs.c (version): Give the name of the authors, and use a
19501 translator friendly scheme for the bgr
19502 copyright notice.
19503
19504 2002-02-25 Akim Demaille <akim@epita.fr>
19505
19506 * src/output.c (header_output): Remove, now handled completely via
19507 M4.
19508
19509 2002-02-25 Akim Demaille <akim@epita.fr>
19510
19511 * m4/m4.m4: New, from CVS Autoconf.
19512 * configure.in: Invoke it.
19513 * src/output.c (output_skeleton): Use its result instead of the
19514 hard coded name.
19515
19516 2002-02-25 Akim Demaille <akim@epita.fr>
19517
19518 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
19519 Fileutils 4.1.5.
19520 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
19521 * src/output.c (output_skeleton): Use mkstemp to create a real
19522 temporary file.
19523 Move the filling of `skeleton' and its muscle to...
19524 (prepare): here.
19525 (output): Move the definition of the prologue muscle to...
19526 (prepare): here.
19527 * src/system.h (DEFAULT_TMPDIR): New.
19528
19529 2002-02-14 Paul Eggert <eggert@twinsun.com>
19530
19531 Remove the support for C++ namespace cleanliness; it was
19532 causing more problems than it was curing, since it didn't work
19533 properly on some nonstandard C++ compilers. This can wait
19534 for a proper C++ parser.
19535
19536 * NEWS: Document this.
19537 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
19538 of C++, as it's treated like C now.
19539 * src/bison.simple (YYSTD): Remove.
19540 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
19541 Treat C++ just like Standard C instead of trying to support
19542 namespace cleanliness.
19543
19544 2002-02-14 Akim Demaille <akim@epita.fr>
19545
19546 * tests/regression.at (else): Adjust to Andreas' change.
19547
19548 2002-02-14 Akim Demaille <akim@epita.fr>
19549
19550 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
19551
19552 2002-02-13 Andreas Schwab <schwab@suse.de>
19553
19554 * src/output.c (output_rule_data): Don't output NULL, it might
19555 not be defined yet.
19556
19557 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
19558
19559 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
19560 (Copyright notice): Update.
19561
19562 2002-02-11 Akim Demaille <akim@epita.fr>
19563
19564 * tests/regression.at (%nonassoc and eof): Don't include
19565 nonportable headers.
19566
19567 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
19568
19569 * data/bison.c++: Correct error recovery. Make the user able to
19570 initialize the starting location.
19571
19572 2002-02-07 Akim Demaille <akim@epita.fr>
19573
19574 * tests/input.at: New.
19575
19576 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19577
19578 * data/bison.c++: Replace some direct m4 expansions by constants. Be
19579 more consistent when naming methods and variables. Put preprocessor
19580 directives around tables only needed for debugging.
19581
19582 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19583
19584 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
19585 C++ parsers.
19586 (yy::b4_name::parse): Use print_.
19587
19588 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19589
19590 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
19591
19592 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19593
19594 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
19595 C++ parsers.
19596 (yy::b4_name::parse): Build verbose error messages, and use error_.
19597
19598 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19599
19600 * data/bison.c++: Fix m4 quoting in comments.
19601
19602 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19603
19604 * data/bison.c++: Adjust the parser code. Fix some muscles that were
19605 not expanded by m4.
19606
19607 2002-02-05 Akim Demaille <akim@epita.fr>
19608
19609 * data/bison.c++: Adjust to the M4 back end.
19610 More is certainly needed.
19611
19612 2002-02-05 Akim Demaille <akim@epita.fr>
19613
19614 Give a try to M4 as a back end.
19615
19616 * lib/readpipe.c: New, from wdiff.
19617 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
19618 BISON_HAIRY.
19619 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
19620 specific values. Now it is m4 that performs the lookup.
19621 * src/parse-skel.y: Remove.
19622 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
19623 * src/output.c (actions_output, guards_output)
19624 (token_definitions_output): No longer keeps track of the output
19625 line number, hence remove the second argument.
19626 (guards_output): Check against the guard member of a rule, not the
19627 action member.
19628 Adjust callers.
19629 (output_skeleton): Don't look for the skeleton location, let m4 do
19630 that.
19631 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
19632 file will be used.
19633 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
19634 (prepare): Given that for the time being changesyntax is not
19635 usable in M4, rename the muscles using `-' to `_'.
19636 Define `defines_flag', `output_parser_name' and `output_header_name'.
19637 * src/output.h (actions_output, guards_output)
19638 (token_definitions_output): Adjust prototypes.
19639 * src/scan-skel.l: Instead of scanning the skeletons, it now
19640 processes the output of m4: `__oline__' and `#output'.
19641 * data/bison.simple: Adjust to be used by M4(sugar).
19642 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
19643 to date.
19644 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
19645 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
19646 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
19647 shamelessly stolen from CVS Autoconf.
19648
19649 2002-02-05 Akim Demaille <akim@epita.fr>
19650
19651 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
19652 * configure.in: Check for the declarations of free and malloc.
19653 * src/muscle_tab.c: Adjust.
19654
19655 2002-02-05 Akim Demaille <akim@epita.fr>
19656
19657 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
19658 which have no values.
19659
19660 2002-02-05 Akim Demaille <akim@epita.fr>
19661
19662 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
19663 * data/: here.
19664
19665 2002-01-29 Paul Eggert <eggert@twinsun.com>
19666
19667 * src/bison.simple (YYSIZE_T): Do not define merely because
19668 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
19669 On some platforms, <alloca.h> does not declare YYSTD (size_t).
19670
19671 2002-01-27 Akim Demaille <akim@epita.fr>
19672
19673 Fix `%nonassoc and eof'.
19674
19675 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
19676 which were not properly copied! Replace
19677 memcpy (res->errs, src->errs, src->nerrs);
19678 with
19679 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
19680 !!!
19681 * tests/regression.at (%nonassoc and eof): Adjust to newest
19682 Autotest: `.' is not in the PATH.
19683
19684 2002-01-27 Akim Demaille <akim@epita.fr>
19685
19686 * tests/sets.at (AT_EXTRACT_SETS): New.
19687 (Nullable): Use it.
19688 (Firsts): New.
19689
19690 2002-01-26 Akim Demaille <akim@epita.fr>
19691
19692 * tests/actions.at, tests/calc.at, tests/headers.at,
19693 * tests/torture.at: Adjust to the newest Autotest which no longer
19694 forces `.' in the PATH.
19695
19696 2002-01-25 Akim Demaille <akim@epita.fr>
19697
19698 * tests/regression.at (%nonassoc and eof): New.
19699 Suggested by Robert Anisko.
19700
19701 2002-01-24 Akim Demaille <akim@epita.fr>
19702
19703 Bison dumps core when trying to complain about broken input files.
19704 Reported by Cris van Pelt.
19705
19706 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
19707 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
19708 into...
19709 (Invalid inputs): Strengthen: exercise parse_percent_token.
19710
19711 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
19712
19713 * src/Makefile.am: Add bison.c++.
19714 * src/bison.c++: New skeleton.
19715
19716 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
19717
19718 * po/it.po: New.
19719
19720 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
19721
19722 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
19723
19724 2002-01-20 Marc Autret <marc@gnu.org>
19725
19726 * src/files.c (compute_output_file_names): Fix
19727
19728 2002-01-20 Marc Autret <marc@gnu.org>
19729
19730 * tests/output.at: New test.
19731 * src/files.c (compute_base_names): Don't map extensions when
19732 the YACC flag is set, use defaults.
19733 Reported by Evgeny Stambulchik.
19734
19735 2002-01-20 Marc Autret <marc@gnu.org>
19736
19737 * src/system.h: Need to define __attribute__ away for non-GCC
19738 compilers as well (i.e., the vendor C compiler).
19739 Suggested by Albert Chin-A-Young.
19740
19741 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
19742
19743 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
19744 canonical definition.
19745 * src/system.h: Use the canonical definition for PARAMS (avoids
19746 a conflict with the macro from lib/hash.h).
19747
19748 2002-01-11 Akim Demaille <akim@epita.fr>
19749
19750 * configure.in: Use AC_FUNC_STRNLEN.
19751 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
19752
19753 2002-01-09 Akim Demaille <akim@epita.fr>
19754
19755 * src/files.c, src/files.h (output_infix): New.
19756 (tab_extension): Remove.
19757 (compute_base_names): Compute the former, drop the latter.
19758 * src/output.c (prepare): Insert the muscles `output-infix', and
19759 `output-suffix'.
19760 * src/parse-skel.y (string, string.1): New.
19761 (section.header): Use it.
19762 (section.yacc): Remove.
19763 (prefix): Remove too.
19764 * src/scan-skel.l: Adjust.
19765 * src/bison.simple, src/bison.hairy: Adjust.
19766
19767 2002-01-09 Akim Demaille <akim@epita.fr>
19768
19769 * configure.in (WERROR_CFLAGS): Compute it.
19770 * src/Makefile.am (CFLAGS): Pass it.
19771 * tests/atlocal.in (CFLAGS): Idem.
19772 * src/files.c: Fix a few warnings.
19773 (get_extension_index): Remove, unused.
19774
19775 2002-01-08 Akim Demaille <akim@epita.fr>
19776
19777 * src/getargs.c (AS_FILE_NAME): New.
19778 (getargs): Use it to convert DOSish file names.
19779 * src/files.c (base_name): Rename as full_base_name to avoid
19780 clashes with `base_name ()'.
19781 (filename_split): New.
19782 (compute_base_names): N-th rewrite, using filename_split.
19783
19784 2002-01-08 Akim Demaille <akim@epita.fr>
19785
19786 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
19787 New, stolen from the Fileutils 4.1.
19788 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19789 * configure.in: Check for the presence of memrchr, and of its
19790 prototype.
19791
19792 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
19793
19794 * lib/hash.h (__P): Added definition for this macro.
19795 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
19796 BUILT_SOURCES, to ensure they are generated first.
19797 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
19798 %error-verbose to allow bootstrapping with bison 1.30x.
19799
19800 2002-01-06 Akim Demaille <akim@epita.fr>
19801
19802 * src/reader.c (parse_braces): Don't fetch the next char, the
19803 convention is to fetch on entry.
19804 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
19805 'switch' without a following semicolon.
19806 * tests/regression.at (braces parsing): New.
19807
19808 2002-01-06 Akim Demaille <akim@epita.fr>
19809
19810 Bison is dead wrong in its RR conflict reports.
19811
19812 * tests/torture.at (GNU Cim Grammar): New.
19813 * src/conflicts.c (count_rr_conflicts): Fix.
19814
19815 2002-01-06 Akim Demaille <akim@epita.fr>
19816
19817 Creating package.m4 from configure.ac causes too many problems.
19818
19819 * tests/Makefile.am (package.m4): Create it by hand,
19820 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
19821
19822 2002-01-06 Akim Demaille <akim@epita.fr>
19823
19824 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
19825 skeleton.h.
19826
19827 2002-01-04 Paul Eggert <eggert@twinsun.com>
19828
19829 * doc/bison.texinfo (Debugging):
19830 Remove YYSTDERR; it's no longer defined or used.
19831 Also, s/cstdio.h/cstdio/.
19832
19833 2002-01-03 Akim Demaille <akim@epita.fr>
19834
19835 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
19836
19837 2002-01-03 Akim Demaille <akim@epita.fr>
19838
19839 * src/parse-skel.y (process_skeleton): Don't bind the parser's
19840 tracing code to --trace, wait for a better --trace option, with
19841 args.
19842
19843 2002-01-03 Akim Demaille <akim@epita.fr>
19844
19845 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
19846 The ISO C++ standard is extremely clear about it: stderr is
19847 considered a macro, not a regular symbol (see table 94 `Header
19848 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19849 Therefore std:: does not apply to it. It still does with fprintf.
19850 Also, s/cstdio.h/cstdio/.
19851
19852 2002-01-03 Akim Demaille <akim@epita.fr>
19853
19854 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19855 for non system headers.
19856
19857 2002-01-02 Akim Demaille <akim@epita.fr>
19858
19859 Equip the skeleton chain with location tracking, runtime trace,
19860 pure parser and scanner.
19861
19862 * src/parse-skel.y: Request a pure parser, locations, and prefix
19863 renaming.
19864 (%union): Having several members with the same type does not help
19865 type mismatches, simplify.
19866 (YYPRINT, yyprint): New.
19867 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19868 (skel_error): this.
19869 Handle locations.
19870 * src/scan-skel.l: Adjust to these changes.
19871 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19872 (LOCATION_PRINT, skel_control_t): New.
19873
19874 2001-12-30 Akim Demaille <akim@epita.fr>
19875
19876 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19877 replace `gb' with BLANKS.
19878 * src/scan-skel.l: Adjust.
19879
19880 2001-12-30 Akim Demaille <akim@epita.fr>
19881
19882 * src/system.h: We don't need nor want bcopy.
19883 Throw away MS-DOS crap: we don't need getpid.
19884 * configure.in: We don't need strndup. It was even causing
19885 problems: because Flex includes the headers *before* us,
19886 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19887 not visible.
19888 * lib/xstrndup.c: New.
19889 * src/scan-skel.l: Use it.
19890 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19891 * src/parse-skel.y: Use %directives instead of #defines.
19892
19893 2001-12-30 Akim Demaille <akim@epita.fr>
19894
19895 * src/skeleton.h: New.
19896 * src/output.c (output_parser, output_master_parser): Remove, dead
19897 code.
19898 * src/output.h (get_lines_number, actions_output, guards_output)
19899 (token_definitions_output): Prototype them.
19900 * src/parse-skel.y: Add the license notice.
19901 Include output.h and skeleton.h.
19902 (process_skeleton): Returns void, and takes a single parameter.
19903 * src/scan-skel.l: Add the license notice.
19904 Include skeleton.h.
19905 Don't use %option yylineno: it seems that then Flex imagines
19906 REJECT has been used, and therefore it won't reallocate its
19907 buffers (which makes no other sense to me than a bug). It results
19908 in warnings for `unused: yy_flex_realloc'.
19909
19910 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19911
19912 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19913 (MUSCLE_INSERT_PREFIX): ...to there.
19914 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19915 (MUSCLE_INSERT_PREFIX): Move from here...
19916
19917 * src/bison.hairy: Add a section directive. Put braces around muscle
19918 names. This parser skeleton is still broken, but Bison should not
19919 choke on a bad muscle 'syntax'.
19920 * src/bison.simple: Add a section directive. Put braces around muscle
19921 names.
19922
19923 * src/files.h (strsuffix, stringappend): Add declarations.
19924 (tab_extension): Add declaration.
19925 (short_base_name): Add declaration.
19926
19927 * src/files.c (strsuffix, stringappend): No longer static. These
19928 functions are used in the skeleton parser.
19929 (tab_extension): New.
19930 (compute_base_names): Use the computations done in this function
19931 to guess if the generated parsers should have '.tab' in their
19932 names.
19933 (short_base_name): No longer static.
19934
19935 * src/output.c (output_skeleton): New.
19936 (output): Disable call to output_master_parser, and give a try to
19937 a new skeleton handling system.
19938 (guards_output, actions_output): No longer static.
19939 (token_definitions_output, get_lines_number): No longer static.
19940
19941 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19942
19943 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19944 parse-skel.y.
19945
19946 * src/parse-skel.y: New file.
19947 * src/scan-skel.l: New file.
19948
19949 2001-12-29 Akim Demaille <akim@epita.fr>
19950
19951 %name-prefix is broken.
19952
19953 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19954 Adjust all dependencies.
19955 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19956 %name-prefix.
19957
19958 Renaming yylval but not yylloc is not consistent. Now we do.
19959
19960 * src/bison.simple: Prefix yylloc if used.
19961 * doc/bison.texinfo (Decl Summary): Document that.
19962
19963 2001-12-29 Akim Demaille <akim@epita.fr>
19964
19965 * doc/bison.texinfo: Promote `%long-directive' over
19966 `%long_directive'.
19967 Remove all references to fixed-output-files, yacc is enough.
19968
19969 2001-12-29 Akim Demaille <akim@epita.fr>
19970
19971 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19972 user prologue. These are defaults.
19973 * tests/actions.at (Mid-rule actions): Make sure the user can
19974 define YYDEBUG and YYERROR_VERBOSE.
19975
19976 2001-12-29 Akim Demaille <akim@epita.fr>
19977
19978 * src/output.c (header_output): Don't forget to export YYLTYPE and
19979 yylloc.
19980 * tests/headers.at (export YYLTYPE): New, make sure it does.
19981 * tests/regression.at (%union and --defines, Invalid CPP headers):
19982 Move to...
19983 * tests/headers.at: here.
19984
19985 2001-12-29 Akim Demaille <akim@epita.fr>
19986
19987 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19988
19989 2001-12-29 Akim Demaille <akim@epita.fr>
19990
19991 * tests/actions.at (Mid-rule actions): Output on a single line
19992 instead of several.
19993
19994 2001-12-29 Akim Demaille <akim@epita.fr>
19995
19996 * doc/bison.texinfo: Formatting changes.
19997
19998 2001-12-29 Akim Demaille <akim@epita.fr>
19999
20000 Don't store the token defs in a muscle, just be ready to output it
20001 on command. Now possible via `symbols'. Fixes a memory leak.
20002
20003 * src/output.c (token_definitions_output): New.
20004 (output_parser, header_output): Use it.
20005 * src/reader.c (symbols_save): Remove.
20006
20007 2001-12-29 Akim Demaille <akim@epita.fr>
20008
20009 * src/bison.simple: Do not provide a default for YYSTYPE and
20010 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20011 default.
20012
20013 2001-12-29 Akim Demaille <akim@epita.fr>
20014
20015 Mid-rule actions are simply... ignored!
20016
20017 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20018 the empty-rule associated to the dummy symbol, not to the host
20019 rule.
20020 * tests/actions.at (Mid-rule actions): New.
20021
20022 2001-12-29 Akim Demaille <akim@epita.fr>
20023
20024 Memory leak.
20025
20026 * src/reader.c (reader): Free grammar.
20027
20028 2001-12-29 Akim Demaille <akim@epita.fr>
20029
20030 Memory leak.
20031
20032 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20033 since it allocates it for each state, although only one is needed.
20034 (allocate_storage): Do it here.
20035
20036 2001-12-29 Akim Demaille <akim@epita.fr>
20037
20038 * src/options.h, src/options.c (create_long_option_table): Rename
20039 as...
20040 (long_option_table_new): this, with a clearer prototype.
20041 (percent_table): Remove, unused,
20042 * src/getargs.c (getargs): Adjust.
20043
20044 2001-12-29 Akim Demaille <akim@epita.fr>
20045
20046 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20047 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20048 as states.
20049
20050 2001-12-29 Akim Demaille <akim@epita.fr>
20051
20052 * src/lalr.c (build_relations): Rename `states' as `states1'.
20053 Sorry, I don't understand exactly what it is, no better name...
20054
20055 2001-12-29 Akim Demaille <akim@epita.fr>
20056
20057 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20058 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20059 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20060 as rules.
20061
20062 2001-12-29 Akim Demaille <akim@epita.fr>
20063
20064 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20065 ago.
20066
20067 2001-12-29 Akim Demaille <akim@epita.fr>
20068
20069 * src/reader.c, src/reader.h (user_toknums): Remove.
20070 Adjust all users to use symbols[i]->user_token_number.
20071
20072 2001-12-29 Akim Demaille <akim@epita.fr>
20073
20074 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20075 Adjust all users to use symbols[i]->prec or ->assoc.
20076
20077 2001-12-29 Akim Demaille <akim@epita.fr>
20078
20079 * src/reader.c, src/reader.h (tags): Remove.
20080 Adjust all users to use symbols[i]->tag.
20081
20082 2001-12-29 Akim Demaille <akim@epita.fr>
20083
20084 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20085 and rule_table.
20086 * src/reader.c (packsymbols): Fill this table.
20087 Drop sprec.
20088 * src/conflicts.c (resolve_sr_conflict): Adjust.
20089 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20090 single table.
20091 Use symbols[i]->tag instead of tags[i].
20092
20093 2001-12-29 Akim Demaille <akim@epita.fr>
20094
20095 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20096 In addition, put a comment in there, to replace...
20097 * tests/regression.at (%union and C comments): Remove.
20098
20099 2001-12-29 Akim Demaille <akim@epita.fr>
20100
20101 * tests/regression.at (Web2c Actions): Blindly move the actual
20102 output as expected output. The contents *seem* right to me, but I
20103 can't pretend reading perfectly parser tables... Nonetheless, all
20104 the other tests pass correctly, the table look OK, even though the
20105 presence of `$axiom' is to be noted: AFAICS it is useless (but
20106 harmless).
20107
20108 2001-12-29 Akim Demaille <akim@epita.fr>
20109
20110 * src/reader.c (readgram): Don't add the rule 0 if there were no
20111 rules read. In other words, add it _after_ having performed
20112 grammar sanity checks.
20113 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20114
20115 2001-12-29 Akim Demaille <akim@epita.fr>
20116
20117 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20118 visible, and some states have now a different number.
20119
20120 2001-12-29 Akim Demaille <akim@epita.fr>
20121
20122 * src/reader.c (readgram): Bind the initial rule's lineno to that
20123 of the first rule.
20124 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20125 (Solved SR Conflicts): Adjust rule 0's line number.
20126
20127 2001-12-29 Akim Demaille <akim@epita.fr>
20128
20129 Fix the `GAWK Grammar' failure.
20130
20131 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20132 the reductions of the first state which was mistakenly confused
20133 with the final state because precisely final_state was initialized
20134 to 0.
20135 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20136 now noticed by Bison.
20137 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20138 have a reduction on $default.
20139
20140 2001-12-29 Akim Demaille <akim@epita.fr>
20141
20142 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20143 rule line numbers.
20144 * src/closure.c (print_closure): Likewise.
20145 * src/derives.c (print_derives): Likewise.
20146 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20147 now.
20148
20149 2001-12-29 Akim Demaille <akim@epita.fr>
20150
20151 * src/lalr.c (lookaheads_print): New.
20152 (lalr): Call it when --trace-flag.
20153 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20154 are dumped.
20155
20156 2001-12-29 Akim Demaille <akim@epita.fr>
20157
20158 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20159 when walking through ritem, even via rule->rhs.
20160 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20161 (useful_production, useless_nonterminals): Likewise.
20162 (reduce_grammar_tables): Likewise, plus update nritems.
20163 * src/nullable.c (set_nullable): Likewise.
20164 * src/lalr.c (build_relations): Likewise.
20165 * tests/sets.at (Nullable): Adjust.
20166 Fortunately, now, the $axiom is no longer nullable.
20167
20168 2001-12-29 Akim Demaille <akim@epita.fr>
20169
20170 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20171 the 0-sentinel.
20172 * src/gram.c (ritem_longest_rhs): Likewise.
20173 * src/reduce.c (nonterminals_reduce): Likewise.
20174 * src/print_graph.c (print_graph): Likewise.
20175 * src/output.c (output_rule_data): Likewise.
20176 * src/nullable.c (set_nullable): Likewise.
20177
20178 2001-12-29 Akim Demaille <akim@epita.fr>
20179
20180 * src/output.c: Comment changes.
20181
20182 2001-12-27 Paul Eggert <eggert@twinsun.com>
20183
20184 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20185 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20186 Sparc, as they were causing more porting problems than the
20187 (minor) performance improvement was worth.
20188
20189 Also, catch up with 1.31's YYSTD.
20190
20191 2001-12-27 Akim Demaille <akim@epita.fr>
20192
20193 * src/output.c (output_gram): Rely on nritems, not the
20194 0-sentinel. See below.
20195 Use -1 as separator, not 0.
20196 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20197 Rely on -1 as separator in yyrhs, instead of 0.
20198 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20199 twice `Now at end of input', therefore there are two lines less to
20200 expect.
20201
20202 2001-12-27 Akim Demaille <akim@epita.fr>
20203
20204 * tests/regression.at (Unresolved SR Conflicts):
20205 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20206 below.
20207
20208 2001-12-27 Akim Demaille <akim@epita.fr>
20209
20210 * src/LR0.c (new_state): Recognize the final state by the fact it
20211 is reached by eoftoken.
20212 (insert_start_shifting_state, insert_eof_shifting_state)
20213 (insert_accepting_state, augment_automaton): Remove, since now
20214 these states are automatically computed from the initial state.
20215 (generate_states): Adjust.
20216 * src/print.c: When reporting a rule number to the user, substract
20217 1, so that the axiom rule is rule 0, and the first user rule is 1.
20218 * src/reduce.c: Likewise.
20219 * src/print_graph.c (print_core): For the time being, just as for
20220 the report, depend upon --trace-flags to dump the full set of
20221 items.
20222 * src/reader.c (readgram): Once the grammar read, insert the rule
20223 0: `$axiom: START-SYMBOL $'.
20224 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20225 number of the states has changed (the final state is no longer
20226 necessarily the last), catch up.
20227
20228 2001-12-27 Akim Demaille <akim@epita.fr>
20229
20230 Try to make the use of the eoftoken valid. Given that its value
20231 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20232 is used instead of > 0 where appropriate, (ii), depend upon nritems
20233 instead of the 0-sentinel.
20234
20235 * src/gram.h, src/gram.c (nritems): New.
20236 Expected to be duplication of nitems, but for the time being...
20237 * src/reader.c (packgram): Assert nritems and nitems are equal.
20238 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20239 * src/closure.c (print_closure, print_fderives): Likewise.
20240 * src/gram.c (ritem_print): Likewise.
20241 * src/print.c (print_core, print_grammar): Likewise.
20242 * src/print_graph.c: Likewise.
20243
20244 2001-12-27 Akim Demaille <akim@epita.fr>
20245
20246 * src/main.c (main): If there are complains after grammar
20247 reductions, then output the report anyway if requested, then die.
20248 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20249 * src/reader.c (eoftoken): New.
20250 (parse_token_decl): If the token being defined has value `0', it
20251 is the eoftoken.
20252 (packsymbols): No longer hack `tags' to insert `$' by hand.
20253 Be sure to preserve the value of the eoftoken.
20254 (reader): Make sure eoftoken is defined.
20255 Initialize nsyms to 0: now eoftoken is created just like the others.
20256 * src/print.c (print_grammar): Don't special case the eof token.
20257 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20258 lie anyway, albeit pleasant.
20259 * tests/calc.at: Exercise error messages with eoftoken.
20260 Change the grammar so that empty input is invalid.
20261 Adjust expectations.
20262 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20263
20264 2001-12-27 Akim Demaille <akim@epita.fr>
20265
20266 * configure.in: Check the protos of strchr ans strspn.
20267 Replace strchr if needed.
20268 * src/system.h: Provide the protos of strchr, strspn and memchr if
20269 missing.
20270 * lib/strchr.c: New.
20271 * src/reader.c (symbols_save): Use strchr.
20272
20273 2001-12-27 Akim Demaille <akim@epita.fr>
20274
20275 * src/print.c, src/print_graph.c (escape): New.
20276 Use it to quote the TAGS outputs.
20277 * src/print_graph.c (print_state): Now errors are in red, and
20278 reductions in green.
20279 Prefer high to wide: output the state number on a line of its own.
20280
20281 2001-12-27 Akim Demaille <akim@epita.fr>
20282
20283 * src/state.h, src/state.c (reductions_new): New.
20284 * src/LR0.c (set_state_table): Let all the states have a
20285 `reductions', even if reduced to 0.
20286 (save_reductions): Adjust.
20287 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20288 * src/print.c (print_reductions, print_actions): Adjust.
20289 * src/output.c (action_row): Adjust.
20290
20291 2001-12-27 Akim Demaille <akim@epita.fr>
20292
20293 * src/state.h, src/state.c (errs_new, errs_dup): New.
20294 * src/LR0.c (set_state_table): Let all the states have an errs,
20295 even if reduced to 0.
20296 * src/print.c (print_errs, print_reductions): Adjust.
20297 * src/output.c (output_actions, action_row): Adjust.
20298 * src/conflicts.c (resolve_sr_conflict): Adjust.
20299
20300 2001-12-27 Akim Demaille <akim@epita.fr>
20301
20302 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20303
20304 2001-12-27 Akim Demaille <akim@epita.fr>
20305
20306 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20307 * src/print.c: here.
20308 (lookaheadset, shiftset): New, used as additional storage by
20309 print_reductions.
20310 (print_results): Adjust.
20311 (print_shifts, print_gotos, print_errs): New, extracted from...
20312 (print_actions): here.
20313 * src/print_graph.c (print_actions): Remove dead code.
20314
20315 2001-12-27 Akim Demaille <akim@epita.fr>
20316
20317 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20318 `$n' and `@n'.
20319
20320 2001-12-27 Akim Demaille <akim@epita.fr>
20321
20322 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20323 (build_relations): Adjust.
20324
20325 2001-12-27 Akim Demaille <akim@epita.fr>
20326
20327 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20328 duplication.
20329
20330 2001-12-27 Akim Demaille <akim@epita.fr>
20331
20332 * src/reader.c (packgram): Catch nitems overflows.
20333
20334 2001-12-27 Akim Demaille <akim@epita.fr>
20335
20336 * src/files.c, src/files.h (guard_obstack): Remove.
20337 * src/output.c (output): Adjust.
20338 * src/reader.c (parse_braces): New, factoring...
20339 (copy_action, copy_guard): these two which are renamed as...
20340 (parse_action, parse_guard): these.
20341 As a voluntary consequence, using braces around guards is now
20342 mandatory.
20343
20344 2001-12-27 Akim Demaille <akim@epita.fr>
20345
20346 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20347 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20348 members.
20349 (symbol_list_new): Adjust.
20350 (copy_action): action_line is the first line, not the last.
20351 (copy_guard): Just as for actions, store the `action' only, not
20352 the switch/case/break flesh.
20353 Don't parse the user action that might follow the guard, let...
20354 (readgram): do it, i.e., now, there can be an action after a
20355 guard.
20356 In other words the guard is just explicitly optional.
20357 (packgram): Adjust.
20358 * src/output.c (guards_output): New.
20359 (output_parser): Call it when needed.
20360 (output): Also free the guard and attrs obstacks.
20361 * src/files.c, src/files.h (obstack_save): Remove.
20362 (output_files): Remove.
20363 As a result, if one needs the former `.act' file, using an
20364 appropriate skeleton which requires actions and guards is now
20365 required.
20366 * src/main.c (main): Adjust.
20367 * tests/semantic.at: New.
20368 * tests/regression.at: Use `input.y' as input file name.
20369 Avoid 8+3 problems by requiring input.c when the test needs the
20370 parser.
20371
20372 2001-12-27 Akim Demaille <akim@epita.fr>
20373
20374 * src/reader.c (symbol_list_new): Be sure to initialize all the
20375 fields.
20376
20377 2001-12-27 Akim Demaille <akim@epita.fr>
20378
20379 All the hacks using a final pseudo state are now useless.
20380
20381 * src/LR0.c (set_state_table): state_table holds exactly nstates.
20382 * src/lalr.c (nLA): New.
20383 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
20384 instead of lookaheadsp from the pseudo state (nstate + 1).
20385
20386 2001-12-27 Akim Demaille <akim@epita.fr>
20387
20388 * src/output.c (action_row, token_actions): Use a state_t instead
20389 of a integer, and nlookaheads instead of the following state's
20390 lookaheadsp.
20391
20392 2001-12-27 Akim Demaille <akim@epita.fr>
20393
20394 * src/conflicts.c (log_resolution, flush_shift)
20395 (resolve_sr_conflict, set_conflicts, solve_conflicts)
20396 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
20397 (conflicts_print, print_reductions): Use a state_t instead of an
20398 integer when referring to a state.
20399 As much as possible, depend upon nlookaheads, instead of the
20400 `lookaheadsp' member of the following state (since lookaheads of
20401 successive states are successive, the difference between state n + 1
20402 and n served as the number of lookaheads for state n).
20403 * src/lalr.c (add_lookback_edge): Likewise.
20404 * src/print.c (print_core, print_actions, print_state)
20405 (print_results): Likewise.
20406 * src/print_graph.c (print_core, print_actions, print_state)
20407 (print_graph): Likewise.
20408 * src/conflicts.h: Adjust.
20409
20410 2001-12-27 Akim Demaille <akim@epita.fr>
20411
20412 * src/bison.hairy: Formatting/comment changes.
20413 ANSIfy.
20414 Remove `register' indications.
20415 Add plenty of `static'.
20416
20417 2001-12-27 Akim Demaille <akim@epita.fr>
20418
20419 * src/output.c (prepare): Drop the muscle `ntbase' which
20420 duplicates ntokens.
20421 * src/bison.simple: Formatting/comment changes.
20422 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
20423 is an undocumented synonym.
20424
20425 2001-12-22 Akim Demaille <akim@epita.fr>
20426
20427 * src/output.c (output_table_data): Change the prototype to use
20428 `int' for array ranges: some invocations do pass an int, not a
20429 short.
20430 Reported by Wayne Green.
20431
20432 2001-12-22 Akim Demaille <akim@epita.fr>
20433
20434 Some actions of web2c.y are improperly triggered.
20435 Reported by Mike Castle.
20436
20437 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
20438 * tests/regression.at (Web2c): Rename as...
20439 (Web2c Report): this.
20440 (Web2c Actions): New.
20441
20442 2001-12-22 Akim Demaille <akim@epita.fr>
20443
20444 Reductions in web2c.y are improperly reported.
20445 Reported by Mike Castle.
20446
20447 * src/conflicts.c (print_reductions): Fix.
20448 * tests/regression.at (Web2c): New.
20449
20450 2001-12-18 Akim Demaille <akim@epita.fr>
20451
20452 Some host fail on `assert (!"foo")', which expands to
20453 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
20454 Reported by Nelson Beebee.
20455
20456 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
20457 `#define it_succeeded 0' and `assert (it_succeeded)'.
20458
20459 2001-12-17 Marc Autret <autret_m@epita.fr>
20460
20461 * src/bison.simple: Don't hard code the skeleton line and filename.
20462 * src/output.c (output_parser): Rename 'line' as 'output_line'.
20463 New line counter 'skeleton_line' (skeleton-line muscle).
20464
20465 2001-12-17 Paul Eggert <eggert@twinsun.com>
20466
20467 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
20468 YYDEBUG must be defined to a nonzero value.
20469
20470 * src/bison.simple (yytname): Do not assume that the user defines
20471 YYDEBUG to a properly parenthesized expression.
20472
20473 2001-12-17 Akim Demaille <akim@epita.fr>
20474
20475 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
20476 nlookaheads is a new member.
20477 Adjust all users.
20478 * src/lalr.h (nlookaheads): Remove this orphan declaration.
20479 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
20480 state.
20481
20482 2001-12-17 Akim Demaille <akim@epita.fr>
20483
20484 * src/files.h, src/files.c (open_files, close_files): Remove.
20485 * src/main.c (main): Don't open/close files, nor invoke lex_free,
20486 let...
20487 * src/reader.c (reader): Do it.
20488
20489 2001-12-17 Akim Demaille <akim@epita.fr>
20490
20491 * src/conflicts.c (print_reductions): Formatting changes.
20492
20493 2001-12-17 Akim Demaille <akim@epita.fr>
20494
20495 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
20496 (flush_reduce): New.
20497 (resolve_sr_conflict): Adjust.
20498
20499 2001-12-17 Akim Demaille <akim@epita.fr>
20500
20501 * src/output.c (output_obstack): Be static and rename as...
20502 (format_obstack): this, to avoid any confusion with files.c's
20503 output_obstack.
20504 * src/reader.h (muscle_obstack): Move to...
20505 * src/output.h: here, since it's defined in output.c.
20506
20507 2001-12-17 Akim Demaille <akim@epita.fr>
20508
20509 * src/output.c (action_row, save_column, default_goto)
20510 (sort_actions, matching_state, pack_vector): Better variable
20511 locality.
20512
20513 2001-12-17 Akim Demaille <akim@epita.fr>
20514
20515 * src/output.c: Various formatting changes.
20516
20517 2001-12-17 Akim Demaille <akim@epita.fr>
20518
20519 * src/files.c (output_files): Free the output_obstack.
20520 * src/main.c (main): Call print and print_graph conditionally.
20521 * src/print.c (print): Work unconditionally.
20522 * src/print_graph.c (print_graph): Work unconditionally.
20523 * src/conflicts.c (log_resolution): Output only if verbose_flag.
20524
20525 2001-12-16 Marc Autret <autret_m@epita.fr>
20526
20527 * src/output.c (actions_output): Fix. When we use %no-lines,
20528 there is one less line per action.
20529
20530 2001-12-16 Marc Autret <autret_m@epita.fr>
20531
20532 * src/bison.simple: Remove a useless #line directive.
20533 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
20534 * src/output.c (get_lines_number): New.
20535 (output_parser): Adjust, now takes care about the lines of a
20536 output muscles.
20537 Fix line numbering.
20538 (actions_output): Computes the number of lines taken by actions.
20539 (output_master_parser): Insert new skeleton which is the name of
20540 the output parser file name.
20541
20542 2001-12-15 Marc Autret <autret_m@epita.fr>
20543
20544 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
20545
20546 2001-12-15 Marc Autret <autret_m@epita.fr>
20547
20548 * src/output.c (output_gram): Keep track of the hairy one.
20549
20550 2001-12-15 Akim Demaille <akim@epita.fr>
20551
20552 Make `make distcheck' work.
20553
20554 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
20555 system.h which uses libgettext.h.
20556
20557 2001-12-15 Akim Demaille <akim@epita.fr>
20558
20559 * src/nullable.c (set_nullable): Useless rules must be skipped,
20560 otherwise, since we range over their symbols, we might look at a
20561 nonterminal which no longer ``exists'', i.e., it is not counted in
20562 `nvars', hence we overflow our arrays.
20563
20564 2001-12-15 Akim Demaille <akim@epita.fr>
20565
20566 The header can also be produced directly, without any obstack!
20567 Yahoo!
20568
20569 * src/files.c, src/files.h (defines_obstack): Remove.
20570 (compute_header_macro): Global.
20571 (defines_obstack_save): Remove.
20572 * src/reader.c (parse_union_decl): No longer output to
20573 defines_obstack: its content can be found in the `stype' muscle
20574 anyway.
20575 (output_token_translations): Merge into...
20576 (symbols_output): this.
20577 Rename as...
20578 (symbols_save): this.
20579 (reader): Adjust.
20580 * src/output.c (header_output): New.
20581 (output): Call it.
20582
20583 2001-12-15 Akim Demaille <akim@epita.fr>
20584
20585 * src/reader.c (parse_union_decl): Instead of handling two obstack
20586 simultaneously, use one to define the `stype' muscle, and use the
20587 value of the latter to fill defines_obstack.
20588 (copy_comment): Remove.
20589 (copy_comment2): Work for a single obstack.
20590 Rename as...
20591 (copy_comment): this.
20592
20593 2001-12-15 Akim Demaille <akim@epita.fr>
20594
20595 * src/lex.c, src/lex.h (xgetc): No longer static.
20596 * src/reader.c (parse_union_decl): Revamp.
20597
20598 2001-12-15 Akim Demaille <akim@epita.fr>
20599
20600 Still making progress in separating Bison into (i) input, (ii)
20601 process, (iii) output: now we can directly output the parser file
20602 without using table_obstack at all.
20603
20604 * src/files.c, src/files.h (table_obstack): Bye bye.
20605 (parser_file_name): New.
20606 * src/files.c (compute_output_file_names): Compute it.
20607 * src/output.c (actions_output, output_parser)
20608 (output_master_parser): To a file instead of an obstack.
20609
20610 2001-12-15 Akim Demaille <akim@epita.fr>
20611
20612 Attach actions to rules, instead of pre-outputting them to
20613 actions_obstack.
20614
20615 * src/gram.h (rule_t): action and action_line are new members.
20616 * src/reader.c (symbol_list): Likewise.
20617 (copy_action): Save the actions within the rule.
20618 (packgram): Save them in rule_table.
20619 * src/output.c (actions_output): New.
20620 (output_parser): Use it on `%%actions'.
20621 (output_rule_data): Don't free rule_table.
20622 (output): Do it.
20623 (prepare): Don't save the `action' muscle.
20624 * src/bison.simple: s/%%action/%%actions/.
20625
20626 2001-12-15 Akim Demaille <akim@epita.fr>
20627
20628 * src/reader.c (copy_action): When --yacc, don't append a `;'
20629 to the user action: let it fail if lacking.
20630 Suggested by Arnold Robbins and Tom Tromey.
20631
20632 2001-12-14 Akim Demaille <akim@epita.fr>
20633
20634 * src/lex.c (literalchar): Simply return the char you decoded, non
20635 longer mess around with obstacks and int pointers.
20636 Adjust all callers.
20637
20638 2001-12-14 Akim Demaille <akim@epita.fr>
20639
20640 * src/lex.c (literalchar): Don't escape the special characters,
20641 just decode them, and keep them as char (before, eol was output as
20642 the 2 char string `\n' etc.).
20643 * src/output.c (output_rule_data): Use quotearg to output the
20644 token strings.
20645
20646 2001-12-13 Paul Eggert <eggert@twinsun.com>
20647
20648 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
20649 Do not infringe on the global user namespace when using C++.
20650 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
20651 All uses of `fprintf' and `stderr' changed.
20652
20653 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
20654
20655 2001-12-13 Akim Demaille <akim@epita.fr>
20656
20657 The computation of nullable is broken: it doesn't handle empty
20658 RHS's properly.
20659
20660 * tests/torture.at (GNU AWK Grammar): New.
20661 * tests/sets.at (Nullable): New.
20662 * src/nullable.c (set_nullable): Instead of blindly looping over
20663 `ritems', loop over the rules, and then over their rhs's.
20664
20665 Work around Autotest bugs.
20666
20667 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
20668 frame, because Autotest understand lines starting with a `+' as
20669 traces from the shell. Then, they are not processed properly.
20670 Admittedly an Autotest bug, but we don't have time to wait for
20671 Autotest to catch up.
20672 * tests/regression.at (Broken Closure): Adjust to the new table
20673 frames.
20674 Move to...
20675 * tests/sets.at: here.
20676
20677 2001-12-13 Akim Demaille <akim@epita.fr>
20678
20679 * src/closure.c (closure): Use nrules instead of playing tricks
20680 with BITS_PER_WORD.
20681
20682 2001-12-13 Akim Demaille <akim@epita.fr>
20683
20684 * src/print.c (print_actions): Output the handling of `$' as the
20685 traces do: shifting the token EOF. Before EOF was treated as a
20686 nonterminal.
20687 * tests/regression.at: Adjust some tests.
20688 * src/print_graph.c (print_core): Complete the set of items via
20689 closure. The next-to-final and final states are still unsatisfying,
20690 but that's to be addressed elsewhere.
20691 No longer output the rule numbers, but do output the state number.
20692 A single loop for the shifts + gotos is enough, but picked a
20693 distinct color for each.
20694 (print_graph): Initialize and finalize closure.
20695
20696 2001-12-13 Akim Demaille <akim@epita.fr>
20697
20698 * src/reader.c (readgram): Remove dead code, an strip useless
20699 braces.
20700 (get_type): Remove, unused.
20701
20702 2001-12-12 Akim Demaille <akim@epita.fr>
20703
20704 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
20705 on that of lib/error.c.
20706
20707 2001-12-12 Akim Demaille <akim@epita.fr>
20708
20709 Some hosts don't like `/' in includes.
20710
20711 * src/system.h: Include libgettext.h without qualifying the path.
20712 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
20713 $(top_srcdir).
20714
20715 2001-12-11 Marc Autret <autret_m@epita.fr>
20716
20717 * src/output.c (output_parser): Remove useless muscle.
20718
20719 2001-12-11 Marc Autret <autret_m@epita.fr>
20720
20721 * src/bison.simple: Remove #line just before %%epilogue. It
20722 is now handled in ...
20723 * src/reader.c (read_additionnal_code): Add the output of a
20724 #line for the epilogue.
20725
20726 2001-12-10 Marc Autret <autret_m@epita.fr>
20727
20728 * src/reader.c (copy_definition): Re-use CPP-outed code which
20729 replace precedent remove.
20730 * src/bison.simple: Remove #line before %%prologue because
20731 %%input-line is wrong at this time.
20732
20733 2001-12-10 Marc Autret <autret_m@epita.fr>
20734
20735 * src/reader.c (symbols_output): Clean up.
20736 * src/output.c (output_gram, output): Clean up.
20737
20738 2001-12-10 Akim Demaille <akim@epita.fr>
20739
20740 * src/lalr.c (initialize_lookaheads): New. Extracted from...
20741 * src/LR0.c (set_state_table): here.
20742 * src/lalr.c (lalr): Call it.
20743
20744 2001-12-10 Akim Demaille <akim@epita.fr>
20745
20746 * src/state.h (shifts): Remove the `number' member: shifts are
20747 attached to state, hence no longer need to be labelled with a
20748 state number.
20749
20750 2001-12-10 Akim Demaille <akim@epita.fr>
20751
20752 Now that states have a complete set of members, the linked list of
20753 shifts is useless: just fill directly the state's shifts member.
20754
20755 * src/state.h (shifts): Remove the `next' member.
20756 * src/LR0.c (first_state, last_state): Remove.
20757 Adjust the callers.
20758 (augment_automaton): Don't look for the shifts that must be added
20759 a shift on EOF: it is those of the state we looked for! But now,
20760 since shifts are attached, it is no longer needed to looking
20761 merely by its id: its number.
20762
20763 2001-12-10 Akim Demaille <akim@epita.fr>
20764
20765 * src/LR0.c (augment_automaton): Better variable locality.
20766 Remove an impossible branch: if there is a state corresponding to
20767 the start symbol being shifted, then there is shift for the start
20768 symbol from the initial state.
20769
20770 2001-12-10 Akim Demaille <akim@epita.fr>
20771
20772 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
20773 only when appropriate: when insert_start_shifting_state' is not
20774 invoked.
20775 * tests/regression.at (Rule Line Numbers): Adjust.
20776
20777 2001-12-10 Akim Demaille <akim@epita.fr>
20778
20779 * src/LR0.c (augment_automaton): Now that all states have shifts,
20780 merge the two cases addition shifts to the initial state.
20781
20782 2001-12-10 Akim Demaille <akim@epita.fr>
20783
20784 * src/lalr.c (set_state_table): Move to...
20785 * src/LR0.c: here.
20786 * src/lalr.c (lalr): Don't call it...
20787 * src/LR0.c (generate_states): do it.
20788 * src/LR0.h (first_state): Remove, only the table is used.
20789
20790 2001-12-10 Akim Demaille <akim@epita.fr>
20791
20792 * src/LR0.h (first_shift, first_reduction): Remove.
20793 * src/lalr.c: Don't use first_shift: find shifts through the
20794 states.
20795
20796 2001-12-10 Akim Demaille <akim@epita.fr>
20797
20798 * src/LR0.c: Attach shifts to states as soon as they are
20799 computed.
20800 * src/lalr.c (set_state_table): Instead of assigning shifts to
20801 state, just assert that the mapping was properly done.
20802
20803 2001-12-10 Akim Demaille <akim@epita.fr>
20804
20805 * src/LR0.c (insert_start_shift): Rename as...
20806 (insert_start_shifting_state): this.
20807 (insert_eof_shifting_state, insert_accepting_state): New.
20808 (augment_automaton): Adjust.
20809 Better locality of the variables.
20810 When looking if the start_symbol is shifted from the initial
20811 state, using `while (... symbol != start_symbol ...)' sounds
20812 better than `while (... symbol < start_symbol ...)': If fail
20813 to see how the order between symbols could be relevant!
20814
20815 2001-12-10 Akim Demaille <akim@epita.fr>
20816
20817 * src/getargs.h: Don't declare `spec_name_prefix' and
20818 `spec_file_prefix', declared by src/files.h.
20819 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
20820 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
20821 * src/output.c (prepare): Adjust.
20822 * src/reader.c (symbols_output): Likewise.
20823 * src/vmsgetargs.c: Vaguely adjust, but who cares?
20824
20825 2001-12-10 Akim Demaille <akim@epita.fr>
20826
20827 * src/muscle_tab.c (muscle_init): NULL is a better default than
20828 `"0"'.
20829
20830 2001-12-10 Akim Demaille <akim@epita.fr>
20831
20832 * src/reader.c (reader): Calling symbols_output once is enough.
20833
20834 2001-12-10 Akim Demaille <akim@epita.fr>
20835
20836 Now that states have a complete set of members, the linked list of
20837 reductions is useless: just fill directly the state's reductions
20838 member.
20839
20840 * src/state.h (struct reductions): Remove member `number' and
20841 `next'.
20842 * src/LR0.c (first_reduction, last_reduction): Remove.
20843 (save_reductions): Don't link the new reductions, store them in
20844 this_state.
20845 * src/lalr.c (set_state_table): No need to attach reductions to
20846 states, it's already done.
20847 * src/output.c (output_actions): No longer free the shifts, then
20848 the reductions, then the states: free all the states and their
20849 members.
20850
20851 2001-12-10 Akim Demaille <akim@epita.fr>
20852
20853 * src/options.c (OPTN, DRTV, BOTH): New.
20854 (option_table): Use them.
20855
20856 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20857 the job of system.h.
20858 * src/options.c: Don't include stdio.h and xalloc.h for the same
20859 reasons.
20860
20861 2001-12-10 Akim Demaille <akim@epita.fr>
20862
20863 * src/output.c (output, prepare): Make sure the values of the
20864 muscles `action' and `prologue' are 0-terminated.
20865
20866 2001-12-10 Akim Demaille <akim@epita.fr>
20867
20868 Clean up GCC warnings.
20869
20870 * src/reader.c (copy_action): `buf' is not used.
20871 (parse_skel_decl): Be static.
20872 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20873 * src/options.h (create_long_option_table): Have a real prototype.
20874 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20875 (hash_delete_at): Return const void *.
20876 Adjust casts to preserve the const.
20877
20878 2001-12-10 Akim Demaille <akim@epita.fr>
20879
20880 * configure.in: Require 2.52g.
20881 M4 is not needed, but AUTOM4TE is.
20882 * m4/m4.m4: Remove.
20883 * tests/Makefile.am: Adjust.
20884
20885 2001-12-10 Akim Demaille <akim@epita.fr>
20886
20887 One structure for states is enough, even though theoretically
20888 there are LR(0) states and LALR(1) states.
20889
20890 * src/lalr.h (state_t): Remove.
20891 (state_table): Be state_t **, not state_t *.
20892 * src/state.h (core, CORE_ALLOC): Rename as...
20893 (state_t, STATE_ALLOC): this.
20894 Add the LALR(1) members: shifts, reductions, errs.
20895 * src/LR0.c (state_table): Rename as...
20896 (state_hash): this, to avoid name clashes with the global
20897 `state_table'.
20898 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20899 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20900
20901 2001-12-10 Akim Demaille <akim@epita.fr>
20902
20903 Bison dumps core on bash.y.
20904 Reported by Pascal Bart.
20905
20906 * src/warshall.c (bitmatrix_print): New.
20907 (TC): Use it.
20908 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20909 j must be the outer loop.
20910 * tests/regression.at (Broken Closure): New.
20911
20912 2001-12-05 Akim Demaille <akim@epita.fr>
20913
20914 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20915 its argument.
20916 Reported by Peter Hamorsky.
20917
20918 2001-12-05 Akim Demaille <akim@epita.fr>
20919
20920 * src/conflicts.c (err_table): Remove.
20921 (resolve_sr_conflict): Adjust.
20922 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20923 Rename as...
20924 (state_t.reductions, state_t.shifts): this.
20925
20926 2001-12-05 Akim Demaille <akim@epita.fr>
20927
20928 * src/reduce.c (reduce_grammar_tables): No longer disable the
20929 removal of useless rules via CPP but via `if (0)', so that the
20930 compiler still check the code is valid.
20931 For instance, it should have noticed `rline' no longer exists: use
20932 the `line' member of rule_t.
20933 * src/gram.c (dummy, rline): Remove, unused.
20934
20935 2001-12-05 Akim Demaille <akim@epita.fr>
20936
20937 * src/output.c (pack_vector): Use assert, not berror.
20938 * src/main.c (berror): Remove, unused.
20939
20940 2001-12-05 Akim Demaille <akim@epita.fr>
20941
20942 New experimental feature: if --verbose --trace output all the
20943 items of a state, not only its kernel.
20944
20945 * src/print.c (print_core): If `trace_flag', then invoke closure
20946 before outputting the items of the state (print_core is no longer
20947 a correct name them).
20948 (print_results): Invoke new_closure/free_closure if needed.
20949
20950 2001-12-05 Akim Demaille <akim@epita.fr>
20951
20952 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20953 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20954 (nitemset): for consistency with the rest of the project.
20955
20956 2001-12-05 Akim Demaille <akim@epita.fr>
20957
20958 * src/closure.c (print_closure): Improve.
20959 (closure): Use it for printing input and output.
20960
20961 2001-12-05 Akim Demaille <akim@epita.fr>
20962
20963 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20964 indexed by nonterminals.
20965
20966 2001-12-05 Akim Demaille <akim@epita.fr>
20967
20968 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20969 what it was!).
20970 * src/warshall.h: Remove accidental duplication of the content.
20971
20972 2001-12-05 Akim Demaille <akim@epita.fr>
20973
20974 * src/closure.c (set_fderives): De-obfuscate.
20975
20976 2001-12-05 Akim Demaille <akim@epita.fr>
20977
20978 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20979
20980 2001-12-05 Akim Demaille <akim@epita.fr>
20981
20982 * src/closure.c (set_firsts): De-obfuscate.
20983
20984 2001-12-05 Akim Demaille <akim@epita.fr>
20985
20986 * src/output.c (action_row): De-obfuscate
20987 using the good o' techniques: arrays not pointers, variable
20988 locality, BITISSET, RESETBIT etc.
20989
20990 2001-12-05 Akim Demaille <akim@epita.fr>
20991
20992 Pessimize the code to simplify it: from now on, all the states
20993 have a valid SHIFTS, which NSHIFTS is possibly 0.
20994
20995 * src/LR0.c (shifts_new): Be global and move to..
20996 * src/state.c, src/state.h: here.
20997 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20998 * src/print_graph: Adjust.
20999
21000 2001-12-05 Akim Demaille <akim@epita.fr>
21001
21002 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21003 * src/conflicts.c: Use it.
21004 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21005 incorrectly ``simplified''.
21006
21007 2001-12-05 Akim Demaille <akim@epita.fr>
21008
21009 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21010 using the good o' techniques: arrays not pointers, variable
21011 locality, BITISSET, RESETBIT etc.
21012
21013 2001-12-05 Akim Demaille <akim@epita.fr>
21014
21015 * src/state.h (SHIFT_SYMBOL): New.
21016 * src/conflicts.c: Use it to deobfuscate.
21017
21018 2001-12-05 Akim Demaille <akim@epita.fr>
21019
21020 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21021 (print_reductions): De-obfuscate using the good o' techniques:
21022 arrays not pointers, variable locality, BITISSET.
21023
21024 2001-12-05 Akim Demaille <akim@epita.fr>
21025
21026 * src/conflicts.c (print_reductions): Arrays, not pointers.
21027 Use BITISSET.
21028
21029 2001-12-05 Akim Demaille <akim@epita.fr>
21030
21031 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21032
21033 2001-12-05 Akim Demaille <akim@epita.fr>
21034
21035 * src/conflicts.c (print_reductions): Improve variable locality.
21036
21037 2001-12-05 Akim Demaille <akim@epita.fr>
21038
21039 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21040
21041 2001-12-05 Akim Demaille <akim@epita.fr>
21042
21043 * src/conflicts.c (print_reductions): Improve variable locality.
21044
21045 2001-12-05 Akim Demaille <akim@epita.fr>
21046
21047 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21048 * src/lalr.c: Use them.
21049
21050 2001-12-05 Akim Demaille <akim@epita.fr>
21051
21052 * src/LR0.c (augment_automaton): Formatting changes.
21053 Better variable locality.
21054
21055 2001-12-05 Akim Demaille <akim@epita.fr>
21056
21057 * src/lalr.c (matrix_print): New.
21058 (transpose): Use it.
21059 Use arrays instead of pointers.
21060
21061 2001-12-05 Akim Demaille <akim@epita.fr>
21062
21063 * src/lalr.c (maxrhs): Move to...
21064 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21065 * src/lalr.c (build_relations): Adjust.
21066
21067 2001-12-05 Akim Demaille <akim@epita.fr>
21068
21069 * src/lalr.c (transpose): Free the memory allocated to the
21070 argument, as it is replaced by the results by the unique caller.
21071 (build_relations): Merely invoke transpose: it handles the memory
21072 deallocation.
21073 Improve variable locality.
21074 Avoid variables used as mere abbreviations.
21075 (compute_lookaheads): Use arrays instead of pointers.
21076
21077 2001-12-05 Akim Demaille <akim@epita.fr>
21078
21079 * src/lalr.c (initialize_F): Improve variable locality.
21080 Avoid variables used as mere abbreviations.
21081
21082 2001-12-05 Akim Demaille <akim@epita.fr>
21083
21084 * src/derives.c (print_derives): Display the ruleno.
21085 * src/lalr.c (initialize_F, transpose): Better variable locality
21086 to improve readability.
21087 Avoid variables used as mere abbreviations.
21088
21089 2001-12-05 Akim Demaille <akim@epita.fr>
21090
21091 * src/lalr.c (traverse): Use arrays instead of pointers.
21092
21093 2001-12-05 Akim Demaille <akim@epita.fr>
21094
21095 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21096 the handling of squeue.
21097 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21098
21099 2001-12-05 Akim Demaille <akim@epita.fr>
21100
21101 Because useless nonterminals are now kept alive (instead of being
21102 `destroyed'), we now sometimes examine them, and store information
21103 related to them. Hence we need to know their number, and adjust
21104 memory allocations.
21105
21106 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21107 static.
21108 * src/LR0.c (allocate_itemsets): The memory allocated to
21109 `symbol_count' was used for two different purpose: once to count
21110 the number of occurrences of each symbol, and later reassigned to
21111 `shift_symbol', containing the symbol that can be shifted from a
21112 given state.
21113 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21114 only, and...
21115 (new_itemsets): Allocate `shift_symbol' here.
21116 (allocate_itemsets): symbol_count includes useless nonterminals.
21117 Make room for them.
21118 (free_storage): Use `free', not `XFREE', for pointers that cannot
21119 be null.
21120
21121 2001-12-05 Akim Demaille <akim@epita.fr>
21122
21123 * src/nullable.c (set_nullable): Deobfuscate the handling of
21124 ritem.
21125 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21126
21127 2001-12-05 Akim Demaille <akim@epita.fr>
21128
21129 * src/gram.c, src/gram.h (ritem_print): New.
21130 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21131 (This useless function was defined only to work around VMS linkers
21132 that can't handle compilation units with variables only).
21133 * src/reduce.c (dump_grammar): Use it to trace the construction of
21134 ritem.
21135
21136 2001-12-04 Paul Eggert <eggert@twinsun.com>
21137
21138 * src/bison.simple (union yyalloc): Change member names
21139 to be the same as the stack names.
21140 (yyparse): yyptr is now union yyalloc *, not char *.
21141 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21142 and may generate better code on some machines.
21143 (yystpcpy): Use prototype if __STDC__ is defined, not just
21144 if __cplusplus is defined.
21145
21146 2001-11-30 Akim Demaille <akim@epita.fr>
21147
21148 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21149 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21150 Gettext doesn't compile cleanly, and dies with -Werror.
21151 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21152 Include WARNING_CFLAGS here.
21153 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21154 before being defined.
21155
21156 2001-11-27 Paul Eggert <eggert@twinsun.com>
21157
21158 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21159 First arg is int, not unsigned.
21160 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21161 (SIZE_MAX, UINT_MAX): New macros.
21162 (quotearg_n_options): Abort if N is negative.
21163 Avoid overflow check on hosts where size_t is 64 bits and int
21164 is 32 bits, as overflow is impossible there.
21165 Fix off-by-one typo that caused unnecessary reallocation.
21166
21167 2001-11-29 Paul Eggert <eggert@twinsun.com>
21168
21169 Name space cleanup in generated parser.
21170
21171 * doc/bison.texinfo (Bison Parser): Discuss system headers
21172 and their effect on the user name space.
21173
21174 * src/bison.simple:
21175 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21176 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21177 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21178
21179 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21180 on user names when possible.
21181
21182 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21183 Simplify test for whather <alloca.h> exists.
21184
21185 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21186
21187 (<stdio.h>): Include if YYDEBUG.
21188
21189 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21190 ! defined (yyoverflow) && ! defined (yymemcpy).
21191
21192 (yymemcpy, yyparse): Rename local variables as needed so that
21193 they all begin with 'yy'.
21194
21195 (yystrlen, yystpcpy): New functions.
21196
21197 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21198 All uses changed.
21199
21200 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21201 instead of relying on string.h functions. Use YYSTACK_ALLOC
21202 and YYSTACK_FREE instead of malloc and free.
21203
21204 2001-11-30 Akim Demaille <akim@epita.fr>
21205
21206 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21207 before their first uses.
21208 (YYBISON, YYPURE): Move to the top of the output.
21209
21210 2001-11-30 Akim Demaille <akim@epita.fr>
21211
21212 * tests/reduce.at (Useless Nonterminals): Fix.
21213
21214 2001-11-30 Akim Demaille <akim@epita.fr>
21215
21216 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21217 if body instead of `;' to pacify GCC's warnings.
21218
21219 2001-11-30 Akim Demaille <akim@epita.fr>
21220
21221 Instead of mapping the LHS of unused rules to -1, keep the LHS
21222 valid, but flag the rules as invalid.
21223
21224 * src/gram.h (rule_t): `useful' is a new member.
21225 * src/print.c (print_grammar): Adjust.
21226 * src/derives.c (set_derives): Likewise.
21227 * src/reader.c (packgram, reduce_output): Likewise.
21228 * src/reduce.c (reduce_grammar_tables): Likewise.
21229 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21230
21231 2001-11-30 Akim Demaille <akim@epita.fr>
21232
21233 * src/reduce.c (reduce_output): Formatting changes.
21234 * src/print.c (print_results, print_grammar): Likewise.
21235 * tests/regression.at (Rule Line Numbers)
21236 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21237
21238 2001-11-30 Akim Demaille <akim@epita.fr>
21239
21240 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21241 useless nonterminals, move them at the end of the symbol arrays.
21242 (reduce_output): Adjust.
21243 * tests/reduce.at (Useless Nonterminals): Adjust.
21244
21245 2001-11-30 Akim Demaille <akim@epita.fr>
21246
21247 * src/reduce.c: Various comment/formatting changes.
21248 (nonterminals_reduce): New, extracted from...
21249 (reduce_grammar_tables): here.
21250 (reduce_grammar): Call nonterminals_reduce.
21251
21252 2001-11-29 Paul Eggert <eggert@twinsun.com>
21253
21254 * src/bison.simple (YYSTACK_REALLOC): Remove.
21255 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21256 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21257 New macros.
21258 (union yyalloc): New type.
21259 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21260 an arbitrary restriction on hosts where size_t is wider than int.
21261
21262 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21263 a parser stack overflow. Allocate just one block of memory for all
21264 three stacks, instead of allocating three blocks; this typically is
21265 faster and reduces fragmentation.
21266
21267 Do not limit the number of items in the stack to a value that fits
21268 in 'int', as this is an arbitrary limit on hosts with 64-bit
21269 size_t and 32-bit int.
21270
21271 2001-11-29 Marc Autret <autret_m@epita.fr>
21272
21273 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21274 of defining YYERROR_VERBOSE.
21275 [AT_DATA]: $4 is now out of C declarations in the prologue.
21276
21277 2001-11-28 Marc Autret <autret_m@epita.fr>
21278
21279 * src/reader.c (parse_dquoted_param): New.
21280 (parse_skel_decl): Use it.
21281 * src/lex.h: Add its prototype.
21282 * src/lex.c (literalchar): Become not static.
21283
21284 2001-11-28 Marc Autret <autret_m@epita.fr>
21285
21286 * src/output.h: And put its extern declaration here.
21287 * src/output.c (error_verbose): Define here.
21288 (prepare): Echo name modification.
21289 * src/getargs.h: Clean its extern declaration.
21290 * src/getargs.c (error_verbose_flag): Remove.
21291 (getargs): Remove case 'e'.
21292 * src/options.c (option_table): 'error-verbose' is now seen as simple
21293 percent option.
21294 Include output.h.
21295
21296 * src/reader.c (read_declarations): Remove case tok_include.
21297 (parse_include_decl): Remove.
21298 * src/lex.h (token_t): Remove tok_include.
21299 * src/options.c (option_table): 'include' is now a simple command line
21300 option.
21301
21302 2001-11-28 Marc Autret <autret_m@epita.fr>
21303
21304 * src/bison.simple: Adjust muscle names.
21305 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21306 * src/output.c (prepare): s/_/-/ for the muscles names.
21307 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21308
21309 2001-11-28 Marc Autret <autret_m@epita.fr>
21310
21311 * src/bison.simple: Fix debug.
21312 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21313
21314 2001-11-28 Akim Demaille <akim@epita.fr>
21315
21316 * src/LR0.c (shifts_new): New.
21317 (save_shifts, insert_start_shift, augment_automaton): Use it.
21318
21319 2001-11-28 Akim Demaille <akim@epita.fr>
21320
21321 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21322 keep ruleno only.
21323
21324 2001-11-28 Akim Demaille <akim@epita.fr>
21325
21326 * src/closure.c (closure): Instead of looping over word in array
21327 then bits in words, loop over bits in array.
21328
21329 2001-11-28 Akim Demaille <akim@epita.fr>
21330
21331 * src/closure.c (closure): No longer optimize the special case
21332 where all the bits of `ruleset[r]' are set to 0, to make the code
21333 clearer.
21334
21335 2001-11-28 Akim Demaille <akim@epita.fr>
21336
21337 * src/closure.c (closure): `r' and `c' are new variables, used to
21338 de-obfuscate accesses to RULESET and CORE.
21339
21340 2001-11-28 Akim Demaille <akim@epita.fr>
21341
21342 * src/reduce.c (reduce_print): Use ngettext.
21343 (dump_grammar): Improve the trace accuracy.
21344
21345 2001-11-28 Akim Demaille <akim@epita.fr>
21346
21347 * src/reduce.c (dump_grammar): Don't translate trace messages.
21348
21349 2001-11-28 Akim Demaille <akim@epita.fr>
21350
21351 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21352 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21353 as all tags are free'ed afterwards.
21354 From Enrico Scholz.
21355
21356 2001-11-27 Paul Eggert <eggert@twinsun.com>
21357
21358 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21359 use alloca when we didn't want to, and vice versa.
21360
21361 2001-11-27 Marc Autret <autret_m@epita.fr>
21362
21363 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21364 initialization.
21365 * src/output.c (prepare): Remove its update.
21366
21367 2001-11-27 Marc Autret <autret_m@epita.fr>
21368
21369 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21370 Use %error-verbose.
21371
21372 2001-11-27 Marc Autret <autret_m@epita.fr>
21373
21374 * src/bison.simple: Remove YYERROR_VERBOSE using.
21375 Use %%error_verbose.
21376 (yyparse): Likewise.
21377 * src/output.c (prepare): Give its final value.
21378 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21379 * src/getargs.h: Add its extern declaration.
21380 * src/getargs.c (error_verbose_flag): New int.
21381 (getargs): Update to catch new case.
21382 * src/options.c (option_table): 'error-verbose' is a new option.
21383 (shortopts): Update.
21384
21385 2001-11-27 Akim Demaille <akim@epita.fr>
21386
21387 * src/system.h: Use intl/libgettext.h.
21388 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
21389
21390 2001-11-27 Akim Demaille <akim@epita.fr>
21391
21392 * tests/torture.at (Exploding the Stack Size with Malloc):
21393 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
21394
21395 2001-11-27 Akim Demaille <akim@epita.fr>
21396
21397 * src/files.c: Include error.h.
21398 Reported by Hans Aberg.
21399
21400 2001-11-26 Marc Autret <autret_m@epita.fr>
21401
21402 * src/reader.c (parse_include_decl): New, not yet implemented.
21403 (read_declarations): Add case tok_include.
21404 * src/getargs.h (include): Add its extern definition.
21405 * src/getargs.c (include): New const char *.
21406 (getargs): Add case '-I'.
21407 * src/options.c (option_table): Add include as command line and
21408 percent option.
21409 * src/lex.h (token_t): Add tok_include.
21410
21411 2001-11-26 Akim Demaille <akim@epita.fr>
21412
21413 * src/reader.c (readgram): Make sure rules for mid-rule actions
21414 have a lineno equal to that of their host rule.
21415 Reported by Hans Aberg.
21416 * tests/regression.at (Rule Line Numbers): New.
21417
21418 2001-11-26 Akim Demaille <akim@epita.fr>
21419
21420 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
21421 size_ts.
21422
21423 2001-11-26 Akim Demaille <akim@epita.fr>
21424
21425 * src/complain.c, src/complain.h (error): Remove, provided by
21426 lib/error.[ch].
21427
21428 2001-11-26 Akim Demaille <akim@epita.fr>
21429
21430 * src/reader.c (read_declarations): Don't abort on tok_illegal,
21431 issue an error message.
21432 * tests/regression.at (Invalid %directive): New.
21433 Reported by Hans Aberg.
21434
21435 2001-11-26 Akim Demaille <akim@epita.fr>
21436
21437 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
21438 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21439
21440 2001-11-26 Akim Demaille <akim@epita.fr>
21441
21442 * src/conflicts.c (conflicts_print): Don't complain at all when
21443 there are no reduce/reduce conflicts, and as many shift/reduce
21444 conflicts as expected.
21445 * tests/regression.at (%expect right): Adjust.
21446
21447 2001-11-23 Akim Demaille <akim@epita.fr>
21448
21449 * lib/alloca.c: Update, from fileutils.
21450
21451 2001-11-23 Akim Demaille <akim@epita.fr>
21452
21453 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
21454
21455 2001-11-23 Akim Demaille <akim@epita.fr>
21456
21457 * src/system.h: Include alloca.h.
21458 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
21459
21460 2001-11-23 Akim Demaille <akim@epita.fr>
21461
21462 * src/print_graph.c (print_actions): Remove `rule', unused.
21463 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
21464 pacify GCC's signed < unsigned warnings.
21465 * src/closure.c (itemsetsize): Likewise.
21466 * src/reader.c (symbol_list_new): Static.
21467
21468 2001-11-23 Akim Demaille <akim@epita.fr>
21469
21470 Attaching lineno to buckets is stupid, since only one copy of each
21471 symbol is kept, only the line of the first occurrence is kept too.
21472
21473 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
21474 * src/reader.c (rline_allocated): Remove, unused.
21475 (symbol_list): Have a `line' member.
21476 (symbol_list_new): New.
21477 (readgram): Use it.
21478 * src/print.c (print_grammar): Output the rule line numbers.
21479 * tests/regression.at (Solved SR Conflicts)
21480 (Unresolved SR Conflicts): Adjust.
21481 Reported by Hans Aberg.
21482
21483 2001-11-22 Marc Autret <autret_m@epita.fr>
21484
21485 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
21486
21487 2001-11-22 Marc Autret <autret_m@epita.fr>
21488
21489 * src/muscle_tab.c (muscle_init): Remove initialization of
21490 skeleton muscle.
21491 * src/output.c (output_master_parser): Do it here.
21492
21493 2001-11-20 Akim Demaille <akim@epita.fr>
21494
21495 * po/sv.po: New.
21496 * configure.in (ALL_LINGUAS): Adjust.
21497 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
21498 longer contains strings to translate.
21499
21500 2001-11-19 Akim Demaille <akim@epita.fr>
21501
21502 * src/conflicts.c (conflicts_print): Add a missing \n.
21503
21504 2001-11-19 Akim Demaille <akim@epita.fr>
21505
21506 * src/nullable.c (nullable_print): New.
21507 (set_nullable): Call it when tracing.
21508 Better locality of variables.
21509
21510 2001-11-19 Akim Demaille <akim@epita.fr>
21511
21512 * src/print.c (print_actions): Better locality of variables.
21513
21514 2001-11-19 Akim Demaille <akim@epita.fr>
21515
21516 * src/derives.c (print_derives): Fix and enrich.
21517 * src/closure.c (print_fderives): Likewise.
21518
21519 2001-11-19 Akim Demaille <akim@epita.fr>
21520
21521 * src/closure.c (itemsetend): Remove, replaced with...
21522 (itemsetsize): new.
21523
21524 2001-11-19 Akim Demaille <akim@epita.fr>
21525
21526 * src/LR0.c (kernel_end): Remove, replaced with...
21527 (kernel_size): new.
21528
21529 2001-11-19 Akim Demaille <akim@epita.fr>
21530
21531 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
21532 to clarify.
21533
21534 2001-11-19 Akim Demaille <akim@epita.fr>
21535
21536 * src/closure.c (closure): Use arrays instead of pointers to clarify.
21537
21538 2001-11-19 Akim Demaille <akim@epita.fr>
21539
21540 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
21541 trace messages.
21542 * src/LR0.c: Likewise.
21543 (allocate_itemsets): Use arrays instead of pointers to clarify.
21544
21545 2001-11-19 Akim Demaille <akim@epita.fr>
21546
21547 * src/getargs.c (statistics_flag): Replace with...
21548 (trace_flag): New.
21549 (longopts): Accept --trace instead of --statistics.
21550 * src/getargs.h, src/options.c: Adjust.
21551 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
21552 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
21553
21554 2001-11-19 Akim Demaille <akim@epita.fr>
21555
21556 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
21557 pointers to clarify the code.
21558 (save_reductions, save_shifts): Factor common parts of alternatives.
21559
21560 2001-11-19 Akim Demaille <akim@epita.fr>
21561
21562 * src/LR0.c (new_state, get_state): Complete TRACE code.
21563 * src/closure.c: Include `reader.h' to get `tags', needed by the
21564 trace code.
21565 Rename the conditional DEBUG as TRACE.
21566 Output consistently TRACEs to stderr, not stdout.
21567 * src/derives.c: Likewise.
21568 * src/reduce.c: (inaccessable_symbols): Using if is better style
21569 than goto.
21570 Use `#if TRACE' instead of `#if 0' for tracing code.
21571
21572 2001-11-19 Akim Demaille <akim@epita.fr>
21573
21574 * src/system.h (LIST_FREE, shortcpy): New.
21575 * src/LR0.c: Use them.
21576 * src/output.c (free_itemsets, free_reductions, free_shifts):
21577 Remove, replaced by LIST_FREE.
21578
21579 2001-11-19 Akim Demaille <akim@epita.fr>
21580
21581 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
21582 (REDUCTIONS_ALLOC): New.
21583 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
21584 allocation.
21585
21586 2001-11-19 Akim Demaille <akim@epita.fr>
21587
21588 * src/LR0.c (new_state): Complete trace code.
21589 * src/nullable.c (set_nullable): Don't translate traces.
21590
21591 2001-11-19 Akim Demaille <akim@epita.fr>
21592
21593 * src/print_graph.c (print_core): Better locality of variables.
21594 * src/print.c (print_core): Likewise.
21595
21596 2001-11-19 Akim Demaille <akim@epita.fr>
21597
21598 * src/vcg.c: You do the output, so you are responsible of the
21599 handling of VCG syntax, in particular: use quotearg.
21600 * src/print_graph.c: Don't.
21601 (print_actions): Don't output the actions as part of the nodes,
21602 since that's the job of the edges.
21603 (print_state): Don't output by hand: fill the node description,
21604 and ask for its output.
21605
21606 2001-11-19 Akim Demaille <akim@epita.fr>
21607
21608 * src/bison.simple (yyparse): When verbosely reporting an error,
21609 no longer put additional quotes around token names.
21610 * tests/calc.at: Adjust.
21611
21612 2001-11-19 Akim Demaille <akim@epita.fr>
21613
21614 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
21615 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
21616 * src/output.c: Adjust.
21617
21618 2001-11-19 Akim Demaille <akim@epita.fr>
21619
21620 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
21621 (rule_t): this.
21622 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
21623
21624 2001-11-19 Akim Demaille <akim@epita.fr>
21625
21626 * src/gram.h (rule_t): New.
21627 (rule_table): New.
21628 (rrhs, rlhs): Remove, part of state_t.
21629 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
21630 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
21631 * src/reader.c, src/reduce.c: Adjust.
21632
21633 2001-11-19 Akim Demaille <akim@epita.fr>
21634
21635 * src/reader.c (symbols_output): New, extracted from...
21636 (packsymbols): Here.
21637 (reader): Call it.
21638
21639 2001-11-19 Akim Demaille <akim@epita.fr>
21640
21641 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
21642 (maxrhs): this new function.
21643
21644 2001-11-19 Akim Demaille <akim@epita.fr>
21645
21646 * src/lalr.c (F): New macro to access the variable F.
21647 Adjust.
21648
21649 2001-11-19 Akim Demaille <akim@epita.fr>
21650
21651 * src/lalr.h (LA): New macro to access the variable LA.
21652 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21653 * src/lalr.c: Adjust.
21654
21655 2001-11-19 Akim Demaille <akim@epita.fr>
21656
21657 * src/lalr.c (initialize_LA): Only initialize LA. Let...
21658 (set_state_table): handle the `lookaheads' members.
21659
21660 2001-11-19 Akim Demaille <akim@epita.fr>
21661
21662 * src/lalr.h (lookaheads): Removed array, whose contents is now
21663 a member of...
21664 (state_t): this structure.
21665 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21666 Adjust.
21667
21668 2001-11-19 Akim Demaille <akim@epita.fr>
21669
21670 * src/lalr.h (consistent): Removed array, whose contents is now
21671 a member of...
21672 (state_t): this structure.
21673 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21674 Adjust.
21675
21676 2001-11-19 Akim Demaille <akim@epita.fr>
21677
21678 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
21679 contents are now members of...
21680 (state_t): this structure.
21681 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21682 Adjust.
21683
21684 2001-11-19 Akim Demaille <akim@epita.fr>
21685
21686 * src/lalr.h (state_t): New.
21687 (state_table): Be a state_t * instead of a core **.
21688 (accessing_symbol): Remove, part of state_t.
21689 * src/lalr.c: Adjust.
21690 (set_accessing_symbol): Merge into...
21691 (set_state_table): this.
21692 * src/print_graph.c, src/conflicts.c: Adjust.
21693
21694 2001-11-14 Akim Demaille <akim@epita.fr>
21695
21696 * tests/calc.at, tests/output.at, tests/regression.at,
21697 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
21698 now the tests are run in private dirs, therefore AC_CLEANUP and
21699 family can be simplified to 0-ary.
21700 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
21701 use abs. path to find config.h.
21702 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
21703 stderr, there can be way too much random noise.
21704 Instead pass -Werror to GCC and rely on the exit status.
21705 Reported by Wolfram Wagner.
21706
21707 2001-11-14 Akim Demaille <akim@epita.fr>
21708
21709 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
21710 defined only if yyoverflow is defined, to avoid `warning: unused
21711 variable `yyvs1''.
21712 Reported by The Test Suite.
21713
21714 2001-11-14 Akim Demaille <akim@epita.fr>
21715
21716 * src/print.c: Include reduce.h.
21717 Reported by Hans Aberg.
21718
21719 2001-11-14 Akim Demaille <akim@epita.fr>
21720
21721 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
21722 Revert a previous patch: these are really const.
21723 * src/conflicts.c (conflict_report): Additional useless pair of
21724 braces to pacify GCC's warnings for `if () if () {} else {}'.
21725 * src/lex.c (parse_percent_token): Replace equal_offset with
21726 arg_offset.
21727 arg is const.
21728 Be sure to strdup `arg' when used, since there is no reason for
21729 token_buffer not to change.
21730
21731 2001-11-14 Akim Demaille <akim@epita.fr>
21732
21733 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
21734 definition.
21735 * src/main.c (main): Use them.
21736 Suggested by Hans Aberg.
21737
21738 2001-11-12 Akim Demaille <akim@epita.fr>
21739
21740 * src/system.h (ngettext): Now that we use ngettext, be sure to
21741 provide a default definition when NLS are not used.
21742
21743 2001-11-12 Akim Demaille <akim@epita.fr>
21744
21745 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
21746 Use @kbd to denote user input.
21747 (Language and Grammar): ANSIfy the example.
21748 Adjust its layout for info/notinfo.
21749 (Location Tracking Calc): Output error messages to stderr.
21750 Output locations in a more GNUtically correct way.
21751 Fix a couple of Englishos.
21752 Adjust @group/@end group pairs.
21753
21754 2001-11-12 Akim Demaille <akim@epita.fr>
21755
21756 %expect was not functioning at all.
21757
21758 * src/conflicts.c (expected_conflicts): Set to -1.
21759 (conflict_report): Use ngettext.
21760 (conflicts_print): Check %expect and make its violation an error.
21761 * doc/bison.texinfo (Expect Decl): Adjust.
21762 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
21763 * tests/regression.at (%expect not enough, %expect right)
21764 (%expect too much): New.
21765
21766 2001-11-12 Akim Demaille <akim@epita.fr>
21767
21768 * tests/regression.at (Conflicts): Rename as...
21769 (Unresolved SR Conflicts): this.
21770 (Solved SR Conflicts): New.
21771
21772 2001-11-12 Akim Demaille <akim@epita.fr>
21773
21774 * src/reduce.c (print_results): Rename as...
21775 (reduce_output): This.
21776 Output to OUT, passed as argument, instead of output_obstack.
21777 (dump_grammar): Likewise.
21778 (reduce_free): New.
21779 Also free V1.
21780 (reduce_grammar): No longer call reduce_output, since...
21781 * src/print.c (print_results): do it.
21782 * src/main.c (main): Call reduce_free;
21783
21784 2001-11-12 Akim Demaille <akim@epita.fr>
21785
21786 * src/conflicts.c (print_reductions): Accept OUT as argument.
21787 Output to it, not to output_obstack.
21788 * src/print.c (print_actions): Adjust.
21789
21790 2001-11-12 Akim Demaille <akim@epita.fr>
21791
21792 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
21793 the result instead of using...
21794 (src_total, rrc_total, src_count, rrc_count): Remove.
21795 (any_conflicts): Remove.
21796 (print_conflicts): Split into...
21797 (conflicts_print, conflicts_output): New.
21798 * src/conflicts.h: Adjust.
21799 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
21800 * src/print.c (print_grammar): Issue `\n' between two rules.
21801 * tests/regression.at (Conflicts): New.
21802 Reported by Tom Lane.
21803
21804 2001-11-12 Akim Demaille <akim@epita.fr>
21805
21806 * tests/regression.at (Invalid input): Remove, duplicate with
21807 ``Invalid input: 1''.
21808
21809 2001-11-12 Akim Demaille <akim@epita.fr>
21810
21811 * tests/torture.at (AT_DATA_STACK_TORTURE)
21812 (Exploding the Stack Size with Alloca)
21813 (Exploding the Stack Size with Malloc): New.
21814
21815 2001-11-12 Akim Demaille <akim@epita.fr>
21816
21817 * src/bison.simple (YYSTACK_REALLOC): New.
21818 (yyparse) [!yyoverflow]: Use it and free the old stack.
21819 Reported by Per Allansson.
21820
21821 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
21822
21823 * src/bison.simple: Define type yystype instead of YYSTYPE, and
21824 define CPP macro, which substitute YYSTYPE by yystype.
21825 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
21826 with yyltype/YYLTYPE. This allows inclusion of the generated
21827 header within the parser if the compiler, such as GGC, accepts
21828 multiple equivalent #defines.
21829 From Akim.
21830
21831 2001-11-05 Akim Demaille <akim@epita.fr>
21832
21833 * src/reader.c (symbols_output): New, extracted from...
21834 (packsymbols): here.
21835 (reader): Adjust.
21836
21837 2001-11-05 Akim Demaille <akim@epita.fr>
21838
21839 * src/lex.c (parse_percent_token): s/quotearg/quote/.
21840
21841 2001-11-05 Akim Demaille <akim@epita.fr>
21842
21843 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
21844 pattern.
21845
21846 2001-11-05 Akim Demaille <akim@epita.fr>
21847
21848 * src/options.h (struct option_table_struct): set_flags is void*.
21849 * src/options.c (longopts): Support `--output' and `%output'.
21850 (usage): Adjust.
21851 * src/lex.h (tok_setopt): Remove, replaced with...
21852 (tok_intopt, tok_stropt): these new guys.
21853 * src/lex.c (getopt.h): Not needed.
21854 (token_buffer, unlexed_token_buffer): Not const.
21855 (percent_table): Promote `-' over `_' in directive names.
21856 Active `%name-prefix', `file-prefix', and `output'.
21857 (parse_percent_token): Accept possible arguments to directives.
21858 Promote `-' over `_' in directive names.
21859
21860 2001-11-04 Akim Demaille <akim@epita.fr>
21861
21862 * doc/bison.texinfo (Decl Summary): Split the list into
21863 `directives for grammars' and `directives for bison'.
21864 Sort'em.
21865 Add description of `%name-prefix', `file-prefix', and `output'.
21866 Promote `-' over `_' in directive names.
21867 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21868 Simplify the description of `--name-prefix'.
21869 Promote `-' over `_' in directive names.
21870 Promote `--output' over `--output-file'.
21871 Fix the description of `--defines'.
21872 * tests/output.at: Exercise %file-prefix and %output.
21873
21874 2001-11-02 Akim Demaille <akim@epita.fr>
21875
21876 * doc/refcard.tex: Update.
21877
21878 2001-11-02 Akim Demaille <akim@epita.fr>
21879
21880 * src/symtab.h (SUNDEF): New.
21881 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21882 stand for `uninitialized', instead of 0.
21883 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21884 * src/lex.c (lex): Adjust.
21885
21886 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21887 Number it 0.
21888 Let yylex return it instead of a plain 0.
21889 Reported by Dick Streefland.
21890
21891 2001-11-02 Akim Demaille <akim@epita.fr>
21892
21893 * tests/regression.at (Mixing %token styles): New test.
21894
21895 2001-11-02 Akim Demaille <akim@epita.fr>
21896
21897 * src/reader.c (parse_thong_decl): Formatting changes.
21898 (token_translations_init): New, extracted from...
21899 (packsymbols): Here.
21900 Adjust.
21901
21902 2001-11-01 Akim Demaille <akim@epita.fr>
21903
21904 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21905 Check that `9foo.y' produces correct cpp guards.
21906 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21907 guards.
21908 Reported by Wwp.
21909
21910 2001-11-01 Akim Demaille <akim@epita.fr>
21911
21912 * tests/regression.at (Invalid input: 2): New.
21913 * src/lex.c (unlexed_token_buffer): New.
21914 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21915 too.
21916 Reported by Wwp.
21917
21918 2001-11-01 Akim Demaille <akim@epita.fr>
21919
21920 * tests/calc.at: Catch up with 1.30.
21921 * configure.in: Bump to 1.49a.
21922 Adjust to newer Autotest.
21923
21924 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21925
21926 * src/conflicts.c: Move global variables rrc_total and src_total ...
21927 (print_conflicts): here.
21928 * src/output.c (output): Free global variable user_toknums.
21929 * src/lex.c (token_obstack): Become static.
21930
21931 2001-10-18 Akim Demaille <akim@epita.fr>
21932
21933 * tests/atlocal.in (GCC): Add.
21934 * tests/calc.at: s/m4_match/m4_bmatch/.
21935 s/m4_patsubst/m4_bpatsubst/.
21936 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21937 * configure.in: AC_SUBST(GCC).
21938
21939 2001-10-14 Marc Autret <autret_m@epita.fr>
21940
21941 * src/options.c (create_long_option_table): Fix.
21942
21943 2001-10-10 Akim Demaille <akim@epita.fr>
21944
21945 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21946
21947 2001-10-04 Akim Demaille <akim@epita.fr>
21948
21949 * src/reader.c (parse_union_decl): Push the caracters in
21950 union_obstack, not attrs_obstack.
21951
21952 2001-10-04 Akim Demaille <akim@epita.fr>
21953
21954 Merge in the branch 1.29.
21955
21956 * src/reader.c (packsymbols): Use a temporary obstack for
21957 `%%tokendef', since output_stack is already used elsewhere.
21958
21959 2001-10-02 Akim Demaille <akim@epita.fr>
21960
21961 Bump 1.29d.
21962
21963 2001-10-02 Akim Demaille <akim@epita.fr>
21964
21965 Version 1.29c.
21966
21967 2001-10-02 Akim Demaille <akim@epita.fr>
21968
21969 * tests/regression.at (Invalid CPP headers): New.
21970 From Alexander Belopolsky.
21971 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21972
21973 2001-10-02 Akim Demaille <akim@epita.fr>
21974
21975 * tests/regression.at (Invalid input): New.
21976 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21977 Reported by Shura.
21978
21979 2001-10-02 Akim Demaille <akim@epita.fr>
21980
21981 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21982
21983 2001-10-02 Akim Demaille <akim@epita.fr>
21984
21985 * src/output.c (output_parser): Assert `skeleton'.
21986 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21987 systems.
21988 From Shura.
21989
21990 2001-10-01 Marc Autret <autret_m@epita.fr>
21991
21992 * src/lex.h: Echo modifications.
21993 * src/lex.c (unlex): Parameter is now token_t.
21994 From Hans Aberg.
21995
21996 2001-10-01 Marc Autret <autret_m@epita.fr>
21997
21998 * src/main.c: Include lex.h.
21999 From Hans Aberg.
22000
22001 2001-09-29 Akim Demaille <akim@epita.fr>
22002
22003 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22004
22005 2001-09-28 Akim Demaille <akim@epita.fr>
22006
22007 * tests/testsuite.at: Update to newer Autotest.
22008 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22009
22010 2001-09-27 Akim Demaille <akim@epita.fr>
22011
22012 Position independent wrapper.
22013
22014 * tests/bison: Remove.
22015 * tests/bison.in: New.
22016 * configure.in: Adjust.
22017
22018 2001-09-27 Paul Eggert <eggert@twinsun.com>
22019
22020 Port quotearg fixes from tar 1.13.24.
22021
22022 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22023 tm to be declared.
22024 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22025 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22026
22027 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22028 * m4/mbrtowc.m4: New file.
22029 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22030 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22031
22032 2001-09-27 Akim Demaille <akim@epita.fr>
22033
22034 Bump to 1.29c.
22035
22036 2001-09-27 Akim Demaille <akim@epita.fr>
22037
22038 Version 1.29b.
22039
22040 2001-09-25 Akim Demaille <akim@epita.fr>
22041
22042 * src/system.h: Include `xalloc.h'.
22043 Remove it from the C files.
22044 * src/files.c (output_files): Free the obstacks.
22045 * src/lex.c (init_lex): Rename as...
22046 (lex_init): this.
22047 (lex_free): New.
22048 * src/main.c (main): Use it.
22049
22050 2001-09-24 Marc Autret <autret_m@epita.fr>
22051
22052 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22053 to output informations in fout (FILE*).
22054 (open_graph, close_graph): Likewise.
22055 (output_graph, output_edge, output_node): Likewise.
22056 * src/vcg.h: Update function prototypes.
22057 * src/print_graph.c (print_graph): Open output graph file.
22058 (print_actions): Adjust.
22059 * src/files.h: Remove extern declaration.
22060 * src/files.c: Remove graph_obstack declaration.
22061 (open_files): Remove graph_obstack initialization.
22062 (output_files): Remove graph_obstack saving.
22063
22064 2001-09-24 Marc Autret <autret_m@epita.fr>
22065
22066 * src/files.c (compute_output_file_names): Fix.
22067
22068 2001-09-24 Marc Autret <autret_m@epita.fr>,
22069 Akim Demaille <akim@epita.fr>
22070
22071 * src/reader.c (reader): Remove call to free_symtab ().
22072 * src/main.c (main): Call it here.
22073 Include symtab.h.
22074 * src/conflicts.c (initialize_conflicts): Rename as...
22075 (solve_conflicts): this.
22076 * src/print.c (print_core, print_actions, print_state)
22077 (print_grammar): Dump to a file instead a `output_obstack'.
22078 (print_results): Dump `output_obstack', and then proceed with the
22079 FILE *.
22080 * src/files.c (compute_output_file_names, close_files): New.
22081 (output_files): Adjust.
22082 * src/main.c (main): Adjust.
22083
22084 2001-09-23 Marc Autret <autret_m@epita.fr>
22085
22086 * src/files.c (compute_header_macro): Computes header macro name
22087 from spec_defines_file when given.
22088
22089 2001-09-23 Marc Autret <autret_m@epita.fr>
22090
22091 * src/files.c (output_files): Add default extensions.
22092
22093 2001-09-22 Akim Demaille <akim@epita.fr>
22094
22095 * src/conflicts.c (finalize_conflicts): Rename as...
22096 (free_conflicts): this.
22097
22098 2001-09-22 Akim Demaille <akim@epita.fr>
22099
22100 * src/gram.c (gram_free): Rename back as...
22101 (dummy): this.
22102 (output_token_translations): Free `token_translations'.
22103 * src/symtab.c (free_symtab): Free the tag field.
22104
22105 2001-09-22 Akim Demaille <akim@epita.fr>
22106
22107 Remove `translations' as it is always set to true.
22108
22109 * src/gram.h: Adjust.
22110 * src/reader.c (packsymbols, parse_token_decl): Adjust
22111 * src/print.c (print_grammar): Adjust.
22112 * src/output.c (output_token_translations): Adjust.
22113 * src/lex.c (lex): Adjust.
22114 * src/gram.c: Be sure the set pointers to NULL.
22115 (dummy): Rename as...
22116 (gram_free): this.
22117
22118 2001-09-22 Akim Demaille <akim@epita.fr>
22119
22120 * configure.in: Invoke AM_LIB_DMALLOC.
22121 * src/system.h: Use dmalloc.
22122 * src/LR0.c: Be sure to have pointers initialized to NULL.
22123 (allocate_itemsets): Allocate kernel_items only if needed.
22124
22125 2001-09-22 Akim Demaille <akim@epita.fr>
22126
22127 * configure.in: Bump to 1.29b.
22128 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22129 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22130 need xmalloc.c in calc.y.
22131 From Pascal Bart.
22132
22133 2001-09-21 Akim Demaille <akim@epita.fr>
22134
22135 Version 1.29a.
22136 * Makefile.maint, config/config.guess, config/config.sub,
22137 * config/missing: Update from masters.
22138 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22139 upon package.m4.
22140 * configure.in (ALL_LINGUAS): Add `tr'.
22141
22142 2001-09-21 Akim Demaille <akim@epita.fr>
22143
22144 * tests/Makefile.am (package.m4): Move to...
22145 ($(srcdir)/$(TESTSUITE)): here.
22146
22147 2001-09-20 Akim Demaille <akim@epita.fr>
22148
22149 * src/complain.c: No longer try to be standalone: use system.h.
22150 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22151 * src/complain.h: Likewise.
22152 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22153 Remove the unused variable `n'.
22154 From Albert Chin-A-Young.
22155
22156 2001-09-18 Marc Autret <autret_m@epita.fr>
22157
22158 * doc/bison.1: Update.
22159 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22160 descriptions.
22161 (Option Cross Key): Update.
22162 Add --graph.
22163
22164 2001-09-18 Marc Autret <autret_m@epita.fr>
22165
22166 * tests/regression.at: New test (comment in %union).
22167
22168 2001-09-18 Marc Autret <autret_m@epita.fr>
22169
22170 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22171 do that.
22172 Reported by Keith Browne.
22173
22174 2001-09-18 Marc Autret <autret_m@epita.fr>
22175
22176 * tests/output.at: Add tests for --defines and --graph.
22177
22178 2001-09-18 Marc Autret <autret_m@epita.fr>
22179
22180 * tests/output.at: Removes tests of %{header,src}_extension features.
22181
22182 2001-09-18 Akim Demaille <akim@epita.fr>
22183
22184 * tests/Makefile.am (package.m4): New.
22185 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22186 (_AT_CHECK_CALC_ERROR): Likewise.
22187 Factor the `, ' part of verbose error messages.
22188
22189 2001-09-18 Marc Autret <autret_m@epita.fr>
22190
22191 * src/getargs.c (longopts): Declare --defines and --graph as options
22192 with optional arguments.
22193 * src/files.h: Add extern declarations.
22194 * src/files.c (spec_graph_file, spec_defines_file): New.
22195 (output_files): Update.
22196 Remove CPP-outed code.
22197
22198 2001-09-18 Marc Autret <autret_m@epita.fr>
22199
22200 Turn off %{source,header}_extension feature.
22201
22202 * src/files.c (compute_exts_from_gf): Update.
22203 (compute_exts_from_src): Update.
22204 (output_files): CPP-out useless code.
22205 * src/files.h: Remove {header,source}_extension extern declarations.
22206 * src/reader.c (parse_dquoted_param): CPP-out.
22207 (parse_header_extension_decl): Remove.
22208 (parse_source_extension_decl): Remove.
22209 (read_declarations): Remove cases tok_{hdrext,srcext}.
22210 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22211 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22212
22213 2001-09-10 Akim Demaille <akim@epita.fr>
22214
22215 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22216 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22217 (AT_CHECK_OUTPUT): this.
22218 Merely check ls' exit status, its output is useless.
22219
22220 2001-09-10 Akim Demaille <akim@epita.fr>
22221
22222 * tests/calc.at: Use m4_match.
22223 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22224
22225 2001-09-10 Marc Autret <autret_m@epita.fr>,
22226 Akim Demaille <akim@epita.fr>
22227
22228 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22229 enum color_e.
22230 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22231 to `normal'.
22232 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22233 * src/lex.h: Adjust prototype.
22234 (token_t): Add `tok_undef'.
22235 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22236 (parse_percent_token): Now returns token_t.
22237 Add default statement in switch.
22238 (lex): Separate `c' as an input variable, from the token_t result
22239 part.
22240 (unlexed): Is a token_t.
22241
22242 2001-09-10 Akim Demaille <akim@epita.fr>
22243
22244 * configure.in: Bump to 1.29a.
22245
22246 2001-09-07 Akim Demaille <akim@epita.fr>
22247
22248 Version 1.29.
22249
22250 2001-08-30 Akim Demaille <akim@epita.fr>
22251
22252 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22253 * m4/atconfig.m4: Remove.
22254 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22255 * tests/bison: New.
22256 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22257 m4_if, m4_patsubst, and m4_regexp.
22258 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22259 `input' file instead of echo.
22260
22261 2001-08-29 Akim Demaille <akim@epita.fr>
22262
22263 Bump to 1.28e.
22264
22265 2001-08-29 Akim Demaille <akim@epita.fr>
22266
22267 Version 1.28d.
22268
22269 2001-08-29 Paul Eggert <eggert@twinsun.com>
22270
22271 * src/bison.simple (yyparse): Don't take the address of an
22272 item before the start of an array, as that doesn't conform to
22273 the C Standard.
22274
22275 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22276
22277 * doc/bison.texinfo (Location Tracking Calc): New node.
22278
22279 2001-08-29 Paul Eggert <eggert@twinsun.com>
22280
22281 * src/output.c (output): Do not define const, as this now
22282 causes more problems than it cures.
22283
22284 2001-08-29 Akim Demaille <akim@epita.fr>
22285
22286 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22287 the nodes.
22288 Be sure to tag the `detailmenu'.
22289
22290 2001-08-29 Akim Demaille <akim@epita.fr>
22291
22292 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22293 download in a tmp dir.
22294
22295 2001-08-28 Marc Autret <autret_m@epita.fr>
22296
22297 * config/depcomp: New file.
22298
22299 2001-08-28 Marc Autret <autret_m@epita.fr>
22300
22301 * doc/bison.1 (mandoc): Adjust.
22302 From Juan Manuel Guerrero.
22303
22304 2001-08-28 Marc Autret <autret_m@epita.fr>
22305
22306 * src/print_graph.c (print_state): Fix.
22307
22308 2001-08-27 Marc Autret <autret_m@epita.fr>
22309
22310 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22311 char * members.
22312 Echo modifications to the functions prototypes.
22313 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22314
22315 2001-08-27 Marc Autret <autret_m@epita.fr>
22316
22317 * src/vcg.c: Include `xalloc.h'.
22318 (add_colorentry): New.
22319 (add_classname): New.
22320 (add_infoname): New.
22321 * src/vcg.h: Add new prototypes.
22322
22323 2001-08-27 Akim Demaille <akim@epita.fr>
22324
22325 * Makefile.maint: Sync. again with CVS Autoconf.
22326
22327 2001-08-27 Akim Demaille <akim@epita.fr>
22328
22329 * Makefile.maint: Formatting changes.
22330 (po-update, cvs-update, update): New targets.
22331 (AMTAR): Remove.
22332
22333 2001-08-27 Akim Demaille <akim@epita.fr>
22334
22335 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22336 * Makefile.maint: Sync. with CVS Autoconf.
22337
22338 2001-08-27 Marc Autret <autret_m@epita.fr>
22339
22340 * src/vcg.h (struct infoname_s): New.
22341 (struct colorentry_s): New.
22342 (graph_s): New fields {vertical,horizontal}_order in structure.
22343 Add `infoname' field.
22344 Add `colorentry' field;
22345 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22346 (G_HORIZONTAL_ORDER): New.
22347 (G_INFONAME): New.
22348 (G_COLORENTRY): New.
22349 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22350 Add output of `infoname'.
22351 Add output of `colorentry'.
22352
22353 2001-08-27 Marc Autret <autret_m@epita.fr>
22354
22355 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22356 This one shadowed a global parameter.
22357
22358 2001-08-24 Marc Autret <autret_m@epita.fr>
22359
22360 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22361 instead of `unsigned'.
22362 (print_state): Do not call obstack_object_size () in obstack_grow ()
22363 to avoid macro variables shadowing.
22364
22365 2001-08-23 Marc Autret <autret_m@epita.fr>
22366
22367 * src/lex.c (percent_table): Typo: s/naem/name/.
22368 Add graph option.
22369 Normalize new options declarations.
22370
22371 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22372
22373 * tests/suite.at: Exercise %header_extension and %source_extension.
22374
22375 2001-08-16 Marc Autret <autret_m@epita.fr>
22376
22377 * src/reader.c (parse_dquoted_param): New.
22378 (parse_header_extension_decl): Use it.
22379 (parse_source_extension_decl): Likewise.
22380
22381 2001-08-16 Marc Autret <autret_m@epita.fr>
22382
22383 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
22384 (get_xxxx_str): Use assert () instead of complain ().
22385 Remove return invokations in default cases.
22386 (get_decision_str): Modify default behaviour. Remove second argument.
22387 Echo modifications on calls.
22388 (output_graph): Fix.
22389
22390 2001-08-16 Marc Autret <autret_m@epita.fr>
22391
22392 * src/getargs.c (usage): Update with ``-g, --graph''.
22393
22394 2001-08-16 Marc Autret <autret_m@epita.fr>
22395
22396 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
22397 (Option Cross Key): Likewise.
22398 * doc/bison.1: Update.
22399
22400 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
22401
22402 * src/output.c (output_master_parser): Don't finish action_obstack.
22403 (output_parser): Don't care about the muscle action, here.
22404 (prepare): Copy the action_obstack in the action muscle.
22405 (output): Free action_obstack.
22406
22407 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22408
22409 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
22410 will contain `%union' declaration.
22411 (parse_union_decl): Delete #line directive output.
22412 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
22413 informations about %union.
22414 (parse_union_decl): Copy the union_obstack in the muscle stype.
22415 * src/bison.simple: Add new #line directive.
22416 Add typdef %%stype YYSTYPE.
22417
22418 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22419
22420 * src/bison.simple: Add new `#line' directive.
22421
22422 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
22423
22424 * src/bison.simple: New `#line' directive.
22425 * src/output.c (output_parser): Support new dynamic muscle input_line.
22426
22427 2001-09-22 Marc Autret <autret_m@epita.fr>
22428
22429 * src/output.c (output_master_parser): New.
22430 (output_parser): Be more re-entrant.
22431
22432 2001-09-21 Marc Autret <autret_m@epita.fr>
22433
22434 * src/reader.c (copy_definition, parse_union_decl): Update and use
22435 `linef' muscle.
22436 (copy_action): Likewise.
22437 Use obstack_1grow ().
22438 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
22439
22440 2001-09-21 Marc Autret <autret_m@epita.fr>
22441
22442 * src/options.c (option_table): Adjust.
22443 * src/lex.c (parse_percent_token): Fix.
22444
22445 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22446
22447 * src/options.c (symtab.h): Include it, need by lex.h.
22448
22449 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22450
22451 * src/lex.c (parse_percent_token): Change type of variable `tx', which
22452 is now an option_table_struct*.
22453 (option_strcmp): New function option_strcmp.
22454 (parse_percent_token): Call option_strcmp.
22455 * src/getargs.c (xalloc.h, options.h): Include it.
22456 (getargs): Call create_long_option_table.
22457 (getargs): Free longopts at the end of the function.
22458 (shortopts): Move in options.c.
22459 * src/options.c (create_long_option_table): New function. Convert
22460 information from option_table to option structure.
22461 * src/reader.c (options.h): Include it.
22462
22463 * src/Makefile.am: Adjust.
22464 * src/options.c (option_table): Create from longopts and percent_table.
22465 * src/getargs.c (longopts): Delete.
22466 * src/lex.c (struct percent_table_struct): Delete.
22467 (percent_table): Delete.
22468 (options.h): Include it.
22469 * src/options.c: Create.
22470 * src/options.h: Create.
22471 Declare enum opt_access_e.
22472 Define struct option_table_struct.
22473
22474 2001-09-20 Marc Autret <autret_m@epita.fr>
22475
22476 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
22477 sections of Bison.
22478
22479 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
22480
22481 * src/bison.simple: s/%%filename/%%skeleton.
22482 * src/muscle_tab.c (getargs.h): Include it.
22483 (muscle_init): Insert new muscle skeleton.
22484
22485 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
22486
22487 * src/output.c (output_parser): Delete unused variable actions_dumped.
22488
22489 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
22490
22491 * src/output.c (output): Delete call to reader_output_yylsp.
22492 * src/reader.c (reader): Likewise.
22493 * src/reader.h: Delete declaration of reader_output_yylsp.
22494
22495 2001-09-02 Marc Autret <autret_m@epita.fr>
22496
22497 * src/reader.c: Include muscle_tab.h.
22498 (parse_union_decl): Update.
22499 (parse_macro_decl): Rename parse_muscle_decl.
22500 Update to use renamed functions and variable.
22501 (read_declarations, copy_action, read_additionnal_code, : Updated
22502 with correct variables and functions names.
22503 (packsymbols, reader): Likewise.
22504
22505 * src/reader.h (muscle_obstack): Extern declaration update.
22506
22507 * src/output.c: Include muscle_tab.h
22508 In all functions using macro_insert, change by using muscle_insert ().
22509 (macro_obstack): Rename muscle_obstack.
22510 Echo modifications in the whole file.
22511 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
22512 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
22513 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
22514
22515 * src/muscle_tab.h: Update double inclusion macros.
22516 (macro_entry_s): Rename muscle_entry_s.
22517 Update prototypes.
22518
22519 * src/muscle_tab.c: Include muscle_tab.h.
22520 Rename macro_tabble to muscle_table.
22521 (mhash1, mhash2, mcmp): Use muscle_entry.
22522 (macro_init): Rename muscle_init. Update.
22523 (macro_insert): Rename muscle_insert. Update.
22524 (macro_find): Rename muscle_find. Update.
22525
22526 * src/main.c: Include muscle_tab.h.
22527 (main): Call muscle_init ().
22528 * src/Makefile.am (bison_SOURCES): Echo modifications.
22529
22530 2001-09-02 Marc Autret <autret_m@epita.fr>
22531
22532 Now the files macro_tab.[ch] are named muscle_tab.[ch].
22533
22534 * src/muscle_tab.c, src/muscle_tab.h: Add files.
22535
22536 2001-09-02 Marc Autret <autret_m@epita.fr>
22537
22538 * src/macrotab.c, src/macrotab.h: Remove.
22539
22540 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
22541
22542 * src/reader.c (copy_guard): Use muscle to specify the `#line'
22543 filename.
22544
22545 2001-09-01 Marc Autret <autret_m@epita.fr>
22546
22547 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
22548 to an explicit value to activate the feature. We do it here.
22549
22550 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22551
22552 * src/output.c (prepare): Delete the `filename' muscule insertion.
22553 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
22554 (parse_union_decl): Likewise.
22555 * src/macrotab.c (macro_init): Initialize filename by infile.
22556
22557 2001-08-31 Marc Autret <autret_m@epita.fr>
22558
22559 * src/bison.simple (YYLSP_NEEDED): New definition.
22560 * src/output.c (prepare): Add macro insertion of `locations_flag'
22561
22562 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22563
22564 * src/output.c (prepare): Delete insertion of previous muscles,
22565 and insert the `prefix' muscles.
22566 * src/macrotab.c (macro_init): Likewise.
22567 (macro_init): Initialization prefix directive by `yy'.
22568 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
22569 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
22570 yylval, yydebug, yyerror, yynerrs and yyparse.
22571 New directive `#define' to substitute yydebug, ... with option
22572 name_prefix.
22573
22574 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22575
22576 * src/main.c (main): Standardize.
22577 * src/output.c (output_table_data, output_parser): Likewise.
22578 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
22579
22580 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
22581
22582 * src/reader.c (read_additionnal_code): Rename %%user_code to
22583 %%epilogue.
22584 * src/output.c (output): Rename %%declarations to %%prologue.
22585 * src/bison.simple: Echo modifications.
22586
22587 2001-08-31 Marc Autret <autret_m@epita.fr>
22588
22589 * src/reader.c (readgram): CleanUp.
22590 (output_token_defines): Likewise.
22591 (packsymbols): Likewise.
22592 (reader): Likewise.
22593 * src/output.c (output): CPP-out useless code.
22594
22595 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22596
22597 * src/reader.c (reader): Delete obsolete call to function
22598 output_trailers and output_headers.
22599 * src/output.h: Remove obsolete functions prototypes of output_headers
22600 and output_trailers.
22601
22602 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
22603
22604 * src/main.c: Include macrotab.h.
22605 * src/macrotab.h (macro_entry_s): Constify fields.
22606 Adjust functions prototypes.
22607 * src/macrotab.c (macro_insert): Constify key and value.
22608 (macro_find): Constify key.
22609 (macro_insert): Include 'xalloc.h'
22610 (macro_insert): Use XMALLOC.
22611 (macro_find): Constify return value.
22612 * src/output.c (output_table_data): Rename table to table_data.
22613 (output_parser): Constify macro_key, macro_value.
22614
22615 2001-08-30 Marc Autret <autret_m@epita.fr>
22616
22617 * src/reader.c (parse_skel_decl): New.
22618 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
22619 * src/lex.h (token_t): New token `tok_skel'.
22620 * src/lex.c (percent_table): Add skeleton option entry.
22621 Standardize.
22622
22623 2001-08-29 Marc Autret <autret_m@epita.fr>
22624
22625 * src/bison.simple: Add %%user_code directive at the end.
22626 * src/reader.c (read_additionnal_code): New.
22627 (reader): Use it.
22628 * src/output.c (output_program): Remove.
22629 (output): Update.
22630
22631 2001-08-28 Marc Autret <autret_m@epita.fr>
22632
22633 * src/output.c (output_actions): Clean up.
22634 (output_gram): CPP-out useless code.
22635 * src/reader.c (reader): Clean up, CPP-out useless code.
22636
22637 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
22638
22639 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
22640 directive.
22641 * src/bison.simple: Add `%%definitions'.
22642
22643 2001-08-28 Marc Autret <autret_m@epita.fr>
22644
22645 * config/depcomp: New file.
22646
22647 2001-08-27 Paul Eggert <eggert@twinsun.com>
22648
22649 * src/bison.simple (yyparse): Don't take the address of an
22650 item before the start of an array, as that doesn't conform to
22651 the C Standard.
22652
22653 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22654
22655 * src/output.c (output): Remove the initialization of the macro
22656 obstack. It was done too late here.
22657
22658 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
22659 completely wrong.
22660 (reader): Initialize the macro obstack here, since we need it to grow
22661 '%define' directives.
22662
22663 * src/reader.h: Declare the macro obstack as extern.
22664
22665 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22666
22667 * src/output.c (output_parser): Fix. Store single '%' characters in
22668 the output obstack instead of throwing them away.
22669
22670 2001-08-27 Akim Demaille <akim@epita.fr>
22671
22672 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22673
22674 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22675
22676 * lib/Makefile.am: Adjust.
22677
22678 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22679
22680 * src/bison.simple: Update and add '%%' directives.
22681
22682 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22683
22684 * src/reader.c (reader): Remove calls to 'output_headers' and
22685 'output_trailers'. Remove some C output.
22686 (readgram): Disable a piece of code that was writing a default
22687 definition for 'YYSTYPE'.
22688 (reader_output_yylsp): Remove.
22689 (packsymbols): Output token defintions to a macro.
22690 (copy_definition): Disable C output.
22691
22692 * src/reader.c (parse_macro_decl): New function used to parse macro
22693 declarations.
22694 (copy_string2): Put the body of copy_string into this new function.
22695 Add a parameter to let the caller choose whether he wants to copy the
22696 string delimiters or not.
22697 (copy_string): Be a simple call to copy_string2 with the last argument
22698 bound to true.
22699 (read_declarations): Add case for macro definition.
22700 (copy_identifier): New.
22701 (parse_macro_decl): Read macro identifiers using copy_identifier
22702 rather than lex.
22703
22704 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22705
22706 * src/output.c (prepare): Add prefixed names.
22707 (output_parser): Output semantic actions.
22708 (output_parser): Fix bug on '%%line' directives.
22709
22710 * src/output.c (output_headers): Remove. The C code printed by this
22711 function should now be in the skeletons.
22712 (output_trailers): Remove.
22713 (output): Disable call to 'reader_output_yylsp'.
22714 (output_rule_data): Do not output tables to the table obstack.
22715
22716 * src/output.c: Remove some C dedicated output.
22717 Improve the use of macro and output obstacks.
22718 (output_defines): Remove.
22719
22720 * src/output.c (output_token_translations): Associate 'translate'
22721 table with a macro. No output to the table obstack.
22722 (output_gram): Same for 'rhs' and 'prhs'.
22723 (output_stos): Same for 'stos'.
22724 (output_rule_data): Same for 'r1' and 'r2'.
22725 (token_actions): Same for 'defact'.
22726 (goto_actions): Same for 'defgoto'.
22727 (output_base): Same for 'pact' and 'pgoto'.
22728 (output_table): Same for 'table'.
22729 (output_check): Same for 'check'.
22730
22731 * src/output.c (output_table_data): New function.
22732 (output_short_table): Remove.
22733 (output_short_or_char_table): Remove.
22734
22735 * src/output.c (output_parser): Replace most of the skeleton copy code
22736 with something new. Skeletons are now processed character by character
22737 rather than line by line, and Bison looks for '%%' macros. This is the
22738 first step in making Bison's output process (a lot) more flexible.
22739 (output_parser): Use the macro table.
22740
22741 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22742
22743 * src/main.c (main): Initialize the macro table.
22744
22745 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22746
22747 * src/lex.c (percent_table): Add tok_define.
22748 * src/lex.h: Add tok_define.
22749
22750 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22751
22752 * src/macrotab.c: New file.
22753 * src/macrotab.h: New file.
22754 * src/Makefile.am: Update.
22755
22756 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22757
22758 * lib/hash.c: New file.
22759 * lib/hash.h: New file.
22760 * lib/Makefile.am: Update.
22761
22762 2001-08-15 Akim Demaille <akim@epita.fr>
22763
22764 Version 1.28c.
22765
22766 2001-08-15 Marc Autret <autret_m@epita.fr>
22767
22768 * src/reader.c (readgram): Indent output macro YYSTYPE.
22769 (packsymbols): Likewise.
22770 (output_token_defines): Likewise.
22771 * src/files.c: Standardize.
22772 (compute_header_macro): New.
22773 (defines_obstack_save): New. Use compute_header_macro.
22774 (output_files): Update. Use defines_obstack_save.
22775
22776 2001-08-15 Akim Demaille <akim@epita.fr>
22777
22778 * doc/bison.texinfo (Table of Symbols): Document
22779 YYSTACK_USE_ALLOCA.
22780
22781 2001-08-15 Akim Demaille <akim@epita.fr>
22782
22783 * missing: Update from CVS Automake.
22784 * config/config.guess, config/config.sub, config/texinfo.tex:
22785 Update from gnu.org.
22786
22787 2001-08-15 Akim Demaille <akim@epita.fr>
22788
22789 * Makefile.maint: Sync with CVS Autoconf.
22790
22791 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
22792
22793 * doc/bison.texinfo: Include GNU Free Documentation License from
22794 `fdl.texi'.
22795 * doc/fdl.texi: Add to package.
22796
22797 2001-08-14 Marc Autret <autret_m@epita.fr>
22798
22799 Turn on %{source,header}_extension features.
22800
22801 * src/lex.c (percent_table): Un-CPP out header_extension and
22802 source_extension.
22803 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
22804 (compute_exts_from_src): Remove conditions. It restores priorities
22805 between options.
22806
22807 2001-08-14 Marc Autret <autret_m@epita.fr>
22808
22809 * src/files.c (compute_base_names): Add extensions computing when
22810 `--file-prefix' used.
22811 Standardize function calls.
22812
22813 2001-08-13 Marc Autret <autret_m@epita.fr>
22814
22815 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
22816 defining it (defined but null disables alloca).
22817
22818 2001-08-13 Marc Autret <autret_m@epita.fr>
22819
22820 * src/bison.simple (_yy_memcpy): CPP reformat.
22821
22822 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
22823
22824 * tests/atconfig.in (CPPFLAGS): Fix.
22825
22826 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
22827
22828 * doc/bison.texinfo: Include GNU General Public License from
22829 `gpl.texi'.
22830 * doc/gpl.texi: Add to package.
22831
22832 2001-08-10 Marc Autret <autret_m@epita.fr>
22833
22834 * src/print_graph.h: Fix.
22835 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
22836
22837 2001-08-10 Akim Demaille <akim@epita.fr>
22838
22839 * src/system.h: Provide default declarations for stpcpy, strndup,
22840 and strnlen.
22841
22842 2001-08-10 Robert Anisko <anisko_r@epita.fr>
22843
22844 * doc/bison.texinfo (Locations): Update @$ stuff.
22845
22846 2001-08-09 Robert Anisko <anisko_r@epita.fr>
22847
22848 * src/bison.simple (YYLLOC_DEFAULT): Update.
22849 (yyparse): Adjust.
22850
22851 2001-08-08 Marc Autret <autret_m@epita.fr>
22852
22853 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
22854 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22855 Reported by Fabrice Bauzac.
22856
22857 2001-08-08 Marc Autret <autret_m@epita.fr>
22858
22859 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22860 * src/vcg.c (output_node): Fix.
22861 * src/vcg.h: Cleanup.
22862 * src/print_graph.c: Add comments.
22863 (node_output_size): New global variable. Simplify the formatting of
22864 the VCG graph output.
22865 (print_actions): Unused code is now used. It notifies the final state
22866 and no action states in the VCG graph. It also give the reduce actions.
22867 The `shift and goto' edges are red and the `go to state' edges are
22868 blue.
22869 Get the current node name and node_obstack by argument.
22870 (node_obstack): New variable.
22871 (print_state): Manage node_obstack.
22872 (print_core): Use node_obstack given by argument.
22873 A node is not only computed here but in print_actions also.
22874 (print_graph): CPP out useless code instead of commenting it.
22875
22876 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22877
22878 * tests/atconfig.in (CPPFLAGS): Fix.
22879
22880 2001-08-07 Akim Demaille <akim@epita.fr>
22881
22882 * src/print_graph.c (quote): New.
22883 (print_core): Use it.
22884
22885 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22886
22887 * src/vcg.c (complain.h): Include it.
22888 Unepitaize `return' invocations.
22889 [NDEBUG] (main): Remove.
22890 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22891 * src/files.c (open_files): Initialize graph_obstack.
22892 * src/print_graph.c (print_actions): CPP out useless code.
22893 (print_core): Don't output the last `\n' in labels.
22894 Use `quote'.
22895 * src/files.c (output_files): Output the VCG file.
22896 * src/main.c (main): Invoke print_graph ();
22897
22898 2001-08-06 Marc Autret <autret_m@epita.fr>
22899
22900 Automaton VCG graph output.
22901 Using option ``-g'' or long option ``--graph'', you can generate
22902 a gram_filename.vcg file containing a VCG description of the LALR (1)
22903 automaton of your grammar.
22904
22905 * src/main.c: Call to print_graph() function.
22906 * src/getargs.h: Update.
22907 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22908 (graph_flag): New flag.
22909 (longopts): Update.
22910 (getargs): Add case `g'.
22911 * src/files.c (graph_obstack): New obstack struct.
22912 (open_files): Initialize new obstack.
22913 (output_files): Saves graph_obstack if required.
22914 * src/files.h (graph_obstack): New extern declaration.
22915 * src/Makefile.am: Add new source files.
22916
22917 2001-08-06 Marc Autret <autret_m@epita.fr>
22918
22919 * src/print_graph.c, src/print_graph.h (graph): New.
22920 * src/vcg.h: New file.
22921 * src/vcg.c: New file, VCG graph handling.
22922
22923 2001-08-06 Marc Autret <autret_m@epita.fr>
22924
22925 Add of %source_extension and %header_extension which specify
22926 the source or/and the header output file extension.
22927
22928 * src/files.c (compute_base_names): Remove initialisation of
22929 src_extension and header_extension.
22930 (compute_exts_from_gf): Update.
22931 (compute_exts_from_src): Update.
22932 (output_files): Update.
22933 * src/reader.c (parse_header_extension_decl): New.
22934 (parse_source_extension_decl): New.
22935 (read_declarations): New case statements for the new tokens.
22936 * src/lex.c (percent_table): Add entries for %source_extension
22937 and %header_extension.
22938 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22939
22940 2001-08-06 Marc Autret <autret_m@epita.fr>
22941
22942 * configure.in: Bump to 1.28c.
22943 * doc/bison.texinfo: Texinfo thingies.
22944
22945 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22946
22947 * tests/atconfig.in (CPPFLAGS): Add.
22948 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22949
22950 2001-08-03 Akim Demaille <akim@epita.fr>
22951
22952 Version 1.28b.
22953
22954 2001-08-03 Akim Demaille <akim@epita.fr>
22955
22956 * tests/Makefile.am (check-local): Ship testsuite.
22957 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22958 Include `string.h'.
22959
22960 2001-08-03 Akim Demaille <akim@epita.fr>
22961
22962 * configure.in: Try using -Wformat when compiling.
22963
22964 2001-08-03 Akim Demaille <akim@epita.fr>
22965
22966 * configure.in: Bump to 1.28b.
22967
22968 2001-08-03 Akim Demaille <akim@epita.fr>
22969
22970 * src/complain.c: Adjust strerror_r portability issues.
22971
22972 2001-08-03 Akim Demaille <akim@epita.fr>
22973
22974 Version 1.28a.
22975
22976 2001-08-03 Akim Demaille <akim@epita.fr>
22977
22978 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22979 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22980 * src/getargs.c: Include complain.h.
22981 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22982 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22983
22984 2001-08-03 Akim Demaille <akim@epita.fr>
22985
22986 * src/reader.c (readgram): Display hidden chars in error messages.
22987
22988 2001-08-03 Akim Demaille <akim@epita.fr>
22989
22990 Update to gettext 0.10.39.
22991
22992 2001-08-03 Akim Demaille <akim@epita.fr>
22993
22994 * lib/strspn.c: New.
22995
22996 2001-08-01 Marc Autret <autret_m@epita.fr>
22997
22998 * doc/bison.texinfo: Update.
22999 * doc/bison.1 (mandoc): Update.
23000 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23001 * src/files.c: Support output files extensions computing.
23002 (src_extension): New static variable.
23003 (header_extension): New static variable.
23004 (tr): New function.
23005 (get_extension_index): New function, gets the index of an extension
23006 filename in a string.
23007 (compute_exts_from_gf): New function, computes extensions from the
23008 grammar file extension.
23009 (compute_exts_from_src): New functions, computes extensions from the
23010 C source file extension, file given by ``-o'' option.
23011 (compute_base_names): Update.
23012 (output_files): Update.
23013
23014 2001-08-01 Robert Anisko <anisko_r@epita.fr>
23015
23016 * doc/bison.texi: Document @$.
23017 (Locations): New section.
23018
23019 2001-07-18 Akim Demaille <akim@epita.fr>
23020
23021 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23022 * config/prev-version.txt, config/move-if-change: New.
23023 * Makefile.am: Adjust.
23024
23025 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
23026
23027 * src/bison.simple (yyparse): Suppress warning `comparaison
23028 between signed and unsigned'.
23029
23030 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
23031
23032 * src/getargs.h (raw_flag): Remove.
23033 * src/getargs.c: Die on `-r'/`--raw'.
23034 * src/lex.c (parse_percent_token): Die on `%raw'.
23035 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23036 * tests/calc.at: Suppress test with option `--raw'.
23037
23038 2001-07-14 Akim Demaille <akim@epita.fr>
23039
23040 * config/: New.
23041 * configure.in: Require Autoconf 2.50.
23042 Update to gettext 0.10.38.
23043
23044 2001-03-16 Akim Demaille <akim@epita.fr>
23045
23046 * doc/bison.texinfo: ANSIfy the examples.
23047
23048 2001-03-16 Akim Demaille <akim@epita.fr>
23049
23050 * getargs.c (skeleton): New variable.
23051 (longopts): --skeleton is a new option.
23052 (shortopts, getargs): -S is a new option.
23053 * getargs.h: Declare skeleton.
23054 * output.c (output_parser): Use it.
23055
23056 2001-03-16 Akim Demaille <akim@epita.fr>
23057
23058 * m4/strerror_r.m4: New.
23059 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23060 * lib/error.h, lib/error.c: Update.
23061
23062 2001-03-16 Akim Demaille <akim@epita.fr>
23063
23064 * src/getargs.c (longopts): Clean up.
23065
23066 2001-02-21 Akim Demaille <akim@epita.fr>
23067
23068 * src/reader.c (gensym): `gensym_count' is your own.
23069 Use a static buf to create the symbol name, as token_buffer is no
23070 longer a buffer.
23071
23072 2001-02-08 Akim Demaille <akim@epita.fr>
23073
23074 * src/conflicts.c (conflict_report): Be sure not to append to res
23075 between two calls, which could happen if both first sprintf were
23076 skipped, but not the first cp += strlen.
23077
23078 2001-02-08 Akim Demaille <akim@epita.fr>
23079
23080 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23081 New, from fileutils 4.0.37.
23082 * configure.in: Require Autoconf 2.49c. I took some time before
23083 making this decision. This is the only way out for portability
23084 issues in Bison, it would mean way too much duplicate effort to
23085 import in Bison features implemented in 2.49c since 2.13.
23086 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23087
23088 2001-02-02 Akim Demaille <akim@epita.fr>
23089
23090 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
23091 * lib/xalloc.h, lib/xmalloc.c: Update.
23092
23093 2001-01-19 Akim Demaille <akim@epita.fr>
23094
23095 Get rid of the ad hoc handling of token_buffer in the scanner: use
23096 the obstacks.
23097
23098 * src/lex.c (token_obstack): New.
23099 (init_lex): Initialize it. No longer call...
23100 (grow_token_buffer): this. Remove it.
23101 Adjust all the places which used it to use the obstack.
23102
23103 2001-01-19 Akim Demaille <akim@epita.fr>
23104
23105 * src/lex.h: Rename all the tokens:
23106 s/\bENDFILE\b/tok_eof/g;
23107 s/\bIDENTIFIER\b/tok_identifier/g;
23108 etc.
23109 Let them be enums, not #define, to ease debugging.
23110 Adjust all the code.
23111
23112 2001-01-18 Akim Demaille <akim@epita.fr>
23113
23114 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23115 * src/lex.c (maxtoken, grow_token_buffer): Static.
23116
23117 2001-01-18 Akim Demaille <akim@epita.fr>
23118
23119 Since we now use obstacks, more % directives can be enabled.
23120
23121 * src/lex.c (percent_table): Also accept `%yacc',
23122 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23123 `%debug'.
23124 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23125 instead of returning a token.
23126 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23127 * src/reader.c (read_declarations): Adjust.
23128 * src/files.c (open_files): Don't call `compute_base_names', don't
23129 compute `attrsfile' since they depend upon data which might be
23130 *in* the input file now.
23131 (output_files): Do it here.
23132 * src/output.c (output_headers): Document the fact that this patch
23133 introduces a guaranteed SEGV for semantic parsers.
23134 * doc/bison.texinfo: Document them.
23135 * tests/suite.at: Exercise these %options.
23136
23137 2000-12-20 Akim Demaille <akim@epita.fr>
23138
23139 Also handle the output file (--verbose) with obstacks.
23140
23141 * files.c (foutput): Remove.
23142 (output_obstack): New.
23143 Adjust all dependencies.
23144 * src/conflicts.c: Return a string.
23145 * src/system.h (obstack_grow_string): Rename as...
23146 (obstack_sgrow): this. Be ready to work with non literals.
23147 (obstack_fgrow4): New.
23148
23149 2000-12-20 Akim Demaille <akim@epita.fr>
23150
23151 * src/files.c (open_files): Fix the computation of short_base_name
23152 in the case of `-o foo.tab.c'.
23153
23154 2000-12-20 Akim Demaille <akim@epita.fr>
23155
23156 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23157 (copy_dollar): Now that everything uses obstacks, get rid of the
23158 FILE * parameters.
23159
23160 2000-12-20 Akim Demaille <akim@epita.fr>
23161
23162 * src/files.c (open_files): Actually the `.output' file is based
23163 on the short_base_name, not base_name.
23164 * tests/suite.at (Checking output file names): Adjust.
23165
23166 2000-12-20 Akim Demaille <akim@epita.fr>
23167
23168 * src/bison.s1: Remove, we now use directly...
23169 * src/bison.simple: this.
23170 * src/Makefile.am: Use pkgdata instead of data.
23171
23172 2000-12-20 Akim Demaille <akim@epita.fr>
23173
23174 * src/files.c (guard_obstack): New.
23175 (open_files): Initialize it.
23176 (output_files): Dump it...
23177 * src/files.h: Export it.
23178 * src/reader.c (copy_guard): Use it.
23179
23180 2000-12-19 Akim Demaille <akim@epita.fr>
23181
23182 * src/files.c (outfile, defsfile, actfile): Removed as global
23183 vars.
23184 (open_files): Don't compute them.
23185 (output_files): Adjust.
23186 (base_name, short_base_name): Be global.
23187 Adjust dependencies.
23188
23189 2000-12-19 Akim Demaille <akim@epita.fr>
23190
23191 * src/files.c (strsuffix): New.
23192 (stringappend): Be just like strcat but allocate.
23193 (base_names): Eve out from open_files.
23194 Try to simplify the rather hairy computation of base_name and
23195 short_base_name.
23196 (open_files): Use it.
23197 * tests/suite.at (Checking output file names): New test.
23198
23199 2000-12-19 Akim Demaille <akim@epita.fr>
23200
23201 * src/system.h (obstack_grow_literal_string): Rename as...
23202 (obstack_grow_string): this.
23203 * src/output.c (output_parser): Recognize `%% actions' instead of
23204 `$'.
23205 * src/bison.s1: s/$/%% actions/.
23206 * src/bison.hairy: Likewise.
23207
23208 2000-12-19 Akim Demaille <akim@epita.fr>
23209
23210 * src/output.c (output_parser): Compute the `#line' lines when
23211 there are.
23212 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23213 Suggested by Hans Aberg.
23214
23215 2000-12-19 Akim Demaille <akim@epita.fr>
23216
23217 Let the handling of the skeleton files be local to the procedures
23218 that use it.
23219
23220 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23221 longer static.
23222 (fparser, open_extra_files): Remove.
23223 (open_files, output_files): Don't take care of fparser.
23224 * src/files.h: Adjust.
23225 * src/output.c (output_parser): Open and close the file to the
23226 skeleton.
23227 * src/reader.c (read_declarations): When %semantic_parser, open
23228 fguard.
23229
23230 2000-12-19 Akim Demaille <akim@epita.fr>
23231
23232 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23233 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23234
23235 2000-12-19 Akim Demaille <akim@epita.fr>
23236
23237 * src/files.c (open_files): Yipee! We no longer need all the code
23238 looking for `/tmp' since we have no tmp file.
23239
23240 2000-12-19 Akim Demaille <akim@epita.fr>
23241
23242 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23243 New macros.
23244 * src/files.c (open_files): Less dependency on MSDOS etc.
23245
23246 2000-12-14 Akim Demaille <akim@epita.fr>
23247
23248 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23249 Provide a default definition.
23250 Use it when executing the default @ action.
23251 * src/reader.c (reader_output_yylsp): No longer include
23252 `timestamp' and `text' in the default YYLTYPE.
23253
23254 2000-12-12 Akim Demaille <akim@epita.fr>
23255
23256 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23257 (copy_guard): Quote the file names.
23258 Reported by Laurent Mascherpa.
23259
23260 2000-12-12 Akim Demaille <akim@epita.fr>
23261
23262 * src/output.c (output_headers, output_program, output): Be sure
23263 to escape special characters when outputting filenames.
23264 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23265 (output_headers): Don't depend on them, Use ACTSTR.
23266
23267 2000-11-17 Akim Demaille <akim@epita.fr>
23268
23269 * lib/obstack.h: Formatting changes.
23270 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23271 prevents type checking.
23272 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23273 cast the value to (void *): assigning a `foo *' to a `void *'
23274 variable is valid.
23275 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23276 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23277 append characters.
23278
23279 2000-11-17 Akim Demaille <akim@epita.fr>
23280
23281 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23282 as...
23283 (suite.m4, regression.m4, calc.m4): these.
23284 * tests/atgeneral.m4: Update from CVS Autoconf.
23285
23286 2000-11-17 Akim Demaille <akim@epita.fr>
23287
23288 * tests/regression.m4 (%union and --defines): New test,
23289 demonstrating a current bug in the obstack implementation.
23290
23291 2000-11-17 Akim Demaille <akim@epita.fr>
23292
23293 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23294 macros.
23295 Use them to declare the variables which are global or local to
23296 `yyparse'.
23297
23298 2000-11-17 Akim Demaille <akim@epita.fr>
23299
23300 * acconfig.h: Remove, no longer used.
23301
23302 2000-11-07 Akim Demaille <akim@epita.fr>
23303
23304 * src: s/Copyright (C)/Copyright/g.
23305
23306 2000-11-07 Akim Demaille <akim@epita.fr>
23307
23308 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23309 defining.
23310 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23311
23312 2000-11-07 Akim Demaille <akim@epita.fr>
23313
23314 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23315 Merge in a single CPP if/else.
23316
23317 2000-11-07 Akim Demaille <akim@epita.fr>
23318
23319 * src/output.c (output): Remove useless variables.
23320 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23321 argument `data' for consistency with the prototypes.
23322 Qualify it `const'.
23323 (obstack_copy, obstack_copy0): Rename the second argument as
23324 `address' for consistency. Qualify it `const'.
23325 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23326 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23327 `const' their input argument (`data' or `address').
23328 Adjust the corresponding macros to include `const' in casts.
23329
23330 2000-11-03 Akim Demaille <akim@epita.fr>
23331
23332 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23333 s/PFILE1/BISON_HAIRY/.
23334 Adjust dependencies.
23335
23336 2000-11-03 Akim Demaille <akim@epita.fr>
23337
23338 For some reason, this was not applied.
23339
23340 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23341 `unlink': it's no longer used.
23342
23343 2000-11-03 Akim Demaille <akim@epita.fr>
23344
23345 * src/files.c (skeleton_find): New function, eved out of...
23346 (open_files, open_extra_files): here.
23347
23348 2000-11-03 Akim Demaille <akim@epita.fr>
23349
23350 Don't use `atexit'.
23351
23352 * src/files.c (obstack_save): New function.
23353 (done): Rename as...
23354 (output_files): this.
23355 Use `obstack_save'.
23356 * src/main.c (main): Don't use `atexit' to register `done', since
23357 it no longer has to remove tmp files, just call `output_files'
23358 when there are no errors.
23359
23360 2000-11-02 Akim Demaille <akim@epita.fr>
23361
23362 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23363 `unlink': it's no longer used.
23364 * src/files.h: Formatting changes.
23365
23366 2000-11-02 Akim Demaille <akim@epita.fr>
23367
23368 Remove the last uses of mktemp and unlink/delete.
23369
23370 * src/files.c (fdefines, ftable): Removed.
23371 (defines_ostack, table_obstack): New.
23372 Adjust dependencies of the former into uses of the latter.
23373 * src/output.c (output_short_or_char_table, output_short_table):
23374 Convert to using obstacks.
23375 * src/reader.c (copy_comment2): Accept one FILE * and two
23376 obstacks.
23377 (output_token_defines, reader_output_yylsp): Use obstacks.
23378 * src/system.h (obstack_fgrow3): New.
23379 * po/POTFILES.in: Adjust.
23380
23381 2000-11-01 Akim Demaille <akim@epita.fr>
23382
23383 Change each use of `fattrs' into a use of `attrs_obstack'.
23384
23385 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
23386 * src/files.c (fattrs): Remove.
23387 (attrs_obstack): New.
23388 Adjust all dependencies.
23389 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
23390
23391 2000-11-01 Akim Demaille <akim@epita.fr>
23392
23393 Introduce obstacks.
23394 Change each use of `faction' into a use of `action_obstack'.
23395
23396 * lib/obstack.h, lib/obstack.c: New files.
23397 * src/files.c (faction): Remove.
23398 (action_obstack): New.
23399 Adjust all dependencies.
23400
23401 2000-10-20 Akim Demaille <akim@epita.fr>
23402
23403 * lib/quote.h (PARAMS): New macro. Use it.
23404
23405 2000-10-16 Akim Demaille <akim@epita.fr>
23406
23407 * src/output.c (output_short_or_char_table): New function.
23408 (output_short_table, output_token_translations): Use it.
23409 (goto_actions): Use output_short_table.
23410
23411 2000-10-16 Akim Demaille <akim@epita.fr>
23412
23413 * src/symtab.c (bucket_new): New function.
23414 (getsym): Use it.
23415
23416 * src/output.c (output_short_table): New argument to display the
23417 comment associated with the table.
23418 Adjust dependencies.
23419 (output_gram): Use it.
23420 (output_rule_data): Nicer output layout for YYTNAME.
23421
23422 2000-10-16 Akim Demaille <akim@epita.fr>
23423
23424 * src/lex.c (read_typename): New function.
23425 (lex): Use it.
23426 * src/reader.c (copy_dollar): Likewise.
23427
23428 2000-10-16 Akim Demaille <akim@epita.fr>
23429
23430 * src/reader.c (copy_comment2): Expect the input stream to be on
23431 the `/' which is suspected to open a comment, instead of being
23432 called after `//' or `/*' was read.
23433 (copy_comment, copy_definition, parse_union_decl, copy_action)
23434 (copy_guard): Adjust.
23435
23436 2000-10-16 Akim Demaille <akim@epita.fr>
23437
23438 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
23439 `read_signed_integer'.
23440
23441 2000-10-16 Akim Demaille <akim@epita.fr>
23442
23443 * src/reader.c (copy_dollar): New function.
23444 (copy_guard, copy_action): Use it.
23445
23446 2000-10-16 Akim Demaille <akim@epita.fr>
23447
23448 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
23449 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
23450 New files, from Fileutils 4.0.27.
23451 * src/main.c (printable_version): Remove.
23452 * src/lex.c, src/reader.c: Use `quote'.
23453
23454 2000-10-04 Akim Demaille <akim@epita.fr>
23455
23456 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
23457
23458 2000-10-04 Akim Demaille <akim@epita.fr>
23459
23460 * doc/bison.texinfo: Various typos spotted by Neil Booth.
23461
23462 2000-10-04 Akim Demaille <akim@epita.fr>
23463
23464 When a literal string is used to define two different tokens,
23465 `bison -v' segfaults.
23466 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
23467
23468 * tests/regression.m4: New file.
23469 Include the core of the sample provided by Piotr Gackiewicz.
23470 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
23471 properly.
23472
23473 2000-10-04 Akim Demaille <akim@epita.fr>
23474
23475 * src/reader.c (parse_expect_decl): Keep `count' within the size
23476 of `buffer'.
23477 From Neil Booth.
23478
23479 2000-10-02 Paul Eggert <eggert@twinsun.com>
23480
23481 * bison.s1 (yyparse): Assign the default value
23482 unconditionally, to avoid a GCC warning and make the parser a
23483 tad smaller.
23484
23485 2000-10-02 Akim Demaille <akim@epita.fr>
23486
23487 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
23488 options.
23489
23490 2000-10-02 Akim Demaille <akim@epita.fr>
23491
23492 * src/derives.c, src/print.c, src/reduce.c: To ease the
23493 translation, move some `\n' out of the translated strings.
23494
23495 2000-10-02 Akim Demaille <akim@epita.fr>
23496
23497 The location tracking mechanism is precious for parse error
23498 messages. Nevertheless, it is enabled only when `@n' is used in
23499 the grammar, which is a different issue (you can use it in error
23500 message, but not in the grammar per se). Therefore, there should
23501 be another means to enable it.
23502
23503 * src/getargs.c (getargs): Support `--locations'.
23504 (usage): Report it.
23505 * src/getargs.h (locationsflag): Export it.
23506 * src/lex.c (percent_table): Support `%locations'.
23507 * src/reader.c (yylsp_needed): Remove this variable, now replaced
23508 with `locationsflag'.
23509 * doc/bison.texinfo: Document `--locations' and `%locations'.
23510 Sort the options.
23511 * tests/calc.m4: Test it.
23512
23513 For regularity of the names, replace each
23514 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
23515 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
23516 In addition replace each `flag' with `_flag'.
23517
23518 2000-10-02 Akim Demaille <akim@epita.fr>
23519
23520 Also test parse error messages, including with YYERROR_VERBOSE.
23521
23522 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
23523 associative).
23524 Use it to check the computations.
23525 Use it to check `nonassoc' is honored.
23526 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
23527 `--yyerror-verbose'.
23528 (_AT_CHECK_CALC): Adjust to this option.
23529 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
23530
23531 2000-10-02 Akim Demaille <akim@epita.fr>
23532
23533 Test also `--verbose', `--defines' and `--name-prefix'. Testing
23534 the latter demonstrates a flaw in the handling of non debugging
23535 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
23536 was used in order to simplify:
23537
23538 #if YYDEBUG
23539 if (yydebug)
23540 {
23541 ...
23542 }
23543 #endif
23544
23545 into
23546
23547 if (yydebug)
23548 {
23549 ...
23550 }
23551
23552 unfortunately this leads to a CPP conflict when
23553 `--name-prefix=foo' is used since it produces `#define yydebug
23554 foodebug'.
23555
23556 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
23557 (YYDPRINTF): New macro.
23558 Spread its use.
23559 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
23560 the bison options.
23561 Also test `--verbose', `--defines' and `--name-prefix'.
23562
23563 2000-10-02 Akim Demaille <akim@epita.fr>
23564
23565 Improve the readability of the produced parsers.
23566
23567 * src/bison.s1: Formatting changes.
23568 Improve the comment related to the `$' mark.
23569 (yydefault): Don't fall through to `yyresume': `goto' there.
23570 * src/output.c (output_parser): When the `$' is met, skip the end
23571 of its line.
23572 New variable, `number_of_dollar_signs', to check there's exactly
23573 one `$' in the parser skeleton.
23574
23575 2000-10-02 Akim Demaille <akim@epita.fr>
23576
23577 * lib/xstrdup.c: New file, from the fileutils.
23578 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
23579 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
23580 instead of strlen + xmalloc + strcpy.
23581 * src/symtab.c (copys): Remove, use xstrdup instead.
23582
23583 2000-10-02 Akim Demaille <akim@epita.fr>
23584
23585 * src/gram.h (associativity): New enum type which replaces the
23586 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
23587 `right_assoc', `left_assoc' and `non_assoc'.
23588 Adjust all dependencies.
23589 * src/reader.c: Formatting changes.
23590 (LTYPESTR): Don't define it, use it as a literal in
23591 `reader_output_yylsp'.
23592 * src/symtab.h (symbol_class): New enum type which replaces the
23593 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
23594 `sunknown', `stoken and `snterm'.
23595
23596 2000-10-02 Akim Demaille <akim@epita.fr>
23597
23598 * src/getargs.c (fixed_outfiles): Rename as...
23599 (yaccflag): for consistency and accuracy.
23600 Adjust dependencies.
23601
23602 2000-10-02 Akim Demaille <akim@epita.fr>
23603
23604 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
23605 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
23606 difficult and introduced a lot of core dump. It turns out that
23607 Bison used an implementation of `xmalloc' based on `calloc', and
23608 at various places it does depend upon the initialization to 0. I
23609 have not tried to isolate the pertinent places, and all the former
23610 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
23611 someone should address this issue.
23612
23613 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
23614 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
23615 files.
23616 Adjust dependencies.
23617 * src/warshall.h: New file.
23618 Propagate.
23619
23620 2000-10-02 Akim Demaille <akim@epita.fr>
23621
23622 Various anti-`extern in *.c' changes.
23623
23624 * src/system.h: Include `assert.h'.
23625
23626 2000-10-02 Akim Demaille <akim@epita.fr>
23627
23628 * src/state.h (nstates, final_state, first_state, first_shift)
23629 (first_reduction): Move their exportation from here...
23630 * src/LR0.h: to here.
23631 Adjust dependencies.
23632 * src/getargs.c (statisticsflag): New variable.
23633 Add support for `--statistics'.
23634 Adjust dependencies.
23635
23636 Remove a lot of now useless `extern' statements in most files.
23637
23638 2000-10-02 Akim Demaille <akim@epita.fr>
23639
23640 * src/LR0.h: New file.
23641 Propagate its use.
23642
23643 2000-10-02 Akim Demaille <akim@epita.fr>
23644
23645 * src/print.h: New file.
23646 Propagate its use.
23647 * src/print.c: Formatting and ordering changes.
23648 (verbose, terse): Replace with...
23649 (print_results): this new function.
23650 Adjust dependencies.
23651
23652 2000-10-02 Akim Demaille <akim@epita.fr>
23653
23654 * src/conflicts.c (conflict_report): New function.
23655 (conflict_log, verbose_conflict_log): Replace with...
23656 (print_conflicts): this function.
23657 Adjust dependencies.
23658 * src/conflicts.h: New file.
23659 Propagate its inclusion.
23660
23661 2000-10-02 Akim Demaille <akim@epita.fr>
23662
23663 * src/nullable.h: New file.
23664 Propagate its inclusion.
23665 * src/nullable.c: Formatting changes.
23666
23667 2000-10-02 Akim Demaille <akim@epita.fr>
23668
23669 * src/reduce.h: New file.
23670 Propagate its inclusion.
23671 * src/reduce.c: Topological sort and other formatting changes.
23672 (bool, TRUE, FALSE): Move their definition to...
23673 * src/system.h: here.
23674
23675 2000-10-02 Akim Demaille <akim@epita.fr>
23676
23677 * src/files.c: Formatting changes.
23678 (tryopen, tryclose, openfiles): Rename as...
23679 (xfopen, xfclose, open_files): this.
23680 (stringappend): static.
23681 * src/files.h: Complete the list of exported symbols.
23682 Propagate its use.
23683
23684 2000-10-02 Akim Demaille <akim@epita.fr>
23685
23686 * src/reader.h: New file.
23687 Propagate its use instead of tedious list of `extern' and
23688 prototypes.
23689 * src/reader.c: Formatting changes, topological sort,
23690 s/register//.
23691
23692 2000-10-02 Akim Demaille <akim@epita.fr>
23693
23694 * src/lex.h: Prototype `lex.c' exported functions.
23695 * src/reader.c: Adjust.
23696 * src/lex.c: Formatting changes.
23697 (safegetc): Rename as...
23698 (xgetc): this.
23699
23700 2000-10-02 Akim Demaille <akim@epita.fr>
23701
23702 * src/lalr.h: New file.
23703 Propagate its inclusion instead of prototypes and `extern'.
23704 * src/lalr.c: Formatting changes, topological sorting etc.
23705
23706 2000-10-02 Akim Demaille <akim@epita.fr>
23707
23708 * src/output.c (token_actions): Introduce a temporary array,
23709 YYDEFACT, that makes it possible for this function to use
23710 output_short_table.
23711
23712 2000-10-02 Akim Demaille <akim@epita.fr>
23713
23714 `user_toknums' is output as a `short[]' in `output.c', while it is
23715 defined as a `int[]' in `reader.c'. For consistency with the
23716 other output tables, `user_toknums' is now defined as a table of
23717 shorts.
23718
23719 * src/reader.c (user_toknums): Be a short table instead of an int
23720 table.
23721 Adjust dependencies.
23722
23723 Factor the short table outputs.
23724
23725 * src/output.c (output_short_table): New function.
23726 * src/output.c (output_gram, output_stos, output_rule_data)
23727 (output_base, output_table, output_check): Use it.
23728
23729 2000-10-02 Akim Demaille <akim@epita.fr>
23730
23731 * src/output.c (output): Topological sort of the functions, in
23732 order to get rid of the `static' prototypes.
23733 No longer use `register'.
23734 * src/output.h: New file.
23735 Propagate its inclusion in files explicitly prototyping functions
23736 from output.c.
23737
23738 2000-09-21 Akim Demaille <akim@epita.fr>
23739
23740 * src/atgeneral.m4: Update from Autoconf.
23741
23742 2000-09-21 Akim Demaille <akim@epita.fr>
23743
23744 * src/closure.h: New file.
23745 * src/closure.c: Formatting changes, topological sort over the
23746 functions, use of closure.h.
23747 (initialize_closure, finalize_closure): Rename as...
23748 (new_closure, free_closure): these. Adjust dependencies.
23749 * src/LR0.c: Formatting changes, topological sort, use of
23750 cloture.h.
23751 (initialize_states): Rename as...
23752 (new_states): this.
23753 * src/Makefile.am (noinst_HEADERS): Adjust.
23754
23755 2000-09-20 Akim Demaille <akim@epita.fr>
23756
23757 * src/acconfig.h: Don't protect config.h against multiple
23758 inclusion.
23759 Don't define PARAMS.
23760 * src/system.h: Define PARAMS.
23761 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
23762 purpose of config.h. system.h must not try to fix wrong
23763 definitions in config.h.
23764
23765 2000-09-20 Akim Demaille <akim@epita.fr>
23766
23767 * src/derives.h: New file.
23768 * src/main.c, src/derives.h: Use it.
23769 Formatting changes.
23770 * src/Makefile.am (noinst_HEADERS): Adjust.
23771
23772 2000-09-20 Akim Demaille <akim@epita.fr>
23773
23774 * tests/atgeneral.m4: Update from Autoconf.
23775 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
23776 (AT_CHECK_CALC): New macros.
23777 Use these macros to test bison with options `', `--raw',
23778 `--debug', `--yacc', `--yacc --debug'.
23779
23780 2000-09-19 Akim Demaille <akim@epita.fr>
23781
23782 * src/output.c: Formatting changes.
23783 * src/machine.h: Remove, leaving its contents in...
23784 * src/system.h: here.
23785 Include stdio.h.
23786 Adjust all dependencies on stdio.h and machine.h.
23787 * src/getargs.h: New file.
23788 Let all `extern' declarations about getargs.c be replaced with
23789 inclusion of `getargs.h'.
23790 * src/Makefile.am (noinst_HEADERS): Adjust.
23791
23792 * tests/calc.m4 (yyin): Be initialized in main, not on the global
23793 scope.
23794 (yyerror): Returns void, not int.
23795 * doc/bison.texinfo: Formatting changes.
23796
23797 2000-09-19 Akim Demaille <akim@epita.fr>
23798
23799 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
23800 portable.
23801
23802 2000-09-18 Akim Demaille <akim@epita.fr>
23803
23804 * configure.in: Append WARNING_CFLAGS to CFLAGS.
23805 * src/Makefile.am (INCLUDES): Don't.
23806 Be ready to fetch headers in lib/.
23807
23808 2000-09-18 Akim Demaille <akim@epita.fr>
23809
23810 * doc/bison.texinfo: Update the copyright.
23811 ANSIfy and GNUify the examples.
23812 Remove the old menu.
23813
23814 2000-09-18 Akim Demaille <akim@epita.fr>
23815
23816 First set of tests: use the `calc' example from the documentation.
23817
23818 * src/bison.s1 (yyparse): Condition the code using `yytname' which
23819 is defined only when YYDEBUG is.
23820 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
23821 * src/files.c (tryopen, tryclose): Formatting changes.
23822 Move to the top and be static.
23823 * src/reader.c (read_signed_integer): Likewise.
23824 * tests/calc.m4: New file.
23825 * Makefile.am, suite.m4: Adjust.
23826 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
23827
23828 2000-09-18 Akim Demaille <akim@epita.fr>
23829
23830 Add support for an Autotest test suite for Bison.
23831
23832 * m4/m4.m4, m4/atconfig.m4: New files.
23833 * m4/Makefile.am (EXTRA_DIST): Adjust.
23834 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
23835 files.
23836 * src/getargs.c: Display a more standard --version message.
23837 * src/reader.c (reader): Formatting changes.
23838 No longer depend upon VERSION_STRING.
23839 * configure.in: No longer use `dnl'.
23840 Set up the test suite and the new directory `tests/.
23841 (VERSION_STRING): Remove.
23842
23843 2000-04-14 Akim Demaille <akim@epita.fr>
23844
23845 * src/reader.c (copy_comment2): New function, same as former
23846 `copy_comment', but outputs into two FILE *.
23847 (copy_comment): Use it.
23848 (parse_union_decl): Use it.
23849 (get_type, parse_start_decl): Use the same `invalid' message.
23850 (parse_start_decl, parse_union_decl): Use the same `multiple'
23851 message.
23852 (parse_union_decl, copy_guard, copy_action): Use the same
23853 `unmatched' message.
23854 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23855
23856 2000-03-31 Akim Demaille <akim@epita.fr>
23857
23858 * src/files.c (tryopen, tryclose): Move to the top.
23859 Be static.
23860
23861 2000-03-31 Akim Demaille <akim@epita.fr>
23862
23863 * src/main.c (main): Don't call `done', exit does it.
23864
23865 2000-03-31 Akim Demaille <akim@epita.fr>
23866
23867 * allocate.c: s/return (foo)/return foo/.
23868 * lalr.c: Likewise.
23869 * LR0.c: Likewise.
23870 * output.c: Likewise.
23871 * reader.c: Likewise.
23872 * symtab.c: Likewise.
23873 * vmsgetargs.c: Likewise.
23874
23875 2000-03-31 Akim Demaille <akim@epita.fr>
23876
23877 Clean up the error reporting functions.
23878
23879 * src/report.c: New file.
23880 * src/report.h: Likewise.
23881 * src/Makefile.am: Adjust.
23882 * m4/error.m4: New file.
23883 * m4/Makefile.am: Adjust.
23884 * configure.in (jm_PREREQ_ERROR): Call it.
23885 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23886 Remove.
23887 (fatal, fatals): Remove. All callers use complain.c::fatal.
23888 (warn, warni, warns, warnss, warnss): Remove. All callers use
23889 complain.c::complain.
23890 (toomany): Remove, use fatal instead.
23891 * src/files.c (done): No argument, use complain_message_count.
23892 * src/main.c (main): Register `done' to `atexit'.
23893
23894 * src/getargs.c (usage): More `fputs', less `fprintf'.
23895
23896 2000-03-28 Akim Demaille <akim@epita.fr>
23897
23898 * lib/: New directory.
23899 * Makefile.am (SUBDIRS): Adjust.
23900 * configure.in: Adjust.
23901 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23902 useless.
23903 * src/alloca.c: Moved to lib/.
23904 * src/getopt.c: Likewise.
23905 * src/getopt1.c: Likewise.
23906 * src/getopt.h: Likewise.
23907 * src/ansi2knr.c: Likewise.
23908 * src/ansi2knr.1: Likewise.
23909 * src/Makefile.am: Adjust.
23910 * lib/Makefile.am: New file.
23911
23912 2000-03-28 Akim Demaille <akim@epita.fr>
23913
23914 * src/getargs.c (usage): Refresh the help message.
23915
23916 2000-03-17 Akim Demaille <akim@epita.fr>
23917
23918 * src/getopt1.c: Updated from textutils 2.0e
23919 * src/getopt.c: Likewise.
23920 * src/getopt.h: Likewise.
23921
23922 2000-03-17 Akim Demaille <akim@epita.fr>
23923
23924 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23925 the file name, not the whole `#line LINE FILE'.
23926
23927 2000-03-17 Akim Demaille <akim@epita.fr>
23928
23929 On syntax errors, report the token on which we choked.
23930
23931 * src/bison.s1 (yyparse): In the label yyerrlab, when
23932 YYERROR_VERBOSE, add yychar in msg.
23933
23934 2000-03-17 Akim Demaille <akim@epita.fr>
23935
23936 * src/reader.c (copy_at): New function.
23937 (copy_guard): Use it.
23938 (copy_action): Use it.
23939
23940 2000-03-17 Akim Demaille <akim@epita.fr>
23941
23942 Be kind to translators, save some useless translations.
23943
23944 * src/main.c (banner): New function.
23945 (fatal_banner): Use it.
23946 (warn_banner): Use it.
23947
23948 2000-03-17 Akim Demaille <akim@epita.fr>
23949
23950 * src/reader.c (copy_definition): Use copy_string and
23951 copy_comment. Removed now unused `match', `ended',
23952 `cplus_comment'.
23953 (copy_comment, copy_string): Moved, to be visible from
23954 copy_definition.
23955
23956 2000-03-17 Akim Demaille <akim@epita.fr>
23957
23958 * src/reader.c (copy_string): Declare `static inline'. No
23959 problems with inline, since it is checked by configure.
23960 (copy_comment): Likewise.
23961
23962 2000-03-17 Akim Demaille <akim@epita.fr>
23963
23964 * src/reader.c (packsymbols): Formatting changes.
23965
23966 2000-03-17 Akim Demaille <akim@epita.fr>
23967
23968 * src/reader.c (copy_comment): New function, factored out from:
23969 (copy_action): Use it. Removed now unused `match', `ended',
23970 `cplus_comment'.
23971 (copy_guard): Likewise.
23972
23973 2000-03-17 Akim Demaille <akim@epita.fr>
23974
23975 * src/reader.c (copy_string): New function, factored out from:
23976 (copy_action): Use it.
23977 (copy_guard): Likewise.
23978
23979 2000-03-17 Akim Demaille <akim@epita.fr>
23980
23981 Change the handling of @s so that they behave exactly like $s.
23982 There is now a pseudo variable @$ (readble and writable), location
23983 of the lhs of the rule (by default ranging from the location of
23984 the first symbol of the rhs, to the location of the last symbol,
23985 or, if the rhs is empty, YYLLOC).
23986
23987 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23988 yyval.
23989 (yyparse): When providing a default semantic action, provide a
23990 default location action.
23991 (after the $): No longer change `*YYLSP', just stack YYLOC the
23992 same way you stack YYVAL.
23993 * src/reader.c (read_declarations): Use warns.
23994 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23995 (copy_action, case '@'): Likewise.
23996 Use a standard error message, to save useless work from
23997 translators.
23998
23999 2000-03-17 Akim Demaille <akim@epita.fr>
24000
24001 * src/bison.s1: Formatting and cosmetics changes.
24002 * src/reader.c: Likewise.
24003 Update the Copyright notice.
24004
24005 2000-03-17 Akim Demaille <akim@epita.fr>
24006
24007 * src/bison.s1 (#line): All set to `#line' only, since the
24008 Makefile now handles them.
24009
24010 2000-03-16 Akim Demaille <akim@epita.fr>
24011
24012 * src/output.c (output_rule_data): Output the documentation of
24013 some of the tables.
24014 (Copyright notice): Update.
24015 Formatting changes.
24016
24017 2000-03-16 Akim Demaille <akim@epita.fr>
24018
24019 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24020 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24021 One `#if YYDEBUG' remains, since it uses variables which are
24022 defined only if `YYDEBUG != 0'.
24023
24024 2000-03-16 Akim Demaille <akim@epita.fr>
24025
24026 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24027 and related variables so that the similarities are highlighted.
24028
24029 2000-03-16 Akim Demaille <akim@epita.fr>
24030
24031 * src/bison.s1: Properly indent CPP directives.
24032
24033 2000-03-16 Akim Demaille <akim@epita.fr>
24034
24035 * src/bison.s1: Properly indent the `alloca' CPP section.
24036
24037 2000-03-16 Akim Demaille <akim@epita.fr>
24038
24039 Do not hard code values of directories in `configure.in'.
24040 Update the `configure' tool chain.
24041
24042 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24043 src/makefile.am.
24044 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24045 (AC_OUTPUT): Add m4/Makefile.
24046 Bump to bison 1.28a, 1.29 has never been released.
24047 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24048 handled via src/Makefile.am.
24049 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24050 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24051 autoheader.
24052 * Makefile.am (SUBDIRS): Add m4.
24053 (ACLOCAL_AM_FLAGS): New variable.
24054 (AUTOMAKE_OPTIONS): Add check-news.
24055 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24056 the proper line number and file name.
24057 (DEFS): Propagate the location of bison library files and of the
24058 locale files.
24059 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24060 builddir.
24061 * acinclude.m4: Remove, replaced by the directory m4.
24062 * m4/Makefile.am (EXTRA_DIST): New variable.
24063 * m4/gettext.m4: New file, from the fileutils.
24064 * m4/lcmessage.m4: Likewise
24065 * m4/progtest.m4: Likewise.
24066 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24067
24068 2000-03-10 Akim Demaille <akim@epita.fr>
24069
24070 * src/closure.c:
24071 Formatting changes of various comments.
24072 Respect the GNU coding standards at various places.
24073 Don't use `_()' when no translation is needed.
24074
24075 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24076
24077 * src/files.c:
24078 OS/2 honors TMPDIR environment variable.
24079
24080 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24081
24082 * doc/bison.texinfo: Tweaked spelling and grammar.
24083 Updated ISBN.
24084 Removed reference to price of printed copy.
24085 Mention BISON_SIMPLE and BISON_HAIRY.
24086
24087 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24088
24089 * configure.in, NEWS:
24090 Bison 1.29 released.
24091
24092 1999-10-27 Jesse Thilo <jthilo@gnu.org>
24093
24094 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24095 Added reference card.
24096
24097 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24098
24099 * po/ru.po: Added Russian translation.
24100
24101 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24102
24103 * configure.in: Added Russian translation.
24104
24105 1999-07-06 Jesse Thilo <jthilo@gnu.org>
24106
24107 * configure.in, NEWS, README:
24108 Released version 1.28.
24109
24110 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24111
24112 * src/system.h:
24113 Squashed redefinition warning on some systems.
24114
24115 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24116 Have configure build version string instead of relying on ANSI string
24117 concatentation.
24118
24119 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24120
24121 * po/POTFILES.in: Got rid of version.c.
24122
24123 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24124
24125 * acconfig.h, configure.in:
24126 Have configure build version string instead of relying on ANSI string
24127 concatentation.
24128
24129 1999-06-08 Jesse Thilo <jthilo@gnu.org>
24130
24131 * doc/bison.1:
24132 Dropped mention of `+' for long-named options.
24133
24134 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24135
24136 * src/files.c: Added <unistd.h> for unlink().
24137
24138 * src/Makefile.am, src/system.h:
24139 I18n fixes.
24140
24141 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24142
24143 * README: Added a FAQ list.
24144
24145 * configure.in, acconfig.h:
24146 I18n fixes.
24147
24148 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24149
24150 * doc/FAQ, doc/Makefile.am:
24151 Added a FAQ list.
24152
24153 1999-05-19 Jesse Thilo <jthilo@gnu.org>
24154
24155 * src/alloc.h, src/symtab.h, src/version.c:
24156 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24157
24158 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24159
24160 * src/.cvsignore, src/Makefile.am:
24161 Reorganized: sources in `src', documentation in `doc'.
24162
24163 * src/lex.c (literalchar):
24164 fixed the code for escaping double quotes (thanks
24165 Jonathan Czisny.)
24166
24167 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24168
24169 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24170 Adjusted paths to reflect directory reorganization.
24171
24172 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24173
24174 * doc/.cvsignore, doc/Makefile.am:
24175 Reorganized: sources in `src', documentation in `doc'.
24176
24177 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24178
24179 * configure.in:
24180 Updated AC_INIT file to reflect directory reorganization.
24181
24182 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24183 Reorganized: sources in `src', documentation in `doc'.
24184
24185 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24186
24187 * src/allocate.c:
24188 Don't declare calloc() and realloc() if not necessary.
24189
24190 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24191
24192 * configure.in, acconfig.h, acinclude.m4:
24193 Don't declare calloc() and realloc() if not necessary.
24194
24195 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24196
24197 * po/.cvsignore: Added i18n support.
24198
24199 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24200
24201 * acconfig.h, configure.in, Makefile.am:
24202 Added i18n support.
24203
24204 1999-03-22 Jesse Thilo <jthilo@gnu.org>
24205
24206 * src/bison.s1: Fixed #line numbers.
24207
24208 1999-03-15 Jesse Thilo <jthilo@gnu.org>
24209
24210 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24211 Added PO files from Translation Project.
24212
24213 1999-03-03 Jesse Thilo <jthilo@gnu.org>
24214
24215 * Makefile.am:
24216 Added support for non-ANSI compilers (ansi2knr).
24217
24218 1999-02-16 Jesse Thilo <jthilo@gnu.org>
24219
24220 * configure.in: Bumped version number to 1.27.
24221
24222 * Makefile.am:
24223 Added `bison.simple' to list of files removed by `make distclean'.
24224
24225 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24226
24227 * src/files.c, src/files.h:
24228 Defined locations of parser files in config.h instead of Makefile.
24229
24230 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24231
24232 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24233 Defined locations of parser files in config.h instead of Makefile.
24234
24235 1999-02-09 Jesse Thilo <jthilo@gnu.org>
24236
24237 * Makefile.am:
24238 Removed inappropriate use of $< macro.
24239
24240 1999-02-05 Jesse Thilo <jthilo@gnu.org>
24241
24242 * po/Makefile.in.in, po/POTFILES.in:
24243 Add `po' directory skeleton.
24244
24245 1999-01-27 Jesse Thilo <jthilo@gnu.org>
24246
24247 * README: Document help-bison list.
24248
24249 * configure.in: Add check for mkstemp().
24250
24251 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24252
24253 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24254 Hush a few compiler warnings.
24255
24256 * src/files.c:
24257 Add tryclose(), which verifies that fclose was successful.
24258 Hush a couple of compiler warnings.
24259
24260 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24261
24262 * Makefile.am, OChangeLog:
24263 ChangeLog is now automatically generated. Include the old version as
24264 OChangeLog.
24265
24266 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24267
24268 * 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:
24269 Update FSF address.
24270
24271 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24272
24273 * doc/bison.texinfo: Fix formatting glitch.
24274
24275 * doc/bison.texinfo: Update FSF address.
24276
24277 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24278
24279 * acconfig.h: Update FSF address.
24280
24281 1999-01-08 Jesse Thilo <jthilo@gnu.org>
24282
24283 * src/system.h:
24284 Don't define PACKAGE here, since config.h defines it.
24285
24286 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24287
24288 * src/reader.c: Update copyright date.
24289
24290 * src/main.c:
24291 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24292 favor of output directly to stderr (avoids buffer overruns).
24293
24294 * src/reader.c: Some checks for premature EOF.
24295
24296 * 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:
24297 Use prototypes if the compiler understands them.
24298
24299 * src/files.c: Honor TMPDIR on Unix hosts.
24300 Use prototypes if the compiler understands them.
24301
24302 * src/reader.c:
24303 Fix a couple of buffer overrun bugs.
24304 Use prototypes if the compiler understands them.
24305
24306 * src/system.h: Include unistd.h and ctype.h.
24307 Use #ifdef instead of #if for NLS symbols.
24308
24309 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24310
24311 * doc/bison.texinfo:
24312 Delete comment "consider using @set for edition number, etc..." since
24313 we now are doing so.
24314
24315 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24316
24317 * configure.in:
24318 Use prototypes if the compiler understands them.
24319
24320 * NEWS: Document 1.26 highlights.
24321
24322 * Makefile.am: Require Automake 1.3 or later.
24323
24324 * acconfig.h:
24325 Use prototypes if the compiler understands them.
24326
24327 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24328
24329 * src/version.c:
24330 Use VERSION symbol from automake for version number.
24331
24332 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24333
24334 * acconfig.h, configure.in, version.cin:
24335 Use VERSION symbol from automake for version number.
24336
24337 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24338
24339 * Makefile.am:
24340 Distribute original version of simple parser (bison.s1), not built
24341 version (bison.simple).
24342
24343 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24344
24345 * doc/bison.texinfo: Add info dir entry.
24346
24347 * doc/bison.texinfo:
24348 Let automake put version number into documentation.
24349
24350 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24351
24352 * src/bison.cld, src/build.com, src/vmshlp.mar:
24353 Add non-RCS files from /gd/gnu/bison.
24354
24355 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24356
24357 * doc/bison.1:
24358 Document the BISON_HAIRY and BISON_SIMPLE variables.
24359
24360 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24361
24362 * src/version.c: Build version.c automatically.
24363
24364 * src/reader.c:
24365 Fix token numbering (used to start at 258, not 257).
24366
24367 * src/system.h: Include config.h.
24368
24369 * src/getargs.c: Update bug report address.
24370
24371 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24372 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24373
24374 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24375
24376 * Makefile.am:
24377 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24378
24379 * configure.in, version.cin:
24380 Build version.c automatically.
24381
24382 * AUTHORS: Add AUTHORS file.
24383
24384 * README: Update bug report address.
24385
24386 * bison.simple:
24387 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24388
24389 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
24390 Add automake stuff.
24391
24392 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24393
24394 * doc/bison.texinfo: Clean up some formatting.
24395
24396 1998-05-05 Richard Stallman <rms@gnu.org>
24397
24398 * doc/bison.texinfo:
24399 Explain better why to make a pure parser.
24400
24401 1998-01-05 Richard Stallman <rms@gnu.org>
24402
24403 * src/files.c (openfiles):
24404 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
24405 find a temporary directory, if possible. Do not unlink files while
24406 they are open.
24407
24408 1997-08-25 Richard Stallman <rms@gnu.org>
24409
24410 * src/reader.c (stack_offset;):
24411 Change some warni to warns.
24412
24413 * src/lex.c (literalchar): Use warns, not warni.
24414
24415 1997-06-28 Richard Stallman <rms@gnu.org>
24416
24417 * src/bison.s1: Add a Bison version comment.
24418
24419 * src/main.c (fatal, warn, berror):
24420 Use program_name.
24421
24422 1997-06-28 Richard Stallman <rms@gnu.org>
24423
24424 * Makefile.in (bison_version): New variable.
24425 (dist): Use that variable.
24426 (bison.s1): Substitute the Bison version into bison.simple.
24427
24428 * bison.simple: Add a Bison version comment.
24429
24430 1997-06-18 Richard Stallman <rms@gnu.org>
24431
24432 * src/main.c (fatal, warn, berror):
24433 Make error messages standard.
24434 (toomany): Improve error message text.
24435
24436 * 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:
24437 new.h renamed to alloc.h.
24438
24439 1997-06-18 Richard Stallman <rms@gnu.org>
24440
24441 * Makefile.in: new.h renamed to alloc.h.
24442
24443 1997-05-24 Richard Stallman <rms@gnu.org>
24444
24445 * src/lex.c (literalchar):
24446 Fix the code for escaping \, " and '.
24447
24448 (lex): Avoid trouble when there are many chars
24449 to discard in a char literal with just several chars in it.
24450
24451 1997-05-17 Richard Stallman <rms@gnu.org>
24452
24453 * src/bison.s1:
24454 Use malloc, if using alloca is troublesome.
24455 (YYSTACK_USE_ALLOCA): New flag macro.
24456 Define it for some systems and compilers.
24457 (YYSTACK_ALLOC): New macro.
24458 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24459 If it was malloc'd, free it.
24460
24461 1997-05-17 Richard Stallman <rms@gnu.org>
24462
24463 * bison.simple:
24464 Use malloc, if using alloca is troublesome.
24465 (YYSTACK_USE_ALLOCA): New flag macro.
24466 Define it for some systems and compilers.
24467 (YYSTACK_ALLOC): New macro.
24468 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24469 If it was malloc'd, free it.
24470
24471 1997-04-23 Richard Stallman <rms@gnu.org>
24472
24473 * src/bison.s1:
24474 (alloca) [__hpux]: Always define as __builtin_alloca.
24475
24476 1997-04-23 Richard Stallman <rms@gnu.org>
24477
24478 * bison.simple:
24479 (alloca) [__hpux]: Always define as __builtin_alloca.
24480
24481 1997-04-22 Richard Stallman <rms@gnu.org>
24482
24483 * src/bison.s1:
24484 [__hpux]: Include alloca.h (right for HPUX 10)
24485 instead of declaring alloca (right for HPUX 9).
24486
24487 * src/bison.s1 (__yy_memcpy):
24488 Declare arg `count' as unsigned int.
24489 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24490
24491 1997-04-22 Richard Stallman <rms@gnu.org>
24492
24493 * bison.simple:
24494 [__hpux]: Include alloca.h (right for HPUX 10)
24495 instead of declaring alloca (right for HPUX 9).
24496
24497 * bison.simple (__yy_memcpy):
24498 Declare arg `count' as unsigned int.
24499 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24500
24501 1997-01-03 Richard Stallman <rms@gnu.org>
24502
24503 * src/allocate.c: [__STDC__ or _MSC_VER]:
24504 Declare calloc and realloc to return void *.
24505
24506 1997-01-02 Richard Stallman <rms@gnu.org>
24507
24508 * src/system.h:
24509 [_MSC_VER]: Include stdlib.h and process.h.
24510 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
24511
24512 * src/main.c (main): Return FAILURE as a value.
24513 (printable_version): Declare arg as int, not char.
24514
24515 1997-01-02 Richard Stallman <rms@gnu.org>
24516
24517 * Makefile.in (dist):
24518 Explicitly check for symlinks, and copy them.
24519
24520 1996-12-19 Richard Stallman <rms@gnu.org>
24521
24522 * src/files.c:
24523 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
24524
24525 1996-12-18 Paul Eggert <eggert@gnu.org>
24526
24527 * src/bison.s1 (yyparse):
24528 If __GNUC__ and YYPARSE_PARAM are both defined,
24529 declare yyparse to have a void * argument.
24530
24531 1996-12-18 Paul Eggert <eggert@gnu.org>
24532
24533 * bison.simple (yyparse):
24534 If __GNUC__ and YYPARSE_PARAM are both defined,
24535 declare yyparse to have a void * argument.
24536
24537 1996-12-17 Richard Stallman <rms@gnu.org>
24538
24539 * src/reduce.c (nbits): Add some casts.
24540
24541 1996-08-12 Richard Stallman <rms@gnu.org>
24542
24543 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
24544
24545 1996-08-12 Richard Stallman <rms@gnu.org>
24546
24547 * bison.simple: Test _MSDOS as well as _MSDOS_.
24548
24549 1996-07-31 Richard Stallman <rms@gnu.org>
24550
24551 * src/bison.s1:
24552 [__sun && __i386]: Include alloca.h.
24553
24554 1996-07-31 Richard Stallman <rms@gnu.org>
24555
24556 * bison.simple:
24557 [__sun && __i386]: Include alloca.h.
24558
24559 1996-07-30 Richard Stallman <rms@gnu.org>
24560
24561 * src/bison.s1: Comment change.
24562
24563 * src/bison.s1: Test _MSDOS_, not MSDOS.
24564
24565 1996-07-30 Richard Stallman <rms@gnu.org>
24566
24567 * bison.simple: Comment change.
24568
24569 * bison.simple: Test _MSDOS_, not MSDOS.
24570
24571 1996-06-01 Richard Stallman <rms@gnu.org>
24572
24573 * 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:
24574 Insert `_' macro around many string constants.
24575
24576 * src/main.c:
24577 Insert `_' macro around many string constants.
24578
24579 (main): Call setlocale, bindtextdomain and textdomain.
24580
24581 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
24582 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
24583 [ENABLE_NLS]: Include libintl.h.
24584 [ENABLE_NLS] (gettext): Define.
24585 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
24586 (N_, PACKAGE, LOCALEDIR): New macros.
24587
24588 1996-06-01 Richard Stallman <rms@gnu.org>
24589
24590 * POTFILES.in: New file.
24591
24592 * Makefile.in (allocate.o):
24593 Define target explicitly.
24594
24595 * Makefile.in (CFLAGS): Set to @CFLAGS@.
24596 (LDFLAGS): Set to @LDFLAGS@.
24597 (configure): Run autoconf only if preceding `cd' succeeds.
24598 (bison.s1): Redirect output to temporary file then move the
24599 temporary to the target, rather than redirecting directly to bison.s1.
24600 (clean): Remove config.status and config.log.
24601 (distclean): Don't remove config.status here.
24602
24603 1996-05-12 Richard Stallman <rms@gnu.org>
24604
24605 * src/bison.s1:
24606 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24607
24608 1996-05-12 Richard Stallman <rms@gnu.org>
24609
24610 * bison.simple:
24611 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24612
24613 1996-05-11 Richard Stallman <rms@gnu.org>
24614
24615 * src/bison.s1 (__yy_memcpy):
24616 Really reorder the args, as was supposedly done on Feb 14 1995.
24617 (yyparse): Calls changed accordingly.
24618
24619 1996-05-11 Richard Stallman <rms@gnu.org>
24620
24621 * Makefile.in (dist): Don't use $(srcdir).
24622
24623 * bison.simple (__yy_memcpy):
24624 Really reorder the args, as was supposedly done on Feb 14 1995.
24625 (yyparse): Calls changed accordingly.
24626
24627 1996-01-27 Richard Stallman <rms@gnu.org>
24628
24629 * src/output.c (output_rule_data):
24630 Test YYERROR_VERBOSE in the conditional
24631 around the definition of ttyname.
24632
24633 1995-12-29 Richard Stallman <rms@gnu.org>
24634
24635 * src/bison.s1:
24636 Fix line numbers in #line commands.
24637
24638 1995-12-29 Richard Stallman <rms@gnu.org>
24639
24640 * bison.simple:
24641 Fix line numbers in #line commands.
24642
24643 1995-12-27 Richard Stallman <rms@gnu.org>
24644
24645 * src/bison.s1 (YYPARSE_PARAM_DECL):
24646 In C++, make it always null.
24647 (YYPARSE_PARAM_ARG): New macro.
24648 (yyparse): Use YYPARSE_PARAM_ARG.
24649
24650 1995-12-27 Richard Stallman <rms@gnu.org>
24651
24652 * bison.simple (YYPARSE_PARAM_DECL):
24653 In C++, make it always null.
24654 (YYPARSE_PARAM_ARG): New macro.
24655 (yyparse): Use YYPARSE_PARAM_ARG.
24656
24657 1995-11-29 Richard Stallman <rms@gnu.org>
24658
24659 * doc/bison.texinfo:
24660 Describe literal string tokens, %raw, %no_lines, %token_table.
24661
24662 1995-11-29 Daniel Hagerty <hag@gnu.org>
24663
24664 * doc/bison.texinfo: Fixed update date
24665
24666 1995-10-16 Richard Stallman <rms@gnu.org>
24667
24668 * src/version.c: Version 1.25.
24669
24670 1995-10-16 Richard Stallman <rms@gnu.org>
24671
24672 * NEWS: *** empty log message ***
24673
24674 1995-10-16 Richard Stallman <rms@gnu.org>
24675
24676 * doc/bison.1, doc/bison.rnh:
24677 Add new options.
24678
24679 1995-10-15 Richard Stallman <rms@gnu.org>
24680
24681 * src/vmsgetargs.c, src/getargs.c:
24682 Added -n, -k, and -raw switches.
24683 (noparserflag, toknumflag, rawtoknumflag): New variables.
24684
24685 * src/symtab.h (SALIAS):
24686 New #define for adding aliases to %token.
24687 (struct bucket): Added `alias' field.
24688
24689 * src/reduce.c (reduce_grammar):
24690 Revise error message.
24691 (print_notices): Remove final `.' from error message.
24692
24693 * src/reader.c (reader_output_yylsp):
24694 New function.
24695 (readgram): Use `#if 0' around code that accepted %command
24696 inside grammar rules: The documentation doesn't allow it,
24697 and it will fail since the %command processors scan for the next %.
24698 (parse_token_decl): Extended the %token
24699 declaration to allow a multi-character symbol as an alias.
24700 (parse_thong_decl): New function.
24701 (read_declarations): Added %thong declarations.
24702 (read_declarations): Handle NOOP to deal with allowing
24703 % declarations as another means to specify the flags.
24704 (readgram): Allow %prec prior to semantics embedded in a rule.
24705 (skip_to_char, read_declarations, copy_definition)
24706 (parse_token_decl, parse_start_decl, parse_type_decl)
24707 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
24708 (get_type_name, copy_guard, copy_action, readgram)
24709 (get_type, packsymbols): Revised most error messages.
24710 Changed `fatal' to `warnxxx' to avoid aborting for error.
24711 Revised and use multiple warnxxx functions to avoid using VARARGS1.
24712 (read_declarations): Improve the error message for
24713 an invalid character. Do not abort.
24714 (read_declarations, copy_guard, copy_action): Use
24715 printable_version to avoid unprintable characters in printed output.
24716 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
24717 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
24718 Allow the type of a non-terminal can be given
24719 more than once, as long as all specifications give the same type.
24720
24721 * src/output.c:
24722 (output_headers, output_trailers, output, output_gram)
24723 (output_rule_data): Implement noparserflag variable.
24724 Implement toknumflag variable.
24725 (output): Call reader_output_yylsp to output LTYPESTR.
24726
24727 * src/main.c (main):
24728 If reader sees an error, don't process the grammar.
24729 (fatals): Updated to not use VARARGS1.
24730 (printable_version, int_to_string, warn, warni, warns, warnss)
24731 (warnsss): New error reporting functions. Avoid abort for error.
24732
24733 * src/lex.h:
24734 Added THONG and NOOP for alias processing.
24735 Added SETOPT for the new code that allows setting options with %flags.
24736
24737 * src/lex.c:
24738 Include getopt.h. Add some extern decls.
24739 (safegetc): New function to deal with EOF gracefully.
24740 (literalchar); new function to deal with reading \ escapes.
24741 (lex): Use literalchar.
24742 (lex): Implemented "..." tokens.
24743 (literalchar, lex, parse_percent_token): Made tokenbuffer
24744 always contain the token. This includes growing the token
24745 buffer while reading an integer.
24746 (parse_percent_token): Replaced if-else statement with percent_table.
24747 (parse_percent_token): Added % declarations as another
24748 way to specify the flags -n, -l, and -r. Also added hooks for
24749 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
24750 major changes to files.c.
24751 (lex) Retain in the incoming stream a character following
24752 an incorrect '/'.
24753 (skip_white_space, lex): Revised most error messages
24754 and changed fatal to warn to avoid aborting.
24755 (percent_table): Added %thong declarations.
24756
24757 * src/gram.h: Comment changes.
24758
24759 * src/files.c (openfiles, open_extra_files, done):
24760 Add faction flag
24761 and actfile file. Handle noparserflag. Both for -n switch.
24762
24763 * src/conflicts.c (resolve_sr_conflict):
24764 Remove use of alloca.
24765
24766 1995-06-01 Jim Meyering <meyering@gnu.org>
24767
24768 * doc/bison.texinfo: *** empty log message ***
24769
24770 1995-05-06 Richard Stallman <rms@gnu.org>
24771
24772 * src/bison.s1: Comment change.
24773
24774 1995-05-06 Richard Stallman <rms@gnu.org>
24775
24776 * bison.simple: Comment change.
24777
24778 1995-05-03 Richard Stallman <rms@gnu.org>
24779
24780 * src/version.c: Version now 1.24.
24781
24782 * src/bison.s1: Change distribution terms.
24783
24784 * src/version.c: Version now 1.23.
24785
24786 1995-05-03 Richard Stallman <rms@gnu.org>
24787
24788 * doc/bison.texinfo:
24789 Rewrite "Conditions for Using Bison".
24790 Update version to 1.24.
24791
24792 1995-05-03 Richard Stallman <rms@gnu.org>
24793
24794 * bison.simple: Change distribution terms.
24795
24796 1995-02-23 Richard Stallman <rms@gnu.org>
24797
24798 * src/files.c: Test __VMS_POSIX as well as VMS.
24799
24800 1995-02-14 Jim Meyering <meyering@gnu.org>
24801
24802 * src/bison.s1 (__yy_memcpy):
24803 Renamed from __yy_bcopy to avoid
24804 confusion. Reverse FROM and TO arguments to be consistent with
24805 those of memcpy.
24806
24807 1995-02-14 Jim Meyering <meyering@gnu.org>
24808
24809 * bison.simple (__yy_memcpy):
24810 Renamed from __yy_bcopy to avoid
24811 confusion. Reverse FROM and TO arguments to be consistent with
24812 those of memcpy.
24813
24814 1994-11-10 David J. MacKenzie <djm@gnu.org>
24815
24816 * NEWS: reformat
24817
24818 * NEWS: New file.
24819
24820 * Makefile.in (DISTFILES): Include NEWS.
24821
24822 * Makefile.in (DISTFILES):
24823 Include install-sh, not install.sh.
24824
24825 * configure.in: Update to Autoconf v2 macro names.
24826
24827 1994-10-05 David J. MacKenzie <djm@gnu.org>
24828
24829 * Makefile.in: fix typo
24830
24831 * Makefile.in (prefix, exec_prefix):
24832 Let configure set them.
24833
24834 1994-09-28 David J. MacKenzie <djm@gnu.org>
24835
24836 * Makefile.in: Set datadir to $(prefix)/share.
24837
24838 1994-09-15 Richard Stallman <rms@gnu.org>
24839
24840 * src/bison.s1:
24841 Update copyright notice and GPL version.
24842
24843 1994-09-15 Richard Stallman <rms@gnu.org>
24844
24845 * bison.simple:
24846 Update copyright notice and GPL version.
24847
24848 1994-07-12 Richard Stallman <rms@gnu.org>
24849
24850 * src/reduce.c, src/reader.c:
24851 entered into RCS
24852
24853 1994-05-05 David J. MacKenzie <djm@gnu.org>
24854
24855 * Makefile.in: entered into RCS
24856
24857 1994-03-26 Richard Stallman <rms@gnu.org>
24858
24859 * src/bison.s1: entered into RCS
24860
24861 1994-03-26 Richard Stallman <rms@gnu.org>
24862
24863 * bison.simple: entered into RCS
24864
24865 1994-03-25 Richard Stallman <rms@gnu.org>
24866
24867 * src/main.c: entered into RCS
24868
24869 1994-03-24 Richard Stallman <rms@gnu.org>
24870
24871 * src/conflicts.c: entered into RCS
24872
24873 1994-01-02 Richard Stallman <rms@gnu.org>
24874
24875 * Makefile.in: *** empty log message ***
24876
24877 1993-11-21 Richard Stallman <rms@gnu.org>
24878
24879 * src/bison.s1: *** empty log message ***
24880
24881 1993-11-21 Richard Stallman <rms@gnu.org>
24882
24883 * doc/bison.texinfo: entered into RCS
24884
24885 * doc/bison.texinfo: *** empty log message ***
24886
24887 1993-11-21 Richard Stallman <rms@gnu.org>
24888
24889 * bison.simple: *** empty log message ***
24890
24891 1993-10-25 David J. MacKenzie <djm@gnu.org>
24892
24893 * doc/bison.texinfo: *** empty log message ***
24894
24895 1993-10-19 Richard Stallman <rms@gnu.org>
24896
24897 * src/bison.s1: *** empty log message ***
24898
24899 1993-10-19 Richard Stallman <rms@gnu.org>
24900
24901 * bison.simple: *** empty log message ***
24902
24903 1993-10-14 Richard Stallman <rms@gnu.org>
24904
24905 * src/bison.s1: *** empty log message ***
24906
24907 1993-10-14 Richard Stallman <rms@gnu.org>
24908
24909 * bison.simple: *** empty log message ***
24910
24911 1993-09-14 David J. MacKenzie <djm@gnu.org>
24912
24913 * doc/bison.texinfo: *** empty log message ***
24914
24915 1993-09-13 Noah Friedman <friedman@gnu.org>
24916
24917 * Makefile.in: *** empty log message ***
24918
24919 1993-09-10 Richard Stallman <rms@gnu.org>
24920
24921 * src/conflicts.c: *** empty log message ***
24922
24923 * src/system.h: entered into RCS
24924
24925 1993-09-10 Richard Stallman <rms@gnu.org>
24926
24927 * doc/bison.1: entered into RCS
24928
24929 1993-09-06 Noah Friedman <friedman@gnu.org>
24930
24931 * src/version.c: entered into RCS
24932
24933 1993-09-06 Noah Friedman <friedman@gnu.org>
24934
24935 * Makefile.in: *** empty log message ***
24936
24937 1993-07-30 David J. MacKenzie <djm@gnu.org>
24938
24939 * Makefile.in: *** empty log message ***
24940
24941 1993-07-24 Richard Stallman <rms@gnu.org>
24942
24943 * src/bison.s1: *** empty log message ***
24944
24945 1993-07-24 Richard Stallman <rms@gnu.org>
24946
24947 * bison.simple: *** empty log message ***
24948
24949 1993-07-08 David J. MacKenzie <djm@gnu.org>
24950
24951 * Makefile.in: *** empty log message ***
24952
24953 1993-07-04 Richard Stallman <rms@gnu.org>
24954
24955 * src/bison.s1: *** empty log message ***
24956
24957 1993-07-04 Richard Stallman <rms@gnu.org>
24958
24959 * bison.simple: *** empty log message ***
24960
24961 1993-06-26 David J. MacKenzie <djm@gnu.org>
24962
24963 * src/getargs.c: entered into RCS
24964
24965 1993-06-26 David J. MacKenzie <djm@gnu.org>
24966
24967 * doc/bison.texinfo: *** empty log message ***
24968
24969 * doc/bison.1: New file.
24970
24971 1993-06-25 Richard Stallman <rms@gnu.org>
24972
24973 * src/getargs.c: New file.
24974
24975 1993-06-16 Richard Stallman <rms@gnu.org>
24976
24977 * src/bison.s1: *** empty log message ***
24978
24979 1993-06-16 Richard Stallman <rms@gnu.org>
24980
24981 * bison.simple: *** empty log message ***
24982
24983 1993-06-03 Richard Stallman <rms@gnu.org>
24984
24985 * src/bison.s1: New file.
24986
24987 1993-06-03 Richard Stallman <rms@gnu.org>
24988
24989 * doc/bison.texinfo: *** empty log message ***
24990
24991 1993-06-03 Richard Stallman <rms@gnu.org>
24992
24993 * bison.simple: New file.
24994
24995 1993-05-19 Richard Stallman <rms@gnu.org>
24996
24997 * doc/bison.texinfo: New file.
24998
24999 1993-05-07 Noah Friedman <friedman@gnu.org>
25000
25001 * Makefile.in: *** empty log message ***
25002
25003 1993-04-28 Noah Friedman <friedman@gnu.org>
25004
25005 * src/reader.c: *** empty log message ***
25006
25007 1993-04-23 Noah Friedman <friedman@gnu.org>
25008
25009 * src/alloc.h: entered into RCS
25010
25011 1993-04-20 David J. MacKenzie <djm@gnu.org>
25012
25013 * src/version.c: *** empty log message ***
25014
25015 * src/files.c, src/allocate.c:
25016 entered into RCS
25017
25018 * src/reader.c: *** empty log message ***
25019
25020 * src/lex.c: entered into RCS
25021
25022 * src/conflicts.c: New file.
25023
25024 * src/symtab.c: entered into RCS
25025
25026 * src/alloc.h: New file.
25027
25028 * src/LR0.c: entered into RCS
25029
25030 1993-04-18 Noah Friedman <friedman@gnu.org>
25031
25032 * src/reader.c: New file.
25033
25034 * src/version.c: *** empty log message ***
25035
25036 1993-04-18 Noah Friedman <friedman@gnu.org>
25037
25038 * Makefile.in: *** empty log message ***
25039
25040 1993-04-17 Noah Friedman <friedman@gnu.org>
25041
25042 * Makefile.in: *** empty log message ***
25043
25044 1993-04-15 Richard Stallman <rms@gnu.org>
25045
25046 * src/main.c, src/files.c:
25047 New file.
25048
25049 1993-04-15 Noah Friedman <friedman@gnu.org>
25050
25051 * configure.in: entered into RCS
25052
25053 * configure.in: *** empty log message ***
25054
25055 * configure.in: New file.
25056
25057 1993-04-14 Richard Stallman <rms@gnu.org>
25058
25059 * Makefile.in: New file.
25060
25061 1993-04-13 Richard Stallman <rms@gnu.org>
25062
25063 * src/version.c: New file.
25064
25065 1993-03-25 Richard Stallman <rms@gnu.org>
25066
25067 * src/output.c: entered into RCS
25068
25069 1992-09-25 Richard Stallman <rms@gnu.org>
25070
25071 * configure.bat: entered into RCS
25072
25073 1992-06-22 Richard Stallman <rms@gnu.org>
25074
25075 * src/vmsgetargs.c: entered into RCS
25076
25077 1992-06-22 Richard Stallman <rms@gnu.org>
25078
25079 * doc/bison.rnh: entered into RCS
25080
25081 1992-04-20 David J. MacKenzie <djm@gnu.org>
25082
25083 * README: entered into RCS
25084
25085 1992-01-22 Richard Stallman <rms@gnu.org>
25086
25087 * src/machine.h: entered into RCS
25088
25089 1991-12-21 Richard Stallman <rms@gnu.org>
25090
25091 * src/lalr.c, src/closure.c:
25092 entered into RCS
25093
25094 1991-12-20 Richard Stallman <rms@gnu.org>
25095
25096 * src/state.h: entered into RCS
25097
25098 1991-12-18 Richard Stallman <rms@gnu.org>
25099
25100 * src/print.c, src/nullable.c, src/derives.c:
25101 entered into RCS
25102
25103 1991-11-03 David J. MacKenzie <djm@gnu.org>
25104
25105 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25106 entered into RCS
25107
25108 1988-09-09 Richard Stallman <rms@gnu.org>
25109
25110 * src/bison.hairy: entered into RCS
25111
25112 1987-12-16 Richard Stallman <rms@gnu.org>
25113
25114 * REFERENCES: entered into RCS
25115
25116
25117 -----
25118
25119 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
25120 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
25121 2008, 2009 Free Software Foundation, Inc.
25122
25123 Copying and distribution of this file, with or without
25124 modification, are permitted provided the copyright notice and this
25125 notice are preserved.