]> git.saurik.com Git - bison.git/blob - ChangeLog
5388e29cea7516b7ccc45924fee76c3db24977a3
[bison.git] / ChangeLog
1 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
2
3 POSIX: complain if %prec's token was not defined.
4 * NEWS (2.5): Document.
5 * src/reader.c (grammar_rule_check): Convert warning to
6 complaint.
7 * tests/input.at (%prec's token must be defined): Update.
8
9 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
10
11 POSIX: warn if %prec's token was not defined.
12 Reported by Florian Krohm at
13 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
14 * NEWS (2.4.2): Document.
15 * src/reader.c (grammar_rule_check): Implement.
16 (grammar_current_rule_prec_set): Add comments explaining that we
17 here assume a %prec identifier is a token, but we still manage
18 to support POSIX.
19 * tests/input.at (%prec's token must be defined): New test
20 group.
21
22 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
23
24 * HACKING (Release Procedure): Recommend a secure automake.
25
26 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
27
28 portability: `<' and `>' are not always defined on addresses.
29 Specifically, don't sort objects by their memory addresses when
30 they're not allocated in the same array or other object. Though
31 I haven't found a test case where that fails on my platform, C
32 says the behavior is undefined.
33 * src/AnnotationList.c (AnnotationList__insertInto): Remove
34 FIXME. Use new id field of InadequacyList nodes rather than
35 their memory addresses when sorting.
36 (AnnotationList__compute_from_inadequacies): Add
37 inadequacy_list_node_count argument to pass to
38 InadequacyList__new_conflict.
39 * src/AnnotationList.h
40 (AnnotationList__compute_from_inadequacies): Update prototype
41 and documentation for new argument.
42 * src/InadequacyList.c (InadequacyList__new_conflict): Add
43 node_count argument and use it to assign a unique ID.
44 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
45 (InadequacyList): Add id field.
46 (InadequacyList__new_conflict): Update prototype and
47 documentation for new argument.
48 * src/ielr.c (ielr_compute_annotation_lists): Update
49 AnnotationList__compute_from_inadequacies invocation.
50
51 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
52
53 Fix handling of yychar manipulation in user semantic actions.
54 The problem was that yacc.c didn't always update the yychar
55 translation afterwards. However, other skeletons appear to be
56 fine. glr.c appears to already translate yychar before every
57 use. lalr1.cc does not define yychar and does not document its
58 replacement, yyla, for users. It does provide yyclearin, but
59 that does not manipulate yyla and thus requires no translation
60 update. In lalr1.java, yychar is out of scope during semantic
61 actions.
62 * NEWS (2.5): Document.
63 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
64 yytoken here.
65 (yyparse, yypush_parse): Instead, translate before every use of
66 yytoken, and add comments explaining this approach.
67 * tests/actions.at (Destroying lookahead assigned by semantic
68 action): New test group checking that translation happens before
69 lookahead destructor calls at parser return. Previously,
70 incorrect destructors were called.
71 * tests/conflicts.at (parse.error=verbose and consistent
72 errors): New test group checking that translation happens at
73 syntax error detection before the associated verbose error
74 message and the associated lookahead destructor calls. While
75 the destructor call is fixed by this patch, the verbose error
76 message is currently incorrect due to another bug (see
77 comments in test group), so this is an expected failure for now.
78
79 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
80
81 YYFAIL: warn about uses and remove from lalr1.java.
82 * NEWS (2.5): Document.
83 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
84 and make it private. Update all uses.
85 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
86
87 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
88
89 YYFAIL: deprecate.
90 * NEWS (2.4.2): Document deprecation and the phase-out plan.
91 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
92 deprecation.
93 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
94 YYFAIL from GCC cpp's -Wunused-macros.
95 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
96 documentation.
97 (LocalWords): Remove YYFAIL.
98
99 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
100
101 tests: cleanup.
102 * tests/c++.at (Syntax error discarding no lookahead): Don't
103 ignore stderr. Instead, eliminate remaining warnings.
104
105 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
106
107 lalr1.cc: don't discard non-existent lookahead on syntax error.
108 * data/lalr1.cc (parser::parse): Check yyempty first.
109 * tests/c++.at (Syntax error discarding no lookahead): New test
110 group.
111
112 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
113
114 Code cleanup.
115 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
116 function, which is no longer used.
117
118 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
119
120 Add gcc's -Wundef to test suite and fix another warning from it.
121 * NEWS (2.4.2): Update description of -Wundef fix.
122 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
123 (WARN_CFLAGS_TEST): New substitution.
124 * data/glr.c: Avoid warning about __STRICT_ANSI__.
125 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
126 WARN_CFLAGS.
127 (NO_WERROR_CFLAGS): Likewise.
128 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
129
130 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
131
132 * data/yacc.c: Reformat m4 a little.
133
134 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
135
136 Document gcc -Wundef fix.
137 * NEWS (2.4.2): Here.
138 * THANKS (Jonathan Nieder): Add.
139
140 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
141
142 Simplify y.tab.c when location tracking is disabled.
143 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
144 tracking is not enabled. Instead, unconditionally define
145 YY_LOCATION_PRINT as a no-op for backward compatibility.
146
147 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
148
149 Avoid warnings from gcc -Wundef y.tab.c.
150 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
151 defined before using them.
152 * data/lalr1.cc: Likewise.
153 * data/yacc.c: Likewise.
154
155 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
156
157 autoconf: update to latest for fix of M4 detection.
158 Reported by Eric Blake.
159 * submodules/autoconf: Update.
160
161 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
162
163 portability: use -DGNULIB_POSIXCHECK.
164 Reported by Eric Blake. See discussions at
165 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
166 and
167 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
168 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
169 * bootstrap.conf (gnulib_modules): Add all the printf modules
170 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
171 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
172 (excluded_files): Remove m4/printf-posix.m4.
173 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
174 lib/libbison.a so gnulib libraries can be linked.
175
176 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
177
178 gnulib: update for fix of fprintf-posix, which we'll use soon.
179 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
180 targets so that gnulib's new arg-nonnull.h and link-warning.h
181 are matched.
182 * gnulib: Update.
183
184 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
185
186 Enable assertion output and --disable-assert for configure.
187 * bootstrap.conf (gnulib_modules): Add assert module.
188 * src/system.h (aver): Define as assert, and summarize the
189 discussion on this issue.
190
191 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
192
193 Expand GLR acronym in summary of Bison.
194 Based on discussion with Akim Demaille starting at
195 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
196 * doc/bison.texinfo (Introduction): Here.
197 * src/getargs.c (usage): Here.
198
199 2009-10-03 Alex Rozenman <rozenman@gmail.com>
200
201 Document named references.
202 * doc/bison.texinfo (Actions): Add new example and xref to
203 Using Named References node.
204 (Using Named References): New node.
205
206 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
207
208 cleanup.
209 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
210 of char*.
211 (Sbitset__isEmpty): Use Sbitset instead of char*.
212 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
213 instead of char. This helps to avoid casting errors.
214 (Sbitset__or): Use Sbitset instead of char*.
215
216 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
217
218 portability: don't assume 8-bit bytes.
219 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
220 * src/Sbitset.h (Sbitset__nbytes): Here.
221 (Sbitset__byteAddress): Here.
222 (Sbitset__bit_mask): Here.
223 (Sbitset__last_byte_mask): Here.
224 (Sbitset__ones): Here.
225 (SBITSET__FOR_EACH): Here.
226
227 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
228
229 portability: use va_start and va_end in the same function.
230 * src/complain.c (error_message): Move va_end from here...
231 (ERROR_MESSAGE): ... to here.
232
233 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
234
235 * data/bison.m4: Update comments for rename to muscle-tab.h.
236
237 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
238
239 Minor code cleanup.
240 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
241 replace all uses with UNIQSTR_CONCAT.
242 * src/uniqstr.c (uniqstr_vsprintf): New function.
243 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
244 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
245 macros.
246
247 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
248
249 * TODO (Complaint submessage indentation): New.
250
251 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
252
253 Minor code cleanup.
254 * src/parse-gram.y: Clean up sorting of declarations.
255 Use types to simplify %printer declarations where possible.
256 Provide %printer for BRACKETED_ID and symbol.prec.
257 * src/symtab.c: Whitespace change.
258
259 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
260
261 tests: skip tests of file names that platform does not support.
262 Reported by Michael Raskin at
263 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
264 * THANKS (Michael Raskin): Add.
265 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
266 to fail at least for file names containing ":" or "\".
267
268 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
269
270 yysyntax_error: avoid duplicate lookahead collection.
271 Except when memory reallocation is required, this change
272 eliminates the need to invoke yysyntax_error twice and thus to
273 repeat the collection of lookaheads. It also prepares for
274 future extensions that will make those repetitions more
275 expensive and that will require additional memory management in
276 yysyntax_error. Finally, it fixes an obscure bug already
277 exercised in the test suite.
278 * data/yacc.c (yysyntax_error): Add arguments for message
279 buffer variables stored in the parser. Instead of size, return
280 status similar to yyparse status but indicating success of
281 message creation. Other than the actual reallocation of the
282 message buffer, import and clean up memory management code
283 from...
284 (yyparse, yypush_parse): ... here.
285 * tests/regression.at (parse.error=verbose overflow): No longer
286 an expected failure.
287
288 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
289
290 yysyntax_error: test memory management more.
291 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
292 * tests/regression.at (parse.error=verbose and
293 YYSTACK_USE_ALLOCA): New test group.
294 (parse.error=verbose overflow): New test group that reveals an
295 obscure bug. Expected fail for now.
296
297 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
298
299 benchmarks: use %debug consistently among grammars.
300 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
301 %debug by default. It can affect the timings even if yydebug=0.
302 (generate_grammar_calc): For consistency with other grammars,
303 use YYDEBUG environment variable to set yydebug.
304
305 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
306
307 Remove dead code.
308 * src/symtab.c (symbol_pack): Here because every symbol's number
309 is always defined by this time.
310
311 2009-10-03 Alex Rozenman <rozenman@gmail.com>
312
313 Add additional space after periods in NEWS.
314 * NEWS (2.5): here.
315
316 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
317
318 Use the correct conversion specifier for size_t.
319 Reported by Jim Meyering.
320 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
321 because Sbitset__Index is size_t.
322 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
323
324 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
325
326 tests: don't abuse AT_BISON_CHECK.
327 * tests/regression.at (parse-gram.y: LALR = IELR): Move
328 additional shell commands outside of AT_BISON_CHECK.
329
330 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
331
332 tests: check that parse-gram.y's IELR and LALR are identical.
333 * tests/atlocal.in (abs_top_srcdir): New shell variable.
334 * tests/regression.at (parse-gram.y: LALR = IELR): New test
335 group.
336
337 2009-09-19 Alex Rozenman <rozenman@gmail.com>
338
339 Keep sub-messages aligned. Fix strings for translation.
340 * src/location.h (location_print): Add return value.
341 * src/location.c (location_print): Return number of printed
342 characters.
343 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
344 new functions.
345 * src/complain.cpp (indent_ptr): New static variable.
346 (error_message, complain_at_indent, warn_at_indent): Implement
347 the alignment mechanism.
348 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
349 for translations. Use new alignment mechanism.
350 * tests/named-ref.at: Adjust test-cases.
351 * NEWS (2.5): Add an announcement about named references.
352
353 2009-09-17 Akim Demaille <demaille@gostai.com>
354
355 doc: fixes.
356 * doc/bison.texinfo: here.
357 Reported by Alex Rozenman.
358
359 2009-09-16 Akim Demaille <demaille@gostai.com>
360
361 doc: lalr1.cc and variants.
362 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
363 "variant" %define variables.
364 (C++ Semantic Values): Split into...
365 (C++ Unions, C++ Variants): these.
366 The latter is new.
367 (C++ Parser Interface): Fix type names.
368 Document parser::syntax_error.
369 Document the fact that locations are not mandatory.
370 (C++ Scanner Interface): Split into...
371 (Split Symbols, Complete Symbols): these.
372 The later is new.
373 (Calc++ Parsing Driver): Use variants.
374 Add more comments.
375 Adjust style.
376 (Calc++ Parser): Declare all the tokens, no
377 longer accept raw characters.
378 Remove %union.
379 Adjust types and printers.
380 Remove destructors.
381 (Calc++ Scanner): Use make_<SYMBOL> functions.
382 Use strerror in error message.
383
384 2009-09-16 Akim Demaille <demaille@gostai.com>
385
386 doc: spell checking.
387 * doc/bison.texinfo: here.
388
389 2009-09-16 Akim Demaille <demaille@gostai.com>
390
391 doc: comment changes.
392 * doc/bison.texinfo: Comment changes.
393
394 2009-09-16 Akim Demaille <demaille@gostai.com>
395
396 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
397 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
398 constructor to take a token_type instead of the (internal) symbol
399 number.
400 Call yytranslate_.
401 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
402 don't call yytranslate_ here.
403
404 2009-09-16 Akim Demaille <demaille@gostai.com>
405
406 TODO: statistics.
407 * TODO (Figures): New.
408
409 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
410
411 tests: clean up push.at test group titles.
412 * tests/push.at: Remove "Push Parsing: " from test group titles
413 because these are already under the banner "Push Parsing Tests".
414
415 2009-09-12 Alex Rozenman <rozenman@gmail.com>
416
417 Provide an additional sub-message for clarity.
418 Add "symbol not found in production" error message when
419 an "invalid reference" is detected in named references
420 resolution.
421 * src/scan-code.l: Update "invalid reference" case.
422 * tests/named-ref.at: Adjust test-cases.
423
424 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
425
426 Clean up yacc.c a little.
427 * data/yacc.c: Clean up M4 for readability, and make output
428 whitespace more consistent. For the main parse function
429 comment, instead of saying "yyparse or yypush_parse", say either
430 "yyparse" or "yypush_parse" depending on which it actually is.
431
432 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
433
434 Fix --enable-gcc-warnings.
435 * src/parse-gram.y (%printer <param>): Handle param_none.
436
437 2009-09-09 Akim Demaille <demaille@gostai.com>
438
439 lalr1.cc: syntax_error as exceptions.
440 It is common to use sort of factories in the user actions. These
441 factories may check some "syntactic" constraints that are not
442 enforced by the grammar itself. This is possible using YYERROR
443 within the action itself. Provide the user with a means to throw
444 a syntax_error exception.
445
446 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
447 Declare and define yy::parser::syntax_error.
448 * data/lalr1.cc: Include stdexcept.
449 (yy::parser::parse): Wrap the user action within a try/catch.
450 * data/glr.cc: Include stdexcept.
451
452 2009-09-09 Akim Demaille <demaille@gostai.com>
453
454 lalr1.cc: add missing "inline".
455 * data/c++.m4 (b4_public_types_define): Add missing inline to
456 implementations provided in headers.
457
458 2009-09-09 Akim Demaille <demaille@gostai.com>
459
460 %param: documentation.
461 * NEWS (2.6): Document %param, %lex-param, and %parse-param
462 changes.
463 * doc/bison.texinfo: Document that %lex-param and %parse-param
464 are n-ary.
465 Changes some examples to demonstrate it.
466 (Calc++ Parser): Use %param.
467
468 2009-09-09 Akim Demaille <demaille@gostai.com>
469
470 Regen.
471
472 2009-09-09 Akim Demaille <demaille@gostai.com>
473
474 style changes.
475 * src/parse-gram.y (add_param): Scope changes.
476
477 2009-09-09 Akim Demaille <demaille@gostai.com>
478
479 %parse: support several arguments.
480 * src/parse-gram.y (current_param): New.
481 (param_type): Add param_none.
482 (params): New nonterminal.
483 Use it.
484
485 2009-09-09 Akim Demaille <demaille@gostai.com>
486
487 Regen.
488
489 2009-09-09 Akim Demaille <demaille@gostai.com>
490
491 %param.
492 Provide a means to factor lex-param and parse-param common
493 declarations.
494
495 * src/parse-gram.y (param_type): New.
496 Define a %printer for it.
497 (add_param): Use it.
498 (%parse-param, %lex-param): Merge into...
499 (%parse): this new token.
500 Adjust the grammar to use it.
501 * src/scan-gram.l (RETURN_VALUE): New.
502 (RETURN_PERCENT_FLAG): Use it.
503 (RETURN_PERCENT_PARAM): New.
504 Use it to support %parse-param, %lex-param and %param.
505
506 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
507
508 Use aver not assert.
509 * src/output.c: Don't include assert.h.
510 (output_skeleton): Use aver not assert.
511 * src/system.h (aver): In documentation of why, add links to
512 Paul Eggert's explanations in the mailing lists.
513
514 2009-09-05 Alex Rozenman <rozenman@gmail.com>
515
516 Use "Unresolved reference" error message when no symbols were found
517 in a symbolic reference resolution. Remove .expr and -expr from
518 the shown reference when the reference is unresolved.
519 * src/scan-code.l: Change the error message, adjust location columns,
520 rename variable "exact_mode" to "explicit_bracketing".
521 * tests/named-ref.at: Adjust existing tests and add a new one.
522
523 2009-09-04 Akim Demaille <demaille@gostai.com>
524
525 Adjust synclines in src/parse-gram.[ch].
526 * tests/bison.in: Do some magic (including working around issues
527 with ylwrap) when this wrapper is used to compile
528 src/parse-gram.y.
529
530 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
531
532 Complain about unused %define variables and %code qualifiers.
533 * NEWS (2.5): Document.
534 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
535 * doc/bison.texinfo (Decl Summary): Document complaint, and
536 improve %define documentation a little otherwise.
537 * tests/input.at (Reject unused %code qualifiers): Update.
538 (%define errors): Update.
539 (%define, --define, --force-define): Update.
540 (%define backward compatibility): Update.
541 (Unused %define api.pure): Update.
542 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
543
544 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
545
546 Don't suppress warnings about unused parse.error.
547 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
548 %define variable parse.error unless b4_error_verbose_flag is
549 actually expanded in a skeleton.
550
551 2009-09-03 Akim Demaille <demaille@gostai.com>
552
553 * NEWS (2.4.2): Add "Internationalization" item.
554
555 2009-09-03 Akim Demaille <demaille@gostai.com>
556
557 bootstrap: fix/improve find_tool.
558 * bootstrap (find_tool): Improve error messages.
559 Fix typo about find_tool_names.
560
561 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
562
563 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
564 See
565 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
566 * src/scan-code.h (code_props_rule_action_init): Rename
567 named_ref arg to name so it doesn't shadow named_ref type. This
568 makes it consistent with the function definition in scan-code.l
569 anyway.
570
571 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
572
573 %define: accept unquoted values.
574 * NEWS (2.5): Group all %define changes together, and document
575 this one. Remove quotes in IELR and canonical LR entry.
576 * doc/bison.texinfo: Remove quotes in most examples throughout.
577 (Decl Summary): Update %define documentation.
578 (Table of Symbols): Likewise.
579 * src/ielr.c (LrType): Update documentation.
580 * src/parse-gram.y (content.opt): Add production for ID.
581 * tests/actions.at: Remove quotes in most tests.
582 * tests/calc.at: Likewise.
583 * tests/existing.at: Likewise.
584 * tests/input.at: Likewise.
585 * tests/local.at: Likewise.
586 * tests/push.at: Likewise.
587 * tests/reduce.at: Likewise.
588 * tests/torture.at: Likewise.
589
590 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
591
592 %define lr.type: make values lowercase IDs.
593 That is, "LALR" => "lalr", "IELR" => "ielr", and
594 "canonical LR" => "canonical-lr".
595 * NEWS (2.5): Update documentation.
596 * doc/bison.texinfo (Decl Summary): Likewise.
597 * src/ielr.c (ielr): Use new values.
598 * src/ielr.h (ielr): Update documentation.
599 * src/reader.c (prepare_percent_define_front_end_variables): Use
600 and validate new values.
601 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
602 grammars.
603 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
604
605 2009-08-27 Eric Blake <ebb9@byu.net>
606
607 scan-gram: avoid portability trap with ctype usage.
608 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
609 Avoid compiler warning.
610
611 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
612
613 tests: use perl for printing special sequences to files.
614 And skip tests if perl is not available. This is better than
615 playing tricks with shell portability. Suggested by Akim
616 Demaille.
617 * tests/input.at (Bad character literals): Use it here for
618 omitting final newlines.
619 (Bad escapes in literals): Use it here for special characters.
620
621 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
622
623 tests: show a use of %define lr.default-reductions "consistent"
624 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
625 prevents the omission of expected tokens for %error-verbose.
626
627 2009-08-26 Akim Demaille <demaille@gostai.com>
628
629 tests: portability fix.
630 * tests/input.at (Bad escapes in literals): Don't expect "echo
631 '\0'" to output \ then 0.
632
633 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
634
635 Actually handle the yytable zero value correctly this time.
636 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
637 zero values in the YYTABLE comments.
638 * data/glr.c (yytable_value_is_error): Don't check for zero
639 value.
640 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
641 * data/yacc.c (yytable_value_is_error): Likewise.
642 * data/lalr1.java (yy_table_value_is_error_): Likewise.
643 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
644 * src/tables.h: In header comments, explain why it's useless to
645 check for a zero value in yytable.
646
647 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
648
649 More fixes related to last two patches.
650 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
651 comments: zero indicates syntax error not default action.
652 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
653 defined.
654 * data/glr.c (yyis_pact_ninf): Rename to...
655 (yypact_value_is_default): ... this.
656 (yyisDefaultedState): Update for rename.
657 (yyis_table_ninf): Rename to...
658 (yytable_value_is_error): ... this, and check for value zero
659 besides just YYTABLE_NINF.
660 (yygetLRActions): Check for default value from yypact. It
661 appears that this check is always performed before this function
662 is invoked, and so adding the check here is probably redundant.
663 However, the code may evolve after this subtlety is forgotten.
664 Also, update for rename to yytable_value_is_error. Because that
665 macro now checks for zero, a different but equivalent branch of
666 the if-then-else here is evaluated.
667 (yyreportSyntaxError): Update for rename to
668 yytable_value_is_error. The zero condition was mishandled
669 before.
670 (yyrecoverSyntaxError): Update for renames. No behavioral
671 changes.
672 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
673 New function.
674 (yy_table_value_is_error_): New function.
675 (parse): Use new functions where possible. No behavioral
676 changes.
677 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
678 The zero condition was mishandled before.
679 * data/yacc.c (yyis_pact_ninf): Rename to...
680 (yypact_value_is_default): ... this.
681 (yyis_table_ninf): Rename to...
682 (yytable_value_is_error): ... this, and check for value zero
683 besides just YYTABLE_NINF.
684 (yysyntax_error): Update for rename to yytable_value_is_error.
685 The zero condition was mishandled before.
686 (yyparse): Update for renames. No behavioral changes.
687 * src/tables.h: Improve comments about yypact, yytable, etc.
688 more. Most importantly, say yytable value of zero means syntax
689 error not default action.
690
691 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
692
693 Fix %error-verbose for conflicts resolved by %nonassoc.
694 * NEWS (2.5): Document.
695 * data/glr.c (yyreportSyntaxError): Fix this by checking
696 yyis_table_ninf.
697 * data/yacc.c (yysyntax_error): Likewise.
698 * data/lalr1.cc (yysyntax_error_): Fix this by checking
699 yytable_ninf_.
700 * data/lalr1.java (yysyntax_error): Likewise.
701 * tests/conflicts.at (%nonassoc and eof): Update expected output
702 and remove FIXME.
703
704 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
705
706 Some code and documentation improvements.
707 * data/c.m4 (b4_table_value_equals): New macro to capture
708 some repeated code.
709 * data/glr.c (yyis_pact_ninf): Use it here.
710 (yyis_table_ninf): Likewise.
711 (yyreportSyntaxError): Improve internal comments.
712 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
713 Use it everywhere possible.
714 (yyis_table_ninf): Likewise.
715 (yysyntax_error): Improve internal comments.
716 * data/lalr1.cc (yysyntax_error_): Likewise.
717 * data/lalr1.java (yysyntax_error): Likewise.
718 * src/tables.h: Improve comments about yypact, yytable, etc.
719
720 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
721
722 Use locale when quoting.
723 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
724 quote rather than implementing quoting here.
725
726 2009-08-20 Eric Blake <ebb9@byu.net>
727
728 Make previous patch more robust.
729 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
730 argmatch.h.
731 (output_skeleton): Use it.
732 Suggested by Akim Demaille.
733
734 Import latest m4/m4.m4.
735 * submodules/autoconf: Update to autoconf 2.64.
736 * configure.ac (M4_GNU_OPTION): New define.
737 * src/output.c (output_skeleton): Use it to resolve FIXME.
738 * NEWS: Mention this.
739
740 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
741
742 Fix complaints about escape sequences.
743 Discussed starting at
744 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
745 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
746 For a \0 and similar escape sequences meaning the null
747 character, report an invalid escape sequence instead of an
748 invalid null character because the latter does not actually
749 appear in the user's input.
750 In all escape sequence complaints, don't escape the initial
751 backslash, and don't quote when the sequence appears at the end
752 of the complaint line unless there's whitespace that quotearg
753 won't escape.
754 Consistently say "invalid" not "unrecognized".
755 Consistently prefer "empty character literal" over "extra
756 characters in character literal" warning for invalid escape
757 sequences; that is, consistently discard those sequences.
758 * tests/input.at (Bad escapes in literals): New.
759
760 2009-08-19 Akim Demaille <demaille@gostai.com>
761
762 doc: fixes.
763 * doc/bison.texinfo: Fix minor Texinfo errors.
764
765 2009-08-19 Akim Demaille <demaille@gostai.com>
766
767 tests: distcc compliance.
768 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
769 error messages from the output.
770
771 2009-08-19 Akim Demaille <demaille@gostai.com>
772
773 variables: simplify the upgrade of namespace into api.namespace.
774
775 This patch simplifies "variables: rename namespace as
776 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
777 Suggested by Joel E. Denny in
778 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
779
780 * src/muscle-tab.c (muscle_percent_variable_update): New.
781 (muscle_percent_define_insert): Use it in replacement of the
782 previous tr invocation.
783 Remove variable_tr, no longer needed.
784 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
785 Remove.
786 * data/c++.m4: No longer handle namespace -> api.namespace.
787 * tests/input.at (%define backward compatibility): Check that
788 namespace is treated as api.namespace.
789
790 2009-08-19 Akim Demaille <demaille@gostai.com>
791
792 doc: %initial-action to initialize yylloc.
793 Reported by Bill Allombert.
794 * doc/bison.texinfo: Set fill-column to 76.
795 (Location Type): Document the use of %initial-action to initialize
796 yylloc.
797
798 2009-08-19 Akim Demaille <demaille@gostai.com>
799
800 lalr1.cc: use state_type.
801 * data/lalr1.cc (yysyntax_error_): Use state_type.
802 Move argument names into yy*.
803
804 2009-08-19 Akim Demaille <demaille@gostai.com>
805
806 lalr1.cc: get rid of yyparse's yystate.
807 yystate and yystack_[0].state are equal, keep only the latter.
808 The former was also used as a temporary variable to compute the
809 post-reduction state. Move this computation into an auxiliary
810 function.
811
812 * data/glr.c (yyLRgotoState): Fuse variable definition and first
813 assignment.
814 * data/lalr1.cc (yy_lr_goto_state_): New.
815 (yyparse): Use it.
816 Replace remaining uses of yystate by yystate_[0].state.
817 Remove the former.
818
819 2009-08-19 Akim Demaille <demaille@gostai.com>
820
821 lalr1.cc: destroy $$ when YYERROR is called.
822 * data/lalr1.cc (yyreduce): Compute the resulting state before
823 running the user action so that yylhs is a valid symbol.
824 (yyerrorlab): Since yylhs is complete (it knows its type), we can
825 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
826 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
827
828 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
829
830 maint: update for gnulib's recent update-copyright changes
831 * gnulib: Update.
832 * .x-update-copyright (COPYING): Add as it's no longer implied
833 when .x-update-copyright is present.
834 * cfg.mk (update-copyright-local): Remove, now ignored.
835 (update-copyright): Declare update-b4-copyright as a dependency.
836
837 2009-08-17 Akim Demaille <demaille@gostai.com>
838
839 build: require gettext 0.17.
840
841 Suggested by Bruno Haible.
842 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
843 * configure.ac: require gettext 0.17 to ensure compatibility with
844 gnulib.
845
846 2009-08-17 Akim Demaille <demaille@gostai.com>
847
848 build: lower gettext requirements.
849
850 Bison was uselessly requiring the formatstring macros from
851 gettext, which resulted in mo files not being installed on systems
852 that perfectly supported Bison mo files. Lower the requirement.
853 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
854
855 * configure.ac: Require need-ngettext instead of
856 need-formatstring-macros.
857 Reported by Martin Jabocs.
858 Suggested by Bruno Haible.
859 * INSTALL: Restructure.
860 (Internationalization): New.
861
862 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
863
864 maint: fix use of copyright year intervals.
865 * gnulib: Update.
866 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
867 as now recommended in gnulib/NEWS.
868 * build-aux/update-b4-copyright: Fix.
869 * cfg.mk (update-copyright-env): Configure update-copyright.
870
871 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
872
873 Make it easier to write deterministic tests.
874 Continues Akim's work from his 2009-06-10 commits.
875 * src/reader.c (check_and_convert_grammar): Don't add any
876 symbols after the first symbols_do invocation.
877 * src/symtab.c (symbols_sorted): New static global.
878 (user_token_number_redeclaration): Update comments.
879 (symbol_from_uniqstr): If a new symbol is being created, assert
880 that symbols_sorted hasn't been allocated yet.
881 (symbols_free): Free symbols_sorted.
882 (symbols_cmp, symbols_cmp_qsort): New functions.
883 (symbols_do): Sort symbol_table into symbols_sorted on first
884 invocation.
885 * tests/input.at (Numbered tokens): Recombine tests now that the
886 output should be deterministic across multiple numbers.
887
888 2009-08-12 Akim Demaille <demaille@gostai.com>
889
890 tests: GCC 4.5 compliance.
891 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
892 messages about #error.
893
894 2009-08-12 Akim Demaille <demaille@gostai.com>
895
896 build: fix the generation of the documentation.
897 Some of our targets use "bison --help", but they can't depend on
898 "bison" itself (to avoid additional requirements on the user), so
899 they used to call "make src/bison" in the commands. Then
900 concurrent builds may fail: one make might be aiming one of its
901 jobs at compiling src/bison, and another job at generating the man
902 page. If the latter is faster than the former, then we have two
903 makes that concurrently try to compile src/bison.
904
905 This might also be a more convincing explanation for the failure
906 described in the patch "build: fix paths".
907
908 * Makefile.am (SUFFIXES): Initialize.
909 * build-aux/move-if-change: New, symlink to gnulib's.
910 * build-aux/local.mk: Ship it.
911 * doc/common.x: Remove, merged into...
912 * doc/bison.x: here.
913 * doc/local.mk (doc/bison.help): New.
914 ($(CROSS_OPTIONS_TEXI)): Depend on it.
915 Use src/bison.
916 (.x.1): Replace with...
917 (doc/bison.1): this explicit, simpler, target.
918 (common_dep): Remove, inlined where appropriate.
919 (SUFFIXES, PREPATH): Remove, unused.
920
921 2009-08-12 Akim Demaille <demaille@gostai.com>
922
923 gnulib: improve prefixing.
924 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
925 change the value of...
926 (gl_LIBOBJS): this.
927 Adjust more variables.
928 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
929 gl_LIBOBJS.
930 (prefix): Also transform rules whose targets have slashes.
931 Use $prefix liberally.
932 Map @MKDIR_P@ to $(MKDIR_P).
933 Prefix directories that are mkdir'd.
934
935 2009-08-12 Akim Demaille <demaille@gostai.com>
936
937 build: fix paths.
938 When using $(top_builddir) inconsistently, Make (including GNU
939 Make) is sometimes confused. As a result it may want to build
940 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
941 file, different names) concurrently, which, amusingly enough,
942 might end with:
943
944 ranlib lib/libbison.a
945 ranlib lib/libbison.a
946 make[2]: *** [lib/libbison.a] Segmentation fault
947
948 on OS X.
949
950 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
951 needed.
952
953 2009-08-12 Akim Demaille <demaille@gostai.com>
954
955 distcheck: fix.
956
957 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
958
959 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
960
961 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
962
963 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
964
965 Miscellaneous code readability improvements.
966
967 * src/reader.c (reader): Move %define front-end variable
968 defaults and checking into...
969 (prepare_percent_define_front_end_variables): ... this new
970 function.
971
972 * src/scan-gram.l (INITIAL): For consistency with string
973 literals, don't store open quote on character literal. It's
974 discarded before returning anyway.
975 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
976 Make length test more readable, and make the character stored
977 for an empty literal more obvious while consistent with the
978 previous behavior.
979
980 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
981 USER_NUMBER_HAS_STRING_ALIAS throughout.
982 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
983 that is repeated in symtab.h. Improve argument names to make it
984 clear which side of the symbol-string alias pair is which.
985 (symbol_check_alias_consistency): Improve local variable names
986 for the same purpose.
987 * src/symtab.h (struct symbol): Make comments about aliases
988 clearer.
989 (symbol_make_alias): Improve comments and argument name.
990 * src/output.c (token_definitions_output): Update for rename to
991 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
992
993 2009-08-08 Alex Rozenman <rozenman@gmail.com>
994
995 Convert "misleading reference" messages to warnings.
996 * src/scan-code.l: New function 'show_sub_messages', more
997 factoring.
998 * tests/named-ref.at: Adjust tests.
999
1000 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1001
1002 maint: run "make update-copyright"
1003
1004 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1005
1006 maint: make update-b4-copyright easier to use
1007 * build-aux/update-b4-copyright: In warnings, report line
1008 numbers rather than character positions.
1009 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1010 that update-copyright runs it.
1011 * gnulib: Update.
1012
1013 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1014
1015 maint: clean up update-b4-copyright code
1016 * build-aux/update-b4-copyright: Do not accept 2-digit
1017 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1018 Don't accept a `[' in a b4_copyright argument.
1019 Format code more consistently.
1020 Don't assume b4*copyright never occurs.
1021
1022 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1023
1024 maint: automate b4_copyright updates.
1025 * Makefile.am (update-b4-copyright): New target rule.
1026 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1027 * build-aux/update-b4-copyright: New.
1028 * data/yacc.c: Remove stray characters around b4_copyright
1029 invocations.
1030
1031 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1032
1033 maint: automate annual package-wide copyright-year update.
1034 * .x-update-copyright: New.
1035 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1036 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1037 update-copyright. Remove gnumakefile, which is implied by
1038 maintainer-makefile.
1039 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1040 * gnulib: Update.
1041 * maint.mk: Remove, now copied from gnulib.
1042 * examples/extexi: Add missing "(C)" in copyright statement so
1043 update-copyright can recognize it.
1044 * src/LR0.h: Likewise.
1045 * src/print.h: Likewise.
1046 * src/print_graph.h: Likewise.
1047 * src/gram.c: Add missing comma in copyright statement.
1048 * src/gram.h: Likewise.
1049
1050 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1051
1052 Fix "make distcheck".
1053 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1054 of just calc.stamp.
1055
1056 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1057
1058 Pacify "gcc -Wunused" for the input function from Flex.
1059 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1060 and later.
1061 * src/scan-code.l: Add "%option noinput", which I cannot find in
1062 the Flex manual, but which Flex has supported since at least as
1063 far back as 2.5.4. However, if any of our developers still use
1064 Flex 2.5.4, they'll need to stop configuring with
1065 --enable-gcc-warnings because "%option noinput" didn't work
1066 correctly until Flex 2.5.6.
1067 * src/scan-gram.l: Likewise.
1068 * src/scan-skel.l: Likewise.
1069
1070 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1071
1072 Fix --enable-gcc-warnings problems.
1073 * src/reader.c: Adjust variable names.
1074 * src/scan-code.l: Fix prototypes and adjust names.
1075 * src/named-ref.c: Remove redundant "if".
1076
1077 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1078
1079 Fix a --enable-gcc-warnings problem.
1080 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1081 variable.
1082
1083 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1084
1085 Warn about character literals not of length one.
1086 * NEWS (2.5): Document.
1087 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1088 the length.
1089 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1090 * tests/input.at (Bad character literals): New test group.
1091
1092 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1093
1094 Fix some memory leaks.
1095 * src/named-ref.c: Add a pointer check (named_ref_free).
1096 * src/scan-code.l: New function (variant_table_free). Called in
1097 code_scanner_free.
1098 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1099
1100 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1101
1102 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1103
1104 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1105
1106 Some M4 cleanup in the testsuite.
1107 Suggested by Eric Blake at
1108 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1109 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1110 complicate the code by distinguishing between a missing value
1111 and an empty string value for an optional argument. This fix is
1112 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1113 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1114 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1115 arguments are not needed because of the following changes.
1116 Fix stale comments.
1117 Bison developers should use GNU M4 and should not use
1118 POSIXLY_CORRECT when building the test suite, so do not
1119 complicate the code by avoiding $10 and above.
1120 Do not quote an empty string value for an optional argument, and
1121 do not distinguish between a missing value and an empty string
1122 value.
1123
1124 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1125
1126 Revert unnecessary column realignment in --help output.
1127 Reported by Akim Demaille at
1128 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1129 * src/getargs.c (usage): Here.
1130
1131 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1132
1133 Alphabetical order in src/local.mk.
1134 * src/local.mk: Adjust.
1135
1136 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1137
1138 Style changes and factoring.
1139 * src/named-ref.h: Add comments.
1140 * src/parse-gram.y: Readability and style changes.
1141 * src/reader.c: Factoring: assign_named_ref function.
1142 * src/scan-code.l: Factoring and style changes. Rename
1143 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1144 Use "unsigned" type for variant index. Improve readablity.
1145 * src/scan-gram.l: Change error messages and add comments.
1146 * src/symlist.h: symbol_list_null: New function decl.
1147 * src/symlist.c: symbol_list_null: Implement here.
1148 * tests/named-refs.at: Adjust for new error messages.
1149
1150 2009-06-29 Eric Blake <ebb9@byu.net>
1151
1152 scan-code: avoid compiler warnings
1153 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1154
1155 2009-06-29 Akim Demaille <demaille@gostai.com>
1156
1157 build: avoid concurrent extraction of calc++.
1158 * examples/calc++/Makefile.am (calc.stamp): New.
1159 Depend on it to create the sources of calc++ so that concurrent
1160 builds don't launch several "extexi" in parallel.
1161 Not only this is inefficient, this also builds incorrect sources
1162 with several extractions mixed together.
1163
1164 2009-06-29 Akim Demaille <demaille@gostai.com>
1165
1166 parse.error: fix.
1167 * data/bison.m4: Move code related to specific variables after the
1168 definition of the variable-maintaining macros so that we don't
1169 "invoke" b4_percent_define_check_values before it is defined.
1170
1171 2009-06-29 Akim Demaille <demaille@gostai.com>
1172
1173 variables: parse.error
1174
1175 Implement, document, and test the replacement of %error-verbose
1176 by %define parse.error "verbose".
1177 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1178 values of the parse.error variable.
1179 Make "simple" its default value.
1180 Check the valid values.
1181 * src/parse-gram.y: Use %define parse.error.
1182 (PERCENT_ERROR_VERBOSE): New token.
1183 Support it.
1184 * src/scan-gram.l: Support %error-verbose.
1185
1186 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1187 %define error-verbose by that of %define parse.error.
1188 * NEWS: Document it.
1189
1190 * tests/actions.at, tests/calc.at: Use parse.error instead of
1191 %error-verbose.
1192
1193 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1194
1195 Implement support for named symbol references.
1196 * src/parse-gram.y: Add new syntax (named_ref.opt).
1197 * src/reader.c: Store named refs in symbol lists.
1198 * src/reader.h: New argument for symbol_append and
1199 action_append functions.
1200 * src/scan-code.h: Add new field (named_ref) into
1201 code_props data structure. Keeps named ref of midrule
1202 actions.
1203 * src/scan-code.l: Support for named refs in semantic
1204 action code. New function 'parse_named_ref'.
1205 * src/scan-gram.l: Support bracketed id.
1206 * src/symlist.c: Store named refs in symbol lists.
1207 * src/symlist.h: New field in symbol list: named_ref.
1208 * src/named-ref.h: New file, a struct for named_ref.
1209 * src/named-ref.cp: New file, named_ref_new function.
1210 * src/local.mk: Add two new files.
1211 * tests/testsuite.at: Include new test group:
1212 * tests/named-refs.at: this new file.
1213
1214 2009-06-25 Akim Demaille <demaille@gostai.com>
1215
1216 hash: check insertion for memory exhaustion.
1217 * src/uniqstr.c (uniqstr_new): New.
1218
1219 2009-06-24 Akim Demaille <demaille@gostai.com>
1220
1221 variables: rename namespace as api.namespace.
1222 Discussed in
1223 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1224
1225 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1226 New.
1227 (b4_percent_define_use): New.
1228 Use it where applicable.
1229 * data/c++.m4: Replace uses of the variable "namespace" by
1230 "api.namespace".
1231 Default the latter to the former.
1232 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1233 obsolete.
1234 Document api.namespace.
1235 Use @samp to document %define uses, keep @code for identifiers.
1236 * NEWS: Likewise.
1237 * tests/c++.at, tests/input.at: Test api.namespace instead of
1238 namespace. (The tests passed with namespace.)
1239
1240 2009-06-11 Akim Demaille <demaille@gostai.com>
1241
1242 style changes.
1243 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1244 * src/print-xml.c: Style changes.
1245 * tests/conflicts.at: Comment changes.
1246
1247 2009-06-11 Akim Demaille <demaille@gostai.com>
1248
1249 xml: beware of user strings used to give a %prec to rules.
1250 * tests/conflicts.at (%prec with user strings): New.
1251 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1252 XML output.
1253
1254 2009-06-11 Akim Demaille <demaille@gostai.com>
1255
1256 hash: check insertion for memory exhaustion.
1257 * src/muscle-tab.c (muscle_insert, muscle_grow)
1258 * src/state.c (state_hash_insert): Check the return value of
1259 hash_insert.
1260
1261 2009-06-11 Akim Demaille <demaille@gostai.com>
1262
1263 tests: honor TESTSUITEFLAGS in every check target.
1264 * tests/local.mk (RUN_TESTSUITE): New.
1265 (check-local, installcheck-local, maintainer-check-g++)
1266 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1267
1268 2009-06-10 Akim Demaille <demaille@gostai.com>
1269
1270 deterministic test suite.
1271 Some consistency checks on symbols are performed after all the
1272 symbols were read, by an iteration over the symbol table. This
1273 traversal is nondeterministic, which can be a problem for test
1274 cases.
1275 Avoid this.
1276 Addresses another form of nondeterminism reported by Joel E. Denny.
1277 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1278
1279 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1280 test in two.
1281 Use different file names for the three tests to make the
1282 maintenance easier.
1283
1284 2009-06-10 Akim Demaille <demaille@gostai.com>
1285
1286 gnulib: update.
1287 * gnulib: Update to latest.
1288 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1289 * m4/.gitignore: Regen.
1290 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1291 Call xalloc_die on hash_insert failures.
1292 Requested by the new __warn_unused_result__ attribute of
1293 hash_insert.
1294
1295 2009-06-10 Akim Demaille <demaille@gostai.com>
1296
1297 deterministic user-token-number redeclaration errors.
1298 Address nondeterminism reported by Joel E. Denny.
1299 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1300
1301 * src/uniqstr.h: Comment changes.
1302 * src/location.h (boundary_cmp, location_cmp): New.
1303 * src/symtab.c (user_token_number_redeclaration): New.
1304 (symbol_translation): Use it.
1305 * tests/input.at (Numbered tokens): Adjust the expected output.
1306
1307 2009-05-25 Akim Demaille <demaille@gostai.com>
1308
1309 build: avoid ignored errors.
1310 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1311 errors, they pollute the output.
1312
1313 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1314
1315 Convert multiple variable definition warnings to complaints.
1316 * NEWS (2.5): Add a new entry for that change.
1317 * doc/bison.texinfo (Decl Summary): Update %define entry.
1318 (Bison Options): Update -D/--define/-F/--force-define entry.
1319 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1320 * src/muscle-tab.h (muscle_percent_define_insert): Update
1321 comments.
1322 * tests/input.at (`%define errors'): Update.
1323 (`%define, --define, --force-define'): Update.
1324
1325 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1326
1327 -F/--force-define and relative %define/-D/--define priorities.
1328 * NEWS (2.5): Add documentation to -D/--define entry.
1329 * build-aux/cross-options.pl: Hard-code association of
1330 --force-define with %define.
1331 * doc/bison.texinfo (Decl Summary): In %define entry,
1332 cross-reference command-line options.
1333 (Bison Options): Add documentation to -D/--define entry.
1334 (Option Cross Key): Widen column for --force-define row.
1335 * src/getargs.c (usage): Document -F/--force-define. Realign
1336 options in output.
1337 (short_options, long_options, getargs): Parse -F/--force-define,
1338 and update muscle_percent_define_insert invocations.
1339 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1340 (muscle_percent_define_insert): Add argument with that type.
1341 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1342 -F/--force-define behavior and priorities.
1343 (muscle_percent_define_ensure): Update
1344 muscle_percent_define_insert invocation.
1345 * src/parse-gram.y (prologue_declaration): Update
1346 muscle_percent_define_insert invocations.
1347 * tests/input.at (`%define, --define'): Rename to...
1348 (`%define, --define, --force-define'): ... this and extend.
1349
1350 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1351
1352 Update some comments to make sense for -D.
1353 * data/bison.m4 (b4_check_user_names): In header comments, say
1354 "user occurrence" instead of "grammar occurrence".
1355 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1356 (muscle_percent_code_grow): Likewise just for consistency.
1357
1358 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1359
1360 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1361
1362 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1363
1364 Handle a trailing `:' in a user-supplied C++ namespace better.
1365 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1366 among the closing braces here. This fix might make the
1367 generated code easier to debug, but otherwise it should be
1368 insignificant because a trailing `:' is a C++ error already.
1369
1370 2009-05-19 Akim Demaille <demaille@gostai.com>
1371
1372 remove useless variable.
1373 * src/getargs.c (skeleton_arg): Remove now useless variable.
1374 Should help the compiler see that this printf-like call is sane.
1375
1376 2009-05-15 Akim Demaille <demaille@gostai.com>
1377
1378 Rename token.prefix as api.tokens.prefix.
1379 Discussed here.
1380 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1381
1382 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1383 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1384 (token.prefix): Rename as...
1385 (api.tokens.prefix): this.
1386
1387 2009-05-11 Akim Demaille <demaille@gostai.com>
1388
1389 doc: use C++ headers.
1390 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1391 headers.
1392
1393 2009-05-11 Akim Demaille <demaille@gostai.com>
1394
1395 doc: token.prefix
1396 * doc/bison.simple (Decl Summary): Document token.prefix.
1397 (Calc++ Parser): Various fixes.
1398 Formatting changes.
1399 Use token.prefix.
1400 Introduce a macro TOKEN to shorten the code and make it more
1401 readable.
1402 (Calc++ Scanner): Adjust.
1403 * NEWS (Variable token.prefix): New.
1404
1405 2009-05-04 Akim Demaille <demaille@gostai.com>
1406
1407 bison: catch bad symbol names.
1408 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1409 * tests/input.at: Adjust.
1410
1411 2009-05-04 Akim Demaille <demaille@gostai.com>
1412
1413 identifiers: dashes are letters.
1414 Dashes can now start identifiers (symbols and directives).
1415
1416 * src/scan-gram.l ({letter}): Add dash.
1417 ({id}): Remove it.
1418 * tests/input.at (Symbols): Adjust.
1419 Remove stray comment.
1420 * tests/regression.at (Invalid inputs): Adjust error message.
1421 * doc/bison.texinfo (Symbols): Update.
1422
1423 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1424
1425 Declare %code to be a permanent feature.
1426 * NEWS (2.4.2): Here.
1427 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1428 experimental.
1429 (Decl Summary): Likewise.
1430
1431 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1432
1433 Convert underscores to dashes in some %define variable names.
1434 For now, just api.push-pull and lr.keep-unreachable-states.
1435 Maintain old names for backward compatibility.
1436 * NEWS (2.5): Document.
1437 * data/c.m4 (b4_identification): Update comment.
1438 * data/yacc.c: Update access.
1439 * doc/bison.texinfo: Update.
1440 * etc/bench.pl.in (bench_push_parser): Update use.
1441 * src/files.c (tr): Move to...
1442 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1443 think of a better place to expose it. My logic is that, for all
1444 uses of tr so far, command-line arguments can be involved, and
1445 getargs.h is already included.
1446 * src/main.c (main): Update access.
1447 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1448 variable names to new variable names before assigning value.
1449 * src/reader.c (reader): Update setting default.
1450 * tests/calc.at: Update uses.
1451 * tests/conflicts.at (Unreachable States After Conflict
1452 Resolution): Update use.
1453 * tests/input.at (%define enum variables): Update use.
1454 (%define backward compatibility): New test group.
1455 * tests/push.at: Update uses.
1456 * tests/reduce.at: Update uses.
1457 * tests/torture.at: Update uses.
1458
1459 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1460
1461 Set all front-end %define defaults in one place.
1462 * src/main.c (main): Move lr.keep_unreachable_states default...
1463 * src/reader.c (reader): ... to here.
1464
1465 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1466
1467 Rename lr.default_reductions to lr.default-reductions.
1468 * NEWS (2.5): Here.
1469 * doc/bison.texinfo: Here.
1470 * src/lalr.c (initialize_LA): Here.
1471 * src/print.c (print_reductions): Here.
1472 * src/reader.c (reader): Here.
1473 * src/tables.c (action_row): Here.
1474 * tests/input.at (%define enum variables): Here.
1475 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1476
1477 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1478
1479 Pacify ./configure --enable-gcc-warnings.
1480 * tests/input.at (Symbols): Prototype yyerror and yylex.
1481
1482 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1483
1484 Document how `%define "var" "value"' is not M4-friendly.
1485 * src/parse-gram.y (variable): In comments here.
1486
1487 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1488
1489 Clean up recent patches a little.
1490 Reported by Akim Demaille.
1491 * doc/bison.texinfo (Understanding): Fix typos.
1492 * src/print.c (print_reductions): Don't use negated variable.
1493
1494 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1495
1496 List accepted values for a %define enum variable with an invalid value.
1497 Suggested by Akim Demaille at
1498 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1499 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1500 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
1501 * tests/input.at (%define lr.default_reductions invalid values): Merge
1502 into...
1503 (%define enum variables): ... here, and update output.
1504
1505 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1506
1507 Rename "default rule" to "default reduction".
1508 This includes changing variable names in code, changing
1509 comments, and renaming %define lr.default_rules to %define
1510 lr.default_reductions.
1511 * NEWS (2.5): Update IELR documentation.
1512 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
1513 documentation.
1514 * data/glr.c, data/lalr1.java: Sync copyright dates.
1515 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1516 and lr.type documentation. Make some other wording
1517 improvements.
1518 (Glossary): Adjust cross-references and Default Reduction
1519 definition.
1520 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1521 Remove a confusing comment pointed out by Akim Demaille.
1522 (initialize_LA): Adjust code.
1523 * src/print-xml.c (print_reductions): Adjust code.
1524 * src/print.c (print_reductions): Adjust code.
1525 * src/reader.c (reader): Adjust code.
1526 * src/tables.c (action_row): Adjust code.
1527 (token_actions): Adjust code.
1528 * src/tables.h: Adjust YYDEFACT documentation.
1529 * tests/input.at (%define lr.default_rules invalid values):
1530 Rename test group to...
1531 (%define lr.default_reductions invalid values): ... this, and
1532 update grammar file and expected output.
1533 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1534 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1535
1536 2009-04-21 Akim Demaille <demaille@gostai.com>
1537
1538 tests: check the use of dashes and periods in symbols.
1539 * tests/input.at (Symbol): New test group.
1540
1541 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1542
1543 Document %define lr.type and lr.default_rules.
1544 * NEWS (2.5): Add an entry.
1545 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1546 besides just LALR(1) and GLR(1).
1547 * doc/bison.texinfo (Introduction): Likewise.
1548 (Language and Grammar): Bison is no longer limited to LALR(1)
1549 restrictions.
1550 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1551 when trying to distinguish from GLR. Talk about LR(1) grammars
1552 rather than LALR(1) grammars.
1553 (Decl Summary): In %define api.push_pull entry, say it applies
1554 to deterministic parsers in C rather than LALR(1) parsers in C.
1555 Add lr.default_rules entry.
1556 Add lr.type entry.
1557 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1558 restrictions.
1559 (Generalized LR Parsing): Same changes as for the previous GLR
1560 section.
1561 (Memory Management): Say deterministic rather than LALR(1).
1562 (Understanding): Correct some bison output.
1563 Index discussion of "accepting state".
1564 Say deterministic rather than LALR(1).
1565 (Bison Options): In --yacc entry, say deterministic rather than
1566 LALR(1).
1567 In --report, --graph, and --xml entries, just don't mention
1568 LALR(1).
1569 (C++ Parsers): Say deterministic rather than LALR(1).
1570 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1571 (Glossary): Add Accepting State, Consistent State, Default Rule,
1572 and IELR(1) definitions.
1573 In Generalized LR (GLR) definition, make same changes as in
1574 previous GLR sections.
1575 In LALR(1) definition, say Bison uses LALR(1) by default rather
1576 than implying Bison is limited to LALR(1).
1577 (LocalWords): Add IELR.
1578
1579 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1580
1581 Finish implementing %define lr.type.
1582 Its value can be "LALR", "IELR", or "canonical LR".
1583 * lib/timevar.def (TV_IELR_PHASE1): New var.
1584 (TV_IELR_PHASE2): New var.
1585 (TV_IELR_PHASE3): New var.
1586 (TV_IELR_PHASE4): New var.
1587 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1588 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1589 Sbitset.h, ielr.h, and ielr.c.
1590 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1591 trace_types): Add trace_ielr.
1592 * src/lalr.h, src/lalr.c (ngotos): Export it.
1593 (F): Rename to...
1594 (goto_follows): ... this, update all uses, and export it.
1595 (set_goto_map): Export it.
1596 (map_goto): Export it.
1597 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1598 handled in ielr.
1599 (initialize_LA): Export it. Move lookback allocation to...
1600 (lalr): ... here because, for canonical LR, initialize_LA must
1601 be invoked but lookback and much of the rest of LALR isn't
1602 needed.
1603 * main.c (main): Instead of lalr, invoke ielr, which invokes
1604 lalr.
1605 * src/reader.c (reader): Default lr.type to "LALR".
1606 Default lr.default_rules to "accepting" if lr.type is "canonical
1607 LR". Leave the default as "all" otherwise.
1608 Check for a valid lr.type value.
1609 * src/state.h, src/state.c (struct state_list): Add state_list
1610 member.
1611 (state_new): Initialize state_list member to NULL.
1612 (state_new_isocore): New function, exported.
1613 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1614 exercises all values of lr.type.
1615 (GNU AWK Grammar): Rename test group to...
1616 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1617 AT_TEST_EXISTING_GRAMMAR.
1618 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1619 (GNU pic Grammar): Rename test group to...
1620 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1621 AT_TEST_EXISTING_GRAMMAR.
1622 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1623 all values of lr.type.
1624 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1625 (Lane Split): Likewise.
1626 (Complex Lane Split): Likewise.
1627 (Split During Added Lookahead Propagation): Likewise.
1628
1629 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1630
1631 Add new files for IELR and canonical LR implementation.
1632 * src/AnnotationList.c: New.
1633 * src/AnnotationList.h: New.
1634 * src/InadequacyList.c: New.
1635 * src/InadequacyList.h: New.
1636 * src/Sbitset.c: New.
1637 * src/Sbitset.h: New.
1638 * src/ielr.c: New.
1639 * src/ielr.h: New.
1640
1641 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1642
1643 Implement %define lr.default_rules.
1644 Its value describes the states that are permitted to contain
1645 default rules: "all", "consistent", or "accepting".
1646 * src/reader.c (reader): Default lr.default_rules to "all".
1647 Check for a valid lr.default_rules value.
1648 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1649 is "accepting", then only mark the accepting state as
1650 consistent.
1651 (initialize_LA): Tell state_lookahead_tokens_count whether
1652 lr.default_rules is "accepting".
1653 * src/tables.c (action_row): If lr.default_rules is not "all",
1654 then disable default rules in inconsistent states.
1655 * src/print.c (print_reductions): Use this opportunity to
1656 perform some assertions about whether lr.default_rules was
1657 obeyed correctly.
1658 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1659 helps with checking the parser tables for a grammar.
1660 * tests/input.at (%define lr.default_rules invalid values): New
1661 test group.
1662 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1663 AT_TEST_TABLES_AND_PARSE.
1664 (`no %define lr.default_rules'): New test group generated by
1665 AT_TEST_LR_DEFAULT_RULES.
1666 (`%define lr.default_rules "all"'): Likewise.
1667 (`%define lr.default_rules "consistent"'): Likewise.
1668 (`%define lr.default_rules "accepting"'): Likewise.
1669
1670 2009-04-20 Akim Demaille <demaille@gostai.com>
1671
1672 Formatting change.
1673
1674 2009-04-20 Akim Demaille <demaille@gostai.com>
1675
1676 bison: factoring.
1677 * src/output.c (token_definitions_output): Use symbol_id_get
1678 instead of duplicating its logic.
1679 * TODO (YYERRCODE): Extend.
1680
1681 2009-04-20 Akim Demaille <demaille@gostai.com>
1682
1683 variables: prefer error-verbose to error_verbose.
1684 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
1685 instead of error_verbose.
1686 * src/scan-gram.l (%error-verbose): Map to the error-verbose
1687 variable.
1688 * doc/bison.texinfo: Promote %define error-verbose instead of
1689 %error-verbose.
1690 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
1691
1692 2009-04-15 Akim Demaille <demaille@gostai.com>
1693
1694 variables: accept dashes.
1695 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
1696 underscores.
1697 * src/scan-gram.l ({id}): Also accept dashes after the initial
1698 letter.
1699 ({directive}): Use {id}.
1700 * src/parse-gram.y: Comment and formatting changes.
1701 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1702 symbols.
1703 * src/complain.h, src/complain.c (yacc_at): New.
1704 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1705 symbol names.
1706 * src/output.c (token_definitions_output): Do not #define token
1707 names with dashes.
1708
1709 2009-04-20 Akim Demaille <demaille@gostai.com>
1710
1711 Consistently refer to Yacc, not YACC.
1712 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1713
1714 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1715
1716 Pacify make maintainer-check-posix.
1717 * tests/input.at (%define, --define): Move bison command-line
1718 options before grammar file name.
1719
1720 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1721
1722 Document semicolon warnings.
1723 * NEWS (2.5): Here.
1724
1725 2009-04-14 Akim Demaille <demaille@gostai.com>
1726
1727 variables: use `parse.assert' instead of `assert'.
1728 * TODO (assert): Remove.
1729 * data/bison.m4 (b4_assert_if): Replace with...
1730 (b4_parse_assert_if): this.
1731 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
1732 * doc/bison.texinfo (Decl Summary): Document parse.assert.
1733
1734 2009-04-14 Akim Demaille <demaille@gostai.com>
1735
1736 variables: use `parse.trace' instead of `debug'.
1737 * src/getargs.c (getargs): Map -t to %define trace.parse.
1738 * src/scan-gram.l (%debug): Map to %define trace.parse.
1739 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
1740 names to `_' in macro names.
1741 (b4_debug_if): Replace with...
1742 (b4_parse_trace_if): this.
1743 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1744 * data/yacc.c: Adjust.
1745 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
1746 Use @code to label the variable list.
1747 Document the variable parse.trace.
1748 (Tracing): Promote the parse.trace variable.
1749 * TODO: %printer is not documented.
1750
1751 2009-04-14 Akim Demaille <demaille@gostai.com>
1752
1753 doc: minor fixes.
1754 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1755 (Table of Symbols): Remove duplicate entry for %debug.
1756
1757 2009-04-10 Eric Blake <ebb9@byu.net>
1758
1759 submodules: update to latest
1760 * submodules/autoconf: Use latest upstream Autoconf.
1761
1762 2009-04-06 Eric Blake <ebb9@byu.net>
1763
1764 Work around autoconf 2.63b bug in testsuite.
1765 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1766 autoconf bug related to # in test.
1767
1768 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1769
1770 * NEWS (2.5): New section. Describe new -D/--define feature.
1771
1772 2009-04-06 Akim Demaille <demaille@gostai.com>
1773
1774 Regen.
1775 * src/parse-gram.h, src/parse-gram.c: Regen.
1776
1777 2009-04-06 Akim Demaille <demaille@gostai.com>
1778
1779 rename muscle_tab.* as muscle-tab.* for consistency.
1780 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
1781 * src/muscle-tab.h, src/muscle-tab.c: these.
1782 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
1783 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
1784
1785 2009-04-06 Akim Demaille <demaille@gostai.com>
1786
1787 Makefile: introduce $(BISON).
1788 * src/local.mk (BISON): New.
1789 (YACC): Use it.
1790
1791 2009-04-06 Akim Demaille <demaille@gostai.com>
1792
1793 parser: handle %locations as %define locations.
1794 * src/getargs.h, src/getargs.c (locations_flag): Remove.
1795 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
1796 to set "locations" to true.
1797 * src/output.c (prepare): Don't output "locations".
1798 * src/scan-gram.l (%locations): Handle it as a %<flag>.
1799 * src/parse-gram.y: It's no longer a token.
1800 Don't handle it.
1801 * data/bison.m4 (b4_locations_if): Define it with
1802 b4_percent_define_if_define.
1803 * data/c.m4, data/glr.cc: Adjust.
1804
1805 2009-04-06 Akim Demaille <demaille@gostai.com>
1806
1807 Regen.
1808 * src/parse-gram.c: Regen.
1809
1810 2009-04-06 Akim Demaille <demaille@gostai.com>
1811
1812 muscle: factor the handling of obsolete of obsolete directives.
1813 Suggested by Joel E. Denny.
1814
1815 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
1816 New, extracted from...
1817 * src/parse-gram.y (prologue_declaration: pure-parser): here.
1818 Remove it.
1819 (prologue_declaration: "%<flag>"): Use
1820 muscle_percent_define_ensure.
1821 (%error-verbose, %pure-parser): No longer tokens.
1822 * src/scan-gram.l (pure-parser): Return as a %<flag>.
1823
1824 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1825
1826 Fix options documentation.
1827 * build-aux/cross-options.pl: As in --help output, write optional
1828 arguments as [=ARG] not =[ARG].
1829 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1830
1831 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1832
1833 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1834 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1835 requirements for a correct m4 are stricter.
1836 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
1837 * configure.ac: Update to use AC_PROG_GNU_M4.
1838 Reported by Eric Blake.
1839
1840 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1841
1842 Help with updating web manual.
1843 * HACKING: Incorporate instructions from gnulib/doc/README.
1844 * bootstrap.conf (gnulib_modules): Add gendocs.
1845
1846 2009-04-03 Akim Demaille <demaille@gostai.com>
1847
1848 Regen.
1849 * src/parse-gram.h, src/parse-gram.c: Regen.
1850
1851 2009-04-03 Akim Demaille <demaille@gostai.com>
1852
1853 Factor %FLAG at scan level.
1854 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
1855 definitions and associated rules, replaced by....
1856 (PERCENT_FLAG): this new token type, and rule.
1857 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
1858 Use it for %debug and %error-verbose.
1859
1860 2009-04-03 Akim Demaille <demaille@gostai.com>
1861
1862 Regen.
1863 * src/parse-gram.h, src/parse-gram.c: Regen.
1864
1865 2009-04-03 Akim Demaille <demaille@gostai.com>
1866
1867 Treat %debug as %define debug.
1868 * data/bison.m4 (b4_debug_if): New.
1869 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
1870 * data/lalr1.java: Use it instead of b4_debug_flag.
1871 * src/getargs.h, src/getargs.c (debug_flag): Remove.
1872 * src/output.c (prepare): Don't output it.
1873 * src/parse-gram.y: Treat %debug as %define debug.
1874
1875 2009-04-03 Akim Demaille <demaille@gostai.com>
1876
1877 Treat %error-verbose as %define error_verbose.
1878 This allows to pass -Derror_verbose on the command line. Better
1879 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
1880 ERROR_VERBOSE being defined as false or true.
1881 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
1882 on b4_percent_define_ifdef, for does not check the defined value,
1883 but only whether the symbol is defined, rely on
1884 b4_percent_define_flag_if, so that a value of "false" is processed
1885 as a false.
1886 If not defined, define the flag to "false".
1887 (b4_error_verbose_if): New.
1888 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1889 b4_error_verbose_flag.
1890 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1891 * src/output.c (prepare): Don't output it.
1892 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1893
1894 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1895
1896 Fix strange %define locations for default values.
1897 Reported by Akim Demaille at
1898 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1899 and discussed again starting at
1900 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1901 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1902 because location information is bogus.
1903 Use angle brackets to delimit fake file name because square brackets
1904 look like underexpanded m4. Choose a better fake file name.
1905 Use negative line numbers.
1906 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1907 * src/location.c (location_print): If line for a boundary is negative,
1908 only print that boundary's file name.
1909 * src/location.h: Document that.
1910 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1911 defaults): Update output.
1912
1913 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1914
1915 Pacify ./configure --enable-gcc-warnings.
1916 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1917 in lib won't compile with it.
1918 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1919
1920 2009-03-31 Akim Demaille <demaille@gostai.com>
1921
1922 bootstrap: --help to stdout.
1923 * bootstrap (usage): Don't send --help to stderr.
1924 Use a here doc instead of a long string.
1925
1926 2009-03-31 Akim Demaille <demaille@gostai.com>
1927
1928 bootstrap: README-hacking no longer exists
1929 * bootstrap (checkout_only_file): Set to HACKING.
1930
1931 2009-03-26 Akim Demaille <demaille@gostai.com>
1932
1933 doc: merge HACKING and README-hacking.
1934 Two files is confusing.
1935 Reported by Alexandre Duret-Lutz.
1936
1937 * README-hacking: Merge into...
1938 * HACKING (Working from the repository): here.
1939
1940 2009-03-26 Akim Demaille <demaille@gostai.com>
1941
1942 doc: update README-hacking.
1943 * README-hacking: We now use git and git submodules.
1944 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1945
1946 2009-03-26 Akim Demaille <demaille@gostai.com>
1947
1948 lalr1.cc: avoid GCC 4.3 warnings.
1949 GCC 4.3 now warns about "a || b && c" and asks for explicit
1950 parentheses.
1951 Reported by Alexandre Duret-Lutz.
1952 * data/location.cc: Update copyright years.
1953 (Position::operator==): Use parens to make precedence explicit.
1954 Compare lines and columns first, as they are more likely to be
1955 different, and they are faster to compare.
1956
1957 2009-03-26 Akim Demaille <demaille@gostai.com>
1958
1959 gnulib: update.
1960 * gnulib: Update to latest.
1961 * src/local.mk (AM_CFLAGS): Move to...
1962 * Makefile.am: here.
1963 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1964 AM_CFLAGS.
1965
1966 2009-03-02 Akim Demaille <demaille@gostai.com>
1967
1968 Comment changes.
1969
1970 2009-03-02 Akim Demaille <demaille@gostai.com>
1971
1972 Share b4_yytranslate_define.
1973 * data/lalr1.cc (b4_yytranslate_define): Move to...
1974 * data/c++.m4: here.
1975
1976 2009-03-02 Akim Demaille <demaille@gostai.com>
1977
1978 Use locations in the variant example.
1979 Yes, this obfuscates the point of this example, variants only.
1980 But glr.cc cannot work (yet?) without locations. This change
1981 makes it easier to use this example with glr.cc.
1982
1983 * examples/variant.yy (assert): %define it.
1984 (locations): Request them.
1985 (yylex): Bind the location to the stage.
1986
1987 2009-03-02 Akim Demaille <demaille@gostai.com>
1988
1989 Dub make_TOKEN as a public type interface.
1990 * data/c++.m4 (b4_symbol_constructor_declare)
1991 (b4_symbol_constructor_define): New empty stubs.
1992 (b4_public_types_declare, b4_public_types_define): Use them.
1993 * data/lalr1.cc (b4_symbol_constructor_declare)
1994 (b4_symbol_constructor_declare_)
1995 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1996 Move to...
1997 * data/variant.hh: here.
1998 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1999 needed.
2000 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2001 b4_symbol_constructor_declare, as it is now done by
2002 b4_public_types_define and b4_public_types_declare.
2003
2004 2009-03-02 Akim Demaille <demaille@gostai.com>
2005
2006 Coding style changes.
2007 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2008 (b4_symbol_constructor_declarations)
2009 (b4_symbol_constructor_definition_)
2010 (b4_symbol_constructor_definitions)
2011 (b4_yytranslate_definition): Rename as...
2012 (b4_symbol_constructor_declare_)
2013 (b4_symbol_constructor_declare)
2014 (b4_symbol_constructor_define_)
2015 (b4_symbol_constructor_define)
2016 (b4_yytranslate_define): these.
2017 * data/variant.hh (b4_variant_definition): Rename as...
2018 (b4_variant_define): this.
2019
2020 2009-03-02 Akim Demaille <demaille@gostai.com>
2021
2022 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2023 * data/bison.m4 (b4_percent_define_if_define): New.
2024 * data/c++.m4 (b4_variant_if): Move to...
2025 * data/bison.m4: Here, using b4_percent_define_if_define.
2026 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2027 * data/bison.m4: Here, using b4_percent_define_if_define.
2028
2029 2009-03-02 Akim Demaille <demaille@gostai.com>
2030
2031 Dub symbol_type_base as a public type.
2032 * data/c++.m4 (b4_public_types_declare): Now define
2033 symbol_type_base and symbol_type.
2034 (b4_public_types_define): New.
2035 In both cases, the definitions are taken verbatim from lalr1.cc.
2036 * data/lalr1.cc: Adjust.
2037
2038 2009-03-02 Akim Demaille <demaille@gostai.com>
2039
2040 b4_public_types_declare.
2041 * data/c++.m4 (b4_public_types_declare): New.
2042 * data/glr.cc, data/lalr1.cc: Use it.
2043
2044 2009-03-02 Akim Demaille <demaille@gostai.com>
2045
2046 b4_semantic_type_declare.
2047 * data/c++.m4 (b4_semantic_type_declare): New.
2048 Factors and generalizes what was in glr.cc and lalr1.cc.
2049 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2050 variants.
2051 * data/lalr1.cc, data/glr.cc: Use it.
2052
2053 2009-02-26 Akim Demaille <demaille@gostai.com>
2054
2055 Upgrade gnulib.
2056 * gnulib: Upgrade from master.
2057 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2058 Regen.
2059
2060 2009-02-25 Akim Demaille <demaille@gostai.com>
2061
2062 Remove useless arguments.
2063 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2064 relevant.
2065
2066 2009-02-25 Akim Demaille <demaille@gostai.com>
2067
2068 Comment changes.
2069 * data/lalr1.cc: here.
2070
2071 2009-02-25 Akim Demaille <demaille@gostai.com>
2072
2073 Fix glr.cc's debug level handling.
2074 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2075 glr.c which is used.
2076 (debug_level, set_debug_level): Adjust.
2077
2078 2009-02-25 Akim Demaille <demaille@gostai.com>
2079
2080 Copyright years.
2081 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2082
2083 2009-02-25 Akim Demaille <demaille@gostai.com>
2084
2085 Style changes.
2086 * etc/bench.pl.in (generate_grammar_list): Consitently use
2087 location_type, not yy::location.
2088
2089 2009-02-25 Akim Demaille <demaille@gostai.com>
2090
2091 Comment change.
2092 * data/lalr1.cc: here.
2093
2094 2009-02-19 Akim Demaille <demaille@gostai.com>
2095
2096 Make yyparser::error public.
2097 * data/lalr1.cc: here.
2098 There is no good reason to keep it private (and it is convenient
2099 to use it from the scanner for instance). It is already public in
2100 glr.cc.
2101
2102 2009-02-19 Akim Demaille <demaille@gostai.com>
2103
2104 Comment changes.
2105 * data/glr.cc: here.
2106
2107 2009-02-19 Akim Demaille <demaille@gostai.com>
2108
2109 Remove trailing blanks.
2110 The epilogue has its own ending \n, no need to add another.
2111
2112 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2113 epilogue.
2114 * data/glr.cc: dnl when extending the epilogue.
2115 Remove stray "private:".
2116
2117 2009-02-19 Akim Demaille <demaille@gostai.com>
2118
2119 Use b4_c_modern.
2120 * data/c.m4 (b4_c_function_decl): Here.
2121
2122 2009-02-19 Akim Demaille <demaille@gostai.com>
2123
2124 Comment changes.
2125 * data/lalr1.cc: here.
2126
2127 2009-02-19 Akim Demaille <demaille@gostai.com>
2128
2129 Extract variant.hh
2130 * data/variant.hh: New, extracted from...
2131 * data/lalr1.cc: here.
2132 Adjust.
2133 * data/local.mk: Adjust.
2134
2135 2009-02-19 Akim Demaille <demaille@gostai.com>
2136
2137 Extract stack.hh from lalr1.cc.
2138 * data/stack.hh: New.
2139 * data/lalr1.cc: Extract from here.
2140 * data/local.mk: Adjust.
2141
2142 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2143
2144 Add reminder about uploading public key to keys.gnupg.net.
2145 * HACKING (Release Procedure): Here.
2146
2147 2009-01-28 Akim Demaille <demaille@gostai.com>
2148
2149 * NEWS: Update information about 2.4.1 and 2.4.2.
2150
2151 2008-11-04 Akim Demaille <demaille@gostai.com>
2152
2153 Reformat NEWS.
2154 * NEWS: Use more outline-mode markup.
2155 Suggested by Jim Meyering.
2156
2157 2009-01-08 Akim Demaille <demaille@gostai.com>
2158
2159 Fix grep portability issues.
2160 Grep on Solaris does not support -q.
2161 Reported by Summum Bonum.
2162
2163 * NEWS: Add a stub for 2.4.2.
2164 * THANKS: Add Summum Bonum.
2165 * tests/atlocal.in (EGREP): New.
2166 (CC, CXX, XSLTPROC): Make it possible to override them via
2167 envvars.
2168 * tests/java.at: Use $EGREP instead of egrep.
2169 Use AT_CHECK's ignore instead of grep's -q.
2170
2171 2008-12-11 Akim Demaille <demaille@gostai.com>
2172
2173 Pass the token type to yysyntax_error.
2174 * data/yacc.c (yysyntax_error): Take the transated token instead
2175 of the raw number.
2176 Adjust callers.
2177 * TODO: Update.
2178
2179 2008-12-11 Akim Demaille <demaille@gostai.com>
2180
2181 Formatting changes.
2182 * data/glr.c: Formatting changes.
2183
2184 2008-12-11 Akim Demaille <demaille@gostai.com>
2185
2186 Propagate i18n changes into glr.c.
2187 * TODO: Update.
2188 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2189 building the error message format dynamically.
2190 * data/lalr1.java: Formatting changes.
2191
2192 2008-12-11 Akim Demaille <demaille@gostai.com>
2193
2194 Use testsuite -C.
2195 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2196 Solves problems when top_srcdir is an absolute path.
2197 Suggested by Eric Blake.
2198 * configure.ac: Require Autoconf 2.62.
2199
2200 2008-12-11 Akim Demaille <demaille@gostai.com>
2201
2202 Simplify the i18n of the error messages.
2203 * data/lalr1.cc: Comment changes.
2204 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2205 lalr1.cc instead of building dynamically the format string.
2206
2207 2008-12-08 Akim Demaille <demaille@gostai.com>
2208
2209 Fix portability issue in the test suite.
2210 * tests/local.at (AT_MATCHES_CHECK): New.
2211 Based on Perl instead of Sed. Sed has too many portability
2212 pitfalls, not ever Sed is GNU Sed.
2213 * tests/actions.at (Fix user actions without a trailing semicolon):
2214 Use it.
2215
2216 2008-12-08 Akim Demaille <demaille@gostai.com>
2217
2218 Update data/README.
2219 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2220
2221 2008-12-08 Akim Demaille <demaille@gostai.com>
2222
2223 Install autoconf as a submodule to get m4sugar.
2224 * .gitmodules: Add submodules/autoconf.
2225 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2226 submodules/autoconf.
2227
2228 2008-12-08 Akim Demaille <demaille@gostai.com>
2229
2230 Test token.prefix in all the skeletons.
2231 * data/java.m4 (b4_token_enum): Use the token.prefix.
2232 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2233 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2234 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2235 * tests/java.at: Comment changes.
2236 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2237 (Java parser class and package names): Add token.prefix check.
2238
2239 2008-12-08 Akim Demaille <demaille@gostai.com>
2240
2241 Fix regeneration of atconfig.
2242 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2243 remove it: now that there is no tests/Makefile.am, the top-level
2244 Makefile properly updates atconfig when needed.
2245
2246 2008-12-07 Di-an Jan <dianj@freeshell.org>
2247
2248 Implement the FIXME that ends an user action with a semicolon
2249 if it seems necessary.
2250 * src/scan-code.l (flex rules section): Flag cpp directive from
2251 any `#' to the first unescaped end-of-line. Semicolon is not
2252 needed after `;', `{', '}', or cpp directives and is needed after
2253 any other token (whitespaces and comments have no effect).
2254 * tests/actions.at (Fix user actions without a trailing semicolon):
2255 New test.
2256 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2257 to make user actions complete statements.
2258 Adjust column numbers in error messages.
2259 * tests/regression.at (Fix user actions without a trailing semicolon):
2260 Remove. Covered by new test.
2261
2262 2008-12-07 Akim Demaille <demaille@gostai.com>
2263
2264 Update gnulib.
2265 * gnulib: Update from master.
2266
2267 2008-12-05 Eric Blake <ebb9@byu.net>
2268
2269 Avoid compiler warning.
2270 * src/output.c (muscle_insert_item_number_table): Delete unused
2271 function.
2272
2273 2008-12-02 Eric Blake <ebb9@byu.net>
2274
2275 Build testsuite with newer autoconf.
2276 * tests/output.at (m4_expand): Don't override in newer autoconf,
2277 where the underlying implementation changed.
2278 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2279 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2280 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2281 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2282 since some of them contain unbalanced ')'.
2283
2284 2008-12-01 Akim Demaille <demaille@gostai.com>
2285
2286 Use b4_symbol for printers and destructors everywhere.
2287 * data/bison.m4 (b4_symbol_action_location): New.
2288 * data/c.m4 (b4_symbol_actions): Remove.
2289 Adjust all callers to use by b4_symbol_foreach and the corresponding
2290 b4_symbol_printer/destructor macro.
2291 * data/glr.cc: Adjust.
2292 * data/lalr1.java: Adjust the %destructor sanity check.
2293 * src/output.c (symbol_code_props_output): Remove, we no longer
2294 need the b4_symbol_printers/destructors tables.
2295
2296 2008-12-01 Akim Demaille <demaille@gostai.com>
2297
2298 Use b4_symbol_case_.
2299 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2300 b4_symbol_case_.
2301
2302 2008-12-01 Akim Demaille <demaille@gostai.com>
2303
2304 Move b4_symbol based macro to bison.m4.
2305 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2306 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2307 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2308 (b4_type_foreach): Move to...
2309 * data/bison.m4: Here.
2310 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2311 b4_symbol_value_template instead of b4_symbol_value.
2312
2313 2008-12-01 Akim Demaille <demaille@gostai.com>
2314
2315 b4_symbol/type_foreach.
2316 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2317 Use them.
2318
2319 2008-12-01 Akim Demaille <demaille@gostai.com>
2320
2321 Use the symbol properties to output the printer/destructor for lalr1.cc.
2322 Instead of defining complex list of tuples to define various
2323 properties of the symbols, we now prefer to define symbols as
2324 "structs" in m4: using the symbol key (its number), and the
2325 property name, b4_symbol gives it value. Use this to handle
2326 destructors and printers.
2327
2328 * src/output.c (CODE_PROP): New.
2329 (prepare_symbol_definitions): Use it to define the printer and
2330 destructor related attributes of the symbols.
2331 * data/lalr1.cc (b4_symbol_actions): Rename as...
2332 (b4_symbol_action): this.
2333 Use b4_symbol instead of 6 arguments.
2334 (b4_symbol_printer, b4_symbol_destructor): New.
2335 Use them instead of b4_symbol_actions.
2336
2337 2008-12-01 Akim Demaille <demaille@gostai.com>
2338
2339 Avoid capturing variables too easily.
2340 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2341 v__ and p__ instead of v and p.
2342
2343 2008-12-01 Akim Demaille <demaille@gostai.com>
2344
2345 Remove spurious empty line before syncline.
2346 * data/bison.m4 (b4_syncline): Don't output an empty line before
2347 the output.
2348
2349 2008-11-26 Akim Demaille <demaille@gostai.com>
2350
2351 Convert lib/Makefile.am into lib/local.mk.
2352 The real problem is rather gnulib.mk, which itself is extracted
2353 from a Makefile.am that gnulib expects to the "recursive". The
2354 tool prefix-gnulib-mk converts such a gnulib.mk to be
2355 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2356
2357 * etc/prefix-gnulib-mk: New.
2358 * bootstrap (slurp): Use it to convert further gnulib.mk.
2359 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2360 are deeper.
2361 * lib/Makefile.am: Rename as...
2362 * lib/local.mk: this.
2363 Adjust to be prefixed.
2364 * Makefile.am, configure.ac: Adjust.
2365 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2366
2367 2008-11-26 Akim Demaille <demaille@gostai.com>
2368
2369 s/_FLAGS/FLAGS/.
2370 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2371 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2372 Reported by Eric Blake.
2373
2374 2008-11-26 Akim Demaille <demaille@gostai.com>
2375
2376 Use b4_parser_tables_define in glr.cc.
2377 * data/glr.c: Use b4_parser_tables_define instead of defining the
2378 (deterministic integral) tables by hand.
2379
2380 2008-11-26 Akim Demaille <demaille@gostai.com>
2381
2382 Use b4_parser_tables_define in Java.
2383 * data/java.m4 (b4_typed_parser_table): Rename as...
2384 (b4_typed_parser_table_define): this, for consistency.
2385 Accept a comment as $4.
2386 Move $2 into yy*_.
2387 (b4_integral_parser_table): Rename as...
2388 (b4_integral_parser_table_define): this.
2389 * data/lalr1.java: Adjust all uses.
2390 Use b4_parser_tables_define instead of generation by hand.
2391
2392 2008-11-26 Akim Demaille <demaille@gostai.com>
2393
2394 Prepare the convergence bw C style and Java table generation.
2395 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2396 (b4_tables_define): Rename as...
2397 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2398 (b4_parser_tables_define): these.
2399 * data/c.m4 (b4_table_define): Rename as...
2400 (b4_integral_parser_table_define): this.
2401 * data/lalr1.cc: Adjust.
2402 (b4_table_define, b4_table_declare): Rename as...
2403 (b4_integral_parser_table_define)
2404 (b4_integral_parser_table_declare): these.
2405 (yyrline_): Move the comment where it is actually used.
2406 * data/yacc.c: Adjust.
2407 (yyrline): Use b4_integral_parser_table_define.
2408
2409 2008-11-26 Akim Demaille <demaille@gostai.com>
2410
2411 Regen.
2412 * src/parse-gram.h, src/parse-gram.c: Regen.
2413
2414 2008-11-26 Akim Demaille <demaille@gostai.com>
2415
2416 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
2417 * data/lalr1.cc (b4_tables_map): Move to...
2418 * data/bison.m4: here.
2419 Update the comment for yytable during the flight.
2420 (b4_tables_declare, b4_tables_define): New.
2421 * data/lalr1.cc: Use them.
2422 * data/c.m4 (b4_table_define): New.
2423 * data/yacc.c: Use b4_tables_define instead of output the tables
2424 by hand.
2425 * tests/regression.at (Web2c Actions): Adjust the expected output,
2426 the order of the tables changed.
2427
2428 2008-11-26 Akim Demaille <demaille@gostai.com>
2429
2430 Get rid of (yy)rhs and (yy)prhs.
2431 These tables are no longer needed in the parsers, and they don't seem to
2432 be useful. They are not documented either.
2433
2434 * src/output.c (prepare_rules): Get rid of rhs and prhs.
2435 Adjust the computation of (yy)r2.
2436
2437 2008-11-26 Akim Demaille <demaille@gostai.com>
2438
2439 Rule length is unsigned.
2440 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
2441
2442 2008-11-26 Akim Demaille <demaille@gostai.com>
2443
2444 Get rid of lalr1-split.cc.
2445 It was no longer maintainer.
2446
2447 * data/lalr1-split.cc: Remove.
2448 * etc/bench.pl.in (bench_fusion_parser): Remove.
2449 Adjust.
2450
2451 2008-11-26 Akim Demaille <demaille@gostai.com>
2452
2453 Use yy* consistently.
2454 * data/glr.c: Now that yyrhs no longer exists as a global
2455 variable, rename local "rhs" variables into "yyrhs" for
2456 consistency.
2457
2458 2008-11-25 Akim Demaille <demaille@gostai.com>
2459
2460 Get rid of yyrhs and yyprhs in glr.c.
2461 * data/glr.c (yyrhs, yyprhs): Remove.
2462 Instead, use the state stack and yystos.
2463
2464 2008-11-25 Akim Demaille <demaille@gostai.com>
2465
2466 Flag glr tests.
2467 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
2468 as an Autotest keyword.
2469
2470 2008-11-25 Akim Demaille <demaille@gostai.com>
2471
2472 Prefer TESTSUITE_FLAGS.
2473 TESTSUITEFLAGS is barely readable.
2474
2475 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
2476 for backward compatibility.
2477 Use the former instead of the latter.
2478
2479 2008-11-25 Akim Demaille <demaille@gostai.com>
2480
2481 Get rid of yyrhs and yyprhs in larl1.java.
2482 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
2483 (yy_reduce_print): Rather, use yystos_ and the state stack.
2484
2485 2008-11-25 Akim Demaille <demaille@gostai.com>
2486
2487 Formatting changes.
2488
2489 2008-11-25 Akim Demaille <demaille@gostai.com>
2490
2491 Get rid of yyrhs and yyprhs in yacc.c.
2492 They were used to get the symbol types, given a rule number, when
2493 displaying the top of the stack before a reduction. But the
2494 symbol type is available from the state stack. This has two be
2495 benefits: two tables less in the parser (making it smaller), and a
2496 more consistent use of the three stacks which will help to fuse
2497 them.
2498
2499 * data/yacc.c (yyprhs, yyrhs): Remove.
2500 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
2501 (yy_reduce_print): Take yyssp as argument.
2502 Use it, together with yystos, to get the symbol type.
2503 * tests/regression.at (Web2c Report): Remove these tables from the
2504 expected output.
2505
2506 2008-11-25 Akim Demaille <demaille@gostai.com>
2507
2508 b4_tables_map.
2509 The point is to factor the generation of the tables across skeletons.
2510 This is language dependant.
2511
2512 * data/c.m4 (b4_comment_): New.
2513 Should be usable to define how to generate tables independently of
2514 the language.
2515 (b4_c_comment): New.
2516 (b4_comment): Bounce to b4_c_comment.
2517 Now support $2 = [PREFIX] for indentation.
2518 * data/lalr1.cc (b4_table_declare): Don't output a comment if
2519 there is no comment.
2520 Indent it properly when there is one.
2521 Output the ending semicolon.
2522 (b4_table_define): Space changes.
2523 Output the ending semicolon.
2524 (b4_tables_map): New.
2525 Use it twice instead of declaring and defining the (integral)
2526 tables by hand.
2527
2528 2008-11-25 Akim Demaille <demaille@gostai.com>
2529
2530 b4_table_declare.
2531 * data/lalr1.cc (b4_table_declare): New.
2532 Use it to declare the tables defined with b4_table_define.
2533 (b4_table_define): Declare a third arg to match b4_table_declare
2534 signature.
2535 Move all the comments around invocations of b4_table_define into
2536 the invocations itselves.
2537 Move things around to have the order for declarations and
2538 definitions.
2539
2540 2008-11-25 Akim Demaille <demaille@gostai.com>
2541
2542 Formatting changes.
2543 * data/lalr1.java: here.
2544
2545 2008-11-25 Akim Demaille <demaille@gostai.com>
2546
2547 b4_args is more general than only C++.
2548 * data/lalr1.cc (b4_args, _b4_args): Move to...
2549 * data/bison.m4: here.
2550
2551 2008-11-21 Di-an Jan <dianj@freeshell.org>
2552
2553 Implement no-XXX arguments for --warnings, --report, --trace.
2554 * src/getargs.c (flags_argmatch): Handles no-XXX.
2555 Fix typo in doxygen comment.
2556
2557 2008-11-21 Akim Demaille <demaille@gostai.com>
2558
2559 Display the changes in cross-options.texi.
2560 * build-aux/cross-options.pl ($sep): New, to separate items.
2561 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
2562 changes.
2563
2564 2008-11-20 Di-an Jan <dianj@freeshell.org>
2565
2566 Improves options in the manual.
2567 * doc/bison.texinfo (-g, -x): Add space before argument.
2568 (Option Cross Key): Implement FIXME: listing directives also.
2569 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2570 (Short Option): Special case -d. Put arguments inside @option.
2571 (Bison Directive): Add column, automatically extracted from
2572 src/scan-gram.l (actual name passed as the first argument)
2573 with special case for %define.
2574 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
2575 to build-aux/cross-options.pl.
2576 * src/getargs.c (usage): Document limitations of cross-options.pl.
2577 * src/scan-gram.l: Likewise.
2578
2579 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2580
2581 Fix unexpanded macros in GLR defines file.
2582 Reported by Csaba Raduly at
2583 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2584 * THANKS (Csaba Raduly): Add.
2585 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2586 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2587 lexer in a separate module that includes the defines file.
2588 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
2589 source.
2590 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2591 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2592 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2593 (AT_DATA_SOURCE_PROLOGUE): New.
2594 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2595 (AT_DATA_SOURCE): New.
2596 (AT_FULL_COMPILE): Extend to support an additional source file.
2597
2598 2008-11-18 Akim Demaille <demaille@gostai.com>
2599
2600 More TODO.
2601 * TODO: More short term issues.
2602
2603 2008-11-18 Akim Demaille <demaille@gostai.com>
2604
2605 Regen.
2606 * src/parse-gram.h, src/parse-gram.c: Regen.
2607
2608 2008-11-18 Akim Demaille <demaille@gostai.com>
2609
2610 Use b4_subtract where possible.
2611 * data/lalr1.cc (b4_subtract): Move to...
2612 * data/bison.m4: here.
2613 * data/glr.c (b4_rhs_data): Use it.
2614 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
2615
2616 2008-11-18 Akim Demaille <demaille@gostai.com>
2617
2618 Remove incorrect mode specification.
2619 * data/glr.cc: Don't pretend it's C code.
2620
2621 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2622
2623 Simplify last patch slightly.
2624 * src/getargs.c (getargs): Here.
2625
2626 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2627
2628 Fix last warning from --enable-gcc-warnings.
2629 * src/getargs.c (getargs): Don't assign const address to non-const
2630 pointer.
2631
2632 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2633
2634 Don't let maintainer-*-check targets force a version update.
2635 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2636 handled.
2637
2638 2008-11-17 Di-an Jan <dianj@freeshell.org>
2639
2640 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2641 Align menus. Adjust word wrapping. Use node names for menu names.
2642 (Examples): Don't abbreviate node names.
2643 (LocalWords): Remove abbreviations.
2644 (Copying): Make description a sentence.
2645 (Java Action Features): Remove period to match the rest of menu.
2646
2647 2008-11-17 Di-an Jan <dianj@freeshell.org>
2648
2649 Handles several --enable-gcc-warnings.
2650 * src/getargs.c (command_line_location): Set parameters to void.
2651 * src/output.c (symbol_type_name_cmp): Make static.
2652 (symbols_by_type_name): Set parameters to void.
2653 (symbol_definitions_output): Remove unused parameter. Rename as...
2654 (prepare_symbol_definitions): this.
2655 (muscles_output): Move symbol_definitions_output to...
2656 (output): here as prepare_symbol_definitions.
2657 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
2658 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
2659
2660 2008-11-17 Di-an Jan <dianj@freeshell.org>
2661
2662 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
2663 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
2664
2665 2008-11-16 Akim Demaille <demaille@gostai.com>
2666
2667 Add missing $(EXEEXT).
2668 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
2669 "src/bison$(EXEEXT)".
2670 Reported by Di-an Jan.
2671
2672 2008-11-15 Akim Demaille <demaille@gostai.com>
2673
2674 * TODO: Update.
2675
2676 2008-11-15 Akim Demaille <demaille@gostai.com>
2677
2678 Formatting changes.
2679 * tests/input.at: here.
2680
2681 2008-11-15 Akim Demaille <demaille@gostai.com>
2682
2683 Remove duplicate header inclusion.
2684 * src/LR0.c: here.
2685
2686 2008-11-15 Akim Demaille <demaille@gostai.com>
2687
2688 * src/parse-gram.h, src/parse-gram.c: Regen.
2689
2690 2008-11-15 Akim Demaille <demaille@gostai.com>
2691
2692 Support parametric types.
2693
2694 There are two issues to handle: first scanning nested angle
2695 bracket pairs to support types such as std::pair< std::string,
2696 std::list<std::string> > >.
2697
2698 Another issue is to address idiosyncracies of C++: do not glue two
2699 closing angle brackets together (otherwise it's operator>>), and
2700 avoid sticking blindly a TYPE to the opening <, as it can result
2701 in '<:' which is a digraph for '['.
2702
2703 * src/scan-gram.l (brace_level): Rename as...
2704 (nesting): this.
2705 (SC_TAG): New.
2706 Implement support for complex tags.
2707 (tag): Accept
2708 , but not <.
2709 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
2710 (b4_symbol_variant): Leave space around types as parameters.
2711 * examples/variant.yy: Use nested template types and leading ::.
2712 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
2713 Rename as...
2714 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
2715 * tests/c++.at: Test parametric types.
2716
2717 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2718
2719 Test token.prefix.
2720 This is not sufficient, but we test at least that the make_SYMBOL
2721 interface is not affected by token.prefix. A more general test
2722 will be implemented when the support of token.prefix is generalized
2723 to more skeletons.
2724
2725 * tests/c++.at: One more variant test, using token.prefix.
2726
2727 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2728
2729 Test the make_TOKEN interface.
2730 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
2731 Factor the common code in yylex.
2732 Use it to test "%define lex_symbol".
2733
2734 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2735
2736 Formatting change.
2737
2738 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2739
2740 Simplify code for variants bench marks.
2741 * etc/bench.pl.in (&generate_grammar_list): Define and use
2742 location_type.
2743 Factor the common code in yylex.
2744
2745 2008-11-15 Akim Demaille <demaille@gostai.com>
2746
2747 Better error message.
2748 * bootstrap (find_tool): Fix the error message.
2749
2750 2008-11-15 Akim Demaille <demaille@gostai.com>
2751
2752 Update variant.yy to newest interface.
2753 * examples/variant.yy: Define lex_symbol.
2754 Adjust.
2755
2756 2008-11-15 Akim Demaille <demaille@gostai.com>
2757
2758 Don't use locations in variant.yy.
2759 * examples/variant.yy: Adjust to not using locations.
2760
2761 2008-11-15 Akim Demaille <demaille@gostai.com>
2762
2763 Comment changes.
2764 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
2765 comments for the license.
2766
2767 2008-11-15 Akim Demaille <demaille@gostai.com>
2768
2769 Remove tests/Makefile.am.
2770 * tests/Makefile.am: Rename as...
2771 * tests/local.mk: this.
2772 * Makefile.am, configure.ac: Adjust.
2773 * Makefile.am (DISTCLEANFILES): Define.
2774 (maintainer-check, maintainer-xml-check, maintainer-push-check):
2775 Remove, we no longer need to bounce to the real targets.
2776
2777 2008-11-15 Akim Demaille <demaille@gostai.com>
2778
2779 Comment changes.
2780
2781 2008-11-15 Akim Demaille <demaille@gostai.com>
2782
2783 djgpp/local.mk.
2784 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
2785 * djgpp/local.mk: this new file.
2786
2787 2008-11-15 Akim Demaille <demaille@gostai.com>
2788
2789 Remove doc/Makefile.am.
2790 * doc/Makefile.am: Rename as...
2791 * doc/local.mk: this.
2792 Adjust paths
2793 * Makefile.am, configure.ac: Adjust.
2794 * Makefile.am (MOSTLYCLEANFILES): New.
2795 * src/local.mk: Adjust.
2796
2797 2008-11-15 Akim Demaille <demaille@gostai.com>
2798
2799 Move sc_tight_scope into maint.mk.
2800 It does not work, and I don't know how it was supposed to work: it
2801 seems to be looking for sources in the build tree. I just moved
2802 it at a better place, fixing it is still required.
2803
2804 * src/local.mk (echo): Remove.
2805 (sc_tight_scope): Move to...
2806 * maint.mk: here.
2807
2808 2008-11-15 Akim Demaille <demaille@gostai.com>
2809
2810 Regen.
2811 * src/parse-gram.h, src/parse-gram.h: Regen.
2812
2813 2008-11-15 Akim Demaille <demaille@gostai.com>
2814
2815 Remove src/Makefile.am.
2816 * src/Makefile.am: Rename as...
2817 * src/local.mk: this.
2818 Prefix all the paths with src/.
2819 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
2820 (AM_CPPFLAGS): Find find in builddir/src.
2821 (YACC): Move the flags into...
2822 (AM_YFLAGS): here.
2823 * maint.mk (sc_tight_scope): Disable.
2824 It used to bounce to the version in src/Makefile.am which is now
2825 part of this very Makefile.
2826 * Makefile.am, configure.ac: Adjust.
2827 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
2828 include "..." to find files "here": we are no longer in src/, so
2829 qualify the includes with src/.
2830 * doc/Makefile.am (PREPATH): No longer include the top_builddir
2831 prefix.
2832 (.x.1): Adjust to be able to create src/foo from the top level
2833 Makefile, instead of going bounce to src/Makefile the creation of
2834 foo.
2835
2836 2008-11-15 Akim Demaille <demaille@gostai.com>
2837
2838 Remove useless variable.
2839 * doc/Makefile.am (srcsrcdir): Remove.
2840
2841 2008-11-15 Akim Demaille <demaille@gostai.com>
2842
2843 Remove data/Makefile.am.
2844 * data/Makefile.am: Rename as...
2845 * data/local.mk: this.
2846 Adjust paths.
2847 * Makefile.am, configure.ac: Adjust.
2848
2849 2008-11-15 Akim Demaille <demaille@gostai.com>
2850
2851 Remove etc/Makefile.am.
2852 * etc/Makefile.am: Rename as...
2853 * etc/local.mk: this.
2854 Adjust.
2855 * Makefile.am, configure.ac: Adjust.
2856
2857 2008-11-15 Akim Demaille <demaille@gostai.com>
2858
2859 Remove examples/local.mk.
2860 examples/calc++/Makefile.am might be interesting to keep as is, since
2861 it is an example in itself.
2862
2863 * examples/Makefile.am: Rename as...
2864 * examples/local.mk: this.
2865 Adjust.
2866 * Makefile.am, configure.ac: Adjust.
2867
2868 2008-11-15 Akim Demaille <demaille@gostai.com>
2869
2870 Remove build-aux/Makefile.am.
2871 Recursive Makefiles are really way too slow, let's get rid of some of
2872 them.
2873
2874 * build-aux/Makefile.am: Rename as...
2875 * build-aux/local.mk: this.
2876 Adjust paths.
2877 * Makefile.am, configure.ac: Adjust.
2878
2879 2008-11-15 Akim Demaille <demaille@gostai.com>
2880
2881 Provide convenience constructors for locations and positions.
2882 * data/location.cc (position::position): Accept file, line and
2883 column as arguments with default values.
2884 Always qualify initial line and column literals as unsigned.
2885 (location::location): Provide convenience constructors.
2886
2887 2008-11-15 Akim Demaille <demaille@gostai.com>
2888
2889 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2890 token type.
2891 Using template buys us nothing, and makes it uselessly complex to
2892 construct a symbol. Besides, it could not be generalized to other
2893 languages, while make_FOO would work in C/Java etc.
2894
2895 * data/lalr1.cc (b4_symbol_): New.
2896 (b4_symbol): Use it.
2897 (b4_symbol_constructor_declaration_)
2898 (b4_symbol_constructor_definition_): Instead of generating
2899 specializations of an overloaded template function, just generate
2900 several functions whose names are forged from the token names
2901 without the token.prefix.
2902 (b4_symbol_constructor_declarations): Generate them for all the
2903 symbols, not just by class of symbol type, now that instead of
2904 specializing a function template by the token, we generate a
2905 function named after the token.
2906 (b4_symbol_constructor_specialization_)
2907 (b4_symbol_constructor_specializations): Remove.
2908 * etc/bench.pl.in: Adjust to this new API.
2909
2910 2008-11-13 Akim Demaille <demaille@gostai.com>
2911
2912 %define token.prefix.
2913 Provide a means to add a prefix to the name of the tokens as
2914 output in the generated files. Because of name clashes, it is
2915 good to have such a prefix such as TOK_ that protects from names
2916 such as EOF, FILE etc. But it clutters the grammar itself.
2917
2918 * data/bison.m4 (token.prefix): Empty by default.
2919 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2920 * data/lalr1.cc (b4_symbol): Ditto.
2921
2922 2008-11-13 Akim Demaille <demaille@gostai.com>
2923
2924 Compute at M4 time some of the subtractions.
2925 * data/lalr1.cc (b4_subtract): New.
2926 (b4_rhs_data): Use it.
2927
2928 2008-11-13 Akim Demaille <demaille@gostai.com>
2929
2930 symbol::token.
2931 This allows the user to get the type of a token returned by yylex.
2932
2933 * data/lalr1.cc (symbol::token): New.
2934 (yytoknum_): Define when %define lex_symbol, independently of
2935 %debug.
2936 (yytoken_number_): Move into...
2937 (symbol::token): here, since that's the only use.
2938 The other one is YYPRINT which was not officially supported
2939 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2940 array under a different name (yytoknum).
2941
2942 2008-11-13 Akim Demaille <demaille@gostai.com>
2943
2944 YYERRCODE.
2945 * TODO (YYERRCODE): Mention the case of $undef.
2946
2947 2008-11-13 Akim Demaille <demaille@gostai.com>
2948
2949 TODO: YYPRINT.
2950 * TODO (YYPRINT): New.
2951
2952 2008-11-13 Akim Demaille <demaille@gostai.com>
2953
2954 Comment changes.
2955 * data/lalr1.cc, data/yacc.c: Fix the description of the
2956 yytranslate and yytoknum tables.
2957
2958 2008-11-13 Akim Demaille <demaille@gostai.com>
2959
2960 Define make_symbol in the header.
2961 To reach good performances these functions should be inlined (yet
2962 this is to measure precisely). To this end they must be available
2963 to the caller.
2964
2965 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2966 location_type with the class name.
2967 Since will now be output in the header, declare "inline".
2968 No longer use b4_symbol_constructor_specializations, but
2969 b4_symbol_constructor_definitions in the header.
2970 Don't call it in the *.cc file.
2971
2972 2008-11-13 Akim Demaille <demaille@gostai.com>
2973
2974 Define yytranslate in the header for lex_symbol.
2975 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2976 into the header file when using %define lex_symbol.
2977 (yytranslate_): Declare inline.
2978
2979 2008-11-13 Akim Demaille <demaille@gostai.com>
2980
2981 Define the constructors of symbol_type in
2982 b4_symbol_constructor_definitions.
2983 The constructors are called by the make_symbol functions, which a
2984 forthcoming patch will move elsewhere. Hence the interest of
2985 putting them together.
2986
2987 The stack_symbol_type does not need to be moved, it is used only
2988 by the parser.
2989
2990 * data/lalr1.cc: Move symbol_type and symbol_base_type
2991 constructors into...
2992 (b4_symbol_constructor_definitions): here.
2993 Adjust.
2994
2995 2008-11-13 Akim Demaille <demaille@gostai.com>
2996
2997 Make it easier to move the definition of yytranslate_.
2998 Forthcoming changes will make it possible to use yytranslate_
2999 from outside the parser implementation file.
3000
3001 * data/lalr1.cc (b4_yytranslate_definition): New.
3002 Use it.
3003
3004 2008-11-13 Akim Demaille <demaille@gostai.com>
3005
3006 Remove useless class specification.
3007 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3008 to refer to the class name to use a type defined by the class for
3009 arguments of member functions.
3010
3011 2008-11-13 Akim Demaille <demaille@gostai.com>
3012
3013 Finer input type for yytranslate.
3014 This patch is debatable: the tradition expects yylex to return an int
3015 which happens to correspond to token_number (which is an enum). This
3016 allows for instance to return characters (such as '*' etc.). But this
3017 goes against the stronger typing I am trying to have with the new
3018 lex interface which return a symbol_type. So in this case, feed
3019 yytranslate_ with a token_type.
3020
3021 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3022 expect a token_type.
3023
3024 2008-11-13 Akim Demaille <demaille@gostai.com>
3025
3026 Honor lex-params in %define lex_symbol mode.
3027 * data/lalr1.cc: Use b4_lex_param.
3028
3029 2008-11-13 Akim Demaille <demaille@gostai.com>
3030
3031 Simplify names.
3032 * src/output.c (symbol_definitions_output): Rename symbol
3033 attributes type_name and has_type_name as type and has_type.
3034 * data/lalr1.cc: Adjust uses.
3035
3036 2008-11-13 Akim Demaille <demaille@gostai.com>
3037
3038 Use b4_type_names for the union type.
3039 The union used to compute the size of the variant used to iterate
3040 over the type of all the symbols, with a lot of redundancy. Now
3041 iterate over the lists of symbols having the same type-name.
3042
3043 * data/lalr1.cc (b4_char_sizeof_): New.
3044 (b4_char_sizeof): Use it.
3045 Adjust to be called with a list of numbers instead of a single
3046 number.
3047 Adjust its caller for new-line issues.
3048
3049 2008-11-13 Akim Demaille <demaille@gostai.com>
3050
3051 Define the "identifier" of a symbol.
3052 Symbols may have several string representations, for instance if
3053 they have an alias. What I call its "id" is a string that can be
3054 used as an identifier. May not exist.
3055
3056 Currently the symbols which have the "tag_is_id" flag set are
3057 those that don't have an alias. Look harder for the id.
3058
3059 * src/output.c (is_identifier): Move to...
3060 * src/symtab.c (is_identifier): here.
3061 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3062 * src/output.c (symbol_definitions_output): Use it to define "id"
3063 and "has_id".
3064 Remove the definition of "tag_is_id".
3065 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3066 "tag_is_id" were used to produce code.
3067 We still use "tag" for documentation.
3068
3069 2008-11-11 Akim Demaille <demaille@gostai.com>
3070
3071 Locations are no longer required by lalr1.cc.
3072 * data/lalr1.cc (_b4_args, b4_args): New.
3073 Adjust all uses of locations to make them optional.
3074 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3075 (AT_CHECK_NAMESPACE): Check the use of locations.
3076 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3077 without locations with lalr1.cc.
3078 Test these cases.
3079 * tests/output.at: Check lalr1.cc with and without location
3080 support.
3081 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3082 Don't use locations.
3083
3084 2008-11-11 Akim Demaille <demaille@gostai.com>
3085
3086 AT_FULL_COMPILE.
3087 * tests/local.at (AT_FULL_COMPILE): New.
3088 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3089
3090 2008-11-11 Akim Demaille <demaille@gostai.com>
3091
3092 Support parens in calc++.
3093 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3094 * examples/calc++/test (run): Check the expected output.
3095 Adjust callers.
3096 Check parens too.
3097
3098 2008-11-11 Akim Demaille <demaille@gostai.com>
3099
3100 Simplify lalr1.cc since %defines is mandatory.
3101 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3102
3103 2008-11-11 Akim Demaille <demaille@gostai.com>
3104
3105 TODO: yyfmt.
3106 * TODO (yysyntax_error): New item.
3107
3108 2008-11-11 Akim Demaille <demaille@gostai.com>
3109
3110 Prefer M4 to CPP.
3111 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3112 YYERROR_VERBOSE.
3113
3114 2008-11-11 Akim Demaille <demaille@gostai.com>
3115
3116 Support i18n of the parse error messages.
3117 * TODO (lalr1.cc/I18n): Remove.
3118 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3119 error messages, as done in yacc.c.
3120 Stay within the yy* pseudo namespace.
3121
3122 2008-11-11 Akim Demaille <demaille@gostai.com>
3123
3124 More TODO.
3125 * TODO (single stack, yysyntax_error): New.
3126
3127 2008-11-11 Akim Demaille <demaille@gostai.com>
3128
3129 Make it possible to return a symbol_type from yylex.
3130 * data/lalr1.cc (b4_lex_symbol_if): New.
3131 (parse): When lex_symbol is defined, expected yylex to return the
3132 complete lookahead.
3133 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3134 yylex interface.
3135 (bench_variant_parser): Exercise it.
3136
3137 2008-11-11 Akim Demaille <demaille@gostai.com>
3138
3139 Remove useless bench case.
3140 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3141 no longer used.
3142
3143 2008-11-11 Akim Demaille <demaille@gostai.com>
3144
3145 Improve display of directives.
3146 * etc/bench.pl.in (parse_term): Don't add useless eol.
3147
3148 2008-11-11 Akim Demaille <demaille@gostai.com>
3149
3150 Use string_cast in the bench.
3151 * etc/bench.pl.in (generate_grammar_list): Define and use
3152 string_cast.
3153
3154 2008-11-11 Akim Demaille <demaille@gostai.com>
3155
3156 Replace yychar with a Boolean.
3157 * data/lalr1.cc (parse::yychar): Replace by...
3158 (parse::yyempty): this.
3159
3160 2008-11-11 Akim Demaille <demaille@gostai.com>
3161
3162 Factor the tables.
3163 * TODO: New item.
3164
3165 2008-11-11 Akim Demaille <demaille@gostai.com>
3166
3167 Let yytranslate handle the eof case.
3168 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3169 Adjust callers.
3170 No longer expect yychar to be equal to yyeof_, rather, test the
3171 lookahead's (translated) kind.
3172
3173 2008-11-11 Akim Demaille <demaille@gostai.com>
3174
3175 yychar cannot be empty in yyerrlab.
3176 * TODO (yychar == yyempty_): New.
3177 * data/lalr1.cc: Remove the handling of this case.
3178 This eases forthcoming changes related to yychar and yytranslate.
3179
3180 2008-11-11 Akim Demaille <demaille@gostai.com>
3181
3182 Bench: syntactic sugar for %define/#define.
3183 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3184 (&bench_push_parser, bench_variant_parser): Use this feature.
3185 (&eat): New.
3186 Use it.
3187
3188 2008-11-11 Akim Demaille <demaille@gostai.com>
3189
3190 Less memory pressure on the "list" bench.
3191 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3192 the values, to limit memory pressure.
3193
3194 2008-11-11 Akim Demaille <demaille@gostai.com>
3195
3196 Introduce make_symbol.
3197 make_symbol provides a means to construct a full symbol (kind,
3198 value, location) in a single shot. It is meant to be a Symbol
3199 constructor, parameterized by the symbol kind so that overloading
3200 would prevent incorrect kind/value pairs. Unfortunately
3201 parameterized constructors do not work well in C++ (unless the
3202 parameter also appears as an argument, which is not acceptable),
3203 hence the use of a function instead of a constructor.
3204
3205 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3206 (b4_symbol_constructor_declarations)
3207 (b4_symbol_constructor_specialization_)
3208 (b4_symbol_constructor_specializations)
3209 (b4_symbol_constructor_definition_)
3210 (b4_symbol_constructor_definitions): New.
3211 Use them where appropriate to generate declaration, declaration of
3212 the specializations, and implementations of the templated
3213 overloaded function "make_symbol".
3214 (variant::variant): Always define a default ctor.
3215 Also provide a copy ctor.
3216 (symbol_base_type, symbol_type): New ctor overloads for value-less
3217 symbols.
3218 (symbol_type): Now public, so that functions such as yylex can use
3219 it.
3220
3221 2008-11-11 Akim Demaille <demaille@gostai.com>
3222
3223 Inform m4 whether a tag is a valid id.
3224 * src/output.c (is_identifier): New.
3225 (symbol_definitions_output): Use it to define tag_is_id.
3226 But maybe this should be done at m4 level?
3227
3228 2008-11-11 Akim Demaille <demaille@gostai.com>
3229
3230 Test 214 was failing: it greps with a pattern containing [ ]*
3231 which obviously meant to catch spaces and tabs, but contained only
3232 spaces. Tabulations in sources are a nuisance, so to simplify the
3233 matter, get rid of all the tabulations in the Java sources. The
3234 other skeletons will be treated equally later.
3235
3236 * data/java.m4, data/lalr1.java: Untabify.
3237 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3238 tabulations are no longer generated.
3239
3240 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3241
3242 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3243 * configure.ac: Adjust usage.
3244 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3245 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3246 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3247
3248 2008-11-10 Di-an Jan <dianj@freeshell.org>
3249
3250 Workaround Java's ``code too large'' problem for parser tables
3251 in most cases, by using one function per initialization.
3252 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3253 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3254 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3255 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3256 (yytname_): Use b4_typed_parser_table.
3257 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3258 ``code too large'' error.
3259
3260 2008-11-10 Di-an Jan <dianj@freeshell.org>
3261
3262 * NEWS: Document them.
3263
3264 General Java skeleton improvements.
3265 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3266 using gcj < 4.3 in the testsuite, according to comments in
3267 gnulib/m4/javacomp.m4.
3268 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3269 location_type, position_type): Remove extraneous brackets from
3270 b4_percent_define_default.
3271 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3272 m4_define and m4_define_default.
3273 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3274 which marks the end of user code with appropriate syncline, like all
3275 the other skeletons.
3276 (b4_user_post_prologue): Add. Don't silently drop.
3277 (yylex): Remove.
3278 (parse): Inline yylex.
3279 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3280 (%{...%}): Fix typo of %code imports.
3281 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3282
3283 Support annotations on parser class with %define annotations.
3284 * data/lalr1.java (annotations): Add to parser class modifier.
3285 * doc/bison.texinfo (Java Parser Interface): Document
3286 %define annotations.
3287 (Java Declarations Summary): Document %define annotations.
3288 * tests/java.at (Java parser class modifiers): Test annotations.
3289
3290 Do not generate code for %error-verbose unless requested.
3291 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3292 Make private. Make conditional on %error-verbose.
3293 (getErrorVerbose, setErrorVerbose): New.
3294 (yytnamerr_): Make conditional on %error-verbose.
3295 (yysyntax_error): Make some code conditional on %error-verbose.
3296 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3297 about %error-verbose having no effect.
3298 (getErrorVerbose, setErrorVerbose): Document.
3299
3300 Move constants for token names to Lexer interface.
3301 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3302 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3303 (parse): Qualify EOF to Lexer.EOF.
3304 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3305 EOF and token names to Java Lexer Interface.
3306 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3307
3308 Make yyerror public.
3309 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3310 (yyerror): Change to public. Add Javadoc comments. Use longer
3311 parameter names. Make the body rather than the declarator
3312 conditional on %locations.
3313 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3314
3315 Allow user to add code to the constructor with %code init.
3316 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3317 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3318 Add %code init to the front of the constructor body.
3319 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3320 and %define init_throws.
3321 (Java Declarations Summary): Document %code init and
3322 %define init_throws.
3323 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3324 (Java constructor init and init_throws): Add tests.
3325
3326 2008-11-10 Akim Demaille <demaille@gostai.com>
3327
3328 Update TODO.
3329 * TODO (-D): is implemented.
3330 (associativity): Same precedence must have the same associativity.
3331 For instance, how can a * b / c be parsed if * is %left and / is
3332 %right?
3333 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3334
3335 2008-11-10 Akim Demaille <demaille@gostai.com>
3336
3337 Formatting changes.
3338
3339 2008-11-10 Akim Demaille <demaille@gostai.com>
3340
3341 More information about the symbols.
3342 * src/output.c (type_names_output): Document all the symbols,
3343 including those that don't have a type-name.
3344 (symbol_definitions_output): Define "is_token" and
3345 "has_type_name".
3346 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3347 type-name, now that they are defined too in b4_type_names.
3348
3349 2008-11-10 Akim Demaille <demaille@gostai.com>
3350
3351 Regen.
3352
3353 2008-11-10 Akim Demaille <demaille@gostai.com>
3354
3355 Make parser::yytranslate static.
3356 Small speedup (1%) on the list grammar. And makes yytranslate_
3357 available in non member functions.
3358
3359 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3360 function.
3361
3362 2008-11-10 Akim Demaille <demaille@gostai.com>
3363
3364 Avoid trailing spaces.
3365 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3366 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3367 they can be empty, and anyway this incorrectly indents the first
3368 action.
3369
3370 2008-11-10 Akim Demaille <demaille@gostai.com>
3371
3372 Comment changes.
3373
3374 2008-11-10 Akim Demaille <demaille@gostai.com>
3375
3376 Use "enum" for integral constants.
3377 This is just nicer to read, I observed no speedup.
3378
3379 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3380 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3381 (yyuser_token_number_max_, yyundef_token_): Move into...
3382 (yytranslate_): here.
3383
3384 2008-11-10 Akim Demaille <demaille@gostai.com>
3385
3386 Shortcuts in bench directives.
3387 * etc/bench.pl.in (parse_dirs): New.
3388 Use it.
3389 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3390 Create the benches in "benches/".
3391
3392 2008-11-10 Akim Demaille <demaille@gostai.com>
3393
3394 Formatting changes.
3395 * data/lalr1.cc: here.
3396
3397 2008-11-10 Akim Demaille <demaille@gostai.com>
3398
3399 Adjust verbose message to using emacs.
3400 * etc/bench.pl.in: Inform compilation-mode when we change the
3401 directory.
3402 (generate_grammar_list): Recognize %define "variant" in addition
3403 to %define variant.
3404
3405 2008-11-10 Akim Demaille <demaille@gostai.com>
3406
3407 Classify symbols by type-name.
3408 * src/uniqstr.h (UNIQSTR_CMP): New.
3409 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
3410 (type_names_output): New.
3411 (muscles_output): Use it.
3412 * data/lalr1.cc (b4_symbol_action_): Remove.
3413 (b4_symbol_case_, b4_type_action_): New.
3414 Adjust uses of b4_symbol_action_ to use b4_type_action_.
3415
3416 2008-11-10 Akim Demaille <demaille@gostai.com>
3417
3418 Change the handling of the symbols in the skeletons.
3419 Before we were using tables which lines were the symbols and which
3420 columns were things like number, tag, type-name etc. It is was
3421 difficult to extend: each time a column was added, all the numbers had
3422 to be updated (you asked for colon $2, not for "tag"). Also, it was
3423 hard to filter these tables when only a subset of the symbols (say the
3424 tokens, or the nterms, or the tokens that have and external number
3425 *and* a type-name) was of interest.
3426
3427 Now instead of monolithic tables, we define one macro per cell. For
3428 instance "b4_symbol(0, tag)" is a macro name which contents is
3429 self-decriptive. The macro "b4_symbol" provides easier access to
3430 these cells.
3431
3432 * src/output.c (type_names_output): Remove.
3433 (symbol_numbers_output, symbol_definitions_output): New.
3434 (muscles_output): Call them.
3435 (prepare_symbols): Define b4_symbols_number.
3436
3437 2008-11-10 Akim Demaille <demaille@gostai.com>
3438
3439 --trace=muscles
3440 * src/getargs.h, src/getargs.c (trace_muscle): New.
3441 (trace_types, trace_args): Support it.
3442 * src/output.c (output_skeleton): Use it.
3443
3444 2008-11-10 Akim Demaille <demaille@gostai.com>
3445
3446 muscles_output.
3447 * src/output.c (muscles_output): New, extracted from...
3448 (output_skeleton): here.
3449 Adjust.
3450
3451 2008-11-10 Akim Demaille <demaille@gostai.com>
3452
3453 Formatting changes.
3454
3455 2008-11-10 Akim Demaille <demaille@gostai.com>
3456
3457 Update the variant example.
3458 * examples/variant.yy: Formatting changes.
3459 One stage build.
3460
3461 2008-11-10 Akim Demaille <demaille@gostai.com>
3462
3463 Support constructor with an argument.
3464 This improves the "list" bench by 2%.
3465
3466 * data/lalr1.cc (variant::build): Add an overloaded version with
3467 an argument.
3468 * tests/c++.at (AT_CHECK_VARIANT): Check it.
3469
3470 2008-11-10 Akim Demaille <demaille@gostai.com>
3471
3472 Test variants.
3473 * tests/c++.at (AT_CHECK_VARIANTS): New.
3474 Use it with and without %define assert.
3475
3476 2008-11-10 Akim Demaille <demaille@gostai.com>
3477
3478 Add %precedence support.
3479 Unfortunately it is not possible to reuse the %prec directive. This
3480 is because to please POSIX, we do not require to end the rules with a
3481 semicolon. As a result,
3482
3483 foo: bar %prec baz
3484
3485 is ambiguous: either a rule which precedence is that of baz, or a rule,
3486 and then a declaration of the precedence of the token baz.
3487
3488 * doc/bison.texinfo: Document %precedence.
3489 (Precedence Only): New.
3490 * src/assoc.h, src/assoc.c (precedence_assoc): New.
3491 * src/conflicts.c (resolve_sr_conflict): Support it.
3492 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
3493 Parse it.
3494 * tests/calc.at: Use %precedence for NEG.
3495 * tests/conflicts.at (%precedence does not suffice)
3496 (%precedence suffices): New tests.
3497
3498 2008-11-09 Akim Demaille <demaille@gostai.com>
3499
3500 Make benches in a sub dirs.
3501 * etc/bench.pl.in ($dir): New.
3502 Use it.
3503 Check the use of constructors with an argument.
3504 (bench_variant_parser): Fix.
3505
3506 2008-11-09 Akim Demaille <demaille@gostai.com>
3507
3508 fix eof condition
3509
3510 2008-11-09 Akim Demaille <demaille@gostai.com>
3511
3512 Fix --help.
3513
3514 2008-11-09 Akim Demaille <demaille@gostai.com>
3515
3516 Require the generation of parse-gram.output.
3517 * src/Makefile.am (YACC): Pass --report=all.
3518
3519 2008-11-09 Akim Demaille <demaille@gostai.com>
3520
3521 Formatting changes.
3522
3523 2008-11-09 Akim Demaille <demaille@gostai.com>
3524
3525 Update TODO.
3526 * TODO: Remove obsolete items.
3527 Update others.
3528
3529 2008-11-09 Akim Demaille <demaille@gostai.com>
3530
3531 Enhance bench.pl.
3532 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
3533 (@token, $grammar, $bench): New.
3534 (generate_grammar_variant): Rename as...
3535 (generate_grammar_list): this.
3536 (generate_grammar): Adjust.
3537 (bench_grammar): Rename as...
3538 (bench): this.
3539 Use it in the various bench-marking routines.
3540 (-b, -g): New options.
3541
3542 2008-11-09 Akim Demaille <demaille@gostai.com>
3543
3544 Use a static hierarchy for symbols in the C++ parser.
3545 * data/lalr1.cc (symbol_base_type, symbol_type)
3546 (stack_symbol_type): Make it a static hierarchy.
3547 Adjust dependencies.
3548
3549 2008-11-09 Akim Demaille <demaille@gostai.com>
3550
3551 bench.pl -d, --directive.
3552 * etc/bench.pl.in (@directive): New.
3553 (&bench_grammar): Use it.
3554 (&bench_list_grammar): New, to provide access to the "variant"
3555 grammar.
3556 Use it.
3557 (getopts): Support -d, --directive.
3558
3559 2008-11-09 Akim Demaille <demaille@gostai.com>
3560
3561 Use inline for small operations.
3562 * data/lalr1.cc (symbol_base_type, symbol_type)
3563 (stack_symbol_type): Declare constructor and other operations as
3564 inline.
3565 (yy_destroy_): Inline.
3566
3567 2008-11-09 Akim Demaille <demaille@gostai.com>
3568
3569 Introduce a hierarchy for symbols.
3570 * data/lalr1.cc (symbol_base_type, symbol_type): New.
3571 (data_type): Rename as...
3572 (stack_symbol_type): this.
3573 Derive from symbol_base_type.
3574 (yy_symbol_value_print_): Merge into...
3575 (yy_symbol_print_): this.
3576 Rename as...
3577 (yy_print_): this.
3578 (yydestruct_): Rename as...
3579 (yy_destroy_): this.
3580 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
3581 (parser::parse): yyla is now of symbol_type.
3582 Use its type member instead of yytoken.
3583
3584 2008-11-09 Akim Demaille <demaille@gostai.com>
3585
3586 Rename data_type and stack_symbol_type.
3587 * data/lalr1.cc (data_type): Rename as...
3588 (stack_symbol_type): this.
3589
3590 2008-11-09 Akim Demaille <demaille@gostai.com>
3591
3592 Handle semantic value and location together.
3593 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
3594 yydata.value and yydata.location.
3595 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
3596 (YY_SYMBOL_PRINT): Now take semantic value and location as a
3597 single arg.
3598 Adjust all callers.
3599 (yydestruct_): New overload for a stack symbol.
3600
3601 2008-11-09 Akim Demaille <demaille@gostai.com>
3602
3603 Push a complete symbol, not connected parts.
3604 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
3605 state, value and location.
3606 Adjust callers.
3607
3608 2008-11-09 Akim Demaille <demaille@gostai.com>
3609
3610 Agregate yylval and yylloc.
3611 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
3612 (parser::yyla): this.
3613
3614 2008-11-09 Akim Demaille <demaille@gostai.com>
3615
3616 Rely on the state stack to display reduction traces.
3617 To display rhs symbols before a reduction, we used information
3618 about the rule reduced, which required the tables yyrhs and
3619 yyprhs. Now use rely only on the state stack to get the same
3620 information.
3621
3622 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
3623 Use them.
3624 (parser::yyrhs_, parser::yyprhs_): Remove.
3625 (parser::yy_reduce_print_): Use the state stack.
3626
3627 2008-11-09 Akim Demaille <demaille@gostai.com>
3628
3629 Fuse yyval and yyloc into yylhs.
3630 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
3631 yylhs.
3632 (parse): Replace yyval and yyloc with yylhs.value and
3633 yylhs.location.
3634 After a user action, compute yylhs.state earlier.
3635 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
3636 fresh error_token.
3637
3638 2008-11-09 Di-an Jan <dianj@freeshell.org>
3639
3640 Remove unused variable.
3641 * src/output.c (type_names_output): Remove unused variable sep.
3642
3643 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
3644
3645 Change tests/output.at quoting.
3646 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
3647 expanding arguments.
3648
3649 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3650
3651 Don't add a semicolon to actions for %skeleton or %language.
3652 It breaks Java test cases as reported by Akim Demaille.
3653 * src/scan-code.l: Implement.
3654
3655 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3656
3657 Clean up %skeleton and %language priority implementation.
3658 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3659 remove static qualifier because others will soon need to see it.
3660 (language_prio): Likewise.
3661 (getargs): Use command_line_prio rather than 0.
3662 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3663 enum fields.
3664 (skeleton_prio): Extern it.
3665 (language_prio): Extern it.
3666 * src/parse-gram.y: Use grammar_prio rather than 1.
3667
3668 2008-11-07 Akim Demaille <demaille@gostai.com>
3669
3670 Moving push traces into yypush_.
3671 * data/lalr1.cc (yypush_): Now takes a optional trace message.
3672 Adjust all uses.
3673
3674 2008-11-07 Akim Demaille <demaille@gostai.com>
3675
3676 The single-stack C++ parser is now the standard one.
3677 * data/lalr1.cc: Rename as...
3678 * data/lalr1-split.cc: this.
3679 * data/lalr1-fusion.cc: Rename as...
3680 * data/lalr1.cc: this.
3681 * etc/bench.pl.in: Adjust.
3682
3683 2008-11-07 Akim Demaille <demaille@gostai.com>
3684
3685 Avoid empty-if warnings.
3686 Reported by Quentin Hocquet.
3687
3688 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
3689 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
3690
3691 2008-11-07 Akim Demaille <demaille@gostai.com>
3692
3693 Pass command line location to skeleton_arg and language_argmatch.
3694 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
3695 The location argument is now mandatory.
3696 Adjust all dependencies.
3697 (getargs): Use command_line_location.
3698
3699 2008-11-07 Akim Demaille <demaille@gostai.com>
3700
3701 -D, --define.
3702 * src/getargs.c (usage): Document -D.
3703 Fix help string for --locations.
3704 (command_line_location): New.
3705 (short_options, long_options, getargs): Support -D, --define.
3706 (getargs): Move -d support at the right place.
3707 * doc/bison.texinfo (Bison Options): Update.
3708 * tests/input.at (%define, --define): New.
3709
3710 2008-11-07 Akim Demaille <demaille@gostai.com>
3711
3712 Initialize the muscle table before parsing the command line.
3713 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
3714 (getargs): Define file_name.
3715 * src/main.c (main): Initialize muscle_tab before calling
3716 getargs.
3717 * src/muscle_tab.c (muscle_init): No longer define file_name, as
3718 its value is not available yet.
3719
3720 2008-11-07 Akim Demaille <demaille@gostai.com>
3721
3722 Locations without columns for command line arguments.
3723 * src/location.c (location_print): Don't display negative columns.
3724 * src/location.h: Document this.
3725
3726 2008-11-07 Akim Demaille <demaille@gostai.com>
3727
3728 Fix --help.
3729 * src/getargs.c (usage): Fix help string for -W.
3730
3731 2008-11-07 Akim Demaille <demaille@gostai.com>
3732
3733 Handle more general types of option arguments.
3734 * build-aux/cross-options.pl: The argument ends at the first
3735 space, not the first non-symbol character.
3736 Use @var for each word appearing the argument description.
3737
3738 2008-11-07 Akim Demaille <demaille@gostai.com>
3739
3740 Destroy the variants that remain on the stack in case of error.
3741 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
3742 destructor.
3743 Display the value only if yymsg is nonnull.
3744 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
3745
3746 2008-11-07 Akim Demaille <demaille@gostai.com>
3747
3748 Add "%define assert" to variants.
3749 This is used to help the user catch cases where some value gets
3750 ovewritten by a new one. This should not happen, as this will
3751 probably leak.
3752
3753 Unfortunately this uncovered a bug in the C++ parser itself: the
3754 lookahead value was not destroyed between two calls to yylex. For
3755 instance if the previous lookahead was a std::string, and then an int,
3756 then the value of the std::string was correctly taken (i.e., the
3757 lookahead was now an empty string), but std::string structure itself
3758 was not reclaimed.
3759
3760 This is now done in variant::build(other&) (which is used to take the
3761 value of the lookahead): other is not only stolen from its value, it
3762 is also destroyed. This incurs a new performance penalty of a few
3763 percent, and union becomes faster again.
3764
3765 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
3766 (b4_variant_if): New.
3767 (variant::built): New.
3768 Use it whereever the status of the variant changes.
3769 * etc/bench.pl.in: Check the penalty of %define assert.
3770
3771 2008-11-07 Akim Demaille <demaille@gostai.com>
3772
3773 Use "%define variant" in bench.pl.
3774 * etc/bench.pl.in: No longer use the pseudo directive %variants,
3775 just use %define variants.
3776
3777 2008-11-07 Akim Demaille <demaille@gostai.com>
3778
3779 Regen.
3780 * src/parse-gram.h, src/parse-gram.c: Regen.
3781
3782 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3783
3784 Fix user actions without a trailing semicolon.
3785 Reported by Sergei Steshenko at
3786 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3787 * THANKS (Sergei Steshenko): Add.
3788 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3789 * tests/regression.at (Fix user actions without a trailing semicolon):
3790 New test case.
3791
3792 2008-11-04 Akim Demaille <demaille@gostai.com>
3793
3794 Use b4_copyright_years.
3795 * data/yacc.c (b4_copyright_years): New.
3796 Fix its value according to the comments in the file.
3797 Use it and undefine it.
3798
3799 2008-11-04 Akim Demaille <demaille@gostai.com>
3800
3801 Formatting changes.
3802 * data/lalr1-fusion.cc, src/parse-gram.y: here.
3803
3804 2008-11-04 Akim Demaille <demaille@gostai.com>
3805
3806 Formatting changes.
3807 * data/lalr1-fusion.cc: here.
3808
3809 2008-11-04 Akim Demaille <demaille@gostai.com>
3810
3811 Use strict on bench.pl.
3812 * etc/bench.pl.in (&run, &generate_grammar): New.
3813 Rename the grammar generating functions for consistency.
3814 Change the interface so that the list of benches to run is passed
3815 as (optionless) arguments.
3816 (&compile): Use &run.
3817
3818 2008-11-04 Akim Demaille <demaille@gostai.com>
3819
3820 Remove spurious initial empty lines.
3821 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3822 * data/yacc.c: End the @output lines with an @.
3823
3824 2008-11-04 Akim Demaille <demaille@gostai.com>
3825
3826 Improve the display of sizes.
3827 * etc/bench.p.in: Higher precision.
3828 Sort by decreasing size.
3829
3830 2008-11-04 Akim Demaille <demaille@gostai.com>
3831
3832 Don't memcpy C++ structures.
3833 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
3834 arguments.
3835 (variant::build): New overload for
3836 copy-construction-that-destroys.
3837 (variant::swap): New.
3838 (parser::yypush_): Use it in variant mode.
3839
3840 2008-11-04 Akim Demaille <demaille@gostai.com>
3841
3842 Better defaults for bench.pl.
3843 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
3844 default values.
3845 Adjust &verbose uses.
3846 (-q, --quiet): New.
3847
3848 2008-11-04 Akim Demaille <demaille@gostai.com>
3849
3850 Make variant.yy more complex.
3851 std::list cannot be copied via memcpy, they are more demanding than
3852 std::string. Use one std::list to strengthen the test.
3853
3854 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
3855 Adjust.
3856 Create a list of strings, instead of a single large string.
3857
3858 2008-11-04 Akim Demaille <demaille@gostai.com>
3859
3860 bench.pl --bench.
3861 * etc/bench.pl.in (--bench, $bench): New.
3862
3863 2008-11-04 Akim Demaille <demaille@gostai.com>
3864
3865 Sort methods.
3866 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
3867 Define it after as().
3868
3869 2008-11-04 Akim Demaille <demaille@gostai.com>
3870
3871 Useless parens.
3872 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
3873
3874 2008-11-04 Akim Demaille <demaille@gostai.com>
3875
3876 Issue missing synclines after user actions.
3877 * data/c.m4 (b4_case): Issue synclines on the output file.
3878
3879 2008-11-04 Akim Demaille <demaille@gostai.com>
3880
3881 Remove trailing empty line.
3882 * data/lalr1-fusion.cc: Don't add an empty line after the user's
3883 epilogue.
3884
3885 2008-11-04 Akim Demaille <demaille@gostai.com>
3886
3887 Fix output of copyright years.
3888 * data/bison.m4 (b4_copyright): Fix the indentation of the
3889 copyright year paragraph.
3890 Use b4_copyright_years when no years are given.
3891 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3892 (b4_copyright_years): New.
3893 Use it.
3894
3895 2008-11-04 Akim Demaille <demaille@gostai.com>
3896
3897 Avoid the spurious initial empty line.
3898 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3899 the end of @output request to suppress the empty line that
3900 results.
3901
3902 2008-11-04 Akim Demaille <demaille@gostai.com>
3903
3904 Remove parser::rhs_number_type.
3905 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3906 (yyrhs_): Use b4_table_define.
3907
3908 2008-11-04 Akim Demaille <demaille@gostai.com>
3909
3910 Fix iteration type.
3911 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3912
3913 2008-11-04 Akim Demaille <demaille@gostai.com>
3914
3915 Factor the declaration of the integer tables.
3916 * data/lalr1-fusion.cc (b4_table_define): New.
3917 Use it.
3918
3919 2008-11-03 Akim Demaille <demaille@gostai.com>
3920
3921 Fix indentation of tables in lalr1.cc
3922 * data/lalr1-fusion.cc: Fix the indentation.
3923
3924 2008-11-03 Akim Demaille <demaille@gostai.com>
3925
3926 Destroy the lhs symbols after reduction.
3927 * data/lalr1-fusion.cc (parse): After the user action, when in
3928 variant mode, destroy the lhs symbols.
3929
3930 2008-11-03 Akim Demaille <demaille@gostai.com>
3931
3932 Simplify yysyntax_error_ use.
3933 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3934 type, but make it unnamed in the declaration when it is not used.
3935
3936 2008-11-03 Akim Demaille <demaille@gostai.com>
3937
3938 Let yy::variant::build return an lvalue.
3939 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3940 object.
3941
3942 2008-11-03 Akim Demaille <demaille@gostai.com>
3943
3944 Define yy::variant only when needed.
3945 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3946 used.
3947
3948 2008-11-03 Akim Demaille <demaille@gostai.com>
3949
3950 Bench the three-stack lalr1.cc.
3951 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3952 one-stack one.
3953
3954 2008-11-03 Akim Demaille <demaille@gostai.com>
3955
3956 Fail on parse error in calc++.
3957 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
3958 status.
3959 * examples/calc++/test ($me, $number, $exit, run): New.
3960 Use them to propagate errors to the exit status.
3961
3962 2008-11-03 Akim Demaille <demaille@gostai.com>
3963
3964 Don't specify the skeleton twice in the example.
3965 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3966 file does what is needed.
3967
3968 2008-11-03 Akim Demaille <demaille@gostai.com>
3969
3970 bench: Improve output.
3971 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3972
3973 2008-11-03 Akim Demaille <demaille@gostai.com>
3974
3975 bench: check impact of %debug on variants.
3976 * etc/bench.pl.in (variant_grammar): Fix the computation of
3977 $variant.
3978 Generate a grammar file that can work with or without %debug.
3979 Do use the @directive.
3980 (bench_variant_parser): Check impact of %debug.
3981 (@directives): Rename all the occurrences to...
3982 (@directive): this, for consistency.
3983
3984 2008-11-03 Akim Demaille <demaille@gostai.com>
3985
3986 bench: report the size too.
3987 * etc/bench.pl.in ($iterations): Defaults to -3.
3988 (&bench_grammar): Require hireswallclock.
3989 Compute and display the size of the result.
3990 More comments.
3991
3992 2008-11-03 Akim Demaille <demaille@gostai.com>
3993
3994 bench: More use of the verbosity level.
3995 * etc/bench.pl.in ($verbose, &verbose): New.
3996 Use them.
3997 More POD documentation.
3998
3999 2008-11-03 Akim Demaille <demaille@gostai.com>
4000
4001 bench.pl: a command line interface
4002 * etc/bench.pl.in: More doc.
4003 Some fixes in the documentation.
4004 ($cflags, $iterations, &help, &getopt): New.
4005 Use them.
4006 (&variant_grammar): Let the number of stages be 10 times what is
4007 specified.
4008
4009 2008-11-03 Akim Demaille <demaille@gostai.com>
4010
4011 Bench the use of Boost.Variants.
4012 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4013 New.
4014 (&compile): Be ready to compile C++ parsers.
4015 (&bench_push_parser): Move debug information to the outermost
4016 level.
4017 * THANKS: Add Michiel De Wilde.
4018
4019 2008-11-03 Akim Demaille <demaille@gostai.com>
4020
4021 bench.pl: Pass directives as a list instead of as a string.
4022 * etc/bench.pl.in (&directives): New.
4023 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4024 directives.
4025 (&triangular_grammar): Do use the directives (were ignored).
4026 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4027 directives.
4028
4029 2008-11-03 Akim Demaille <demaille@gostai.com>
4030
4031 Improve genericity of bench.pl.
4032 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4033 argument.
4034 (&bench_push_parser): New.
4035 Call it.
4036
4037 2008-11-03 Akim Demaille <demaille@gostai.com>
4038
4039 Add documentation to bench.pl.
4040 * etc/bench.pl.in: Comment changes.
4041
4042 2008-11-03 Akim Demaille <demaille@gostai.com>
4043
4044 Fuse the three stacks into a single one.
4045
4046 In order to make it easy to perform benchmarks to ensure that
4047 there are no performance loss, lalr1.cc is forked into
4048 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4049 lalr1.cc.
4050
4051 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4052 exercized by the test suite, the user must install a symbolic link
4053 from lalr1.cc to it.
4054
4055 Instead of having three stacks (state, value, location), use a
4056 stack of triples. This considerably simplifies the code (and it
4057 will be easier not to require locations as currently does the C++
4058 parser), and also gives a 10% speedup according to
4059 etc/bench (probably mainly since memory allocation is done once
4060 instead of three times).
4061
4062 Another motivation is to make it easier to destruct properly
4063 semantic values: now that they are bound to their state (hence
4064 symbol type) it will be easier to call the appropriate destructor.
4065
4066 These changes should probably benefit the C parser too.
4067
4068 * data/lalr1.cc: Copy as...
4069 * data/lalr1-fusion.cc: this new file.
4070 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4071 from c++.m4.
4072 (state_stack_type, semantic_stack_type, location_stack_type)
4073 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4074 (data_type, stack_type, yystack_): New.
4075 (YYLLOC_DEFAULT, yypush_): Adjust.
4076 (yyerror_range): Now based on data_type, not location_type.
4077
4078 2008-11-03 Akim Demaille <demaille@gostai.com>
4079
4080 Push the state, value, and location at the same time.
4081 This is needed to prepare a forthcoming patch that fuses the three
4082 stacks into one.
4083
4084 * data/lalr1.cc (parser::yypush_): New.
4085 (parser::yynewstate): Change the semantics: instead of arriving to
4086 this label when value and location have been pushed, but yystate
4087 is to be pushed on the state stack, now the three of them must
4088 have been pushed before. yystate still must be the new state.
4089 This allows to use yypush_ everywhere instead of individual
4090 handling of the stacks.
4091
4092 2008-11-03 Akim Demaille <demaille@gostai.com>
4093
4094 Prefer references to pointers.
4095 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4096 definition to use references instead of pointers.
4097 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4098 Take the value and location as references.
4099 Adjust callers.
4100
4101 2008-11-03 Akim Demaille <demaille@gostai.com>
4102
4103 stack::size instead of stack::height.
4104 * data/lalr1.cc (stack::height): Rename as...
4105 (stack::size): this.
4106 Fix the output type.
4107 Comment changes.
4108
4109 2008-11-03 Akim Demaille <demaille@gostai.com>
4110
4111 Use variants to support objects as semantic values.
4112 This patch was inspired by work by Michiel De Wilde. But he used
4113 Boost variants which (i) requires Boost on the user side, (ii) is
4114 slow, and (iii) has useless overhead (the parser knows the type of
4115 the semantic value there is no reason to duplicate this
4116 information as Boost.Variants do).
4117
4118 This implementation reserves a buffer large enough to store the
4119 largest objects. yy::variant implements this buffer. It was
4120 implemented with Quentin Hocquet.
4121
4122 * src/output.c (type_names_output): New.
4123 (output_skeleton): Invoke it.
4124 * data/c++.m4 (b4_variant_if): New.
4125 (b4_symbol_value): If needed, provide a definition for variants.
4126 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4127 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4128 (b4_char_sizeof, yy::variant): New.
4129 (parser::parse): If variants are requested, define
4130 parser::union_type, parser::variant, change the definition of
4131 semantic_type, construct $$ before running the user action instead
4132 of performing a default $$ = $1.
4133 * examples/variant.yy: New.
4134 Based on an example by Michiel De Wilde.
4135
4136 2008-11-03 Akim Demaille <demaille@gostai.com>
4137
4138 Parameterize the extraction of semantic values.
4139 To make future changes easier, no longer rely on ".TYPE" being the
4140 way to get a semantic value.
4141
4142 * data/c.m4 (b4_symbol_value): New.
4143 Use it.
4144 * data/c++.m4, data/yacc.c: Use it.
4145 * data/glr.c: Use b4_symbol_value.
4146 (b4_rhs_data): New.
4147 Use it.
4148
4149 2008-11-03 Akim Demaille <demaille@gostai.com>
4150
4151 Prepare easier M4 changes.
4152 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4153 future changes.
4154
4155 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4156
4157 Initiate further development.
4158 * NEWS: Create an empty section for new entries.
4159 * gnulib: Update submodule to HEAD.
4160
4161 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4162
4163 * NEWS: Version 2.4.
4164
4165 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4166
4167 Prepare for next release.
4168 * NEWS: Briefly mention changes since 2.3b.
4169 * README: Say GNU m4 1.4.6, which we've been requiring in release
4170 announcements already, not 1.4.3, which breaks the build.
4171
4172 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4173
4174 Say %language is experimental.
4175 We're thinking of extending it's effect on output file naming. See the
4176 thread at
4177 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4178 * NEWS: Say it's experimental.
4179 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4180 recommend it over %skeleton for now.
4181 (Bison Options): Likewise.
4182 (C++ Bison Interface): Use %skeleton not %language.
4183 (Calc++ Parser): Use %skeleton not %language.
4184 * src/getargs.c (usage): Say it's experimental.
4185
4186 2008-11-01 Di-an Jan <dianj@freeshell.org>
4187 Paolo Bonzini <bonzini@gnu.org>
4188
4189 Support all Java parser class modifiers.
4190 * data/java.m4 (b4_percent_define_get3): New.
4191 (b4_final_if, b4_strictfp_if): New.
4192 * data/lalr1.java (final, strictfp, extends, implements): Support.
4193 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4194 documentation.
4195 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4196 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4197 (AT_CHECK_JAVA_GREP): New.
4198 (Java parser class modifiers): New test.
4199 (Java parser class extends and implements): New test.
4200
4201 Model exception propagation better with throws and lex_throws.
4202 * data/java.m4 (b4_list2): New.
4203 (throws): Change default.
4204 * data/lalr1.java (yyaction): Add throws.
4205 (parse): Add lex_throws in addition to throws.
4206 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4207 * tests/java.at (Java throws specifications): New test.
4208
4209 Improve documentation for Java parsers.
4210 * doc/bison.texinfo (Java Parsers): Add subsections.
4211 Don't quote first argument of %define.
4212 (Java Bison Interface): Document output files. Move documentation
4213 of parser class and merge into Java Parser Interface. Document
4214 features that error out. Document directives with no effect.
4215 Move note about Javadoc higher.
4216 (Java Semantic Values): Explicitly mention stype.
4217 Document that generic types cannot be used.
4218 (Java Location Values): Use @deftypeivar. Document constructors.
4219 Correct return value for toString.
4220 (Java Parser Interface): List undocumented constants/fields.
4221 Move documentation of fields added by %parse-param closer to list
4222 of members. Document that token names are added as fields.
4223 Document constructors accurately. Remove error method.
4224 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4225 Interface. Describe %code lexer and yylex accutately.
4226 Remove documentation that does not match the code.
4227 (Java Action Features): New.
4228 (Java Differences): Add reference. Add item on semantic values.
4229 Add note about @{ ... @}. Clarify %% epilogue placement.
4230 (Java Declarations Summary): New.
4231
4232 Fix Java skeleton.
4233 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4234 (b4_remove_comma): Quote test argument.
4235 (b4_identification): Remove "bison" field.
4236 * tests/java.at (Java parser class and package names): New test.
4237 (Java %parse-param and %lex-param): New test.
4238 (Java stype, position_class and location_class): New test.
4239
4240 2008-10-31 Di-an Jan <dianj@freeshell.org>
4241
4242 * data/lalr1.jave: Update copyright years.
4243 (YYParser): Correct name of "generated from" file in Javadoc:
4244 use b4_file_name instead of @ofile@.
4245 (Location constructor): Correct Javadoc parameter name.
4246 (yylloc): Add missing opening m4 quote after b4_location_if.
4247 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4248 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4249 (YYParser constructor): Correct Javadoc parameter name.
4250
4251 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4252
4253 Always put auxiliary code files in the same dir as other output files.
4254 * src/files.c (compute_file_name_parts): When the user specifies
4255 --output but not --file-prefix, extract the directory prefix from the
4256 file prefix not from the grammar file name. This affects the location
4257 of files like location.hh generated by the C++ skeleton. The includes
4258 in the other output files require this fix.
4259 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4260 for expected output files.
4261 (Output files): Add a test for the above.
4262
4263 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4264
4265 * gnulib: Update submodule to HEAD.
4266
4267 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4268
4269 Update copyright year.
4270 * src/files.c: Here.
4271
4272 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4273
4274 Don't overwrite the input file.
4275 * src/files.c (output_file_name_check): Fatal error if using input file
4276 for output.
4277 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4278 argument.
4279 (Conflicting output files): Add test.
4280
4281 2008-10-28 Akim Demaille <demaille@gostai.com>
4282
4283 Space changes.
4284 * data/lalr1.cc: Formatting changes.
4285
4286 2008-10-28 Akim Demaille <demaille@gostai.com>
4287
4288 Don't define debugging functions when !YYDEBUG.
4289 * data/lalr1.cc (debug_stream, set_debug_stream)
4290 (debug_level_type, debug_level, set_debug_level): Don't
4291 declare them when YYDEBUG is not defined.
4292 The implementation are already YYDEBUG-aware.
4293
4294 2008-10-28 Akim Demaille <demaille@gostai.com>
4295
4296 Prefer "continue" for empty loop bodies.
4297 * etc/bench.pl.in: Use "continue" instead of {}.
4298
4299 2008-10-28 Akim Demaille <demaille@gostai.com>
4300
4301 Space and comments changes.
4302 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4303 * data/c.m4, data/lalr1.cc: Space changes.
4304
4305 2008-10-28 Akim Demaille <demaille@gostai.com>
4306
4307 Make gnulib a submodule.
4308 * gnulib: New.
4309 * .gitmodules (gnulib): New.
4310
4311 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4312
4313 Fix yyerror_range for user-defined location type in C++. Reported by
4314 Georg Sauthoff at
4315 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4316 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4317 * THANKS (Georg Sauthoff): Add.
4318
4319 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4320
4321 Update several administrative files mainly to facilitate releasing.
4322 * HACKING (Administrivia): Make the git-merge-changelog notes more
4323 helpful.
4324 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4325 (Release Procedure): Update for git and add numerous details that were
4326 previously missing.
4327 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4328 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4329 that announcements don't claim we bootstrapped with whatever bison
4330 happened to be in PATH. Add flex as a bootstrap tool.
4331 * Makefile.maint: Remove, previously replaced by maint.mk.
4332 * Makefile.cfg: Remove, and migrate settings to...
4333 * cfg.mk: ... here for the sake of `make announcement'.
4334 * bootstrap.conf (gnulib_modules): Add announce-gen.
4335 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4336 Berry.
4337
4338 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4339
4340 Small but important bugfixes for the Java skeleton.
4341 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4342 (yy_symbol_print): Call toString on yyvaluep.
4343
4344 2008-08-29 Akim Demaille <demaille@gostai.com>
4345
4346 Clarify UPDATED use.
4347 * doc/bison.texinfo: It refers to the last edition of this file,
4348 not to the release date of Bison.
4349 Reported by Joel E. Denny.
4350
4351 2008-08-29 Akim Demaille <demaille@gostai.com>
4352
4353 * README: Update FAQ pointer.
4354 Reported by Joel E. Denny.
4355
4356 2008-08-27 Eric Blake <ebb9@byu.net>
4357
4358 Resync m4sugar from autoconf.
4359 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4360 (m4_init): Adjust to latest m4.git changes.
4361 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4362 effects.
4363 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4364 (_m4_list_cmp): Reduce side effects.
4365
4366 2008-08-27 Akim Demaille <demaille@gostai.com>
4367
4368 Check yyerrok in calc.at.
4369 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4370 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4371 expected.
4372
4373 2008-08-27 Akim Demaille <demaille@gostai.com>
4374
4375 Support yyerrok in lalr1.cc.
4376 YYBACKUP is still to import back into lalr1.cc.
4377 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4378
4379 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4380
4381 For maintainer-check*, don't recompile for a $(VERSION) update.
4382 * cfg.mk: New file.
4383 (_is-dist-target): Override the one in GNUmakefile.
4384 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4385
4386 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4387
4388 Update for recent change to gnulib.
4389 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4390 string.h now.
4391
4392 2008-08-15 Eric Blake <ebb9@byu.net>
4393
4394 Remaining m4sugar merge from autoconf.
4395 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4396 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4397 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4398 * src/output.c (output_skeleton): Tell m4 how to find it.
4399
4400 Partial m4sugar merge from autoconf: m4_map.
4401 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4402 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4403 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4404 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
4405 for empty list.
4406 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
4407 Likewise.
4408 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
4409 declares it.
4410
4411 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
4412
4413 Keep .version and PACKAGE_VERSION in sync.
4414 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
4415 dependency, and add comments justifying this in more detail. Discussed
4416 starting at
4417 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
4418
4419 2008-08-06 Eric Blake <ebb9@byu.net>
4420
4421 Partial m4sugar merge from autoconf: m4_shiftn.
4422 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
4423 (m4_shift2, m4_shift3): New macros.
4424 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
4425 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
4426 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
4427 * data/java.m4 (b4_remove_comma): Likewise.
4428
4429 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
4430 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
4431 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
4432 (m4_init): Consolidate wrapped text into single m4_wrap.
4433 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
4434 in wrapped text.
4435
4436 2008-08-05 Eric Blake <ebb9@byu.net>
4437
4438 Partial m4sugar merge from autoconf: builtins, version.m4.
4439 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
4440 (m4_prepend): Remove, as it is unused and inherently quadratic,
4441 whereas m4_append is linear in newer m4.
4442 (m4_mkstemp): New builtin.
4443 (m4_symbols): Make rename conditional.
4444 (m4_version_prereq): Ensure fatal error if used in bison, which
4445 intentionally lacks version.m4.
4446
4447 Fix comments in m4sugar.
4448 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
4449
4450 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4451
4452 Update for recent .gitignore fix in Gnulib.
4453 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
4454 anchored .gitignore entries.
4455
4456 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4457
4458 Set gnu or gnits strictness.
4459 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
4460 development and gnits strictness for releases. Based on Eric Blake's
4461 suggestion at
4462 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
4463
4464 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4465
4466 * NEWS: Clarify documentation of %language.
4467
4468 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4469
4470 Support usage of git-merge-changelog.
4471 * .gitattributes: New.
4472 * HACKING: Document usage of git-merge-changelog.
4473 * bootstrap: Install git-merge-changelog entries in .git/config
4474 if appropriate.
4475
4476 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4477
4478 Remove remaining dependence on CVS Id keyword.
4479 * ChangeLog: For the sake of people still using CVS, don't use dollars
4480 when mentioning Id.
4481 * data/xslt/bison.xsl: Remove Id from header comments, where it was
4482 unusual anyway.
4483 * data/xslt/xml2dot.xsl: Likewise.
4484 * data/xslt/xml2text.xsl: Likewise.
4485 * data/xslt/xml2xhtml.xsl: Likewise.
4486 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
4487 * doc/Makefile.am (neutralize): Remove, no longer needed.
4488 (.x.1): Don't use neutralize.
4489 (edit): Don't substitute for ID.
4490 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
4491
4492 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4493
4494 Fix dependence on computed configure variables.
4495 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
4496 $(top_srcdir)/configure.ac so that changes to computed variables, such
4497 as PACKAGE_VERSION, are seen.
4498 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
4499
4500 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
4501
4502 Update copyright dates for recent changes.
4503 * Makefile.am: Here.
4504 * src/Makefile.am: Here.
4505 * src/reduce.c: Here.
4506 * tests/reduce.at: Here.
4507
4508 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
4509
4510 Use git-version-gen for version names between releases.
4511 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
4512 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
4513 * .prev-version: New.
4514 * .version.in: Remove.
4515 * ChangeLog: Remove the Id previously used for capturing the CVS
4516 revision.
4517 * GNUmakefile: Remove, now copied from Gnulib.
4518 * Makefile.am: Add code suggested by comments in
4519 build-aux/git-version-gen.
4520 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
4521 .prev-version, and .version.
4522 * NEWS (2.3b+): Rename to...
4523 (?.?): ... this because we're dropping the "+" version naming scheme,
4524 but, in general, we still can't be sure of our next release name.
4525 * bootstrap: Add a quick hack to remove from .gitignore the
4526 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
4527 entry. This should really be fixed in gnulib instead.
4528 * bootstrap.conf (gnulib_modules): Add gnumakefile.
4529 * configure.ac (AC_INIT): Set version name by invoking
4530 build-aux/git-version-gen.
4531 (AC_CONFIG_FILES): Remove .version, now generated by
4532 build-aux/git-version-gen.
4533 * maint.mk: New, copied from coreutils.
4534 * doc/.cvsignore (bison.1): Add.
4535 * doc/.gitignore (/bison.1): Add.
4536 * doc/bison.1: Remove, generated.
4537 * src/.cvsignore (revision.c): Remove.
4538 * src/.gitignore (/revision.c): Remove.
4539 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
4540 (BUILT_SOURCES): Remove revision.c.
4541 (revision.c): Remove.
4542 * src/getargs.c (version): Don't print revision after the VERSION.
4543 * src/revision.h: Remove.
4544
4545 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4546
4547 Fix untranslatable composition of sentences. Reported by Goran
4548 Uddeborg at
4549 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
4550 * THANKS (Goran Uddeborg): Add.
4551 * src/reduce.c (reduce_print): Report the number of nonterminals and
4552 rules useless in the grammar in separate sentences.
4553 * tests/reduce.at (Useless Rules): Update output.
4554 (Reduced Automaton): Likewise.
4555 (Underivable Rules): Likewise.
4556 (Empty Language): Likewise.
4557
4558 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4559
4560 Fix some .gitignore and .cvsignore problems.
4561 * bootstrap (insert_sorted_if_absent): Replace all uses with...
4562 (insert_vc_ignore): ... this new function, which prepends `/' to all
4563 .gitignore entries before passing them to insert_sorted_if_absent.
4564 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
4565 .cvsignore files are maintained even though Bison developers run
4566 bootstrap while using Git.
4567 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
4568 unneeded by Bison.
4569 (gnulib): Add.
4570 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
4571 unneeded. Reported by Eric Blake.
4572 * lib/.gitignore (/*~): Add.
4573 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
4574 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
4575 Blake.
4576 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
4577
4578 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4579
4580 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
4581 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
4582 * bootstrap.conf (gnulib_modules): Add unsetenv.
4583 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
4584 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
4585 (/setenv.m4): Add.
4586 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
4587 the first argument because it may become position-dependent, and unset
4588 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
4589 Add comments explaining these issues in more detail.
4590
4591 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
4592
4593 Add .gitignore everywhere based on .cvsignore.
4594 * .gitignore: New.
4595 * build-aux/.gitignore: New.
4596 * data/.gitignore: New.
4597 * doc/.gitignore: New.
4598 * etc/.gitignore: New.
4599 * examples/.gitignore: New.
4600 * examples/calc++/.gitignore: New.
4601 * lib/.gitignore: New.
4602 * m4/.gitignore: New.
4603 * po/.gitignore: New.
4604 * runtime-po/.gitignore: New.
4605 * src/.gitignore: New.
4606 * tests/.gitignore: New.
4607
4608 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4609
4610 * NEWS (2.3b+): New section, empty for now.
4611 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
4612
4613 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4614
4615 * NEWS (2.3b): Update release date since there has been a delay in
4616 getting the announcements and tarballs out.
4617
4618 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4619
4620 * NEWS: Version 2.3b.
4621 * configure.ac (AC_INIT): Likewise.
4622 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
4623
4624 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4625
4626 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
4627 been doing it for years.
4628 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
4629 (Release Procedure): Add FIXME about make alpha being unmaintained.
4630
4631 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
4632
4633 * data/yacc.c: Reformat m4 a little for readability.
4634 * src/lalr.c (build_relations): Correct comment.
4635
4636 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4637
4638 DJGPP specific issue.
4639 * djgpp/config.sed: Fixes required to run configure scripts generated
4640 by autoconf 2.62.
4641
4642 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4643
4644 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
4645 coordinator@translationproject.org.
4646
4647 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4648
4649 * THANKS: Add Eric Blake.
4650
4651 2008-04-23 Eric Blake <ebb9@byu.net>
4652
4653 Revert prior patch, by working around autoconf regression.
4654 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
4655 ("Output file name: ("): Uncomment test.
4656 ("Output file name: )"): Likewise.
4657 Based on an idea from Noah Misch.
4658
4659 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4660
4661 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
4662 2.61. Reported by Juan Manuel Guerrero at
4663 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
4664 * tests/output.at ("Output file name: ("): Comment out test case for
4665 now.
4666 ("Output file name: )"): Likewise.
4667
4668 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4669
4670 * GNUmakefile: Update git-version-gen invocation so make dist
4671 succeeds.
4672
4673 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4674
4675 Update to the current gnulib CVS repository, and fix trigraph handling
4676 in Bison.
4677 * bootstrap: Update gnulib CVS repository URL.
4678 (symlink_to_dir): Encapsulate the code that guarantees the destination
4679 directory exists into...
4680 (check_dst_dir): ... this new function, and...
4681 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
4682 fail when copying files into lib/uniwidth/.
4683 * src/output.c (prepare_symbols): When writing yytname muscles, where
4684 symbol names will be encoded in C-string literals, tell quotearg to
4685 escape trigraphs. This used to be the default in gnulib.
4686 * tests/regression.at (Token definitions): Because of the change in
4687 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
4688 escapes trigraphs in symbol names. Thus, yytname no longer has
4689 trigraphs unnecessarily doubly escaped. Update test case output.
4690 Extend test case to be sure Bison's own error messages will no longer
4691 have trigraphs in symbol names unnecessarily escaped once.
4692
4693 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
4694
4695 Fix make dist infinite loop reported by Juan Manuel Guerrero at
4696 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
4697 * .cvsignore: Add .version.
4698 * .version.in: New.
4699 * bootstrap.conf (gnulib_modules): Add git-version-gen.
4700 * configure.ac (AC_CONFIG_FILES): Add .version.
4701 * build-aux/.cvsignore: Add git-version-gen.
4702
4703 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4704
4705 * NEWS (2.3a+): Mention that -g now takes an argument.
4706 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
4707 consistency. Update the -g and -x entries now that they take
4708 arguments. Use brackets to indicate optional arguments.
4709 * src/getargs.c (usage): Explain the relationship between arguments of
4710 long and short options more completely. Document --defines and -d
4711 separately since the former takes an argument but, for POSIX Yacc, the
4712 latter does not.
4713 (short_options): Let -W take an optional argument like --warnings.
4714 (getargs): Sort cases.
4715
4716 2008-02-28 Akim Demaille <demaille@gostai.com>
4717
4718 * doc/bison.texinfo: Fix a few typos.
4719
4720 2008-02-28 Akim Demaille <akim@epita.fr>
4721
4722 * doc/bison.texinfo (Bison Options): Document -W.
4723 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
4724
4725 2008-02-28 Akim Demaille <akim@epita.fr>
4726
4727 * src/getargs.c (short_options): Split and sort for readability.
4728 -g and -x take optional arguments, just like their long options.
4729 * build-aux/cross-options.pl: Use /x to make the regexp easier to
4730 understand.
4731 Fix the handling of $opt which resulted in all the argument to be
4732 considered as optional.
4733
4734 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
4735
4736 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
4737 say its interface is experimental.
4738 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4739 Java.
4740 (Bison Options): In the -L and --language entry, mention Java.
4741 (Java Bison Interface): Say the interface is experimental.
4742 * src/getargs.c (usage): Mention -L and --language.
4743
4744 * NEWS (2.3a+): Say the push parsing interface is experimental.
4745 * doc/bison.texinfo (Push Decl): Likewise.
4746 (Decl Summary): Likewise in the "%define api.push_pull" entry.
4747 (Push Parser Function): Likewise.
4748 (Pull Parser Function): Likewise.
4749 (Parser Create Function): Likewise.
4750 (Parser Delete Function): Likewise.
4751 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
4752 yypull_parse, and yypush_parse entries.
4753
4754 * NEWS (2.3a+): Mention XML support, and say the schema is
4755 experimental.
4756 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
4757 * src/getargs.c (usage): Say the XML schema is experimental.
4758
4759 * NEWS (2.3a+): Say option instead of flag.
4760
4761 2008-02-21 Wojciech Polak <polak@gnu.org>
4762
4763 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
4764 text.
4765
4766 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
4767
4768 Fix impure push parser compile error reported by Bob Rossi at
4769 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
4770 * data/yacc.c: Clean up whitespace in the output a little.
4771 (yypstate_allocated): Define for impure push parsers regardless of
4772 whether the pull interface is also requested.
4773 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
4774 check impure push parsers without the pull interface.
4775
4776 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
4777 yyerror takes arguments specified by %parse-param while yypstate_new
4778 does not.
4779 * doc/bison.texinfo (Parser Create Function): Document that
4780 yypstate_new returns 0 for multiple impure parser instances.
4781 * tests/push.at (Push Parsing: Multiple impure instances): Update
4782 expected stderr output.
4783
4784 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4785
4786 * runtime-po/POTFILES.in (push.c): Remove.
4787
4788 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4789
4790 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
4791 * data/push.c: Rename to...
4792 * data/yacc.c: ... this, overwriting it.
4793 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
4794 `%push-pull-parser' -> `%define api.push_pull "both"'.
4795 Remove old yacc.c tests, and update push.c tests to yacc.c.
4796
4797 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4798
4799 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4800 `"%code top" blocks' instead of `%code "top" blocks'.
4801 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
4802 Clean up whitespace in the output a little.
4803
4804 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4805
4806 Fix documentation problems reported by Tim Josling at
4807 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
4808 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
4809 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
4810 integers. Explain the effect of literal string aliases on error
4811 messages. Copy token 0 documentation from the C++ skeleton
4812 documentation.
4813
4814 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4815
4816 Accept a token number in a %left, %right, or %nonassoc for POSIX
4817 conformance. Reported by Tim Josling at
4818 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
4819 * NEWS (2.3a+): Mention.
4820 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
4821 and code numbers are treated by precedence declarations.
4822 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
4823 of symbols.1.
4824 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
4825 of symbol.
4826 (symbol.prec): New, just like symbol but allows INT.
4827 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
4828 longer holds.
4829 * tests/regression.at (Token number in precedence declaration): New
4830 test case.
4831
4832 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4833
4834 DJGPP specific issues.
4835 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
4836 be changed. Copyright timestamp adjusted.
4837 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
4838 be changed. Copyright timestamp adjusted.
4839 * djgpp/config.site: Copyright timestamp adjusted.
4840 * djgpp/config_h.sed: Copyright timestamp adjusted.
4841 * djgpp/djunpack.bat: Copyright timestamp adjusted.
4842 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
4843 filename translation list.
4844 * djgpp/subpipe.c (init_subpipe): Check the environment variables
4845 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
4846 files shall be created. Before trying to use the temp dir where the
4847 environment variable points to check that the dir really exists. If
4848 not default to the cwd as temp dir. Copyright timestamp adjusted.
4849 * djgpp/subpipe.h: Copyright timestamp adjusted.
4850 * djgpp/testsuite.sed: Copyright timestamp adjusted.
4851
4852 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4853
4854 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
4855
4856 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
4857
4858 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
4859 Problem reported by Claudio Saavedra in
4860 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
4861
4862 2008-01-05 Wojciech Polak <polak@gnu.org>
4863
4864 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
4865 document's title with the input grammar file name.
4866
4867 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
4868
4869 Automate regression testing of the XML/XSLT implementation. Discussed
4870 starting at
4871 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4872 * configure.ac (XSLTPROC): New substitution.
4873 * Makefile.am (maintainer-xml-check): New phony target invoking...
4874 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4875 invoking make maintainer-check with BISON_TEST_XML=1.
4876 * tests/atlocal.in (XSLTPROC): New.
4877 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4878 not to report reachable memory when Bison is expected to have a
4879 non-zero exit status and (2) to compare XML/XSLT output with --graph
4880 and --report=all output for every working grammar when
4881 BISON_TEST_XML=1.
4882 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4883 (AT_BISON_CHECK_XML): New.
4884 (AT_QUELL_VALGRIND): New.
4885 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4886 (AT_CHECK): ... don't redefine this since this was the old way to
4887 quell Valgrind.
4888 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4889 AT_BISON_CHECK invocations.
4890 * tests/c++.at: Likewise.
4891 * tests/calc.at: Likewise.
4892 * tests/conflicts.at: Likewise.
4893 * tests/cxx-type.at: Likewise.
4894 * tests/existing.at: Likewise.
4895 * tests/glr-regression.at: Likewise.
4896 * tests/headers.at: Likewise.
4897 * tests/input.at: Likewise.
4898 * tests/java.at: Likewise.
4899 * tests/output.at: Likewise.
4900 * tests/push.at: Likewise.
4901 * tests/reduce.at: Likewise.
4902 * tests/regression.at: Likewise.
4903 * tests/sets.at: Likewise.
4904 * tests/skeletons.at: Likewise.
4905 * tests/synclines.at: Likewise.
4906 * tests/torture.at: Likewise.
4907 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4908 tends to hang xsltproc.
4909 (Big horizontal): Likewise.
4910
4911 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4912
4913 In XML output, remove redundant class attribute on symbol element.
4914 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4915 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4916 look up a symbol to determine whether it's a nonterminal or terminal.
4917 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4918 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4919
4920 Add prec/assoc information to XML output.
4921 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4922 %prec, add a percent_prec attribute.
4923 * src/print-xml.c (print_grammar): For each terminal that has a
4924 precedence or associativity, add a prec or assoc attribute.
4925 (xml_indent): New.
4926 (xml_puts): Use xml_indent.
4927 (xml_printf): Use xml_indent.
4928 * src/print-xml.h (xml_indent): Prototype.
4929
4930 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4931 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4932
4933 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4934
4935 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4936 (bison:ruleByNumber): ... this for clarity.
4937 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4938 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4939 (xsl:template match="reduction"): Update.
4940 (xsl:template match="item"): Update.
4941 (xsl:template match="reduction"): Update.
4942
4943 In the XML output, don't print the list of rules where symbols appear.
4944 Compute it in XSLT instead. Discussed at
4945 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4946 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4947 (bison:ruleByRhs): New.
4948 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4949 bison:ruleByRhs.
4950 (xsl:template match="terminal/rule"): Remove.
4951 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4952 bison:ruleByRhs.
4953 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4954 Remove.
4955 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4956 bison:ruleByRhs and mode="number-link" for rule template.
4957 (xsl:template match="terminal/rule"): Remove.
4958 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4959 bison:ruleByRhs and mode="number-link" for rule template.
4960 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4961 Rewrite as...
4962 (xsl:template match="rule" mode="number-link"): ... this.
4963 * src/print-xml.c (print_grammar): Don't print the list of rules.
4964
4965 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4966
4967 Don't let --report affect XML output; always print all information.
4968 Discussed at
4969 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4970 * src/conflicts.c (log_resolution): Implement.
4971 * src/print-xml.c (print_core): Implement.
4972 (print_state): Implement.
4973 (print_xml): Implement.
4974
4975 * NEWS (2.3a+): Fix quotes.
4976 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4977 don't let %verbose clear the list specified by --report.
4978
4979 2007-11-26 Akim Demaille <akim@epita.fr>
4980
4981 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4982
4983 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4984
4985 In the XML output, list useless and unused symbols and rules with the
4986 useful ones and add a "usefulness" attribute. Discussed starting at
4987 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4988 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4989 (grammar_rules_print_xml): Print all rules instead of just those
4990 useful in the grammar, and add a "usefulness" attribute.
4991 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4992 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4993 (print_grammar): Print all nonterminals instead of just useful ones,
4994 and add a "usefulness" attribute to nonterminals and terminals.
4995 (print_xml): Don't print a separate "reductions" or
4996 "rules-useless-in-parser" element.
4997 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4998 (reduce_xml): Remove.
4999 (reduce_token_unused_in_grammar): New.
5000 (reduce_nonterminal_useless_in_grammar): New.
5001 * src/reduce.h (reduce_xml): Remove prototype.
5002 (reduce_token_unused_in_grammar): Add prototype.
5003 (reduce_nonterminal_useless_in_grammar): Add prototype.
5004 * data/xslt/xml2text.xsl: Update for XML changes.
5005 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5006 * tests/reduce.at (Useless Terminals): Update output.
5007 (Useless Rules): Update output.
5008 (Reduced Automaton): Update output.
5009
5010 Say "Terminals unused in grammar" instead of "Unused terminals".
5011 * NEWS (2.3a+): Update.
5012 * doc/bison.texinfo (Understanding): Update example output.
5013 * src/reduce.c (reduce_output): Implement.
5014 * data/xslt/xml2text.xsl: Implement.
5015 * data/xslt/xml2xhtml.xsl: Implement.
5016
5017 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5018
5019 Accept --report-file=FILE to override the default `.output' filename.
5020 * NEWS (2.3a+): Mention.
5021 * doc/bison.texinfo (Bison Options): Add an entry.
5022 * src/files.c (compute_output_file_names): Don't override
5023 spec_verbose_file if already set.
5024 * src/getargs.c (usage): Document --report-file.
5025 (REPORT_FILE_OPTION): New anonymous enum member.
5026 (long_options): Add entry for it.
5027 (getargs): Add case for it setting spec_verbose_file.
5028
5029 * build-aux/cross-options.pl: Don't record a short option just because
5030 there's an arg.
5031 * doc/.cvsignore: Add yacc.1.
5032
5033 2007-11-14 Akim Demaille <akim@epita.fr>
5034
5035 * doc/yacc.1.in: New.
5036 * configure.ac, doc/Makefile.am: Adjust.
5037 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5038 config.h symbol.
5039 Use AC_SUBST for assignments too.
5040 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5041
5042 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5043
5044 * src/gram.c: Remove comments that duplicate comments in gram.h.
5045
5046 When reporting useless rules and nonterminals, say "useless in grammar"
5047 instead of "useless", and say "useless in parser" instead of "never
5048 reduced". Discussed starting at
5049 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5050 * NEWS (2.3a+): Mention this change.
5051 * data/xslt/xml2text.xsl: Update output text and expected input XML
5052 element names to match changes below.
5053 * data/xslt/xml2xhtml.xsl: Likewise.
5054 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5055 Contents: "Rules useless in parser due to conflicts".
5056 * doc/bison.texinfo (Decl Summary): Reword a little.
5057 (Understanding): Update example output for changes below.
5058 * src/gram.c: (rule_useful_p): Rename to...
5059 (rule_useful_in_grammar_p): ... this.
5060 (rule_useless_p): Rename to...
5061 (rule_useless_in_grammar_p): ... this.
5062 (rule_never_reduced_p): Rename to...
5063 (rule_useless_in_parser_p): ... this.
5064 (grammar_rules_print): Update for renames.
5065 (grammar_rules_print_xml): Update for renames.
5066 (grammar_rules_never_reduced_report): Rename to...
5067 (grammar_rules_useless_report): ... this since it is used for either
5068 kind of useless rule.
5069 * src/gram.h: Reword comments and update function names in prototypes.
5070 * src/main.c (main): Say "rule useless in parser due to conflicts".
5071 * src/print-xml.c (print_rules_never_reduced): Rename to...
5072 (print_rules_useless_in_parser): ... this, and rename output XML
5073 element "rules-never-reduced" to "rules-useless-in-parser".
5074 (print_xml): Update for rename.
5075 * src/print.c (print_results): Say "Rules useless in parser due to
5076 conflicts".
5077 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5078 (nonterminals_reduce): Say "nonterminal useless in grammar".
5079 (reduce_output): Say "Nonterminals useless in grammar".
5080 Say "Rules useless in grammar".
5081 (reduce_xml): Rename output XML element "useless" to
5082 "useless-in-grammar".
5083 (reduce_print): Don't report the count of grammatically useless rules
5084 as "rules never reduced" just because %yacc is specified.
5085 In the correct report of this count, say nonterminal(s) and rule(s)
5086 "useless in grammar".
5087 * tests/conflicts.at (S/R in initial): Update expected output.
5088 (Defaulted Conflicted Reduction): Likewise.
5089 (Unreachable States After Conflict Resolution): Likewise.
5090 * tests/existing.at (GNU pic Grammar): Likewise.
5091 * tests/reduce.at (Useless Nonterminals): Likewise.
5092 (Useless Rules): Likewise.
5093 (Reduced Automaton): Likewise.
5094 (Underivable Rules): Likewise.
5095 (Empty Language): Likewise.
5096
5097 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5098
5099 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5100 here document and before the EOF so that BSD's implementation of Bourne
5101 shell doesn't parse the delimiter as part of the here document.
5102 * doc/.cvsignore: Add cross-options.texi.
5103 * src/getargs.c (usage): Add a blank line after the warning categories.
5104
5105 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
5106
5107 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5108
5109 2007-11-05 Akim Demaille <akim@epita.fr>
5110
5111 Remove Id: from bison.1.
5112 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5113 (perl -0777 -pi -e 's/\.PP\nId): New.
5114 (.x.1): Use it to ignore the version control revision.
5115
5116 2007-11-05 Akim Demaille <demaille@gostai.com>
5117
5118 * build-aux/Makefile.am: Ship cross-options.pl.
5119 * doc/Makefile.am: Always refer to cross-options.texi with
5120 $(srcdir).
5121 (MAINTAINERCLEANFILES): Add it.
5122
5123 2007-11-04 Akim Demaille <demaille@gostai.com>
5124
5125 Generate the long/short option cross-table.
5126 * build-aux/cross-options.pl: New.
5127 * doc/Makefile.am (cross-options.texi): New.
5128 * doc/bison.texinfo: Use it.
5129
5130 2007-11-04 Akim Demaille <demaille@gostai.com>
5131
5132 Generate bison.1 using help2man.
5133 * doc/common.x, doc/bison.x: New.
5134 * doc/Makefile.am (bison.1, .x.1): New.
5135 The code is taken from autoconf-2.61/man/Makefile.am.
5136 * configure.ac: Look for help2man.
5137
5138 2007-11-04 Akim Demaille <demaille@gostai.com>
5139
5140 Complete --help.
5141 * src/getargs.c (usage): Document -W, make it clear that -d,
5142 -g and -x have optional arguments.
5143
5144 2007-11-04 Akim Demaille <demaille@gostai.com>
5145
5146 Find sha1sum when named gsha1sum.
5147 * bootstrap (find_tool): New.
5148 ($SHA1SUM): New.
5149
5150 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5151
5152 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5153 at
5154 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5155 * NEWS (2.3a+): Mention.
5156 * data/bison.m4 (b4_pure_if): Don't define it here.
5157 * data/c.m4 (b4_identification): Depend on individual skeletons to
5158 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5159 values of the %define variables api.pure or api.push_pull. Define
5160 YYPURE, YYPUSH, and YYPULL accordingly.
5161 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5162 glr.cc has already defined b4_pure_flag.
5163 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5164 Remove YYPUSH and YYPULL since they're back in b4_identification again.
5165 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
5166 * doc/bison.texinfo (Pure Decl): Update.
5167 (Push Decl): Update.
5168 (Decl Summary): Add api.pure to %define entry.
5169 In %pure-parser entry, say it's deprecated and reference %define.
5170 (Pure Calling): Update.
5171 (Error Reporting): Update.
5172 (C++ Scanner Interface): Update.
5173 (How Can I Reset the Parser): Update.
5174 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5175 reference %define.
5176 * src/getargs.c (pure_parser): Remove global variable.
5177 * src/getargs.h (pure_parser): Remove extern.
5178 * src/output.c (prepare): Don't define pure_flag muscle.
5179 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5180 wrapper around `%define api.pure'.
5181 * tests/calc.at (Simple LALR Calculator): Update.
5182 (Simple GLR Calculator): Update.
5183 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5184 Update.
5185 (GLR: Resolve ambiguity, pure, locations): Update.
5186 (GLR: Merge conflicting parses, pure, no locations): Update.
5187 (GLR: Merge conflicting parses, pure, locations): Update.
5188 * tests/glr-regression.at (Uninitialized location when reporting
5189 ambiguity): Update
5190 * tests/input.at (Unused %define api.pure): New test case.
5191 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5192 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5193 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5194
5195 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5196
5197 %define push_pull -> %define api.push_pull. Discussed starting at
5198 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5199 * data/push.c: Expect the new name.
5200 * data/yacc.c: Likewise.
5201 * doc/bison.texinfo (Push Decl): Update.
5202 (Decl Summary): Update %define entry.
5203 (Push Parser Function): Update.
5204 (Pull Parser Function): Update.
5205 (Parser Create Function): Update.
5206 (Parser Delete Function): Update.
5207 * tests/calc.at (Simple LALR Calculator): Update.
5208 * tests/input.at (%define enum variables): Update.
5209 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5210 (Push Parsing: Multiple impure instances): Update.
5211 (Push Parsing: Unsupported Skeletons): Update.
5212 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5213 (Exploding the Stack Size with Malloc): Update.
5214
5215 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5216 other entries some.
5217
5218 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5219
5220 For the XML output's terminal element, rename @number to @token-number,
5221 and add @symbol-number. In the nonterminal element, rename @number to
5222 @symbol-number. Discussed starting at
5223 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5224 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5225 renames.
5226 (xsl:template match="nonterminal"): Likewise.
5227 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5228 (xsl:template match="nonterminal"): Likewise.
5229 * src/print-xml.c (print_grammar): Implement.
5230
5231 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5232
5233 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5234 2007-10-11 change, the child elements here are items not rules.
5235 (xsl:template match="item"): New.
5236 (xsl:template match="rule"): Update for new reduced itemset.
5237 (xsl:template match="point"): Remove.
5238 (xsl:template match="empty"): For consistency with --graph, don't
5239 output "/* empty */".
5240 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5241 line-wrap, don't pass a negative value as first-line-length since this
5242 won't work with the following changes.
5243 (xsl:template name="line-wrap"): Simplify slightly.
5244 (xsl:template name="ws-search"): Eliminate recursion.
5245 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5246 set next to an item whose dot is not at the end of the RHS even if it
5247 happens to be associated with the same rule.
5248
5249 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5250
5251 Add %define lr.keep_unreachable_states.
5252 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5253 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5254 * src/main.c (main): Implement it.
5255 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5256 Extend to test it, and fix a typo.
5257
5258 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5259
5260 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
5261 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5262 the example .output text.
5263 * tests/regression.at (Extra lookahead sets in report): Improve wording
5264 of comments.
5265
5266 2007-10-17 Wojciech Polak <polak@gnu.org>
5267
5268 * src/print-xml.c (print_grammar): Renamed
5269 <terminal> and <nonterminal> attributes:
5270 "type" to "number" and "symbol" to "name".
5271 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5272 Use new attribute names.
5273 (xsl:template match="nonterminal"): Likewise.
5274 * data/xslt/xml2xhtml.xsl: Likewise.
5275
5276 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5277
5278 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5279 (Option Cross Key): Likewise.
5280
5281 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5282 next to an item whose dot is not at the end of the RHS even if it
5283 happens to be associated with the same rule.
5284 * src/print.c (print_core): Likewise.
5285 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5286 (Resolved SR Conflicts): Update output.
5287 * tests/regression.at (Extra lookahead sets in report): New test case.
5288
5289 2007-10-11 Wojciech Polak <polak@gnu.org>
5290
5291 * src/print-xml.c (print_core): Remove item set
5292 redundancy.
5293 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5294 Improve processing time. Suggested by Joel E. Denny.
5295 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5296 Write xsl:param "required" attribute as comment.
5297 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5298 (xsl:template match="rule"): Support new reduced itemset.
5299 (xsl:template match="point"): Remove.
5300 * data/xslt/xml2xhtml.xsl: Likewise.
5301
5302 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5303
5304 * src/getargs.c (version): Update copyright year.
5305
5306 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5307
5308 Make xml2dot.xsl and --graph produce the same output.
5309 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5310 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5311 escaped later.
5312 (xsl:template name="output-node"): Use the new escape template instead
5313 of the string-replace template directly.
5314 (xsl:template name="output-edge"): Likewise.
5315 (xsl:template name="escape"): New, escapes backslashes and newlines in
5316 addition to quotation marks.
5317 * src/graphviz.c (start_graph, output_node, output_edge): Add
5318 whitespace to output for legibility.
5319
5320 Make xml2text.xsl and --report produce the same output, and remove the
5321 XML "conflicts" element since a conflict summary is easily extracted
5322 from the automaton.
5323 * data/xslt/bison.xsl: New.
5324 (xsl:template match="state" mode="bison:count-conflicts): New.
5325 * data/xslt/xml2text.xsl: Import bison.xsl.
5326 (xsl:template match="bison-xml-report"): Instead of styling the
5327 "conflicts" element, style the "automaton" element with mode
5328 "conflicts". Unlike the former, the latter lists S/R and R/R
5329 conflicts for a state on the same line.
5330 (xsl:template match="conflicts"): Remove.
5331 (xsl:template match="conflict"): Remove.
5332 (xsl:template match="terminal"): Line-wrap the list of rules in which
5333 the terminal is used.
5334 (xsl:template match="nonterminal"): Likewise for nonterminals.
5335 (xsl:template match="automaton" mode="conflicts"): New.
5336 (xsl:template match="state" mode="conflicts"): New.
5337 (xsl:template name="line-wrap"): New.
5338 (xsl:template name="ws-search"): New.
5339 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5340 (xsl:template match="bison-xml-report"): Instead of styling the
5341 "conflicts" element, style the "automaton" element with mode
5342 "conflicts."
5343 (xsl:template match="conflicts"): Remove.
5344 (xsl:template match="conflict"): Remove.
5345 (xsl:template match="automaton" mode="conflicts"): New.
5346 (xsl:template match="state" mode="conflicts): New.
5347 * src/conflicts.c (conflicts_output_xml): Remove.
5348 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5349 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5350 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5351 the corresponding XSLT is easier. Also, never wrap between a word and
5352 the comma that follows it.
5353
5354 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5355
5356 Improve C++ namespace support. Discussed starting at
5357 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5358 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5359 b4_namespace_close): New macros that interpret the %define variable
5360 "namespace" so its value can contain "::" to indicate nested
5361 namespaces.
5362 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5363 the above macros.
5364 * data/lalr1.cc (b4_namespace): Likewise.
5365 * data/location.cc (b4_namespace): Likewise.
5366 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5367 inside a new table in the general %define entry. Document `%define
5368 namespace' there as well. Point the %name-prefix entry to it since it
5369 explains it more completely in the case of C++.
5370 (C++ Bison Interface): Mention `%define namespace' instead of
5371 %name-prefix.
5372 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5373 entry suffices.
5374 * tests/c++.at (Relative namespace references): New test case.
5375 (Absolute namespace references): New test case.
5376 (Syntactically invalid namespace references): New test case.
5377 * tests/input.at (C++ namespace reference errors): New test case.
5378
5379 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5380
5381 Add syncline support and location accessor to internal %define
5382 interfaces.
5383 * data/bison.m4 (b4_percent_define_get_loc): New.
5384 (b4_percent_define_get_syncline): New.
5385 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5386 (b4_percent_define_default): Record defining location as line 1 rather
5387 than 0 for the sake of synchronizing #line's, and define
5388 b4_percent_define_syncline(VARIABLE).
5389 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5390 * src/muscle_tab.c (muscle_syncline_grow): New.
5391 (muscle_code_grow): Use muscle_syncline_grow.
5392 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5393 define b4_percent_define_syncline(VARIABLE).
5394 (muscle_percent_define_get_loc): New.
5395 (muscle_percent_define_get_syncline): New.
5396 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5397 remove some unused variables.
5398 (muscle_percent_define_default): Record defining location as line 1
5399 rather than 0 for the sake of synchronizing #line's, and define
5400 b4_percent_define_syncline(VARIABLE).
5401 (muscle_percent_define_check_values): Use
5402 muscle_percent_define_get_loc.
5403 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5404 (muscle_percent_define_get_syncline): Prototype.
5405 * tests/skeletons.at (%define Boolean variables: invalid skeleton
5406 defaults): Update output for location change.
5407 (Complaining during macro argument expansion): Extend to test
5408 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
5409
5410 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
5411
5412 Fix some error-reporting macro bugs.
5413 * data/bison.m4 (b4_cat): New.
5414 (b4_error, b4_error_at): Use b4_cat to send error directives directly
5415 to stdout so they don't become arguments to other macros. Update
5416 comments and add examples.
5417 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
5418 add examples.
5419 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
5420 after printing the error directive so that M4 doesn't report subsequent
5421 problems that are induced by this problem.
5422 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
5423 instead of just in them. Recognize @\n in both places. Both expand to
5424 the empty string. Needed by b4_cat.
5425 * tests/skeletons.at (Complaining during macro argument expansion):
5426 New test case.
5427 (Fatal errors make M4 exit immediately): New test case.
5428
5429 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
5430
5431 Implement --print-datadir.
5432 * src/getargs.c (usage): Mention.
5433 (PRINT_DATADIR_OPTION): New anonymous enum member.
5434 (long_options): Add entry for it.
5435 (getargs): Add case for it calling compute_pkgdatadir.
5436 * src/output.c (output_skeleton): Encapsulate data directory
5437 computation from here...
5438 (prepare): ... and from here...
5439 (compute_pkgdatadir): ... into this new function.
5440 * src/output.h (compute_pkgdatadir): Prototype.
5441
5442 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
5443
5444 * src/print-xml.c (escape_bufs): New static global variable
5445 replacing...
5446 (xml_escape_n): ... the static local variable buf here.
5447 (print_xml): Free memory for escape_bufs.
5448 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
5449
5450 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
5451
5452 Replace `%push-parser' and `%push-pull-parser' with
5453 `%define push_pull "push"' and `%define push_pull "both"'.
5454 `%define push_pull "pull"' is the default.
5455 * doc/bison.texinfo (Push Decl, Push Parser Function,
5456 Pull Parser Function, Parser Create Function, Parser Delete Function):
5457 Update declarations.
5458 (Decl Summary, Table of Symbols): Replace %push-parser and
5459 %push-pull-parser entries with a %define push_pull entry.
5460 * data/bison.m4 (b4_percent_define_check_values): New macro.
5461 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
5462 definitions...
5463 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
5464 definitions...
5465 * data/push.c: ... to here and compute them from the value of the
5466 %define variable push_pull.
5467 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
5468 parsing requests here...
5469 * data/yacc.c: ... hack this to switch to push.c any time
5470 b4_use_push_pull_flag or the %define variable push_pull is set. This
5471 will go away when we mv push.c yacc.c.
5472 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
5473 push parsing is not supported since unused %define variables are
5474 reported anyway.
5475 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
5476 * src/muscle_tab.h (muscle_percent_define_check_values): Update
5477 comments for consistency with b4_percent_define_check_values.
5478 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
5479 muscles.
5480 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
5481 Remove.
5482 (prologue_declaration): Remove %push-parser and %push-pull-parser
5483 rules.
5484 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
5485 * tests/calc.at: Update declarations.
5486 * tests/input.at (%define enum variables): New test case.
5487 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
5488 declaration.
5489 (Push Parsing: Multiple impure instances): Update declaration.
5490 (Push Parsing: Unsupported Skeletons): New test case.
5491 * tests/torture.at (Exploding the Stack Size with Alloca): Update
5492 declaration.
5493 (Exploding the Stack Size with Malloc): Update declaration.
5494
5495 2007-09-24 Wojciech Polak <polak@gnu.org>
5496
5497 Add XSLT transformations.
5498
5499 * data/xslt/xml2dot.xsl: Transform XML into DOT.
5500 * data/xslt/xml2text.xsl: Transform XML into plain text.
5501 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
5502 * data/Makefile.am (xsltdir): New variable.
5503 (dist_xslt_DATA): Add xslt/*.xsl files.
5504
5505 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
5506
5507 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
5508 Problem reported by Wojciech Polak.
5509 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
5510 (xml_printf): Undo change I made on 21 September; that is,
5511 indent 2 spaces, not 1.
5512
5513 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
5514
5515 Pacify ./configure --enable-gcc-warnings.
5516 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
5517 `char const *' instead of `char *'.
5518 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
5519 local variable `sep'.
5520
5521 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5522
5523 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
5524 elsewhere.
5525 * src/print-xml.c: Prefer "const" after types; that's more consistent.
5526 (xml_printf): Indent just 1 space for level.
5527 (e_char, xlate_char): Remove.
5528 (xml_escape_string): Rewrite to avoid undefined behavior (used
5529 storage that was freed from the stack).
5530 (xml_escape_n): Don't bother checking for subscript error.
5531
5532 2007-09-21 Wojciech Polak <polak@gnu.org>
5533
5534 Add Bison XML Automaton Report.
5535
5536 Add support for an -x option to generate an XML report.
5537 It is not documented yet.
5538 * src/print-xml.c: New file.
5539 * src/print-xml.h: Likewise.
5540 * lib/timevar.def (TV_XML): New var.
5541 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
5542 * src/conflicts.c: Include print-xml.h.
5543 (solved_conflicts_xml_obstack): New var.
5544 (log_resolution, conflicts_solve, conflicts_free):
5545 Add support for XML report.
5546 (conflicts_output_val): New function.
5547 * src/conflicts.h (conflicts_output_val): New decl.
5548 * src/files.c (spec_xml_file): New var.
5549 (compute_output_file_names, output_file_names_free): Add XML support.
5550 * src/files.h (spec_xml_file): New decl.
5551 * src/getargs.c (xml_flag): New var.
5552 (usage, short_options, long_options, getargs): Add XML support.
5553 * src/getargs.h (xml_flag): New decl.
5554 * src/gram.c: Include print-xml.h.
5555 (rule_lhs_print_xml, rule_rhs_print_xml):
5556 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
5557 New functions.
5558 * src/gram.h: Declare external ones.
5559 * src/main.c: Include print-xml.h.
5560 (main): Add XML support.
5561 * src/reduce.c: Include print-xml.h.
5562 (reduce_xml): New function.
5563 * src/reduce.h: Declare it.
5564 * src/state.c: Include print-xml.h.
5565 (state_new): Add XML support.
5566 (state_rule_lookahead_tokens_print_xml): New function.
5567 * src/state.h: Declare it.
5568 (struct state): New member solved_conflicts_xml.
5569 * src/symtab.c (symbol_class_get_string): New function.
5570 * src/symtab.h: Declare it.
5571
5572 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5573
5574 * GNUmakefile: Switch to coreutils's version.
5575 * bootstrap: Likewise.
5576 * Makefile.cfg: Adjust to new GNUmakefile.
5577 * README-hacking: Likewise.
5578
5579 Import from gnulib:
5580
5581 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5582 Bruno Haible <bruno@clisp.org>
5583
5584 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5585 and is a script that invokes bison. Tighten the code. Add comments.
5586
5587 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
5588
5589 Spell "boolean" as "Boolean". Reported by Akim Demaille.
5590 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
5591 * doc/bison.texinfo (Decl Summary): Fix.
5592 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
5593 * tests/input.at (Boolean %define variables): Update output.
5594 * tests/skeletons.at (%define boolean variables: invalid skeleton
5595 defaults): Rename to...
5596 (%define Boolean variables: invalid skeleton defaults): ... this and
5597 update output.
5598
5599 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
5600
5601 In impure push mode, don't allow more than one yypstate to be allocated
5602 since multiple impure parsers would corrupt yynerrs.
5603 * data/push.c (yypstate_allocated): New static global variable
5604 initialized to 0.
5605 (yypull_parse): If yypstate_new returns 0, don't report it as memory
5606 exhaustion if yypstate_allocated is 1, but still return 2.
5607 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
5608 already 1. Otherwise, set it to 1.
5609 (yypstate_delete): Set it to 0.
5610 * tests/push.at (Push Parsing: Multiple impure instances): New test
5611 case.
5612
5613 2007-08-17 Bob Rossi <bob@brasko.net>
5614
5615 * doc/bison.texinfo (Push Decl): Document the push parser.
5616 (Table of Symbols): Ditto.
5617 (Pure Decl): Ditto.
5618 (Decl Summary): Ditto.
5619 (Multiple Parsers, Push Parser Function, Pull Parser Function,
5620 Parser Create Function, Parser Delete Function):
5621 Add new push parser symbols.
5622 (Table of Symbols): Document push-parser, push-pull-parser,
5623 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
5624
5625 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
5626
5627 Update to GPLv3.
5628 * doc/gpl-3.0.texi: New file.
5629 * doc/gpl.texi: Remove.
5630 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
5631 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
5632 * README-hacking, TODO, bootstrap, bootstrap.conf:
5633 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
5634 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
5635 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
5636 * data/lalr1.cc, data/lalr1.java, data/location.cc:
5637 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
5638 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
5639 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
5640 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
5641 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
5642 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
5643 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
5644 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
5645 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
5646 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
5647 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
5648 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
5649 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
5650 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
5651 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
5652 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
5653 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
5654 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
5655 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
5656 * src/complain.c, src/complain.h, src/conflicts.c:
5657 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
5658 * src/files.h, src/flex-scanner.h, src/getargs.c:
5659 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
5660 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
5661 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
5662 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
5663 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
5664 * src/print.c, src/print.h, src/print_graph.c:
5665 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
5666 * src/reduce.h, src/relation.c, src/relation.h:
5667 * src/revision.h, src/scan-code.h, src/scan-code.l:
5668 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
5669 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
5670 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
5671 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
5672 * tests/Makefile.am, tests/actions.at, tests/c++.at:
5673 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
5674 * tests/existing.at, tests/glr-regression.at:
5675 * tests/headers.at, tests/input.at, tests/java.at:
5676 * tests/local.at, tests/output.at, tests/push.at:
5677 * tests/reduce.at, tests/regression.at, tests/sets.at:
5678 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
5679 * tests/torture.at:
5680 Update to GPLv3.
5681
5682 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5683
5684 Get rid of broken %no-parser, -n, and --no-parser implementation and
5685 documentation.
5686 * TODO: Don't mention them.
5687 * doc/bison.1: Likewise.
5688 * doc/bison.texinfo (Decl Summary): Likewise.
5689 (Bison Options): Likewise.
5690 (Option Cross Key): Likewise.
5691 * src/getargs.c (no_parser_flag): Remove global variable.
5692 (usage): Don't print description of -n and --no-parser.
5693 (long_options): Remove --no-parser entry here.
5694 (getargs): Remove -n case in the switch here.
5695 * src/getargs.h (no_parser_flag): Remove extern.
5696 * tests/regression.at (Web2c Actions): Remove comment that mentions
5697 --no-parser.
5698
5699 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5700
5701 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
5702 name user variables starting with `yy'. Just pass NULL instead of a
5703 dummy local &yylval to yypush_parse.
5704 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
5705 starting with `yy'.
5706
5707 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
5708
5709 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
5710 true since it's then always used regardless of whether yyoverflow is
5711 defined. Reported by Christian Burger at
5712 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
5713 * THANKS: Add Christian Burger.
5714
5715 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5716 node names: say "Decl Summary" not "Bison Declaration Summary".
5717
5718 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
5719
5720 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
5721 determine whether this function has already complained about an invalid
5722 value for a %define boolean variable, don't check whether Bison has
5723 ever examined the value. As written, the check was a tautology.
5724 Instead, record and check for this complaint using a separate muscle.
5725
5726 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5727
5728 Fix push parsing memory leak reported by Brandon Lucia at
5729 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
5730 * THANKS: Add Brandon Lucia.
5731 * data/push.c (yypstate_delete): Free the stack if it was reallocated
5732 but the parse never completed and thus freed it.
5733 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
5734 * tests/testsuite.at: Include push.at.
5735 * test/push.at: New.
5736 (Push Parsing: Memory Leak for Early Deletion): New test case.
5737
5738 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
5739
5740 Improve handling of multiple S/R conflicts in the same state and of S/R
5741 conflicts involving multiple reductions.
5742 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
5743 set for a state here or Bison will abort if it is reassigned on a
5744 later conflicted reduction in the same state.
5745 Similarly, don't finalize and assign the solved conflicts report here
5746 or it will be lost if it is reassigned on a later conflicted reduction
5747 in the same state.
5748 (set_conflicts): Instead, assign them both here after all S/R conflicts
5749 in the state have been fully examined.
5750 * src/print.c (shift_set): Rename to...
5751 (no_reduce_set): ... this.
5752 (print_reductions): Update for rename, and add %nonassoc error action
5753 tokens to no_reduce_set so that, when printing the first remaining
5754 reduction on an error action token, the reduction is enclosed in
5755 brackets.
5756 (print_results): Update for rename.
5757 * tests/conflicts.at (Solved conflicts report for multiple reductions
5758 in a state): New test case.
5759 (%nonassoc error actions for multiple reductions in a state): New test
5760 case.
5761
5762 * src/main.c (main): Don't depend on C99 features.
5763
5764 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5765
5766 * build-aux/.cvsignore: Add compile.
5767 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
5768 uniwidth.
5769
5770 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
5771
5772 * bootstrap (slurp): Create target directories that don't exist.
5773 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
5774
5775 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5776
5777 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
5778 than item number.
5779 * closure.c (closure): Likewise.
5780 * state.h (reductions): Comment sorting of rules.
5781 (state): Comment sorting of items.
5782
5783 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
5784
5785 Fix C++ test cases after recent Gnulib changes. Discussed starting at
5786 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
5787 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
5788 definition in order to avoid Gnulib headers since we don't use config.h
5789 here.
5790 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
5791 rather than AT_DATA so that config.h is included.
5792
5793 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
5794
5795 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
5796 instead of fprintf. Guard these functions with #if YYDEBUG instead of
5797 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
5798 and so that YYFPRINTF is guaranteed to be defined here.
5799
5800 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5801
5802 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
5803 with...
5804 (muscle_percent_define_check_values): ... this more helpful function.
5805 Again, it's not used yet, but it will be.
5806 * src/muscle_tab.h: Likewise.
5807
5808 Improve some comments in parser table construction.
5809 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
5810 (generate_states): Don't mention ruleset, which is internal to closure.
5811 * src/closure.c (closure): Explain sorting of core and itemset, which
5812 is required for this function to behave correctly.
5813 * src/closure.h (closure): Mention sorting.
5814
5815 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
5816
5817 * src/lalr.c (state_lookahead_tokens_count): For code readability,
5818 move the check for disabled transitions to an aver since conflict
5819 resolution hasn't happened yet.
5820
5821 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
5822 labels a state as inconsistent just because it has error transitions.
5823 The original form of this check appeared in revision 1.1 of lalr.c,
5824 which was committed on 1991-12-21. Now (at least), changing the
5825 consistency label on such a state appears to have no useful effect in
5826 any of the places it is examined, which I enumerate below. The key
5827 point to understanding each item in this enumeration is that a state
5828 with an error transition is labelled consistent in the first place only
5829 if it has no rules, so the check cannot matter for states that have
5830 rules. (1) Labelling a state as inconsistent will cause set_conflicts
5831 to try to identify its conflicts, and a state must have *rules* to have
5832 conflicts. (2) Labelling a state as inconsistent will affect how
5833 action_row sets the default *rule* for the state. (3) Labelling a
5834 state as inconsistent will cause build_relations to add lookback edges
5835 to *rules* in that state.
5836 * src/state.h (struct state): Word the comment for member consistent
5837 more carefully.
5838
5839 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5840
5841 Don't depend on C99 features.
5842 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
5843 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
5844 * src/reader.c (check_and_convert_grammar): Fix for-loop.
5845 * src/state.c (state_mark_reachable_states): Fix for-loop.
5846 (state_remove_unreachable_states): Fix for-loop.
5847
5848 Don't widen struct state with member reachable just to temporarily
5849 record reachability. Instead, use a local bitset.
5850 * src/state.h (struct state): Remove member.
5851 * src/state.c (state_new): Don't initialize it.
5852 (state_mark_reachable_states): Rename to...
5853 (state_record_reachable_states): ... this, and use bitset.
5854 (state_remove_unreachable_states): Use bitset.
5855
5856 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
5857
5858 * src/Makefile.am (yacc): Quote target action commands properly so
5859 that the yacc script isn't corrupt. Reported by Hans Aberg at
5860 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
5861
5862 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
5863 the case of pure parsers. Reported by Frans Englich at
5864 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
5865 * THANKS: Add Frans Englich.
5866
5867 * NEWS (2.3a+): In the %code entry, reference section `Bison
5868 Declaration Summary' from the manual now since the %code summary has
5869 moved there.
5870 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5871 in the rules section must be terminated by semicolons.
5872
5873 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5874
5875 Extend the front-end API for %define variables to more completely
5876 mirror the back-end. This will be useful in the future.
5877 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5878 Update comments to mention the new front-end counterparts of these
5879 macros.
5880 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5881 for muscle_string_decode and muscle_location_decode.
5882 (muscle_string_decode): New static function.
5883 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5884 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5885 functions.
5886 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5887 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5888 implementation more closely.
5889 (muscle_percent_define_invalid_value): New function.
5890 * src/muscle_tab.h (muscle_percent_define_get,
5891 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5892 Prototype.
5893
5894 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5895
5896 * NEWS (2.3a+): Mention yesterday's state-removal change.
5897 (2.3a): Remove the %language entry, which was added after 2.3a.
5898 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5899 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5900 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5901 tests/existing.at: Update copyright date.
5902
5903 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5904
5905 If conflict resolution makes states unreachable, remove those states,
5906 report rules that are then unused, and don't report conflicts in those
5907 states.
5908 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5909 New global function.
5910 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5911 function.
5912 * src/main.c (main): After conflict resolution, remove the unreachable
5913 states and update all data structures that reference states by number.
5914 * src/state.c (state_new): Initialize each state's reachable member to
5915 false.
5916 (state_mark_reachable_states): New static function.
5917 (state_remove_unreachable_states): New global function.
5918 * src/state.h (struct state): Add member bool reachable.
5919 (state_remove_unreachable_states): Prototype.
5920 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5921 New test case.
5922 * tests/existing.at (GNU pic Grammar): Update test case output now that
5923 an unused rule is discovered.
5924
5925 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5926
5927 Minor code cleanup in parser table construction.
5928 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5929 (new_itemsets, save_reductions): Update for rename to nitemset.
5930 * src/closure.c (nritemset): Rename to...
5931 (nitemset): ... this since the "r" appears to meaningless and isn't
5932 used in the comments.
5933 (closure): Update for rename.
5934 * src/closure.h (nritemset): Update extern to...
5935 (nitemset): ... this.
5936 * src/lalr.c (LA): Fix a typo in comments.
5937 * src/print.c (print_core): Update for rename to nitemset.
5938 * src/print_graph.c (print_graph): Likewise.
5939 * src/state.h: Fix some typos in header comments.
5940
5941 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5942
5943 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5944 still sticks to ASCII. Sorry!
5945
5946 * README-hacking: New file, taken mostly from coreutils, with changes
5947 for Bison. Contains much of the contents of:
5948 * README-cvs: Remove.
5949 * bootstrap: Sync from gnulib.
5950 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5951 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5952
5953 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5954
5955 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5956 Setzer.
5957 (Java Differences): Fix some typos.
5958 * THANKS: Add Sebastian Setzer.
5959
5960 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5961
5962 * data/java.m4 (b4_single_class_if): Remove.
5963 (b4_abstract_if): Look at "%define abstract".
5964 (b4_lexer_if): New.
5965 (b4_union_name): Rename...
5966 (b4_yystype): ... to this. Map to "%define stype".
5967 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5968 b4_maybe_throws): Fix quoting.
5969 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5970 * data/lalr1.java (Lexer interface): Always define.
5971 (Lexer interface within parser class): Remove.
5972 (YYLexer class): New, used when "%code lexer" is present.
5973 (constructor): When "%code lexer" is used, pass %lex-param
5974 to the lexer constructor.
5975 (yylex, yyparse): Remove %lex-param from method invocations
5976 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5977
5978 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5979 abstract". Rename "%define union_name" to "%define stype".
5980 Rename method names according to previous patch.
5981 (Java Scanner Interface): Describe "%code lexer" instead of
5982 "%pure-parser" and "%define single_class".
5983 (Java Differences): Mention "%code lexer".
5984
5985 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5986 Include scanner here, using macros from tests/local.at.
5987 (AT_DATA_CALC_Y): Remove final argument.
5988 (_AT_CHECK_JAVA_CALC): Likewise.
5989 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5990 of %locations and %error-verbose.
5991 (main): Test with and without %lex-param.
5992 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5993 (AT_BISON_OPTION_POPDEFS): Pop it.
5994
5995 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5996
5997 DJGPP spefic issue. Inhibit the use of disallowed characters for
5998 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5999 and concern testsuite case 46.
6000 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6001 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6002 * djgpp/config.bat: Inhibit the use of disallowed characters.
6003
6004 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6005
6006 Miscellaneous %define and %code cleanup.
6007 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6008 values are interpreted.
6009 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6010 documentation a little more.
6011 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6012 muscle_percent_define_insert, muscle_percent_code_grow): New
6013 functions/macros.
6014 * src/muscle_tab.h (muscle_percent_define_insert,
6015 muscle_percent_code_grow): Prototype.
6016 * src/parse-gram.y (prologue_declaration): Use
6017 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6018 %define and %code directives.
6019
6020 Make it easy to share %define boolean variables between the front-end
6021 and back-end. Though not used yet, this will be useful in the future.
6022 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6023 Bison uses of names rather than just skeleton uses of names.
6024 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6025 b4_percent_define_skeleton_variables(VARIABLE) to
6026 b4_percent_define_bison_variables(VARIABLE).
6027 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6028 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6029 b4_percent_code_bison_qualifiers(QUALIFIER).
6030 (b4_check_user_names_wrap): Update for renames.
6031 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6032 muscle_percent_define_default): New functions mimicking
6033 b4_percent_define_flag_if and b4_percent_define_default.
6034
6035 For %define variables, report locations for invalid values and
6036 redefinitions.
6037 * data/bison.m4 (b4_percent_define_flag_if): Read
6038 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6039 value for VARIABLE.
6040 (b4_percent_define_default): Save a special location in
6041 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6042 must later be reported as invalid.
6043 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6044 functions.
6045 (muscle_percent_define_insert): Record the location of VARIABLE in
6046 muscle percent_define_loc(VARIABLE), and use it to report the previous
6047 location for a redefinition.
6048 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6049 (muscle_percent_define_default): Update like b4_percent_define_default.
6050 (muscle_grow_user_name_list): Rename to...
6051 (muscle_user_name_list_grow): ... this for consistency and use
6052 muscle_location_grow.
6053 * src/muscle_tab.h (muscle_location_grow): Prototype.
6054 * tests/input.at (%define errors): Update expected output.
6055 * tests/skeletons.at (%define boolean variables: invalid skeleton
6056 defaults): New test case.
6057
6058 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6059
6060 * src/print.c (lookahead_set, state_default_rule): Remove.
6061 (print_reductions): Replace state_default_rule invocation with
6062 equivalent use of yydefact, which was computed in token_actions in
6063 tables.c.
6064 (print_results): Don't allocate lookahead_set.
6065
6066 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
6067
6068 * data/lalr1.java: Prefix all private members with yy.
6069
6070 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6071
6072 Use YYFPRINTF instead of fprintf where appropriate. Reported by
6073 Sebastien Fricker at
6074 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6075 * THANKS: Add Sebastien Fricker.
6076 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6077 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6078 accept a variable number of arguments.
6079
6080 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6081
6082 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6083
6084 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6085
6086 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6087 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6088 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6089
6090 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6091
6092 Undo my 2007-02-07 change, switching back to the c-strcase module
6093 introduced in the 2007-02-03 change. Bruno Haible reported that
6094 the 2007-02-07 change would be dangerous in Turkish if we add a
6095 language whose name contains "i", since "i" is not lowercase "I"
6096 in Turkish.
6097 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6098 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6099 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6100 * m4/.cvsignore: Remove strcase.m4.
6101 * src/getargs.c: Revert 2007-02-07 change, as follows.
6102 Include c-strcase.h.
6103 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6104
6105 2007-02-11 Bruno Haible <bruno@clisp.org>
6106
6107 Enable the Java related testsuite tests when the only Java compiler
6108 found is a gcj < 4.3. Discussed at
6109 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6110 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6111
6112 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6113
6114 * data/Makefile.am: Update copyright date.
6115 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6116 yypstate_new returns NULL.
6117 (yypstate_new): Return NULL if malloc does.
6118 * src/reader.c (packgram): Move translation of rule actions from the
6119 beginning of packgram to...
6120 (check_and_convert_grammar): ... here right before packgram is invoked
6121 so it's easier to write more complete comments, and remove redundant
6122 code.
6123
6124 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6125
6126 As in semantic actions, make @$ in %initial-action, %destructor, and
6127 %printer imply %locations.
6128 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6129 scanning @$.
6130 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6131 (@$ in %initial-action implies %locations,
6132 @$ in %destructor implies %locations,
6133 @$ in %printer implies %locations): ... these new test cases.
6134
6135 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6136
6137 Undo most of the 2007-02-03 change, switching to the strcase module
6138 now that gnulib strcase has been fixed.
6139 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6140 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6141 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6142 * m4/.cvsignore: Add strcase.m4.
6143 * src/getargs.c: Revert 2007-02-03 change, as follows.
6144 Don't include c-strcase.h.
6145 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6146 strcasecmp has "unspecified behavior" outside the POSIX locale,
6147 but it works fine in practice if at least one argument is ASCII,
6148 as is the case in Bison.
6149
6150 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
6151
6152 * tests/java.at: Skip tests if only one of javac/java is present.
6153 Reported by Joel E. Denny.
6154 * tests/atlocal.in: Adjust copyright years.
6155
6156 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6157
6158 * data/lalr1.java (Stack): Work around old verifiers that disallow
6159 access to the private fields of an inner class, from the outer class.
6160 We can make Stack's fields public because user code doesn't have access
6161 to the instance of Stack used by parse(). Reported by Paul Eggert.
6162
6163 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6164
6165 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6166 the right spot for these files?
6167 * bootstrap.conf (gnulib_modules): Add c-strcase.
6168 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6169 c-strncasecmp.c.
6170 * src/getargs.c: Include c-strcase.h.
6171 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6172 to avoid unspecified behavior.
6173
6174 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6175
6176 * doc/bison.texinfo (Decl Summary): Correct typo.
6177
6178 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
6179
6180 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6181 Complain if the value does not match empty, "true" or "false".
6182 * data/c++.m4: Adjust default definitions of %define variables.
6183 * data/java.m4: Adjust default definitions of %define variables.
6184 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6185 to above behavior.
6186 * tests/input.at (Boolean %define variables): Test new behavior.
6187
6188 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
6189
6190 * NEWS: Mention java.
6191 * TODO: Remove things that are done.
6192 * bootstrap.conf: Add javacomp-script and javaexec-script.
6193 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6194
6195 * data/Makefile.am: Add new files.
6196 * data/java-skel.m4: New.
6197 * data/java.m4: New.
6198 * data/lalr1.java: New.
6199
6200 * doc/bison.texinfo: Put "A Complete C++ Example" under
6201 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6202 under Other Languages.
6203
6204 * src/getargs.c (valid_languages): Add Java.
6205 * src/getargs.h (struct bison_language): Update size of string fields.
6206
6207 * tests/Makefile.am: Add java.at.
6208 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6209 * tests/java.at: New.
6210 * tests/testsuite.at: Include it.
6211
6212 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6213
6214 Clean up.
6215 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6216 at_directive_argv arguments so these no longer have to be global
6217 variables. Also, update the implementation for the following changes.
6218 (fail_for_at_directive_too_many_args,
6219 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6220 (at_directive_name): Remove as at_directive_argv[0] will be used for
6221 this now.
6222 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6223 for the directive name.
6224 (at_directive_argc, at_directive_argv): Make these local within
6225 skel_lex instead of global.
6226 (INITIAL): Update directive start action for above changes.
6227 (SC_AT_DIRECTIVE_ARG): Rename to...
6228 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6229 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6230 (scan_skel): Move yylex_destroy to...
6231 (skel_scanner_free): ... here.
6232 * tests/skeletons.at (installed skeleton file name): Rename to...
6233 (installed skeleton file names): ... this.
6234
6235 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6236
6237 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6238 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6239 Summary" not "Directives".
6240 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6241 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6242 since the former is now the more complete one.
6243 (Prologue Alternatives): Likewise and do the same for %defines.
6244 (Table of Symbols): Add summary of %code, add summary of %define, and
6245 move full %code documentation to...
6246 (Decl Summary): ... here for consistency with other entries in these
6247 sections.
6248 Move %define entry in order to keep this list alphabetized.
6249 Reword %define entry a little to put less emphasis on the skeleton
6250 concept, which most users shouldn't have to think about.
6251
6252 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6253
6254 Adjust to recent gnulib changes.
6255 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6256 Add string.h, string_.h, unistd_.h, wchar_.h.
6257 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6258 * src/system.h: Don't include <stpcpy.h>; this is now done by
6259 <string.h>.
6260
6261 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
6262
6263 Simplify implementation of unqualified %code, implement macros for
6264 uniform treatment of boolean %define flags. Document %define.
6265 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6266 b4_percent_code_ifdef): New.
6267 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6268 * data/c++.m4: Define default value for global_tokens_and_yystype.
6269 * data/glr.cc: Likewise.
6270 * data/location.cc: Use b4_percent_define_flag_if.
6271
6272 * doc/bison.texinfo (Decl Summary): Document %define.
6273
6274 * src/parse-gram.y (Unqualified %code): Change muscle name to
6275 b4_percent_code().
6276 (content.opt): Default to empty.
6277
6278 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6279
6280 Implement support for relative and absolute skeleton file names.
6281 Discussed starting at
6282 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6283 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6284 (Bison Options): Document in --skeleton entry.
6285 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6286 full_skeleton can't necessarily hold all of pkgdatadir.
6287 If the specified skeleton file name contains a `/', don't prepend
6288 pkgdatadir.
6289 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6290 file name contains a `/', prepend the grammar file directory.
6291 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6292 * skeletons.at: New file.
6293 (relative skeleton file names): New test case.
6294 (installed skeleton file names): New test case.
6295 * tests/testsuite.at: Include skeletons.at.
6296
6297 * bootstrap: Update copyright to 2007.
6298
6299 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
6300
6301 * bootstrap: Remove occurrences of .#bootmp from the files.
6302
6303 2007-01-17 Akim Demaille <akim@epita.fr>
6304
6305 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6306 nonterminals.
6307 Use per-type %printer.
6308
6309 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6310
6311 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6312 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6313 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6314 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6315 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6316 tests/glr-regression.at, tests/input.at, tests/local.at,
6317 tests/output.at, tests/torture.at: Update copyright to 2007.
6318
6319 2007-01-16 Akim Demaille <akim@epita.fr>
6320
6321 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6322 error code.
6323 (Calc++ Scanner): Exit with failure if we can't open the input
6324 file.
6325 Accept "-" standing for stdin.
6326 (Calc++ Top Level): Print the result only if the parsing was
6327 successful.
6328
6329 2007-01-16 Akim Demaille <akim@epita.fr>
6330
6331 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6332
6333 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
6334 and Joel E. Denny <jdenny@ces.clemson.edu>
6335
6336 Clean up %define and %code implementation in M4 some. Most
6337 importantly, rename all related macros to be in the b4_percent_define
6338 and b4_percent_code namespaces. Also, complete support for `.' in
6339 %define variable names and %code qualifiers.
6340 * data/bison.m4 (b4_check_user_names): Check for special
6341 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6342 m4_foreach loops.
6343 (b4_get_percent_define, b4_get_percent_code): Rename to...
6344 (b4_percent_define_get, b4_percent_code_get): ... these.
6345 Extend documentation with examples.
6346 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6347 b4_percent_define_skeleton_variables and
6348 b4_percent_code_skeleton_qualifiers.
6349 Expect any value for the %define variable `foo' to be stored in the
6350 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6351 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6352 expect any unqualified %code blocks to be stored in a macro named
6353 `b4_percent_code_unqualified'.
6354 Use m4_indir so that %define variable names and %code qualifiers can
6355 contain `.', which is allowed by the grammar parser.
6356 (b4_percent_define_default): New macro to set a default value for a
6357 %define variable.
6358 (m4_wrap): Update wrapped code, and fix some underquoting.
6359 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6360 Expect grammar uses of %define variables and %code qualifiers to be
6361 defined in b4_percent_define_user_variables and
6362 b4_percent_code_user_qualifiers.
6363 * data/c++.m4: Use b4_percent_define_default rather than
6364 m4_define_default. Fix some underquoting. Skeleton usage of %define
6365 variable define_location_comparison now implies skeleton usage of
6366 %define variable filename_type.
6367 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6368 data/push.c, data/yacc.c: Update macro names.
6369 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6370 muscle names.
6371
6372 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6373
6374 DJGPP specific issues.
6375
6376 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6377 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6378
6379 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6380
6381 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6382 run parsers in all tests so that Valgrind is invoked during
6383 maintainer-check-valgrind.
6384 (Duplicate representation of merged trees): Free all semantic values.
6385 (Duplicated user destructor for lookahead): Likewise.
6386
6387 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6388
6389 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6390 command-line prefix.
6391 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6392 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6393 miss Valgrind messages.
6394 (Exploding the Stack Size with Malloc): Likewise.
6395
6396 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6397
6398 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6399 locals. Reported by Juan Manuel Guerrero at
6400 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6401 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6402 Fix some indentation also.
6403 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6404 explaining this issue.
6405
6406 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
6407 and Joel E. Denny <jdenny@ces.clemson.edu>
6408
6409 Simplify union and prologue handling, and escape union and lex/parse
6410 params with digraphs.
6411 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
6412 values to the empty string since these are no longer guaranteed
6413 initialized by the front-end.
6414 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
6415 braces around b4_user_stype since this is no longer done by the
6416 front-end.
6417 * src/files.c, src/files.h (pre_prologue_obstack,
6418 post_prologue_obstack): Remove.
6419 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
6420 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
6421 with digraphs. This fixes lex params and parse params.
6422 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
6423 * src/output.c (prepare): Remove muscle insertion of the prologues.
6424 (output): Remove freeing of pre_prologue_obstack and
6425 post_prologue_obstack.
6426 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
6427 than prologue_augment for prologue parsing so you don't need prologue
6428 obstacks.
6429 (grammar_declaration): For %union RHS, use `braceless' instead of
6430 "{...}" so that braces are already stripped and code is escaped with
6431 digraphs.
6432 * src/reader.c (prologue_augment): Remove.
6433 (reader): Remove initialization of pre_prologue_obstack and
6434 post_prologue_obstack.
6435 * src/reader.h (prologue_augment): Remove.
6436
6437 * data/c.m4: Remove stray parenthesis.
6438
6439 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6440
6441 Remove quotes from variables names in %define directives and from
6442 qualifiers in %code directives, and restrict the characters that are
6443 allowed in them to M4-friendly ones. For %define, continue to support
6444 the quoted form as a deprecated feature. Discussed starting at
6445 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
6446 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
6447 %code.
6448 * doc/bison.texinfo (Prologue Alternatives): Update.
6449 (Decl Summary): In %defines entry, update mention of `%code requires'
6450 and `%code provides'.
6451 (C++ Location Values): Update %define uses.
6452 (Calc++ Parser Interface): Likewise.
6453 (Calc++ Parser): Likewise, and update `%code requires' uses.
6454 (Table of Symbols): Update %code documentation.
6455 * src/parse-gram.y (prologue_declaration): For %define variables, use
6456 `variable' instead of `STRING'.
6457 (grammar_declaration): For %code qualifiers, use `ID' instead of
6458 `STRING'.
6459 (variable): New nonterminal that takes an `ID' or a `STRING'.
6460 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
6461 and %define uses.
6462 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
6463 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
6464 (%define errors): Update %define uses.
6465
6466 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6467
6468 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
6469 instead of muscle_insert for %define values so that M4-special
6470 characters are replaced with digraphs.
6471 * tests/input.at (%define errors): Extend to check weird values.
6472
6473 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6474
6475 Instead of having skeletons declare all valid %define variables and
6476 %code qualifiers, provide macros that retrieve the associated values
6477 and build these lists automatically. Thus Bison will now warn when a
6478 variable or qualifier is not used by the skeleton in the current
6479 invocation regardless of whether it might sometimes be used by that
6480 skeleton in other invocations. Also, move all %define value macros to
6481 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
6482 form, which is replaced by %code.
6483 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
6484 (b4_check_user_names): ... this, and change the series of valid name
6485 arguments to a single list argument for names used in the skeleton
6486 similar to the existing list argument for names used in the grammar.
6487 Warn instead of complaining.
6488 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
6489 values and %code code, to format %code code properly, and to build
6490 lists of all %define variables and %code qualifiers used in the
6491 skeleton: b4_skeleton_percent_define_variables and
6492 b4_skeleton_percent_code_qualifiers.
6493 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
6494 Remove, and...
6495 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
6496 the skeleton names lists can finish building first. In place of
6497 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
6498 expect the lists b4_user_percent_define_variables and
6499 b4_user_percent_code_qualifiers.
6500 * data/c++.m4: Where setting default values for b4_parser_class_name,
6501 b4_location_type, b4_filename_type, b4_namespace, and
6502 b4_define_location_comparison, update their names to the
6503 b4_percent_define_ namespace.
6504 * data/glr.c: Don't use b4_check_percent_define_variables and
6505 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6506 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
6507 (b4_parser_class_name, b4_namespace): Define these using
6508 b4_get_percent_define for parser_class_name and namespace.
6509 * data/location.cc: Use b4_get_percent_define.
6510 * data/push.c: Don't use b4_check_percent_define_variables and
6511 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6512 * data/yacc.c: Likewise, and don't call m4_exit in
6513 b4_use_push_for_pull_if or m4_wrap code will never execute.
6514 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
6515 Rename to...
6516 (muscle_grow_user_name_list): ... this for consistency with the
6517 terminology used in bison.m4.
6518 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
6519 %define variable names, and rename muscle used_percent_define_variables
6520 to user_percent_define_variables.
6521 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
6522 user_percent_code_qualifiers.
6523 (content): Remove.
6524 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
6525 {CODE} form is no longer accepted.
6526 * tests/input.at (Reject bad %code qualifiers): Rename to...
6527 (Reject unused %code qualifiers): ... this, and update test output.
6528 (%define error): Update test output.
6529
6530 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
6531
6532 Check for unrecognized %define variables similar to checking for
6533 unrecognized %code qualifiers. Check for redefined %define variables.
6534 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
6535 generalizes...
6536 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
6537 (b4_check_percent_define_variables): New, also wraps it.
6538 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
6539 variables using b4_check_percent_define_variables.
6540 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
6541 all those exercised in the test suite and all those listed in the
6542 `Default values' section of c++.m4. Are there others?
6543 * data/push.c, data/yacc.c: Declare no valid %define variables.
6544 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
6545 similar to muscle_find, but it works even when the muscle stores a
6546 const value.
6547 (muscle_grow_used_name_list): New function for constructing the used
6548 name list muscles that b4_check_for_unrecognized_names requires.
6549 * src/parse-gram.y (prologue_declaration): Warn if a variable is
6550 %define'd more than once. Define the b4_used_percent_define_variables
6551 muscle with muscle_grow_used_name_list.
6552 (grammar_declaration): Abbreviate %code code with
6553 muscle_grow_used_name_list.
6554 * tests/input.at (%define errors): New.
6555
6556 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6557
6558 Provide warn_at, complain_at, and fatal_at function callbacks to the
6559 skeletons, and use this for %code qualifier complaints.
6560 * data/bison.m4 (b4_error_at): New, invoked by...
6561 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
6562 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
6563 @fatal_at(...@) directives.
6564 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
6565 qualifiers in b4_used_percent_code_qualifiers and to use
6566 b4_complain_at.
6567 * src/location.c, src/location.h (boundary_set_from_string): New global
6568 function.
6569 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
6570 function.
6571 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
6572 to b4_used_percent_code_qualifiers.
6573 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
6574 function.
6575 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
6576 (lineno): Rename to...
6577 (out_lineno): ... this so I don't misunderstand it again.
6578 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
6579 here; these newlines are in the input but not the output file.
6580 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
6581 (at_directive_perform): ... this new static function, and add handling
6582 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
6583 directives.
6584 * tests/input.at (Reject bad %code qualifiers): Update test output with
6585 locations and extend.
6586
6587 * tests/output.at (Output file name: [, Output file name: ]): Remove
6588 bogus comment about these tests failing.
6589
6590 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6591
6592 Clean up b4_check_percent_code_qualifiers a little.
6593 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
6594 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
6595 documentation and add examples.
6596 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
6597 qualifiers here.
6598
6599 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6600
6601 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
6602 unreliable -- especially when they're hidden inside another macro.
6603 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
6604 data/c.m4: Remove m4_divert(-1).
6605 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6606 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
6607 m4_divert_push(0) and m4_divert_pop(0).
6608 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
6609 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
6610 pushed and popped by m4sugar, should be first on the stack.
6611
6612 Provide warn, complain, and fatal function callbacks to the skeletons.
6613 This provides more flexibility than m4_fatal, improves the error
6614 message format, and captures messages for translation. Discussed
6615 starting at
6616 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
6617 * data/bison.m4 (b4_error): New, invoked by...
6618 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
6619 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
6620 directives. Because these M4 macros might be called when the current
6621 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
6622 the previous removal of uses of m4_divert, which caused trouble.
6623 (b4_check_percent_code_qualifiers): Use b4_complain instead of
6624 m4_fatal to report unrecognized %code qualifiers.
6625 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
6626 push parser requests.
6627 * data/glr.c: Use b4_complain instead of m4_fatal to report
6628 non-deterministic push parser requests.
6629 Update @output usage to @output(...@) form.
6630 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
6631 report missing %defines. Update @output usage to @output(...@) form.
6632 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
6633 @output(...@) form.
6634 * src/main.c (main): Invoke skel_scanner_free.
6635 * src/scan-skel.h (skel_scanner_free): Prototype new function.
6636 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
6637 obstack_for_string from flex-scanner.h.
6638 (YY_DECL): Use to declare skel_lex static.
6639 (decode_at_digraphs): Remove; now handled in the new
6640 SC_AT_DIRECTIVE_ARG start condition.
6641 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
6642 functions.
6643 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
6644 at_directive_argv): New static globals.
6645 (INITIAL): Use fail_for_invalid_at.
6646 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
6647 recognize the start of a generalized `@directive(...@)' form and
6648 start...
6649 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
6650 directive args (using the new obstack_for_string), to decode the
6651 contained @ diagraphs, and to perform the directive. It recognizes
6652 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
6653 @output(...@).
6654 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
6655 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
6656 `@,'.
6657 (scan_skel): Initialize obstack_for_string on the first call.
6658 (skel_scanner_free): New function to free obstack_for_string.
6659 * tests/input.at (Reject bad %code qualifiers): Update test output.
6660
6661 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
6662
6663 Consolidate the 4 prologue alternative directives (%code, %requires,
6664 %provides, and %code-top) into a single %code directive with an
6665 optional qualifier field. Discussed at
6666 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
6667 * NEWS (2.3a+): Rewrite the existing entry for the prologue
6668 alternatives.
6669 * doc/bison.texinfo (Prologue Alternatives): Update.
6670 (Decl Summary): Update to %code "requires" and %code "provides".
6671 (Calc++ Parser): Update to %code "requires".
6672 (Table of Symbols): Remove entries for %requires, %provides, and
6673 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
6674 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
6675 are replaced by b4_percent_code_provides and b4_percent_code_requires,
6676 which are skeleton-specific.
6677 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
6678 declare what %code qualifiers it supports and to complain if any other
6679 qualifiers were used in the grammar.
6680 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
6681 and b4_user_code([b4_percent_code_provides]) in place of
6682 b4_user_requires and b4_user_provides.
6683 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
6684 Add b4_user_code([b4_percent_code_top]) and
6685 b4_user_code([b4_percent_code]).
6686 Invoke b4_check_percent_code_qualifiers.
6687 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6688 PERCENT_REQUIRES): Remove.
6689 (grammar_declaration): Remove RHS's for %code-top, %provides, and
6690 %requires. Rewrite the %code RHS as the unqualified form defining the
6691 muscle b4_percent_code. Add another RHS for the qualified %code form,
6692 which defines muscles of the form b4_percent_code_QUALIFIER and the
6693 b4_used_percent_code_qualifiers muscle.
6694 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6695 PERCENT_REQUIRES): Remove.
6696 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
6697 %code "requires" and %code "provides".
6698 * tests/input.at (Reject bad %code qualifiers): New.
6699
6700 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6701
6702 Use the new code_props interface for destructors and printers.
6703 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
6704 printer_location members, and change the type of the destructor and
6705 printer members to code_props.
6706 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
6707 symbol_printer_get, semantic_type_destructor_set,
6708 semantic_type_printer_set, default_tagged_destructor_set,
6709 default_tagless_destructor_set, default_tagged_printer_set,
6710 default_tagless_printer_set): Use code_props in arguments and return
6711 types in place of char const * and location.
6712 (symbol_destructor_location_get, symbol_printer_location_get): Remove
6713 since the locations are now contained in the return of
6714 symbol_destructor_get and symbol_printer_get.
6715 * src/output.c (symbol_destructors_output, symbol_printers_output):
6716 Replace with...
6717 (symbol_code_props_output): ... this to eliminate duplicate code.
6718 (output_skeleton): Update to use symbol_code_props_output.
6719 * src/reader.c (symbol_should_be_used): Update use of
6720 symbol_destructor_get.
6721 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6722 Update uses of the various _destructor_set and _printer_set functions.
6723 * src/symtab.c: (default_tagged_destructor_location,
6724 default_tagless_destructor_location, default_tagged_printer_location,
6725 default_tagless_printer_location): Remove since we...
6726 (default_tagged_destructor, default_tagless_destructor,
6727 default_tagged_printer, default_tagless_printer): ... change the type
6728 of these to code_props.
6729 (symbol_new, semantic_type_new, symbol_destructor_set,
6730 semantic_type_destructor_set, symbol_destructor_get,
6731 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
6732 symbol_check_alias_consistency, default_tagged_destructor_set,
6733 default_tagless_destructor_set, default_tagged_printer_set,
6734 default_tagless_printer_set): Update.
6735 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
6736 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
6737 code_props members.
6738 (symbol_print): Use SYMBOL_CODE_PRINT.
6739
6740 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6741
6742 Use the new code_props interface for rule actions.
6743 * src/symlist.h (symbol_list): Replace action, action_location, and
6744 used members with a code_props action_props member.
6745 * src/reader.c (symbol_should_be_used, grammar_rule_check,
6746 grammar_midrule_action, grammar_current_rule_merge_set,
6747 grammar_current_rule_symbol_append, packgram): Update.
6748 * src/scan-code.h (translate_rule_action): Remove, no longer used.
6749 * src/scan-code.l (handle_action_dollar): Update.
6750 (translate_rule_action): Remove, no longer used.
6751 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
6752
6753 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6754
6755 Use the new code_props interface in parse-gram.y.
6756 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
6757 Update all uses of translate_* functions to use the new code_props
6758 interface and to use gram_scanner_last_string_free and
6759 code_scanner_last_string_free where possible.
6760 (grammar_declaration): symbol_list_destructor_set and
6761 symbol_list_printer_set now perform the translation, so don't do it
6762 here. Use gram_scanner_last_string_free where possible.
6763 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
6764 translate_code): Remove, no longer used.
6765 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
6766 symbol_list_printer_set): Perform code translation here rather than
6767 depending on the caller to do so.
6768
6769 * src/symlist.h (struct symbol_list): Correct some documentation typos.
6770 * src/scan-gram.h (gram_last_string): Remove declaration.
6771 * src/scan-gram.l (last_string): Declare it static.
6772
6773 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6774
6775 Encapsulate code properties and related functionality for the various
6776 destructors, printers, and actions into a code_props structure and
6777 interface. This patch merely implements code_props in scan-code.h and
6778 scan-code.l. Future patches will rewrite other modules to use it.
6779 Discussed starting at
6780 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
6781 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
6782 consistently initialize const structs that have an empty location
6783 field.
6784 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
6785 to ensure consistency.
6786 * src/scan-code.h (code_props): New structure.
6787 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
6788 function, macro, and const global variable for initializing a
6789 code_props with no code.
6790 (code_props_plain_init, code_props_symbol_action_init,
6791 code_props_rule_action_init, code_props_translate_code): The rest of
6792 the new code_props functional interface. Among other things, the init
6793 functions set the code_props kind field so that
6794 code_props_translate_code will know whether to behave like
6795 translate_symbol_action, translate_rule_action, or translate_code.
6796 These old translate functions must remain until all other modules are
6797 updated to use the new code_props interface.
6798 (code_scanner_last_string_free): New function similar to
6799 gram_scanner_last_string_free.
6800 (code_scanner_free): Add documentation.
6801 * src/scan-code.l: Implement the new interface.
6802 (code_lex): Make it static, add a code_props* argument, and remove the
6803 rule argument.
6804 (last_string): New static global similar to the one in scan-gram.l.
6805 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
6806 instead of rule.
6807 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
6808 code_props since Bison may one day use this information for destructors
6809 and printers.
6810 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
6811 (handle_action_dollar): Use symbol_list_n_get and set used flag
6812 directly since symbol_list_n_used_set is removed.
6813 (translate_action): Add a code_props* argument and remove the rule,
6814 action, and location arguments. Pass the code_props* on to code_lex.
6815 (translate_rule_action, translate_symbol_action, translate_code):
6816 Rewrite as wrappers around the new code_props interface.
6817 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
6818 it would eventually need to break the encapsulation of code_props.
6819
6820 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6821
6822 * etc/.cvsignore: New.
6823
6824 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6825
6826 Add maintainer-push-check to run maintainer-check using push parsing in
6827 place of pull parsing where available.
6828 * Makefile.am (maintainer-push-check): New.
6829 * data/bison.m4 (b4_use_push_for_pull_if): New.
6830 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
6831 appropriately based on their existing values.
6832 (yypush_parse): Don't print push-parser-specific diagnostics if push
6833 parsing is being used in place of pull parsing.
6834 * data/yacc.c: If push parsing should replace pull parsing, redirect to
6835 push.c.
6836 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
6837 variable, and insert b4_use_push_for_pull_flag into muscles.
6838 * tests/Makefile.am (maintainer-push-check): New.
6839
6840 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6841
6842 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
6843 (whether successful or failed) so that yypush_parse can be invoked
6844 again to start a new parse using the same yypstate.
6845 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
6846 check multiple yypull_parse invocations on the same yypstate. For pull
6847 mode, extend to check multiple yyparse invocations.
6848 (Exploding the Stack Size with Alloca): Extend to try with
6849 %push-pull-parser.
6850 (Exploding the Stack Size with Malloc): Likewise.
6851
6852 * tests/calc.at (Simple LALR Calculator): Don't specify
6853 %skeleton "push.c" since %push-pull-parser implies that now.
6854 * tests/headers.at (export YYLTYPE): Don't check for the push
6855 declarations. Otherwise, this test case can't be used to see if push
6856 mode can truly emulate pull mode.
6857 * tests/input.at (Torturing the Scanner): Likewise.
6858 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
6859 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
6860 AT_YACC_IF, which now includes the case of push mode since %skeleton
6861 need not be used for push mode. This will be more intuitive once
6862 push.c is renamed to yacc.c.
6863
6864 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6865
6866 For push mode, convert yyparse from a macro to a function, invoke yylex
6867 instead of passing a yylexp argument to yypull_parse, and don't
6868 generate yypull_parse or yyparse unless %push-pull-parser is declared.
6869 Discussed starting at
6870 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6871 * data/bison.m4 (b4_pull_if): New.
6872 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6873 * data/push.c: Improve M4 quoting a little.
6874 (b4_generate_macro_args, b4_parenthesize): Remove.
6875 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6876 any time a pull parser is requested.
6877 Don't #define this as a wrapper around yypull_parse. Instead, when
6878 both push and pull are requested, make it a function that does that
6879 same thing.
6880 (yypull_parse): If there's a b4_prefix, #define this to
6881 b4_prefix[pull_parse] when both push and pull are requested.
6882 Don't define this as a function unless both push and pull are
6883 requested.
6884 Remove the yylexp argument and hard-code yylex invocation instead.
6885 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6886 %push-parser.
6887 * src/getargs.c (pull_parser): New global initialized to true.
6888 * getargs.h (pull_parser): extern it.
6889 * src/output.c (prepare): Insert pull_flag muscle.
6890 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6891 (prologue_declaration): Set both push_parser and pull_parser = true for
6892 %push-pull-parser. Set push_parser = true and pull_parser = false for
6893 %push-parser.
6894 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6895 %push-parser since there's no backward-compatibility concern here.
6896 Scan %push-pull-parser.
6897 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6898 instead of %push-parser.
6899 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6900 prototype it in the module that calls yyparse.
6901 * tests/input.at (Torturing the Scanner): Likewise.
6902 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6903
6904 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6905
6906 Update etc/bench.pl. Optimize push mode a little (the yyn change
6907 deserves most of the credit).
6908 * Makefile.am (SUBDIRS): Add etc subdirectory.
6909 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6910 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6911 yytoken, yyval, and yyloc declarations to...
6912 (yyparse or yypush_parse): ... here to improve performance. For
6913 yypush_parse invocations after the first, be sure to assign yyn its old
6914 value again.
6915 (yypstate_new): Don't bother initializing the yyresult field since the
6916 initial value isn't used.
6917 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6918 remove the #define that, in push mode, set it to yyps->NAME.
6919 * etc/Makefile.am: New.
6920 * etc/bench.pl: Remove and build it instead from...
6921 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6922 "tests/bison" from the build directory by default rather than just
6923 invoking "bison" from $PATH.
6924 (calc_grammar): Update push parser code: don't declare yylval globally,
6925 don't define yyparse_wrapper, and don't #define yyparse.
6926 (bench_grammar): Update to check all working combinations of yacc.c,
6927 push.c, impure, pure, pull, and push.
6928
6929 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6930
6931 For push mode, add pull wrappers around yypush_parse.
6932 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6933 (yypull_parse): New function wrapping yypush_parse.
6934 (yyparse): New #define wrapping yypull_parse.
6935 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6936 is declared.
6937 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6938 prototype yylex in the module that calls yyparse, and don't prototype
6939 yyparse there. Otherwise, the yyparse expansion won't compile.
6940 * tests/input.at (Torturing the Scanner): Likewise.
6941
6942 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6943
6944 Enable push parsers to operate in impure mode. Thus, %push-parser no
6945 longer implies %pure-parser. The point of this change is to move
6946 towards being able to test the push parser code by running the entire
6947 test suite as if %push-parser had been declared.
6948 * data/push.c (yypush_parse): For impure mode, remove the
6949 yypushed_char, yypushed_val, and yypushed_loc arguments.
6950 Instead, declare these as local variables initialized to the global
6951 yychar, yylval, and yylloc.
6952 For the first yypush_parse invocation only, restore the initial values
6953 of these global variables when it's time to read a token since they
6954 have been overwritten.
6955 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6956 %push-parser.
6957 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6958 %pure-parser along with %push-parser since this test case was designed
6959 for pure push parsers.
6960 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6961 (AT_YACC_OR_PUSH_IF): New.
6962 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6963 add a note that it's still wrong for some cases (as it has been for a
6964 while).
6965 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6966 %push-parser no longer implies %pure-parser.
6967
6968 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6969
6970 Remove some unnecessary differences between the pull parser code and
6971 the push parser code. This patch enables yynerrs in push mode.
6972 * data/push.c: Reformat M4 a little.
6973 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6974 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6975 because push mode is on. Instead, if pure mode is on, move yynerrs
6976 to...
6977 (b4_declare_parser_state_variables): ... here.
6978 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6979 to yyps->NAME so it can be used in yypush_parse.
6980 (yypush_parse): Don't omit uses of yynerrs in push mode.
6981
6982 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6983
6984 Fix bug such that the first pushed token's value and location are
6985 sometimes overwritten (sometimes by %initial-action) before being used.
6986 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6987 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6988 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6989 more closely mimic the pull parser logic.
6990 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6991 time to read a token, which is after any initialization of yylval and
6992 yylloc.
6993 (gottoken): Rename label to...
6994 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6995 user namespace.
6996
6997 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6998
6999 Rearrange initialization of the parser state variables so that the
7000 skeleton doesn't have to have a copy for pull mode and another for push
7001 mode. This patch also fixes at least a bug such that yylloc was not
7002 initialized (with b4_location_initial_line and
7003 b4_location_initial_column) upon calling yypush_parse. However, that
7004 initialization now overwrites the first token's location;
7005 %initial-action assigning @$ already did the same thing, and both bugs
7006 will be fixed in a later patch.
7007 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7008 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7009 yyss, yyvs, yyls, and yystacksize.
7010 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7011 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7012 yylsp.
7013 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7014 yyps->NAME so it can be used in yypush_parse.
7015 (yyparse or yypush_parse): For yypush_parse, don't print the
7016 "Starting parse" diagnostic for invocations after the first.
7017 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7018 yypush_parse, only do it for the first invocation.
7019 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7020 initialization to occur in yypush_parse but only on the first
7021 invocation.
7022
7023 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7024
7025 * data/push.c: Add CPP guards around push parser declarations in both
7026 the header and the code file.
7027 In the code file, move the push parser declarations to the same place
7028 they appear in the header file.
7029 Clean up the M4 some, especially the inconsistent underquoting in
7030 some b4_c_function_def and b4_c_function_decl uses.
7031
7032 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7033
7034 Encapsulate the push parser state variables into an M4 macro so the
7035 push skeleton doesn't have to list them again for pull mode's yyparse.
7036 For push mode, remove yypush_parse's local equivalents of these
7037 variables to eliminate unnecessary copying between the two sets at
7038 run-time. This patch also fixes at least a bug related to multiple
7039 %initial-action invocations in push mode.
7040 * data/push.c (b4_declare_parser_variables): Rename to...
7041 (b4_declare_scanner_communication_variables): ... this for clarity and
7042 update both uses.
7043 (b4_declare_yyparse_variables): Remove and move its contents to the one
7044 spot where it was invoked.
7045 (b4_declare_parser_state_variables): New macro containing the parser
7046 state variables required by push mode.
7047 (struct yypstate): Replace all fields but yynew with
7048 b4_declare_parser_state_variables.
7049 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7050 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7051 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7052 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7053 parser state variable declarations with
7054 b4_declare_parser_state_variables.
7055 Don't initialize parser state variables when calling yypush_parse since
7056 yypstate_new already does that.
7057 Invoke the user's initial action only upon the first yypush_parse
7058 invocation.
7059 Remove all code that copies between the local parser state variables
7060 and the yypstate.
7061
7062 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7063
7064 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7065 prevent a name collision in a future patch where these names will
7066 sometimes be #define'd.
7067 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7068 since it no longer has the same name as the existing argument.
7069 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7070
7071 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
7072 and Joel E. Denny <jdenny@ces.clemson.edu>
7073
7074 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7075 that the argument is case-insensitive, and there's no `=' here.
7076 For the %skeleton entry, mention that %language is better.
7077 (Bison Options): Likewise for --language and --skeleton. Move the
7078 --skeleton entry so that the `Tuning the parser' section is sorted
7079 alphabetically on long options.
7080 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7081 %language directive in detail here; cross-reference the %language
7082 documentation instead.
7083 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7084 `%require "2.3b"' so that the example is always up-to-date.
7085 (Table of Symbols): Add entries for %language and %skeleton.
7086 * examples/extexi (normalize): Instead of replacing every %require
7087 argument with the current Bison version, just substitute for
7088 `@value{VERSION}'. This guarantees that we're testing what actually
7089 appears in the documentation.
7090 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7091 rather than `@VERSION@'.
7092
7093 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7094
7095 * NEWS: Reword the %language news a bit, and put it earlier.
7096
7097 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7098 Rewrite to simplify the logic.
7099 (language_argmatch): Likewise.
7100 (program_name): We now own this var.
7101 * src/getargs.h (struct bison_language): Use char[] rather than
7102 const char *.
7103
7104 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7105 Java is supported.
7106 * src/complain.c (program_name): Remove decl; no longer needed.
7107 * src/main.c (program_name): Remove; now belongs to getargs.
7108
7109 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
7110
7111 * NEWS: Document %language.
7112
7113 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7114
7115 * data/c-skel.m4, data/c++-skel.m4: New files.
7116 * data/glr.c: Complain on push parsers.
7117
7118 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7119 over %skeleton.
7120 (Decl Summary): Document %language and %skeleton.
7121 (Command line): Document -L.
7122
7123 * examples/extexi: Rewrite %require directive.
7124 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7125
7126 * src/files.c (compute_exts_from_gc): Look in language structure
7127 for .y extension.
7128 (compute_file_name_parts): Check whether .tab should be added.
7129 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7130 (language, skeleton_arg, language_argmatch): New.
7131 (long_options): Add --language.
7132 (getargs): Use skeleton_arg, add -L/--language.
7133 * src/getargs.h: Include location.h.
7134 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7135 * src/output.c (prepare): Pick default skeleton from struct language.
7136 Don't dispatch C skeletons here.
7137 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7138 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7139 * src/scan-gram.l ("%language"): New rule.
7140
7141 * tests/calc.at: Test %skeleton and %language.
7142 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7143 (AT_GLR_IF): Look for %skeleton "glr.cc".
7144 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7145 (AT_YACC_IF): Reject %language.
7146
7147 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7148
7149 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7150 since it wasn't used; only the typedef name 'semantic_type' is needed.
7151 Also, omit trailing white space.
7152
7153 * bootstrap: Sync from coreutils.
7154 (gnulib_extra_files): Add build-aux/announce.gen.
7155 (slurp): Adjust .gitignore files like .cvsignore files.
7156 * build-aux/announce-gen: Remove from CVS, since bootstrap
7157 now creates this.
7158
7159 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7160
7161 Make %push-parser imply %pure-parser. This fixes several bugs; see
7162 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7163 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7164 pure_parser = true.
7165 * data/push.c: Don't bother testing b4_push_if when deciding whether
7166 to expand b4_declare_parser_variables globally.
7167 (yypush_parse): Likewise in here.
7168
7169 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7170 (yy_reduce_print): Reformat M4 for readability.
7171
7172 2006-12-15 Bob Rossi <bob@brasko.net>
7173 and Joel Denny <jdenny@ces.clemson.edu>
7174
7175 * data/push.c (yypstate): Add typedef, and update all uses of
7176 struct yypstate to just yypstate.
7177 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7178
7179 2006-12-14 Bob Rossi <bob@brasko.net>
7180
7181 * data/push.c (yypush_parse): Declare prototype regardless of
7182 %locations option.
7183
7184 2006-12-14 Bob Rossi <bob@brasko.net>
7185
7186 * data/push.c (yyparse): Remove the prototype and the #define when in
7187 push-parser mode.
7188
7189 2006-12-13 Bob Rossi <bob@brasko.net>
7190
7191 * data/push.c (yypstate_init): Rename to...
7192 (yypstate_new): ... this and use b4_c_function_def.
7193 (yypstate_delete): New.
7194 (yypush_parse): Change parameters yynval and yynlloc to be const.
7195 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7196 yypstate_delete functions.
7197
7198 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7199
7200 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7201 strange test case titles. Reported by Bob Rossi.
7202
7203 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7204
7205 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7206 of potential ambiguities in GLR grammers.
7207
7208 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7209
7210 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7211 `bison ', use m4_index instead of m4_substr since chopping up a string
7212 containing M4-special characters causes problems here.
7213
7214 Fix a couple of bugs related to special characters in user-specified
7215 file names, and make it easier for skeletons to compute output file
7216 names with the same file name prefix as Bison-computed output file
7217 names.
7218 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7219 b4_parser_file_name and b4_spec_defines_file instead of
7220 @output_parser_name@ and @output_header_name@, which are now redundant.
7221 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7222 b4_parser_file_name, b4_spec_defines_file, and the new
7223 @basename(FILENAME@) instead of @output_parser_name@ and
7224 @output_header_name@, which inappropriately escaped the file names as
7225 C string literals.
7226 * src/files.c (all_but_ext): Remove static qualifier.
7227 (compute_output_file_names): Move `free (all_but_ext)' to...
7228 (output_file_names_free): ... here since all_but_ext is needed later.
7229 * src/files.h (all_but_ext): Extern.
7230 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7231 exactly what MUSCLE_INSERT_STRING used to do.
7232 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7233 characters are escaped properly.
7234 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7235 all_but_ext.
7236 For pkgdatadir muscle, maintain previous functionality by using
7237 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7238 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7239 digraphs would never be expanded. Hopefully no one has M4-special
7240 characters in his Bison installation path.
7241 * src/scan-skel.l: Don't parse @output_header_name@ and
7242 @output_parser_name@ anymore since they're now redundant.
7243 In @output, use decode_at_digraphs.
7244 Parse a new @basename command that invokes last_component.
7245 (decode_at_digraphs): New.
7246 (BASE_QPUTS): Remove unused.
7247 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7248 (Output file name): New tests.
7249
7250 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7251
7252 Warn about output files that are generated by the skeletons and that
7253 conflict with other output files.
7254 * data/glr.c: Don't generate the header file here when glr.cc does.
7255 * src/files.c (file_names, file_names_count): New static globals.
7256 (compute_output_file_names): Invoke output_file_name_check for files
7257 not generated by the skeletons and remove existing checks.
7258 (output_file_name_check): New function that warns about conflicting
7259 output file names.
7260 (output_file_names_free): Free file_names.
7261 * src/files.h (output_file_name_check): Declare.
7262 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7263 the skeletons.
7264 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7265 (Conflicting output files): New tests.
7266
7267 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7268
7269 * doc/bison.texinfo: Fix a couple of typos.
7270
7271 2006-12-08 Bob Rossi <bob@brasko.net>
7272
7273 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7274 Rename to...
7275 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7276 update all uses.
7277 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7278 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7279 local pv.
7280 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7281 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7282
7283 2006-12-07 Bob Rossi <bob@brasko.net>
7284 and Joel Denny <jdenny@ces.clemson.edu>
7285
7286 * data/push.c (yypvarsinit): Change return type from void* to struct
7287 yypvars*. No longer cast to void* on return.
7288 (struct yypvars): Remove yylen since it need not be remembered between
7289 yypushparse invocations.
7290 (yypushparse): Don't copy between yylen and pv->yylen.
7291
7292 2006-12-05 Bob Rossi <bob@brasko.net>
7293
7294 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7295 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7296 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7297 (struct yypvars): Remove b4_declare_parser_variables.
7298 (yypvarsinit): Remove init code for removed variables.
7299 (global scope): Do not declare b4_declare_parser_variables if
7300 push or pure mode.
7301 (yypushparse): Add b4_declare_parser_variables.
7302 Init new local variables, and remove init code for removed
7303 yypvars variables.
7304 (yyparse): Delete.
7305 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7306 and yyparse for other modes.
7307 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7308 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7309 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7310 (AT_PURE_LEX_IF): True if pure or push parser.
7311
7312 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7313
7314 Document Yacc prologue alternatives and default %destructor's and
7315 %printer's as experimental. Don't mention Java yet. Discussed at
7316 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7317 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7318 (2.3a): Annotate this entry to say the old forms of these features were
7319 also experimental.
7320 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
7321 Table of Symbols): Say they're experimental. Comment out any mention
7322 of Java (we'll want this back eventually).
7323
7324 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7325
7326 Support a file name argument to %defines. Deprecate `=' in
7327 %file-prefix, %name-prefix, and %output. Discussed at
7328 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7329 * NEWS (2.3a+): Mention.
7330 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
7331 form of %defines, and remove `=' from entries for %file-prefix,
7332 %name-prefix, and %output.
7333 * src/parse-gram.y (prologue_declaration): Implement.
7334 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7335 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7336 all but one occurrence of %name-prefix.
7337 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7338 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7339 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7340 occurrence of each of %file-prefix and %output. Add check for %defines
7341 with argument.
7342 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7343 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7344 Remove the `=' from %output.
7345
7346 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7347
7348 Don't escape $ in test case titles since Autoconf 2.61 now does that
7349 correctly.
7350 * tests/actions.at (Default %printer and %destructor are not for error
7351 or $undefined): Here.
7352 (Default %printer and %destructor are not for $accept): Here.
7353 * tests/input.at (Invalid $n and @n): Here.
7354
7355 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7356
7357 Rename <!> to <>. Discussed starting at
7358 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7359 * NEWS (2.3a+): Update.
7360 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7361 Update.
7362 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7363 * src/scan-gram.l (INITIAL): Implement.
7364 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7365 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7366 comment.
7367 * tests/actions.at (Default tagless %printer and %destructor,
7368 Default tagged and per-type %printer and %destructor,
7369 Default %printer and %destructor are not for error or $undefined,
7370 Default %printer and %destructor are not for $accept,
7371 Default %printer and %destructor for mid-rule values): Update.
7372 * tests/input.at (Default %printer and %destructor redeclared,
7373 Unused values with default %destructor): Update.
7374
7375 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7376
7377 Don't let %prec take a nonterminal.
7378 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7379 token.
7380 * tests/input.at (%prec takes a token): New test checking that %prec
7381 won't take a nonterminal.
7382
7383 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7384
7385 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7386 it was double-quoted.
7387 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7388 grammar is maintained with Bison's highest standards.
7389 * src/getargs.c: Fix some typos in Doxygen comments.
7390
7391 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7392
7393 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7394 later. Reported by Paul Eggert in
7395 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7396 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7397 * src/scan-code.l (translate_action): Don't bother invoking
7398 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7399 (code_scanner_free): Instead of invoking
7400 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7401 which frees more.
7402 * src/scan-gram.l (gram_scanner_free): Likewise.
7403 * src/scan-skel.l (scan_skel): Likewise.
7404
7405 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
7406
7407 * src/files.c (tr): Change return type to void.
7408 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
7409 has been called previously for the same key.
7410 (muscle_find): Return storage instead of value so that
7411 --enable-gcc-warnings doesn't produce warnings that the return discards
7412 const. aver that the value and storage are the same since storage
7413 could potentially be NULL when value is not.
7414 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
7415 same as 0.
7416
7417 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7418
7419 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
7420 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
7421 us a slightly cleaner distribution, and also works.
7422 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
7423 gnulib changes.
7424
7425 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
7426 and Paul Eggert <eggert@cs.ucla.edu>
7427
7428 Don't let Bison leak memory except when it complains.
7429 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
7430 (spec_defines_file, dir_prefix): Now char *, not const char *,
7431 since they are freed.
7432 * src/files.c: Likewise.
7433 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
7434 Likewise.
7435 (tr): Now operates in-place. All uses changed.
7436 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
7437 values.
7438 (compute_file_name_parts, compute_output_file_names): Don't store
7439 read-only data in variables that will be freed.
7440 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
7441 src_extension, and header_extension.
7442 (output_file_names_free): New public function to free
7443 spec_verbose_file, spec_graph_file, spec_defines_file,
7444 parser_file_name, and dir_prefix.
7445 * src/getargs.c (getargs): Don't store read-only data in variables that
7446 will be freed.
7447 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
7448 (which previously existed but was unused), and quotearg_free.
7449 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
7450 * src/muscle_tab.c: Likewise.
7451 (muscle_entry): Make the value char const *,
7452 and add a new storage member that is char * and can be freed.
7453 (muscle_entry_free): New private function.
7454 (muscle_init): Use it instead of free.
7455 (muscle_insert, muscle_grow): Update and use new storage member.
7456 (muscle_code_grow): Free the string passed to muscle_grow
7457 since it's not needed anymore.
7458 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
7459 add a new `char *code' member.
7460 ("{...}"): Declare semantic type as code.
7461 * src/scan-code.h (translate_rule_action):
7462 (translate_symbol_action, translate_code, translate_action): Return
7463 `char const *' rather than `char *' since external code should not free
7464 these strings.
7465 * src/scan-code.l: Likewise.
7466 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
7467 which is "{...}" in the parser.
7468 * tests/Makefile.am (maintainer-check-valgrind): Set
7469 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
7470 Valgrind.
7471 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
7472 complain.
7473 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
7474 expecting a non-zero exit status sets --leak-check=summary and
7475 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
7476 this case, and we don't want to hear about it.
7477
7478 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7479
7480 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
7481 instead of from the template, to simplify configuration a bit.
7482 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
7483 and m4/wint_t.m4, as they are needed with the latest gnulib.
7484
7485 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7486
7487 Disable unset/unused mid-rule value warnings by default, and recognize
7488 --warnings=midrule-values to enable them. Discussed starting at
7489 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
7490 * NEWS (2.3a+): Mention.
7491 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
7492 warnings): Add entry for midrule-values subargument.
7493 * src/reader.c (symbol_should_be_used): Don't return true just because
7494 the value is a set/used mid-rule value unless
7495 --warnings=midrule-values was specified.
7496 * tests/input.at (Unused values, Unused values before symbol
7497 declarations): Run tests with and without --warnings=midrule-values.
7498
7499 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
7500 than LIST_FREE directly.
7501
7502 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7503
7504 Finish implementing --warnings=error, which should not be implied by
7505 --warnings=all (or by its synonyms -W and --warnings without
7506 subarguments).
7507 * src/complain.c (set_warning_issued): New function to report that
7508 warnings are being treated as errors and to record an error if so.
7509 Invoke...
7510 (warn_at, warn): ... here.
7511 * src/getargs.c (warnings_args, warnings_types): Reorder so that
7512 "error - warnings are errors" does not appear above "all - all of the
7513 above".
7514 (getargs): For -W and --warnings without subarguments, don't let
7515 FLAGS_ARGMATCH set warnings_error in warnings_flag.
7516 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
7517
7518 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7519
7520 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
7521 empty subargument list. For example: `bison --warnings= parser.y'.
7522
7523 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7524
7525 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
7526 the parser header file so that gcc doesn't warn.
7527
7528 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7529
7530 Split the default %destructor/%printer into two kinds: <*> and <!>.
7531 Discussed starting at
7532 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
7533 * NEWS (2.3a+): Mention.
7534 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
7535 previous change today related to mid-rules.
7536 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
7537 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
7538 (TYPE_TAG_ANY): Add as <*>.
7539 (TYPE_TAG_NONE): Add as <!>.
7540 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
7541 for <*> and <!>.
7542 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
7543 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
7544 * src/symlist.c (symbol_list_default_new): Split into tagged and
7545 tagless versions.
7546 (symbol_list_destructor_set, symbol_list_printer_set): Split
7547 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
7548 SYMLIST_DEFAULT_TAGLESS.
7549 * src/symlist.h: Update symbol_list_default*_new prototypes.
7550 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
7551 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
7552 * src/symtab.c (default_destructor, default_destructor_location,
7553 default_printer, default_printer_location): Split each into tagged and
7554 tagless versions.
7555 (symbol_destructor_get, symbol_destructor_location_get,
7556 symbol_printer_get, symbol_printer_location_get): Implement tagged
7557 default and tagless default cases.
7558 (default_destructor_set, default_printer_set): Split each into tagged
7559 and tagless versions.
7560 * src/symtab.h: Update prototypes.
7561 * tests/actions.at (Default %printer and %destructor): Rename to...
7562 (Default tagless %printer and %destructor): ... this, and extend.
7563 (Per-type %printer and %destructor): Rename to...
7564 (Default tagged and per-type %printer and %destructor): ... this, and
7565 extend.
7566 (Default %printer and %destructor for user-defined end token): Extend.
7567 (Default %printer and %destructor are not for error or $undefined):
7568 Update.
7569 (Default %printer and %destructor are not for $accept): Update.
7570 (Default %printer and %destructor for mid-rule values): Extend.
7571 * tests/input.at (Default %printer and %destructor redeclared): Extend.
7572 (Unused values with default %destructor): Extend.
7573
7574 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7575
7576 Don't apply the default %destructor/%printer to an unreferenced midrule
7577 value. Mentioned at
7578 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
7579 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
7580 like $@n instead of just @n so that the default %destructor/%printer
7581 logic doesn't see them as user-defined symbols.
7582 (symbol_is_dummy): Check for both forms of the name.
7583 * src/reader.c (packgram): Remove the `$' from each midrule symbol
7584 name for which the midrule value is referenced in any action.
7585 * tests/actions.at (Default %printer and %destructor for mid-rule
7586 values): New test.
7587 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
7588 for change to dummy symbol names.
7589
7590 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7591
7592 Warn about unset midrule $$ if the corresponding $n is used.
7593 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
7594 $n usage.
7595 (packgram): Before invoking grammar_rule_check on any rule, make sure
7596 all actions have already been scanned in order to set `used' flags.
7597 Otherwise, checking that a midrule's $$ is set will not always work
7598 properly because the midrule check must forward-reference the midrule's
7599 parent rule.
7600 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
7601 warning.
7602
7603 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7604
7605 More improvements to the documentation of the prologue alternatives:
7606 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
7607 Bison manual.
7608 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
7609 some text to clarify the relative importance of the new directives and
7610 to show how these directives may be viewed as code labels.
7611
7612 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
7613
7614 Similar to the recently removed %before-header, add %code-top as the
7615 alternative to the pre-prologue. Mentioned at
7616 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
7617 Also, let the prologue alternatives appear in the grammar section.
7618 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
7619 (prologue_declaration): Move the existing prologue alternatives to...
7620 (grammar_declaration): ... here and add %code-top.
7621 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
7622
7623 Clean up and extend documentation for the prologue alternatives.
7624 * NEWS (2.3a+): Describe prologue alternatives.
7625 * doc/bison.texinfo (Prologue): Move discussion of prologue
7626 alternatives to...
7627 (Prologue Alternatives): ... this new section, and extend it to discuss
7628 all 4 directives in detail.
7629 (Table of Symbols): Clean up discussion of prologue alternatives and
7630 add %code-top.
7631
7632 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7633
7634 DJGPP specific issues.
7635
7636 * djgpp/config.bat: config.hin has been moved to lib. Adjust
7637 config.bat accordingly.
7638 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
7639 * djgpp/config.site: Likewise.
7640
7641 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
7642
7643 Replace %*-header with %provides, %requires, %code. See discussion at
7644 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
7645
7646 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
7647 (b4_user_start_header): Remove.
7648 * data/glr.c: Use new macros instead of b4_*start_header
7649 and b4_*end_header.
7650 * data/glr.cc: Likewise.
7651 * data/lalr1.cc: Likewise.
7652 * data/push.c: Likewise.
7653 * data/yacc.c: Likewise.
7654
7655 * doc/bison.texinfo: Remove %before-header, rename
7656 %{start,end,after}-header to %requires, %provides, %code.
7657
7658 * src/parse-gram.y: Likewise (also rename token names accordingly).
7659 * src/scan-gram.l: Likewise.
7660 * tests/actions.at: Likewise.
7661
7662 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
7663
7664 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
7665 Problem reported by Joel E. Denny.
7666
7667 2006-10-14 Jim Meyering <jim@meyering.net>
7668
7669 (Sync from coreutils.)
7670 Work also when the working directory (with e.g. coreutils sources)
7671 is version controlled with git, rather than CVS.
7672 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
7673 rather than CVS.
7674 In messages and comments, say e.g., "checked-out sources",
7675 rather than "CVS sources".
7676 (version_controlled_file): New function. Work for git as well as
7677 for CVS. Don't use grep's -q option.
7678 (slurp): Call it here, in place of CVS-specific code.
7679
7680 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
7681
7682 Fix testsuite for ./configure --enable-gcc-warnings:
7683 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
7684 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
7685 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
7686 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
7687 * test/regression.at (Diagnostic that expects two alternatives):
7688 Likewise.
7689
7690 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7691
7692 * bootstrap.conf (gnulib_modules): Add config-h.
7693 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
7694 worry about HAVE_CONFIG_H.
7695 * lib/abitset.c: Likewise.
7696 * lib/bitset.c: Likewise.
7697 * lib/bitset_stats.c: Likewise.
7698 * lib/bitsetv-print.c: Likewise.
7699 * lib/bitsetv.c: Likewise.
7700 * lib/ebitset.c: Likewise.
7701 * lib/get-errno.c: Likewise.
7702 * lib/lbitset.c: Likewise.
7703 * lib/subpipe.c: Likewise.
7704 * lib/timevar.c: Likewise.
7705 * lib/vbitset.c: Likewise.
7706 * lib/bitset.c: Include "bitset.h" first, to test interface.
7707 * lib/bitset_stats.c: Include "bitset_stats.h" first.
7708 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
7709 * lib/bitsetv.c: Include "bitsetv.h" first.
7710 * lib/get-errno.c: Include "get-errno.h" first.
7711 * m4/.cvsignore: Add config-h.m4.
7712 * tests/actions.at (Default %printer and %destructor for ...):
7713 Adjust expected line numbers in output to reflect removal of #if
7714 HAVE_CONFIG_H lines.
7715 * tests/glr-regression.at (Missed %merge type warnings when ...):
7716 Likewise.
7717 * tests/regression.at (Braced code in declaration in rules section):
7718 Likewise.
7719 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
7720 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
7721 Include <config.h> unconditionally.
7722
7723 * bootstrap: Sync from coreutils, as follows:
7724
7725 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7726
7727 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
7728 variable was sometimes used without being initialized. This
7729 messed up the installation of the INSTALL file in some cases.
7730
7731 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7732
7733 * bootstrap (usage, main program, symlink_to_gnulib): Add option
7734 --copy. Inspired by a suggestion from Bruno Haible.
7735
7736 2006-10-03 Jim Meyering <jim@meyering.net>
7737
7738 * bootstrap: Undo last change to this file, since now gnulib-tool
7739 sticks with the automake default in generating dependencies.
7740
7741 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7742
7743 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
7744 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
7745
7746 * doc/bison.1: Add copyright notice.
7747
7748 * data/glr.c: Don't include <stdarg.h>; not used.
7749
7750 * NEWS: The -g and --graph options now output graphs in Graphviz
7751 DOT format, not VCG format.
7752 * doc/bison.1: Likewise.
7753 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
7754 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
7755 of this change in
7756 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
7757 * TODO: Remove Graphviz entry.
7758 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
7759 remove vcg.c, vcg.h, vcg_defaults.h.
7760 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
7761 * src/graphviz.c, src/graphviz.h: New files.
7762 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
7763 * src/files.h: Make comment more generic.
7764 * src/main.c (main): Likewise.
7765 * src/print_graph.h: Likewise.
7766 * src/getargs.c (usage): Make usage description more generic.
7767 * src/print_graph.c: Include graphviz.h rather than vcg.h.
7768 (static_graph, fgraph): Remove. All uses changed to pass
7769 arguments instead of sharing a static var.
7770 (print_core, print_actions, print_state, print_graph):
7771 Output graphviz format rather than VCG format.
7772 * tests/.cvsignore: Remove *.vcg; add *.dot.
7773 * tests/output.at: Expect *.dot files, not *.vcg files.
7774
7775 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
7776 accommodates the 2006-10-08 change.
7777
7778 2006-10-11 Bob Rossi <bob@brasko.net>
7779
7780 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
7781 (b4_yyssa, b4_yyerror_range): New macros.
7782 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
7783 (yypvarsinit): Remove init of removed fields.
7784 (yypushparse): Remove use of removed fields; use new macros instead.
7785
7786 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7787
7788 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
7789 in a push parser. Reindent slightly to match yacc.c better.
7790
7791 2006-10-11 Bob Rossi <bob@brasko.net>
7792
7793 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
7794 yymsg_alloc fields.
7795 (yypvarsinit, yypushparse): Remove init of removed fields.
7796 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
7797
7798 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7799
7800 * THANKS: Add Paolo Bonzini and Bob Rossi.
7801
7802 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
7803
7804 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
7805 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
7806 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
7807 b4_define_user_cde and uses): Remove.
7808 (b4_comment, b4_prefix, b4_sync_start): New.
7809 * data/bison.m4: New file, with most of the content removed from c.m4.
7810 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
7811 * src/output.c (output_skeleton): Pass bison.m4.
7812 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
7813 only if specified.
7814
7815 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
7816
7817 Fix test failure reported by Tom Lane in
7818 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
7819 and try to make such failures easier to catch in the future.
7820 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
7821 that's now the caller's responsibility.
7822 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
7823 Set yychar = YYEOF if it's negative.
7824 * tests/actions.at (yylex): Abort if asked to read past EOF.
7825 * tests/conflicts.at (yylex): Likewise.
7826 * tests/cxx-type.at (yylex): Likewise.
7827 * tests/glr-regression.at (yylex): Likewise.
7828 * tests/input.at (yylex): Likewise.
7829 * tests/regression.at (yylex): Likewise.
7830 * tests/torture.at (yylex): Likewise.
7831
7832 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
7833
7834 Fix problems with translating English-language diagnostics.
7835 * bootstrap: Fix bug introduced in recent bootstrap changes, with
7836 respect to bison-runtime pot generation. The YY_ stuff
7837 wasn't being captured.
7838 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
7839 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
7840 * runtime-po/POTFILES.in: Add data/push.c.
7841
7842 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
7843
7844 Merge bootstrap changes from coreutils.
7845
7846 2006-09-28 Jim Meyering <jim@meyering.net>
7847
7848 Automatically generated dependencies are important even
7849 when all of the sources in a directory come from gnulib.
7850 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
7851 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
7852
7853 2006-09-23 Jim Meyering <jim@meyering.net>
7854
7855 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
7856
7857 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7858
7859 * bootstrap: Add support for --force.
7860 (usage): New function. Describe usage less tersely.
7861 (CVS_only_file): New var.
7862
7863 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
7864
7865 * data/push.c (YYPUSH_MORE): Make it an enum instead.
7866 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
7867 Adjust white space and comments to match GNU style better.
7868
7869 2006-09-20 Bob Rossi <bob@brasko.net>
7870
7871 * data/push.c (yyresult_get): Remove function.
7872 (YYPUSH_MORE): Add #define.
7873 (yypushparse): Modify return value.
7874
7875 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7876
7877 * stamp-h.in: Remove; no longer needed.
7878 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7879 Remove config.h, config.hin, intl (no longer created).
7880 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7881 stamp-h1.
7882
7883 Sync bootstrap from coreutils, as follows:
7884
7885 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7886
7887 * bootstrap (symlink_to_gnulib): New function.
7888 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7889 to copies-of-gnulib.
7890 (cp_mark_as_generated, slurp, gnulib_files):
7891 Avoid making a copy if it's the same as the old version.
7892 (gnulib_files): Add support for this variable (used by Bison).
7893
7894 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7895
7896 * src/getargs.c (usage): Rework to use conventions similar to
7897 coreutils, to make translation a bit easier and the code a bit
7898 smaller. Problem reported by Tim Van Holder.
7899
7900 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7901
7902 Use some of gnulib's new modules, taken from coreutils.
7903
7904 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7905 * bootstrap.conf: New file.
7906 (gnulib_modules): Add configmake, inttypes, unistd.
7907 (XGETTEXT_OPTIONS): Add complain, complain_at,
7908 fatal, fatal_at, warn, warn_at, unexpected_end.
7909 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7910 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7911 (gl_EARLY): Add.
7912 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7913 (gl_INIT): Add
7914 (GNULIB_AUTOCONF_SNIPPET): Remove.
7915 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7916 the pickiest.
7917 * lib/.cvsignore: Add inttypes_.h.
7918 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7919 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7920 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7921 no-longer-necessary initializations.
7922 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7923 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7924 use the unistd module.
7925 * src/system.h: Likewise.
7926 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7927 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7928 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7929 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7930 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7931 * src/system.h: Include inttypes.h unconditionally, now that we
7932 use the inttypes module. Don't bother to include stdint.h, since
7933 inttypes.h now does that for us.
7934 (LOCALEDIR): Remove, now that we use the configmake module.
7935 * src/getargs.c: Include configmake.h.
7936 * src/main.c: Likewise.
7937 * src/output.c: Likewise.
7938 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7939 not from $abs_top_builddir, since config.h moved.
7940
7941
7942 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7943 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7944
7945 * src/parse-gram.y (symbol_declaration): Don't put statements
7946 before declarations; it's not portable to C89.
7947 * src/scan-code.l (handle_action_at): Likewise.
7948
7949 * src/scan-code.l: Always initialize braces_level; the old code
7950 left it uninitialized and therefore had undefined behavior.
7951
7952 Don't attempt to redefine 'assert', since it runs afoul of
7953 systems where standard headers (mistakenly) include <assert.h>.
7954 Instead, define and use our own alternative, called 'aver'.
7955 * src/reader.c: Don't include assert.h, since we no longer
7956 use assert.
7957 * src/scan-code.l: Likewise.
7958 * src/system.h (assert): Remove, replacing with....
7959 (aver): New function, taking a bool arg. All uses changed.
7960 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7961 not merely an integer.
7962
7963 2006-09-15 Bob Rossi <bob@brasko.net>
7964
7965 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7966 * data/c.m4 (YYPUSH): New.
7967 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7968 * src/getargs.c (push_parser): New var.
7969 * src/getargs.h (push_parser): New declaration.
7970 * src/output.c (prepare): Add macro insertion of `push_flag'.
7971 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7972 (prologue_declaration): Parse %push-parser.
7973 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7974 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7975 list of removed lines from the traces observed.
7976 (AT_CHECK_CALC_LALR): Added push parser tests.
7977
7978 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7979
7980 * NEWS: Version 2.3a.
7981 * configure.ac (AC_INIT): Likewise.
7982
7983 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7984 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7985 due to header ordering dependencies. I don't know why the #define
7986 was there.
7987
7988 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7989 runtime cost when YYDEBUG is not defined, and so that some tests
7990 that used to fail now work. Problem and initial suggestion by
7991 Paolo Bonzini.
7992 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7993 * data/glr.cc (b4_parser_class_name):
7994 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7995 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7996 (yydebug_) [YYDEBUG]: New member.
7997 (yycdebug_): Now defined only if YYDEBUG.
7998 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7999 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8000 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8001 if YYYDEBUG.
8002 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8003 Define only if YYDEBUG.
8004 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8005 set_debug_level.
8006 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8007 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8008 AT_CHECK_CALC_GLR_CC that are working now.
8009
8010 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8011
8012 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8013 We don't need them in glr.cc, and glr.c defines them.
8014 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8015 assumes that defining it to anything is the same as defining
8016 it to 1. Problem reported by Paolo Bonzini.
8017
8018 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8019
8020 * data/c.m4 (b4_null, b4_case): Define.
8021 * src/output.c (prepare_symbols): Use b4_null.
8022 (user_actions_output): Use b4_case.
8023
8024 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8025
8026 * data/glr.c (b4_shared_declarations): Put start-header first,
8027 before any #includes that we generate, so that feature-test
8028 macros work. Problem reported by Michael Deutschmann in
8029 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8030 * data/lalr1.cc: Likewise.
8031 * doc/bison.texinfo (Prologue): Document that feature-test macros
8032 should be defined before any Bison declarations.
8033 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8034 that depend on location.hh after, not before, Bison decls, since
8035 we now include location.hh after the first user prologue.
8036
8037 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8038 Sander Brandenburg in
8039 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8040 Also, fix minor white space and comment issues.
8041 (Prologue): Mention that it's better to define feature-test macros
8042 before Bison declarations. Problem reported by Michael Deutschmann.
8043
8044 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8045 by Jim Meyering.
8046 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8047 This adjusts to recent gnulib changes.
8048
8049 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8050
8051 Finish implementation of per-type %destructor/%printer. Discussed
8052 starting at
8053 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8054 and
8055 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8056 * NEWS (2.3+): Add a description of this feature to the default
8057 %destructor/%printer description.
8058 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8059 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8060 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8061 list node contains a semantic type.
8062 * src/symtab.c, src/symtab.h: Extend with a table that associates
8063 semantic types with their %destructor's and %printer's.
8064 (semantic_type_from_uniqstr, semantic_type_get,
8065 semantic_type_destructor_set, semantic_type_printer_set): New functions
8066 composing the public interface of that table.
8067 (symbol_destructor_get, symbol_destructor_location_get,
8068 symbol_printer_get, symbol_printer_location_get): If there's no
8069 per-symbol %destructor/%printer, look up the per-type before trying
8070 the default.
8071 * tests/actions.at (Per-type %printer and %destructor): New test case.
8072 * tests/input.at (Default %printer and %destructor redeclared):
8073 Extend to check that multiple occurrences of %symbol-default in a
8074 single %destructor/%printer declaration is an error.
8075 (Per-type %printer and %destructor redeclared, Unused values with
8076 per-type %destructor): New test cases.
8077
8078 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8079
8080 Require default %destructor/%printer to be declared using
8081 %symbol-default instead of an empty symbol list, and start working on
8082 new per-type %destructor/%printer. Discussed at
8083 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8084 * NEWS (2.3+): Add %symbol-default to example.
8085 * bison.texinfo (Freeing Discarded Symbols): Likewise.
8086 (Table of Symbols): Add entry for %symbol-default.
8087 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8088 (generic_symlist, generic_symlist_item): New nonterminals for creating
8089 a list in which each item is a symbol, semantic type, or
8090 %symbol-default.
8091 (grammar_declaration): Use generic_symlist in %destructor and %printer
8092 declarations instead of symbols.1 or an empty list.
8093 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8094 for changes to symbol_list.
8095 * src/reader.c: Update for changes to symbol_list.
8096 * src/scan-code.l: Likewise.
8097 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8098 * src/symlist.c, src/symlist.h: Extend such that a list node may
8099 represent a semantic type or a %symbol-default in addition to just an
8100 ordinary symbol. Add switched functions for setting %destructor's and
8101 %printer's.
8102 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8103 %destructor/%printer declarations.
8104
8105 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8106
8107 Whether the default %destructor/%printer applies to a particular symbol
8108 isn't a question of whether the user *declares* that symbol (in %token,
8109 for example). It's a question of whether the user by any means
8110 *defines* the symbol at all (by simply using a char token, for
8111 example). $end is defined by Bison whereas any other token with token
8112 number 0 is defined by the user. The error token is always defined by
8113 Bison regardless of whether the user declares it with %token, but we
8114 may one day let the user define error as a nonterminal instead.
8115 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8116 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8117 the meaning of "user-defined".
8118 * tests/actions.at (Default %printer and %destructor for user-declared
8119 end token): Rename to...
8120 (Default %printer and %destructor for user-defined end token): ...
8121 this.
8122
8123 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8124 computation of whether to apply the default, don't maintain a list of
8125 every Bison-defined symbol. Instead, just check for a first character
8126 of '$', which a user symbol cannot have, and check for the error token.
8127
8128 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8129
8130 Don't apply the default %destructor or %printer to the error token,
8131 $undefined, or $accept. This change fits the general rule that the
8132 default %destructor and %printer are only for user-declared symbols,
8133 and it solves several difficulties that are described in the new test
8134 cases listed below.
8135 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8136 * tests/actions.at (Default %printer and %destructor are not for error
8137 or $undefined, Default %printer and %destructor are not for $accept):
8138 New test cases.
8139
8140 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8141
8142 Allow %start after the first rule.
8143 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8144 when parsing the first rule.
8145 (check_and_convert_grammar): Search for it here after all grammar
8146 declarations have been parsed. Skip midrules, which have dummy LHS
8147 nonterminals.
8148 * src/symtab.c (symbol_is_dummy): New function.
8149 * src/symtab.h (symbol_is_dummy): Declare it.
8150 * tests/input.at (%start after first rule): New test.
8151
8152 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8153
8154 Redo some of the previous commit: add back the ability to use
8155 non-aliased/undeclared string literals since it might be useful to
8156 those declaring %token-table.
8157 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8158 commit: don't worry about complaints from symbols_pack.
8159 * src/symtab.c (symbol_new, symbol_class_set,
8160 symbol_check_alias_consistency): Undo changes in previous commit: count
8161 each string literal as a new symbol and token, assign it a symbol
8162 number, and don't complain about non-aliased string literals.
8163 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8164 and token counts but does still set aliased tokens to the same number,
8165 symbol_pack_processor now leaves empty slots in the symbols array.
8166 Remove those slots.
8167 * tests/regression.at (Undeclared string literal): Remove test case
8168 added in previous commit since non-aliased string literals are allowed
8169 again.
8170 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8171 remove unnecessary string literal declarations.
8172 * tests/sets.at (Firsts): Likewise.
8173
8174 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8175
8176 Don't allow an undeclared string literal, but allow a string literal to
8177 be used before its declaration.
8178 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8179 symbols_pack complained.
8180 * src/symtab.c (symbol_new): Don't count a string literal as a new
8181 symbol.
8182 (symbol_class_set): Don't count a string literal as a new token, and
8183 don't assign it a symbol number since symbol_make_alias does that.
8184 (symbol_make_alias): It's not necessary to decrement the symbol and
8185 token counts anymore. Don't assume that an alias declaration occurs
8186 before any uses of the identifier or string, and thus don't assert that
8187 one of them has the highest symbol number so far.
8188 (symbol_check_alias_consistency): Complain if there's a string literal
8189 that wasn't declared as an alias.
8190 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8191 symbol_pack asserts that every token has been assigned a symbol number
8192 although undeclared string literals have not.
8193 * tests/regression.at (String alias declared after use, Undeclared
8194 string literal): New test cases.
8195 (Characters Escapes, Web2c Actions): Declare string literals as
8196 aliases.
8197 * tests/sets.at (Firsts): Likewise.
8198
8199 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8200
8201 In the grammar scanner, STRING_FINISH unclosed constructs and return
8202 them to the parser in order to improve error messages.
8203 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8204 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8205 * tests/input.at (Unclosed constructs): New test case.
8206 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8207 seen.
8208
8209 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8210 unused global.
8211
8212 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8213
8214 Handle string aliases for character tokens correctly.
8215 * src/symtab.c (symbol_user_token_number_set): If the token has an
8216 alias, check and set its alias's user token number instead of its own,
8217 which is set to indicate the alias. Previously, every occurrence of
8218 the character token in the grammar overwrote that alias indicator with
8219 the character code.
8220 * tests/input.at (String aliases for character tokens): New test.
8221
8222 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8223
8224 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8225
8226 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8227
8228 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8229 to prevent failures when building on older platforms.
8230 Check for autopoint failure.
8231 Set XGETTEXT_OPTIONS to values that check for C format strings,
8232 so that translators are warned about them (this also helps
8233 prevent core dumps).
8234
8235 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8236 function, since it simplifies our code a bit.
8237
8238 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8239 rather than -W, so we don't get bogus warnings about sign comparisons.
8240 Add -Wpointer-arith, since that warning is useful (it reports code
8241 that does not conform to C89 and that some compilers reject).
8242 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8243 since it's no longer needed.
8244
8245 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8246
8247 Clean up scanners a bit.
8248 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8249 definitions so gcc won't warn when obstack_for_string is unused.
8250 * src/scan-code.l: config.h and system.h are already #include'd by
8251 scan-code-c.c, so get rid of them here.
8252 * src/scan-gram.l: Likewise.
8253 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8254 definitions rather than duplicating the rest of it.
8255 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8256
8257 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8258
8259 Suppress signed/unsigned comparison warnings for yycheck.
8260 * data/c.m4 (b4_safest_int_type): New macro.
8261 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8262 a signed int type, cast it to b4_safest_int_type first.
8263 * data/yacc.c: Likewise.
8264 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8265 also overwritten.
8266
8267 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8268
8269 * doc/bison.texinfo: Fix some typos.
8270
8271 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8272
8273 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8274 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8275
8276 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8277 the latest gnulib does this a different way.
8278 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8279 translation was patched, so stop omitting it.
8280
8281 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8282
8283 Enable declaration of default %printer/%destructor. Make the parser
8284 use these for all user-declared grammar symbols for which the user does
8285 not declare a specific %printer/%destructor. Thus, the parser uses it
8286 for token 0 if the user declares it but not if Bison generates it as
8287 $end. Discussed starting at
8288 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8289 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8290 and
8291 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8292 * NEWS (2.3+): Mention.
8293 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8294 declare a %destructor for a mid-rule's semantic value. It's just
8295 impossible to declare one specific to it.
8296 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8297 code. Describe default %destructor form.
8298 * src/parse-gram.y (grammar_declaration): Parse default
8299 %printer/%destructor declarations.
8300 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8301 and symbol_destructor_location_get rather than accessing the destructor
8302 and destructor_location members of struct symbol.
8303 (symbol_printers_output): Likewise but for %printer's.
8304 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8305 again.
8306 * src/symtab.c (default_destructor, default_destructor_location,
8307 default_printer, default_printer_location): New static global
8308 variables to record the default %destructor and %printer.
8309 (symbol_destructor_get, symbol_destructor_location_get,
8310 symbol_printer_get, symbol_printer_location_get): New functions to
8311 compute the appropriate %destructor and %printer for a symbol.
8312 (default_destructor_set, default_printer_set): New functions to set the
8313 default %destructor and %printer.
8314 * src/symtab.h: Prototype all those new functions.
8315 * tests/actions.at (Default %printer and %destructor): New test to
8316 check that the right %printer and %destructor are called, that they're
8317 not called for $end, and that $$ and @$ work correctly.
8318 (Default %printer and %destructor for user-declared end token): New
8319 test to check that the default %printer and %destructor are called for
8320 a user-declared end token.
8321 * tests/input.at (Default %printer and %destructor redeclared, Unused
8322 values with default %destructor): New tests to check related grammar
8323 warnings and errors.
8324
8325 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8326
8327 Clean up handling of %destructor for the end token (token 0).
8328 Discussed starting at
8329 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8330 and
8331 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8332
8333 Make the skeletons consistent in how they pop the end token and invoke
8334 its %destructor.
8335 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8336 state, which has token number 0, since this would invoke the
8337 %destructor for the end token.
8338 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8339 until after shifting the end token, or else it won't be popped.
8340 * data/yacc.c (yyparse): Likewise.
8341
8342 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8343 it's the end token. Upon termination, destroy an unshifted lookahead
8344 even when it's the end token.
8345 * data/lalr1.cc (yy::parser::parse): Likewise.
8346 * data/yacc.c (yyparse): Likewise.
8347
8348 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8349 value warnings for the end token when the user gives the end token a
8350 %destructor.
8351
8352 * tests/actions.at (Printers and Destructors): Test all the above.
8353
8354 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8355
8356 Update to latest gnulib and gettext versions.
8357 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8358 Add fopen-safer.
8359 (gnulib_files): Add m4/warning.m4. Don't worry about files
8360 overwritten by autopoint.
8361 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8362 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8363 rejects them.
8364 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8365 so that we can remove the intl files at a better time.
8366 (intl_files_to_remove): Remove aclocal.m4, since it gets
8367 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8368 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8369 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8370 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8371 Remove datarootdir hack; no longer needed.
8372 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8373 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8374 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8375 strdup.h.
8376 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8377 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8378
8379 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8380
8381 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8382 it with --assume-autoconf='latest-stable'.
8383
8384 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8385
8386 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8387 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8388 YYSTYPE' and `{'.
8389 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8390 those from muscle_tab.c since the old ones are misleading.
8391
8392 2006-07-13 Akim Demaille <akim@epita.fr>
8393
8394 Support %define "KEY" {VALUE}.
8395 * src/scan-code.h, src/scan-code.l (translate_action)
8396 (translate_rule_action, translate_symbol_action, translate_code):
8397 Return char *, not const char *.
8398 * src/parse-gram.y (declaration): Rename as...
8399 (prologue_declaration): this.
8400 (string_content): Remove this nonterminal, use STRING.
8401 (braceless, content, content.opt): New nonterminal.
8402 Use them.
8403 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
8404 as value.
8405 * src/scan-gram.l (getargs.h): Don't include it.
8406
8407 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
8408
8409 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
8410 rather than a for-loop that declares a local bool variable. This
8411 should work around a compatibility problem with a Cray x1e C++
8412 compiler reported by Hung Nguyen in
8413 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
8414 The for-loop was introduced in the 2004-11-17 change but I don't
8415 know why it was needed.
8416
8417 2006-07-12 Akim Demaille <akim@epita.fr>
8418
8419 * data/c.m4: Comment changes.
8420
8421 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
8422
8423 * src/complain.c (error_message, ERROR_MESSAGE): New.
8424 To factor...
8425 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
8426 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
8427
8428 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8429
8430 * NEWS: Instead of %union, you can define and use your own union type
8431 YYSTYPE if your grammar contains at least one <type> tag.
8432 Your YYSTYPE need not be a macro; it can be a typedef.
8433 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
8434 (Union Decl, Decl Summary): Document this.
8435 * data/glr.c (YYSTYPE): Implement this.
8436 * data/glr.cc (YYSTYPE): Likewise.
8437 * data/lalr1.cc (YYSTYPE): Likewise.
8438 * data/yacc.c (YYSTYPE): Likewise.
8439 * src/output.c (prepare): Output tag_seen_flag.
8440 * src/parse-gram.y (declaration, grammar_declaration):
8441 Use 'union_seen' rather than 'typed' to determine whether
8442 %union has been seen, since grammars can now be typed without
8443 %union.
8444 (symbol_declaration, type.opt, symbol_def):
8445 Keep track of whether a tag has been seen.
8446 * src/reader.c (union_seen, tag_seen): New vars.
8447 (typed): remove.
8448 * src/reader.h (union_seen, tag_seen, typed): Likewise.
8449 * src/scan-code.l (untyped_var_seen): New variable.
8450 (handle_action_dollar): Adjust to above changes.
8451 (handle_action_dollar, handle_action_at):
8452 Improve overflow checking for outlandish numbers.
8453 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
8454 avoid new diagnostics generated by above changes.
8455 * tests/regression.at (YYSTYPE typedef): Add test to check
8456 for type tags without %union.
8457
8458 * src/symlist.c (symbol_list_length): Return int, not unsigned
8459 int, since callers expect int. This may need to get revisited
8460 once we have proper integer overflow checking.
8461
8462 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
8463 object is now static.
8464
8465 * src/getargs.c (flags_argmatch): Return void, not int,
8466 to pacify ./configure --enable-gcc-warnings.
8467
8468 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
8469 since last_string is already defined to FLEX_PREFIX (last_string).
8470
8471 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8472
8473 Implement --warnings/-W.
8474 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
8475 replaced by...
8476 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
8477 Adjust callers.
8478 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
8479 (warnings_args, warnings_types): New.
8480 (getargs, short_options, long_options): Accept -W/--warnings.
8481 Sort the options by alphabetical order, upper case letter right
8482 before its lower case.
8483
8484 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
8485
8486 Change %merge result type clash warnings to errors. Discussed at
8487 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
8488 * src/reader.c (record_merge_function_type): Use complain_at.
8489 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8490 declared later): Update test case results.
8491
8492 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8493
8494 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
8495 to be in alphabetical order.
8496 (trace_args): Spelling fixes.
8497
8498 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8499
8500 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
8501 so they don't collide with user-defined macros.
8502 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
8503 this was never guaranteed, and now that we're using gnulib stdint,
8504 which defines int_fast16_t to long int, the problem is exposed.
8505
8506 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
8507
8508 * data/c.m4 (b4_basename): Simplify a bit, since we don't
8509 need the full POSIX semantics (and weren't implementing them
8510 anyway).
8511
8512 Adjust to Autoconf 2.60 and today's gnulib.
8513 * bootstrap (gnulib_modules): Add stdint.
8514 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
8515 no longer copies it.
8516 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
8517 since stdint needs the former and wcwidth (which is now required
8518 by mbswidth) needs the latter.
8519 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
8520 work around a compatibility glitch between gettext 0.14.6 and
8521 Autoconf 2.60.
8522 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
8523 Do not check for uintptr_t, since new stdint module does the right
8524 thing.
8525 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
8526 Add stdint.h, stdint_.h, wcwidth.h.
8527 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
8528 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
8529 stdint.m4, wchar_t.m4, wcwidth.m4.
8530 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
8531 usual order for ../lib/*.h files.
8532 (file_name_split): Use last_component, not base_name, to adjust
8533 to gnulib changes.
8534 * src/parse-gram.h: Include <strverscmp.h> in the usual order
8535 for ../lib/*.h files.
8536 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
8537 Define unconditionally, since we now assume the stdint module.
8538 * src/scan-skel.l: Include <dirname.h>.
8539 (BASE_QPUTS): Use last_component, not base_name.
8540 * src/system.h: Include <unlocked-io.h> in the usual order
8541 for ../lib/*.h files. Include <stdint.h> unconditionally,
8542 since we now use the stdint module.
8543 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
8544 HAVE_UINTPTR_T, since we now use the stdint module.
8545 (base_name): Remove decl, since files now include <dirname.h>
8546 to get the decl.
8547
8548 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8549
8550 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
8551 New, default to 1.
8552 * data/yacc.c, data/glr.c, data/location.cc: Use them.
8553 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
8554 default.
8555 * tests/calc.at: Adjust.
8556
8557 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8558
8559 * data/c.m4 (b4_basename): New.
8560 (b4_syncline): Also output the location of its invocation (from
8561 the skeleton).
8562 (b4_user_action, b4_define_user_action, b4_user_actions)
8563 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
8564 (b4_user_stype): New.
8565 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
8566
8567 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8568
8569 In the grammar file, the first column is 1 not 0 on the first line as
8570 on every other line.
8571 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
8572 * tests/input.at (Torturing the Scanner): Update output.
8573
8574 * src/scan-gram.l (scanner_cursor): Declare it static.
8575
8576 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8577
8578 In warnings, say "previous declaration" rather than "first
8579 declaration".
8580 * src/symtab.c (redeclaration): Do that here.
8581 * src/reader.c (record_merge_function_type): In the case of a result
8582 type clash, report the previous declaration rather than the very first
8583 one in the grammar file.
8584 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8585 declared later): Add a third declaration to check this behavior.
8586 * tests/input.at (Incompatible Aliases): Update output.
8587
8588 2006-06-27 Akim Demaille <akim@epita.fr>
8589
8590 * doc/Doxyfile.in: New.
8591 * doc/Makefile.am: Use it.
8592 * src/lalr.h, src/symtab.h: Initial doxygenation.
8593
8594 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8595
8596 Don't miss %merge result type warnings just because the LHS types are
8597 declared after the %merge. This continues the effort of the previous
8598 patch.
8599 * src/reader.c (get_merge_function): Don't set the merger type yet.
8600 (record_merge_function_type): New function for setting the merger type
8601 and checking for clashes.
8602 (grammar_current_rule_merge_set): Set the location of the %merge for
8603 the current rule.
8604 (packgram): Invoke record_merge_function_type for each rule now that
8605 all symbol type declarations have been parsed.
8606 * src/reader.h (merger_list.type_declaration_location): New member
8607 storing the location of the first %merge from which the type for this
8608 merging function was derived.
8609 * src/symlist.h (symbol_list.merger_declaration_location): New member
8610 storing the location of a rule's %merge, if any.
8611 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8612 declared later): New test to catch the error fixed by the above patch.
8613
8614 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8615
8616 Get action warnings (grammar_rule_check) right even when symbol
8617 declarations appear after the rules. Discussed at
8618 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
8619 and
8620 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
8621 Don't mistake the type of $$ in a midrule to be that of its parent
8622 rule's $$.
8623 * src/reader.c (grammar_current_rule_end): Don't invoke
8624 grammar_rule_check yet since not all symbol declarations may have been
8625 parsed yet.
8626 (grammar_midrule_action): Likewise.
8627 Don't record whether the midrule's $$ has been used yet since actions
8628 haven't been translated yet.
8629 Record the midrule's parent rule and its RHS index within the parent
8630 rule.
8631 (grammar_current_rule_action_append): Don't translate the action yet
8632 since not all symbol declarations may have been parsed yet and, thus,
8633 warnings about types for $$, $n, @$, and @n can't be reported yet.
8634 (packgram): Translate the action and invoke grammar_rule_check now that
8635 all symbol declarations have been parsed.
8636 * src/scan-code.l (handle_action_dollar): Now that this is invoked
8637 after parsing the entire grammar file, the symbol list here in the case
8638 of a midrule is actually the midrule's empty RHS, so reference its
8639 parent rule's RHS where necessary.
8640 On the other hand, now that you can already know it's a midrule, you
8641 aren't forced to think $$ has the same type as its parent rule's $$.
8642 (handle_action_at): In the case of a midrule, reference the parent rule
8643 where necessary.
8644 * src/symlist.c (symbol_list_new): Initialize new midrule-related
8645 members.
8646 (symbol_list_length): Now that this is invoked after all rules have
8647 been parsed, a NULL symbol (rather than a NULL symbol list node)
8648 terminates a rule. symbol_list_print already does this correctly.
8649 * src/symlist.h (symbol_list.midrule_parent_rule,
8650 symbol_list.midrule_parent_rhs_index): New members so that midrules can
8651 remember their relationships with their parents.
8652 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
8653 fixed by the above patch.
8654 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
8655 implementing...
8656 (Unused values): ... this old test case and...
8657 (Unused values before symbol declarations): ... this new test case.
8658 This one is the same as `Unused values' except that all symbol
8659 declarations appear after the rules in order to catch the rest of the
8660 errors fixed by the above patch.
8661
8662 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8663
8664 More cleanup.
8665 * src/reader.c (current_rule): Declare it static since it's no longer
8666 used outside this file.
8667 (grammar_current_rule_action_append): Remove redundant arguments from
8668 translate_rule_action invocation.
8669 * src/reader.h (current_rule): Remove this unused extern.
8670 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
8671 * src/scan-code.l (translate_rule_action): Likewise.
8672
8673 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
8674
8675 Clean up yesterday's patch.
8676 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
8677 to...
8678 * src/reader.c (grammar_current_rule_action_append): ... here for
8679 consistency with grammar_current_rule_symbol_append.
8680 * tests/regression.at (Braced code in declaration in rules section):
8681 Make yyerror and yylex static as usual.
8682
8683 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
8684
8685 Fix bug that mistakes braced code in a declaration in the rules section
8686 to be a rule action. Mentioned at
8687 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
8688 * src/scan-gram.l: Move midrule action detection from the start of the
8689 scanning of any braced code to...
8690 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
8691 action. For readability, use $2 and @2 rather than the equivalent
8692 global variables.
8693 * tests/regression.at (Braced code in declaration in rules section):
8694 New test to catch the error fixed by the above patch.
8695
8696 Work on code readability some.
8697 * src/scan-code.l (current_rule): Get rid of this misleading and
8698 redundant declaration: it's actually extern'ed in reader.h.
8699 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
8700 translate_action): Add a rule argument and use it instead of the global
8701 current_rule.
8702 (translate_rule_action): This already receives current_rule through an
8703 argument, so pass it on to translate_action instead of assigning
8704 current_rule to current_rule.
8705 (translate_symbol_action, translate_code): Pass rule = NULL to
8706 translate_action.
8707
8708 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
8709
8710 Rename %before-definitions to %start-header and %after-definitions to
8711 %end-header. Don't use these declarations to separate pre-prologue
8712 blocks from post-prologue blocks. Add new order-independent
8713 declarations %before-header and %after-header as alternatives to the
8714 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
8715 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
8716 * NEWS (2.3+): Update for these changes.
8717 * data/glr.c (b4_before_definitions): Update to...
8718 (b4_start_header): ... this.
8719 (b4_after_definitions): Update to...
8720 (b4_end_header): ... this.
8721 * data/glr.cc: Likewise.
8722 * data/lalr1.cc: Likewise.
8723 * data/yacc.c: Likewise.
8724 * doc/bison.texinfo (The prologue): Update names, and replace remaining
8725 prologue blocks with %*-header declarations.
8726 (Calc++ Parser): Likewise.
8727 (Decl Summary): Update names.
8728 (Table of Symbols): Update description.
8729 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
8730 (PERCENT_END_HEADER): ... this.
8731 (PERCENT_BEFORE_DEFINITIONS): Update to...
8732 (PERCENT_START_HEADER): ... this.
8733 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8734 (declaration): Update token names and m4 macro names.
8735 When parsing %end-header and %start-header, invoke translate_code
8736 before muscle_code_grow, and no longer set global booleans to remember
8737 whether these declarations have been seen.
8738 Parse new %after-header and %before-header.
8739 * src/reader.c (before_definitions, after_definitions): Remove.
8740 (prologue_augment): Accept a new bool argument to specify whether to
8741 augment the pre-prologue or post-prologue.
8742 * src/reader.h (before_definitions, after_definitions): Remove these
8743 extern's.
8744 (prologue_augment): Add new bool argument.
8745 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
8746 (PERCENT_END_HEADER): ... this.
8747 (PERCENT_BEFORE_DEFINITIONS): Update to...
8748 (PERCENT_START_HEADER): ... this.
8749 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8750 * tests/actions.at (Printers and Destructors): Update names.
8751
8752 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
8753
8754 Add comparison operators for C++ location classes. Discussed at
8755 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
8756 * data/c++.m4 (b4_define_location_comparison): New boolean %define
8757 declaration indicating whether filename_type has an operator==. If
8758 filename_type is `std::string', it defaults to `1', `0' otherwise.
8759 * data/location.cc: Iff b4_define_location_comparison is `1', add
8760 operator== and operator!= for class position and for class location.
8761
8762 Some minor fixes.
8763 * src/scan-action.l: Remove unused file.
8764 * src/symtab.c (symbol_printer_set): Use printer_location not
8765 destructor_location.
8766 * src/symtab.h (struct symbol): Replace incorrect source comment for
8767 printer members.
8768 * tests/input.at (Incompatible Aliases): Update output with correct
8769 printer location.
8770
8771 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
8772
8773 Don't put the pre-prologue in the header file. For the yacc.c code
8774 file and the glr.c header and code files, move the pre-prologue before
8775 the token definitions. Add new %before-definitions and
8776 %after-definitions to declare code that will go in both the header file
8777 and code file. Discussed at
8778 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
8779 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
8780 and
8781 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
8782 * NEWS (2.3+): Describe these changes.
8783 * data/glr.c (b4_pre_prologue): Move from within to before...
8784 (b4_shared_declarations): ... this.
8785 Add new b4_before_definitions before b4_token_enums.
8786 Add new b4_after_definitions at the end.
8787 * data/glr.cc (b4_pre_prologue): Replace with...
8788 (b4_before_definitions): ... this in the header file.
8789 (b4_after_definitions): New near the end of the header file.
8790 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
8791 code file right before including the header file.
8792 (b4_before_definitions): New in the previous position of
8793 b4_pre_prologue in the header file.
8794 (b4_after_definitions): New near the end of the header file.
8795 * data/yacc.c: Clean up some m4 quoting especially in the header file.
8796 (b4_token_enums_defines): In the code file, move to right before
8797 YYSTYPE for consistency with the header file.
8798 (b4_before_definitions): New right before b4_token_enums_defines in
8799 both the header and code file.
8800 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
8801 header and code file.
8802 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
8803 of prologues for %union dependencies.
8804 (Decl Summary): In %defines description, mention the effect of
8805 %before-definitions and %after-definitions on the header file.
8806 (Calc++ Parser): Forward declare driver in a %before-definitions rather
8807 than in the pre-prologue so that make check succeeds.
8808 (Table of Symbols): Add entries for %before-definitions and
8809 %after-definitions.
8810 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
8811 %before-definitions.
8812 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
8813 (declaration): Parse those declarations and append to
8814 b4_before_definitions and b4_after_definitions, respectively.
8815 * src/reader.c (before_definitions, after_definitions): New bools to
8816 track whether those declarations have been seen.
8817 (prologue_augment): Add to the post-prologue if %union,
8818 %before-definitions, or %after-definitions has been seen.
8819 * src/reader.h (before_definitions, after_definitions): New extern's.
8820 * src/scan-gram.l: Scan the new declarations.
8821 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
8822 prologue block in a %before-definitions or a %after-definitions based
8823 on whether the %union is declared.
8824 * tests/regression.at (Early token definitions with --yacc, Early token
8825 definitions without --yacc): Move tests for token definitions into the
8826 post-prologue since token names are no longer defined in the
8827 pre-prologue.
8828
8829 2006-06-20 Akim Demaille <akim@epita.fr>
8830
8831 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
8832 (symbol_get): Use it.
8833 * src/parse-gram.y: Use it.
8834
8835 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
8836
8837 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
8838 build succeeds when configured with --enable-gcc-warnings.
8839
8840 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
8841
8842 * src/parse-gram.y (char_name): New function.
8843 (CHAR, STRING, string_content): For %printer, properly escape.
8844 (ID): Prefer fputs to fprintf.
8845 (id): Reindent to be consistent with other rules.
8846 Properly quote char.
8847
8848 The Translation Project changed its way of publishing translations
8849 to maintainers. I haven't received any responses to my request
8850 for supporting the old way, or for documenting the new way. I
8851 have modified 'bootstrap' to use screen scraping
8852 (in this case, HTML scraping). This is unreliable and inelegant,
8853 but I don't see any better way. Yuck.
8854 * bootstrap (TP_URL, WGET_COMMAND): New vars.
8855 (get_translations): New function, which uses HTML scraping to
8856 deduce locations of latest translations.
8857 Use this function to grab both bison and bison-runtime .po files.
8858 Don't bother priming the pump for the runtime-po domain any more,
8859 as it's now translated better than bison is.
8860
8861 2006-06-19 Akim Demaille <akim@epita.fr>
8862
8863 * src/scan-gram.l: No longer "parse" things after `%union' until
8864 `{'. Rather, return a single "%union" token.
8865 No longer make symbols: return strings, and leave the conversion
8866 to symbols to the parser.
8867 (SC_PRE_CODE, token_type): Remove.
8868 * src/parse-gram.y (%union): New field `character'.
8869 Sort tokens.
8870 (CHAR): New token.
8871 (ID, ID_COLON): Now that the scanner no longer makes them
8872 identifiers, adjust all uses to invoke symbol_get.
8873 (id_colon): New, wraps the conversion from string to symbol.
8874 (%union): Accept a possible union_name.
8875 (symbol): Now can be a char.
8876 * data/c.m4 (b4_union_name): Leave a default value.
8877 * data/glr.c, data/yacc.c: Use it.
8878
8879 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8880
8881 For associating token numbers with token names for "yacc.c", don't use
8882 #define statements unless `--yacc' is specified; always use enum
8883 yytokentype. Most important discussions start at:
8884 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8885 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8886 and
8887 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8888 * NEWS (2.3+): Mention.
8889 * data/c.m4 (b4_yacc_if): New.
8890 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8891 token #define's.
8892 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8893 on token name definitions.
8894 * src/getargs.c (usage): Capitalize `Yacc' in English.
8895 * src/output.c (prepare): Define b4_yacc_flag.
8896 * tests/regression.at (Early token definitions): Test that tokens names
8897 are defined before the pre-prologue not just before the post-prologue.
8898 Remove this test case and copy to...
8899 (Early token definitions with --yacc): ... this to test #define's.
8900 (Early token definitions without --yacc): ... and this to test enums.
8901
8902 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8903
8904 * NEWS: Reword the post-2.3 change to not be so optimistic about
8905 removing the old "look-ahead" spelling.
8906 Update previous look-ahead/lookahead change reports.
8907 * REFERENCES: look-ahead -> lookahead (since that's
8908 what he actually wrote).
8909 * doc/refcard.tex: look ahead -> lookahead,
8910 look-ahead -> lookahead
8911
8912 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8913
8914 For consistency, use `lookahead' instead of `look-ahead' or
8915 `look_ahead'. Discussed starting at
8916 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8917 and then at
8918 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8919 * NEWS: For the next release, note the change to `--report'.
8920 * TODO, doc/bison.1: Update English.
8921 * doc/bison.texinfo: Update English.
8922 (Understanding Your Parser, Bison Options): Document as
8923 `--report=lookahead' rather than `--report=look-ahead'.
8924 * src/conflicts.c: Update English in comments.
8925 (lookahead_set): Rename from look_ahead_set.
8926 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8927 (resolve_sr_conflict): Rename local look_ahead_tokens to
8928 lookahead_tokens, and update other uses.
8929 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8930 count_rr_conflicts, conflicts_free): Update uses.
8931 * src/getargs.c (report_args): Move "lookahead" before alternate
8932 spellings.
8933 (report_types): Update uses.
8934 (usage): For `--report' usage description, state `lookahead' spelling
8935 rather than `look-ahead'.
8936 * src/getargs.h (report.report_lookahead_tokens): Rename from
8937 report_look_ahead_tokens.
8938 * src/lalr.c: Update English in comments.
8939 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8940 (state_lookahead_tokens_count): Rename from
8941 state_look_ahead_tokens_count.
8942 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8943 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8944 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8945 Update other uses.
8946 Update English in output.
8947 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8948 * src/print.c: Update English in comments.
8949 (lookahead_set): Rename from look_ahead_set.
8950 (print_reduction): Rename argument lookahead_token from
8951 look_ahead_token.
8952 (print_core, state_default_rule, print_reductions, print_results):
8953 Update uses.
8954 * src/print_graph.c: Update English in comments.
8955 (print_core): Update uses.
8956 * src/state.c: Update English in comments.
8957 (reductions_new): Update uses.
8958 (state_rule_lookahead_tokens_print): Rename from
8959 state_rule_look_ahead_tokens_print, and update other uses.
8960 * src/state.h: Update English in comments.
8961 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8962 (state_rule_lookahead_tokens_print): Rename from
8963 state_rule_look_ahead_tokens_print.
8964 * src/tables.c: Update English in comments.
8965 (conflict_row, action_row): Update uses.
8966 * tests/glr-regression.at
8967 (Incorrect lookahead during deterministic GLR,
8968 Incorrect lookahead during nondeterministic GLR): Rename
8969 print_look_ahead to print_lookahead.
8970 * tests/torture.at: Update English in comments.
8971 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8972 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8973 (Many lookahead tokens): Update uses.
8974 * data/glr.c: Update English in comments.
8975 * lalr1.cc: Likewise.
8976 * yacc.c: Likewise.
8977 * src/conflicts.h: Likewise.
8978 * src/lalr.h: Likewise.
8979 * src/main.c: Likewise.
8980 * src/output.c: Likewise.
8981 * src/parse-gram.c: Likewise.
8982 * src/tables.h: Likewise.
8983 * tests/calc.at: Likewise.
8984
8985 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8986
8987 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8988
8989 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8990
8991 * TODO: Add request from Nelson H. F. Beebe to be able to install
8992 Bison without installing the yacc script.
8993
8994 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8995
8996 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8997 and yytext if they're already #define'd.
8998 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8999 * src/scan-code-c.c: ... here.
9000 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9001 <config.h>.
9002
9003 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9004
9005 Get Bison to build again when configured with --enable-gcc-warnings.
9006 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9007 missing #include's.
9008 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9009 loc argument as it shadows a global.
9010 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9011 invocation.
9012
9013 * src/.cvsignore: Add scan-code.c.
9014
9015 2006-06-07 Akim Demaille <akim@epita.fr>
9016
9017 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9018 to...
9019 * src/scan-code.l: here.
9020 * tests/input.at (Torturing the Scanner): Fix another location
9021 error.
9022
9023 2006-06-07 Akim Demaille <akim@epita.fr>
9024
9025 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9026
9027 2006-06-06 Akim Demaille <akim@epita.fr>
9028
9029 Extract the parsing of user actions from the grammar scanner.
9030 As a consequence, the relation between the grammar scanner and
9031 parser is much simpler. We can also split "composite tokens" back
9032 into simple tokens.
9033 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9034 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9035 rename as...
9036 * src/location.h, src/location.c (add_column_width)
9037 (location_compute): these.
9038 Fix the column count: the initial column is 0.
9039 (location_print): Be robust to ending column being 0.
9040 * src/location.h (boundary_set): New.
9041 * src/main.c: Adjust to scanner_free being renamed as
9042 gram_scanner_free.
9043 * src/output.c: Include scan-code.h.
9044 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9045 Use boundary_set.
9046 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9047 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9048 which is now, again, a separate token.
9049 Adjust all dependencies.
9050 Whereever actions with $ and @ are used, use translate_code.
9051 (action): Remove this nonterminal which is now useless.
9052 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9053 (grammar_current_rule_action_append): Use translate_code.
9054 (packgram): Bound check ruleno, itemno, and rule_length.
9055 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9056 (last_string, last_braced_code_loc, max_left_semantic_context)
9057 (scanner_initialize, scanner_free, scanner_last_string_free)
9058 (gram_out, gram_lineno, YY_DECL_): Move to...
9059 * src/scan-gram.h: this new file.
9060 (YY_DECL): Rename as...
9061 (GRAM_DECL): this.
9062 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9063 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9064 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9065 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9066 Move these declarations, and...
9067 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9068 these to...
9069 * src/flex-scanner.h: this new file.
9070 * src/scan-gram.l (rule_length, rule_length_overflow)
9071 (increment_rule_length): Remove.
9072 (last_braced_code_loc): Rename as...
9073 (gram_last_braced_code_loc): this.
9074 Adjust to the changes of the parser.
9075 Move all the handling of $ and @ into...
9076 * src/scan-code.l: here.
9077 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9078 (handle_action_dollar, handle_action_at): Move to...
9079 * src/scan-code.l: here.
9080 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9081 scan-code.h, scan-code-c.c, scan-gram.h.
9082 (EXTRA_bison_SOURCES): Add scan-code.l.
9083 (BUILT_SOURCES): Add scan-code.c.
9084 (yacc): Be robust to white spaces.
9085
9086 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9087 * tests/regression.at: Adjust the column numbers.
9088 * tests/regression.at: Adjust the error message.
9089
9090 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9091
9092 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9093 Use Akim's wording from
9094 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9095
9096 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9097
9098 Between Bison releases, manually append `+' to the previous Bison
9099 release number, and use that as a signal to automatically print the
9100 ChangeLog's CVS Id keyword from --version. Discussed starting at
9101 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9102 * ChangeLog: Add Id header.
9103 * configure.ac (AC_INIT): Append `+' to `2.3'.
9104 * src/.cvsignore: Add revision.c.
9105 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9106 (BUILT_SOURCES): Add revision.c.
9107 (revision.c): New target rule. This file defines a new global variable
9108 named revision. It initializes it with either the Id from ChangeLog
9109 or, if VERSION doesn't contain `+', with the empty string.
9110 * src/getargs.c (version): Print the value of revision.
9111 * src/revision.h: Extern revision.
9112
9113 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9114
9115 * NEWS: Version 2.3.
9116 * configure.ac (AC_INIT): Likewise.
9117
9118 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9119
9120 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9121 with no arguments, not as an object-like macro. This is for
9122 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9123 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9124 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9125 Document this.
9126
9127 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9128
9129 * src/getargs.c (usage): Back out yesterday's modification of the
9130 --help output so that we don't have to wait for translation before
9131 releasing 2.3.
9132
9133 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9134
9135 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9136 Problem reported by Akim Demaille.
9137
9138 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9139
9140 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9141
9142 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9143
9144 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9145 generated source code. Problem reported by Frans Englich in
9146 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9147
9148 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9149
9150 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9151 shell, not within 'make', so that 'make' by an ordinary builder
9152 (using GNU make) does not worry about configuring gzip. This also
9153 works around a bug reported independently by Keith Thompson and by
9154 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9155 stderr rather than stdout, messing up the build logs.
9156
9157 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9158
9159 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9160 to make sure that YYID will never be unused. This fixes a 'make
9161 maintainer-check' failure caused by the recent changes to the 'Trivial
9162 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9163 not used.
9164 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9165
9166 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9167
9168 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9169 state before an empty RHS is always resolved here. Only the location
9170 of that state is guaranteed to be resolved, and that's enough. This
9171 fixes the remaining bug reported by Derek M. Jones in
9172 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9173 * tests/glr-regression.at (Uninitialized location when reporting
9174 ambiguity): Test the above case.
9175 Also, the embedded comments in this test case claim it checks the case
9176 of an empty RHS that has inherited the initial location. However, the
9177 corresponding LHS was already resolved, so yyresolveLocations didn't
9178 actually have reason to modify it. Fix this by forcing
9179 nondeterministic operation at the beginning of the parse.
9180
9181 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9182
9183 * data/c.m4 (b4_yy_symbol_print_generate):
9184 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9185 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9186 of the bugs reported today by Derek M Jones in
9187 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9188 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9189 defined to be a type name without parens or brackets.
9190 (Location Type): Similarly for YYLTYPE.
9191 * tests/regression.at (Trivial grammars): Put in a test for this
9192 bug that will be caught by 'make maintainer-check' (though not,
9193 alas, by 'make check' unless your compiler is picky).
9194
9195 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9196
9197 * NEWS: Version 2.2.
9198 * configure.ac (AC_INIT): Likewise.
9199
9200 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9201
9202 * data/glr.c (yyreportTree): Make room in yystates for the state
9203 preceding the RHS. This fixes the segmentation fault reported by Derek
9204 M. Jones in
9205 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9206 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9207 to the user. Reported for yyreportTree by Derek M. Jones later in the
9208 same thread.
9209 * THANKS: Add Derek M. Jones.
9210 Update my email address.
9211 Fix typo in Steve Murphy's name.
9212
9213 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9214
9215 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9216 checking against YYLAST that caused the parser to miss a potential
9217 alternative in its diagnostic.
9218 Problem reported by Maria Jose Moron Fernandez in
9219 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9220 * data/lalr1.cc (yysyntax_error_): Likewise.
9221 * data/yacc.c (yysyntax_error): Likewise.
9222 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9223 tokens, in case we run into an older C compiler.
9224 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9225 Use them to check for the off-by-one error fixed above.
9226
9227 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9228 YYSIZE_T, not size_t.
9229 * tests/regression.at (Trivial grammars): New test, to catch
9230 the error fixed by the above patch.
9231
9232 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9233
9234 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9235 scheme.
9236 Reported by Steve Murphy.
9237
9238 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9239
9240 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9241 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9242
9243 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9244
9245 Implement --trace=m4.
9246 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9247 * src/output.c (output_skeleton): When set, pass -dV to m4.
9248
9249 Factor the handling of flags in m4.
9250 * src/output.c (prepare): Rename the muscle names debug, defines,
9251 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9252 * data/c.m4: Adjust.
9253 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9254 Use b4_define_flag_if to define other b4_FLAG_if macros.
9255 (b4_location_if): As a consequence, rename as...
9256 (b4_locations_if): this, for consistency.
9257 Adjust all the skeletons.
9258
9259 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9260
9261 * etc/bench.pm: Shorten bench names.
9262
9263 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9264
9265 * src/output.h, src/output.c (error_verbose): Move to...
9266 * src/getargs.h, src/getargs.c: here.
9267 Sort the flags.
9268 Adjust dependencies.
9269
9270 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9271
9272 * data/c.m4 (b4_copyright): Put the special exception for Bison
9273 skeletons here, so we don't have to put it in each skeleton. All
9274 uses changed. Suggested by Akim Demaille. Also, wrap the
9275 copyright notice, in case it is longer than 80 columns. Replace
9276 comma by newline after title.
9277
9278 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9279
9280 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9281 incompatibility, not a bug. Mention that it wasn't fixed as of
9282 flex 2.5.33.
9283
9284 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9285
9286 * examples/extexi: Enforce the precedence of concatenation over
9287 >>.
9288 Reported by Tommy Nordgren.
9289
9290 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9291
9292 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9293 with the member "token".
9294 Reported by Martin Nylin.
9295
9296 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9297
9298 * data/glr.c: Switch to Bison 2.2 special-exception language in
9299 the copyright notice. Use more-regular format for titles and
9300 copyright notices.
9301 * data/glr.cc: Likewise.
9302 * data/location.cc: Likewise.
9303 * data/yacc.cc: Likewise.
9304 * doc/bison.texinfo (Conditions): Document this.
9305 * NEWS: likewise. Upgrade version to 2.2.
9306
9307 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
9308
9309 * data/glr.cc: Remove dead code.
9310
9311 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9312
9313 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9314 that variable and the line breaks the bootstrap. Problem reported
9315 by Juan M. Guerrero.
9316
9317 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9318
9319 * doc/bison.texinfo (Multiple start-symbols): New.
9320
9321 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9322
9323 * etc/README, etc/bench.pl: New.
9324
9325 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
9326
9327 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9328 rule.
9329 Reported by Mickael Labau.
9330 * tests/input.at (Torturing the Scanner): Test it.
9331
9332 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9333
9334 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9335 Problem reported by Bob Rossi.
9336
9337 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9338
9339 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9340 and didn't really work.
9341 For the index, use @ifnotinfo, not @iftex.
9342 Minor cleanups of spacing and terminology.
9343
9344 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9345
9346 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9347 of AT_NAME_PREFIX when %name-prefix is not used.
9348
9349 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9350
9351 Apply --prefix to C++ skeletons too: they change the namespace.
9352 The test suite already exercize these cases.
9353 * data/c++.m4 (b4_namespace): New.
9354 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9355 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9356 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9357 * doc/bison.texinfo: Document it.
9358 (Option Cross Key): Use @multitable in all formats. It looks
9359 nicer, even in TeX outputs.
9360 (Rules): Use the same code whatever the output type is.
9361 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9362 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9363 * tests/calc.at: Use it, instead of hard coding `yy'.
9364
9365 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9366
9367 * TODO: Remove dead items.
9368
9369 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9370
9371 * doc/FAQ: Remove, merged into...
9372 * doc/bison.texinfo (FAQ): this.
9373 * doc/Makefile.am (EXTRA_DIST): Adjust.
9374
9375 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9376
9377 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9378 even if empty.
9379 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9380 * doc/bison.texinfo (Calc++ Scanner): Use it.
9381
9382 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9383
9384 Fix two nits reported by twlevo, plus one more that I discovered.
9385
9386 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9387 this is the usual Bison style.
9388 * src/location.h (location_print): Likewise.
9389
9390 * src/reader.h (token_name): Likewise.
9391
9392 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9393
9394 Fix some nits reported by twlevo.
9395 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9396 and "POSIX". Use more-modern syntax for URLs. Mention C++
9397 and ask for Java. Don't hardwire OS version numbers. Add
9398 copyright notice.
9399 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9400 * src/conflicts.c (solved_conflicts_obstack): Now static.
9401
9402 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
9403
9404 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
9405 page. Say "you can use it" not "you may use it" as on the web page;
9406 we're describing capabilities not granting permission.
9407
9408 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
9409
9410 * data/glr.c (yyresolveLocations): Rename local variables to avoid
9411 shadowing warnings. Use usual patter for iterating through RHS.
9412 * tests/glr-regression.at
9413 (Uninitialized location when reporting ambiguity):
9414 Modify yylex so that it uses its argument, rather than trying
9415 to rely on ARGSUSED (which doesn't work for gcc with warnings).
9416 const char -> char const.
9417
9418 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
9419 Don't use tabs inside commands; it messes up 'ps'.
9420 Problem reported by twlevo.
9421
9422 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
9423
9424 * tests/glr-regression.at (Uninitialized location when reporting
9425 ambiguity): New test case.
9426 * data/glr.c (yyresolveLocations): New function, which uses
9427 YYLLOC_DEFAULT.
9428 (yyresolveValue): Invoke yyresolveLocations before reporting an
9429 ambiguity.
9430 * doc/bison.texinfo (Default Action for Locations): Note
9431 YYLLOC_DEFAULT's usage for ambiguity locations.
9432 (GLR Semantic Actions): Cross-reference those notes.
9433
9434 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
9435
9436 * tests/glr-regression.at (Leaked semantic values when reporting
9437 ambiguity): Remove unnecessary union and type declarations.
9438 (Leaked lookahead after nondeterministic parse syntax error): New test
9439 case.
9440 * data/glr.c (yyparse): Check for zero stacks remaining before
9441 attempting to shift the lookahead so that you don't lose it.
9442
9443 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9444
9445 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
9446 * tests/glr-regression.at (Leaked semantic values when reporting
9447 ambiguity): New test case.
9448 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
9449 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
9450 now unnecessary yystackp parameter.
9451 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
9452 destructors can be called.
9453
9454 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
9455 in existing testcases.
9456
9457 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9458
9459 Don't leak semantic values for parent RHS when a user action cuts the
9460 parser, and clean up related code a bit.
9461 * tests/glr-regression.at (Leaked merged semantic value if user action
9462 cuts parse): Rename to...
9463 (Leaked semantic values if user action cuts parse): ... this. Add check
9464 for leaked parent RHS values.
9465 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
9466 between an unresolved state (non-empty chain of semantic options) and
9467 an incomplete one (signaled by an empty chain).
9468 (yyresolveStates): Document the interface. Move all manipulation of a
9469 successfully or unsuccessfully resolved yyGLRState to...
9470 (yyresolveValue): ... here so that yyresolveValue always leaves a
9471 yyGLRState with consistent data and thus is easier to understand.
9472 Remove the yyvalp and yylocp parameters since they are always just
9473 taken from the yys parameter. When reporting a discarded merged value
9474 in debugging output, note that it is incompletely merged. Document the
9475 interface.
9476 (yyresolveAction): If resolving any of the RHS states fails, destroy
9477 them all rather than leaking them. Thus, as long as user actions are
9478 written to clean up the RHS correctly, yyresolveAction always cleans up
9479 the RHS of a semantic option. Document the interface.
9480
9481 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
9482
9483 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
9484 led to a segmentation fault in GNU Pascal. Problem reported
9485 by Waldek Hebisch.
9486
9487 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
9488
9489 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
9490 mid-rule action inside a nonterminal symbol in order to declare a
9491 destructor for its semantic value.
9492
9493 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
9494
9495 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
9496 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
9497 __cplusplus && ! defined _STDLIB_H && !
9498 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
9499 defined free))]: Include <stdlib.h> rather than rolling our own
9500 declarations of malloc and free, to avoid problems with
9501 incompatible declarations (using 'throw') C++'s stdlib.h. This
9502 should fix Debian bug 340012
9503 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
9504 reported by Guillaume Melquiond.
9505
9506 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9507
9508 * NEWS: Clarify symbols versus types in unused-value warnings.
9509
9510 * configure.ac (AC_INIT): Bump version number.
9511
9512 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9513
9514 * NEWS: Version 2.1a.
9515 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
9516 since C99 requires this.
9517
9518 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
9519
9520 * m4/c-working.m4: New file.
9521 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
9522
9523 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
9524
9525 * Makefile.maint: Merge from coreutils.
9526
9527 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
9528
9529 More portability fixes for problems summarized by Nelson H. F. Beebe.
9530
9531 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
9532 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
9533 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
9534 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
9535 messes up because C++ code is compiled in 32-bit mode but linked
9536 in 64-bit mode.
9537
9538 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
9539
9540 More portability fixes for problems summarized by Nelson H. F. Beebe.
9541
9542 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
9543 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
9544
9545 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
9546 nodist_PROGRAMS, since we don't need to actually compile the
9547 example if we're just doing a plain 'make'. This avoids bothering
9548 the installer unnecessarily about problems due to weird C++
9549 compilers.
9550
9551 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
9552
9553 More portability fixes for problems summarized by Nelson H. F. Beebe.
9554
9555 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
9556 than #include "...", and compile with -I'.'. The old method was
9557 not portable, according to Posix and the C standard, and it does
9558 not work with Sun C 5.7, where previous #line directives affect
9559 the working directory used in later #include "..." directives.
9560
9561 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9562
9563 Various DJGGP specific issues in /djgpp
9564
9565 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
9566
9567 More portability fixes for problems summarized by Nelson H. F. Beebe.
9568
9569 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
9570 '#include <map>' works and that you can apply ++ to iterators.
9571
9572 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
9573
9574 Work around portability problems summarized by Nelson H. F. Beebe in
9575 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
9576
9577 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9578 that '#include <string>' works.
9579
9580 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
9581 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
9582 "warning: sorry: semantics of inline function static data `const
9583 unsigned char translate_table[262]' are wrong (you'll wind up with
9584 multiple copies)".
9585
9586 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
9587 or, xor to not_, and_, or_, and xor_, respectively. This works
9588 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
9589 random system header somewhere that includes the equivalent of
9590 <iso646.h>.
9591
9592 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
9593 -E" works; it apparently doesn't work with PathScale EKO Compiler
9594 Suite Version 2.0.
9595
9596 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
9597
9598 During deterministic GLR operation, user actions should be able to
9599 influence the parse by changing yychar. To make this easier to fix and
9600 to make glr.c easier to evolve in general, don't maintain yytoken in
9601 parallel with yychar; just compute yytoken when needed.
9602 * tests/glr-regression.at (Incorrect lookahead during deterministic
9603 GLR): Check that setting yychar in a user action has the intended
9604 effect.
9605 * data/glr.c (yyGLRStack): Remove yytokenp member.
9606 (yyclearin): Don't set *yytokenp.
9607 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
9608 yychar rather than *yytokenp to determine the current lookahead.
9609 Compute yytoken locally when needed.
9610 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
9611 point to.
9612
9613 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
9614 after `--report' documentation.
9615
9616 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
9617
9618 * src/parse-gram.y (grammar_declaration): Location of printer
9619 symbol is @1, not list->location. Bug reported by twlevo.
9620 * tests/input.at (Incompatible Aliases): Adjust to above change.
9621
9622 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
9623
9624 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
9625 all the test at once. This makes the output easier to read in the
9626 normal case.
9627
9628 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
9629 got from <http://bro-ids.org/download.html>. The bug is that
9630 when two actions appeared in succession, the second one was
9631 scanned before the first one was added to the grammar rule
9632 as a midrule action. Bison then output the incorrect warning
9633 "parse.y:905.17-906.36: warning: unused value: $3".
9634 * src/parse-gram.y (BRACED_CODE, action): These are no longer
9635 associated with a value.
9636 (rhs): Don't invoke grammar_current_rule_action_append.
9637 (action): Invoke it here instead.
9638 * src/reader.c (grammar_midrule_action): Now extern.
9639 (grammar_current_rule_action_append): Don't invoke
9640 grammar_midrule_action; that is now the scanner's job.
9641 * src/reader.h (last_string, last_braced_code_loc):
9642 (grammar_midrule_action): New decls.
9643 * src/scan-gram.l (last_string): Now extern, sigh.
9644 (last_braced_code_loc): New extern variable.
9645 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
9646 rule already has an action.
9647 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
9648 * tests/input.at (AT_CHECK_UNUSED_VALUES):
9649 Add some tests to check that the above changes fixed the bug.
9650
9651 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
9652
9653 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
9654 All used changed. Check whether the symbol has a destructor,
9655 not whether it is typed.
9656 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
9657 that the values are still reported as unused. All line numbers
9658 adjusted.
9659
9660 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
9661
9662 Work around a bug in bro 0.8, which underparenthesizes its
9663 definition of YYLLOC_DEFAULT.
9664 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
9665 their arguments.
9666 * data/lalr1.cc: Likewise.
9667 * data/yacc.cc: Likewise.
9668
9669 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
9670
9671 Work around a bug in Pike 7.0, and give the Pike folks a
9672 better way to override the usual int widths.
9673 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
9674 user can override the types.
9675 (short): #undef, to work around a bug in Pike 7.0.
9676 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
9677 (union yyalloc.yyss): Use yytype_int16 rather than short.
9678 All uses changed.
9679 (yysigned_char): Remove.
9680 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
9681 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
9682 * tests/regression.at (Web2c Actions): Adjust to above changes.
9683
9684 * src/reader.c (check_and_convert_grammar): New function.
9685 (reader): Close the input file even if something went wrong during
9686 parsing. Minor file descriptor leak reported by twlevo.
9687
9688 * src/assoc.c (assoc_to_string): Use a default: abort (); case
9689 to pacify gcc -Wswitch-default.
9690 * src/scan-gram.l (adjust_location): Use a default: break; case
9691 to pacify gcc -Wswitch-default.
9692 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
9693 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9694 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9695 Move these decls to scan-skel.l, since they don't need to be
9696 visible elsewhere.
9697 * src/scan-skel.l: Accept the above decls.
9698 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
9699 is used.
9700
9701 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
9702
9703 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
9704 since we don't want to insist on a version number at the start
9705 of the changelog every time.
9706 * Makefile.maint: Sync from coreutils a bit better.
9707 (sc_trailing_blank): Renamed from sc_trailing_space.
9708 All uses changed.
9709 (sc_no_if_have_config_h, sc_require_config_h):
9710 (sc_prohibit_assert_without_use): New rules.
9711 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
9712 (sc_dd_max_sym_length): Fix leading spaces in rule.
9713 (sc_system_h_headers): Prefix with @.
9714 (sc_useless_cpp_parens, m4-check): Output line numbers.
9715 (changelog-check): Allow version only in head.
9716 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
9717 satisfy new Makefile.maint rule.
9718 * data/glr.c: Likewise.
9719 * data/glr.cc: Likewise.
9720 * data/lalr1.cc: Likewise.
9721 * data/yacc.c: Likewise.
9722 * lib/ebitsetv.c: Likewise.
9723 * lib/lbitset.c: Likewise.
9724 * lib/subpipe.c: Likewise.
9725 * lib/timevar.c: Likewise.
9726 * src/system.h: Likewise.
9727 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
9728 * djgpp/Makefile.maint: Add copyright notice.
9729 * djgpp/README.in: Likewise.
9730 * djgpp/config.bat: Likewise.
9731 * djgpp/config.site: Likewise.
9732 * djgpp/config_h.sed: Likewise.
9733 * djgpp/djunpack.bat: Likewise.
9734 * djgpp/config.sed: Fix copyright notice to match standard format.
9735 * djgpp/subpipe.h: Likewise.
9736 * lib/bitsetv-print.c: Likewise.
9737 * lib/bitsetv.c: Likewise.
9738 * lib/subpipe.h: Likewise.
9739 * lib/timevar.c: Likewise.
9740 * lib/timevar.h: Likewise.
9741 * djgpp/subpipe.c: Use standard recipe for config.h.
9742 * lib/abitset.c: Likewise.
9743 * lib/bitset.c: Likewise.
9744 * lib/bitset_stats.c: Likewise.
9745 * lib/bitsetv-print.c: Likewise.
9746 * lib/bitsetv.c: Likewise.
9747 * lib/ebitsetv.c: Likewise.
9748 * lib/get-errno.c: Likewise.
9749 * lib/lbitset.c: Likewise.
9750 * lib/subpipe.c: Likewise.
9751 * lib/timevar.c: Likewise.
9752 * lib/vbitset.c: Likewise.
9753 * tests/local.at: Likewise.
9754 * src/scan-gram.l: Don't include verify.h, since system.h does
9755 that for us.
9756 * .x-sc_require_config_h: New file.
9757 * .x-sc_unmarked_diagnostics: New file.
9758
9759 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
9760
9761 Be a bit more systematic about using 'abort'.
9762 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
9763 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
9764 Put 'default: abort ();' before some other case, to satisfy older
9765 pedantic compilers.
9766 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9767 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
9768 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
9769 * src/conflicts.c (resolve_sr_conflict): Likewise.
9770 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
9771 (get_decision_str, get_orientation_str, get_node_alignment_str):
9772 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
9773 (get_linestyle_str, get_arrowstyle_str): Likewise.
9774 * src/conflicts.c (resolve_sr_conflict):
9775 Use a default case rather than one for the one remaining enum
9776 value, to catch invalid enum values as well.
9777 * src/lalr.c (set_goto_map, map_goto):
9778 Prefer "assert (FOO);" to "if (!FOO) abort ();".
9779 * src/nullable.c (nullable_compute, token_definitions_output):
9780 Likewise.
9781 * src/reader.c (packgram, reader): Likewise.
9782 * src/state.c (transitions_to, state_new, state_reduction_find):
9783 Likewise.
9784 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
9785 (symbol_pack): Likewise.
9786 * src/tables.c (conflict_row, pack_vector): Likewise.
9787 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
9788 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
9789 * src/system.h: Don't include <assert.h>.
9790 (assert): New macro.
9791
9792 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
9793 (Destructor Decl, Parser Function, Pure Calling):
9794 Describe rules for braces inside C code more carefully.
9795
9796 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
9797
9798 Fix some porting glitches found by Nelson H. F. Beebe.
9799 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
9800 compilers that don't understand that abort () does not return.
9801 * src/state.c (transitions_to): Likewise.
9802 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9803 that '#include <cstdlib>' works.
9804 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
9805 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
9806 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
9807 for the benefit of some pre-C99 compilers.
9808
9809 * bootstrap: Undo changes to gnulib files that autoreconf made.
9810
9811 Minor fixups to get 'make maintainer-check' to work.
9812 * configure.ac: Don't use -Wnested-externs, as it's incompatible
9813 with the new verify.h implementation.
9814 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
9815 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
9816 * data/yacc.c (YYUSE): Likewise.
9817 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
9818 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
9819 * src/parse-gram.y (declaration): Don't pass a string constant
9820 to a function that expects char *, since GCC might complain
9821 about the constant value.
9822 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
9823 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
9824 before #defining them.
9825 * tests/glr-regression.at
9826 (Incorrectly initialized location for empty right-hand side in GLR):
9827 In yyerror, use the msg arg.
9828 (Corrupted semantic options if user action cuts parse):
9829 (Incorrect lookahead during deterministic GLR):
9830 (Incorrect lookahead during nondeterministic GLR):
9831 Don't name a local var 'index'; it shadows string.h's 'index'.
9832
9833 2006-01-19 Akim Demaille <akim@epita.fr>
9834
9835 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
9836 location, not just parts of it.
9837
9838 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
9839
9840 * NEWS: Document the fact that multiple %unions are now allowed.
9841 * doc/bison.texinfo (Union Decl): Likewise.
9842 * TODO: This feature is now implemented, so remove it from
9843 the wishlist.
9844
9845 * Makefile.maint: Merge with coreutils Makefile.maint.
9846 (CVS_LIST): Use build-aux version if available.
9847 (VERSION_REGEXP): New macro.
9848 (syntax-check-rules): Add sc_no_if_have_config_h,
9849 sc_prohibit_assert_without_use, sc_require_config_h,
9850 sc_useless_cpp_parens.
9851 (sc_obsolete_symbols): Check for O_NDELAY.
9852 (sc_dd_max_sym_length): Track coreutils.
9853 (sc_unmarked_diagnostics): Look in all files, not just *.c.
9854 (sc_useless_cpp_parens): New rule.
9855 (news-date-check): Look for version or today's date.
9856 (changelog-check): Don't require version number near head.
9857 (copyright-check): Use current year instead of hardwiring 2005.
9858 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
9859 (announcement): Add --gpg-key-ID.
9860
9861 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
9862 with "file system".
9863
9864 Avoid undefined behavior that addressed just before the start of an
9865 array. Problem reported by twlevo.
9866 * src/reader.c (packgram): Prepend a new sentinel before ritem.
9867 * src/lalr.c (build_relations): Rely on new sentinel.
9868 * src/gram.c (gram_free): Adjust to new sentinel.
9869
9870 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9871
9872 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9873 yylookaheadNeeds. All uses updated.
9874 (yysplitStack): Rename local yynewLookaheadStatuses to
9875 yynewLookaheadNeeds.
9876 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9877 GLR): In comments, change `lookahead status' to `lookahead need'.
9878
9879 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9880
9881 * data/glr.c (yysplitStack): A little stylistic rewrite.
9882
9883 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9884
9885 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9886
9887 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9888
9889 * doc/bison.texinfo: Fix some typos.
9890 (GLR Semantic Actions): New subsection discussing special
9891 considerations because GLR semantic actions might be deferred.
9892 (Actions): Mention look-ahead usage of yylval.
9893 (Actions and Locations): Mention look-ahead usage of yylloc.
9894 (Special Features for Use in Actions): Add YYEOF entry and mention it
9895 in the yychar entry.
9896 In the yychar entry, remove mention of the local yychar case (pure
9897 parser) since this is irrelevant information when writing semantic
9898 actions and since it's already discussed in `Table of Symbols' where
9899 yychar is otherwise described as an external variable.
9900 In the yychar entry, don't call it the `current' look-ahead since it
9901 isn't when semantic actions are deferred.
9902 In the yychar and yyclearin entries, add note about deferred semantic
9903 actions.
9904 Add yylloc and yylval entries discussing look-ahead usage.
9905 (Look-Ahead Tokens): When discussing yychar, don't call it the
9906 `current' look-ahead, and do mention yylval and yylloc.
9907 (Error Recovery): Cross-reference `Action Features' when mentioning
9908 yyclearin.
9909 (Table of Symbols): In the yychar entry, don't call it the `current'
9910 look-ahead.
9911 In the yylloc and yylval entries, mention look-ahead usage.
9912
9913 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9914
9915 * tests/glr-regression.at: Update copyright year to 2006.
9916
9917 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9918
9919 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9920 use during nondeterministic operation to track which stacks have
9921 actually needed the current lookahead.
9922 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9923 Allocate, deallocate, resize, and otherwise shuffle space for
9924 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9925 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9926 appropriately during nondeterministic operation.
9927 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9928 members to store the current lookahead to be used by the deferred
9929 user action.
9930 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9931 from which the RHS is taken. Set the lookahead members of the new
9932 yySemanticOption according to the lookahead status for stack yyk.
9933 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9934 yyaddDeferredAction.
9935 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9936 members of yySemanticOption before invoking yyuserAction, and then set
9937 them back to their current values afterward.
9938 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9939 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9940 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9941 titles for consistency.
9942 (Leaked merged semantic value if user action cuts parse): In order to
9943 suppress lint warnings, use arguments in merge function, and assign
9944 char value < 128 in main.
9945 (Incorrect lookahead during deterministic GLR): New test case.
9946 (Incorrect lookahead during nondeterministic GLR): New test case.
9947
9948 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9949
9950 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9951 !yyvaluep as signal that no semantic value is available to print.
9952 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9953 to print a semantic value.
9954
9955 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9956
9957 * tests/glr-regression.at: For consistency with my newer test cases,
9958 don't thank myself.
9959
9960 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9961
9962 * data/glr.c (yyresolveValue): When merging semantic options, if at
9963 least one user action succeeds but a later one cuts the parse, then
9964 destroy the semantic value before returning rather than leaking it.
9965 (yyresolveStates): If a user action cuts the parse and thus
9966 yyresolveValue fails, ignore the (unset) semantic value rather than
9967 corrupting the yyGLRState, and empty the semantic options list since
9968 the user actions should have called all necessary destructors.
9969 Simplify code with YYCHK.
9970 * tests/glr-regression.at (Corrupted semantic options if user action
9971 cuts parse): New test case.
9972 (Undesirable destructors if user action cuts parse): New test case.
9973 Before applying any of this patch, this test case never actually failed
9974 for me... but only because the corrupted semantic options usually
9975 masked this bug.
9976 (Leaked merged semantic value if user action cuts parse): New test
9977 case.
9978
9979 2006-01-05 Akim Demaille <akim@epita.fr>
9980
9981 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9982
9983 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9984
9985 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9986 _MSC_VER. Problem reported by Cenzato Marco.
9987 (b4_c_function_def): Use it.
9988 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9989 b4_c_modern.
9990 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9991 than rolling our own.
9992
9993 2006-01-04 Akim Demaille <akim@epita.fr>
9994
9995 Also warn about non-used mid-rule values.
9996 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9997 member.
9998 (symbol_list_new): Adjust.
9999 * src/reader.c (symbol_typed_p): New.
10000 (grammar_rule_check): Use it.
10001 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10002 Check its rule.
10003 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10004 Use it.
10005 * tests/actions.at (Exotic Dollars): Adjust.
10006
10007 2006-01-04 Akim Demaille <akim@epita.fr>
10008
10009 * src/reader.c (grammar_midrule_action): If $$ is set in a
10010 mid-rule, move the `used' bit to its lhs.
10011 * tests/input.at (Unused values): New.
10012 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10013
10014 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10015
10016 * doc/bison.texinfo (Bison Options): Say more accurately what
10017 --yacc does.
10018 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10019 about declarations in the grammar when in Yacc mode, as POSIX does
10020 not require a diagnostic when the grammar uses extensions.
10021
10022 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10023
10024 Warn about dubious constructions like "%token T T".
10025 Reported by twlevo.
10026 * src/symtab.h (struct symbol.declared): New member.
10027 * src/symtab.c (symbol_new): Initialize it to false.
10028 (symbol_class_set): New arg DECLARING, specifying whether
10029 this is a declaration that we want to warn about, if there
10030 is more than one of them. All uses changed.
10031
10032 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10033 Allow multiple %union directives, whose contents concatenate.
10034 * src/parse-gram.y (grammar_declaration): Likewise.
10035 Use muscle_code_grow, so that we don't need stype_line any more.
10036 All uses changed.
10037
10038 * src/muscle_tab.c (muscle_grow): Fix comment.
10039
10040 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10041 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10042 Update copyright year to 2006.
10043
10044 2006-01-03 Akim Demaille <akim@epita.fr>
10045
10046 Have glr.cc pass (some of) the calc.at tests.
10047 * data/glr.cc (b4_parse_param_orig): New.
10048 (b4_parse_param): Improve its definition, and bound it more
10049 clearly in the skeleton.
10050 (b4_epilogue): Append, instead of prepending, in order to keep
10051 #line consistency.
10052 Simplify the generation of auxiliary functions: locations and
10053 purity are mandated.
10054 (b4_global_tokens_and_yystype): Honor it.
10055 * data/location.cc (c++.m4): Don't include it.
10056 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10057 and AT_SKEL_CC_IF.
10058 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10059 AT_LALR1_CC_IF.
10060 Be sure to initialize the first position's filename.
10061 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10062 mandated anyway.
10063 (AT_CHECK_CALC_GLR_CC): New.
10064 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10065
10066 2006-01-02 Akim Demaille <akim@epita.fr>
10067
10068 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10069 c.m4.
10070 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
10071 * data/glr.cc: Do not include stack.hh.
10072
10073 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10074
10075 * data/glr.c: Reformat whitespace with tabs.
10076 (b4_lpure_formals): Remove this unused m4 macro.
10077 * tests/cxx-type.at: Reformat whitespace with tabs.
10078 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10079 since it's a member. Rename type to isNterm for clarity.
10080
10081 2005-12-29 Akim <akim@sulaco.local>
10082
10083 Let glr.cc catch up with symbol_value_print.
10084 * data/glr.cc (b4_yysymprint_generate): Replace by...
10085 (b4_yy_symbol_print_generate): this.
10086 (yy_symbol_print, yy_symbol_value_print): Declare them.
10087
10088 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10089
10090 * src/location.h (boundary): Note that a line or column equal
10091 to INT_MAX indicates an overflow.
10092 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10093 (rule_length_overflow, increment_rule_length, add_column_width):
10094 New functions.
10095 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10096 (<SC_BRACED_CODE>"}"):
10097 Use increment_rule_length rather than incrementing it by hand.
10098 (adjust_location, handle_syncline): Diagnose overflow.
10099 (handle_action_dollar, handle_action_at):
10100 Fix bug with monstrosities like $-2147483648.
10101 Remove now-unnecessary checks.
10102 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10103 (convert_ucn_to_byte): Verify assumptions.
10104 (handle_syncline): New arg LOC. All callers changed.
10105 Don't store through a value derived from char const * pointer.
10106
10107 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10108 GCC warnings.
10109
10110 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10111
10112 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10113 Remove unnecessary forward static decls.
10114
10115 2005-12-27 Akim Demaille <akim@epita.fr>
10116
10117 * src/reader.c (grammar_current_rule_check): Also check that $$
10118 is used.
10119 Take the rule to check as argument, hence rename as...
10120 (grammar_rule_check): this.
10121 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10122 Rename as...
10123 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10124 (grammar_midrule_action, grammar_symbol_append): Now static.
10125 * tests/torture.at (input): Don't rely on the default action
10126 being always performed.
10127 * tests/calc.at: "Set" $$ even when the action is "cut" with
10128 YYERROR or other.
10129 * tests/actions.at (Exotic Dollars): Instead of using unused
10130 values, check that the warning is issued.
10131
10132 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10133
10134 * NEWS: Improve wording for unused-value warnings.
10135
10136 2005-12-22 Akim Demaille <akim@epita.fr>
10137
10138 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10139 (b4_yysymprint_generate): Rename as...
10140 (b4_yy_symbol_print_generate): this.
10141 Generate yy_symbol_print instead of yysymprint.
10142 Generate also yy_symbol_value_print, and use it.
10143
10144 2005-12-22 Akim Demaille <akim@epita.fr>
10145
10146 * NEWS: Warn about unused values.
10147 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10148 a `used' member.
10149 (symbol_list_n_get, symbol_list_n_used_set): New.
10150 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10151 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10152 * src/reader.c (grammar_current_rule_check): Check that values are
10153 used.
10154 * src/symtab.c (symbol_print): Accept 0.
10155 * tests/existing.at: Remove the type information.
10156 Empty the actions.
10157 Remove useless actions (beware of mid-rule actions: perl -000
10158 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10159 * tests/actions.at (Exotic Dollars): Use unused values.
10160 * tests/calc.at: Likewise.
10161 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10162 Likewise.
10163
10164 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10165 rule_useful_p.
10166
10167 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10168
10169 Undo 2005-12-01 tentative license wording change. The wording is
10170 still being reviewed by the lawyers, and we don't want to wait for
10171 them before publishing a test release. For now, revert to the
10172 previous wording.
10173 * NEWS: Undo 2005-12-01 change.
10174 * data/glr.c: Revert to previous license wording.
10175 * data/glr.cc: Likewise.
10176 * data/lalr1.cc: Likewise.
10177 * data/location.cc: Likewise.
10178 * data/yacc.c: Likewise.
10179
10180 * NEWS: Reword %destructor vs YYABORT etc.
10181 * data/glr.c: Use American spacing, for consistency.
10182 * data/glr.cc: Likewise.
10183 * data/lalr1.cc: Likewise.
10184 * data/yacc.c: Likewise.
10185 * data/yacc.c: Reformat comments slightly.
10186 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10187 for consistency. Fix some spelling errors and reword recently-included
10188 text slightly.
10189 * tests/cxx-type.at: Cast results of malloc, for C++.
10190
10191 2005-12-21 Joel E. Denny <address@hidden>
10192
10193 * tests/cxx-type.at: Construct a tree, count the parents of shared
10194 nodes, and free each node once and only once. Previously, the memory
10195 for semantic values was leaked instead.
10196
10197 2005-12-21 Joel E. Denny <address@hidden>
10198
10199 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10200 (yylval, yylloc): If pure, #define to yystackp->yyval and
10201 yystackp->yyloc similar to yychar and yynerrs.
10202 (yyparse): If pure, remove local yylval and yylloc. Add local
10203 yystackp to accommodate pure definitions of yylval and yylloc.
10204 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10205 yylvalp and yyllocp to &yylval and &yylloc.
10206 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10207 namespace. Previously, nerrs and char were missing, but lval and lloc
10208 weren't necessary.
10209 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10210 yylvalp and yyllocp parameters since, if pure, these are now always
10211 accessible through yystackp. If not pure, they are still accessible
10212 globally.
10213 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10214 `if (YYID (N))' to pacify lint.
10215
10216 2005-12-21 Akim Demaille <akim@epita.fr>
10217
10218 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10219 destroy the RHS symbols of a rule.
10220 * data/yacc.c (yylen): Initialize to 0.
10221 Keep its value to the number of items to possibly shift.
10222 In particular, a regular successful parse that ends on YYFINAL by
10223 a (internal) YYACCEPT must not have yylen != 0.
10224 (yyerrorlab, yyreturn): Pop the RHS.
10225 Reorder a bit to emphasize the `shifting' bits of code.
10226 (YYPOPSTACK): Now accept a number of items to pop.
10227 * data/lalr1.cc: Likewise.
10228 * data/glr.c: Formatting changes.
10229 Use goto instead of fall through.
10230 * doc/bison.texinfo (Destructor Decl): Complete.
10231
10232 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10233
10234 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10235 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10236 * djgpp/config.bat: Replace every occurence of the file name
10237 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10238 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10239 * djgpp/config.sed: Replace every occurence of the file name
10240 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10241 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10242 * djgpp/djunpack.bat: DJGPP specific file.
10243 * djgpp/fnchange.lst: DJGPP specific file.
10244 * djgpp/README.in: Add new information about how to unpack the bison
10245 source on MSDOS and other systems which have 8.3 file name restrictions
10246 using djunpack.bat and fnchange.lst.
10247
10248 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10249
10250 * bootstrap (build_cvs_prefix): Remove; unused.
10251 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10252 when getting gnulib.
10253
10254 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10255
10256 * data/glr.c: Reorder typedef declarations for structs to match order
10257 of struct declarations.
10258 Rename yystack everywhere to yystackp except in yyparse where it's not
10259 a pointer.
10260 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10261 consistency.
10262 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10263 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10264 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10265 lint.
10266
10267 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10268
10269 * tests/sets.at (Accept): Fix typos in regular expression used to
10270 sed out the final state number.
10271
10272 Work around portability problem on Solaris 10: flex-generated
10273 files include <stdio.h> before <config.h>, which messes up
10274 because the latter defines __EXTENSIONS__. Address the problem
10275 by creating two new little files that include <config.h> first,
10276 then include the flex-generated files. Rewrite everyone else
10277 to include <config.h> first, as well.
10278 * lib/timevar.c: Always include "config.h".
10279 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10280 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10281 (EXTRA_bison_SOURCES): New macro.
10282 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10283 * src/system.h: Don't include config.h.
10284 * src/LR0.c: Include <config.h> first.
10285 * src/assoc.c: Likewise.
10286 * src/closure.c: Likewise.
10287 * src/complain.c: Likewise.
10288 * src/conflicts.c: Likewise.
10289 * src/derives.c: Likewise.
10290 * src/files.c: Likewise.
10291 * src/getargs.c: Likewise.
10292 * src/gram.c: Likewise.
10293 * src/lalr.c: Likewise.
10294 * src/location.c: Likewise.
10295 * src/main.c: Likewise.
10296 * src/muscle_tab.c: Likewise.
10297 * src/nullable.c: Likewise.
10298 * src/output.c: Likewise.
10299 * src/parse-gram.y: Likewise.
10300 * src/print.c: Likewise.
10301 * src/print_graph.c: Likewise.
10302 * src/reader.c: Likewise.
10303 * src/reduce.c: Likewise.
10304 * src/relation.c: Likewise.
10305 * src/state.c: Likewise.
10306 * src/symlist.c: Likewise.
10307 * src/symtab.c: Likewise.
10308 * src/tables.c: Likewise.
10309 * src/uniqstr.c: Likewise.
10310 * src/vcg.c: Likewise.
10311
10312 * src/parse-gram.y: Fix minor problems uncovered by lint.
10313 (current_lhs, current_lhs_location): Now static.
10314 (current_assoc): Remove unused variable.
10315
10316 Cleanups so that Bison-generated parsers have less lint.
10317 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10318 Prepend /*ARGSUSED*/, for lint's sake.
10319 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10320 definition if 'lint' is defined.
10321 (YYID): New macro (or function, if lint).
10322 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10323 * data/yacc.c: Likewise.
10324 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10325 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10326 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10327 is C++ only.
10328 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10329 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10330 Use YYID(0) rather than 0, for lint.
10331 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10332 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10333
10334 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10335
10336 * tests/glr-regression.at
10337 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10338 Close memory leak reported by twlevo.
10339
10340 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10341
10342 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10343 all stacks.
10344 (yyparse): Iterate another stack in order to call user destructors.
10345 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10346 New test case.
10347 (Duplicated user destructor for lookahead): This test now is expected
10348 to succeed.
10349
10350 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10351
10352 * NEWS: Document the following change.
10353 * data/yacc.c: Say "parser skeleton" rather than "file", since
10354 it's no longer just a file.
10355 * data/glr.c: Grant a special exception for C GLR parsers, that
10356 reads like the already-existing exception for C LALR(1) parsers.
10357 * data/glr.cc: Likewise.
10358 * data/lalr1.cc: Likewise.
10359 * data/location.cc: Likewise.
10360 * data/yacc.c: Reword the "written by" statement to clarify that
10361 it was the parser skeleton, not the entire output file.
10362 * data/glr.c: Written by Paul Hilfinger.
10363 * data/glr.cc: Written by Akim Demaille.
10364 * data/lalr1.cc: Likewise.
10365
10366 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10367
10368 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10369 Fix typos in previous change that broke 'make check'.
10370 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10371 supported in C.
10372 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10373 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10374 We can revert this once things settle down.
10375
10376 * src/conflicts.c (conflicts_print): Don't print file name twice
10377 when %expect fails because there were no conflicts.
10378 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10379 change.
10380 * tests/conflicts.at (%expect not enough, %expect too much):
10381 (%expect with reduce conflicts): Adjust to new behavior.
10382
10383 2005-11-18 Akim Demaille <akim@epita.fr>
10384
10385 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10386 errors.
10387 * NEWS: Document this.
10388 * doc/bison.texinfo (Expect Decl): Likewise.
10389
10390 2005-11-16 Akim Demaille <akim@epita.fr>
10391
10392 Generalize the display of semantic values and locations in traces.
10393 * data/glr.c (yy_reduce_print): Fix indices (again).
10394 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10395 literal integers.
10396 * data/lalr1.cc (yyreduce_print): Rename as...
10397 (yy_reduce_print): this.
10398 Display values and locations.
10399 * data/yacc.c (yy_reduce_print): Likewise.
10400 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10401 (yysymprint): Move higher to be visible from yy_reduce_print).
10402 (yyparse): Adjust.
10403 * tests/calc.at: Adjust the expected length of the traces.
10404
10405 2005-11-14 Akim Demaille <akim@epita.fr>
10406
10407 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
10408 from 1 to N, while values and location start at 0.
10409 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
10410
10411 2005-11-14 Akim Demaille <akim@epita.fr>
10412
10413 * data/glr.c (yy_reduce_print): Fix the $ number.
10414
10415 2005-11-14 Akim Demaille <akim@epita.fr>
10416
10417 "Use" parse parameters.
10418 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
10419 * data/glr.c, data/glr.cc: Use them.
10420 * data/glr.c (YYUSE): Have a C++ definition that supports
10421 non-pointer types.
10422
10423 2005-11-14 Akim Demaille <akim@epita.fr>
10424
10425 * data/glr.c (yyexpandGLRStack): Declare only if defined.
10426
10427 2005-11-14 Akim Demaille <akim@epita.fr>
10428
10429 * data/glr.cc: New.
10430 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
10431
10432 2005-11-12 Akim Demaille <akim@epita.fr>
10433
10434 Let position and location be PODs.
10435 * data/location.cc (position::initialize, location::initialize): New.
10436 (position::position, location::location): Define only if
10437 b4_location_constructors is defined.
10438 * data/lalr1.cc (b4_location_constructors): Define it for backward
10439 compatibility.
10440 * doc/bison.texinfo (Initial Action Decl): Use initialize.
10441
10442 2005-11-12 Akim Demaille <akim@epita.fr>
10443
10444 * data/lalr1.cc: Move the body of the ctor and dtor into the
10445 parser file (instead of the header).
10446 Wrap the implementations in a "namespace yy".
10447
10448 2005-11-12 Akim Demaille <akim@epita.fr>
10449
10450 Have glr.c include its header file when created.
10451 * data/glr.c (b4_shared_declarations): New.
10452 Output them verbatim in the parser if !%defines, otherwise
10453 output then in the header file, and include it instead.
10454
10455 2005-11-11 Akim Demaille <akim@epita.fr>
10456
10457 * data/glr.c: Comment changes.
10458
10459 2005-11-11 Akim Demaille <akim@epita.fr>
10460
10461 When yydebug, report semantic and location values for reductions.
10462 * data/glr.c (yy_reduce_print): Report the semantic values and the
10463 locations.
10464 (YY_REDUCE_PRINT): Adjust.
10465 (yyglrReduce): Use them.
10466 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
10467 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
10468 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
10469 traces.
10470
10471 2005-11-10 Akim Demaille <akim@epita.fr>
10472
10473 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
10474 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
10475 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
10476
10477 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
10478
10479 * m4/cxx.m4, examples/Makefile.am: Don't build
10480 examples/calc++ if no C++ compiler is available. (trivial change)
10481
10482 2005-11-09 Akim Demaille <akim@epita.fr>
10483
10484 * src/scan-skel.l: Use a couple of asserts.
10485
10486 2005-11-03 Akim Demaille <akim@epita.fr>
10487
10488 In some (weird) cases, the final state number is incorrect.
10489 Reported by Alexandre Duret-Lutz.
10490 * src/LR0.c (state_list_append): Remove the computation of
10491 final_state.
10492 (save_reductions): Do it here.
10493 (get_state): Alpha conversion.
10494 (generate_states): Use a for loop.
10495 * src/gram.h (item_number_is_rule_number)
10496 (item_number_is_symbol_number): New.
10497 * src/state.c: Use assert.
10498 * src/system.h: Include assert.h.
10499 * tests/sets.at (Accept): New.
10500
10501 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10502
10503 * data/glr.c (yyfill): Adjust comment.
10504 (yyresolveAction): Initialize default location properly
10505 for empty right-hand sides.
10506 (yydoAction): Ditto.
10507 Add comment explaining apparently dead code.
10508 * tests/glr-regression.at
10509 (Incorrectly initialized location for empty right-hand side in GLR):
10510 New test.
10511
10512 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
10513
10514 * bootstrap (cleanup_gnulib): New function. Use it to clean up
10515 gnulib when interrupted. This fixes some race conditions and
10516 works around some portability problems (one noted by Paul
10517 Hilfinger).
10518
10519 2005-10-22 Akim <akim@epita.fr>
10520
10521 * Makefile.cfg: Adjust to config -> build-aux.
10522 Reported by twledo.
10523
10524 2005-10-21 Akim Demaille <akim@epita.fr>
10525
10526 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
10527 the %parse-params.
10528 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
10529 * data/yacc.c (b4_Pure_if): Rename as...
10530 (b4_yacc_pure_if): this.
10531 (YY_SYMBOL_PRINT, yyparse): Adjust.
10532 * doc/bison.texinfo: Formatting changes.
10533
10534 2005-10-21 Akim Demaille <akim@epita.fr>
10535
10536 Finish the transition config -> build-aux.
10537 * configure.ac, Makefile.am: Use build-aux.
10538 * config/prev-version, config/announce-gen, config/Makefile.am:
10539 Move to...
10540 * build-aux/prev-version, build-aux/announce-gen,
10541 * build-aux/Makefile.am: here.
10542
10543 2005-10-14 Akim Demaille <akim@epita.fr>
10544
10545 * examples/calc++/test: Use set -x only when VERBOSE.
10546
10547 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
10548
10549 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
10550 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
10551
10552 2005-10-13 Akim Demaille <akim@epita.fr>
10553
10554 * src/scan-skel.l: Output the base name parts of the parser and
10555 header file names.
10556 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
10557 additional checks.
10558 Use this to exercise C++ outputs in subdirs.
10559 Reported by Oleg Smolsky.
10560
10561 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
10562
10563 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
10564 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
10565 Problem reported by John P. Hartmann.
10566 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
10567 already defined it.
10568
10569 2005-10-12 Akim Demaille <akim@epita.fr>
10570
10571 * src/parse-gram.y (version_check): Exit 63 to please missing
10572 (stands for "version mismatch).
10573 * tests/input.at, doc/bison.texinfo: Adjust.
10574
10575 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
10576
10577 Work around portability problems with Visual Age C compiler
10578 (xlc and xlC_r) reported by John P. Hartmann.
10579 * data/location.cc (initial_column, initial_line): Remove.
10580 All uses replaced by 0 and 1.
10581 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
10582 that xlc complains about.
10583 * src/scan-skel.l (skel_wrap): Likewise.
10584 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
10585 as __STDC__.
10586 * data/yacc.c (YYMODERN_C): New macro, which also looks at
10587 __STDC_VERSION__. Use it everywhere instead of looking at
10588 __STDC__ and __cplusplus.
10589
10590 2005-10-10 Akim Demaille <akim@epita.fr>
10591
10592 * examples/calc++/test: Be quiet unless VERBOSE.
10593
10594 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
10595
10596 * data/c.m4 (yydestruct, yysymprint):
10597 Use YYUSE instead of casting to void.
10598 * data/glr.c (YYUSE): New macro.
10599 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10600 Use it instead of rolling our own.
10601 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10602 (YYCHK1):
10603 Use /*CONSTCOND*/ to suppress lint warnings.
10604 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10605 (YY_STACK_PRINT): Use 'false' not '0'.
10606 (YYUSE): New macro.
10607 (yysymprint_, yydestruct_): Use it instead of rolling our own.
10608 * data/yacc.c (YYUSE): New macro.
10609 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
10610 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
10611 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
10612
10613
10614 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
10615 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
10616
10617 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
10618
10619 Undo the parts of the unlocked-I/O change that substituted
10620 putc or puts for printf. This might hurt performance a bit,
10621 but some people prefer the printf style.
10622 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
10623 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
10624 All uses replaced by YYFPRINTF and YYDPRINTF.
10625 * data/yacc.c: Likewise.
10626 * lib/bitset.c (bitset_print): Likewise.
10627 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
10628 putc and puts.
10629 * lib/lbitset.c (debug_lbitset): Likewise.
10630 * src/closure.c (print_firsts, print_fderives): Likewise.
10631 * src/gram.c (grammar_dump): Likewise.
10632 * src/lalr.c (look_ahead_tokens_print): Likewise.
10633 * src/output.c (escaped_output): Likewise.
10634 (user_actions_output): Break apart two printfs.
10635 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
10636 * src/reduce.c (reduce_print): Likewise.
10637 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10638 * src/system.h: Include unlocked-io.h rathe than stdio.h.
10639
10640 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10641 Use assignments rather than casts-to-void to suppress
10642 unused-variable warnings. This pacifies 'lint'.
10643 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
10644 unused-variable warnings.
10645
10646 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10647
10648 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10649
10650 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
10651
10652 Use unlocked I/O for a minor performance improvement on hosts like
10653 GNU/Linux and Solaris that support unlocked I/O. The basic idea
10654 is to use the gnlib unlocked-io module, and to prefer putc and
10655 puts to printf when either will work (since the latter doesn't
10656 come in an unlocked flavor).
10657 * bootstrap (gnulib_modules): Add unlocked-io.
10658 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
10659 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
10660 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
10661 and similarly for puts and putc and printf.
10662 * data/yacc.c: Likewise.
10663 * lib/bitset.c (bitset_print): Likewise.
10664 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
10665 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
10666 to printf.
10667 * lib/lbitset.c (debug_lbitset): Likewise.
10668 * src/closure.c (print_firsts, print_fderives): Likewise.
10669 * src/gram.c (grammar_dump): Likewise.
10670 * src/lalr.c (look_ahead_tokens_print): Likewise.
10671 * src/output.c (escaped_output): Likewise.
10672 (user_actions_output): Coalesce two printfs.
10673 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
10674 * src/reduce.c (reduce_print): Likewise.
10675 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10676 * src/system.h: Include unlocked-io.h rather than stdio.h.
10677
10678 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
10679 this confuses xgettext.
10680
10681 2005-10-02 Akim Demaille <akim@epita.fr>
10682
10683 * bootstrap (gnulib_modules): Add strverscmp.
10684 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
10685 * m4/.cvsignore: Add strverscmp.m4.
10686 * src/parse-gram.y (%require): New token, new rule.
10687 (version_check): New.
10688 * src/scan-gram.l (%require): Adjust.
10689 * tests/input.at (AT_REQUIRE): New.
10690 Use it.
10691 * doc/bison.texinfo (Require Decl): New.
10692 (Calc++ Parser): Use %require.
10693
10694 2005-10-02 Akim Demaille <akim@epita.fr>
10695
10696 * data/location.cc: New.
10697
10698 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
10699 Akim Demaille <akim@epita.fr>
10700
10701 Make sure -odir/foo.cc creates dir/location.hh etc.
10702 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
10703 (spec_file_prefix, spec_verbose_file, spec_graph_file)
10704 (spec_defines_file): Now const.
10705 (dir_prefix): New.
10706 (short_base_name): Remove.
10707 * src/files.c: Adjust.
10708 (dirname.h): Include.
10709 (base_name): Don't prototype it.
10710 (finput): Remove, duplicates gram_in.
10711 (full_base_name, short_base_name): Replace by...
10712 (all_but_ext, all_but_tab_ext): these.
10713 (compute_base_names): Rename as...
10714 (compute_file_name_parts): this.
10715 Update to compute the new variables, including dir_prefix.
10716 Adjust dependencies.
10717 * src/output.c (prepare): Output them.
10718 * src/reader.c: Adjust to use gram_in, not finput.
10719 * src/scan-skel.l (@dir_prefix@): New.
10720
10721 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10722
10723 * lib/subpipe.c: New function end_of_output_subpipe() added
10724 to allow support for non-posix systems. This is a no-op function
10725 for posix systems.
10726
10727 * lib/subpipe.h: New function end_of_output_subpipe() added
10728 to allow support for non-posix systems. This is a no-op function
10729 for posix systems.
10730
10731 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
10732 handle the lack of pipe/fork functionality on non-posix systems.
10733
10734 * djgpp/Makefile.maint: DJGPP specific file.
10735
10736 * djgpp/README.in: DJGPP specific file.
10737
10738 * djgpp/config.bat: DJGPP specific configuration file.
10739
10740 * djgpp/config.sed: DJGPP specific configuration file.
10741
10742 * djgpp/config.site: DJGPP specific configuration file.
10743
10744 * djgpp/config_h.sed: DJGPP specific configuration file.
10745
10746 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
10747
10748 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
10749
10750 2005-10-02 Akim Demaille <akim@epita.fr>
10751
10752 * data/location.cc: New, extract from...
10753 * data/lalr1.cc: here.
10754 (location.hh): Include it after the user prologue, in case the
10755 filename type is defined by the user.
10756 Forward declation location and position before the pre-prologue.
10757 (yyresult_): Rename as...
10758 (yyresult): this, it's a local variable, not an attribute.
10759 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
10760
10761 2005-10-01 Akim Demaille <akim@epita.fr>
10762
10763 * examples/extexi: Restore the #line generation.
10764
10765 2005-09-30 Akim Demaille <akim@epita.fr>,
10766 Alexandre Duret-Lutz <adl@gnu.org>
10767
10768 Move the token type and YYSTYPE in the parser class.
10769 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
10770 (parser::token): New, from the moved free definition of tokens.
10771 (parser::semantic_value): Now a full definition instead of an
10772 indirection to YYSTYPE.
10773 (b4_post_prologue): No longer included in the header file, but
10774 in the implementation file.
10775 * doc/bison.texi (C+ Language Interface): Update.
10776 * src/parse-gram.y: Support unary %define.
10777 * tests/actions.at: Define global_tokens_and_yystype for backward
10778 compatibility until we update the tests.
10779 * tests/calc.at: Idem.
10780 (first_line, first_column, last_line, last_column): Define for lalr1.cc
10781 to simplify the code.
10782
10783 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
10784
10785 Port to SunOS 4.1.4, which lacks strtoul and strerror.
10786 Ah, the good old days! Problem reported by Peter Klein.
10787 * bootstrap (gnulib_modules): Add strerror, strtoul.
10788 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
10789 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
10790
10791 2005-09-29 Akim Demaille <akim@epita.fr>
10792
10793 * data/c.m4 (b4_error_verbose_if): New.
10794 * data/lalr1.cc: Use it.
10795 (YYERROR_VERBOSE_IF): Remove.
10796 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
10797 parser members, replaced by...
10798 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
10799 local variables.
10800 (yysyntax_error_): Takes the state number as argument.
10801 (yyreduce_print_): Use the argument yyrule, not the former
10802 attribute yyn_.
10803
10804 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
10805
10806 * bootstrap (gnulib_modules): Add verify.
10807 * lib/.cvsignore: Add verify.h.
10808 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
10809 * src/system.h (verify): Remove.
10810 Include verify.h instead.
10811 * src/tables.c (tables_generate): Use new API for 'verify'.
10812
10813 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
10814
10815 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
10816 local variables whose names begin with 'yy'.
10817 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10818 Trivial changes from Joel E. Denny.
10819
10820 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
10821 it itself.
10822 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
10823 don't use alloca any more.
10824
10825 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
10826 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
10827 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
10828 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
10829 to match yacc.c, to test more hosts.
10830
10831 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
10832
10833 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
10834 doesn't affect behavior.
10835 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
10836 Solaris, AIX, MSC.
10837 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
10838 This works a bit better with glibc, if user code has already included
10839 stdlib.h.
10840 * doc/bison.texinfo (Bison Parser): Document that users can't
10841 arbitrarily use malloc and free for other purposes. Document
10842 that <alloca.h> and <malloc.h> might be included.
10843 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
10844 user must declare alloca.
10845
10846 * HACKING (release): Forwarn the Translation Project about
10847 stable releses.
10848
10849 2005-09-20 Akim Demaille <akim@epita.fr>
10850
10851 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
10852
10853 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
10854
10855 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
10856 (YYSTACK_ALLOC_MAXIMUM): Use it.
10857 (yysyntax_error): New function.
10858 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
10859 multiple syntax errors are reported, and alloca is being used.
10860 Instead, reallocate buffers twice as big each time, so that
10861 we waste at most half the allocated memory. Start with a small
10862 (128-byte) buffer that will suffice in most cases anyway.
10863 Use yysyntax_error to do most of the work.
10864
10865 * doc/bison.texinfo (Error Reporting, Table of Symbols):
10866 yynerrs is the number of errors reported, not the number of
10867 errors encountered.
10868
10869 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10870 Mark it as expected to fail.
10871 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10872 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10873 Don't start user-code symbols with "yy", to avoid name space problems.
10874
10875 2005-09-19 Akim Demaille <akim@epita.fr>
10876
10877 Remove the traits, failed experiment.
10878 It never proved useful, and anyway because of the current
10879 definition, it was not possible to have several specialization of
10880 this traits, making it useless.
10881 * data/lalr1.cc (yy:traits): Remove.
10882 Inline its definitions in the parser class.
10883
10884 2005-09-19 Akim Demaille <akim@epita.fr>
10885
10886 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10887 least Mac OSX with a /usr/local install of gettext.
10888
10889 2005-09-19 Akim Demaille <akim@epita.fr>
10890
10891 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10892 and yytoken for similarity with the other skeletons.
10893
10894 2005-09-19 Akim Demaille <akim@epita.fr>
10895
10896 * NEWS, configure.ac: update version number to 2.1a.
10897
10898 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10899
10900 * NEWS: Version 2.1.
10901
10902 * NEWS: Remove notice of yytname change, since it was never in an
10903 official release.
10904 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10905 diagnostic.
10906 * src/output.c (prepare): Likewise.
10907 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10908 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10909 is not defined. This is an awful hack, but it's enough for now.
10910 All callers changed.
10911 * tests/glr-regression-at (make_value): Args are const pointers now,
10912 to avoid GCC warning.
10913 (Duplicated user destructor for lookahead): New test. Currently
10914 skipped. It fails on my host but I'm not sure it'll always fail.
10915
10916 2005-09-16 Akim Demaille <akim@epita.fr>
10917
10918 * src/symtab.h (struct symbol): Declare the printer and destructor
10919 as const, to avoid accidental calls to free.
10920 (symbol_destructor_set, symbol_printer_set): Adjust.
10921 * src/symtab.c: Adjust.
10922
10923 2005-09-16 Akim Demaille <akim@epita.fr>
10924
10925 * data/c.m4 (b4_token_enums): New.
10926 (b4_token_defines): Rename as...
10927 (b4_token_enums_defines): this.
10928 (b4_token_defines): New, output only the #defines.
10929 * data/yacc.c, data/glr.c: Adjust.
10930 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10931 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10932 as default values.
10933
10934 2005-09-16 Akim Demaille <akim@epita.fr>
10935
10936 * data/lalr1.cc (yylex_): Remove, inline its code.
10937 (yyreport_syntax_error_): Remove, replaced by...
10938 (yysyntax_error_): this which returns a string and leaves to the
10939 caller the call to the users' error function.
10940 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10941 Move from members of the parser object...
10942 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10943 to local variables of the parse function.
10944
10945 2005-09-16 Akim Demaille <akim@epita.fr>
10946
10947 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10948 since it's in Bison's name space.
10949
10950 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10951
10952 * data/glr.c (yyresolveValue): Add default case to pacify
10953 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10954
10955 * NEWS: Document when yyparse started to return 2.
10956 * doc/bison.texinfo (Parser Function): Document when yyparse
10957 returns 2.
10958
10959 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10960 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10961 changed.
10962 (class position): file_name -> filename (reverting). All uses changed.
10963
10964 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10965
10966 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10967 do anything if $@ exists. This reverts part of the 2005-07-07
10968 patch.
10969
10970 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10971
10972 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10973 contains obsolete information and isn't worth distributing as a
10974 separate file anyway.
10975 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10976 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10977 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10978 (yyparse): Abort if user code uses longjmp to throw an unexpected
10979 value.
10980
10981 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10982
10983 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10984 Suggested by twlevo@xs4all.nl.
10985
10986 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10987 This avoids a diagnostic from gcc -Wswitch-enum.
10988 Problem reported by twlevo@xs4all.nl.
10989
10990 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10991 standards. Use "file name" or "file" or "name", depending on
10992 the context.
10993 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10994 not to hack/foo.tab.c.
10995 (Calc++ Top Level): 2nd arg of main is not const.
10996 * data/glr.c: b4_filename -> b4_file_name.
10997 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10998 All uses changed.
10999 (class position): filename -> file_name. All uses changed.
11000 * data/yacc.c: b4_filename -> b4_file_name.
11001 * lib/bitset.h: filename -> file_name in local vars.
11002 * lib/bitset_stats.c: Likewise.
11003 * src/files.c: Likewise.
11004 * src/scan-skel.l ("@output ".*\n): Likewise.
11005 * src/files.c (file_name_split): Renamed from filename_split.
11006 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11007
11008 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11009
11010 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11011 to accommodate latest gnulib.
11012
11013 * tests/glr-regression.at (Duplicate representation of merged trees):
11014 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11015
11016 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11017 needed.
11018
11019 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11020
11021 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11022 All uses changed. Invoke user destructor after an error during a
11023 split parse (trivial change from Joel E. Denny).
11024
11025 * tests/glr-regression.at
11026 (User destructor after an error during a split parse): New test case.
11027 Problem reported by Joel E. Denny in:
11028 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11029
11030 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11031
11032 * README-cvs: Give URLs for recommended tools.
11033 Mention Gzip version problem, and bootstrapping issues.
11034 Remove troubleshooting section, as it's somewhat obsolete.
11035
11036 * bootstrap (no_cache): New var, to accommodate different wget
11037 variants. Use it instead of '-C off'. Problem reported by
11038 twlevo@xs4all.nl.
11039
11040 * data/glr.c (yydestroyStackItem): New function.
11041 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11042 debugging information. Problem reported by Joel E. Denny.
11043
11044 2005-08-25 Akim Demaille <akim@epita.fr>
11045
11046 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11047
11048 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11049
11050 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11051 Don't invoke destructor on unresolved entries.
11052 * tests/glr-regression.at
11053 (User destructor for unresolved GLR semantic value): New test case.
11054 Problem reported by Joel E. Denny in:
11055 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11056
11057 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11058
11059 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11060 Add strnlen.c.
11061 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11062 lib-prefix.m4, po.m4.
11063
11064 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11065 in yydestruct diagnostic, since it might not be an error.
11066 Problem reported by Joel Denny near end of
11067 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11068 * data/lalr1.cc (yyerturn): Likewise.
11069 * data/yacc.c (yyreturn): Likewise.
11070 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11071
11072 * src/files.c: Remove obsolete FIXME comment.
11073
11074 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11075 with the other templates, and to fix bogus run-on messages such
11076 as the one reported at the end of
11077 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11078 All callers changed to avoid the newline.
11079 (yyprocessOneStack): Output two lines rather than one, to accommodate
11080 the above change. This changes the debug output format slightly.
11081
11082 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11083 reported by Joel E. Denny in
11084 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11085 (trivial change).
11086 * tests/glr-regression.at (Duplicate representation of merged trees):
11087 New test, from Joel E. Denny in:
11088 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11089 * THANKS: Add Joel E. Denny.
11090
11091 * configure.ac (AC_INIT): Bump to 2.0c.
11092
11093 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11094
11095 * NEWS: Version 2.0b.
11096
11097 * Makefile.am (SUBDIRS): Put examples before tests, so that
11098 "make check" doesn't finish with "All 1 tests passed".
11099
11100 * tests/regression.at (Token definitions): Don't rely on
11101 AT_PARSER_CHECK for data that contains backslashes. It currently
11102 uses 'echo', and 'echo' isn't portable if its argument contains
11103 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11104 that the byte '\0xff' is not printable in the C locale; it is,
11105 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11106 not printable, so use '\0x81' to test.
11107
11108 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11109 version of GCC, since the macro is used with non-GCC compilers.
11110
11111 Fix core dump reported by Pablo De Napoli in
11112 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11113 * tests/regression.at (Invalid inputs with {}): New test.
11114 * src/parse-gram.y (token_name): Translate type before using
11115 it as an index.
11116
11117 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11118 the user's name space. All uses changed to __attribute__
11119 ((__unused__)).
11120 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11121 Add __attribute__ ((__noreturn__)).
11122
11123 * etc/clcommit: Remove. We weren't using it, and it failed
11124 "make maintainer-distcheck".
11125 * Makefile.maint: Merge from coreutils.
11126 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11127 (syntax-check-rules): Change list of rules as described below.
11128 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11129 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11130 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11131 (sc_trailing_space): New rules.
11132 (sc_xalloc_h_in_src): Remove.
11133 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11134 (sc_space_tab, sc_error_exit_success, sc_changelog):
11135 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11136 (makefile-check, po-check, author_mark_check):
11137 (makefile_path_separator_check, copyright-check):
11138 Use grep -n, to make it easier to find violations.
11139 Use CVS_LIST and CVS_LIST_EXCEPT.
11140 (header_regexp, h_re): Remove.
11141 (dd_c): New macro.
11142 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11143 (my-distcheck): Use more-modern GCC flags.
11144 (signatures, %.asc): Remove.
11145 (rel-files, announcement): Remove signatures.
11146 Restore old updating code, even though we don't use it, so
11147 that we're the same as coreutils.
11148 (alpha, beta, major): Depend on news-date-check.
11149 Make the upload commands.
11150
11151 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11152 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11153 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11154 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11155 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11156 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11157 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11158 * tests/sets.at: Likewise.
11159
11160 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11161 we comment out the Autoconf version number.
11162 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11163 it's error-prone and "make maintainer-distcheck" rejects it.
11164
11165 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11166 Indent calls to "error" to pacify "make maintainer-distcheck",
11167 when the calls are not intended to be translated.
11168 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11169
11170 * src/Makefile.am (DEFS): Use +=, to pacify
11171 "make maintainer-distcheck".
11172 (bison_SOURCES): Add scan-skel.h.
11173 (sc_tight_scope): New rule, from coreutils.
11174
11175 * src/files.c (src_extension, header_extension):
11176 Now static, not extern.
11177 * src/getargs.c (short_options): Likewise.
11178 * src/muscle_tab.c (muscle_table): Likewise.
11179 * src/parse-gram.y (current_class, current_type, current_prec):
11180 Likewise.
11181 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11182 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11183 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11184 void, to avoid warning when NLS is disabled.
11185 * src/output.c: Include scan-skel.h.
11186 (scan_skel): Remove decl, since scan-skel.h does this.
11187 (output_skeleton):
11188 Indent calls to "error" to pacify "make maintainer-distcheck".
11189 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11190 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11191 "make maintainer-distcheck".
11192 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11193 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11194 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11195 (skel_lex_destroy, scan_skel): Move these decls to...
11196 * src/scan-skel.h: New file.
11197 * src/uniqstr.c (uniqstr_assert):
11198 Indent calls to "error" to pacify "make maintainer-distcheck".
11199
11200 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11201 not @VAR@.
11202
11203 * tests/torture.at: Revamp to avoid misuse of atoi that
11204 "make maintainer-distcheck" complained about.
11205
11206 * examples/extexi (message): Don't print a message more than once,
11207 and omit line-number decoration that makes Emacs compile think
11208 that informative messages are worth worrying about.
11209
11210 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11211
11212 * configure.ac: Update version number.
11213
11214 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11215 accidentally.
11216 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11217 autogenerated by the maintainer.
11218 * examples/calc++/.cvsignore: Add *.yy.
11219
11220 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11221 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11222 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11223
11224 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11225
11226 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11227 from maintainer-distcheck about casting the argument of 'free'.
11228
11229 * NEWS: Mention recent yytname changes.
11230 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11231
11232 * bootstrap: For translations that have not yet been upgraded to
11233 the new runtime-po domain, prime the pump by extracting the
11234 relevant strings from the obsolete translations. This code can be
11235 removed once the bison-runtime domain has been translated by each
11236 team.
11237
11238 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11239 now that token names are already quoted.
11240
11241 Fix problem reported by Anthony Heading.
11242 * data/glr.c (YYTOKEN_TABLE): New macro.
11243 (yytname): Define if YYTOKEN_TABLE.
11244 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11245 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11246 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11247 * src/output.c (prepare_symbols): Output token_table_flag.
11248
11249 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11250
11251 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11252 again if the first call fails.
11253
11254 * data/glr.c (yytnamerr): New function.
11255 (yyreportSyntaxError): Use it to dequote most string literals.
11256 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11257 with other skeletons. All uses changed.
11258 (yytnameerr_): New function.
11259 (yyreport_syntax_error): Use it to dequote most string literals.
11260 * data/yacc.c (yytnamerr): New function.
11261 (yyerrlab): Use it to decode most string literals.
11262 * doc/bison.texinfo (Decl Summary, Calling Convention):
11263 Clarify quoting convention of yytname.
11264 * src/output.c (prepare_symbols): Quote all names. This undoes
11265 the 2005-04-17 change, which is now accomplished (mostly) via
11266 changes in the parsers as described above.
11267 * tests/regression.at (Token definitions, Web2c Actions):
11268 Undo most 2005-04-17 change here, too.
11269
11270 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11271
11272 Fix more problems reported by twlevo@xs4all.nl.
11273 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11274 remove trailing spaces. This loses the exit status of ./types,
11275 and isn't needed since ./types shouldn't be emitting trailing
11276 spaces.
11277 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11278 as the stack isn't valid in that case.
11279
11280 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11281 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11282 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11283 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11284 is used.
11285 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11286 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11287 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11288 Likewise.
11289
11290 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11291 overly-picky compilers that reject 'char *foo = "bar";'.
11292
11293 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11294 to FILE * parameter, not to stderr. This fixes a typo introduced
11295 in the 2005-07-12 change.
11296
11297 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11298 warnings from GCC 4.
11299
11300 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11301 (yyglrShiftDefer, yysplitStack):
11302 Remove unused parameters b4_pure_formals. All uses changed.
11303 (yyglrShift): Remove unused parameters b4_user_formals.
11304 All uses changed.
11305 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11306
11307 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11308
11309 Destructor cleanups and regularization among the three skeletons.
11310 * NEWS: Document the behavior changes.
11311 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11312 stack before failing, as the cleanup code will do it for us now.
11313 * data/lalr1.cc (yyerrlab): Likewise.
11314 * data/glr.c (yyparse): Pop everything off the stack before
11315 freeing it, so that destructors get called properly.
11316 * data/lalr1.cc (yyreturn): Likewise.
11317 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11318 This is more consistent.
11319 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11320 why destructors might be called. 1.875 -> 2.1.
11321 (Destructor Decl, Decl Summary, Table of Symbols):
11322 Some English-language cleanups for %destructor.
11323 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11324 Add output line for destructor of start symbol.
11325 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11326 because of that same extra output line.
11327
11328 * NEWS: Document minor wording changes in diagnostics of
11329 Bison-generated parsers.
11330 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11331 Remove unused formals. All uses changed.
11332 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11333 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11334 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11335 Rename yyoverflowab to yyexhaustedlab.
11336 When memory exhaustion occurs during syntax-error reporting,
11337 report it separately rather than in a single diagnostic; this
11338 eases translation.
11339 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11340 (Memory Exhausted): Renamed from Parser Stack Overflow.
11341 Revamp wording slightly to prefer "memory exhaustion".
11342 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11343
11344 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11345
11346 Add i18n support to the GLR skeleton. Partially fix the C++
11347 skeleton; a C++ expert needs to finish this. Remove debugging
11348 msgids; there's little point to having them translated, since they
11349 can be understood only by someone who can read the
11350 (English-language) source code.
11351
11352 Generate runtime-po/bison-runtime.pot automatically, so that we
11353 don't have to worry about garbage getting in that file. We'll
11354 make sure after the next official release that old msgids don't
11355 get lost. See
11356 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11357
11358 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11359 Now auto-generated.
11360 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11361 Fix typos in explanations of the runtime file.
11362 * bootstrap: Change gettext keyword from YYI18N to YY_.
11363 Use standard Makefile.in.in in runtime-po, since we'll arrange
11364 for backward-compatible bison-runtime.po files in a different way.
11365 * data/glr.c (YY_): New macro, from yacc.c.
11366 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11367 Translate messages intended for users.
11368 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11369 the wording in the other skeletons. We don't know that the memory
11370 is virtual.
11371 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11372 Use same method that yacc.c uses.
11373 Don't translate debugging messages.
11374 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11375 it doesn't work (yet), and requires C++ expertise to fix.
11376 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11377 Move defn to a more logical place, to be consistent with other
11378 skeletons.
11379 Don't translate debugging messages.
11380 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11381 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11382 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11383 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11384
11385 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11386 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11387 void, not int.
11388 * tests/glr-regression.at (Badly Collapsed GLR States):
11389 Likewise.
11390 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11391 yylex should return 0 at EOF rather than aborting.
11392
11393 Improve tests for stack overflow in GLR parser.
11394 Problem reported by twlevo@xs4all.nl.
11395 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11396 All uses removed.
11397 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11398 can handle the problem.
11399 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11400 (yyparse): New local variable yyresult to record the result.
11401 Use result of setjmp to set it, rather than storing itinto
11402 struct.
11403 (yyDone): Remove label.
11404 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
11405 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
11406 if YYABORT is used).
11407 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
11408 yyparse status; put status > 1 into diagnostic.
11409 Check that status==2 works.
11410 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
11411 Use exit status 3 for failure to open (which shouldn't happen).
11412
11413 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
11414
11415 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
11416 1 on syntax error; just let yyparse do its thing.
11417 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
11418 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
11419 (Exploding the Stack Size with Alloca):
11420 (Exploding the Stack Size with Malloc):
11421 Expect exit status 2, not 1, since the parser is supposed to blow
11422 its stack. Problem reported by twlevo@xs4all.nl.
11423
11424 * data/glr.c (yyparse): Don't assume that the initial calls
11425 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
11426 Print a stack-overflow message and fail instead.
11427 Initialize the line-number information before creating the stack,
11428 so that the stack-overflow message can report line zero safely.
11429
11430 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
11431
11432 Fix problems reported by twlevo@xs4all.nl.
11433 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
11434 (yyuserMerge): Provide a default case if b4_mergers is empty.
11435 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
11436 * tests/glr-regression.at
11437 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11438 Add casts to pacify C++ compilers.
11439 * tests/glr-regression.at (Improper merging of GLR delayed action
11440 sets): Declare yylex before using it.
11441 * tests/Makefile.am (maintainer-check-g++): Fix a stray
11442 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
11443 test for valgrind; valgrind is independent of g++.
11444 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
11445 for compatibility with POSIX 1003.1-2001 (if running coreutils).
11446 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
11447 Use a destructor, so that we can expand the stack. Change
11448 YYSTYPE to char * so that we can free it. Cast result of malloc.
11449
11450 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11451
11452 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
11453 a valgrind failure. Problem reported by twlevo@xs4all.nl.
11454
11455 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
11456
11457 * PACKAGING: New file, suggested by Bruno Haible and taken from
11458 similar wording in gettext's PACKAGING file.
11459 * NEWS: Mention PACKAGING.
11460 * Makefile.am (EXTRA_DIST): Add PACKAGING.
11461
11462 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
11463
11464 * NEWS: Document recent i18n improvements.
11465 * bootstrap: Get runtime translations into runtime-po.
11466 Create runtime-po files automatically, if possible.
11467 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
11468 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
11469 does not infringe on the user's name space.
11470 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
11471 * doc/bison.texinfo (Internationalization): Revamp the English
11472 and Texinfo syntax a bit, to try to make it clearer.
11473 (Bison Options, Option Cross Key): Mention --print-localedir.
11474 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
11475 YYENABLE_NLS. Quote a bit more.
11476 * runtime-po/.cvsignore: New file.
11477 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
11478 * runtime-po/Rules-quot: Remove; now created by bootstrap.
11479 * runtime-po/quot.sed: Likewise.
11480 * runtime-po/boldquot.sed: Likewise.
11481 * runtime-po/en@quot.header: Likewise.
11482 * runtime-po/en@boldquot.header: Likewise.
11483 * runtime-po/insert-header.sin: Likewise.
11484 * runtime-po/remove-potcdate.sin: Likewise.
11485 * runtime-po/Makevars: Likewise.
11486 * runtime-po/LINGUAS: Likewise.
11487 * runtime-po/de.po: Likewise; we will rely on the translation project
11488 to maintain this, so "bootstrap" should get it.
11489 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
11490 its value.
11491 * src/main.c (main): Bind the bison-runtime domain, too.
11492
11493 2005-07-12 Bruno Haible <bruno@clisp.org>
11494
11495 * data/yacc.c: Include <libintl.h> when NLS is enabled.
11496 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
11497 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
11498 * runtime-po: New directory.
11499 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
11500 $(DOMAIN).pot-update rule, so that old messages are never dropped.
11501 * runtime-po/Rules-quot: New file, copied from po/.
11502 * runtime-po/quot.sed: Likewise.
11503 * runtime-po/boldquot.sed: Likewise.
11504 * runtime-po/en@quot.header: Likewise.
11505 * runtime-po/en@boldquot.header: Likewise.
11506 * runtime-po/insert-header.sin: Likewise.
11507 * runtime-po/remove-potcdate.sin: Likewise.
11508 * runtime-po/Makevars: New file.
11509 * runtime-po/POTFILES.in: New file.
11510 * runtime-po/LINGUAS: New file.
11511 * runtime-po/bison-runtime.pot: New file.
11512 * runtime-po/de.po: New file.
11513 * m4/bison.m4: New file.
11514 * Makefile.am (SUBDIRS): Add runtime-po.
11515 (aclocaldir, aclocal_DATA): New variables.
11516 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
11517 Define aclocaldir.
11518 * src/getargs.c (usage): Document --print-localedir option.
11519 (PRINT_LOCALEDIR_OPTION): New enum item.
11520 (long_options): Add --print-localedir option.
11521 (getargs): Handle --print-localedir option.
11522 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
11523 (Internationalization): New section.
11524
11525 2005-07-12 Akim Demaille <akim@epita.fr>
11526
11527 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
11528 for consistency with the rest of the code.
11529 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
11530 Add separators.
11531
11532 2005-07-12 Akim Demaille <akim@epita.fr>
11533
11534 * src/parse-gram.y: Use %printer instead of YYPRINT.
11535
11536 2005-07-12 Akim Demaille <akim@epita.fr>
11537
11538 * src/symtab.h, src/symtab.c (symbol_print): New.
11539 * src/symlist.h, src/symlist.c (symbol_list_print): New.
11540 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
11541
11542 2005-07-12 Akim Demaille <akim@epita.fr>
11543
11544 * data/glr.c (b4_syncline): Fix (swap) the definitions of
11545 b4_at_dollar and b4_dollar_dollar.
11546
11547 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
11548
11549 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
11550 and Pennello's paper.
11551
11552 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
11553
11554 * data/yacc.c (yyparse): Undo previous patch. Instead,
11555 set yylsp[0] and yyvsp[0] only if the initial action
11556 sets yylloc and yylval, respectively.
11557
11558 * data/yacc.c (yyparse): In the initial action, set
11559 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
11560 This avoids the use of undefined variables if the initial
11561 action does not set yylloc and/or yylval.
11562
11563 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
11564
11565 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
11566 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
11567 Remove from CVS. These files are automatically generated.
11568 * examples/extexi: Clarify that this file is now part of Bison,
11569 not GNU M4, and that it works with any POSIX-compatible Awk.
11570 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
11571 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
11572 so that we also get calc++-parser.yy. Geneate it.
11573 Use $(AWK), not gawk, since any conforming Awk will do.
11574 Put comment before action, since older 'make' can't handle comment
11575 in action.
11576 $(BUILT_SOURCES): List all built sources, not just some of them.
11577 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
11578 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
11579 $($(calc_sources_generated)): Remove unnecessary test for existence
11580 of target. (This had a shell syntax error anyway; a stray "x".)
11581 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
11582 calc++-parser.yy.
11583 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
11584
11585 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
11586 implied by the other modules.
11587
11588 2005-07-06 Akim Demaille <akim@epita.fr>
11589
11590 Bind examples/calc++ to the package.
11591 * examples/calc++/Makefile: Remove, replaced by...
11592 * examples/calc++/Makefile.am: ... this new file.
11593 * examples/calc++/test: Remove input.
11594 * examples/calc++/compile: Remove.
11595 * examples/Makefile.am: New.
11596 * configure.ac, Makefile.am: Adjust.
11597 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
11598
11599 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
11600
11601 * data/glr.c (yyFail): Drastically simplify; since the format argument
11602 never had any % directives, we can simply pass it to yyerror.
11603 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
11604 be modified later, as that is the usual style in glr.c.
11605 Problems reported by Paul Hilfinger.
11606
11607 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
11608 and size overflow errors.
11609 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
11610 in case the user prolog sets feature-test macros like _GNU_SOURCE.
11611 (YYSIZEMAX): New macro.
11612 (yystpcpy): New function, taken from yacc.c.
11613 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
11614 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
11615 so that we don't have to maintain their signatures.
11616 (yyFail): Check for buffer overflow, by using vsnprintf rather
11617 than vsprintf. Allocate a bigger buffer if possible.
11618 Report an error if buffer allocation fails.
11619 (yyStackOverflow): New function.
11620 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
11621 the initialization was successful. It might fail if storage was
11622 exhausted.
11623 (yyexpandGLRStack): Add more checks for storage allocation failure.
11624 Use yyStackOverflow to report failures.
11625 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
11626 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
11627 Don't assume stack number fits in int.
11628 (yysplitStack): Check for storage allocation failure.
11629 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
11630 can print diagnostics on storage allocation failure. All callers
11631 changed.
11632 (yyresolveValue): Use yybool for boolean.
11633 (yyreportSyntaxError): Check for size-calculation overflow.
11634 This code is taken from yacc.c.
11635 (yyparse): Check for storage allocation errors when allocating
11636 the initial stack.
11637
11638 2005-07-05 Akim Demaille <akim@epita.fr>
11639
11640 Extract calc++ from the documentation.
11641 * doc/bison.texinfo (Calc++): Add the extraction marks.
11642 * examples/extexi: New, from the aborted GNU Programming 2E.
11643 Separate the different paragraph of a file with empty lines.
11644 * examples/Makefile: Use it to extract the whole calc++ example.
11645
11646 2005-06-24 Akim Demaille <akim@epita.fr>
11647
11648 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
11649 class typedefs.
11650
11651 2005-06-22 Akim Demaille <akim@epita.fr>
11652
11653 * doc/bison.texinfo (C++ Language Interface): First stab.
11654 (C++ Parsers): Remove.
11655
11656 2005-06-22 Akim Demaille <akim@epita.fr>
11657
11658 * data/lalr1.cc (yylex_): Honor %lex-param.
11659
11660 2005-06-22 Akim Demaille <akim@epita.fr>
11661
11662 Start a set of simple examples.
11663 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
11664 * examples/calc++/calc++-driver.hh,
11665 * examples/calc++/calc++-parser.yy,
11666 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
11667 * examples/calc++/compile, examples/calc++/test: New.
11668
11669 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
11670
11671 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
11672 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
11673 which stems from the 2005-05-27 patch.
11674
11675 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11676
11677 * data/glr.c: Modify treatment of unused parameters to permit use
11678 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
11679
11680 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
11681
11682 Fix infringement on user name space reported by Janos Zoltan Szabo.
11683 * data/yacc.c (yyparse): strlen -> yystrlen.
11684
11685 2005-05-30 Akim Demaille <akim@epita.fr>
11686
11687 * data/lalr1.cc (_): New.
11688 Translate the various messages.
11689
11690 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
11691
11692 Fix infringement on user name space reported by Bruno Haible.
11693 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
11694 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
11695 the user's name space.
11696 (alloca): Include <stdlib.h> to get it, if it's not built in.
11697 (YYMALLOC, YYFREE): Define only if needed.
11698 (malloc, free): Declare, but only if needed, as this infringes on
11699 the user name space.
11700
11701 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
11702
11703 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
11704 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
11705 with %d format.
11706 * lib/ebitset.c (min, max): Undef before defining.
11707 * lib/vbitset.c (min, max): Likewise.
11708 * lib/subpipe.c (create_subpipe): Save local variables in case
11709 vfork clobbers them.
11710
11711 2005-05-24 Bruno Haible <bruno@clisp.org>
11712
11713 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
11714 error message syntax used by gcc-4.0.
11715
11716 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
11717
11718 * README: Mention m4 1.4.3. Remove obsolete advice about
11719 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
11720
11721 * bootstrap: Remove workaround for problem I encountered with
11722 gettext 0.14.1; it seems to be fixed now.
11723
11724 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
11725
11726 * NEWS: Version 2.0a.
11727
11728 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
11729 the previous change.
11730
11731 Various maintainer cleanups.
11732 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
11733 conftest*, for benefit of CVS commands run at the same time as
11734 "configure". Add build-aux, since "bootstrap" now creates it and
11735 its subfiles.
11736 * Makefile.cfg (move_if_change): Remove.
11737 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
11738 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
11739 (po_repo, do-po-update, po-update, wget_files, get-targets):
11740 (config.guess-url_prefix, config.sub-url_prefix):
11741 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
11742 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
11743 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
11744 Remove.
11745 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
11746 this is now the recommended name.
11747 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
11748 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
11749 ylwrap. These files now go into build-aux.
11750 * config/move-if-change: Remove.
11751 * config/prev-version.txt: Bump from 1.75 to 2.0.
11752
11753 * bootstrap: Add stdio-safer, unistd-safer modules.
11754 Remove m4/glibc2.m4 (introduced by latest gnulib, but
11755 we don't need it).
11756 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
11757 fopen-safer.c, stdio-safer.h, unistd-safer.h.
11758 * lib/subpipe.c: Include "unistd-safer.h".
11759 (create_subpipe): Make sure all the newly-created
11760 file descriptors are > 2, so that diagnostics don't
11761 get sent down them (which might cause Bison to hang, in theory).
11762 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
11763 * src/files.c (xfopen): Use fopen_safer, not fopen.
11764
11765 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
11766 yesterday's yacc.c fix.
11767
11768 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
11769
11770 * data/glr.c, data/lalr1.cc: Update copyright date.
11771
11772 Fix a destructor bug reported by Wolfgang Spraul in
11773 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
11774 * data/yacc.c (yyabortlab): Don't call destructor, and
11775 don't set yychar to EMPTY.
11776 (yyoverflowlab): Don't call destructor.
11777 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
11778 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
11779 since we no longer output the message "discarding lookahead token
11780 end of input ()".
11781
11782 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11783
11784 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
11785 fix a small glitch in debugging output.
11786 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
11787 after YY_SYMBOL_PRINT where needed.
11788
11789 (struct yyGLRState): Add some comments.
11790 (struct yySemanticOption): Add some comments.
11791 (union yyGLRStackItem): Add comment.
11792
11793 (yymergeOptionSets): Correct this to properly perform the union,
11794 avoiding infinite reported by Michael Rosien.
11795 Update comment.
11796
11797 * tests/glr-regression.at: Add test for GLR merging error reported
11798 by M. Rosien.
11799
11800 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
11801
11802 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
11803 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
11804 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
11805 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
11806 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
11807 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
11808 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
11809 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
11810 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
11811 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
11812 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
11813 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
11814 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
11815 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
11816 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
11817 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
11818 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
11819 src/derives.h, src/files.c, src/files.h, src/getargs.c,
11820 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
11821 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
11822 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
11823 src/output.h, src/parse-gram.c, src/parse-gram.h,
11824 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
11825 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
11826 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
11827 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
11828 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
11829 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
11830 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
11831 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
11832 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
11833 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
11834 tests/reduce.at, tests/regression.at, tests/sets.at,
11835 tests/synclines.at, tests/testsuite.at, tests/torture.at:
11836 Update FSF postal mail address.
11837
11838 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
11839
11840 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
11841 Problem reported by Ralf Menzel.
11842
11843 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
11844
11845 * tests/actions.at: Test that stack overflow invokes destructors.
11846 From Marcus Holland-Moritz.
11847 * data/yacc.c (yyerrlab): Move the code that destroys the stack
11848 from here....
11849 (yyreturn): to here. That way, destructors are called properly
11850 even if the stack overflows, or the user calls YYACCEPT or
11851 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
11852 (yyoverflowlab): Destroy the lookahead.
11853
11854 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
11855
11856 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
11857
11858 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
11859
11860 * NEWS: Bison-generated C parsers no longer quote literal strings
11861 associated with tokens.
11862 * src/output.c (prepare_symbols): Don't escape strings,
11863 since users don't want to see C escapes.
11864 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
11865 in diagnostics.
11866 * tests/input.at (Torturing the Scanner): Likewise.
11867 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
11868
11869 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11870
11871 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11872 the data size is known to be too small and we can't increase it.
11873 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11874
11875 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11876
11877 * src/parse-gram.y: Include quotearg.h.
11878 (string_as_id): Quote $1 before using it as a key, since the
11879 lexer no longer quotes it for us.
11880 (string_content): Don't strip quotes, since lexer no longer
11881 quotes it for us.
11882 * src/scan-gram.l: Include quotearg.h.
11883 ("\""): Omit quote.
11884 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11885 a key, since the rest of the lexer doesn't quote it.
11886 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11887 * tests/regression.at (Token definitions): Check for backslashes
11888 in token strings.
11889
11890 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11891 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11892 (yyparse): Revamp code to generate long syntax error message, to
11893 make it easier to translate, and to avoid problems with arithmetic
11894 overflow. Change "virtual memory" to "memory" in diagnostic, since
11895 we don't know whether the memory is virtual.
11896
11897 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11898
11899 * NEWS: Bison-generated C parsers now use the _ macro to
11900 translate strings.
11901 * data/yacc.c (_) [!defined _]: New macro.
11902 All English strings wrapped inside this macro.
11903 * doc/bison.texinfo (Bison Parser): Document _.
11904 * po/POTFILES.in: Include src/parse-gram.c, since it now
11905 includes translateable strings that parse-gram.y doesn't.
11906
11907 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11908
11909 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11910 reverting the 2004-10-11 change to this function.
11911 (symbol_check_alias_consistency): Don't call symbol_type_set
11912 if the type name is already correct.
11913 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11914
11915 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11916
11917 * tests/regression.at (Token definitions): Don't use a token named
11918 c, as that generates a "#define c ..." that runs afoul of buggy
11919 stdlib.h that uses the identifier c as a member of struct
11920 drand48_data. Problem reported by Horst Wente.
11921
11922 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11923
11924 * bootstrap: Change translation URL from
11925 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11926 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11927 redirection glitches. Problem reported by twlevo@xs4all.nl.
11928
11929 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11930
11931 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11932 after operands; POSIX says this isn't portable for the c99 command.
11933
11934 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11935
11936 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11937 immediately if a data overrun has occurred; this may help us track
11938 down what may be a spurious failure on MacOS.
11939
11940 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11941
11942 Respond to problems reported by twlevo@xs4all.nl.
11943
11944 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11945
11946 * src/vcg.h: Comment fix.
11947 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11948 (G_CMAX): Change to -1 instead of INT_MAX.
11949
11950 * data/yacc.c (yyparse): Omit spaces before #line.
11951
11952 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11953
11954 * src/tables.c (state_number_to_vector_number): Put it inside an
11955 "#if 0", since it's not currently used. Problem reported by
11956 Roland McGrath.
11957
11958 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11959
11960 * src/output.c (escaped_output): Renamed from
11961 escaped_file_name_output, since we now use it for symbol tags as
11962 well. All uses changed.
11963 (symbol_destructors_output, symbol_printers_output):
11964 Escape symbol tags too.
11965 Problem reported by Matyas Forstner in
11966 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11967
11968 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11969 not needed.
11970 * src/output.c (user_actions_output, token_definitions_output,
11971 symbol_destructors_output, symbol_printers_output): Likewise.
11972 * src/reader.c (prologue_augment): Likewise.
11973 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11974
11975 * src/vcg.c (output_edge): Don't quote linestyle arg.
11976 Problem reported by twlevo@xs4all.nl.
11977
11978 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11979
11980 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11981 example, reported by Derek M Jones. Also, make the example even
11982 more outrageous, to better illustrate how bad the problem is.
11983
11984 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11985
11986 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11987 putsym. Typo reported by Sebastian Piping.
11988
11989 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11990
11991 * doc/bison.texinfo (Language and Grammar): some -> same
11992 (Epilogue): int he -> in the
11993 Typos reported by Sebastian Piping via Justin Pence.
11994
11995 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11996
11997 * tests/glr-regression.at (Improper handling of embedded actions
11998 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11999 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12000 with dollar signs in test names.
12001 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12002 for a similar reason.
12003
12004 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12005
12006 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12007 wants to redefine G_VIEW.
12008
12009 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12010
12011 * src/vcg.c (get_view_str): Remove case for normal_view.
12012 Problem reported by twlevo@xs4all.nl.
12013
12014 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12015
12016 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12017 Problem reported by twlevo@xs4all.nl.
12018
12019 * doc/bison.texinfo: Change @dircategory from "GNU programming
12020 tools" to "Software development". Requested by Richard Stallman
12021 via Karl Berry.
12022
12023 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12024
12025 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12026 Problem reported by twlevo@xs4all.nl.
12027
12028 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12029
12030 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12031 keyword; it's not needed with modern compilers, and it doesn't
12032 affect correctness with older compilers. Suggested by
12033 twlevo@xs4all.nl.
12034
12035 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12036
12037 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12038 gcc -Wswitch-default.
12039 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12040 * data/yacc.c (yyparse): Likewise.
12041
12042 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12043
12044 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12045 already. Let config.h define any nonstandard values.
12046
12047 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12048
12049 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12050 for the benefit of slower hosts. Problem reported by
12051 Nelson H. F. Beebe.
12052
12053 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12054
12055 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12056 being defined and not used.
12057 * data/lalr1.cc (yyparse): Likewise.
12058 Use "if (false)" rather than "if (0)".
12059
12060 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12061
12062 * TODO: Mention that we should allow NUL bytes in tokens.
12063
12064 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12065
12066 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12067 Problem reported by Hans Aberg.
12068
12069 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12070
12071 * src/getargs.c (version): Happy new year; update overall
12072 program copyright date from 2004 to 2005.
12073
12074 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12075 Problem reported by Hans Aberg.
12076 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12077 (Output file names.): Add a test for the case when standard output
12078 is closed.
12079
12080 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12081
12082 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12083 to fix an oversight in the Bison 2.0 manual.
12084
12085 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12086
12087 * NEWS: Version 2.0. Reformat the existing news items since
12088 1.875, so that related items are grouped together.
12089 * configure.ac (AC_INIT): Bump version to 2.0.
12090 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12091
12092 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12093 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12094 otherwise, we're not testing alloca. Unfortunately there's no
12095 simple way to consult HAVE_ALLOCA here.
12096
12097 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12098 for yymsg, too.
12099
12100 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12101 hand. This avoids a warning about comparing int to size_t when
12102 GCC warnings are enabled.
12103
12104 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12105
12106 * NEWS: Bison-generated parsers no longer default to using the
12107 alloca function (when available) to extend the parser stack, due
12108 to widespread problems in unchecked stack-overflow detection.
12109 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12110 responsibility to set it to a positive value. This lets the user
12111 specify a value that is not a preprocessor constant.
12112 * data/yacc.c (YYMAXDEPTH): Likewise.
12113 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12114 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12115 to be a compile-time constant. However, explain the constraints on it.
12116 Also, explain the constraints on YYINITDEPTH.
12117 (Table of Symbols): Explain that alloca is no longer the default.
12118 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12119 to 1.
12120
12121 * doc/bison.texinfo (Location Default Action): Mention that n must
12122 be zero when k is zero. Suggested by Frank Heckenbach.
12123
12124 2004-12-22 Akim Demaille <akim@epita.fr>
12125
12126 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12127 (parser::state_type, parser::semantic_type, parser::location_type):
12128 Private, not public.
12129 (parser::parse): Return ints, not bool.
12130 Returning a bool introduces a problem: 0 corresponds to false, and
12131 it seems weird to return false on success. Returning true changes
12132 the conventions for yyparse.
12133 Alternatively we could return void and send an exception.
12134 There is no clear consensus (yet?).
12135 (state_stack, semantic_stack, location_stack): Rename as...
12136 (state_stack_type, semantic_stack_type, location_stack_type): these.
12137 Private, not public.
12138 * tests/c++.at: New.
12139 * tests/testsuite.at, tests/Makefile.am: Adjust.
12140
12141 2004-12-21 Akim Demaille <akim@epita.fr>
12142
12143 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12144
12145 2004-12-21 Akim Demaille <akim@epita.fr>
12146
12147 Don't impose std::string for filenames.
12148
12149 * data/lalr1.cc (b4_filename_type): New.
12150 (position::filename): Use it.
12151 (parser.hh): Move the inclusion of stack.hh and location.hh below
12152 the user code, so that needed headers for the filename type can be
12153 included first.
12154 Forward declare them before the user code.
12155 * tests/Makefile.am (check-local, installcheck-local): Pass
12156 TESTSUITEFLAGS to the TESTSUITE.
12157
12158 2004-12-20 Akim Demaille <akim@epita.fr>
12159
12160 Use more STL like names: my_class instead of MyClass.
12161
12162 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12163 (SemanticStack, SemanticType, StateStack, StateType)
12164 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12165 (Parser::value): Rename as...
12166 (location_stack, location_type, rhs_number_type, semantic_stack)
12167 (semantic_type, state_stack, state_type, token_number_type, stack)
12168 (slice, traits, parser::yylloc, parser::yylval): these.
12169
12170 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12171
12172 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12173
12174 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12175 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12176
12177 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12178
12179 Remove uses of 'short int' and 'unsigned short int'. This raises
12180 some arbitrary limits. It uses more memory but nowadays that's
12181 not much of an issue.
12182
12183 This change does not affect the generated parsers; that's a different
12184 task, as some users will want to conserve memory there.
12185
12186 Ideally we should use size_t to represent all object counts, and
12187 something like ptrdiff_t to represent signed differences of object
12188 counts; but that will require more code-cleanup than I have the
12189 time to do right now.
12190
12191 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12192 Use size_t, not int or short int, to count objects.
12193 * src/closure.c (nritemset, closure): Likewise.
12194 * src/closure.h (nritemset, closure): Likewise.
12195 * src/nullable.c (nullable_compute): Likewise.
12196 * src/print.c (print_core): Likewise.
12197 * src/print_graph.c (print_core): Likewise.
12198 * src/state.c (state_compare, state_hash): Likewise.
12199 * src/state.h (struct state): Likewise.
12200 * src/tables.c (default_goto, goto_actions): Likewise.
12201
12202 * src/gram.h (rule_number, rule): Use int, not short int.
12203 * src/output.c (prepare_rules): Likewise.
12204 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12205 errs, reductions): Likewise.
12206 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12207 Likewise.
12208 * src/tables.c (vector_number, tally, action_number,
12209 ACTION_NUMBER_MINIMUM): Likewise.
12210 * src/output.c (muscle_insert_short_int_table): Remove.
12211
12212 2004-12-17 Akim Demaille <akim@epita.fr>
12213
12214 * data/lalr1.cc: Extensive Doxygenation.
12215 (error_): Rename as...
12216 (error): this, since it is visible to the user.
12217 Adjust callers.
12218 (Parser::message): Now an automatic variable from...
12219 (Parser::yyreport_syntax_error_): here.
12220 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12221 Parser::error.
12222 * tests/input.at: Escape $.
12223
12224 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12225
12226 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12227 Parenthesize rhs to avoid obscure problems with mistakes like
12228 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12229 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12230 b4_rhs_location): Likewise.
12231 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12232 b4_rhs_location): Likewise.
12233
12234 2004-12-16 Akim Demaille <akim@epita.fr>
12235
12236 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12237 yacc.c: be sure to stay within yycheck_.
12238 * tests/actions.at: Re-enable C++ tests.
12239
12240 2004-12-16 Akim Demaille <akim@epita.fr>
12241
12242 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12243 real.
12244
12245 2004-12-16 Akim Demaille <akim@epita.fr>
12246
12247 Use #define to handle the %name-prefix.
12248
12249 * data/glr.c, data/yacc.c: Comment changes.
12250 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12251 so that one can refer to yylex in the parser file, and have it
12252 renamed, as is the case with other skeletons.
12253
12254 2004-12-16 Akim Demaille <akim@epita.fr>
12255
12256 Move lalr1.cc internals into yy*.
12257
12258 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12259 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12260 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12261 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12262 (empty_, final_, terror_, errcode_, ntokens_)
12263 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12264 (looka_, ilooka_, error_range_, nerrs_):
12265 Rename as...
12266 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12267 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12268 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12269 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12270 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12271 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12272 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12273 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12274 these.
12275
12276 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12277
12278 Fix some problems reported by twlevo at xs4all.
12279 * src/symtab.c (symbol_new): Report an error if the input grammar
12280 contains too many symbols. This is better than calling abort() later.
12281 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12282 (struct node, struct graph):
12283 Rename member expand to stretch. All uses changed.
12284 (struct graph): Remove member layoutalgorithm. All uses removed.
12285 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12286 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12287 All uses changed.
12288 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12289
12290 2004-12-15 Akim Demaille <akim@epita.fr>
12291
12292 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12293 Add more Doxygen comments.
12294 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12295 (report_syntax_error_, translate_): Rename as...
12296 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12297 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12298
12299 2004-12-15 Akim Demaille <akim@epita.fr>
12300
12301 * data/lalr1.cc (lex_): Rename as...
12302 (yylex_): this.
12303 Move the trace here.
12304 Take the %name-prefix into account.
12305 Reported by Alexandre Duret-Lutz.
12306
12307 2004-12-15 Akim Demaille <akim@epita.fr>
12308
12309 Simplify the C++ parser constructor.
12310
12311 * data/lalr1.cc (debug_): Rename as...
12312 (yydebug_): so that the parser's internals are always in the yy*
12313 pseudo namespace.
12314 Adjust uses.
12315 (b4_parse_param_decl): Remove the leading comma as it is now only
12316 called as unique argument list.
12317 (Parser::Parser): Remove the constructor accepting a location and
12318 an initial debugging level.
12319 Remove from the other ctor the argument for the debugging level.
12320 (debug_level_type, debug_level, set_debug_level): New.
12321
12322 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12323 constructor calls.
12324
12325 2004-12-15 Akim Demaille <akim@epita.fr>
12326
12327 Remove b4_root related material: failure experiment
12328 (which goal was to allow to derive from a class).
12329
12330 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12331 definitions and uses.
12332
12333 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12334
12335 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12336 not 2, since it's not portable to subtract 1 from the start of an
12337 array. The new item 0 is never set or used. All uses changed.
12338
12339 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12340 the default definition of YYLLOC_DEFAULT. Problem reported
12341 by Frank Heckenbach.
12342
12343 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12344
12345 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12346 the normal case and one for the error case. Just use the
12347 first one uniformly. Problem reported by Frank Heckenbach.
12348 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12349 use exactly the same macro in both places.
12350 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12351 so that the normal-case YYRHSLOC works for the error case too.
12352 All uses changed.
12353 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12354 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12355 * doc/bison.texinfo (Location Default Action): Don't claim that
12356 we have an array of locations. Use the same macro for both glr
12357 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12358 the index is 0.
12359
12360 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12361
12362 * HACKING: Update email addresses to send announcements to.
12363
12364 * configure.ac (AC_INIT): Bump version to 1.875f.
12365
12366 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12367
12368 * NEWS: Version 1.875e.
12369 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12370
12371 * src/scan-skel.l: Include "complain.h", for "fatal".
12372
12373 * src/relation.h (relation_print, relation_digraph):
12374 Relation sizes are of type relation_node, not size_t (this is
12375 merely a doc fix, since the two types are equivalent).
12376 (relation_transpose): Relation sizes are of type relation_node,
12377 not int.
12378 * src/relation.c: Likewise.
12379 (top, infinity): Now of type relation_node, not int.
12380 (traverse, relation_transpose): Use relation_node, not int.
12381
12382 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12383 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12384 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12385
12386 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
12387 specifying whether the test should be skipped. Use it tp
12388 specify that the [%defines %skeleton "lalr1.cc"] tests currently
12389 fail on some hosts, and should be skipped.
12390
12391 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12392
12393 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12394 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12395 unless otherwise specified below.
12396
12397 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12398 to allocate kernel_base, kernel_items, kernel_size, since
12399 they needn't be initialized to 0.
12400 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12401 * src/closure.c (new_closure): Likewise, for itemset.
12402 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
12403 * src/lalr.c (set_goto_map): Likewise, for temp_map.
12404 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
12405 (build_relations): Likewise for edge, states1, includes.
12406 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
12407 * src/reader.c (packgram): Likewise, for ritem, rules.
12408 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
12409 * src/relation.c (relation_digraph): Likewise for VERTICES.
12410 (relation_transpose): Likewise for new_R, end_R.
12411 * src/symtab.c (symbols_token_translations_init): Likewise for
12412 token_translations.
12413 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
12414 (token_actions): Likewise for yydefact, actrow, conflrow,
12415 conflict_list.
12416 (save_column): Likewise for froms[symno], tos[symno].
12417 (goto_actions): Likewise for state_count.
12418 (pack_table): Likewise for base, pos, check.
12419 (tables_generate): Likewise for width.
12420
12421 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
12422 for initial core. Just have a separate core, so we needn't worry
12423 about whether kernel_size and kernel_base are initialized.
12424
12425 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
12426 kernel_size, kernel_items): Remove unnecessary initialization.
12427 * src/conflicts.c (conflicts): Likewise.
12428 * src/derives.c (derives): Likewise.
12429 * src/muscle_tablc (muscle_insert): Likewise.
12430 * src/relation.c (relation_digraph): Likewise.
12431 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
12432 conflrow, conflict_table, conflict_list, table, check):
12433 Likewise.
12434
12435 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
12436 This is because all callers pass unsigned int.
12437 * src/closure.h (new_closure): Likewise.
12438
12439 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
12440 (build_relations): Initialize includes[i] in all cases.
12441 * src/reader.c (packgram): Always initialize rules[ruleno].prec
12442 and rules[ruleno].precsym. Initialize members in order.
12443 * src/relation.c (relation_transpose): Always initialize new_R[i]
12444 and end_R[i].
12445 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
12446
12447 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
12448 conflict_list[0] was always 0, but now it isn't initialized.
12449
12450 * src/table.c (table_grow): When conflict_table grew, the grown
12451 area wasn't cleared. Fix this.
12452
12453 * lib/.cvsignore: Add strdup.c, strdup.h.
12454 * m4/.cvsignore: Add strdup.m4.
12455
12456 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
12457
12458 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
12459 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
12460 GOTO_NUMBER_MAXIMUM, since we occasionally compute
12461 ngotos + 1 without checking for overflow.
12462 (build_relations): Use END_NODE, not -1, to denote end of edges.
12463 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
12464 build_relations): Use goto_number, not int, for goto numbers.
12465 * src/tables.c (save_column, default_goto): Likewise.
12466
12467 2004-11-23 Akim Demaille <akim@epita.fr>
12468
12469 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
12470 of #defining from yystype.
12471 Don't typedef yystype, C++ does not need it.
12472 This lets it possible to forward declare it as union.
12473
12474 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
12475
12476 * bootstrap (gnulib_modules): Add extensions.
12477 Problem reported by Jim Meyering.
12478
12479 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
12480
12481 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
12482 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
12483 src/system.h, src/tables.c: XFREE -> free, to accommodate
12484 recent change to gnulib xalloc.h.
12485 Problem reported by Jim Meyering.
12486
12487 2004-11-17 Akim Demaille <akim@epita.fr>
12488
12489 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
12490
12491 2004-11-17 Akim Demaille <akim@epita.fr>,
12492 Alexandre Duret-Lutz <adl@gnu.org>
12493
12494 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
12495 changes.
12496 (YYCDEBUG): Adjust.
12497 Use it instead of cdebug_.
12498 (Parser::debug_stream, Parser::set_debug_stream): New.
12499 (Parser::symprint_): Define cdebug_ for temporary backward
12500 compatibility.
12501 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
12502 debug_stream ().
12503
12504 2004-11-17 Akim Demaille <akim@epita.fr>
12505
12506 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
12507 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
12508 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
12509 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12510
12511 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
12512
12513 * data/glr.c (yyloc_default): Remove; not used.
12514 Problem reported by Frank Heckenbach.
12515
12516 2004-10-25 Akim Demaille <akim@epita.fr>
12517
12518 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
12519 Introduce another definition to address simple location arrays.
12520 (yyGLRStack): New member: yyerror_range.
12521 (yyrecoverSyntaxError, yyparse): Update it.
12522 (yyrecoverSyntaxError): Use it when shifting the error token to
12523 have an accurate range, equivalent to the one computed by both
12524 yacc.c and lalr1.cc.
12525 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
12526 that column numbers start at column 0, as per GNU Coding
12527 Standards, the others tests, and the doc.
12528 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
12529 Adjust to the above change (first column is 0).
12530 And adjust the location of the "<error>", now covering the whole
12531 line.
12532
12533 2004-10-22 Akim Demaille <akim@epita.fr>
12534 and Paul Eggert <eggert@cs.ucla.edu>
12535
12536 Remove some arbitrary limits on goto numbers and relations.
12537 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
12538 initial values, since they're never used.
12539 (set_goto_map): ngotos is now unsigned, so test for overflow
12540 by seeing whether it wraps around to zero.
12541 * src/lalr.h (goto_number): Now size_t, not short int.
12542 (GOTO_NUMBER_MAXIMUM): Remove.
12543 * src/relation.c (relation_print, traverse, relation_transpose):
12544 Check for END_NODE rather than looking at sign.
12545 * src/relation.h (END_NODE): New macro.
12546 (relation_node): Now size_t, not short int.
12547
12548 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
12549
12550 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
12551 keyword, not an identifier. Problem reported by Baron Schwartz in
12552 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
12553
12554 2004-10-11 Akim Demaille <akim@epita.fr>
12555
12556 * src/symtab.c (symbol_check_alias_consistency): Also check
12557 type names, destructors, and printers.
12558 Reported by Alexandre Duret-Lutz.
12559 Recode the handling of associativity and precedence in terms
12560 of symbol_precedence_set.
12561 Accept no redeclaration at all, not even equal to the previous
12562 value.
12563 (redeclaration): New.
12564 Use it to factor redeclaration complaints.
12565 (symbol_make_alias): Don't set the type of the alias, let
12566 symbol_check_alias_consistency do it as for other features.
12567 * src/symtab.h (symbol): Add new member prec_location, and
12568 type_location.
12569 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
12570 * tests/input.at (Incompatible Aliases): New.
12571
12572 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
12573
12574 .cvsignore fixes to accommodate gnulib changes,
12575 and the practice of naming build directories "_build".
12576 * .cvsignore: Add "_*". Sort.
12577 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
12578 * m4/.cvsignore: Add "*_gl.m4".
12579
12580 2004-10-06 Akim Demaille <akim@epita.fr>
12581
12582 * src/parse-gram.y (add_param): Fix the truncation of trailing
12583 spaces.
12584
12585 2004-10-05 Akim Demaille <akim@epita.fr>
12586
12587 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
12588 whether the reducion was empty or not. This leaves room to
12589 improve the use of YYLLOC_DEFAULT in such a case.
12590 lalr1.cc is still experimental, so changing this is acceptable.
12591 And finally, there are probably not many users who changed the
12592 handling of locations in GLR, so changing is admissible too.
12593
12594 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
12595 empty reduction, set @$ to an empty location ending the previously
12596 stacked symbol.
12597 Adjust uses to make sure the code is triggered on empty
12598 reductions.
12599 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
12600 expected output: empty reductions have empty locations.
12601
12602 2004-09-29 Akim Demaille <akim@epita.fr>
12603
12604 * data/lalr1.cc: Move towards a more standard C++ coding style
12605 for templates: Class < T > -> Class<T>.
12606
12607 2004-09-29 Akim Demaille <akim@epita.fr>
12608
12609 * data/lalr1.cc: Reinstall the former ctor, for sake of
12610 compatibility, but warn it will be removed.
12611 Move towards a more standard C++ coding style (i.e., type *var ->
12612 type* var).
12613
12614 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
12615
12616 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
12617 since it's less likely to work if NULs are involved in the future.
12618
12619 2004-09-27 Akim Demaille <akim@epita.fr>
12620
12621 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
12622
12623 2004-09-27 Akim Demaille <akim@epita.fr>
12624
12625 * data/lalr1.cc (b4_parse_param_decl_1): New.
12626 (b4_parse_param_decl): Use it to have different names between attribute
12627 and argument names.
12628 (b4_cc_constructor_call): Likewise.
12629
12630 2004-09-24 Akim Demaille <akim@epita.fr>
12631
12632 * src/parse-gram.y (add_param): Strip the leading and trailing
12633 blanks from a formal argument declaration.
12634 (YY_LOCATION_PRINT): New.
12635
12636 2004-09-24 Akim Demaille <akim@epita.fr>
12637
12638 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
12639 after the location.
12640
12641 2004-09-24 Akim Demaille <akim@epita.fr>
12642
12643 * doc/bison.texinfo (Table of Symbols): Sort.
12644
12645 2004-09-21 Akim Demaille <akim@epita.fr>
12646
12647 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
12648 the useless parentheses.
12649 Suggested by Paul Eggert.
12650
12651 2004-09-20 Akim Demaille <akim@epita.fr>
12652
12653 Let the initial-action act on the look-ahead, and use it for the
12654 "initial push" (corresponding to an hypothetical beginning-of-file).
12655 And let lalr1.cc honor %initial-action.
12656
12657 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
12658 example.
12659 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
12660 (Parser::Parser): Remove the ctor that used to initialize it.
12661 (Parser::parse): Like in the other skeletons, issue the "starting
12662 parse" message before any action.
12663 Honor %initial-action.
12664 Initialize the stacks with the lookahead.
12665 * data/yacc.c: Let $$ and @$ in %initial-action designate the
12666 look-ahead.
12667 Push them in the stacks.
12668 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
12669
12670 2004-09-20 Akim Demaille <akim@epita.fr>
12671
12672 * doc/bison.texinfo (Initial Action Decl): New.
12673
12674 2004-09-20 Akim Demaille <akim@epita.fr>
12675
12676 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
12677 clearer criterion to define it.
12678 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
12679 When reducing on an empty RHS, use the latest stacked location as
12680 location.
12681 yylloc is not always available.
12682 * data/glr.c: Likewise.
12683 Also, honor initial-actions.
12684
12685 2004-09-20 Akim Demaille <akim@epita.fr>
12686
12687 * data/yacc.c (YY_LOCATION_PRINT): New.
12688 Define when we know YYLTYPE's structure, i.e., when the default
12689 YYLLOC_DEFAULT is used.
12690 * data/c.m4 (b4_yysymprint_generate): Use it.
12691 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
12692 value of the result.
12693 (error_start_): Replace with...
12694 (error_range_): this location array.
12695 This allows to replace code relying on the implementation of
12696 locations by portable code.
12697 * data/yacc.c (yylerrsp): Replace with...
12698 (yyerror_range): this.
12699 Every time a token is popped, update yyerror_range[0], to have an
12700 accurate location for the error token.
12701 * data/glr.c (YY_LOCATION_PRINT): New.
12702 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
12703 deference a pointer.
12704 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
12705 report the location in %printers.
12706
12707 * src/scan-skel.l: Instead of abort, report error messages to ease
12708 understanding skeleton scanning failures.
12709
12710 2004-09-16 Akim Demaille <akim@epita.fr>
12711
12712 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
12713 (iterator, const_iterator): these, to be more in the C++ spirit.
12714 Also, return reverse iterators so that when displaying the stack
12715 we display its bottom first.
12716 (Parser::stack_print_, Parser::reduce_print_): Match the messages
12717 from yacc.c.
12718 We should probably use vector here though.
12719
12720 2004-09-16 Akim Demaille <akim@epita.fr>
12721
12722 Have more complete shift traces.
12723
12724 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
12725 to report Shifts instead of ad hoc YYDPRINTF invocations,
12726 including for the error token.
12727 * data/lalr1.cc (symprint_): Output the location.
12728 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
12729 output the location within the %printer.
12730 Activate GLR tests, at least to make sure they compile properly.
12731 They still don't pass though.
12732 * tests/calc.at: Adjust expect verbose output, since now "Entering
12733 state..." is on a different line than the "Shifting" message.
12734
12735 2004-09-08 Akim Demaille <akim@epita.fr>
12736
12737 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
12738 Bison directive from the Bison file to the invocation of this
12739 macro, so that these directives are passed to
12740 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
12741 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
12742 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
12743 the extra Bison directives instead of the whole series.
12744 Change the grammar so that there are recoverable errors, and
12745 unrecoverable errors. Now we can have the parser give up before
12746 consuming the whole input. As a result we now can observe that
12747 the lookahead is freed when needed.
12748 Change the parser source to parse argv[1] instead of a hard coded
12749 string.
12750 Simplify yylex, and give a value and location to EOF.
12751 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
12752 passed directives already coded in the file.
12753 Add some tests to check the location of "error".
12754 For some tests, the C++ parser is correct, and not yacc.c.
12755 For other tests, they provide different, but unsatisfying, values,
12756 so keep the C++ value so that at least one parser is "correct"
12757 according to the test suite.
12758 (Actions after errors): Remove, this is subsumed by the
12759 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
12760
12761 2004-09-06 Akim Demaille <akim@epita.fr>
12762
12763 * data/lalr1.cc: Adjust the indentation of the labels.
12764 (Parser::pop): New.
12765 Use it.
12766
12767 2004-09-06 Akim Demaille <akim@epita.fr>
12768
12769 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
12770 argument, an informative message.
12771 Call YY_SYMBOL_PRINT.
12772 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
12773 * data/lalr1.cc (destruct_): Likewise.
12774 In addition, no longer depend on b4_yysymprint_generate and
12775 b4_yydestruct_generate to generate these functions, do it "by
12776 hand".
12777
12778 2004-09-03 Akim Demaille <akim@epita.fr>
12779
12780 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
12781 invoked, yydestruct the lookahead.
12782 * tests/calc.at (Calculator $1): Update the expected lengths of
12783 traces: there is an added line for the discarded lookahead.
12784 * doc/bison.texinfo (Destructor Decl): Some rewording.
12785 Define "discarded" symbols.
12786
12787 2004-09-02 Akim Demaille <akim@epita.fr>
12788
12789 * data/lalr1.cc (translate_, destruct_): No reason to be static.
12790
12791 2004-09-02 Akim Demaille <akim@epita.fr>
12792
12793 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
12794 (YYDSYMPRINTF): Rename as...
12795 (YY_SYMBOL_PRINT): this.
12796 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
12797 two.
12798 Use it instead of direct symprint_ calls.
12799 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
12800 one.
12801
12802 2004-09-02 Akim Demaille <akim@epita.fr>
12803
12804 * data/lalr1.cc (b4_yysymprint_generate): New.
12805 (symprint_): New member function, defined when YYDEBUG.
12806 Use it consistently instead of token/nterm debugging output by
12807 hand.
12808 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
12809 %printer calls to use cdebug_ when using lalr1.cc.
12810
12811 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
12812
12813 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
12814 with #ifdef YYDEBUG.
12815
12816 2004-08-26 Akim Demaille <akim@epita.fr>
12817
12818 * doc/bison.texinfo (Implementing Loops): Rename as...
12819 (Implementing Gotos/Loops): this.
12820
12821 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
12822
12823 Adjust to latest gnulib.
12824 * bootstrap (gnulib_modules): Add xalloc-die.
12825 Set LC_ALL=C so that file names sort consistently.
12826 Prefer the gnulib copies of gettext.m4, glibc21.m4,
12827 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
12828 uintmax_t.m4, ulonglong.m4.
12829 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
12830 po.m4 since we are now using _gl.m4 instead.
12831
12832 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
12833
12834 * src/scan-action.l: Remove. Scanning of semantic actions is
12835 handled in scan-gram.l.
12836
12837 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
12838
12839 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
12840
12841 * src/location.h (struct): The file member is a uniqstr.
12842 (equal_boundaries): Use UNIQSTR_EQ for comparison.
12843
12844 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
12845
12846 Fix bug with non-%union parsers that have printers or destructors,
12847 which led to a Bison core dump. Reported by Peter Fales in
12848 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
12849
12850 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
12851 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
12852 not to our own type.
12853 * src/output.c (symbol_destructors_output, symbol_printers_output):
12854 Don't assume %union.
12855 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
12856 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
12857 UNION-FLAG. All callers changed.
12858 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
12859 Use type char, not unsigned int, when declaring an array of char;
12860 this lets us remove a cast.
12861 (Printers and Destructors): Add non-%union test cases.
12862
12863 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12864
12865 * doc/bison.texinfo: Minor editorial changes, mostly to the new
12866 GLR writeups. E.g., avoid frenchspacing and the future tense,
12867 change "lookahead" to "look-ahead", and change "wrt" to "with
12868 respect to".
12869
12870 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12871
12872 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12873 New sections, split off from the GLR Parsers section. Put the new
12874 Simple GLR Parser near the start of the GLR section, for clarity.
12875 Rewrite connective text.
12876
12877 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
12878
12879 * doc/bison.texinfo (Simple GLR Parsers): New section.
12880
12881 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12882
12883 * NEWS, TODO, doc/bison.texinfo:
12884 Use "look-ahead" instead of "lookahead", to be consistent.
12885 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12886 while we're fixing "look-ahead".
12887 * src/conflicts.c (shift_set): Renamed from shiftset.
12888 (look_ahead_set): Renamed from lookaheadset.
12889 * src/print.c: Likewise.
12890 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12891 name for "lookahead".
12892 (report_types, usage): Likewise.
12893 * src/getargs.h (report_look_ahead_tokens): Renamed from
12894 report_lookaheads.
12895 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12896 compute_lookaheads.
12897 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12898 (look_ahead_tokens_print): Renamed from lookaheads_print.
12899 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12900 state_rule_lookaheads_print.
12901 * src/state.h: Likewise.
12902 (reductions.look_ahead_tokens): Renamed from lookaheads.
12903 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12904 AT_DATA_LOOKAHEADS_GRAMMAR.
12905
12906 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12907
12908 * README: Update location of patched M4 distribution.
12909
12910 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12911
12912 Don't assume the C++ compiler takes the same arguments as the C compiler
12913 (trivial change).
12914 * configure.ac (O0CXXFLAGS): New var.
12915 * tests/atlocal.in (CXXFLAGS): Use it.
12916
12917 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12918
12919 Fix some "make check" problems with C++ reported by
12920 Albert Chin-A-Young for Tru64 C++ in this thread:
12921 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12922
12923 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12924 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12925 Output to a .cc file for C++, not to a .c file.
12926 * tests/calc.at (AT_CHECK_CALC): Likewise.
12927 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12928 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12929
12930 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12931
12932 * tests/calc.at, tests/actions.at: Workaround for SGI
12933 C++ compiler. (trivial change)
12934
12935 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12936
12937 Spent a few hours checking out which prerequisite versions the
12938 current sources actually require. I went all the way back to
12939 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12940 a seemingly endless set of combinations of versions more recent
12941 than that. The bottom line is that the current sources require
12942 fairly recent versions of the build tools, and it'll be some work
12943 to change this.
12944 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12945 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12946 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12947 Add comments explaining why those particular versions are
12948 currently needed.
12949
12950 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12951 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12952 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12953
12954 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12955 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12956
12957 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12958
12959 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12960 0.11.5. Suggested by Bruno Haible.
12961 * bootstrap: Remove gettext version checking.
12962
12963 * doc/bison.texinfo (Decl Summary): Also mention that %union
12964 can depend on prerequisite types. Problem reported by Tim
12965 Van Holder.
12966
12967 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12968
12969 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12970 * README-alpha: Don't tell people not to package this.
12971
12972 * bootstrap: Don't assume $(...) works; use `...` instead.
12973 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12974 gettext better.
12975
12976 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12977 put into the -d output file, and mention what to do if YYSTYPE is
12978 defined as a macro.
12979
12980 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12981
12982 Undo change made earlier today: it caused autopoint to not bring
12983 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12984 autopoint's.
12985
12986 * bootstrap: Check that gettext version matches what's in
12987 configure.ac. Warn users to ignore robots.txt ERROR 404.
12988 * bootstrap: Undo today's earlier change (logged below).
12989 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12990
12991 The gettext version checking is causing more trouble than it's
12992 curing; remove it. Problem reported by Paul Hilfinger.
12993
12994 * bootstrap: Issue a warning that one can expect a message
12995 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12996 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12997
12998 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12999
13000 Ensure that the C++ compiler used for testing actually works on a
13001 simple test program; if not, skip the C++-related tests. Problem
13002 reported by Vin Shelton in:
13003 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13004
13005 * m4/cxx.m4: New file.
13006 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13007 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13008 * tests/local.at (AT_COMPILE_CXX): Use it.
13009
13010 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13011
13012 * data/glr.c (yylloc): Output this macro even if locations are not
13013 being generated, as the GLR parser needs it even in that case.
13014 Problem reported by Troy A. Johnson
13015 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13016
13017 * configure.ac (AC_INIT): Update to 1.875e.
13018
13019 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13020
13021 * NEWS: Version 1.875d.
13022 * configure.ac (AC_INIT): Likewise.
13023 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13024
13025 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13026 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13027 lalr1.cc runs afoul of the first, and the last two are no longer
13028 supported by GCC 3.4.0.
13029 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13030 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13031
13032 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13033
13034 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13035 unsigned int, for compatibility with latest gnulib hash module.
13036 * src/state.c (state_hash, state_hasher): Likewise.
13037 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13038 * src/uniqstr.c (hash_uniqstr): Likewise.
13039
13040 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13041
13042 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13043
13044 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13045 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13046 character and string literals.
13047 (unexpected_end): New function.
13048 (unexpected_eof): Use it.
13049 (unexpected_newline): New function.
13050 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13051 actions.
13052
13053 * NEWS: Document %expect-rr.
13054
13055 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13056 Fix typo by replacing $1 with $option.
13057 Remove more 'intl'-related files.
13058 Don't DEFUN AM_INTL_SUBDIR twice.
13059
13060 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13061 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13062 strtoul.c.
13063 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13064 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13065 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13066 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13067 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13068 * src/.cvsignore: Add *.output.
13069
13070 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13071 gets copied to the output file.
13072
13073 2004-04-28 Paul Eggert <eggert@twinsun.com>
13074
13075 Get files from the gnulib and po repositories, instead of relying
13076 on them being in our CVS. Upgrade to latest versions of gnulib
13077 and Automake.
13078
13079 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13080 * bootstrap: Bootstrap from gnulib and po repositories.
13081 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13082 * README-cvs: Document these changes. Remove version numbers from
13083 mentions of build tools, since they change so often. Mention Flex.
13084
13085 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13086 (gl_USE_SYSTEM_EXTENSIONS): Add.
13087 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13088 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
13089 does this for us.
13090 (AC_ISC_POSIX): Remove; we no longer support this
13091 ancient OS, as it gets in the way of latest Autoconf & gnulib.
13092 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13093 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13094 Do not check for C89 headers, except for locale.h which is used
13095 by the Yacc library and must port to K&R hosts.
13096 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13097 Do not check for C89 functions, except for setlocale which is
13098 used by the Yacc library.
13099 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13100 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13101 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13102 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13103 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13104 AM_GNU_GETTEXT): Remove; now done by:
13105 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13106 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13107 for us.
13108
13109 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13110 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13111 Define to empty, as gnulib.mk will do the rest for us.
13112 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13113 for us.
13114 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13115 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13116
13117 * src/files.c: Include gnulib's xstrndup.h.
13118
13119 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13120 (REALLOC): Use xnrealloc, for likewise.
13121 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13122 (strnlen, memrchr): Remove decls; functions no longer used.
13123 Include <stpcpy.h>.
13124
13125 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13126 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13127 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13128 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13129 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13130 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13131 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13132 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13133 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13134 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13135 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13136 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13137 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13138 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13139 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13140 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13141 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13142 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13143 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13144 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13145 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13146 Remove, as these files are now generated automatically
13147 by bootstrap or automake.
13148
13149 * po/ChangeLog: Remove: all but one entry was a duplicate
13150 of this file, and I moved that 2000-11-02 entry here.
13151
13152 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13153 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13154 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13155 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13156 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13157 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13158 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13159 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13160 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13161 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13162 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13163 xstrndup.h.
13164 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13165 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13166 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13167 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13168 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13169 * src/.cvsignore: Remove *_.c.
13170
13171
13172 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13173 support it. (The latest stable gzip doesn't.)
13174
13175 2004-04-27 Paul Eggert <eggert@twinsun.com>
13176
13177 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13178 case, as stos_ is now used by destructors due to the 2004-02-09
13179 change.
13180
13181 Remove more K&R C support.
13182 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13183 * lib/subpipe.c (errno): Remove decl.
13184 Include <stdlib.h> unconditionally.
13185 (EXIT_FAILURE): Remove macro.
13186 * src/complain.c (vfprintf, strerror): Remove.
13187 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13188 unconditionally.
13189 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13190 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13191 (strchr, strspn, memchr): Remove decls.
13192 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13193 unconditionally. Do not declare perror.
13194 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13195 unconditionally.
13196
13197 * src/complain.c (_): Remove useless defn, as system.h defines this.
13198
13199 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13200 with latest obstack.h.
13201 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13202 to procedure types, as obstack.h now does that for us.
13203 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13204
13205 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13206 so that this include file can stand alone.
13207 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13208 does this now. Include subpipe.h first after config.h, to
13209 test whether it can stand alone.
13210
13211 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13212 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13213 unused declaration.
13214
13215 * tests/synclines.at (%union synch line): Put a dummy member in
13216 the union, because empty unions aren't allowed in C. Caught
13217 by GCC 3.4.0.
13218
13219 2004-04-13 Jim Meyering <jim@meyering.net>
13220
13221 * src/conflicts.c (conflicts_print): Correct format string typo:
13222 use `%%' to produce literal `%'. (trivial change)
13223
13224 2004-03-30 Paul Eggert <eggert@twinsun.com>
13225
13226 * src/getargs.c (version): Update copyright year to 2004.
13227
13228 * data/c.m4 (b4_int_type): Use 'short int' rather than
13229 'short', and similarly for 'long', 'unsigned', etc.
13230 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13231 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13232 yy_yypstack, yydumpstack): Likewise.
13233 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13234 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13235 Likewise.
13236 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13237 yy_stack_print, yyparse): Likewise.
13238 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13239 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13240 * lib/bitset.c (bitset_print): Likewise.
13241 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13242 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13243 * lib/bitsetv.c (bitsetv_dump): Likewise.
13244 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13245 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13246 Likewise.
13247 * src/LR0.c (allocate_itemsets): Likewise.
13248 * src/gram.h (rule_number, rule): Likewise.
13249 * src/lalr.h (goto_number): Likewise.
13250 * src/nullable.c (nullable_compute): Likewise.
13251 * src/output.c (prepare_rules): Likewise.
13252 * src/relation.c (relation_print, relation_digraph): Likewise.
13253 * src/relation.h (relation_node): Likewise.
13254 * src/state.h (state_number, transitions, errs, reductions,
13255 struct state): Likewise.
13256 * src/symtab.h (symbol_number, struct symbol): Likewise.
13257 * src/tables.c (vector_number, tally, action_number,
13258 default_goto, goto_actions): Likewise.
13259 * tests/existing.at (GNU Cim Grammar): Likewise.
13260 * tests/regression.at (Web2c Actions): Likewise.
13261
13262 * src/output.c (muscle_insert_short_int_table): Renamed from
13263 muscle_insert_short_table. All uses changed.
13264
13265 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13266
13267 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13268 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13269 Add %expect-rr rule.
13270
13271 * src/scan-gram.l: Recognize %expect-rr.
13272
13273 * src/conflicts.h (expected_sr_conflicts): Rename from
13274 expected_conflicts.
13275 (expected_rr_conflicts): Declare.
13276
13277 * src/conflicts.c (expected_sr_conflicts): Rename from
13278 expected_conflicts.
13279 (expected_rr_conflicts): Define.
13280 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13281 for GLR parsers.
13282 Use expected_sr_conflicts in place of expected_conflicts.
13283 Warn if expected_rr_conflicts used in non-GLR parser.
13284
13285 * doc/bison.texinfo: Add documentation for %expect-rr.
13286
13287 2004-03-08 Paul Eggert <eggert@gnu.org>
13288
13289 Add support for hex token numbers. Suggested by Odd Arild Olsen in
13290 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
13291
13292 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13293 in lalr1.cc.
13294 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13295 * src/scan-gram.l (scan_integer): New function.
13296 ({int}): Use it.
13297 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13298 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13299 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13300 Say "long int", not "long", for uniformity with GNU style.
13301
13302 2004-02-25 Paul Eggert <eggert@twinsun.com>
13303
13304 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13305 compilers. This fixes a problem with Intel's C++ compiler being
13306 chatty, reported by Guido Trentalancia in
13307 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
13308
13309 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13310
13311 Support %destructor and merge error locations in lalr1.cc.
13312
13313 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13314 (Parser::stos_): Define unconditionally.
13315 (Parser::destruct_): New method. Generate its body with
13316 b4_yydestruct_generate.
13317 (Parser::error_start_): New attribute.
13318 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13319 token which are discarded.
13320 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13321 error_start_ when erroneous token are discarded.
13322 (Parser::parse) <yyerrlab1>: Compute the location of the error
13323 token so that it covers all the discarded tokens.
13324 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13325 it can be called with `%skeleton "lalr1.cc"', and do that.
13326
13327 2004-02-02 Paul Eggert <eggert@twinsun.com>
13328
13329 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13330 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13331 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13332 There's no need to mention top_builddir since Automake does that
13333 for us.
13334 (INCLUDES): Remove, as Automake says it's obsolescent.
13335 Contents migrated into AM_CPPFLAGS as described above.
13336 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13337
13338 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13339
13340 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13341 (yyreportSyntaxError): Handle case where lookahead token is
13342 YYEMPTY.
13343
13344 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13345
13346 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13347 resulting parsers are compilable with C++.
13348
13349 2003-12-23 Paul Eggert <eggert@twinsun.com>
13350
13351 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13352 * src/output.c (output_skeleton): Rename local var.
13353 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13354 Bison tokens, as this runs afoul of the 2003-10-07 change that
13355 disallowed NUL bytes in character constants or string literals.
13356
13357 * tests/local.at: Require Autoconf 2.59's Autotest.
13358 * tests/testsuite.at: Don't include local.at, since we now assume
13359 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13360 including it.
13361 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13362 multiple inclusion warnings.
13363
13364 2003-12-02 Akim Demaille <akim@epita.fr>
13365
13366 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13367 conditions.
13368 From Bruno Haible.
13369
13370 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13371
13372 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13373
13374 2003-10-07 Paul Eggert <eggert@twinsun.com>
13375
13376 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13377 if testsuite doesn't exist.
13378
13379 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13380 literals, unfortunately.
13381 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13382 Complain about NUL bytes in character constants or string literals.
13383
13384 2003-10-05 Paul Eggert <eggert@twinsun.com>
13385
13386 * NEWS: Don't document %no-default-prec, as it's still
13387 too experimental.
13388 * doc/bison.texinfo: Document %no-default-prec only if
13389 the defaultprec flag is set. Normally it's not.
13390
13391 2003-10-04 Paul Eggert <eggert@twinsun.com>
13392
13393 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13394 non-modifiable lvalue, instead of a modifiable one.
13395 * doc/bison.texinfo (Actions): Document that $$ can
13396 be assigned to. Do not claim that $$ and $N are
13397 array element references: user code should not rely on this.
13398
13399 2003-10-01 Paul Eggert <eggert@twinsun.com>
13400
13401 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
13402 (grammar_declaration): Use it.
13403 * src/scan-gram.l: New token %no-default-prec.
13404 * tests/conflicts.at: Revamp tests to use %no-default-prec.
13405 * NEWS, doc/bison.texinfo: Document the above.
13406
13407 2003-10-01 Akim Demaille <akim@epita.fr>
13408
13409 VCG no longer supports long_straight_phase.
13410
13411 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
13412 * src/print_graph.c (print_graph): Adjust.
13413
13414 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
13415 and Paul Eggert <eggert@twinsun.com>
13416
13417 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
13418 Table of Symbols): Document %default-prec.
13419 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
13420 (grammar_declaration): Set default_prec on %default-prec.
13421 * src/scan-gram.l (%default-prec): New token.
13422 * src/reader.h (default_prec): New flag.
13423 * src/reader.c: Likewise.
13424 (packgram): Handle it.
13425 * tests/conflicts.at (%default-prec without %prec,
13426 %default-prec with %prec, %default-prec 1): New tests.
13427
13428 2003-09-30 Paul Eggert <eggert@twinsun.com>
13429
13430 * tests/testsuite.at: Include local.at, not input.at, fixing
13431 a typo in the 2003-08-25 patch.
13432
13433 2003-08-27 Akim Demaille <akim@epita.fr>
13434
13435 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
13436 GCC warnings.
13437
13438 2003-08-26 Akim Demaille <akim@epita.fr>
13439
13440 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
13441 "<\#" to avoid magic from Gnus when posting parts of this script.
13442
13443 2003-08-26 Akim Demaille <akim@epita.fr>
13444
13445 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
13446 (Parser::parse): here.
13447 Adjust: nerrs and errstatus is now replaced by...
13448 (Parser::nerrs_, Parser::errstatus_): New.
13449
13450 2003-08-25 Akim Demaille <akim@epita.fr>
13451
13452 * config/announce-gen, Makefile.cfg: New.
13453 * Makefile.am: Adjust.
13454 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
13455 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
13456
13457 2003-08-25 Akim Demaille <akim@epita.fr>
13458
13459 When reducing initial empty rules, Bison parser read an initial
13460 location that is not defined. This results in garbage, and that
13461 affects Bison's own parser. Therefore we need (i) to extend Bison
13462 to support a means to initialize this location, and (ii) to use
13463 this CVS Bison to fix CVS Bison's parser.
13464
13465 * src/reader.h, reader.c (epilogue_augment): Remove, replace
13466 with...
13467 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
13468 * src/parse-gram.y: Adjust.
13469 (%initial-action): New.
13470 (%error-verbose): Since we require CVS Bison, there is no reason
13471 not to use it.
13472 * src/scan-gram.l: Adjust.
13473 * src/Makefile.am (YACC): New, to make sure we use our own parser.
13474 * data/yacc.c (yyparse): Use b4_initial_action.
13475
13476 2003-08-25 Akim Demaille <akim@epita.fr>
13477
13478 * doc/bison.texinfo: Don't promote stdout for error messages.
13479
13480 2003-08-25 Akim Demaille <akim@epita.fr>
13481
13482 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
13483 From Alexandre Duret-Lutz.
13484
13485 2003-08-25 Akim Demaille <akim@epita.fr>
13486
13487 Version 1.875c.
13488
13489 2003-08-25 Akim Demaille <akim@epita.fr>
13490
13491 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
13492 Use them.
13493
13494 2003-08-25 Akim Demaille <akim@epita.fr>
13495
13496 * data/lalr1.cc (Parser::reduce_print_): New.
13497 Use it.
13498
13499 2003-08-25 Akim Demaille <akim@epita.fr>
13500
13501 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
13502 error recovery loops. This patch is based on
13503 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
13504 Also, augment the similarity between lalr1.cc and yacc.c.
13505 Note: the locations of error recovery rules are not correct yet.
13506
13507 * data/lalr1.cc: Comment changes to augment the similarity between
13508 lalr1.cc and yacc.c.
13509 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
13510 (yyerrlab1): Remove, but where it used to be (now the bottom part of
13511 yyerrlab), when hitting EOF, pop the whole stack here instead of
13512 merely falling thru the default error handling mechanism.
13513 (yyerrorlab): New label, with the old contents of YYERROR,
13514 plus the following change: pop the stack of rhs corresponding
13515 to the production that invoked YYERROR. That is how Yacc
13516 behaves (required by POSIX).
13517 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
13518 fail.
13519
13520 2003-08-25 Akim Demaille <akim@epita.fr>
13521
13522 Tune local.at so that people can "autom4te -l autotest calc.at -o
13523 calc" for instance, to extract a sub test suite.
13524
13525 * tests/testsuite.at: Move the initialization, Autotest version
13526 requirement, and AT_TESTED invocation into...
13527 * tests/local.at: here.
13528 * tests/testsuite.at: Include it for compatibility with Autoconf
13529 2.57.
13530 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
13531 be ignore.
13532
13533 2003-08-04 Paul Eggert <eggert@twinsun.com>
13534
13535 Rework code slightly to avoid gcc -Wtraditional warnings.
13536 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
13537 The returned value is now stored in *YY0. All callers changed.
13538 * src/output.c (merge_output): Adjust to the above change.
13539
13540 2003-07-26 Paul Eggert <eggert@twinsun.com>
13541
13542 * data/glr.c (YYASSERT): New macro.
13543 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
13544 yyresolveStates, yyprocessOneStack):
13545 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
13546 Derived from a suggestion by Frank Heckenbach.
13547
13548 2003-07-25 Paul Eggert <eggert@twinsun.com>
13549
13550 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
13551 for portability to K&R C (after ansi2knr, presumably). See
13552 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
13553 by Frank Heckenbach, though I have omitted the structure-initialization
13554 part of his glr-knr.diff patch since I recall that the Portable
13555 C Compiler didn't require that change.
13556
13557 Let the user specify how to allocate and free memory.
13558 Derived from a suggestion by Frank Heckenbach in
13559 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
13560 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
13561 All uses of free, malloc, realloc changed to use these macros,
13562 and unnecessary casts removed.
13563 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
13564
13565 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
13566
13567 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
13568 use s.empty() rather than s == "" to test for empty string; see
13569 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
13570 (trivial change)
13571
13572 2003-06-25 Akim Demaille <akim@epita.fr>
13573
13574 * config/depcomp, config/install-sh: Update from masters.
13575
13576 2003-06-20 Paul Eggert <eggert@twinsun.com>
13577
13578 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
13579 and return properly parenthesized result.
13580 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
13581 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13582 Remove unnecessary parentheses from uses.
13583 * doc/bison.texinfo (Location Default Action): Describe the
13584 conventions for parentheses.
13585
13586 2003-06-19 Paul Eggert <eggert@twinsun.com>
13587
13588 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
13589 yyreportTree): Do not assume that size_t is the same width as int,
13590 when printing sizes. Print sizes using an unsigned format.
13591 Problem reported by Frank Heckenbach in
13592 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
13593
13594 Port to Forte Developer 7 C compiler.
13595 * data/glr.c (struct YYLTYPE): If locations are not being used,
13596 declare a single dummy member, as empty structs do not conform
13597 to the C standard.
13598 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
13599 the Forte Developer 7 C compiler complains that end-of-loop
13600 code is not reached.
13601
13602 2003-06-17 Paul Eggert <eggert@twinsun.com>
13603
13604 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
13605 avoid warnings from picky compilers about redefinition of PARAMS.
13606
13607 2003-06-17 Paul Eggert <eggert@twinsun.com>
13608
13609 Version 1.875b.
13610
13611 * NEWS: Document 1.875b.
13612
13613 * lib/bbitset.h: Do not include config.h; that's the includer's job.
13614 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
13615 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
13616 Don't use 'index' in comments, as it's a builtin fn on some hosts.
13617 * lib/bitset_stats.c: Include gettext.h unconditionally, as
13618 per recent gettext manual's suggestion.
13619 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
13620 Use prototypes, not old-style definitions.
13621 * lib/lbitset.c (lbitset_unused_clear): Likewise.
13622 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
13623 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
13624 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
13625 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
13626 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
13627 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
13628 vbitset_or_and_cmp, vbitset_copy): Likewise.
13629
13630 * lib/libiberty.h: Do not include config.h; that's the includer's job.
13631 Do not include <stdlib.h>.
13632 (PARAMS): Define unconditionally for C89.
13633 (ATTRIBUTE_NORETURN): Remove.
13634 (ATTRIBUTE_UNUSED): Define unconditionally.
13635
13636 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
13637 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
13638 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
13639 * lib/vbitset.c, lib/vbitset.h: New files.
13640 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13641 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
13642 from libbitset.
13643
13644 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
13645 `How Can I Reset @code{yyparse}', since texinfo does not allow
13646 arbitrary @ in node names.
13647
13648 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
13649 shouldn't be needed according to the gettext 0.12.1 documentation
13650 but which seem to be needed anyway: codeset.m4 glibc21.m4
13651 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
13652 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
13653 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
13654
13655 * lib/.cvsignore: Add stdbool.h.
13656 * m4/.cvsignore: Add nls.m4, po.m4.
13657
13658 Upgrade to CVS gnulib.
13659 * stdbool_.h: File renamed from stdbool.h.in.
13660 * configure.ac (AM_STDBOOL_H): Invoke this instead of
13661 AC_HEADER_STDBOOL.
13662 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
13663 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
13664 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
13665 (MOSTLYCLEANFILES): New var.
13666 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
13667 (stdbool.h): New rule.
13668 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
13669 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
13670 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
13671 m4/quote.m4: Upgrade to today's gnulib.
13672
13673 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
13674 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
13675 the tests right now.
13676 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
13677 yyerror are declared before use; C99 requires this.
13678
13679 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13680
13681 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
13682 first.
13683 (yyrecoverSyntaxError): Correct the logic for setting and testing
13684 yyerrState.
13685 Correct comment on handling EOF.
13686 Allow states with only a default reduction, rather than failing
13687 (I can't quite reconstruct why these were not allowed before).
13688
13689 Fixes to avoid problem that $-N rules in GLR parsers can cause
13690 buffer overruns, corrupting state.
13691
13692 * src/output.c (prepare_rules): Output max_left_semantic_context
13693 definition.
13694 * src/reader.h (max_left_semantic_context): New variable declaration.
13695 * src/scan-gram.l (max_left_semantic_context): Define.
13696 (handle_action_dollar): Update max_left_semantic_context.
13697 * data/glr.c (YYMAXLEFT): New definition.
13698 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
13699 (yyresolveAction): Ditto.
13700
13701 Fixes to problems with location handling in GLR parsers reported by
13702 Frank Heckenbach (2003/06/05).
13703
13704 * data/glr.c (YYLTYPE): Make trivial if locations not used.
13705 (YYRHSLOC): Add parentheses, and define only if locations used.
13706 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
13707 locations not used.
13708 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
13709 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
13710
13711 * tests/cxx-type.at: Exercise location information; update tests
13712 to differentiate output with and without locations.
13713 Remove forward declarations of yylex and yyerror---caused errors
13714 because default YYLTYPE not yet defined.
13715 Change semantic actions to compute strings, rather than printing
13716 them directly (to test proper passing of semantics values). Change
13717 output to prefix notation and update test data and expected results.
13718 (yylex): Track locations.
13719 (stmtMerge): Return value rather than printing, and include arguments
13720 in value.
13721
13722 2003-06-03 Paul Eggert <eggert@twinsun.com>
13723
13724 Avoid warnings generated by GCC 2.95.4 when Bison is
13725 configured with --enable-gcc-warnings.
13726 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
13727 yy::]b4_parser_class_name[::translate_,
13728 yy::Stack::operator[] (unsigned),
13729 yy::Stack::operator[] (unsigned) const,
13730 yy::Slice::operator[] (unsigned),
13731 yy::Slice::operator[] (unsigned) const):
13732 Rename local vars to avoid warnings.
13733 * tests/glr-regression.at (Improper handling of embedded actions
13734 and $-N in GLR parsers): Remove unused local variable from yylex.
13735 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
13736 (void) as arg when not pure, since we now assume C89 when building
13737 Bison. Pacify GCC by using parameter.
13738
13739 2003-06-02 Paul Eggert <eggert@twinsun.com>
13740
13741 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
13742 yy::Location::lines, yy::Location::columns): Rename arguments
13743 to avoid shadowing; this removes a warning generated by GCC 3.3.
13744
13745 2003-06-01 Paul Eggert <eggert@twinsun.com>
13746
13747 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
13748 to g++, as GCC 3.3 complains if you do it.
13749 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
13750 everything that WARNING_CFLAGS has, except omit warnings
13751 not suitable for C++.
13752 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
13753 * tests/atlocal.in (CXXFLAGS): New var.
13754 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
13755
13756 Fix a GLR parser bug I reported in February; see
13757 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
13758 The problem was that GLR parsers did not conform to the C standard,
13759 because actions like { $1 = $2 + $3; } expanded to expressions
13760 that invoked YYFILL in separate subexpressions, and YYFILL assigned
13761 to a local variable. The C standard says that expressions
13762 like (var = f ()) + (var = f ()) have undefined behavior.
13763 Another problem was that GCC sometimes issues warnings that
13764 yyfill and its parameters are unused.
13765
13766 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
13767 as possibly unused.
13768 (yyfill): New function.
13769 (YYFILL): Use it.
13770 (yyuserAction): Change type of yynormal to bool, so that it matches
13771 the new yyfill signature. Mark it as possibly unused.
13772
13773
13774 Follow up on a bug I reported in February, where a Bison-generated
13775 parser can loop. Provide a test case and a fix for yacc.c. I
13776 don't have a fix for lalr1.cc or for glr.c, unfortunately.
13777 The original bug report is in:
13778 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
13779
13780 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
13781 macro's size was becoming unwieldy.
13782 (yyerrlab): Do not discard an empty lookahead symbol, as this
13783 might destroy garbage.
13784 (yyerrorlab): New label, with the old contents of YYERROR,
13785 plus the following change: pop the stack of rhs corresponding
13786 to the production that invoked YYERROR. That is how Yacc
13787 behaves, and POSIX requires this behavior.
13788 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
13789 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
13790 Define 'alarm' to do nothing if unistd.h is not available.
13791 Add a new rule "exp: '-' error;" to test the above change to
13792 data/yacc.c. Use 'alarm' to abort any test taking longer than
13793 10 seconds, as it's probably looping.
13794 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
13795 Also, the new yacc.c generates two fewer diagnostics for an
13796 existing test.
13797
13798 2003-05-24 Paul Eggert <eggert@twinsun.com>
13799
13800 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
13801 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
13802 This fixes a problem reported by John Bowman when the Compaq/HP
13803 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
13804 -ansi -Wall -gall).
13805 * data/yacc.c (union yyalloc): Likewise.
13806 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
13807
13808 Switch from 'int' to 'bool' where that makes sense.
13809
13810 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
13811 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
13812 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
13813 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
13814 Return or accept bool, not int. All callers changed.
13815 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
13816 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
13817 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
13818 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
13819 bitset_or_and_cmp_): Likewise.
13820 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
13821 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
13822 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
13823 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
13824 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
13825 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
13826 bitset_stats_or_and_cmp): Likewise.
13827 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
13828 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
13829 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
13830 ebitset_xor_cmp): Likewise.
13831 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
13832 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
13833 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
13834 lbitset_xor_cmp): Likewise.
13835 * lib/bbitset.h: Include <stdbool.h>.
13836 (struct bitset_vtable): The following members now return bool, not
13837 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
13838 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
13839 or_and_cmp).
13840 * src/conflicts.c (count_rr_conflicts): Likewise.
13841 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
13842 All uses changed.
13843 * lib/ebitset.c (ebitset_obstack_init): Likewise.
13844 * lib/lbitset.c (lbitset_obstack_init): Likewise.
13845 * src/getargs.c (debug_flag, defines_flag, locations_flag,
13846 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13847 graph_flag): Likewise.
13848 * src/getargs.h (debug_flag, defines_flag, locations_flag,
13849 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13850 graph_flag): Likewise.
13851 * src/output.c (error_verbose): Likewise.
13852 * src/output.h (error_verbose): Likewise.
13853 * src/reader.c (start_flag, typed): Likewise.
13854 * src/reader.h (typed): Likewise.
13855 * src/getargs.c (LOCATIONS_OPTION): New constant.
13856 (long_options, getargs): Use it.
13857 * src/lalr.c (build_relations): Use bool, not int.
13858 * src/nullable.c (nullable_compute): Likewise.
13859 * src/print.c (print_reductions): Likewise.
13860 * src/tables.c (action_row, pack_vector): Likewise.
13861 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
13862 * src/output.c (prepare): Use it.
13863 * src/output.c (token_definitions_output,
13864 symbol_destructors_output, symbol_destructors_output): Use string,
13865 not boolean integer, to keep track of whether to output separator.
13866 * src/print_graph.c (print_core): Likewise.
13867 * src/state.c (state_rule_lookaheads_print): Likewise.
13868
13869 * config/install-sh: Sync from automake 1.7.5.
13870
13871 2003-05-14 Paul Eggert <eggert@twinsun.com>
13872
13873 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13874 semicolon after a grammar declaration, in the interest of possible
13875 future changes to the Bison input language.
13876 Do not allow a stray semicolon at the start of the grammar.
13877 (rhses.1): Allow one or more semicolons after any rule, including
13878 just before "|" as required by POSIX.
13879 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13880 grammar.
13881
13882 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13883
13884 %parse-param support for lalr1.cc.
13885
13886 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13887 b4_cc_constructor_calls, b4_cc_constructor_call,
13888 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13889 definitions.
13890 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13891 parse-param arguments.
13892 (yy::b4_parser_class_name): Declare instance variables to
13893 hold parse-param arguments.
13894 * tests/calc.at: s/value/semantic_value/ because value clashes
13895 with a member of yy::b4_parser_class_name. Adjust C++ code
13896 to handle %parse-param. Enable %parse-param test in C++.
13897
13898 2003-05-12 Paul Eggert <eggert@twinsun.com>
13899
13900 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13901 English a bit. Fix fclose typo. Change "const char" to "char
13902 const", and use ANSI C rather than K&R for "main". Suggest
13903 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13904 and suggest yy_switch_to_buffer.
13905
13906 2003-05-05 Paul Eggert <eggert@twinsun.com>
13907
13908 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13909 C89. This avoids a diagnostic on compilers that define __STDC__
13910 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13911 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13912
13913 2003-05-03 Paul Eggert <eggert@twinsun.com>
13914
13915 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13916 Do not overrun array bounds.
13917 This should fix a bug reported today by Olatunji Oluwabukunmi in
13918 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13919
13920 2003-04-29 Akim Demaille <akim@epita.fr>
13921
13922 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13923 * src/getargs.c, src/getargs.h: here, as bool, not int.
13924 (nondeterministic_parser): New.
13925 * src/parse-gram.y, src/scan-gram.l: Support
13926 %nondeterministic-parser.
13927 * src/output.c (prepare): Use nondeterministic_parser instead
13928 of glr_parser where appropriate.
13929 * src/tables.c (conflict_row, action_row, save_row)
13930 (token_actions, token_actions, pack_vector): Ditto.
13931
13932 2003-04-29 Akim Demaille <akim@epita.fr>
13933
13934 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13935
13936 2003-04-29 Akim Demaille <akim@epita.fr>
13937
13938 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13939 with %pure-parser and %locations to exercise the patch from Yakov
13940 Markovitch below.
13941
13942 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13943
13944 * data/yacc.c: (b4_lex_param): Corrected for the case where
13945 %lex-param is provided and %pure-parser isn't.
13946
13947 2003-04-27 Paul Eggert <eggert@twinsun.com>
13948
13949 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13950 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13951 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13952 if it is not defined.
13953 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13954
13955 2003-04-26 Paul Eggert <eggert@twinsun.com>
13956
13957 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13958 Declare to be of type suitable for the ninf value itself, not of
13959 type suitable for the corresponding table, since the latter might
13960 be unsigned but the ninf value might be negative. This fixes a
13961 bug reported by Alexandre Duret-Lutz in
13962 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13963
13964 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13965 invokes it. We shouldn't invoke it twice because it will attempt
13966 to put error.o in the archive twice. This fixes a glitch reported
13967 by Martin Mokrejs in
13968 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13969
13970 2003-04-21 Paul Eggert <eggert@twinsun.com>
13971
13972 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13973 to gnulib.
13974
13975 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13976
13977 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13978 Fix obvious typo that results in uncompilable GLR parsers
13979 when both %pure-parser and %locations are used. (trivial change)
13980
13981 2003-04-17 Paul Eggert <eggert@twinsun.com>
13982
13983 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13984 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13985 Do not insert the expected token via unput, as this runs afoul
13986 of a POSIX-compatibility bug in flex 2.5.31.
13987 All uses changed to BEGIN the parent state,
13988 since we no longer insert the expected token via unput.
13989 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13990 that is no longer emitted after the above change.
13991
13992 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13993 the first one. This change is from Paul Hilfinger, and it fixes
13994 regression reported by Werner Lemberg in
13995 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13996
13997 (resolve_sr_conflict): Don't invoke state_errs_set
13998 unless one or more tokens have been explicitly made errors.
13999 Otherwise, the above change causes Bison to abort.
14000
14001 * tests/existing.at (GNU pic Grammar): New test case, taken from
14002 Lemberg's email.
14003
14004 2003-03-31 Akim Demaille <akim@epita.fr>
14005
14006 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14007
14008 2003-03-31 Akim Demaille <akim@epita.fr>
14009
14010 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14011 output.
14012
14013 2003-03-31 Akim Demaille <akim@epita.fr>
14014
14015 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14016 From Paul Hilfinger.
14017
14018 2003-03-29 Akim Demaille <akim@epita.fr>
14019
14020 * m4/error.m4: Do not put under dynamic conditions some code which
14021 expansion is under static control.
14022
14023 2003-03-29 Akim Demaille <akim@epita.fr>
14024
14025 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14026
14027 2003-03-29 Akim Demaille <akim@epita.fr>
14028
14029 * doc/bison.texinfo (Strings are Destroyed): New.
14030
14031 2003-03-13 Paul Eggert <eggert@twinsun.com>
14032
14033 * .cvsignore: Add configure.lineno.
14034 * src/.cvsignore: Add yacc.
14035 * tests/.cvsignore: Add testsuite.log.
14036 * doc/fdl.texi: Sync with latest FSF version.
14037
14038 2003-03-12 Paul Eggert <eggert@twinsun.com>
14039
14040 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14041 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14042 cursor, instead of leaving it undefined. This fixes a bug
14043 reported by Tim Van Holder in
14044 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14045 * tests/input.at (Torturing the Scanner): Test the scanner on
14046 an empty input file, which was Tim Van Holder's test case.
14047
14048 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14049 <sys/resource.h> can be included, include sys/time.h and
14050 sys/times.h first, if available. This works around the SunOS
14051 4.1.4 porting bug reported by Bruce Becker in
14052 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14053
14054 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14055 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14056 AC_HEADER_SYS_WAIT.
14057
14058 Merge changes from gnulib. This was prompted because the CVS
14059 snapshot didn't build on Solaris 7 due to strnlen problems.
14060
14061 These changes need to be merged back into gnulib:
14062 * lib/hash.c: Include <stdbool.h> unconditionally.
14063 * m4/onceonly.m4 (m4_quote): New macro.
14064 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14065 Quote AC_FOREACH variable-expansions properly.
14066 The 2003-01-03 obstack.h change also needs merging.
14067 {end of changes requiring merging}
14068
14069 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14070 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14071 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14072 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14073 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14074 New files, imported from gnulib.
14075 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14076 above.
14077
14078 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14079 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14080 gnulib sources.
14081
14082 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14083 Add.
14084 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14085 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14086 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14087 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14088 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14089 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14090 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14091 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14092 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14093 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14094 (jm_PREREQ_ARGMATCH): Remove.
14095 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14096 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14097
14098 * src/system.h: Include <stdbool.h> unconditionally.
14099
14100 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14101 assuming at least C89 in the bitset code for some time now.
14102
14103 2003-03-03 Akim Demaille <akim@epita.fr>
14104
14105 * ro.po: New.
14106
14107 2003-03-02 Akim Demaille <akim@epita.fr>
14108
14109 * doc/bison.texinfo (Table of Symbols): Reactivate the
14110 documentation for %lex-param, and %parse-param.
14111
14112 2003-03-02 Akim Demaille <akim@epita.fr>
14113
14114 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14115 generate verbose error messages.
14116 Use the number of tokens as an upper bound in yytname, as it
14117 cannot be a non terminal.
14118
14119 2003-03-02 Akim Demaille <akim@epita.fr>
14120
14121 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14122 message.
14123
14124 2003-03-02 Akim Demaille <akim@epita.fr>
14125
14126 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14127 Use them to exercise yycheck overrun.
14128 Based on Andrew Suffield's grammar.
14129
14130 2003-03-02 Akim Demaille <akim@epita.fr>
14131
14132 Create tests/local.at for Bison generic testing macros.
14133
14134 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14135 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14136 This new file.
14137 * tests/calc.at (AT_CHECK_CALC): Adjust.
14138 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14139 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14140 * tests/local.at: here.
14141 (AT_COMPILE_CXX): Tags the tests using it as c++.
14142 Ignore the test if CXX is not functional.
14143
14144 2003-03-01 Paul Eggert <eggert@twinsun.com>
14145
14146 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14147 not loc->end, since loc->end might contain garbage and this leads
14148 to undefined behavior on some platforms.
14149 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14150 depend on *loc, so that the reader doesn't give the the false
14151 impression that *loc is initialized.
14152 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14153 does not survive the return.
14154
14155 2003-03-01 Akim Demaille <akim@epita.fr>
14156
14157 * src/scan-gram.l (code_start): Always initialize it when entering
14158 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14159 yylex invocation. An alternative would be making it static, but
14160 then it starts with the second %%'s beginning, instead of its end.
14161
14162 2003-02-28 Paul Eggert <eggert@twinsun.com>
14163
14164 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14165 around a UnixWare 7.1.1 porting bug reported by John Hughes in
14166 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
14167
14168 2003-02-26 Paul Eggert <eggert@twinsun.com>
14169
14170 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14171 Remove Sequent/Pyramid discussion (nobody uses them any more).
14172 Merge VMS and MS-DOS discussion; these ports may well be dead
14173 but let's keep mentioning them for now. Put <> around email
14174 addresses. Add copyright notice.
14175
14176 2003-02-24 Paul Eggert <eggert@twinsun.com>
14177
14178 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14179 to avoid collision with flex use of yylineno.
14180 Problem reported by Bruce Lilly in
14181 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
14182 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14183 * data/yacc.c (yy_reduce_print): Likewise.
14184
14185 * config/depcomp: Sync with Automake 1.7.3.
14186
14187 2003-02-21 Akim Demaille <akim@epita.fr>
14188
14189 * data/lalr1.cc: Use temporary variables instead of casts to
14190 change integer types.
14191 Suggested by Paul Eggert.
14192
14193 2003-02-21 Akim Demaille <akim@epita.fr>
14194
14195 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14196 to avoid confusions with lalr1.cc's notion of Position.
14197 Suggested by Paul Eggert.
14198
14199 2003-02-20 Akim Demaille <akim@epita.fr>
14200
14201 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14202 before initial_columns.
14203 (location.hh): Use consistent variable names when defining the
14204 operator<<.
14205 Use "last" so that we subtract from Positions, not from unsigned.
14206
14207 2003-02-20 Akim Demaille <akim@epita.fr>
14208
14209 * data/lalr1.cc (position.hh): New subfile, including the extended
14210 and Doxygen'ed documentation of class Position.
14211 (location.hh): Use it.
14212 Document a` la Doxygen.
14213 With the help of Benoit Perrot.
14214
14215 2003-02-20 Akim Demaille <akim@epita.fr>
14216
14217 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14218 AT_YACC_IF.
14219 Redefine AT_YYERROR_SEES_LOC_IF using it.
14220 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14221 not defined.
14222 Don't use the location in yy::Parser::error_ and
14223 yy::Parser::print_ when not %locations.
14224 Activate more lalr1.cc tests.
14225
14226 2003-02-19 Akim Demaille <akim@epita.fr>
14227
14228 * data/lalr1.cc: When displaying a line number, be sure to make it
14229 an int.
14230
14231 2003-02-19 Akim Demaille <akim@epita.fr>
14232
14233 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14234 Remove, useless.
14235 (YYABORT, YYACCEPT, YYERROR): New.
14236 * tests/calc.at: Renable the lalr1.cc test.
14237
14238 2003-02-19 Akim Demaille <akim@epita.fr>
14239
14240 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14241 error recovery, mixing with/without pops and discarding of the
14242 lookahead.
14243 Exercise YYERROR.
14244 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14245
14246 2003-02-17 Paul Eggert <eggert@twinsun.com>
14247
14248 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14249 * tests/testsuite.at (AT_COMPILE): Use them.
14250 This fixes the testsuite problem reported by Robert Lentz in
14251 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
14252
14253 2003-02-12 Paul Eggert <eggert@twinsun.com>
14254
14255 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14256 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
14257 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
14258 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14259 Check for malloc failure, for consistency with yacc.c.
14260 (yytname_size): Remove, for consistency with yacc.c.
14261
14262 The bug still remains in data/lalr1.cc, as I didn't have time
14263 to fix it there.
14264
14265 2003-02-06 Akim Demaille <akim@epita.fr>
14266
14267 * configure.ac (GXX): Rename as...
14268 (CXX): this, to keep the original Autoconf semantics.
14269 Require 2.57.
14270 * data/lalr1.cc: Fix b4_copyright invocations.
14271 If YYDEBUG is not defined, don't depend upon name_ being defined.
14272 (location.hh): Include string and iostream.
14273 (Position::filename): New member.
14274 (Position::Position ()): New.
14275 (operator<< (Position)): New.
14276 (operator- (Position, int)): New.
14277 (Location::first, Location::last): Rename as...
14278 (Location::begin, Location::end): these, to mock the conventional
14279 iterator names.
14280 (operator<< (Location)): New.
14281 * tests/atlocal.in (CXX): New.
14282 * tests/testsuite.at (AT_COMPILE_CXX): New.
14283 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14284 locations in a more synthetic way.
14285 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14286 lalr1.cc is used.
14287 Adjust the C locations to match those from Emacs: first column is
14288 column 0.
14289 Change all the expected results.
14290 Conform to the GCS: simplify the locations when applicable.
14291 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14292 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14293 these CPP macros with the m4 macros new defined by...
14294 (AT_CHECK_PUSHDEFS): this, i.e.:
14295 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
14296 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
14297 New macros.
14298 (AT_CHECK_POPDEFS): Undefine them.
14299 (AT_CHECK_CALC_LALR1_CC): New.
14300 Use it for the first lalr1.cc test.
14301
14302 2003-02-04 Akim Demaille <akim@epita.fr>
14303
14304 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14305 Location as is defined.
14306
14307 2003-02-04 Akim Demaille <akim@epita.fr>
14308
14309 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14310 name_ being defined.
14311
14312 2003-02-03 Paul Eggert <eggert@twinsun.com>
14313
14314 * src/gram.h (start_symbol): Remove unused decl.
14315
14316 Use more-consistent naming conventions for local vars.
14317
14318 * src/derives.c (derives_compute): Change type of local var from
14319 int to rule_number.
14320 * src/gram.c (grammar_rules_partial_print): Likewise.
14321 * src/print.c (print_core): Likewise.
14322 * src/reduce.c (reduce_grammar_tables): Likewise.
14323
14324 * src/gram.c (grammar_dump): Change name of item_number *
14325 local var from r to rp.
14326 * src/nullable.c (nullable_compute): Likewise.
14327
14328 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14329
14330 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14331 for symbol or symbol_number var.
14332 * src/reader.c (grammar_start_symbol_set): Likewise.
14333 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14334 Likewise.
14335 * src/state.c (transitions_to): Likewise.
14336 * src/state.h: Likewise.
14337 * src/tables.c (symbol_number_to_vector_number): Likewise.
14338
14339 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14340 char * var.
14341
14342 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14343 var.
14344
14345 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14346 var.
14347
14348 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14349 Use str, not s, for char * var. Use ch, not c, for character var.
14350 Use size for size var.
14351
14352 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14353 char * var.
14354 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14355 uniqstr var.
14356 * src/uniqstr.h: Likewise.
14357
14358 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14359 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14360 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14361 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14362 param to have same name as that of enum, so that we don't use
14363 "s" to stand for a non-state.
14364
14365 2003-02-02 Akim Demaille <akim@epita.fr>
14366
14367 * src/scan-skel.l: Scan more than one inert character per yylex
14368 invocation.
14369
14370 2003-02-01 Paul Eggert <eggert@twinsun.com>
14371
14372 Version 1.875a.
14373
14374 * po/LINGUAS: Add ms.
14375
14376 2003-01-30 Akim Demaille <akim@epita.fr>
14377
14378 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14379
14380 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14381
14382 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14383 of $1.
14384
14385 Changes in response to error report by S. Eken: GLR mode does not
14386 handle negative $ indices or $ indices in embedded rules correctly.
14387 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
14388
14389 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14390 (b4_rhs_location): Ditto.
14391 (yyfill): New function to copy from stack tree into array
14392 incrementally.
14393 (yyuserAction): Modify to allow incremental move of semantic values
14394 to rhs array when in GLR mode.
14395 Define YYFILL to use in user-defined actions to fill semantic array
14396 as needed.
14397 Remove dummy use of yystack, as there is now a guaranteed use.
14398 (yydoAction): Modify to allow incremental move of semantic values
14399 to rhs array when in GLR mode.
14400 (yyresolveAction): Ditto.
14401 (yyglrShiftDefer): Update comment.
14402 (yyresolveStates): Use X == NULL for pointers, not !X.
14403 (yyglrReduce): Ditto.
14404 (yydoAction): Ditto
14405
14406 * tests/glr-regr1.at: Rename to ...
14407 * tests/glr-regression.at: Add new regression test for the problems
14408 described above (adapted from S. Eken).
14409 Update copyright notice.
14410 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
14411 * tests/Makefile.am: Ditto.
14412
14413 2003-01-28 Paul Eggert <eggert@twinsun.com>
14414
14415 * data/lalr1.cc: Do not use @output_header_name@ unless
14416 b4_defines_flag is set. This fixes two bugs reported by
14417 Tim Van Holder in
14418 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
14419 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
14420
14421 2003-01-21 Paul Eggert <eggert@twinsun.com>
14422
14423 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
14424 we don't need to worry about yyerrlab1 being reported as an
14425 "unused label" by non-GCC C compilers. The downside is that if
14426 locations are used then a couple of statements are duplicated each
14427 time YYERROR is invoked, but the upside is that the warnings
14428 should vanish.
14429 (yyerrlab1): Move code to YERROR.
14430 (yyerrlab2): Remove. Change uses back to yyerrlab1.
14431 This reverts some of the 2002-12-27 change.
14432
14433 2003-01-17 Paul Eggert <eggert@twinsun.com>
14434
14435 * src/output.c (symbol_printers_output): Fix typo that led
14436 to core dump. Problem reported by Antonio Rus in
14437 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
14438
14439 2003-01-13 Akim Demaille <akim@epita.fr>,
14440 Quoc Peyrot <chojin@lrde.epita.fr>,
14441 Robert Anisko <anisko_r@lrde.epita.fr>
14442
14443 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
14444 when the stacks contain one element, as the loop would otherwise
14445 free the last state, and then use the top state (the one we just
14446 popped). This means that the initial elements will not be freed
14447 explicitly, as is the case in yacc.c; it is not a problem, as
14448 these elements have fake values.
14449
14450 2003-01-11 Paul Eggert <eggert@twinsun.com>
14451
14452 * NEWS: %expect-violations are now just warnings, reverting
14453 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
14454 bootstrapping problem reported by Matthias Klose; see
14455 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
14456 * src/conflicts.c (conflicts_print): Likewise.
14457 * tests/conflicts.at (%expect not enough, %expect too much,
14458 %expect with reduce conflicts): Likewise.
14459 * doc/bison.texinfo (Expect Decl): Document this. Also mention
14460 that the warning is enabled if the number of conflicts changes
14461 (not necessarily increases).
14462
14463 * src/getargs.c (version): Update copyright year.
14464
14465 2003-01-09 Akim Demaille <akim@epita.fr>
14466
14467 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
14468
14469 2003-01-08 Paul Eggert <eggert@twinsun.com>
14470
14471 * Makefile.maint (WGETFLAGS):
14472 New macro, containing "-C off" to disable proxy caches.
14473 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
14474 (rel-check): Use $(WGET) instead of wget.
14475
14476 2003-01-06 Paul Eggert <eggert@twinsun.com>
14477
14478 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
14479 the GLR paper of Scott, Johnstone and Hussain.
14480
14481 2003-01-04 Paul Eggert <eggert@twinsun.com>
14482
14483 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
14484 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
14485 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
14486 (EXTRA_LIBRARIES): New var, for liby.a.
14487 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
14488 (EXTRA_SCRIPTS): New var, for yacc.
14489
14490 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
14491 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
14492 Problem reported by Nelson H. F. Beebe.
14493
14494 2003-01-03 Paul Eggert <eggert@twinsun.com>
14495
14496 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
14497 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
14498 when compiling Bison 1.875's `bitset bset = obstack_alloc
14499 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
14500
14501 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
14502 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
14503 grow to a huge size with typical invocation.
14504
14505 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
14506 Use the pattern recommended by Autoconf 2.57, except also protect
14507 against double-definition.
14508 * src/system.h: Likewise.
14509 Portability issues reported by Nelson H. F. Beebe.
14510
14511 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
14512 All uses changed. Provide a definition in both C and C++.
14513 (yytrue, yyfalse): Define even if defined (__cplusplus).
14514
14515 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
14516 Reported by Nelson H. F. Beebe.
14517
14518 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
14519
14520 2003-01-02 Paul Eggert <eggert@twinsun.com>
14521
14522 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
14523 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
14524 Bug reported by Nelson H. F. Beebe.
14525
14526 2003-01-01 Paul Eggert <eggert@twinsun.com>
14527
14528 * Version 1.875.
14529
14530 2002-12-30 Paul Eggert <eggert@twinsun.com>
14531
14532 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
14533 Moved here from...
14534 (<INITIAL>","): Here. This causes stray "," to be treated
14535 more uniformly.
14536
14537 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
14538 last brace in braced code when not in Yacc mode, for compatibility
14539 with Bison 1.35. This resurrects the 2001-12-15 patch to
14540 src/reader.c.
14541
14542 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
14543 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
14544
14545 2002-12-28 Paul Eggert <eggert@twinsun.com>
14546
14547 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
14548 that of SYM's type. This fixes Debian bug 168069, reported by
14549 Thomas Olsson.
14550
14551 2002-12-28 Paul Eggert <eggert@twinsun.com>
14552
14553 Version 1.75f.
14554
14555 Switch back to the Yacc style of conflict reports, undoing some
14556 of the 2002-07-30 change.
14557 * doc/bison.texinfo (Understanding): Use Yacc style for
14558 conflict reports. Also, use new way of locating rules.
14559 * src/conflicts.c (conflict_report):
14560 Renamed from conflict_report_yacc, removing the old
14561 'conflict_report'. Translate the entire conflict report at once,
14562 so that we don't assume that "," has the same interpretation in
14563 all languages.
14564 (conflicts_output): Use Yacc-style conflict report for each state,
14565 instead of our more-complicated style.
14566 (conflicts_print): Use Yacc-style conflict report, except print
14567 the input file name when not emulating Yacc.
14568 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
14569 Conflicted Reduction, %expect not enough, %expect too much,
14570 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
14571 * tests/existing.at (GNU Cim Grammar): Likewise.
14572 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
14573
14574 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
14575 fatal): Don't invoke fflush; it's not needed and it might even be
14576 harmful for stdout, as stdout might not be open.
14577 * src/reduce.c (reduce_print): Likewise.
14578
14579 2002-12-27 Paul Eggert <eggert@twinsun.com>
14580
14581 Fix a bug where error locations were not being recorded correctly.
14582 This problem was originally reported by Paul Hilfinger in
14583 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
14584
14585 * data/yacc.c (yyparse): New local var yylerrsp, to record the
14586 top of the location stack's error locations.
14587 (yyerrlab): Set it. When discarding a token, push its location
14588 onto yylerrsp so that we don't lose track of the error's end.
14589 (yyerrlab1): Now is only the target of YYERROR, so that we can
14590 properly record the location of the action that failed. For GCC
14591 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
14592 GCC warning about yyerrlab1 being unused if YYERROR is unused.
14593 (yyerrlab2): New label, which yyerrlab now falls through to.
14594 Compute the error's location by applying YYLLOC_DEFAULT to
14595 the locations of all the symbols that went into the error.
14596 * doc/bison.texinfo (Location Default Action): Mention that
14597 YYLLOC_DEFAULT is also invoked for syntax errors.
14598 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14599 Error locations include the locations of all the tokens that were
14600 discarded, not just the last token.
14601
14602 2002-12-26 Paul Eggert <eggert@twinsun.com>
14603
14604 * src/files.c: Include quote.h.
14605 (compute_output_file_names): Warn if we detect conflicting
14606 outputs to the same file. This should catch the misunderstanding
14607 exemplified by Debian Bug 165349, reported by Bruce Stephens..
14608
14609 * src/conflicts.c (conflicts_print): If the user specifies
14610 "%expect N", report an error if there are any reduce/reduce
14611 conflicts. This is what the manual says should happen.
14612 This fixes Debian bug 130890, reported by Anthony DeRobertis.
14613 * tests/conflicts.at (%expect with reduce conflicts): New test.
14614
14615 Don't use m4_include on relative file names, as it doesn't work as
14616 desired if there happens to be a file with that name under ".".
14617
14618 * m4sugar/version.m4: Remove; it was included but it wasn't used.
14619 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
14620 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
14621 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
14622 * src/output.c (output_skeleton): Use full path names when
14623 specifying a file to include; don't rely on include path, as
14624 it's unreliable when the working file contains a file with
14625 that name.
14626
14627 2002-12-25 Paul Eggert <eggert@twinsun.com>
14628
14629 Remove obsolete references to bison.simple and bison.hairy.
14630 Problem mentioned by Aubin Mahe in
14631 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
14632 * data/glr.c: Comment fix.
14633 * doc/bison.1: Remove references. Also, mention "yacc".
14634
14635 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
14636 with -g option.
14637
14638 * src/parse-gram.y (declaration): Use enum "report_states" rather
14639 than its numeric value 1.
14640
14641 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
14642 opening a new one. This fixes Debian bug 165349, reported by
14643 Bruce Stephens.
14644
14645 2002-12-24 Paul Eggert <eggert@twinsun.com>
14646
14647 Version 1.75e.
14648
14649 * Makefile.maint (cvs-update): Don't assume that the shell
14650 supports $(...), as Solaris sh doesn't.
14651
14652 * src/parse-gram.y (lloc_default): Remove test for empty
14653 nonterminals at the end, since it didn't change the result.
14654
14655 2002-12-24 Paul Eggert <eggert@twinsun.com>
14656
14657 If the user does not define YYSTYPE as a macro, Bison now declares it
14658 using typedef instead of defining it as a macro. POSIX requires this.
14659 For consistency, YYLTYPE is also declared instead of defined.
14660
14661 %union directives can now have a tag before the `{', e.g., the
14662 directive `%union foo {...}' now generates the C code
14663 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
14664 The default union tag is `YYSTYPE', for compatibility with Solaris 9
14665 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
14666 instead of `yyltype'.
14667
14668 `yystype' and `yyltype' are now obsolescent macros instead of being
14669 typedefs or tags; they are no longer documented and will be
14670 withdrawn in a future release.
14671
14672 * data/glr.c (b4_location_type): Remove.
14673 (YYSTYPE): Renamed from yystype.
14674 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
14675 (struct YYLTYPE): Renamed from struct yyltype.
14676 (YYLTYPE): Renamed from yyltype.
14677 (yyltype, yystype): New (and obsolescent) macros,
14678 for backward compatibility.
14679 * data/yacc.c: Likewise.
14680
14681 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
14682 does not specify a union tag. This is for compatibility with
14683 Solaris 9 yacc.
14684
14685 * src/parse-gram.y (add_param): 2nd arg is now char * not char
14686 const *, since it is now modified by stripping surrounding { }.
14687 (current_braced_code): Remove.
14688 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
14689 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
14690 trailing " {...}". Now of type <chars>.
14691 (grammar_declaration): Adjust to bundled tokens.
14692 (code_content): Remove; stripping is now done by add_param.
14693 (print_token_value): Print contents of bundled tokens.
14694 (token_name): New function.
14695
14696 * src/reader.h (braced_code, current_braced_code): Remove.
14697 (token_name): New decl.
14698
14699 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
14700 token_type, not braced_code code_kind. All uses changed.
14701 (SC_PRE_CODE): New state, for scanning after a keyword that
14702 has (or usually has) an immediately-following braced code.
14703 (token_type): New local var, to keep track of which token type
14704 to return when scanning braced code.
14705 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
14706 <INITIAL>"%parse-param", <INITIAL>"%printer",
14707 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
14708 instead of returning a token type immediately.
14709 (<INITIAL>"{"): Set token type.
14710 (<SC_BRACED_CODE>"}"): Use it.
14711 (handle_action_dollar, handle_action_at): Now returns bool
14712 indicating success. Fail if ! current_rule; this prevents a core dump.
14713 (handle_symbol_code_dollar, handle_symbol_code_at):
14714 Remove; merge body into caller.
14715 (handle_dollar, handle_at): Complain in invalid contexts.
14716
14717 * NEWS, doc/bison.texinfo: Document the above.
14718 * NEWS: Fix years and program names in copyright notice.
14719
14720 2002-12-17 Paul Eggert <eggert@twinsun.com>
14721
14722 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
14723 Reporting, Table of Symbols): Omit mentions of %lex-param and
14724 %parse-param from the documentation for now.
14725
14726 2002-12-15 Paul Eggert <eggert@twinsun.com>
14727
14728 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
14729 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
14730 lookahead symbol, and which sets yychar in parser actions) and it
14731 disagreed with the Bison documentation. Bug
14732 reported by Andrew Walrond.
14733
14734 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
14735 as the caller now does that.
14736 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
14737 (YYEMPTY): Parenthesize right hand side, since others use it.
14738 (yyparse): Don't assume that our generated code is the only code
14739 that sets yychar.
14740
14741 2002-12-13 Paul Eggert <eggert@twinsun.com>
14742
14743 Version 1.75d.
14744
14745 POSIX requires a "yacc" command.
14746 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
14747 (MOSTLYCLEANFILES): Add yacc.
14748 (yacc): New rule.
14749 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
14750 as an alias for bison y.
14751
14752 * po/LINGUAS: Add da.
14753
14754 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
14755 problem with latest <getopt.h>.
14756 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
14757
14758 * doc/fdl.texi: Upgrade to 1.2.
14759 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
14760 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
14761 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
14762 gnulib.
14763 * config/install-sh: Sync with autotools.
14764
14765 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
14766 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14767 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
14768 locations are requested.
14769 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
14770 locations are requested.
14771
14772 2002-12-12 Paul Eggert <eggert@twinsun.com>
14773
14774 Remove unportable casts and storage allocation tricks.
14775 While we're at it, remove almost all casts, since they
14776 usually aren't needed and are a sign of trouble.
14777
14778 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
14779
14780 * src/derives.c (derives_compute): Do not subtract NTOKENS from
14781 the pointer DSET returned by malloc; this isn't portable.
14782 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
14783 Similarly for DERIVES.
14784 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
14785 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
14786 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
14787
14788 * src/derives.c (derives_compute): Do not bother invoking
14789 int_of_rule_number, since rule numbers are integers.
14790
14791 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
14792 rather than XMALLOC (char, N).
14793
14794 * src/files.c (filename_split): Rewrite to avoid cast.
14795
14796 * src/gram.h (symbol_number_as_item_number,
14797 item_number_as_symbol_number, rule_number_as_item_number,
14798 item_number_as_rule_number):
14799 Now inline functions rather than macros, to avoid casts.
14800 * src/state.h (state_number_as_int): Likewise.
14801 * src/tables.c (state_number_to_vector_number,
14802 symbol_number_to_vector_number): Likewise.
14803
14804 * src/gram.h (int_of_rule_number): Remove; no longer used.
14805
14806 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
14807 since the resulting storage is always stored into.
14808
14809 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
14810 where it's needed.
14811
14812 * src/muscle_tab.c (muscle_m4_output):
14813 Now inline. Return bool, not int.
14814 * src/state.c (state_compare): Likewise.
14815 * src/symtab.c (symbol_check_defined,
14816 symbol_check_alias_consistency, symbol_pack, symbol_translation,
14817 hash_compare_symbol, hash_symbol):
14818 Likewise.
14819 * src/uniqstr.c (uniqstr_print): Likewise.
14820 * src/muscle_tab.c (muscle_m4_output_processor):
14821 New function, to avoid casts.
14822 * src/state.c (state_comparator, stage_hasher): Likewise.
14823 * src/symtab.c (symbol_check_defined_processor,
14824 symbol_check_alias_consistency_processor, symbol_pack_processor,
14825 symbol_translation_processor, hash_symbol_comparator,
14826 hash_symbol_hasher): Likewise.
14827 * src/uniqstr.c (uniqstr_print_processor): Likewise.
14828 * src/muscle_tab.c (muscles_m4_output):
14829 Use new functions instead of casting old functions unportably.
14830 * src/state.c (state_hash_new): Likewise.
14831 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
14832 symbols_token_translations_init):
14833 Likewise.
14834 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
14835
14836 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
14837 var instead of casting to long, to avoid casts.
14838 (prepare_states): Use MALLOC rather than alloca, so that we don't
14839 have to worry about alloca.
14840 * src/state.c (state_hash_lookup): Likewise.
14841
14842 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
14843 local var instead of casting to unsigned char, to avoid casts.
14844
14845 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
14846 STATE_ALLOC): Remove.
14847 (transitions_new, errs_new, reductions_new, state_new): Use malloc
14848 rather than calloc, and use offsetof to avoid allocating slightly
14849 too much storage.
14850 (state_new): Initialize all members.
14851
14852 * src/state.c (state_hash): Use unsigned accumulator, not signed.
14853
14854 * src/symtab.c (symbol_free): Remove; unused.
14855 (symbol_get): Remove cast in lhs of assignment.
14856 (symbols_do): Now static. Accept generic arguments, not
14857 hashing-related ones.
14858
14859 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
14860 (symbol_processor): Remove.
14861 (symbols_do): Remove decl; now static.
14862
14863 * src/system.h (alloca): Remove; decl no longer needed.
14864 (<stddef.h>): Include, for offsetof.
14865 (<inttypes.>, <stdint.h>): Include if available.
14866 (uintptr_t): New type, if system lacks it.
14867 (CALLOC, MALLOC, REALLOC): New macros.
14868 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
14869 new macros.
14870
14871 * src/tables.c (table_size): Now int, to pacify GCC.
14872 (table_grow, table_ninf_remap): Use signed table size.
14873 (save_row): Don't bother initializing locals when not needed.
14874 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14875 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14876
14877 * src/vcg.h: Correct misspellings.
14878
14879 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14880
14881
14882 * src/getargs.c (getargs): Don't assume EOF == -1.
14883
14884 2002-12-09 Paul Eggert <eggert@twinsun.com>
14885
14886 Change identifier spellings to avoid collisions with names
14887 that are reserved by POSIX.
14888
14889 Don't use names ending in _t, since POSIX reserves them.
14890 For consistency, remove _e and _s endings -- they're weren't
14891 needed to remove ambiguity. All uses changed.
14892 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14893 turn was just renamed from struniq_t.
14894 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14895 which in turn was just renamed from struniq_processor_t.
14896 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14897 in turn was renamed from hash_compare_struniq_t.
14898 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14899 (state_list): Renamed from state_list_t.
14900 * src/assoc.h (assoc): Renamed from assoc_t.
14901 * src/conflicts.c (enum conflict_resolution): Renamed from
14902 enum conflict_resolution_e.
14903 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14904 (rule_list): Renamed from rule_list_t.
14905 * src/getargs.h (enum trace): Renamed from enum trace_e.
14906 (enum report): Renamed from enum report_e.
14907 * src/gram.h (item_number): Renamed from item_number_t.
14908 (rule_number): Renamed from rule_number_t.
14909 (struct rule_s): Remove the "rule_s" part; not used.
14910 (rule): Renamed from rule_t.
14911 (rule_filter): Renamed from rule_filter_t.
14912 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14913 (goto_list): Renamed from goto_list_t.
14914 * src/lalr.h (goto_number): Renamed from goto_number_t.
14915 * src/location.h (location): Renamed from location_t.
14916 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14917 and moved here from:
14918 * src/muscle_tab.h (muscle_entry_t): here.
14919 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14920 (rule_list): Renamed from rule_list_t.
14921 * src/print_graph.c (static_graph): Renamed from graph.
14922 * src/reader.h (braced_code): Renamed from braced_code_t.
14923 Remove brace_code_e tag.
14924 * src/relation.h (relation_node): Renamed from relation_node_t.
14925 (relation_nodes): Renamed from relation_nodes_t.
14926 (relation): Renamed from relation_t.
14927 * src/state.h (state_number): Renamed from state_number_t.
14928 (struct state): Renamed from struct state_s.
14929 (state): Renamed from state_t.
14930 (transitions): Renamed from transitions_t. Unused (and
14931 misspelled) transtion_s tag removed.
14932 (errs): Renamed from errs_t. Unused errs_s tag removed.
14933 (reductions): Renamed from reductions_t. Unused tag
14934 reductions_s removed.
14935 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14936 (struct symbol_list): Renamed from struct symbol_list_s.
14937 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14938 (struct symbol): Renamed from struct symbol_s.
14939 (symbol): Renamed from symbol_t.
14940 * src/tables.c (vector_number): Renamed from vector_number_t.
14941 (action_number): Renamed from action_t.
14942 * src/tables.h (base_number): Renamed from base_t.
14943 * src/vcg.h (enum color): Renamed from enum color_e.
14944 (enum textmode): Renamed from enum textmode_e.
14945 (enum shape): Renamed from enum shape_e.
14946 (struct colorentry): Renamed from struct colorentry_s.
14947 (struct classname): Renamed from struct classname_s.
14948 (struct infoname): Renamed from struct infoname_s.
14949 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14950 (enum decision): Renamed from enum decision_e.
14951 (enum orientation): Renamed from enum orientation_e.
14952 (enum alignment): Renamed from enum alignment_e.
14953 (enum arrow_mode): Renamed from enum arrow_mode_e.
14954 (enum crossing_type): Renamed from enum crossing_type_e.
14955 (enum view): Renamed from enum view_e.
14956 (struct node): Renamed from struct node_s.
14957 (node): Renamed from node_t.
14958 (enum linestyle): Renamed from enum linestyle_e.
14959 (enum arrowstyle): Renamed from enum arrowstyle_e.
14960 (struct edge): Renamed from struct edge.
14961 (edge): Renamed from edge_t.
14962 (struct graph): Renamed from struct graph_s.
14963 (graph): Renamed from graph_t.
14964 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14965 Rename value_t -> value.
14966 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14967 value_t_as_yystype -> value_as_yystype.
14968
14969 Don't include <errno.h> in the mainstream code, since it
14970 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14971 * lib/get-errno.c, lib/get-errno.h: New files.
14972 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14973 get-errno.c.
14974 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14975 * src/output.c (output_skeleton): Likewise.
14976 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14977 instead of errno.
14978 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14979 Likewise.
14980 (handle_action_dollar, handle_action_at): Likewise.
14981 * src/system.h: Do not include <errno.h>.
14982 (TAB_EXT): Renamed from EXT_TAB.
14983 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14984
14985 Avoid str[a-z]*, since <string.h> reserves that name space.
14986 Change all instances of "struniq" in names to "uniqstr", and
14987 likewise for "STRUNIQ" and "UNIQSTR".
14988 * src/uniqstr.c: Renamed from src/struniq.c.
14989 * src/uniqstr.h: Renamed from src/struniq.h.
14990 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14991 * src/files.c (strsuffix): Remove; unused.
14992 (concat2): Renamed from stringappend. Now static.
14993 * src/files.h (strsuffix, stringappend): Remove; unused.
14994 * src/parse-gram.y (<chars>): Renamed from <string>.
14995 (<uniqstr>): Renamed from <struniq>.
14996 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14997 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14998 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14999 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15000 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15001 (N_EXPAND): Renamed from N_STRETCH.
15002
15003 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15004 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15005 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15006 Remove; unused.
15007 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15008 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15009 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15010 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15011 (BASE_MAXIMUM): Renamed from BASE_MAX.
15012 (BASE_MINIMUM): Renamed from BASE_MIN.
15013 (ACTION_MAX): Remove; unused.
15014 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15015 Unnecessary casts removed from above defines.
15016
15017
15018 Fix misspelling in names.
15019 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15020 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15021 G_NODE_ALIGNEMENT.
15022
15023
15024 * lib/timevar.c (timevar_report): Renamed from time_report,
15025 for consistency with other names.
15026 * lib/timevar.h (timevar_report): New decl.
15027 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15028
15029
15030 Sort include-file uses.
15031
15032 Reorder all include files under src to be in the order "system.h".
15033 then the ../lib include files in angle brackets (alphabetized),
15034 then the . include files in double-quotes (alphabetized). Fix
15035 dependency breakages encountered in this process, as follows:
15036 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15037 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15038 * src/state.h: Include "symtab.h".
15039
15040 2002-12-08 Paul Eggert <eggert@twinsun.com>
15041
15042 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15043 since this causes problems when __file__ contains character
15044 sequences like "@" that are treated specially by src/scan-skel.l.
15045 Instead, just use the file's basename. This fixes the bug
15046 reported by Martin Mokrejs in
15047 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15048
15049 2002-12-06 Paul Eggert <eggert@twinsun.com>
15050
15051 Add support for rules that do not have trailing semicolons, as
15052 POSIX requires. Improve the quality of locations in Bison
15053 diagnostics.
15054
15055 * src/location.c: Include <quotearg.h>.
15056 (empty_location): Now const.
15057 (location_print): New function. Follow the recommendation of the
15058 GNU Coding Standards for locations that span file boundaries.
15059 * src/location.h: Do not include <quotearg.h>; no longer needed.
15060 (boundary): New type.
15061 (location_t): Use it. This allows locations to span file boundaries.
15062 All member uses changed: file -> start.file or end.file (as needed),
15063 first_line -> start.line, first_column -> start.column,
15064 last_line -> end.line, last_column -> end.column.
15065 (equal_boundaries): New function.
15066 (LOCATION_RESET, LOCATION_STEP): Remove.
15067 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15068 (empty_location): Now const.
15069 (location_print): New decl.
15070 * src/parse-gram.y (lloc_default): New function, which handles
15071 empty locations more accurately.
15072 (YYLLOC_DEFAULT): Use it.
15073 (%token COLON): Remove.
15074 (%token ID_COLON): New token.
15075 (rules): Use it.
15076 (declarations, rules): Remove trailing semicolon.
15077 (declaration, rules_or_grammar_declaration):
15078 Allow empty (";") declaration.
15079 (symbol_def): Remove empty actions; no longer needed.
15080 (rules_or_grammar_declaration): Remove trailing semicolon.
15081 (semi_colon.opt): Remove.
15082 * src/reader.h: Include location.h.
15083 (scanner_cursor): New decl.
15084 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15085 rolling our own.
15086 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15087 of *loc.
15088 (STEP): Remove. No longer needed, now that adjust_location does
15089 the work. All uses removed.
15090 (scanner_cursor): New var.
15091 (adjust_location): Renamed from extend_location. It now sets
15092 *loc and adjusts the scanner cursor. All uses changed.
15093 Don't bother testing for CR.
15094 (handle_syncline): Remove location arg; now updates scanner cursor.
15095 All callers changed.
15096 (unexpected_end_of_file): Now accepts start boundary of token or
15097 comment, not location. All callers changed. Update scanner cursor,
15098 not the location.
15099 (SC_AFTER_IDENTIFIER): New state.
15100 (context_state): Renamed from c_context. All uses changed.
15101 (id_loc, code_start, token_start): New local vars.
15102 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15103 processing of Yacc white space and equivalents here.
15104 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15105 instead of returning ID immediately, since we need to search for
15106 a subsequent colon.
15107 (<INITIAL>"'", "\""): Save token_start.
15108 (<INITIAL>"%{", "{", "%%"): Save code_start.
15109 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15110 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15111 BEGIN context_state at end, not INITIAL.
15112 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15113 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15114 Return correct token start.
15115 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15116 the start of a character, string or multiline comment is found.
15117 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15118 Reduction): Adjust reported locations to match the more-precise
15119 results now expected.
15120 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15121 * tests/reduce.at (Useless Rules, Reduced Automaton,
15122 Underivable Rules): Likewise.
15123 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15124 or "|"' now that so many other tokens are allowed by the new grammar.
15125
15126 * src/complain.h (current_file): Remove duplicate decl;
15127 current_file is now owned by files.h.
15128 * src/complain.c, src/scan-gram.l: Include files.h.
15129
15130 2002-12-06 Paul Eggert <eggert@twinsun.com>
15131
15132 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15133 promotes to int; it might be unsigned int.
15134 * data/yacc.c (yy_reduce_print): Likewise.
15135
15136 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15137 be #defined in the prologue, not in the Bison declarations.
15138 This fixes Debian Bug 102878, reported by Shaul Karl.
15139
15140 2002-12-02 Paul Eggert <eggert@twinsun.com>
15141
15142 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15143 * lib/strtoul.c: New file, from gnulib.
15144 This fixes a porting bug reported by Peter Klein in
15145 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
15146
15147 2002-11-30 Paul Eggert <eggert@twinsun.com>
15148
15149 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15150 and put only a forward declaration in the prologue. This is for
15151 consistency with the other scanner helper functions.
15152
15153 Type clashes now generate warnings, not errors, since it
15154 appears that POSIX may allow some grammars with type clashes.
15155 * src/reader.c (grammar_current_rule_check): Warn about
15156 type clashes instead of complaining.
15157 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15158
15159 Add Yacc library, since POSIX requires it.
15160 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15161 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15162 * lib/main.c, lib/yyerror.c: New files.
15163
15164 gram_error can be static; it need not be extern.
15165 * src/reader.h (gram_error): Remove decl.
15166 * src/parse-gram.y (gram_error): Now static. Add static decl.
15167 (print_token_value): Omit parameter names from forward decl,
15168 for consistency.
15169
15170 2002-11-29 Paul Eggert <eggert@twinsun.com>
15171
15172 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15173 be declared before being used. E.g., one should typically
15174 declare them in the prologue. Use GNU coding style in examples.
15175 Put "const" consistently after the type it modifies. Mention
15176 that C99 supports "inline". Mention that yyerror traditionally
15177 returns "int".
15178
15179 %parse-param and %lex-param now take just one argument, the
15180 declaration; the argument name is deduced from the declaration.
15181
15182 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15183 Reporting, Table of Symbols): Document this.
15184 * src/parse-gram.y (add_param): New function.
15185 (COMMA): Remove.
15186 (declaration): Implement new rule for %parse-param and %lex-param.
15187 * src/scan-gram.l: "," now elicits a warning, rather than being
15188 a token; this is more compatible with byacc.
15189 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15190
15191 2002-11-27 Paul Eggert <eggert@twinsun.com>
15192
15193 Rename identifiers to avoid real and potential collisions.
15194
15195 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15196 to avoid collision with lex macro described by Bruce Lilly in
15197 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15198 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15199 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15200 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15201 All uses changed.
15202 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15203 The name "yycontrol" violates the name space rules, and this stuff
15204 wasn't being used anyway.
15205 (input): Remove action; this stuff wasn't being used.
15206 (gram_error): Rename local variable yylloc -> loc.
15207 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15208 (YY_DECL): Don't use "yy" at start of local variables.
15209 All uses changed, e.g., yylloc -> loc.
15210 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15211 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15212 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15213 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15214
15215 * src/parse-gram.y (gram_error): loc is now const *.
15216 * src/reader.h (gram_error): Likewise.
15217
15218 2002-11-24 Paul Eggert <eggert@twinsun.com>
15219
15220 Version 1.75c.
15221
15222 * tests/actions.at (Actions after errors): Use an output format
15223 more similar to that of the Printers and Destructors test.
15224 Test the position of the ';' token too.
15225 (Printers and Destructors): Likewise.
15226 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15227 unnecessarily alarming people when the test fails.
15228
15229 * data/yacc.c (yyerrlab1): Move this label down, so that the
15230 parser does not discard the lookahead token if the user code
15231 invokes YYERROR. This change is required for POSIX conformance.
15232
15233 * lib/error.c: Sync with gnulib.
15234
15235 2002-11-22 Paul Eggert <eggert@twinsun.com>
15236
15237 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15238 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15239 * lib/xmalloc.c: Likewise.
15240
15241 2002-11-20 Paul Eggert <eggert@twinsun.com>
15242
15243 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15244
15245 2002-11-20 Paul Eggert <eggert@twinsun.com>
15246
15247 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15248 should use `if (! x) abort ();' rather than `assert (x);', and
15249 anyway it's one less thing to worry about configuring.
15250
15251 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15252 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15253 and replace all instances of assert with abort.
15254 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15255 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15256
15257 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15258 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15259 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15260 hash_find_entry, hash_rehash, hash_insert): Likewise.
15261 * src/conflicts.c (resolve_sr_conflict): Likewise.
15262 * src/lalr.c (set_goto_map, map_goto): Likewise.
15263 * src/nullable.c (nullable_compute): Likewise.
15264 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15265 * src/reader.c (packgram, reader): Likewise.
15266 * src/state.c (state_new, state_free, state_transitions_set,
15267 state_reduction_find): Likewise.
15268 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15269 symbol_pack): Likewise.
15270 * src/tables.c (conflict_row, pack_vector): Likewise.
15271 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15272 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15273 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15274 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15275
15276 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15277 (ARGMATCH_CONSTRAINT): New macro.
15278 (ARGMATCH_ASSERT): Use it.
15279
15280 * src/system.h (verify): New macro.
15281 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15282 rather than assert.
15283 * src/tables.c (tables_generate): Likewise.
15284
15285 * src/struniq.c (struniq_assert): Now returns void, and aborts
15286 if the assertion is false.
15287 (struniq_assert_p): Remove.
15288 * src/struniq.h: Likewise.
15289
15290 2002-11-18 Paul Eggert <eggert@twinsun.com>
15291
15292 * data/glr.c (yygetLRActions): Replace `yyindex' with
15293 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15294 This fixes the regression with Sun ONE Studio 7 cc that I reported in
15295 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
15296
15297 2002-11-18 Akim Demaille <akim@epita.fr>
15298
15299 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15300 space.
15301 From Tim Van Holder.
15302
15303 2002-11-17 Paul Eggert <eggert@twinsun.com>
15304
15305 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15306 to "SyntaxError" for consistency with my 2002-11-15 change.
15307
15308 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15309 not define to {}, since this breaks the common use of `YYDPRINTF
15310 ((...));' if a single statement is desired (e.g. before `else').
15311 Work around GCC warnings by surrounding corresponding calls with
15312 {} if needed.
15313 (yyhasResolvedValue): Remove unused function.
15314 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15315 loop body.
15316 (yyreportSyntaxError): Renamed from yyreportParseError.
15317 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15318 All uses changed.
15319 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15320 extern when possible. Remove unused initializations.
15321
15322 2002-11-16 Akim Demaille <akim@epita.fr>
15323
15324 Augment the similarity between GLR and LALR traces.
15325
15326 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15327 (YY_REDUCE_PRINT): New.
15328 (yyparse): Use them.
15329 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15330 YYDPRINT here.
15331 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15332 state reached after the reduction/recovery, since...
15333 (yyparse, yyprocessOneStack): Report the state we are entering in.
15334
15335 2002-11-16 Akim Demaille <akim@epita.fr>
15336
15337 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15338 Add support for --trace=skeleton.
15339 * src/scan-skel.l: %option debug.
15340 Scan strings of non-@ or \n instead of character by character.
15341 (scan_skel): Handle trace_skeleton.
15342 (QPUTS): New.
15343 (@output_parser_name@, @output_header_name@): ``Restore'' their
15344 support (used to be M4 macros).
15345 * data/yacc.c: Quote larger chunks, a la glr.c.
15346 * data/lalr1.cc: Likewise.
15347 The header guards are no longer available, so use some other
15348 string than `YYLSP_NEEDED'.
15349
15350 2002-11-16 Akim Demaille <akim@epita.fr>
15351
15352 Make the ``Printers and Destructors'' test more verbose, taking
15353 `yacc.c''s behavior as (possibly wrong) reference.
15354
15355 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15356 instead of fprint on stdout.
15357 Set and report the last_line of the symbols.
15358 Consistently display values and locations.
15359
15360 2002-11-16 Paul Eggert <eggert@twinsun.com>
15361
15362 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15363
15364 2002-11-15 Paul Eggert <eggert@twinsun.com>
15365
15366 * tests/actions.at (Actions after errors): New test case.
15367
15368 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15369 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15370 tests/action.at, tests/calc.at, tests/conflicts.at,
15371 tests/cxx-type.at, tests/regression.at:
15372 "parse error" -> "syntax error" for POSIX compatibility.
15373 "parsing stack overflow..." -> "parser stack overflow" so
15374 that code matches Bison documentation.
15375
15376 2002-11-15 Akim Demaille <akim@epita.fr>
15377
15378 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15379 take two BRACED_CODE, not two string_content.
15380 Free the scanner's obstack when we are done.
15381 (code_content): New.
15382 * tests/calc.at: Adjust.
15383 * doc/bison.texinfo: Adjust.
15384 Also, make sure to include the `,' for these declarations.
15385
15386 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15387
15388 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15389 definition; avoids potential autoreconf problems.
15390
15391 2002-11-15 Akim Demaille <akim@epita.fr>
15392
15393 Always check the value returned by yyparse.
15394
15395 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15396 returned by yyparse.
15397 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15398 Adjust calls.
15399 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15400 returned by yyparse.
15401
15402 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15403
15404 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
15405 on input.at test.
15406
15407 2002-11-14 Paul Eggert <eggert@twinsun.com>
15408
15409 * src/output.c (output_skeleton): Call xfopen instead of
15410 duplicating xfopen's body.
15411
15412 Fix bugs reported by Nelson H. F. Beebe in
15413 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
15414
15415 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
15416 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
15417 Group compiler. Instead, use "$CC -E bar.c". Include the .h
15418 file twice in the grammar, as an extra check.
15419
15420 * tests/input.at (Torturing the Scanner): Surround the
15421 backslash-newline tests with "#if 0", to make it less likely that
15422 we'll run into compiler bugs. Bring back solitary \ inside
15423 comment, but add a closing comment to work around HP C bug. Don't
15424 test backslash-newline in C character constant.
15425
15426 2002-11-14 Akim Demaille <akim@epita.fr>
15427
15428 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
15429 status of the compiler.
15430 Calling `exit 1' is no longer needed.
15431 Reported by Nelson H. F. Beebe.
15432
15433 2002-11-14 Akim Demaille <akim@epita.fr>
15434
15435 * tests/atlocal.in (CPPFLAGS): We have config.h.
15436 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
15437 New.
15438 * tests/actions.at, tests/calc.at, tests/conflicts.at,
15439 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
15440 * tests/regression.at, tests/torture.at: Use them for all the
15441 grammars that are to be compiled.
15442 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
15443 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
15444 * doc/bison.texinfo (GLR Parsers): Document `inline'.
15445
15446 2002-11-14 Akim Demaille <akim@epita.fr>
15447
15448 * doc/bison.texinfo: Various formatting changes (alignments in
15449 samples, additional @group/@end group, GCS in samples.
15450 Use @deffn instead of simple @table to define the directives,
15451 macros, variables etc.
15452
15453 2002-11-13 Paul Eggert <eggert@twinsun.com>
15454
15455 Fix some bugs reported by Albert Chin-A-Young in
15456 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
15457
15458 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
15459 -o c"; the HP C compiler chatters during compilation.
15460 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
15461 * tests/headers.at (export YYLTYPE): Likewise.
15462
15463 * tests/input.at (Torturing the Scanner): Remove lines containing
15464 solitary backslashes, as they tickle a bug in the HP C compiler.
15465
15466 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
15467 comments, since they're not portable. Use GNU coding style.
15468
15469 2002-11-13 Akim Demaille <akim@epita.fr>
15470
15471 * data/yacc.c: Leave bigger chunks of quoted text.
15472 (YYDSYMPRINTF): New.
15473 Use it to report symbol activities.
15474 * data/glr.c (YYDSYMPRINTF): New.
15475 Use it.
15476
15477 2002-11-12 Paul Eggert <eggert@twinsun.com>
15478
15479 Version 1.75b.
15480
15481 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
15482 (yyglrReduce): Return yyok, not 0.
15483 This should avoid the enumerated-type warnings reported
15484 by Nelson H. F. Beebe in
15485 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
15486
15487 * lib/bbitset.h (BITSET_INLINE): Remove.
15488 * lib/bitset.h [! BITSET_INLINE]: Remove.
15489 (bitset_set, bitset_reset, bitset_test): Rename local vars
15490 to avoid shadowing warnings by GCC.
15491
15492 * data/glr.c (inline): Remove #define. It's the user's
15493 responsibility to #define it away, just like 'const'.
15494 This fixes one of the bugs reported by Nelson H. F. Beebe in
15495 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
15496
15497 * Makefile.maint (po-check): Scan .l and .y files instead of the
15498 .c and the .h files that they generate. This fixes the bug
15499 reported by Tim Van Holder in:
15500 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
15501 Look for N_ as well as for _. Try to avoid matching #define for
15502 N_ and _.
15503 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
15504 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
15505 * src/scan-gram.l: Revamp regular expressions so that " and '
15506 do not confuse xgettext.
15507
15508 * src/struniq.h (struniq_new): Do not declare the return type
15509 to be 'const'; this violates the C standard.
15510 * src/struniq.c (struniq_new): Likewise.
15511
15512 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
15513
15514 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
15515 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
15516 linker.
15517
15518 2002-11-12 Akim Demaille <akim@epita.fr>
15519
15520 * Makefile.maint: Sync with Autoconf:
15521 (local_updates): New.
15522
15523 2002-11-12 Akim Demaille <akim@epita.fr>
15524
15525 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
15526
15527 2002-11-12 Akim Demaille <akim@epita.fr>
15528
15529 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
15530 locations.
15531
15532 2002-11-12 Akim Demaille <akim@epita.fr>
15533
15534 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
15535 not yyvalue.
15536
15537 2002-11-12 Akim Demaille <akim@epita.fr>
15538
15539 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
15540 Use it to test the GLR parser.
15541
15542 2002-11-12 Akim Demaille <akim@epita.fr>
15543
15544 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
15545 defines it.
15546 * data/glr.c (yystos): New.
15547 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
15548 (YYDSYMPRINT): New.
15549 (yyval): Don't define it, it is handled via M4.
15550 (yyrecoverParseError): Free verbosely the discarded symbols.
15551 * data/yacc.c (yysymprint): Remove, rather...
15552 (b4_yysymprint_generate): invoke.
15553 * data/c.m4 (b4_yysymprint_generate): New.
15554 Accept pointers as arguments, as opposed to the version from
15555 yacc.c.
15556 (b4_yydestruct_generate): Likewise.
15557 * tests/cations.at (Printers and Destructors): Use Bison directives
15558 instead of CPP macros.
15559 Don't rely on internal details.
15560
15561 2002-11-12 Akim Demaille <akim@epita.fr>
15562
15563 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
15564 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
15565 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
15566 it against YYEMPTY and so forth), work on yytoken (i.e., set
15567 it to YYEMPTY etc.).
15568 (yydestruct): Replace with a b4_yydestruct_generate invocation.
15569 (b4_symbol_actions): Remove.
15570 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
15571 for 0, end-of-input.
15572
15573 2002-11-12 Akim Demaille <akim@epita.fr>
15574
15575 * doc/bison.texinfo (Destructor Decl): New.
15576
15577 2002-11-12 Akim Demaille <akim@epita.fr>
15578
15579 * src/tables.c (tables_generate): Use free for pointers that
15580 cannot be NULL, not XFREE.
15581 (pack_vector): Use assert, not fatal, for bound violations.
15582 * src/state.c (state_new): Likewise.
15583 * src/reader.c (reader): Likewise.
15584 * src/lalr.c (set_goto_map): Likewise.
15585 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
15586 the file name.
15587
15588 2002-11-12 Akim Demaille <akim@epita.fr>
15589
15590 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
15591 Restore.
15592 * src/scan-gram.l (last_string): Is global to the file, not to
15593 yylex.
15594 * src/parse-gram.y (input): Don't append the epilogue here,
15595 (epilogue.opt): do it here, and free the scanner's obstack.
15596 * src/reader.c (epilogue_set): Rename as...
15597 (epilogue_augment): this.
15598 * data/c.m4 (b4_epilogue): Defaults to empty.
15599
15600 2002-11-12 Akim Demaille <akim@epita.fr>
15601
15602 * src/getargs.c (long_options): Remove duplicates.
15603 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
15604 Remove.
15605 * doc/bison.rnh: Remove.
15606 * doc/bison.texinfo (VMS Invocation): Remove.
15607
15608 2002-11-12 Akim Demaille <akim@epita.fr>
15609
15610 * src/struniq.h, src/struniq.c (struniq_t): Is const.
15611 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
15612
15613 Use struniq for symbols.
15614
15615 * src/symtab.h (symbol_t): The tag member is a struniq.
15616 (symbol_type_set): Adjust.
15617 * src/symtab.c (symbol_new): Takes a struniq.
15618 (symbol_free): Don't free the tag member.
15619 (hash_compare_symbol_t, hash_symbol_t): Rename as...
15620 (hash_compare_symbol, hash_symbol): these.
15621 Use the fact that tags as struniqs.
15622 (symbol_get): Use struniq_new.
15623 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
15624 Returns a strniq.
15625 * src/reader.h (merger_list, grammar_currentmerge_set): The name
15626 and type members are struniqs.
15627 * src/reader.c (get_merge_function)
15628 (grammar_current_rule_merge_set): Adjust.
15629 (TYPE, current_type): Are struniq.
15630
15631 Use struniq for file names.
15632
15633 * src/files.h, src/files.c (infile): Split into...
15634 (grammar_file, current_file): these.
15635 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
15636 * src/reduce.c (reduce_print): Likewise.
15637 * src/getargs.c (getargs): Likewise.
15638 * src/complain.h, src/complain.c: Likewise.
15639 * src/main.c (main): Call struniqs_new early enough to use it for
15640 file names.
15641 Don't free the input file name.
15642
15643 2002-11-12 Akim Demaille <akim@epita.fr>
15644
15645 * src/symtab.c (symbol_free): Remove dead deactivated code:
15646 type_name are properly removed.
15647 Don't use XFREE to free items that cannot be NULL.
15648 * src/struniq.h, src/struniq.c: New.
15649 * src/main.c (main): Initialize/free struniqs.
15650 * src/parse-gram.y (%union): Add astruniq member.
15651 (yyprint): Adjust.
15652 * src/scan-gram.l (<{tag}>): Return a struniq.
15653 Free the obstack bit that used to store it.
15654 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
15655
15656 2002-11-11 Paul Eggert <eggert@twinsun.com>
15657
15658 Revamp to fix many (but not all) of the C- and M4-related quoting
15659 problems. Among other things, this fixes the Bison bug reported
15660 by Jan Hubicka when processing the Bash grammar; see:
15661 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
15662
15663 Use new @ escapes consistently. Represent brackets with @{ and @}
15664 rather than @<:@ and @:>@, since this works a bit better with dumb
15665 editors like vi. Represent @ with @@, since @ is now consistently
15666 an escape. Use @oline@ and @ofile@ rather than __oline__ and
15667 __ofile__, to avoid unexpected expansions. Similarly, use @output
15668 rather than #output.
15669
15670 * data/c.m4 (b4_copyright): Omit file name from comment, since
15671 the file name could contain "*/".
15672 (b4_synclines_flag): Don't quote the 2nd argument; it should already
15673 be quoted. All uses changed.
15674
15675 * data/glr.c: Use new @ escapes consistently.
15676 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
15677 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
15678 Remove, since they couldn't handle arbitrary characters in file
15679 names.
15680 * data/lalr1.cc: Likewise.
15681 * data/yacc.c: Likewise.
15682
15683 * src/files.c (output_infix): Remove; all uses removed.
15684 * src/files.h: Likewise.
15685
15686 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
15687 mishandled funny characters in file names, and anyway it isn't
15688 needed any more.
15689 * data/yacc.c: Likewise.
15690 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
15691
15692 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
15693 * data/yacc.c: Likewise.
15694
15695 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
15696 strings now.
15697 (muscle_init): Quote filename as a C string.
15698 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
15699 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
15700 * src/output.c (escaped_file_name_output): New function.
15701 (prepare_symbols): Quote tokens for M4.
15702 (prepare): Don't insert output_infix, output_prefix,
15703 output_parser_name, output_header_name; this is now down by scan-skel.
15704 Insert skeleton as a C string.
15705
15706 * src/output.c (user_actions_output, symbol_destructors_output,
15707 symbol_printers_output): Quote filenames for C and M4.
15708 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15709
15710 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
15711 escapes other than \\ and \'; this simplifies the code.
15712 (<SC_STRING>): Likewise, for \\ and \".
15713 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
15714 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
15715 Use new escapes @{ and @} for [ and ].
15716
15717 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
15718 them with auto vars.
15719 Switch to new escape scheme, where @ is the escape character uniformly.
15720 Abort if a stray escape character is found. Avoid unbounded input
15721 buffer when parsing non-escaped text.
15722
15723 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
15724 __oline__, #output, $@, and @{ do not have unintended meanings.
15725
15726 2002-11-09 Paul Eggert <eggert@twinsun.com>
15727
15728 Fix the test failure due to GCC warnings described in
15729 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
15730 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
15731 evaluate to 0 if it's impossible for NINF to be in the respective
15732 table.
15733 (yygetLRActions, yyrecoverParseError): Use them.
15734
15735 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
15736 counted in the token inserted at end of file. Now takes
15737 location_t *, not location_t, so that the location can be
15738 adjusted. All uses changed.
15739
15740 * tests/regression.at (Invalid inputs): Adjust wording in
15741 diagnostic to match the new behavior.
15742
15743 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
15744 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
15745 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
15746 abort ();'. This reduces the runtime of the "Many lookaheads"
15747 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
15748 GCC 3.2.
15749
15750 2002-11-07 Paul Eggert <eggert@twinsun.com>
15751
15752 * src/parse-gram.y (CHARACTER): Remove unused token.
15753 All uses removed.
15754
15755 * src/scan-gram.l: Remove stack option. We no longer use the
15756 stack, since the stack was never deeper than 1; instead, use the
15757 new auto var c_context to record the stacked value.
15758
15759 Remove nounput option. At an unexpected end of file, we now unput
15760 the minimal input necessary to end cleanly; this simplifies the
15761 code.
15762
15763 Avoid unbounded token sizes where this is easy.
15764
15765 (unexpected_end_of_file): New function.
15766 Use it to systematize the error message on unexpected EOF.
15767 (last-string): Now auto, not static.
15768 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
15769 (scanner_last_string_free): Remove; not used.
15770 (percent_percent_count): Move decl to just before use.
15771 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
15772 not the (never otherwised-used) CHARACTER.
15773
15774 2002-11-07 Akim Demaille <akim@epita.fr>
15775
15776 Let yyerror always receive the msg as last argument, so that
15777 yyerror can be variadic.
15778
15779 * data/yacc.c (b4_yyerror_args): New.
15780 Use it when calling yyerror.
15781 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
15782 Use it when calling yyerror.
15783 * doc/bison.texinfo (Error Reporting): Adjust.
15784 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
15785 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
15786
15787 2002-11-06 Akim Demaille <akim@epita.fr>
15788
15789 #line should have quoted strings.
15790 Ideally, this should be done by m4_quotearg.
15791
15792 * src/scan-skel.l: Include quotearg.h.
15793 Quote __ofile__.
15794 * src/output.c (symbol_printers_output)
15795 (symbol_destructors_output): Quote the file name.
15796
15797 2002-11-06 Akim Demaille <akim@epita.fr>
15798
15799 * tests/regression.at (Invalid inputs): Adjust to the recent
15800 messages.
15801
15802 2002-11-06 Akim Demaille <akim@epita.fr>
15803
15804 Restore --no-lines.
15805 Reported by Jim Kent.
15806
15807 * data/c.m4 (b4_syncline): New.
15808 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
15809 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
15810 * src/output.c (user_actions_output): Likewise.
15811 (prepare): Define 'b4_synclines_flag'.
15812 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
15813
15814 2002-11-06 Akim Demaille <akim@epita.fr>
15815
15816 * src/main.c (main): Free `infile'.
15817 * src/scan-gram.l (handle_syncline): New.
15818 Recognize `#line'.
15819 * src/output.c (user_actions_output, symbol_destructors_output)
15820 (symbol_printers_output): Use the location's file name, not
15821 infile.
15822 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15823
15824 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15825
15826 * src/tables.c (matching_state): Don't allow states to match if
15827 either has GLR conflict entries.
15828
15829 2002-11-05 Paul Eggert <eggert@twinsun.com>
15830
15831 * src/scan-gram.l: Use more accurate diagnostics, e.g.
15832 "integer out of range" rather than "invalid value".
15833 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
15834 accordingly.
15835
15836 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
15837 Also, remove one static variable in the scanner.
15838
15839 * src/scan-gram.l (braces_level): Now auto, not static.
15840 Initialize to zero if the compiler is being picky.
15841 (INITIAL): Clear braces_level instead of incrementing it.
15842 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
15843 as POSIX 1003.1-2001 requires.
15844 * src/system.h (IF_LINT): New macro, taken from coreutils.
15845 * configure.ac: Define "lint" if --enable-gcc-warnings.
15846
15847 2002-11-05 Akim Demaille <akim@epita.fr>
15848
15849 * src/scan-gram.l: When it starts with `%', complain about the
15850 whole directive, not just that `invalid character: %'.
15851
15852 2002-11-04 Akim Demaille <akim@epita.fr>
15853
15854 * Makefile.maint: Update from Autoconf.
15855 (update, cvs-update, po-update, do-po-update): New.
15856
15857 2002-11-04 Akim Demaille <akim@epita.fr>
15858
15859 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
15860 and yyerror.
15861 Have yyerror `use' its arguments.
15862 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
15863 returns true when location & yacc & pure & parse-param.
15864 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
15865
15866 2002-11-04 Akim Demaille <akim@epita.fr>
15867
15868 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
15869 clashes.
15870 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15871 font-lock-mode.
15872 Use complain_at.
15873 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15874 slot 0.
15875
15876 2002-11-03 Paul Eggert <eggert@twinsun.com>
15877
15878 * src/reader.c (get_merge_function, grammar_current_rule_check):
15879 Use consistent diagnostics for reporting type name clashes.
15880 Quote the types with <>, for consistency with Yacc.
15881 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15882
15883 2002-11-03 Akim Demaille <akim@epita.fr>
15884
15885 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15886 New.
15887 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15888 (b4_parse_param): Remove.
15889 Use b4_identification.
15890 Propagate b4_pure_args where needed to pass them to yyerror.
15891 * data/glr.m4 (b4_parse_param): Remove.
15892 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15893 (b4_lpure_formals): New.
15894 Use b4_identification.
15895 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15896 b4_user_formals and b4_user_args.
15897 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15898 (yyreportAmbiguity): When using a pure parser, also need
15899 the location, and the parse-params.
15900 Adjust callers.
15901 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15902 When using a pure parser, also need the parse-params.
15903 Adjust callers.
15904 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15905 (%pure-parser + %parse-param) LALR and GLR parsers.
15906 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15907 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15908 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15909 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15910 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15911 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15912 * doc/bison.texinfo: Untabify the whole file.
15913 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15914 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15915 (Error Reporting): Adjust to these new directives.
15916 Document %error-verbose, deprecate YYERROR_VERBOSE.
15917
15918 2002-11-03 Akim Demaille <akim@epita.fr>
15919
15920 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15921 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15922 command line options.
15923 * tests/cxx-type.at: Formatting changes.
15924
15925 2002-11-03 Paul Eggert <eggert@twinsun.com>
15926
15927 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15928 to count columns correctly, and to check for invalid inputs.
15929
15930 Use mbsnwidth to count columns correctly. Account for tabs, too.
15931 Include mbswidth.h.
15932 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15933 (extend_location): New function.
15934 (YY_LINES): Remove.
15935
15936 Handle CRLF in C code rather than in Lex code.
15937 (YY_INPUT): New macro.
15938 (no_cr_read): New function.
15939
15940 Scan UCNs, even though we don't fully handle them yet.
15941 (convert_ucn_to_byte): New function.
15942
15943 Handle backslash-newline correctly in C code.
15944 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15945 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15946 all uses changed.
15947 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15948 Use {splice} wherever C allows backslash-newline.
15949 YY_STEP after space, newline, vertical-tab.
15950 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15951
15952 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15953
15954 ({int}, handle_action_dollar, handle_action_at): Check for integer
15955 overflow.
15956
15957 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15958
15959 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15960 as well as \000. Check for UCHAR_MAX, not 255.
15961 Allow \x with an arbitrary positive number of digits, as in C.
15962 Check for overflow here.
15963 Allow \? and UCNs, for compatibility with C.
15964
15965 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15966 with quote slot used by complain_at.
15967
15968 * tests/input.at: Add tests for backslash-newline, m4 quotes
15969 in symbols, long literals, and funny escapes in strings.
15970
15971 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15972 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15973 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15974 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15975 * m4/mbswidth.m4: New file, from GNU coreutils.
15976
15977 * doc/bison.texinfo (Grammar Outline): Document // comments.
15978 (Symbols): Document that trigraphs have no special meaning in Bison,
15979 nor is backslash-newline allowed.
15980 (Actions): Document that trigraphs have no special meaning.
15981
15982 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15983 no longer used.
15984
15985 2002-11-02 Paul Eggert <eggert@twinsun.com>
15986
15987 * src/reader.c: Don't include quote.h; not needed.
15988 (get_merge_function): Reword warning to be consistent with
15989 type clash diagnostic in grammar_current_rule_check.
15990
15991 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15992 bug in trigraph handling.
15993
15994 * src/output.c (prepare_symbols): When printing token names,
15995 escape "[" as "@<:@" and likewise for "]".
15996
15997 * src/system.h (errno): Remove declaration, as we are now
15998 assuming C89 or better, and C89 guarantees errno.
15999
16000 2002-10-30 Paul Eggert <eggert@twinsun.com>
16001
16002 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16003 Check for close failures.
16004 * src/files.h (xfclose): Return void, not int, since it always
16005 returned zero.
16006 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16007 indicates one.
16008 * src/output.c (output_skeleton): Use xfclose rather than fclose
16009 and ferror. xfclose now checks ferror.
16010
16011 * data/glr.c (YYLEFTMOST_STATE): Remove.
16012 (yyreportTree): Use a stack-based leftmost state. This avoids
16013 our continuing battles with bogus warnings about initializers.
16014
16015 2002-10-30 Akim Demaille <akim@epita.fr>
16016
16017 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16018 #if.
16019
16020 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16021
16022 * tests/glr-regr1.at: New test for reported regressions.
16023 * tests/testsuite.at: Add glr-regr1.at test.
16024 * tests/Makefile.am: Add glr-regr1.at test.
16025
16026 2002-10-24 Paul Eggert <eggert@twinsun.com>
16027
16028 Version 1.75a.
16029
16030 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16031 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16032 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16033 Don't assume strdup exists; POSIX says its an XSI extension.
16034 Check for buffer overflow on input.
16035
16036 2002-10-24 Akim Demaille <akim@epita.fr>
16037
16038 * src/output.c (output_skeleton): Don't disable M4sugar comments
16039 too soon: it results in comments being expanded.
16040 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16041 first output.
16042
16043 2002-10-24 Akim Demaille <akim@epita.fr>
16044
16045 * data/yacc.c (m4_int_type): New.
16046 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16047 char' as only yacc.c wants K&R portability.
16048 * data/glr.c (yysigned_char): Remove.
16049 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16050 Reported by Quoc Peyrot.
16051
16052 2002-10-23 Paul Eggert <eggert@twinsun.com>
16053
16054 * src/main.c (main): With --trace=time, report times even if a
16055 non-fatal error occurs. Formerly, the times were reported in some
16056 such cases but not in others.
16057 * src/reader.c (reader): Just return if a complaint has been issued,
16058 instead of exiting, so that 'main' can report times.
16059
16060 2002-10-22 Akim Demaille <akim@epita.fr>
16061
16062 * src/system.h: Include sys/types.
16063 Reported by Bert Deknuydt.
16064
16065 2002-10-23 Paul Eggert <eggert@twinsun.com>
16066
16067 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16068 Suggested by Art Haas.
16069
16070 2002-10-22 Paul Eggert <eggert@twinsun.com>
16071
16072 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16073 decl; not needed any more.
16074 * src/main.c (main): Use return to exit, undoing yesterday's change.
16075 The last OS that we could find where this wouldn't work is
16076 SunOS 3.5, and that's too old to worry about now.
16077
16078 * data/glr.c (struct yyltype): Define members even when not
16079 doing locations. This is more consistent with yacc.c, and it
16080 works around the following bug reports:
16081 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16082 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
16083
16084 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16085 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16086 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16087
16088 2002-10-22 Akim Demaille <akim@epita.fr>
16089
16090 * data/README: New.
16091
16092 2002-10-21 Paul Eggert <eggert@twinsun.com>
16093
16094 Be consistent about 'bool'; the old code used an enum in one
16095 module and an int in another, and this violates the C standard.
16096 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16097 * configure.ac (AC_HEADER_STDBOOL): Add.
16098 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16099 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16100 * src/symtab.c (hash_compare_symbol_t): Likewise.
16101 * src/system.h (bool, false, true): Use a definition consistent
16102 with ../lib/hash.c. All uses changed.
16103
16104 * src/complain.c (warning_issued): Renamed from warn_message_count,
16105 so that we needn't worry about integer overflow (!).
16106 Now of type bool. All uses changed.
16107 (complaint_issued): Renamed from complain_message_count; likewise.
16108
16109 * src/main.c (main): Use exit to exit with failure.
16110
16111 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16112 rather than 1 and 0.
16113 * src/main.c (main): Likewise.
16114 * src/getargs.c (getargs): Likewise.
16115 * src/reader.c (reader): Likewise.
16116
16117 * src/getarg.c (getargs): Remove duplicate code for
16118 "Try `bison --help'".
16119
16120 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16121 What was that "2" for?
16122
16123 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16124 * src/getargs.c (usage): Likewise.
16125
16126 * src/getargs.c (getargs): When there are too few operands, report
16127 the last one. When there are too many, report the first extra
16128 one. This is how diffutils does it.
16129
16130 2002-10-20 Paul Eggert <eggert@twinsun.com>
16131
16132 Remove K&R vestiges.
16133 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16134 * src/complain.c (VA_START): Remove. Assume prototypes.
16135 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16136 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16137 fatal): Assume prototypes.
16138 * src/complain.h: Assume prototypes.
16139 * src/system.h (PARAMS): Remove.
16140 Include <limits.h> unconditionally, since it's guaranteeed even
16141 for a freestanding C89 compiler.
16142 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16143 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
16144
16145 2002-10-20 Akim Demaille <akim@epita.fr>
16146
16147 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16148 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16149 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16150 (yyresolveStates, yyresolveAction, yyresolveStack)
16151 (yyprocessOneStack): Use them.
16152 (yy_reduce_print): New.
16153 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16154
16155 2002-10-20 Akim Demaille <akim@epita.fr>
16156
16157 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16158 arguments and output `void'.
16159 (b4_c_function): Rename as...
16160 (b4_c_function_def): this.
16161 (b4_c_function_decl, b4_c_ansi_function_def)
16162 (b4_c_ansi_function_decl): New.
16163 Change the interpretation of the arguments: before `int, foo', now
16164 `int foo, foo'.
16165 * data/yacc.c (yyparse): Prototype and define thanks to these.
16166 Adjust b4_c_function_def uses.
16167 * data/glr.c (yyparse): Likewise, but ANSI only.
16168
16169 2002-10-20 Akim Demaille <akim@epita.fr>
16170
16171 * src/output.c (prepare): Move the definition of `tokens_number',
16172 `nterms_number', `undef_token_number', `user_token_number_max'
16173 to...
16174 (prepare_tokens): Here.
16175 (prepare_tokens): Rename as...
16176 (prepare_symbols): this.
16177 (prepare): Move the definition of `rules_number' to...
16178 (prepare_rules): here.
16179 (prepare): Move the definition of `last', `final_state_number',
16180 `states_number' to...
16181 (prepare_states): here.
16182 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16183
16184 2002-10-20 Akim Demaille <akim@epita.fr>
16185
16186 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16187
16188 2002-10-20 Akim Demaille <akim@epita.fr>
16189
16190 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16191 * data/c.m4: here.
16192
16193 2002-10-20 Akim Demaille <akim@epita.fr>
16194
16195 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16196 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16197 `pair'.
16198 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16199 `name' to...
16200 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16201 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16202 These.
16203
16204 2002-10-19 Paul Eggert <eggert@twinsun.com>
16205
16206 Do not create a temporary file, as that involves security and
16207 cleanup headaches. Instead, use a pair of pipes.
16208 Derived from a suggestion by Florian Krohm.
16209 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16210 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16211 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16212 (BISON_PREREQ_SUBPIPE): Add.
16213 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16214 Add subpipe.h, subpipe.c.
16215 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16216 * po/POTFILES.in: Add lib/subpipe.c.
16217 * src/output.c: Include "subpipe.h".
16218 (m4_invoke): Remove decl.
16219 (scan_skel): New decl.
16220 (output_skeleton): Use pipe rather than temporary file for m4 input.
16221 Check that m4sugar.m4 is readable, to avoid deadlock.
16222 Check for pipe I/O error.
16223 * src/scan-skel.l (readpipe): Remove decl.
16224 (scan_skel): New function, to be used in place of m4_invoke.
16225 Read from stream rather than file.
16226
16227 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16228 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16229 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16230 this generates a more-accurate value anyway.
16231
16232 * lib/timevar.c (timervar_accumulate): Rename locals to
16233 avoid confusion with similarly-named more-global.
16234 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16235
16236 * src/output.c (prepare): Use xstrdup to convert char const *
16237 to char *, to avoid GCC warning.
16238
16239 2002-10-19 Akim Demaille <akim@epita.fr>
16240
16241 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16242 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16243 Use them to have `calc.y' ready for %pure-parser.
16244 * data/yacc.c (YYLEX): Pass a yylex return type to
16245 b4_c_function_call.
16246
16247 2002-10-19 Akim Demaille <akim@epita.fr>
16248
16249 Prototype support of %lex-param and %parse-param.
16250
16251 * src/parse-gram.y: Add the definition of the %lex-param and
16252 %parse-param tokens, plus their rules.
16253 Drop the `_' version of %glr-parser.
16254 Add the "," token.
16255 * src/scan-gram.l (INITIAL): Scan them.
16256 * src/muscle_tab.c: Comment changes.
16257 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16258 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16259 (muscle_entry_s): The `value' member is no longer const.
16260 Adjust all dependencies.
16261 * src/muscle_tab.c (muscle_init): Adjust: use
16262 MUSCLE_INSERT_STRING.
16263 Initialize the obstack earlier.
16264 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16265 (muscle_pair_list_grow): New.
16266 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16267 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16268 * tests/calc.at: Use %locations, not --locations.
16269 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16270
16271 2002-10-19 Akim Demaille <akim@epita.fr>
16272
16273 * src/getargs.c (usage): Take status as argument and exit
16274 accordingly.
16275 Report the traditional `Try ... --help' message when status != 0.
16276 (usage, version): Don't take a FILE * as arg, it is pointless.
16277 (getargs): When there is an incorrect number of arguments, make it
16278 an error, and report it GNUlically thanks to `usage ()'.
16279
16280 2002-10-18 Paul Eggert <eggert@twinsun.com>
16281
16282 * data/glr.c (yyreportParseError): Don't assume that sprintf
16283 yields the length of the printed string, as this is not true
16284 on SunOS 4.1.4. Reported by Peter Klein.
16285
16286 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16287 * tests/conflicts.at (%nonassoc and eof): Likewise.
16288 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16289
16290 2002-10-17 Akim Demaille <akim@epita.fr>
16291
16292 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16293 * src/getargs.c (trace_types, trace_args): Adjust.
16294 * src/reader.c (grammar_current_rule_prec_set)
16295 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16296 Standardize error messages.
16297 And s/@prec/%prec/!
16298 (reader): Use trace_flag to enable scanner/parser debugging,
16299 instead of an adhoc scheme.
16300 * src/scan-gram.l: Remove trailing debugging code.
16301
16302 2002-10-16 Paul Eggert <eggert@twinsun.com>
16303
16304 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16305 MUSCLE_TAB_H.
16306
16307 * NEWS: Officially drop support for building Bison with K&R C,
16308 since it didn't work anyway and it's not worth worrying about.
16309 * Makefile.maint (wget_files): Remove ansi2knr.c.
16310 (ansi2knr.c-url_prefix): Remove.
16311 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16312 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16313 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16314
16315 2002-10-15 Paul Eggert <eggert@twinsun.com>
16316
16317 Stop using the "enum_" trick for K&R-style function definitions;
16318 it confused me, and I was the author! Instead, assume that people
16319 who want to use K&R C compilers (when using these modules in GCC,
16320 perhaps?) will run ansi2knr.
16321
16322 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16323 All uses of "enum_" changed to "enum ".
16324 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16325 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16326
16327 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16328 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16329 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16330 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16331 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16332 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16333 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16334 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16335 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16336 Use function prototypes; this removes the need for declaring
16337 static functions simply to provide their prototypes.
16338 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16339 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16340 bitset_count_, bitset_create, bitset_dump, bitset_first,
16341 bitset_free, bitset_init, bitset_last, bitset_next,
16342 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16343 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16344 bitset_print, bitset_release_memory, bitset_toggle_,
16345 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16346 debug_bitset): Likewise.
16347 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16348 * lib/bitset_stats.c (bitset_log_histogram_print,
16349 bitset_percent_histogram_print, bitset_stats_and,
16350 bitset_stats_and_cmp, bitset_stats_and_or,
16351 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16352 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16353 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16354 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16355 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16356 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16357 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16358 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16359 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16360 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16361 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16362 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16363 bitset_stats_zero): Likewise.
16364 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16365 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16366 bitsetv_dump, debug_bitsetv): Likewise.
16367 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16368 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16369 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16370 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16371 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16372 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16373 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16374 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16375 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16376 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16377 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16378 Likewise.
16379 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16380 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16381 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16382 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16383 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16384 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16385 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16386 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16387 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16388 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16389 lbitset_xor_cmp, lbitset_zero): Likewise.
16390
16391 2002-10-14 Akim Demaille <akim@epita.fr>
16392
16393 Version 1.75.
16394
16395 2002-10-14 Akim Demaille <akim@epita.fr>
16396
16397 * tests/Makefile.am (maintainer-check-posix): New.
16398
16399 2002-10-14 Akim Demaille <akim@epita.fr>
16400
16401 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
16402 member.
16403
16404 2002-10-14 Akim Demaille <akim@epita.fr>
16405
16406 * src/tables.c (table_ninf_remap): base -> tab.
16407 Reported by Matt Rosing.
16408
16409 2002-10-14 Paul Eggert <eggert@twinsun.com>
16410
16411 * tests/action.at, tests/calc.at, tests/conflicts.at,
16412 tests/cxx-type.at, tests/headers.at, tests/input.at,
16413 tests/regression.at, tests/synclines.at, tests/torture.at:
16414 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
16415 so that the tests still work even if POSIXLY_CORRECT is set.
16416 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
16417
16418 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
16419 for portability to K&R hosts. Fix typo: signed char is guaranteed
16420 only to 127, not to 128.
16421 * data/glr.c (yysigned_char): New type.
16422 * data/yacc.c (yysigned_char): Likewise.
16423 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
16424
16425 2002-10-13 Paul Eggert <eggert@twinsun.com>
16426
16427 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
16428 true due to limited range of data type" warning from GCC.
16429
16430 * data/c.m4 (b4_token_defines): Protect against double-inclusion
16431 by wrapping enum yytokentype's definition inside #ifndef
16432 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
16433
16434 2002-10-13 Akim Demaille <akim@epita.fr>
16435
16436 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
16437 Un yy- yyrhs to avoid the name clash with the global YYRHS.
16438
16439 2002-10-13 Akim Demaille <akim@epita.fr>
16440
16441 * Makefile.maint: Update from Autoconf 2.54.
16442 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
16443
16444 2002-10-13 Akim Demaille <akim@epita.fr>
16445
16446 * src/print.c (print_state): Separate the list of solved conflicts
16447 from the other items.
16448 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
16449
16450 2002-10-13 Akim Demaille <akim@epita.fr>
16451
16452 Let nondeterministic skeletons be usable with deterministic
16453 tables.
16454
16455 With the patch, GAWK compiled by GCC without -O2 passes its test
16456 suite using a GLR parser driven by LALR tables. It fails with -O2
16457 because `struct stat' gives two different answers on my machine:
16458 88 (definition of an auto var) and later 96 (memset on this var).
16459 Hence the stack is badly corrumpted. The headers inclusion is to
16460 blame: if I move the awk.h inclusion before GLR's system header
16461 inclusion, the two struct stat have the same size.
16462
16463 * src/tables.c (pack_table): Always create conflict_table.
16464 (token_actions): Always create conflict_list.
16465 * data/glr.c (YYFLAG): Remove, unused.
16466
16467 2002-10-13 Akim Demaille <akim@epita.fr>
16468
16469 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
16470 (O0FLAGS): New.
16471 (VALGRIND, GXX): New.
16472 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
16473 * tests/bison.in: Run $PREBISON a pre-command.
16474 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
16475 (maintainer-check-g++): New.
16476 * Makefile.am (maintainer-check): New.
16477
16478 2002-10-13 Akim Demaille <akim@epita.fr>
16479
16480 * data/glr.c: Formatting changes.
16481 Tweak some trace messages to match yacc.c's.
16482
16483 2002-10-13 Akim Demaille <akim@epita.fr>
16484
16485 GLR parsers sometimes raise parse errors instead of performing the
16486 default reduction.
16487 Reported by Charles-Henry de Boysson.
16488
16489 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
16490 check the length of the traces when %glr.
16491 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
16492 GLR's traces.
16493 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
16494 Test GLR parsers.
16495 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
16496 (yyltype): Remove the yy prefix from the member names.
16497 (yytable): Complete its comment.
16498 (yygetLRActions): Map error action number from YYTABLE from
16499 YYTABLE_NINF to 0.
16500 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
16501 (which was a bug: it should have been YYTABEL_NINF, and yet it was
16502 not satisfying as we could compare an YYACTION computed from
16503 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
16504 only value for error actions.
16505 (yyreportParseError): In verbose parse error messages, don't issue
16506 `error' in the list of expected tokens.
16507 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
16508 next action to perform to match glr.c's decoding.
16509 (yytable): Complete its comment.
16510
16511 2002-10-13 Paul Eggert <eggert@twinsun.com>
16512
16513 Fix problem reported by Henrik Grubbstroem in
16514 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
16515 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
16516 because the Bison parser reads the second action before reducing
16517 the first one.
16518 * src/scan-gram.l (rule_length): New static var.
16519 Use it to keep track of the rule length in the scanner, since
16520 we can't expect the parser to be in lock-step sync with the scanner.
16521 (handle_action_dollar, handle_action_at): Use this var.
16522 * tests/actions.at (Exotic Dollars): Test for the problem.
16523
16524 2002-10-12 Paul Eggert <eggert@twinsun.com>
16525
16526 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
16527 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
16528 Include <sys/time.h> when checking for clock_t and struct tms.
16529 Use same include order as source.
16530 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
16531 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
16532
16533 * lib/timevar.c: Update copyright date and clarify comments.
16534 (get_time) [IN_GCC]: Keep the GCC version for reference.
16535
16536 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
16537 GCC version as of today, then merge Bison's changes.
16538 Change "GCC" to "Bison" in copyright notice. timevar.def's
16539 author is Akim, so change that too.
16540
16541 * src/reader.c (grammar_current_rule_check):
16542 Don't worry about the default action if $$ is untyped.
16543 Prevents bogus warnings reported by Jim Gifford in
16544 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
16545
16546 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
16547 * data/glr.c, data/lalr1.cc, data/yacc.c:
16548 Output token definitions before the first part of user declarations.
16549 Fixes compatibility problem reported by Jim Gifford for kbd in
16550 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
16551
16552 2002-10-11 Paul Eggert <eggert@twinsun.com>
16553
16554 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
16555 (yyparse): here. This undoes some of the 2002-07-25 change.
16556 Compatibility problem reported by Ralf S. Engelschall with
16557 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
16558
16559 2002-10-11 Akim Demaille <akim@epita.fr>
16560
16561 * tests/regression.at Characters Escapes): New.
16562 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
16563 characters.
16564 Reported by Jan Nieuwenhuizen.
16565
16566 2002-10-11 Akim Demaille <akim@epita.fr>
16567
16568 * po/id.po: New.
16569
16570 2002-10-10 Paul Eggert <eggert@twinsun.com>
16571
16572 Portability fixes for bitsets; this also avoids several GCC
16573 warnings.
16574
16575 * lib/abitset.c: Include <stddef.h>, for offsetof.
16576 * lib/lbitset.c: Likewise.
16577
16578 * lib/abitset.c (abitset_bytes): Return a size that is aligned
16579 properly for vectors of objects. Do not assume that adding a
16580 header size to a multiple of a word size yields a value that is
16581 properly aligned for the whole union.
16582 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16583
16584 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
16585 unique names for structures.
16586 * lib/ebitset.c (ebitset_bytes): Likewise.
16587 * lib/lbitset.c (lbitset_bytes): Likewise.
16588
16589 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
16590 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
16591 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
16592 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
16593 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
16594 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
16595 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
16596 to improve the type-checking that GCC can do.
16597 * lib/bitset.c (bitset_op4_cmp): Likewise.
16598 * lib/bitset_stats.c (bitset_stats_count,
16599 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
16600 bitset_stats_copy, bitset_stats_disjoint_p,
16601 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
16602 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
16603 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
16604 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
16605 bitset_stats_and_or_cmp, bitset_stats_andn_or,
16606 bitset_stats_andn_or_cmp, bitset_stats_or_and,
16607 bitset_stats_or_and_cmp): Likewise.
16608 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
16609 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
16610 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
16611 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
16612
16613 * lib/abitset.h: Include bitset.h, not bbitset.h.
16614 * lib/ebitset.h: Likewise.
16615 * lib/lbitset.h: Likewise.
16616
16617 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
16618 All instances of parameters of type enum bitset_opts are now of
16619 type enum_bitset_opts, to conform to the C Standard, and similarly
16620 for enum_bitset_type.
16621 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16622 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16623
16624 Do not use "struct bitset_struct" to mean different things in
16625 different modules. Not only is this confusing, it violates
16626 the C Standard, which requires that structure types in different
16627 modules must be compatible if one is to be passed to the other.
16628 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
16629 All instances of "struct bitset_struct *" replaced with "bitset".
16630 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
16631 (union bitset_union, struct abitset_struct, struct ebitset_struct,
16632 struct lbitset_struct, struct bitset_stats_struct): New types.
16633 All uses of struct bitset_struct changed to union bitset_union,
16634 etc.
16635 * lib/abitset.c (struct abitset_struct, abitset,
16636 struct bitset_struct): Remove.
16637 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
16638 struct bitset_struct): Remove.
16639 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
16640 bitset_struct): Remove.
16641 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
16642 Likewise.
16643
16644 Do not call a function of type T using a call that assumes the
16645 function is of a different type U. Standard C requires that a
16646 function must be called with a type that is compatible with its
16647 definition.
16648 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16649 New decls.
16650 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16651 New functions.
16652 * lib/ebitset.c (PFV): Remove.
16653 * lib/lbitset.c (PFV): Likewise.
16654 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
16655 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
16656 decls.
16657 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
16658 (ebitset_vtable): Use them.
16659 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
16660 lbitset_xor): New functions.
16661 (lbitset_vtable): Use them.
16662
16663 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
16664 Declare.
16665
16666 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
16667 GCC warning.
16668 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
16669 Use offsetof, for simplicity.
16670
16671 2002-10-06 Paul Eggert <eggert@twinsun.com>
16672
16673 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
16674 the same width as int. This reapplies a hunk of the 2002-08-12 patch
16675 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
16676 which was inadvertently undone by the 2002-09-30 patch.
16677 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
16678 the same width as int.
16679
16680 2002-10-04 Paul Eggert <eggert@twinsun.com>
16681
16682 Version 1.50.
16683
16684 * configure.ac (AC_INIT), NEWS: Increment version number.
16685
16686 * doc/bison.texinfo: Minor spelling, grammar, and white space
16687 fixes.
16688 (Symbols): Mention that any negative value returned from yylex
16689 signifies end-of-input. Warn about negative chars. Mention
16690 the portable Standard C character set.
16691
16692 The GNU coding standard says CFLAGS and YFLAGS are reserved
16693 for the installer to set.
16694 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
16695 * src/Makefile.am (AM_CFLAGS): Likewise.
16696 (AM_YFLAGS): Renamed from YFLAGS.
16697
16698 Fix some MAX and MIN problems.
16699 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
16700 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
16701 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
16702 * src/reader.c (reader): Use it.
16703
16704 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
16705 POSIX 1003.1-2001 has removed fgrep.
16706
16707 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
16708
16709 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
16710 interpreted as signed.
16711 * lib/ebitset.c (ebitset_list): Fix bug.
16712
16713 2002-10-01 Paul Eggert <eggert@twinsun.com>
16714
16715 More fixes for 64-bit hosts and large bitsets.
16716
16717 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
16718 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
16719 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
16720 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
16721 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
16722 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
16723 bitset_count_): Likewise.
16724 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
16725 bitset_first, bitset_last): Likewise.
16726 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
16727 bitset_stats_list_reverse, bitset_stats_size,
16728 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
16729 Likewise.
16730 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16731 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16732 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16733 bitsetv_reflexive_transitive_closure): Likewise.
16734 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
16735 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
16736 Likewise.
16737 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
16738 Likewise.
16739
16740 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
16741 Use size_t, not unsigned int, to count bytes.
16742 * lib/abitset.h (abitset_bytes): Likewise.
16743 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
16744 Likewise.
16745 * lib/bitset.h (bitset_bytes): Likewise.
16746 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
16747 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
16748 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16749 * lib/ebitset.c (ebitset_bytes): Likewise.
16750 * lib/ebitset.h (ebitset_bytes): Likewise.
16751 * lib/lbitset.c (lbitset_bytes): Likewise.
16752 * lib/lbitset.h (lbitset_bytes): Likewise.
16753
16754 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
16755 abitset_subset_p, abitset_disjoint_p, abitset_and,
16756 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
16757 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
16758 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
16759 abitset_or_and, abitset_or_and_cmp):
16760 Use bitset_windex instead of unsigned int.
16761 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16762 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
16763 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
16764 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
16765 Likewise.
16766 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
16767
16768 * lib/bitset.c (bitset_print):
16769 Use proper printf formats for widths of integer types.
16770 * lib/bitset_stats.c (bitset_percent_histogram_print,
16771 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
16772 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16773 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16774 * lib/lbitset.c (lbitset_bytes): Likewise.
16775
16776 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
16777 BITSET_SIZE_MAX): New macros.
16778 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
16779 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
16780 to BITSET_WINDEX_MAX.
16781
16782 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
16783 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
16784 since we now return the bitset_bindex type (not int).
16785
16786 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
16787 when computing sizes.
16788 * lib/ebitset.c (ebitset_elts_grow): Likewise.
16789
16790 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
16791 and avoid cast to unsigned.
16792
16793 2002-09-30 Akim Demaille <akim@epita.fr>
16794
16795 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
16796 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
16797 Updates from Michael Hayes.
16798
16799 2002-09-30 Art Haas <ahaas@neosoft.com>
16800
16801 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
16802 invocations.
16803 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
16804 defined.
16805
16806 2002-09-27 Akim Demaille <akim@epita.fr>
16807
16808 Version 1.49c.
16809
16810 2002-09-27 Akim Demaille <akim@epita.fr>
16811
16812 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
16813 (Because of AC_LIBSOURCE).
16814
16815 2002-09-27 Akim Demaille <akim@epita.fr>
16816
16817 Playing with Autoscan.
16818
16819 * configure.ac: Remove the old LIBOBJ tweaks.
16820 (AC_REPLACE_FUNCS): Add strrchr and strtol.
16821 * lib/strrchr.c: New.
16822 * lib/strtol.c: New, from the Coreutils 4.5.1.
16823
16824 2002-09-27 Akim Demaille <akim@epita.fr>
16825
16826 Playing with Autoscan.
16827
16828 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
16829 * lib/Makefile.am (libbison_a_SOURCES): No longer include
16830 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
16831 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
16832 Coreutils 4.5.1.
16833
16834 2002-09-24 Akim Demaille <akim@epita.fr>
16835
16836 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
16837 (Frequently Asked Questions, Parser Stack Overflow): New.
16838
16839 2002-09-13 Akim Demaille <akim@epita.fr>
16840
16841 Playing with autoscan.
16842
16843 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
16844 * src/files.c (skeleton_find): Remove, unused.
16845 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
16846 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
16847
16848 2002-09-13 Akim Demaille <akim@epita.fr>
16849
16850 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
16851 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
16852
16853 2002-09-13 Akim Demaille <akim@epita.fr>
16854
16855 * configure.ac: Require 2.54.
16856 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
16857 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
16858 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
16859 Remove, provided by Autoconf macros.
16860
16861 2002-09-12 Akim Demaille <akim@epita.fr>
16862
16863 * m4/prereq.m4: Update, from Coreutils 4.5.1.
16864
16865 2002-09-12 Akim Demaille <akim@epita.fr>
16866
16867 * m4/prereq.m4: Update, from Fileutils 4.1.5.
16868 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
16869 Reported by Martin Mokrejs.
16870
16871 2002-09-10 Akim Demaille <akim@epita.fr>
16872
16873 * src/parse-gram.y: Associate a human readable string to each
16874 token type.
16875 * tests/regression.at (Invalid inputs): Adjust.
16876
16877 2002-09-10 Gary V. Vaughan <gary@gnu.org>
16878
16879 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16880 with an Autoconf-2.5x style configure.ac.
16881
16882 2002-09-06 Paul Eggert <eggert@twinsun.com>
16883
16884 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16885 exception applies only to yacc.c. This is a modification of a
16886 patch originally suggested by Akim Demaille.
16887
16888 2002-09-06 Akim Demaille <akim@epita.fr>
16889
16890 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16891 here to...
16892 * data/yacc.c: here.
16893
16894 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16895 LocationType.
16896 (b4_ltype): Default to yy::Location from location.hh.
16897
16898 2002-09-04 Jim Meyering <jim@meyering.net>
16899
16900 * data/yacc.c: Guard the declaration of yytoknum also with
16901 `#ifdef YYPRINT', so it is declared only when used.
16902
16903 2002-09-04 Akim Demaille <akim@epita.fr>
16904
16905 * configure.in: Rename as...
16906 * configure.ac: this.
16907 Bump to 1.49c.
16908
16909 2002-09-04 Akim Demaille <akim@epita.fr>
16910
16911 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16912 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16913 translate maintainer only messages.
16914
16915 2002-08-12 Paul Eggert <eggert@twinsun.com>
16916
16917 Version 1.49b.
16918
16919 * Makefile.am (SUBDIRS): Remove intl.
16920 (DISTCLEANFILES): Remove.
16921 * NEWS: Mention that GNU M4 is now required. Clarify what is
16922 meant by "larger grammars". Mention the pt_BR translation.
16923 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16924 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16925 Bump version from 0.11.2 to 0.11.5.
16926 (BISON_PREREQ_STAGE): Remove.
16927 (AM_GNU_GETTEXT): Use external gettext.
16928 (AC_OUTPUT): Remove intl/Makefile.
16929
16930 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16931
16932 * data/glr.c: Include string.h, for strlen.
16933 (yyreportParseError): Use size_t for yysize.
16934 (yy_yypstack): No longer nested inside yypstates, as nested
16935 functions are not portable. Do not assume size_t is the
16936 same width as int.
16937 (yypstates): Do not assume that ptrdiff_t is the same width
16938 as int, and similarly for yyposn and YYINDEX.
16939
16940 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16941
16942 * lib/Makefile.am (INCLUDES): Do not include from the intl
16943 directory, which has been removed.
16944 * src/Makefile.am (INCLUDES): Likewise.
16945
16946 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16947 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16948 New vars.
16949
16950 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16951 * tests/Makefile.am (EXTRA_DIST): Likewise.
16952
16953 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16954 Do not assume that bitset_windex is the same width as unsigned.
16955
16956 * lib/abitset.c (abitset_unused_clear): Do not assume that
16957 bitset_word is the same width as int.
16958 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16959 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16960 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16961 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16962 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16963
16964 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16965 portability to one's complement hosts!).
16966 * lib/ebitset.c (ebitset_op1): Likewise.
16967 * lib/lbitset.c (lbitset_op1): Likewise.
16968
16969 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16970 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16971 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16972 Sync with fileutils.
16973 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16974 lib/gettext.h: Sync with diffutils.
16975
16976 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16977 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16978
16979 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16980 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16981 check for void *.
16982
16983 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16984 size_t; the old version tried to do this but casted improperly.
16985 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16986 (bitset_test): Now returns int, not unsigned long.
16987
16988 * lib/bitset_stats.c: Include "gettext.h".
16989 (_): New macro.
16990 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16991 name locals "index", as it generates unnecessary warnings on some
16992 hosts that have an "index" function.
16993
16994 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16995 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16996 they need translation.
16997 * src/LR0.c (state_list_append, new_itemsets, get_state,
16998 append_states, generate_states): Likewise.
16999 * src/assoc.c (assoc_to_string): Likewise.
17000 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17001 * src/gram.c (grammar_dump): Likewise.
17002 * src/injections.c (injections_compute): Likewise.
17003 * src/lalr.c (lookaheads_print): Likewise.
17004 * src/relation.c (relation_transpose): Likewise.
17005 * src/scan-gram.l: Likewise.
17006 * src/tables.c (table_grow, pack_vector): Likewise.
17007
17008 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17009 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17010 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17011 * m4/mbstate_t.m4: Sync with fileutils.
17012 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17013
17014 * po/LINGUAS: Add pt_BR.
17015 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17016 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17017 lib/timevar.c.
17018 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17019 manual recommends.
17020 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17021
17022 * src/complain.c (strerror_r): Remove decl; not needed.
17023 (strerror): Use same pattern as ../lib/error.c.
17024
17025 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17026
17027 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17028
17029 * src/main.c (main): Cast result of bindtextdomain and textdomain
17030 to void, to avoid a GCC warning when --disable-nls is in effect.
17031
17032 * src/scan-gram.l: Use strings rather than escapes when possible,
17033 to minimize the number of warnings from xgettext.
17034 (handle_action_dollar, handle_action_at): Don't use isdigit,
17035 as it mishandles negative chars and it may not work as expected
17036 outside the C locale.
17037
17038 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17039 this is a GCC extension and is not portable to other compilers.
17040
17041 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17042 Do not include <ctype.h>; no longer needed.
17043 Do not include <malloc.h>; no longer needed (and generates
17044 warnings on OpenBSD 3.0).
17045
17046 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17047 it's not portable.
17048
17049 * tests/regression.at: Do not use 'cc -c input.c -o input';
17050 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17051
17052 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17053 exit status as failure, not just exit status 1. Sun C exits
17054 with status 2 sometimes.
17055
17056 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17057 Use it for the two large tests.
17058
17059 2002-08-02 Akim Demaille <akim@epita.fr>
17060
17061 * src/conflicts.c (conflicts_output): Don't output rules never
17062 reduced here, since anyway that computation doesn't work.
17063 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17064 (rule_useless_p, rule_never_reduced_p): New.
17065 (grammar_rules_partial_print): Use a filter instead of a range.
17066 Display the title only if needed.
17067 (grammar_rules_print): Adjust.
17068 (grammar_rules_never_reduced_report): New.
17069 * src/tables.c (action_row): Move the computation of rules never
17070 reduced to...
17071 (token_actions): here.
17072 * src/main.c (main): Make the parser before making the report, so
17073 that rules never reduced are computed.
17074 Call grammar_rules_never_reduced_report.
17075 * src/print.c (print_results): Report rules never reduced.
17076 * tests/conflicts.at, tests/reduce.at: Adjust.
17077
17078 2002-08-01 Akim Demaille <akim@epita.fr>
17079
17080 Instead of attaching lookaheads and duplicating the rules being
17081 reduced by a state, attach the lookaheads to the reductions.
17082
17083 * src/state.h (state_t): Remove the `lookaheads',
17084 `lookaheads_rule' member.
17085 (reductions_t): Add a `lookaheads' member.
17086 Use a regular array for the `rules'.
17087 * src/state.c (reductions_new): Initialize the lookaheads member
17088 to 0.
17089 (state_rule_lookaheads_print): Adjust.
17090 * src/state.h, src/state.c (state_reductions_find): New.
17091 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17092 (count_rr_conflicts): Adjust.
17093 * src/lalr.c (LArule): Remove.
17094 (add_lookback_edge): Adjust.
17095 (state_lookaheads_count): New.
17096 (states_lookaheads_initialize): Merge into...
17097 (initialize_LA): this.
17098 (lalr_free): Adjust.
17099 * src/main.c (main): Don't free nullable and derives too early: it
17100 is used by --verbose.
17101 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17102
17103 2002-08-01 Akim Demaille <akim@epita.fr>
17104
17105 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17106 `rule_number_t**'.
17107 (set_derives, free_derives): Rename as...
17108 (derives_compute, derives_free): this.
17109 Adjust all dependencies.
17110 * src/nullable.c (set_nullable, free_nullable): Rename as...
17111 (nullable_compute, nullable_free): these.
17112 (rule_list_t): Store rule_t *, not rule_number_t.
17113 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17114 pointers, instead of their numbers.
17115 * src/main.c (main): Call nullable_free, and derives_free earlier,
17116 as they were lo longer used.
17117
17118 2002-08-01 Akim Demaille <akim@epita.fr>
17119
17120 * lib/timevar.c (get_time): Include children time.
17121 * src/lalr.h (LA, LArule): Don't export them: used with the
17122 state_t.
17123 * src/lalr.c (LA, LArule): Static.
17124 * src/lalr.h, src/lalr.c (lalr_free): New.
17125 * src/main.c (main): Call it.
17126 * src/tables.c (pack_vector): Check whether loc is >= to the
17127 table_size, not >.
17128 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17129 (tables_generate): do it, since that's also it which allocates
17130 them.
17131 Don't free LA and LArule, main does.
17132
17133 2002-07-31 Akim Demaille <akim@epita.fr>
17134
17135 Separate parser tables computation and output.
17136
17137 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17138 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17139 (yydefgoto, yydefact, high): Move to...
17140 * src/tables.h, src/tables.c: here.
17141 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17142 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17143 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17144 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17145 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17146 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17147 (action_row, save_row, token_actions, save_column, default_goto)
17148 (goto_actions, sort_actions, matching_state, pack_vector)
17149 (table_ninf_remap, pack_table, prepare_actions): Move to...
17150 * src/tables.c: here.
17151 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17152 * src/output.c (token_actions, output_base, output_conflicts)
17153 (output_check): Merge into...
17154 (prepare_actions): this.
17155 (actions_output): Rename as...
17156 (user_actions_output): this.
17157 * src/main.c (main): Call tables_generate and tables_free.
17158
17159 2002-07-31 Akim Demaille <akim@epita.fr>
17160
17161 Steal GCC's --time-report support.
17162
17163 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17164 stolen/adjusted from GCC.
17165 * m4/stage.m4: Remove time related checks.
17166 * m4/timevar.m4: New.
17167 * configure.in: Adjust.
17168 * src/system.h: Adjust to using timevar.h.
17169 * src/getargs.h, src/getargs.c: Support trace_time for
17170 --trace=time.
17171 * src/main.c (stage): Remove.
17172 (main): Replace `stage' invocations with timevar calls.
17173 * src/output.c: Insert pertinent timevar calls.
17174
17175 2002-07-31 Akim Demaille <akim@epita.fr>
17176
17177 Let --trace have arguments.
17178
17179 * src/getargs.h (enum trace_e): New.
17180 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17181 (long_options, short_options): --trace/-T takes an optional
17182 argument.
17183 Change all the uses of trace_flag to reflect the new flags.
17184 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17185
17186 Strengthen `stage' portability.
17187
17188 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17189 * configure.in: Use it.
17190 Don't check for malloc.h and sys/times.h.
17191 * src/system.h: Include them when appropriate.
17192 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17193 times and struct tms are available.
17194
17195 2002-07-30 Akim Demaille <akim@epita.fr>
17196
17197 In verbose parse error message, don't report `error' as an
17198 expected token.
17199 * tests/actions.at (Printers and Destructors): Adjust.
17200 * tests/calc.at (Calculator $1): Adjust.
17201 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17202 error message, do not report the parser accepts the error token in
17203 that state.
17204
17205 2002-07-30 Akim Demaille <akim@epita.fr>
17206
17207 Normalize conflict related messages.
17208
17209 * src/complain.h, src/complain.c (warn, complain): New.
17210 * src/conflicts.c (conflicts_print): Use them.
17211 (conflict_report_yacc): New, extracted from...
17212 (conflicts_print): here.
17213 * tests/conflicts.at, tests/existing.at: Adjust.
17214
17215 2002-07-30 Akim Demaille <akim@epita.fr>
17216
17217 Report rules which are never reduced by the parser: those hidden
17218 by conflicts.
17219
17220 * src/LR0.c (save_reductions): Don't make the final state too
17221 different: save its reduction (accept) instead of having a state
17222 without any action (no shift or goto, no reduce).
17223 Note: the final state is now a ``regular'' state, i.e., the
17224 parsers now contain `reduce 0' as default reduction.
17225 Nevertheless, since they decide to `accept' when yystate =
17226 final_state, they still will not reduce rule 0.
17227 * src/print.c (print_actions, print_reduction): Adjust.
17228 * src/output.c (action_row): Track reduced rules.
17229 (token_actions): Report rules never reduced.
17230 * tests/conflicts.at, tests/regression.at: Adjust.
17231
17232 2002-07-30 Akim Demaille <akim@epita.fr>
17233
17234 `stage' was accidently included in a previous patch.
17235 Initiate its autoconfiscation.
17236
17237 * configure.in: Look for malloc.h and sys/times.h.
17238 * src/main.c (stage): Adjust.
17239 Report only when trace_flag.
17240
17241 2002-07-29 Akim Demaille <akim@epita.fr>
17242
17243 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17244 state_number_t.
17245 (errs_t): symbol_t*, not symbol_number_t.
17246 (reductions_t): rule_t*, not rule_number_t.
17247 (FOR_EACH_SHIFT): New.
17248 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17249 * src/print.c, src/print_graph.c: Adjust.
17250
17251 2002-07-29 Akim Demaille <akim@epita.fr>
17252
17253 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17254
17255 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17256 (endtoken, accept): these.
17257 * src/reader.c (reader): Set endtoken's default tag to "$end".
17258 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17259 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17260 Adjust.
17261
17262 2002-07-29 Akim Demaille <akim@epita.fr>
17263
17264 * src/reduce.c (reduce_grammar): When the language is empty,
17265 complain about the start symbol, not the axiom.
17266 Use its location.
17267 * tests/reduce.at (Empty Language): New.
17268
17269 2002-07-26 Akim Demaille <akim@epita.fr>
17270
17271 * src/reader.h, src/reader.c (gram_error): ... can't get
17272 yycontrol without making too strong assumptions on the parser
17273 itself.
17274 * src/output.c (prepare_tokens): Use the real 0th value of
17275 token_translations instead of `0'.
17276 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17277 visible here.
17278 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17279 for the time being: %locations ought to provide it to yyerror.
17280
17281 2002-07-25 Akim Demaille <akim@epita.fr>
17282
17283 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17284 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17285 * tests/regression.at (Web2c Actions): Adjust.
17286
17287 2002-07-25 Akim Demaille <akim@epita.fr>
17288
17289 Stop storing rules from 1 to nrules + 1.
17290
17291 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17292 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17293 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17294 Iterate from 0 to nrules.
17295 Use rule_number_as_item_number and item_number_as_rule_number.
17296 Adjust to `derive' now containing possibly 0.
17297 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17298 Handle the `- 1' part in rule numbers from/to item numbers.
17299 * src/conflicts.c (log_resolution): Fix the message which reversed
17300 shift and reduce.
17301 * src/output.c (action_row): Initialize default_rule to -1.
17302 (token_actions): Adjust.
17303 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17304 expected output.
17305 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17306
17307 2002-07-25 Akim Demaille <akim@epita.fr>
17308
17309 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17310 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17311 (b4_c_knr_arg_decl): New.
17312 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17313 yyreport_parse_error.
17314
17315 2002-07-25 Akim Demaille <akim@epita.fr>
17316
17317 * data/yacc.c (yyreport_parse_error): New, extracted from...
17318 (yyparse): here.
17319 (yydestruct, yysymprint): Move above yyparse.
17320 Be K&R compliant.
17321
17322 2002-07-25 Akim Demaille <akim@epita.fr>
17323
17324 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17325 replace...
17326 (b4_sint_type, b4_uint_type): these.
17327 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17328 * tests/regression.at (Web2c Actions): Adjust.
17329
17330 2002-07-25 Akim Demaille <akim@epita.fr>
17331
17332 * src/gram.h (TIEM_NUMBER_MAX): New.
17333 (item_number_of_rule_number, rule_number_of_item_number): Rename
17334 as...
17335 (rule_number_as_item_number, item_number_as_rule_number): these.
17336 Adjust dependencies.
17337 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17338 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17339 (symbol_number_to_vector_number): New.
17340 (order): Of vector_number_t* type.
17341 (base_t, BASE_MAX, BASE_MIN): New.
17342 (froms, tos, width, pos, check): Of base_t type.
17343 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17344 (actrow): Of action_number_t type.
17345 (conflrow): Of unsigned int type.
17346 (table_ninf, base_ninf): New.
17347 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17348 (muscle_insert_int_table, muscle_insert_base_table)
17349 (muscle_insert_rule_number_table): New.
17350 (prepare_tokens): Output `toknum' as int_table.
17351 (action_row): Returns a rule_number_t.
17352 Use ACTION_MIN, not SHRT_MIN.
17353 (token_actions): yydefact is rule_number_t*.
17354 (table_ninf_remap): New.
17355 (pack_table): Use it for `base' and `table'.
17356 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17357 replaced with...
17358 (YYPACT_NINF, YYTABLE_NINF): these.
17359 (yypact, yytable): Compute their types instead of hard-coded
17360 `short'.
17361 * tests/regression.at (Web2c Actions): Adjust.
17362
17363 2002-07-19 Akim Demaille <akim@epita.fr>
17364
17365 * src/scan-gram.l (id): Can start with an underscore.
17366
17367 2002-07-16 Akim Demaille <akim@epita.fr>
17368
17369 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17370 Adjust all former `associativity' dependencies.
17371 * src/symtab.c (symbol_new): Default associativity is `undef', not
17372 `right'.
17373 (symbol_check_alias_consistence): Adjust.
17374
17375 2002-07-09 Akim Demaille <akim@epita.fr>
17376
17377 * doc/bison.texinfo: Properly set the ``header'' part.
17378 Use @dircategory ``GNU programming tools'' as per Texinfo's
17379 documentation.
17380 Use @copying.
17381
17382 2002-07-09 Akim Demaille <akim@epita.fr>
17383
17384 * lib/quotearg.h: Protect against multiple inclusions.
17385 * src/location.h (location_t): Add a `file' member.
17386 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17387 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17388 `error_one_per_line' support.
17389
17390 2002-07-09 Akim Demaille <akim@epita.fr>
17391
17392 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17393 * src/reader.c (lineno): Remove.
17394 Adjust all dependencies.
17395 (get_merge_function): Take a location and use complain_at.
17396 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17397 * tests/regression.at (Invalid inputs, Mixing %token styles):
17398 Adjust.
17399
17400 2002-07-09 Akim Demaille <akim@epita.fr>
17401
17402 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
17403 recovery rule, and forbid extensions when --yacc.
17404 (gram_error): Use complain_at.
17405 * src/reader.c (reader): Exit if there were parse errors.
17406
17407 2002-07-09 Akim Demaille <akim@epita.fr>
17408
17409 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
17410 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
17411 Reported by R Blake <blakers@mac.com>.
17412
17413 2002-07-09 Akim Demaille <akim@epita.fr>
17414
17415 * data/yacc.c: Output the copyright notive in the header.
17416
17417 2002-07-03 Akim Demaille <akim@epita.fr>
17418
17419 * src/output.c (froms, tos): Are state_number_t.
17420 (save_column): sp, sp1, and sp2 are state_number_t.
17421 (prepare): Rename `final' as `final_state_number', `nnts' as
17422 `nterms_number', `nrules' as `rules_number', `nstates' as
17423 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
17424 unused.
17425 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
17426 * data/lalr1.cc (nsym_): Remove, unused.
17427
17428 2002-07-03 Akim Demaille <akim@epita.fr>
17429
17430 * src/lalr.h, src/lalr.c (goto_number_t): New.
17431 * src/lalr.c (goto_list_t): New.
17432 Propagate them.
17433 * src/nullable.c (rule_list_t): New.
17434 Propagate.
17435 * src/types.h: Remove.
17436
17437 2002-07-03 Akim Demaille <akim@epita.fr>
17438
17439 * src/closure.c (print_fderives): Use rule_rhs_print.
17440 * src/derives.c (print_derives): Use rule_rhs_print.
17441 (rule_list_t): New, replaces `shorts'.
17442 (set_derives): Add comments.
17443 * tests/sets.at (Nullable, Firsts): Adjust.
17444
17445 2002-07-03 Akim Demaille <akim@epita.fr>
17446
17447 * src/output.c (prepare_actions): Free `tally' and `width'.
17448 (prepare_actions): Allocate and free `order'.
17449 * src/symtab.c (symbols_free): Free `symbols'.
17450 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
17451 * src/output.c (m4_invoke): Move to...
17452 * src/scan-skel.l: here.
17453 (<<EOF>>): Close yyout, and free its name.
17454
17455 2002-07-03 Akim Demaille <akim@epita.fr>
17456
17457 Fix some memory leaks, and fix a bug: state 0 was examined twice.
17458
17459 * src/LR0.c (new_state): Merge into...
17460 (state_list_append): this.
17461 (new_states): Merge into...
17462 (generate_states): here.
17463 (set_states): Don't ensure a proper `errs' state member here, do it...
17464 * src/conflicts.c (conflicts_solve): here.
17465 * src/state.h, src/state.c: Comment changes.
17466 (state_t): Rename member `shifts' as `transitions'.
17467 Adjust all dependencies.
17468 (errs_new): For consistency, also take the values as argument.
17469 (errs_dup): Remove.
17470 (state_errs_set): New.
17471 (state_reductions_set, state_transitions_set): Assert that no
17472 previous value was assigned.
17473 (state_free): New.
17474 (states_free): Use it.
17475 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
17476 temporary storage: use `errs' and `nerrs' as elsewhere.
17477 (set_conflicts): Allocate and free this `errs'.
17478
17479 2002-07-02 Akim Demaille <akim@epita.fr>
17480
17481 * lib/libiberty.h: New.
17482 * lib: Update the bitset implementation from upstream.
17483 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
17484 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
17485 * src/main.c: Adjust bitset stats calls.
17486
17487 2002-07-01 Paul Eggert <eggert@twinsun.com>
17488
17489 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
17490 char, so that negative chars don't collide with $.
17491
17492 2002-06-30 Akim Demaille <akim@epita.fr>
17493
17494 Have the GLR tests be `warning' checked, and fix the warnings.
17495
17496 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
17497 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
17498 (yyremoveDeletes): `yyi' and `yyj' are size_t.
17499 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
17500 (yyaddDeferredAction): static.
17501 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
17502 (yyreportParseError): yyprefix is const.
17503 yytokenp is used only when verbose.
17504 (yy__GNUC__): Replace with __GNUC__.
17505 (yypdumpstack): yyi is size_t.
17506 (yypreference): Un-yy local variables and arguments, to avoid
17507 clashes with `yyr1'. Anyway, we are not in the user name space.
17508 (yytname_size): be an int, as is compared with ints.
17509 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
17510 Use them.
17511 * tests/cxx-gram.at: Use quotation to protect $1.
17512 Use AT_COMPILE to enable warnings hunts.
17513 Prototype yylex and yyerror.
17514 `Use' argc.
17515 Include `string.h', not `strings.h'.
17516 Produce and prototype stmtMerge only when used.
17517 yylex takes a location.
17518
17519 2002-06-30 Akim Demaille <akim@epita.fr>
17520
17521 We spend a lot of time in quotearg, in particular when --verbose.
17522
17523 * src/symtab.c (symbol_get): Store a quoted version of the key.
17524 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
17525 Adjust all callers.
17526
17527 2002-06-30 Akim Demaille <akim@epita.fr>
17528
17529 * src/state.h (reductions_t): Rename member `nreds' as num.
17530 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
17531 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
17532
17533 2002-06-30 Akim Demaille <akim@epita.fr>
17534
17535 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
17536 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
17537 (shifts_to): Rename as...
17538 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
17539 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
17540 (TRANSITION_IS_DISABLED, transitions_to): these.
17541
17542 2002-06-30 Akim Demaille <akim@epita.fr>
17543
17544 * src/print.c (print_shifts, print_gotos): Merge into...
17545 (print_transitions): this.
17546 (print_transitions, print_errs, print_reductions): Align the
17547 lookaheads columns.
17548 (print_core, print_transitions, print_errs, print_state,
17549 print_grammar): Output empty lines separator before, not after.
17550 (state_default_rule_compute): Rename as...
17551 (state_default_rule): this.
17552 * tests/conflicts.at (Defaulted Conflicted Reduction),
17553 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
17554 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
17555
17556 2002-06-30 Akim Demaille <akim@epita.fr>
17557
17558 Display items as we display rules.
17559
17560 * src/gram.h, src/gram.c (rule_lhs_print): New.
17561 * src/gram.c (grammar_rules_partial_print): Use it.
17562 * src/print.c (print_core): Likewise.
17563 * tests/conflicts.at (Defaulted Conflicted Reduction),
17564 (Unresolved SR Conflicts): Adjust.
17565 (Unresolved SR Conflicts): Adjust and rename as...
17566 (Resolved SR Conflicts): this, as was meant.
17567 * tests/regression.at (Web2c Report): Adjust.
17568
17569 2002-06-30 Akim Demaille <akim@epita.fr>
17570
17571 * src/print.c (state_default_rule_compute): New, extracted from...
17572 (print_reductions): here.
17573 Pessimize, but clarify the code.
17574 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
17575
17576 2002-06-30 Akim Demaille <akim@epita.fr>
17577
17578 * src/output.c (action_row): Let default_rule be always a rule
17579 number.
17580
17581 2002-06-30 Akim Demaille <akim@epita.fr>
17582
17583 * src/closure.c (print_firsts, print_fderives, closure):
17584 Use BITSET_EXECUTE.
17585 * src/lalr.c (lookaheads_print): Likewise.
17586 * src/state.c (state_rule_lookaheads_print): Likewise.
17587 * src/print_graph.c (print_core): Likewise.
17588 * src/print.c (print_reductions): Likewise.
17589 * src/output.c (action_row): Likewise.
17590 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
17591
17592 2002-06-30 Akim Demaille <akim@epita.fr>
17593
17594 * src/print_graph.c: Use report_flag.
17595
17596 2002-06-30 Akim Demaille <akim@epita.fr>
17597
17598 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
17599 to...
17600 * src/relation.h, src/relation.c (traverse, relation_digraph)
17601 (relation_print, relation_transpose): New.
17602
17603 2002-06-30 Akim Demaille <akim@epita.fr>
17604
17605 * src/state.h, src/state.c (shifts_to): New.
17606 * src/lalr.c (build_relations): Use it.
17607
17608 2002-06-30 Akim Demaille <akim@epita.fr>
17609
17610 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
17611 (item_number_of_rule_number, rule_number_of_item_number): New.
17612 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
17613 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17614 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
17615 Propagate their use.
17616 Much remains to be done, in particular wrt `shorts' from types.h.
17617
17618 2002-06-30 Akim Demaille <akim@epita.fr>
17619
17620 * src/symtab.c (symbol_new): Initialize the `printer' member.
17621
17622 2002-06-30 Akim Demaille <akim@epita.fr>
17623
17624 * src/LR0.c (save_reductions): Remove, replaced by...
17625 * src/state.h, src/state.c (state_reductions_set): New.
17626 (reductions, errs): Rename as...
17627 (reductions_t, errs_t): these.
17628 Adjust all dependencies.
17629
17630 2002-06-30 Akim Demaille <akim@epita.fr>
17631
17632 * src/LR0.c (state_list_t, state_list_append): New.
17633 (first_state, last_state): Now symbol_list_t.
17634 (this_state): Remove.
17635 (new_itemsets, append_states, save_reductions): Take a state_t as
17636 argument.
17637 (set_states, generate_states): Adjust.
17638 (save_shifts): Remove, replaced by...
17639 * src/state.h, src/state.c (state_shifts_set): New.
17640 (shifts): Rename as...
17641 (shifts_t): this.
17642 Adjust all dependencies.
17643 * src/state.h (state_t): Remove the `next' member.
17644
17645 2002-06-30 Akim Demaille <akim@epita.fr>
17646
17647 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
17648 escaped in slot 0.
17649
17650 2002-06-30 Akim Demaille <akim@epita.fr>
17651
17652 Use hash.h for the state hash table.
17653
17654 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
17655 (allocate_storage): Use state_hash_new.
17656 (free_storage): Use state_hash_free.
17657 (new_state, get_state): Adjust.
17658 * src/lalr.h, src/lalr.c (states): Move to...
17659 * src/states.h (state_t): Remove the `link' member, no longer
17660 used.
17661 * src/states.h, src/states.c: here.
17662 (state_hash_new, state_hash_free, state_hash_lookup)
17663 (state_hash_insert, states_free): New.
17664 * src/states.c (state_table, state_compare, state_hash): New.
17665 * src/output.c (output_actions): Do not free states now, since we
17666 still need to know the final_state number in `prepare', called
17667 afterwards. Do it...
17668 * src/main.c (main): here: call states_free after `output'.
17669
17670 2002-06-30 Akim Demaille <akim@epita.fr>
17671
17672 * src/state.h, src/state.c (state_new): New, extracted from...
17673 * src/LR0.c (new_state): here.
17674 * src/state.h (STATE_ALLOC): Move to...
17675 * src/state.c: here.
17676 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
17677 * src/state.h, src/state.c: here.
17678
17679 2002-06-30 Akim Demaille <akim@epita.fr>
17680
17681 * src/reader.c (gensym): Rename as...
17682 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
17683 (getsym): Rename as...
17684 (symbol_get): this.
17685
17686 2002-06-30 Akim Demaille <akim@epita.fr>
17687
17688 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
17689 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
17690 * src/output.c, src/print.c, src/print_graph.c: Propagate.
17691 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
17692
17693 2002-06-30 Akim Demaille <akim@epita.fr>
17694
17695 Make the test suite pass with warnings checked.
17696
17697 * tests/actions.at (Printers and Destructors): Improve.
17698 Avoid unsigned vs. signed issues.
17699 * tests/calc.at: Don't exercise the scanner here, do it...
17700 * tests/input.at (Torturing the Scanner): here.
17701
17702 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17703
17704 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
17705 reorganize first lines parallel to yacc.c.
17706
17707 2002-06-28 Akim Demaille <akim@epita.fr>
17708
17709 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
17710 (b4_token_enum, b4_token_defines): New, factored from...
17711 * data/lalr1.cc, data/yacc.c, glr.c: here.
17712
17713 2002-06-28 Akim Demaille <akim@epita.fr>
17714
17715 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
17716 unused variables.
17717 * src/output.c (merger_output): static.
17718
17719 2002-06-28 Akim Demaille <akim@epita.fr>
17720
17721 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
17722 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
17723 pacify GCC.
17724 * src/output.c (save_row): Initialize all the variables to pacify GCC.
17725
17726 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17727
17728 Accumulated changelog for new GLR parsing features.
17729
17730 * src/conflicts.c (count_total_conflicts): Change name to
17731 conflicts_total_count.
17732 * src/conflicts.h: Ditto.
17733 * src/output.c (token_actions): Use the new name.
17734 (output_conflicts): Change conflp => conflict_list_heads, and
17735 confl => conflict_list for better readability.
17736 * data/glr.c: Use the new names.
17737 * NEWS: Add self to GLR announcement.
17738
17739 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
17740
17741 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
17742 Akim Demaille.
17743
17744 * data/bison.glr: Change name to glr.c
17745 * data/glr.c: Renamed from bison.glr.
17746 * data/Makefile.am: Add glr.c
17747
17748 * src/getargs.c:
17749
17750 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
17751 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
17752
17753 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17754
17755 * data/bison.glr: Be sure to restore the
17756 current #line when returning to the skeleton contents after having
17757 exposed the input file's #line.
17758
17759 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17760
17761 * data/bison.glr: Bring up to date with changes to bison.simple.
17762
17763 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17764
17765 * data/bison.glr: Correct definitions that use b4_prefix.
17766 Various reformatting.
17767 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
17768 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
17769 yytokenp argument; now part of stack.
17770 (yychar): Define to behave as documented.
17771 (yyclearin): Ditto.
17772
17773 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17774
17775 * src/reader.h: Add declaration for free_merger_functions.
17776
17777 * src/reader.c (merge_functions): New variable.
17778 (get_merge_function): New function.
17779 (free_merger_functions): New function.
17780 (readgram): Check for %prec that is not followed by a symbol.
17781 Handle %dprec and %merge declarations.
17782 (packgram): Initialize dprec and merger fields in rules array.
17783
17784 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
17785 conflict_list_cnt, conflict_list_free): New variables.
17786 (table_grow): Also grow conflict_table.
17787 (prepare_rules): Output dprec and merger tables.
17788 (conflict_row): New function.
17789 (action_row): Output conflict lists for GLR parser. Don't use
17790 default reduction in conflicted states for GLR parser so that there
17791 are spaces for the conflict lists.
17792 (save_row): Also save conflict information.
17793 (token_actions): Allocate conflict list.
17794 (merger_output): New function.
17795 (pack_vector): Pack conflict table, too.
17796 (output_conflicts): New function to output yyconflp and yyconfl.
17797 (output_check): Allocate conflict_tos.
17798 (output_actions): Output conflict tables, also.
17799 (output_skeleton): Output b4_mergers definition.
17800 (prepare): Output b4_max_rhs_length definition.
17801 Use 'bison.glr' as default skeleton for GLR parsers.
17802
17803 * src/gram.c (glr_parser): New flag.
17804 (grammar_free): Call free_merger_functions.
17805
17806 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
17807 all pairs of conflicting reductions, rather than just all tokens
17808 causing conflicts. Needed to size conflict tables.
17809 (conflicts_output): Modify call to count_rr_conflicts for new
17810 interface.
17811 (conflicts_print): Ditto.
17812 (count_total_conflicts): New function.
17813
17814 * src/reader.h (merger_list): New type.
17815 (merge_functions): New variable.
17816
17817 * src/lex.h (tok_dprec, tok_merge): New token types.
17818
17819 * src/gram.h (rule_s): Add dprec and merger fields.
17820 (glr_parser): New flag.
17821
17822 * src/conflicts.h (count_total_conflicts): New function.
17823
17824 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
17825
17826 * doc/bison.texinfo (Generalized LR Parsing): New section.
17827 (GLR Parsers): New section.
17828 (Language and Grammar): Mention GLR parsing.
17829 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
17830 Correct typo ("tge" -> "the").
17831
17832 * data/bison.glr: New skeleton for GLR parsing.
17833
17834 * tests/cxx-gram.at: New tests for GLR parsing.
17835
17836 * tests/testsuite.at: Include cxx-gram.at.
17837
17838 * tests/Makefile.am: Add cxx-gram.at.
17839
17840 * src/parse-gram.y:
17841
17842 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
17843
17844 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
17845
17846 2002-06-27 Akim Demaille <akim@epita.fr>
17847
17848 * src/options.h, src/options.c: Remove.
17849 * src/getargs.c (short_options, long_options): New.
17850
17851 2002-06-27 Akim Demaille <akim@epita.fr>
17852
17853 * data/bison.simple, data/bison.c++: Rename as...
17854 * data/yacc.c, data/lalr1.cc: these.
17855 * doc/bison.texinfo (Environment Variables): Remove.
17856
17857 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
17858
17859 * src/getargs.c (report_argmatch): Initialize strtok().
17860
17861 2002-06-20 Akim Demaille <akim@epita.fr>
17862
17863 * data/bison.simple (b4_symbol_actions): New, replaces...
17864 (b4_symbol_destructor, b4_symbol_printer): these.
17865 (yysymprint): Be sure to call YYPRINT only for tokens, and using
17866 user token numbers.
17867
17868 2002-06-20 Akim Demaille <akim@epita.fr>
17869
17870 * data/bison.simple (yydestructor): Rename as...
17871 (yydestruct): this.
17872
17873 2002-06-20 Akim Demaille <akim@epita.fr>
17874
17875 * src/symtab.h, src/symtab.c (symbol_type_set)
17876 (symbol_destructor_set, symbol_precedence_set): The location is
17877 the last argument.
17878 Adjust all callers.
17879
17880 2002-06-20 Akim Demaille <akim@epita.fr>
17881
17882 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17883 internals.
17884 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17885 Takes a location.
17886 * src/symtab.h, src/symtab.c (symbol_class_set)
17887 (symbol_user_token_number_set): Likewise.
17888 Adjust all callers.
17889 Promote complain_at.
17890 * tests/input.at (Type Clashes): Adjust.
17891
17892 2002-06-20 Akim Demaille <akim@epita.fr>
17893
17894 * data/bison.simple (YYLEX): Fix the declaration when
17895 %pure-parser.
17896
17897 2002-06-20 Akim Demaille <akim@epita.fr>
17898
17899 * data/bison.simple (yysymprint): Don't print the token number,
17900 just its name.
17901 * tests/actions.at (Destructors): Rename as...
17902 (Printers and Destructors): this.
17903 Also exercise %printer.
17904
17905 2002-06-20 Akim Demaille <akim@epita.fr>
17906
17907 * data/bison.simple (YYDSYMPRINT): New.
17908 Use it to remove many of the #if YYDEBUG/if (yydebug).
17909
17910 2002-06-20 Akim Demaille <akim@epita.fr>
17911
17912 * src/symtab.h, src/symtab.c (symbol_t): printer and
17913 printer_location are new members.
17914 (symbol_printer_set): New.
17915 * src/parse-gram.y (PERCENT_PRINTER): New token.
17916 Handle its associated rule.
17917 * src/scan-gram.l: Adjust.
17918 (handle_destructor_at, handle_destructor_dollar): Rename as...
17919 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17920 * src/output.c (symbol_printers_output): New.
17921 (output_skeleton): Call it.
17922 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17923 since there are already many grammar files with a user `yyprint'.
17924 Replace the calls to YYPRINT to calls to yysymprint.
17925 * tests/calc.at: Adjust.
17926 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17927 taking advantage of parser very internal details (stack size!).
17928
17929 2002-06-20 Akim Demaille <akim@epita.fr>
17930
17931 * src/scan-gram.l: Complete the scanner with the missing patterns
17932 to pacify Flex.
17933 Use `quote' and `symbol_tag_get' where appropriate.
17934
17935 2002-06-19 Akim Demaille <akim@epita.fr>
17936
17937 * tests/actions.at (Destructors): Augment to test locations.
17938 * data/bison.simple (yydestructor): Pass it the current location
17939 if locations are enabled.
17940 Prototype only when __STDC__ or C++.
17941 Change the argument names to move into the yy name space: there is
17942 user code here.
17943
17944 2002-06-19 Akim Demaille <akim@epita.fr>
17945
17946 * data/bison.simple (b4_pure_if): New.
17947 Use it instead of #ifdef YYPURE.
17948
17949 2002-06-19 Akim Demaille <akim@epita.fr>
17950
17951 * data/bison.simple (b4_location_if): New.
17952 Use it instead of #ifdef YYLSP_NEEDED.
17953
17954 2002-06-19 Akim Demaille <akim@epita.fr>
17955
17956 Prepare @$ in %destructor, but currently don't bind it in the
17957 skeleton, as %location use is not cleaned up yet.
17958
17959 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17960 (handle_action_at): New.
17961 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17962 a braced_code_t and a location as additional arguments.
17963 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17964 unquote one when outputting `b4_dollar_dollar'.
17965 Adjust callers.
17966 * data/bison.simple (b4_eval): Remove.
17967 (b4_symbol_destructor): Adjust.
17968 * tests/input.at (Invalid @n): Adjust.
17969
17970 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17971
17972 * doc/bison.texinfo: Document ability to have multiple
17973 prologue sections.
17974
17975 2002-06-18 Akim Demaille <akim@epita.fr>
17976
17977 * src/files.c (compute_base_names): When computing the output file
17978 names from the input file name, strip the directory part.
17979
17980 2002-06-18 Akim Demaille <akim@epita.fr>
17981
17982 * data/bison.simple.new: Comment changes.
17983 Reported by Andreas Schwab.
17984
17985 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17986
17987 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17988 there are no `label `yyoverflowlab' defined but not used' warnings
17989 when yyoverflow is defined.
17990
17991 2002-06-18 Akim Demaille <akim@epita.fr>
17992
17993 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17994 new member.
17995 (symbol_destructor_set): Adjust.
17996 * src/output.c (symbol_destructors_output): Output the destructor
17997 locations.
17998 Output the symbol name.
17999 * data/bison.simple (b4_symbol_destructor): Adjust.
18000
18001 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18002 and Akim Demaille <akim@epita.fr>
18003
18004 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18005 what's left on the stack when the error recovery hits EOF.
18006 * tests/actions.at (Destructors): Complete to exercise this case.
18007
18008 2002-06-17 Akim Demaille <akim@epita.fr>
18009
18010 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18011 arguments is really empty, not only equal to `[]'.
18012 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18013 member.
18014 (symbol_destructor_set): New.
18015 * src/output.c (symbol_destructors_output): New.
18016 * src/reader.h (brace_code_t, current_braced_code): New.
18017 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18018 (handle_dollar): Rename as...
18019 (handle_action_dollar): this.
18020 (handle_destructor_dollar): New.
18021 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18022 (grammar_declaration): Use it.
18023 * data/bison.simple (yystos): Is always defined.
18024 (yydestructor): New.
18025 * tests/actions.at (Destructors): New.
18026 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18027
18028 2002-06-17 Akim Demaille <akim@epita.fr>
18029
18030 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18031 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18032 rule_length only when needed.
18033 * src/output.c (actions_output, token_definitions_output): Output
18034 the full M4 block.
18035 * src/symtab.c: Don't access directly to the symbol tag, use
18036 symbol_tag_get.
18037 * src/parse-gram.y: Use symbol_list_free.
18038
18039 2002-06-17 Akim Demaille <akim@epita.fr>
18040
18041 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18042 (symbol_list_prepend, get_type_name): Move to...
18043 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18044 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18045 Adjust all callers.
18046 (symbol_list_free): New.
18047 * src/scan-gram.l (handle_dollar): Takes a location.
18048 * tests/input.at (Invalid $n): Adjust.
18049
18050 2002-06-17 Akim Demaille <akim@epita.fr>
18051
18052 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18053 (symbol_list_prepend): New.
18054 * src/parse-gram.y (%union): `list' is a new member.
18055 (symbols.1): New, replaces...
18056 (terms_to_prec.1, nterms_to_type.1): these.
18057 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18058 Take a location as additional argument.
18059 Adjust all callers.
18060
18061 2002-06-15 Akim Demaille <akim@epita.fr>
18062
18063 * src/parse-gram.y: Move %token in the declaration section so that
18064 we don't depend upon CVS Bison.
18065
18066 2002-06-15 Akim Demaille <akim@epita.fr>
18067
18068 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18069 * src/print.c (print_core): Use it.
18070
18071 2002-06-15 Akim Demaille <akim@epita.fr>
18072
18073 * src/conflicts.c (log_resolution): Accept the rule involved in
18074 the sr conflicts instead of the lookahead number that points to
18075 that rule.
18076 (flush_reduce): Accept the current lookahead vector as argument,
18077 instead of the index in LA.
18078 (resolve_sr_conflict): Accept the current number of lookahead
18079 bitset to consider for the STATE, instead of the index in LA.
18080 (set_conflicts): Adjust.
18081 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18082
18083 2002-06-15 Akim Demaille <akim@epita.fr>
18084
18085 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18086 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18087 Adjust all dependencies.
18088 * src/lalr.c (initialize_lookaheads): Split into...
18089 (states_lookaheads_count, states_lookaheads_initialize): these.
18090 (lalr): Adjust.
18091
18092 2002-06-15 Akim Demaille <akim@epita.fr>
18093
18094 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18095 out of...
18096 (grammar_rules_print): here.
18097 * src/reduce.c (reduce_output): Use it.
18098 * tests/reduce.at (Useless Rules, Reduced Automaton)
18099 (Underivable Rules): Adjust.
18100
18101 2002-06-15 Akim Demaille <akim@epita.fr>
18102
18103 Copy BYacc's nice way to report the grammar.
18104
18105 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18106 New.
18107 Don't print the rules' location, it is confusing and useless.
18108 (rule_print): Use grammar_rhs_print.
18109 * src/print.c (print_grammar): Use grammar_rules_print.
18110
18111 2002-06-15 Akim Demaille <akim@epita.fr>
18112
18113 Complete and rationalize `useless thing' warnings.
18114
18115 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18116 (symbol_tag_print): New.
18117 Use them everywhere in place of accessing directly the tag member.
18118 * src/gram.h, src/gram.c (rule_print): New.
18119 Use it where a rule used to be printed `by hand'.
18120 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18121 (reduce_grammar_tables): Report the useless rules.
18122 (reduce_print): Useless things are a warning, not an error.
18123 Report it as such.
18124 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18125 (Reduced Automaton, Underivable Rules): Adjust.
18126 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18127 * tests/conflicts.at (Unresolved SR Conflicts)
18128 (Solved SR Conflicts): Adjust.
18129
18130 2002-06-15 Akim Demaille <akim@epita.fr>
18131
18132 Let symbols have a location.
18133
18134 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18135 (getsym): Adjust.
18136 Adjust all callers.
18137 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18138 Use location_t, not int.
18139 * src/symtab.c (symbol_check_defined): Take advantage of the
18140 location.
18141 * tests/regression.at (Invalid inputs): Adjust.
18142
18143 2002-06-15 Akim Demaille <akim@epita.fr>
18144
18145 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18146 (input): Don't try to initialize yylloc here, do it in the
18147 scanner.
18148 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18149 * src/gram.h (rule_t): Change line and action_line into location
18150 and action_location, of location_t type.
18151 Adjust all dependencies.
18152 * src/location.h, src/location.c (empty_location): New.
18153 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18154 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18155 (grammar_current_rule_symbol_append)
18156 (grammar_current_rule_action_append): Expect a location as argument.
18157 * src/reader.c (grammar_midrule_action): Adjust to attach an
18158 action's location as dummy symbol location.
18159 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18160 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18161 the line numbers.
18162
18163 2002-06-14 Akim Demaille <akim@epita.fr>
18164
18165 Grammar declarations may be found in the grammar section.
18166
18167 * src/parse-gram.y (rules_or_grammar_declaration): New.
18168 (declarations): Each declaration may end with a semicolon, not
18169 just...
18170 (grammar_declaration): `"%union"'.
18171 (grammar): Branch to rules_or_grammar_declaration.
18172
18173 2002-06-14 Akim Demaille <akim@epita.fr>
18174
18175 * src/main.c (main): Invoke scanner_free.
18176
18177 2002-06-14 Akim Demaille <akim@epita.fr>
18178
18179 * src/output.c (m4_invoke): Extracted from...
18180 (output_skeleton): here.
18181 Free tempfile.
18182
18183 2002-06-14 Akim Demaille <akim@epita.fr>
18184
18185 * src/parse-gram.y (directives, directive, gram)
18186 (grammar_directives, precedence_directives, precedence_directive):
18187 Rename as...
18188 (declarations, declaration, grammar, grammar_declaration)
18189 (precedence_declaration, precedence_declarator): these.
18190 (symbol_declaration): New.
18191
18192 2002-06-14 Akim Demaille <akim@epita.fr>
18193
18194 * src/files.c (action_obstack): Remove, unused.
18195 (output_obstack): Remove it, and all its dependencies, as it is no
18196 longer needed.
18197 * src/reader.c (epilogue_set): Build the epilogue in the
18198 muscle_obstack.
18199 * src/output.h, src/output.c (muscle_obstack): Move to...
18200 * src/muscle_tab.h, src/muscle_tab.h: here.
18201 (muscle_init): Initialize muscle_obstack.
18202 (muscle_free): New.
18203 * src/main.c (main): Call it.
18204
18205 2002-06-14 Akim Demaille <akim@epita.fr>
18206
18207 * src/location.h: New, extracted from...
18208 * src/reader.h: here.
18209 * src/Makefile.am (noinst_HEADERS): Merge into
18210 (bison_SOURCES): this.
18211 Add location.h.
18212 * src/parse-gram.y: Use location_t instead of Bison's.
18213 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18214 Use location_t instead of ints.
18215
18216 2002-06-14 Akim Demaille <akim@epita.fr>
18217
18218 * data/bison.simple, data/bison.c++: Be sure to restore the
18219 current #line when returning to the skeleton contents after having
18220 exposed the input file's #line.
18221
18222 2002-06-12 Akim Demaille <akim@epita.fr>
18223
18224 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18225 eager.
18226 * tests/actions.at (Exotic Dollars): New.
18227
18228 2002-06-12 Akim Demaille <akim@epita.fr>
18229
18230 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18231 ['"/] too eagerly.
18232 * tests/input.at (Torturing the Scanner): New.
18233
18234 2002-06-11 Akim Demaille <akim@epita.fr>
18235
18236 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18237 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18238 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18239 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18240 * src/reader.c (reader): Use it.
18241
18242 2002-06-11 Akim Demaille <akim@epita.fr>
18243
18244 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18245 Adjust all callers.
18246 (scanner_last_string_free): New.
18247
18248 2002-06-11 Akim Demaille <akim@epita.fr>
18249
18250 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18251 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18252 (last_string, YY_OBS_FREE): New.
18253 Use them when returning an ID.
18254
18255 2002-06-11 Akim Demaille <akim@epita.fr>
18256
18257 Have Bison grammars parsed by a Bison grammar.
18258
18259 * src/reader.c, src/reader.h (prologue_augment): New.
18260 * src/reader.c (copy_definition): Remove.
18261
18262 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18263 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18264 (grammar_current_rule_prec_set, grammar_current_rule_check)
18265 (grammar_current_rule_symbol_append)
18266 (grammar_current_rule_action_append): Export.
18267 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18268 (symbol_list_action_append): Remove.
18269 Hook the routines from reader.
18270 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18271 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18272
18273 * src/reader.c (read_declarations): Remove, unused.
18274
18275 * src/parse-gram.y: Handle the epilogue.
18276 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18277 (grammar_start_symbol_set): this.
18278 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18279 * src/reader.c (readgram): Remove, unused.
18280 (reader): Adjust to insert eoftoken and axiom where appropriate.
18281
18282 * src/reader.c (copy_dollar): Replace with...
18283 * src/scan-gram.h (handle_dollar): this.
18284 * src/parse-gram.y: Remove `%thong'.
18285
18286 * src/reader.c (copy_at): Replace with...
18287 * src/scan-gram.h (handle_at): this.
18288
18289 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18290 New.
18291
18292 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18293 time being.
18294
18295 * src/reader.h, src/reader.c (grammar_rule_end): New.
18296
18297 * src/parse.y (current_type, current_class): New.
18298 Implement `%nterm', `%token' support.
18299 Merge `%term' into `%token'.
18300 (string_as_id): New.
18301 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18302 type name.
18303
18304 * src/parse-gram.y: Be sure to handle properly the beginning of
18305 rules.
18306
18307 * src/parse-gram.y: Handle %type.
18308 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18309
18310 * src/parse-gram.y: More directives support.
18311 * src/options.c: No longer handle source directives.
18312
18313 * src/parse-gram.y: Fix %output.
18314
18315 * src/parse-gram.y: Handle %union.
18316 Use the prologue locations.
18317 * src/reader.c (parse_union_decl): Remove.
18318
18319 * src/reader.h, src/reader.c (epilogue_set): New.
18320 * src/parse-gram.y: Use it.
18321
18322 * data/bison.simple, data/bison.c++: b4_stype is now either not
18323 defined, then default to int, or to the contents of %union,
18324 without `union' itself.
18325 Adjust.
18326 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18327
18328 * src/output.c (actions_output): Don't output braces, as they are
18329 already handled by the scanner.
18330
18331 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18332 characters to themselves.
18333
18334 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18335 that the epilogue has a proper #line.
18336
18337 * src/parse-gram.y: Handle precedence/associativity.
18338
18339 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18340 a terminal.
18341 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18342 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18343 at all to define terminals that cannot be emitted.
18344
18345 * src/scan-gram.l: Escape M4 characters.
18346
18347 * src/scan-gram.l: Working properly with escapes in user
18348 strings/characters.
18349
18350 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18351 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18352 grammar.
18353 Use more modest sizes, as for the time being the parser does not
18354 release memory, and therefore the process swallows a huge amount
18355 of memory.
18356
18357 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18358 stricter %token grammar.
18359
18360 * src/symtab.h (associativity): Add `undef_assoc'.
18361 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18362 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18363
18364 * tests/regression.at (Invalid %directive): Remove, as it is now
18365 meaningless.
18366 (Invalid inputs): Adjust to the new error messages.
18367 (Token definitions): The new grammar doesn't allow too many
18368 eccentricities.
18369
18370 * src/lex.h, src/lex.c: Remove.
18371 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18372 (copy_character, copy_string2, copy_string, copy_identifier)
18373 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18374 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18375 (parse_action): Remove.
18376 * po/POTFILES.in: Adjust.
18377
18378 2002-06-11 Akim Demaille <akim@epita.fr>
18379
18380 * src/reader.c (parse_action): Don't store directly into the
18381 rule's action member: return the action as a string.
18382 Don't require `rule_length' as an argument: compute it.
18383 (grammar_current_rule_symbol_append)
18384 (grammar_current_rule_action_append): New, eved out from
18385 (readgram): here.
18386 Remove `action_flag', `rulelength', unused now.
18387
18388 2002-06-11 Akim Demaille <akim@epita.fr>
18389
18390 * src/reader.c (grammar_current_rule_prec_set).
18391 (grammar_current_rule_check): New, eved out from...
18392 (readgram): here.
18393 Remove `xaction', `first_rhs': useless.
18394 * tests/input.at (Type clashes): New.
18395 * tests/existing.at (GNU Cim Grammar): Adjust.
18396
18397 2002-06-11 Akim Demaille <akim@epita.fr>
18398
18399 * src/reader.c (grammar_midrule_action): New, Eved out from
18400 (readgram): here.
18401
18402 2002-06-11 Akim Demaille <akim@epita.fr>
18403
18404 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
18405 New.
18406 (readgram): Use them as replacement of inlined code, crule and
18407 crule1.
18408
18409 2002-06-11 Akim Demaille <akim@epita.fr>
18410
18411 * src/reader.c (grammar_end, grammar_symbol_append): New.
18412 (readgram): Use them.
18413 Make the use of `p' as local as possible.
18414
18415 2002-06-10 Akim Demaille <akim@epita.fr>
18416
18417 GCJ's parser requires the tokens to be defined before the prologue.
18418
18419 * data/bison.simple: Output the token definition before the user's
18420 prologue.
18421 * tests/regression.at (Braces parsing, Duplicate string)
18422 (Mixing %token styles): Check the output from bison.
18423 (Early token definitions): New.
18424
18425 2002-06-10 Akim Demaille <akim@epita.fr>
18426
18427 * src/symtab.c (symbol_user_token_number_set): Don't complain when
18428 assigning twice the same user number to a token, so that we can
18429 use it in...
18430 * src/lex.c (lex): here.
18431 Also use `symbol_class_set' instead of hand written code.
18432 * src/reader.c (parse_assoc_decl): Likewise.
18433
18434 2002-06-10 Akim Demaille <akim@epita.fr>
18435
18436 * src/symtab.c, src/symtab.c (symbol_class_set)
18437 (symbol_user_token_number_set): New.
18438 * src/reader.c (parse_token_decl): Use them.
18439 Use a switch instead of ifs.
18440 Use a single argument.
18441
18442 2002-06-10 Akim Demaille <akim@epita.fr>
18443
18444 Remove `%thong' support as it is undocumented, unused, duplicates
18445 `%token's job, and creates useless e-mail traffic with people who
18446 want to know what it is, why it is undocumented, unused, and
18447 duplicates `%token's job.
18448
18449 * src/reader.c (parse_thong_decl): Remove.
18450 * src/options.c (option_table): Remove "thong".
18451 * src/lex.h (tok_thong): Remove.
18452
18453 2002-06-10 Akim Demaille <akim@epita.fr>
18454
18455 * src/symtab.c, src/symtab.c (symbol_type_set)
18456 (symbol_precedence_set): New.
18457 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
18458 (value_components_used): Remove, unused.
18459
18460 2002-06-09 Akim Demaille <akim@epita.fr>
18461
18462 Move symbols handling code out of the reader.
18463
18464 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
18465 (axiom): Move to...
18466 * src/symtab.h, src/symtab.c: here.
18467
18468 * src/gram.c (start_symbol): Remove: use startsymbol->number.
18469 * src/reader.c (startval): Rename as...
18470 * src/symtab.h, src/symtab.c (startsymbol): this.
18471 * src/reader.c: Adjust.
18472
18473 * src/reader.c (symbol_check_defined, symbol_make_alias)
18474 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18475 (token_translations_init)
18476 Move to...
18477 * src/symtab.c: here.
18478 * src/reader.c (packsymbols): Move to...
18479 * src/symtab.h, src/symtab.c (symbols_pack): here.
18480 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
18481 argument.
18482
18483 2002-06-03 Akim Demaille <akim@epita.fr>
18484
18485 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
18486 then statements.
18487
18488 2002-06-03 Akim Demaille <akim@epita.fr>
18489
18490 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
18491 structs with non literals.
18492 * src/scan-skel.l: never-interactive.
18493 * src/conflicts.c (enum conflict_resolution_e): No trailing
18494 comma.
18495 * src/getargs.c (usage): Split long literal strings.
18496 Reported by Hans Aberg.
18497
18498 2002-05-28 Akim Demaille <akim@epita.fr>
18499
18500 * data/bison.c++: Use C++ ostreams.
18501 (cdebug_): New member.
18502
18503 2002-05-28 Akim Demaille <akim@epita.fr>
18504
18505 * src/output.c (output_skeleton): Be sure to allocate enough room
18506 for `/' _and_ for `\0' in full_skeleton.
18507
18508 2002-05-28 Akim Demaille <akim@epita.fr>
18509
18510 * data/bison.c++: Catch up with bison.simple:
18511 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18512 and Paul Eggert <eggert@twinsun.com>: `error' handing.
18513 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
18514 and popping traces.
18515
18516 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18517
18518 * src/output.c (output_skeleton): Put an explicit path in front of
18519 the skeleton file name, rather than relying on the -I directory,
18520 to partially alleviate effects of having a skeleton file lying around
18521 in the current directory.
18522
18523 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18524
18525 * src/conflicts.c (log_resolution): Correct typo:
18526 obstack_printf should be obstack_fgrow1.
18527
18528 2002-05-26 Akim Demaille <akim@epita.fr>
18529
18530 * src/state.h (state_t): `solved_conflicts' is a new member.
18531 * src/LR0.c (new_state): Set it to 0.
18532 * src/conflicts.h, src/conflicts.c (print_conflicts)
18533 (free_conflicts, solve_conflicts): Rename as...
18534 (conflicts_print, conflicts_free, conflicts_solve): these.
18535 Adjust callers.
18536 * src/conflicts.c (enum conflict_resolution_e)
18537 (solved_conflicts_obstack): New, used by...
18538 (log_resolution): this.
18539 Adjust to attach the conflict resolution to each state.
18540 Complete the description with the precedence/associativity
18541 information.
18542 (resolve_sr_conflict): Adjust.
18543 * src/print.c (print_state): Output its solved_conflicts.
18544 * tests/conflicts.at (Unresolved SR Conflicts)
18545 (Solved SR Conflicts): Exercise --report=all.
18546
18547 2002-05-26 Akim Demaille <akim@epita.fr>
18548
18549 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18550 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18551 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
18552 (token_number_t, item_number_as_token_number)
18553 (token_number_as_item_number, muscle_insert_token_number_table):
18554 Rename as...
18555 (symbol_number_t, item_number_as_symbol_number)
18556 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
18557 these, since it is more appropriate.
18558
18559 2002-05-26 Akim Demaille <akim@epita.fr>
18560
18561 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
18562 `Error:' lines.
18563 * data/bison.simple (yystos) [YYDEBUG]: New.
18564 (yyparse) [YYDEBUG]: Display the symbols which are popped during
18565 error recovery.
18566 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
18567
18568 2002-05-25 Akim Demaille <akim@epita.fr>
18569
18570 * doc/bison.texinfo (Debugging): Split into...
18571 (Tracing): this new section, its former contents, and...
18572 (Understanding): this new section.
18573 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
18574 by...
18575 (report_flag): this.
18576 Adjust all dependencies.
18577 (report_args, report_types, report_argmatch): New.
18578 (usage, getargs): Report/support -r, --report.
18579 * src/options.h
18580 (struct option_table_struct): Rename as..,
18581 (struct option_table_s): this.
18582 Rename the `set_flag' member to `flag' to match with getopt_long's
18583 struct.
18584 * src/options.c (option_table): Split verbose into an entry for
18585 %verbose, and another for --verbose.
18586 Support --report/-r, so remove -r from the obsolete --raw.
18587 * src/print.c: Attach full item sets and lookaheads reports to
18588 report_flag instead of trace_flag.
18589 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
18590
18591 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18592 and Paul Eggert <eggert@twinsun.com>
18593
18594 * data/bison.simple (yyparse): Correct error handling to conform to
18595 POSIX and yacc. Specifically, after syntax error is discovered,
18596 do not reduce further before shifting the error token.
18597 Clean up the code a bit by removing the labels yyerrdefault,
18598 yyerrhandle, yyerrpop.
18599 * NEWS: Document the above.
18600
18601 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18602
18603 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
18604 type; it isn't always big enough, since it doesn't necessarily
18605 include non-terminals.
18606 (yytranslate): Expand definition of yy_token_number_type, so that
18607 the latter can be removed.
18608 (yy_token_number_type): Remove, only one use.
18609 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
18610 don't use TokenNumberType as element type.
18611
18612 * tests/regression.at: Modify expected output to agree with change
18613 to yyr1 and yytranslate.
18614
18615 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
18616
18617 * src/reader.c (parse_action): Use copy_character instead of
18618 obstack_1grow.
18619
18620 2002-05-13 Akim Demaille <akim@epita.fr>
18621
18622 * tests/regression.at (Token definitions): Prototype yylex and
18623 yyerror.
18624
18625 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18626
18627 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
18628 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
18629 32-bit arithmetic.
18630 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
18631
18632 2002-05-07 Akim Demaille <akim@epita.fr>
18633
18634 * tests/synclines.at: Be sure to prototype yylex and yyerror to
18635 avoid GCC warnings.
18636
18637 2002-05-07 Akim Demaille <akim@epita.fr>
18638
18639 Kill GCC warnings.
18640
18641 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
18642 over the RHS of each rule.
18643 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
18644 * src/state.h (state_t): Member `nitems' is unsigned short.
18645 * src/LR0.c (get_state): Adjust.
18646 * src/reader.c (packgram): Likewise.
18647 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
18648 `Type'.
18649 (muscle_insert_int_table): Remove, unused.
18650 (prepare_rules): Remove `max'.
18651
18652 2002-05-06 Akim Demaille <akim@epita.fr>
18653
18654 * src/closure.c (print_firsts): Display of the symbol tags.
18655 (bitmatrix_print): Move to...
18656 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
18657 here.
18658 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
18659
18660 2002-05-06 Akim Demaille <akim@epita.fr>
18661
18662 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
18663 hash_do_for_each.
18664
18665 2002-05-06 Akim Demaille <akim@epita.fr>
18666
18667 * src/LR0.c (new_state, get_state): Instead of using the global
18668 `kernel_size' and `kernel_base', have two new arguments:
18669 `core_size' and `core'.
18670 Adjust callers.
18671
18672 2002-05-06 Akim Demaille <akim@epita.fr>
18673
18674 * src/reader.c (packgram): No longer end `ritem' with a 0
18675 sentinel: it is not used.
18676
18677 2002-05-05 Akim Demaille <akim@epita.fr>
18678
18679 New experimental feature: display the lookaheads in the report and
18680 graph.
18681
18682 * src/print (print_core): When --trace-flag, display the rules
18683 lookaheads.
18684 * src/print_graph.c (print_core): Likewise.
18685 Swap the arguments.
18686 Adjust caller.
18687
18688 2002-05-05 Akim Demaille <akim@epita.fr>
18689
18690 * tests/torture.at (Many lookaheads): New test.
18691
18692 2002-05-05 Akim Demaille <akim@epita.fr>
18693
18694 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
18695 (GENERATE_MUSCLE_INSERT_TABLE): this.
18696 (output_int_table, output_unsigned_int_table, output_short_table)
18697 (output_token_number_table, output_item_number_table): Replace with...
18698 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
18699 (muscle_insert_short_table, muscle_insert_token_number_table)
18700 (muscle_insert_item_number_table): these.
18701 Adjust all callers.
18702 (prepare_tokens): Don't free `translations', since...
18703 * src/reader.h, src/reader.c (grammar_free): do it.
18704 Move to...
18705 * src/gram.h, src/gram.c (grammar_free): here.
18706 * data/bison.simple, data/bison.c++: b4_token_number_max is now
18707 b4_translate_max.
18708
18709 2002-05-05 Akim Demaille <akim@epita.fr>
18710
18711 * src/output.c (output_unsigned_int_table): New.
18712 (prepare_rules): `i' is unsigned.
18713 `prhs', `rline', `r2' are unsigned int.
18714 Rename muscle `rhs_number_max' as `rhs_max'.
18715 Output muscles `prhs_max', `rline_max', and `r2_max'.
18716 Free rline and r1.
18717 * data/bison.simple, data/bison.c++: Adjust to use these muscles
18718 to compute types instead of constant types.
18719 * tests/regression.at (Web2c Actions): Adjust.
18720
18721 2002-05-04 Akim Demaille <akim@epita.fr>
18722
18723 * src/symtab.h (SALIAS, SUNDEF): Rename as...
18724 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
18725 Adjust dependencies.
18726 * src/output.c (token_definitions_output): Be sure not to output a
18727 `#define 'a'' when fed with `%token 'a' "a"'.
18728 * tests/regression.at (Token definitions): New.
18729
18730 2002-05-03 Paul Eggert <eggert@twinsun.com>
18731
18732 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
18733 for K&R C.
18734
18735 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
18736
18737 * Makefile.am (SUBDIRS): Remove intl.
18738 (EXTRA_DIST): Add config/config.rpath.
18739
18740 2002-05-03 Akim Demaille <akim@epita.fr>
18741
18742 * data/bison.simple (m4_if): Don't output empty enums.
18743 And actually, output valid enum definitions :(.
18744
18745 2002-05-03 Akim Demaille <akim@epita.fr>
18746
18747 * configure.bat: Remove, completely obsolete.
18748 * Makefile.am (EXTRA_DIST): Adjust.
18749 Don't distribute config.rpath...
18750 * config/Makefile.am (EXTRA_DIST): Do it.
18751
18752 2002-05-03 Akim Demaille <akim@epita.fr>
18753
18754 * configure.in (GETTEXT_VERSION): New.
18755 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
18756
18757 2002-05-03 Akim Demaille <akim@epita.fr>
18758
18759 * data/bison.simple (b4_token_enum): New.
18760 (b4_token_defines): Use it to output tokens both as #define and
18761 enums.
18762 Suggested by Paul Eggert.
18763 * src/output.c (token_definitions_output): Don't output spurious
18764 white spaces.
18765
18766 2002-05-03 Akim Demaille <akim@epita.fr>
18767
18768 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18769
18770 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
18771
18772 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
18773 Update the stack class, give a try to deque as the default container.
18774
18775 2002-05-02 Akim Demaille <akim@epita.fr>
18776
18777 * data/bison.simple (yyparse): Do not implement @$ = @1.
18778 (YYLLOC_DEFAULT): Adjust to do it.
18779 * doc/bison.texinfo (Location Default Action): Fix.
18780
18781 2002-05-02 Akim Demaille <akim@epita.fr>
18782
18783 * src/reader.c (parse_braces): Merge into...
18784 (parse_action): this.
18785
18786 2002-05-02 Akim Demaille <akim@epita.fr>
18787
18788 * configure.in (ALL_LINGUAS): Remove.
18789 * po/LINGUAS, hr.po: New.
18790
18791 2002-05-02 Akim Demaille <akim@epita.fr>
18792
18793 Remove the so called hairy (semantic) parsers.
18794
18795 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
18796 * src/gram.h, src/gram.c (semantic_parser): Remove.
18797 (rule_t): Remove the guard and guard_line members.
18798 * src/lex.h (token_t): remove tok_guard.
18799 * src/options.c (option_table): Remove %guard and %semantic_parser
18800 support.
18801 * src/output.c, src/output.h (guards_output): Remove.
18802 (prepare): Adjust.
18803 (token_definitions_output): Don't output the `T'
18804 tokens (???).
18805 (output_skeleton): Don't output the guards.
18806 * src/files.c, src/files.c (attrsfile): Remove.
18807 * src/reader.c (symbol_list): Remove the guard and guard_line
18808 members.
18809 Adjust dependencies.
18810 (parse_guard): Remove.
18811 * data/bison.hairy: Remove.
18812 * doc/bison.texinfo (Environment Variables): Remove occurrences of
18813 BISON_HAIRY.
18814
18815 2002-05-02 Akim Demaille <akim@epita.fr>
18816
18817 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
18818 (parse_guard): Rename the formal argument `stack_offset' as
18819 `rule_length', which is more readable.
18820 Adjust callers.
18821 (copy_at, copy_dollar): Instead of outputting the hard coded
18822 values of $$, $n and so forth, output invocation to b4_lhs_value,
18823 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
18824 Note: this patch partially drops `semantic-parser' support: it
18825 always does `rule_length - n', where semantic parsers ought to
18826 always use `-n'.
18827 * data/bison.simple, data/bison.c++ (b4_lhs_value)
18828 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
18829
18830 2002-05-02 Akim Demaille <akim@epita.fr>
18831
18832 * configure.in (AC_INIT): Bump to 1.49b.
18833 (AM_INIT_AUTOMAKE): Short invocation.
18834
18835 2002-05-02 Akim Demaille <akim@epita.fr>
18836
18837 Version 1.49a.
18838
18839 2002-05-01 Akim Demaille <akim@epita.fr>
18840
18841 * src/skeleton.h: Remove.
18842
18843 2002-05-01 Akim Demaille <akim@epita.fr>
18844
18845 * src/skeleton.h: Fix the #endif.
18846 Reported by Magnus Fromreide.
18847
18848 2002-04-26 Paul Eggert <eggert@twinsun.com>
18849
18850 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
18851 Define if we define YYSTYPE and YYLTYPE, respectively.
18852 (YYCOPY): Fix [] quoting problem in the non-GCC case.
18853
18854 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
18855
18856 * src/scan-skel.l: Postprocess quadrigraphs.
18857
18858 * src/reader.c (copy_character): New function, used to output
18859 single characters while replacing `[' and `]' with quadrigraphs, to
18860 avoid troubles with M4 quotes.
18861 (copy_comment): Output characters with copy_character.
18862 (read_additionnal_code): Likewise.
18863 (copy_string2): Likewise.
18864 (copy_definition): Likewise.
18865
18866 * tests/calc.at: Exercise M4 quoting.
18867
18868 2002-04-25 Akim Demaille <akim@epita.fr>
18869
18870 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18871 between `!' and the command.
18872 Reported by Paul Eggert.
18873
18874 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
18875
18876 * tests/calc.at: Exercise prologue splitting.
18877
18878 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18879 `b4_post_prologue' instead of `b4_prologue'.
18880
18881 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18882 muscles.
18883 (output): Free pre_prologue_obstack and post_prologue_obstack.
18884 * src/files.h, src/files.c (attrs_obstack): Remove.
18885 (pre_prologue_obstack, post_prologue_obstack): New.
18886 * src/reader.c (copy_definition): Add a parameter to specify the
18887 obstack to fill, instead of using attrs_obstack unconditionally.
18888 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18889 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18890
18891 2002-04-23 Paul Eggert <eggert@twinsun.com>
18892
18893 * data/bison.simple: Remove unnecessary commentary and white
18894 space differences from 1_29-branch.
18895 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18896
18897 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18898 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18899 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18900 constructors or destructors.
18901
18902 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18903
18904 2002-04-23 Akim Demaille <akim@epita.fr>
18905
18906 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18907 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18908 location with columns.
18909 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18910 All reported by Paul Eggert.
18911
18912 2002-04-22 Akim Demaille <akim@epita.fr>
18913
18914 * src/reduce.c (dump_grammar): Move to...
18915 * src/gram.h, src/gram.c (grammar_dump): here.
18916 Be sure to separate long item numbers.
18917 Don't read the members of a rule's prec if its nil.
18918
18919 2002-04-22 Akim Demaille <akim@epita.fr>
18920
18921 * src/output.c (table_size, table_grow): New.
18922 (MAXTABLE): Remove, replace uses with table_size.
18923 (pack_vector): Instead of dying when the table is too big, grow it.
18924
18925 2002-04-22 Akim Demaille <akim@epita.fr>
18926
18927 * data/bison.simple (yyr1): Its type is that of a token number.
18928 * data/bison.c++ (r1_): Likewise.
18929 * tests/regression.at (Web2c Actions): Adjust.
18930
18931 2002-04-22 Akim Demaille <akim@epita.fr>
18932
18933 * src/reader.c (token_translations_init): 256 is now the default
18934 value for the error token, i.e., it will be assigned another
18935 number if the user assigned 256 to one of her tokens.
18936 (reader): Don't force 256 to error.
18937 * doc/bison.texinfo (Symbols): Adjust.
18938 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18939 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18940 etc. instead of 10, 20, 30 (which was used to `jump' over error
18941 (256) and undefined (2)).
18942
18943 2002-04-22 Akim Demaille <akim@epita.fr>
18944
18945 Propagate more token_number_t.
18946
18947 * src/gram.h (token_number_as_item_number)
18948 (item_number_as_token_number): New.
18949 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18950 Use it to create output_item_number_table and
18951 output_token_number_table.
18952 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18953 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18954 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18955 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18956
18957 2002-04-22 Akim Demaille <akim@epita.fr>
18958
18959 * src/output.h, src/output.c (get_lines_number): Remove.
18960
18961 2002-04-19 Akim Demaille <akim@epita.fr>
18962
18963 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18964 as Lex/Flex'.
18965 (Debugging): More details about enabling the debugging features.
18966 (Table of Symbols): Describe $$, $n, @$, and @n.
18967 Suggested by Tim Josling.
18968
18969 2002-04-19 Akim Demaille <akim@epita.fr>
18970
18971 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18972
18973 2002-04-10 Akim Demaille <akim@epita.fr>
18974
18975 * src/system.h: Rely on HAVE_LIMITS_H.
18976 Suggested by Paul Eggert.
18977
18978 2002-04-09 Akim Demaille <akim@epita.fr>
18979
18980 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18981 full stderr, and strip it according to the bison options, instead
18982 of composing the error message from different bits.
18983 This makes it easier to check for several error messages.
18984 Adjust all the invocations.
18985 Add an invocation exercising the error token.
18986 Add an invocation demonstrating a stupid error message.
18987 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18988 Adjust the tests.
18989 Error message are for stderr, not stdout.
18990
18991 2002-04-09 Akim Demaille <akim@epita.fr>
18992
18993 * src/gram.h, src/gram.c (error_token_number): Remove, use
18994 errtoken->number.
18995 * src/reader.c (reader): Don't specify the user token number (2)
18996 for $undefined, as it uselessly prevents using it.
18997 * src/gram.h (token_number_t): Move to...
18998 * src/symtab.h: here.
18999 (state_t.number): Is a token_number_t.
19000 * src/print.c, src/reader.c: Use undeftoken->number instead of
19001 hard coded 2.
19002 (Even though this 2 is not the same as above: the number of the
19003 undeftoken remains being 2, it is its user token number which
19004 might not be 2).
19005 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19006 `user_token_number_max'.
19007 Output `undef_token_number'.
19008 * data/bison.simple, data/bison.c++: Use them.
19009 Be sure to map invalid yylex return values to
19010 `undef_token_number'. This saves us from gratuitous SEGV.
19011
19012 * tests/conflicts.at (Solved SR Conflicts)
19013 (Unresolved SR Conflicts): Adjust.
19014 * tests/regression.at (Web2c Actions): Adjust.
19015
19016 2002-04-08 Akim Demaille <akim@epita.fr>
19017
19018 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19019 Adding #line.
19020 Remove the duplicate `typedefs'.
19021 (RhsNumberType): Fix the declaration and various other typos.
19022 Use __ofile__.
19023 * data/bison.simple: Use __ofile__.
19024 * src/scan-skel.l: Handle __ofile__.
19025
19026 2002-04-08 Akim Demaille <akim@epita.fr>
19027
19028 * src/gram.h (item_number_t): New, the type of item numbers in
19029 RITEM. Note that it must be able to code symbol numbers as
19030 positive number, and the negation of rule numbers as negative
19031 numbers.
19032 Adjust all dependencies (pretty many).
19033 * src/reduce.c (rule): Remove this `short *' pointer: use
19034 item_number_t.
19035 * src/system.h (MINSHORT, MAXSHORT): Remove.
19036 Include `limits.h'.
19037 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19038 (shortcpy): Remove.
19039 (MAXTABLE): Move to...
19040 * src/output.c (MAXTABLE): here.
19041 (prepare_rules): Use output_int_table to output rhs.
19042 * data/bison.simple, data/bison.c++: Adjust.
19043 * tests/torture.at (Big triangle): Move the limit from 254 to
19044 500.
19045 * tests/regression.at (Web2c Actions): Ajust.
19046
19047 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19048 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19049 passes, but produces negative #line number, once fixed, GCC is
19050 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19051 C), it passes.
19052 * src/state.h (state_h): Code input lines on ints, not shorts.
19053
19054 2002-04-08 Akim Demaille <akim@epita.fr>
19055
19056 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19057 and then the grammar.
19058
19059 2002-04-08 Akim Demaille <akim@epita.fr>
19060
19061 * src/system.h: No longer using strndup.
19062
19063 2002-04-07 Akim Demaille <akim@epita.fr>
19064
19065 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19066 * src/output.c (output_table_data): Return the longest number.
19067 (prepare_tokens): Output `token_number_max').
19068 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19069 New.
19070 Use them to define yy_token_number_type/TokenNumberType.
19071 Use this type for yytranslate.
19072 * tests/torture.at (Big triangle): Push the limit from 124 to
19073 253.
19074 * tests/regression.at (Web2c Actions): Adjust.
19075
19076 2002-04-07 Akim Demaille <akim@epita.fr>
19077
19078 * tests/torture.at (Big triangle): New.
19079 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19080 * tests/existing.at: here.
19081
19082 2002-04-07 Akim Demaille <akim@epita.fr>
19083
19084 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19085 nritems.
19086 Adjust dependencies.
19087
19088 2002-04-07 Akim Demaille <akim@epita.fr>
19089
19090 * src/reader.c: Normalize increments to prefix form.
19091
19092 2002-04-07 Akim Demaille <akim@epita.fr>
19093
19094 * src/reader.c, symtab.c: Remove debugging code.
19095
19096 2002-04-07 Akim Demaille <akim@epita.fr>
19097
19098 Rename all the `bucket's as `symbol_t'.
19099
19100 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19101 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19102 * src/symtab.c, src/symtab.h (bucket): Rename as...
19103 (symbol_t): this.
19104 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19105 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19106 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19107 (buckets_new, buckets_free, buckets_do): Rename as...
19108 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19109 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19110 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19111 (symbols_new, symbols_free, symbols_do): these.
19112
19113 2002-04-07 Akim Demaille <akim@epita.fr>
19114
19115 Use lib/hash for the symbol table.
19116
19117 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19118 EOF.
19119 * src/lex.c (lex): Set the `number' member of new terminals.
19120 * src/reader.c (bucket_check_defined, bucket_make_alias)
19121 (bucket_check_alias_consistence, bucket_translation): New.
19122 (reader, grammar_free, readgram, token_translations_init)
19123 (packsymbols): Adjust.
19124 (reader): Number the predefined tokens.
19125 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19126 for predefined tokens.
19127 * src/symtab.h (bucket): Remove all the hash table related
19128 members.
19129 * src/symtab.c (symtab): Replace by...
19130 (bucket_table): this.
19131 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19132 (buckets_new, buckets_do): New.
19133
19134 2002-04-07 Akim Demaille <akim@epita.fr>
19135
19136 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19137 (start_symbol, max_user_token_number, semantic_parser)
19138 (error_token_number): Initialize.
19139 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19140 Initialize.
19141 (reader): Don't.
19142 (errtoken, eoftoken, undeftoken, axiom): Extern.
19143
19144 2002-04-07 Akim Demaille <akim@epita.fr>
19145
19146 * src/gram.h (rule_s): prec and precsym are now pointers
19147 to the bucket giving the priority/associativity.
19148 Member `associativity' removed: useless.
19149 * src/reduce.c, src/conflicts.c: Adjust.
19150
19151 2002-04-07 Akim Demaille <akim@epita.fr>
19152
19153 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19154 Properly escape the symbols' TAG when outputting them.
19155
19156 2002-04-07 Akim Demaille <akim@epita.fr>
19157
19158 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19159
19160 2002-04-07 Akim Demaille <akim@epita.fr>
19161
19162 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19163 (LArule): this, which is an array to rule_t*.
19164 * src/print.c, src/conflicts.c: Adjust.
19165
19166 2002-04-07 Akim Demaille <akim@epita.fr>
19167
19168 * src/gram.h (rule_t): Rename `number' as `user_number'.
19169 `number' is a new member.
19170 Adjust dependencies.
19171 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19172
19173 2002-04-07 Akim Demaille <akim@epita.fr>
19174
19175 As a result of the previous patch, it is no longer needed
19176 to reorder ritem itself.
19177
19178 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19179
19180 2002-04-07 Akim Demaille <akim@epita.fr>
19181
19182 Be sure never to walk through RITEMS, but use only data related to
19183 the rules themselves. RITEMS should be banished.
19184
19185 * src/output.c (output_token_translations): Rename as...
19186 (prepare_tokens): this.
19187 In addition to `translate', prepare the muscles `tname' and
19188 `toknum', which were handled by...
19189 (output_rule_data): this.
19190 Remove, and move the remainder of its outputs into...
19191 (prepare_rules): this new routines, which also merges content from
19192 (output_gram): this.
19193 (prepare_rules): Be sure never to walk through RITEMS.
19194 (output_stos): Rename as...
19195 (prepare_stos): this.
19196 (output): Always invoke prepare_states, after all, just don't use it
19197 in the output if you don't need it.
19198
19199 2002-04-07 Akim Demaille <akim@epita.fr>
19200
19201 * src/LR0.c (new_state): Display `nstates' as the name of the
19202 newly created state.
19203 Adjust to initialize first_state and last_state if needed.
19204 Be sure to distinguish the initial from the final state.
19205 (new_states): Create the itemset of the initial state, and use
19206 new_state.
19207 * src/closure.c (closure): Now that the initial state has its
19208 items properly set, there is no need for a special case when
19209 creating `ruleset'.
19210
19211 As a result, now the rule 0, reducing to $axiom, is visible in the
19212 outputs. Adjust the test suite.
19213
19214 * tests/conflicts.at (Solved SR Conflicts)
19215 (Unresolved SR Conflicts): Adjust.
19216 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19217 * tests/conflicts.at (S/R in initial): New.
19218
19219 2002-04-07 Akim Demaille <akim@epita.fr>
19220
19221 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19222 the RHS of the rules.
19223 * src/output.c (output_gram): Likewise.
19224
19225 2002-04-07 Akim Demaille <akim@epita.fr>
19226
19227 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19228 bucket.
19229 Adjust all dependencies.
19230 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19231 `number' of the buckets too.
19232 * src/gram.h: Include `symtab.h'.
19233 (associativity): Move to...
19234 * src/symtab.h: here.
19235 No longer include `gram.h'.
19236
19237 2002-04-07 Akim Demaille <akim@epita.fr>
19238
19239 * src/gram.h, src/gram.c (rules_rhs_length): New.
19240 (ritem_longest_rhs): Use it.
19241 * src/gram.h (rule_t): `number' is a new member.
19242 * src/reader.c (packgram): Set it.
19243 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19244 the end of `rules', and count them out of `nrules'.
19245 (reduce_output, dump_grammar): Adjust.
19246 * src/print.c (print_grammar): It is no longer needed to check for
19247 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19248 * tests/reduce.at (Reduced Automaton): New test.
19249
19250 2002-04-07 Akim Demaille <akim@epita.fr>
19251
19252 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19253 lacking `+ 1' to nrules, Bison reported as useless a token if it
19254 was used solely to set the precedence of the last rule...
19255
19256 2002-04-07 Akim Demaille <akim@epita.fr>
19257
19258 * data/bison.c++, data/bison.simple: Don't output the current file
19259 name in #line, to avoid useless diffs between two identical
19260 outputs under different names.
19261
19262 2002-04-07 Akim Demaille <akim@epita.fr>
19263
19264 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19265 Normalize loops to using `< nrules + 1', not `<= nrules'.
19266
19267 2002-04-07 Akim Demaille <akim@epita.fr>
19268
19269 * TODO: Update.
19270
19271 2002-04-07 Akim Demaille <akim@epita.fr>
19272
19273 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19274 bucket.value as bucket.number.
19275
19276 2002-04-07 Akim Demaille <akim@epita.fr>
19277
19278 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19279 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19280 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19281 RHS, instead of being an index in RITEMS.
19282
19283 2002-04-04 Paul Eggert <eggert@twinsun.com>
19284
19285 * doc/bison.texinfo: Update copyright date.
19286 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19287 (Symbols): Warn about running Bison in one character set,
19288 but compiling and/or running in an incompatible one.
19289 Warn about character code 256, too.
19290
19291 2002-04-03 Paul Eggert <eggert@twinsun.com>
19292
19293 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19294 YYERROR_VERBOSE is nonzero, not whether it is defined.
19295
19296 Merge changes from bison-1_29-branch.
19297
19298 2002-03-20 Paul Eggert <eggert@twinsun.com>
19299
19300 Merge fixes from Debian bison_1.34-1.diff.
19301
19302 * configure.in (AC_PREREQ): 2.53.
19303
19304 2002-03-20 Akim Demaille <akim@epita.fr>
19305
19306 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19307
19308 2002-03-19 Paul Eggert <eggert@twinsun.com>
19309
19310 * src/bison.simple (YYCOPY): New macro.
19311 (YYSTACK_RELOCATE): Use it.
19312 Remove Type arg; no longer needed. All callers changed.
19313 (yymemcpy): Remove; no longer needed.
19314
19315 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19316 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19317
19318 2002-03-19 Akim Demaille <akim@epita.fr>
19319
19320 Test and fix the #line outputs.
19321
19322 * tests/atlocal.at (GCC): New.
19323 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
19324 (Prologue synch line, %union synch line, Postprologue synch line)
19325 (Action synch line, Epilogue synch line): New tests.
19326 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19327 * data/bison.simple, data/bison.c++: Use it.
19328
19329 2002-03-19 Akim Demaille <akim@epita.fr>
19330
19331 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19332 (Solved SR Conflicts, %expect not enough, %expect right)
19333 (%expect too much): Move to...
19334 * tests/conflicts.at: this new file.
19335
19336 2002-03-19 Akim Demaille <akim@epita.fr>
19337
19338 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19339 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19340 that we can move to enums for instance.
19341 * src/output.c (token_definitions_output): Output a list of
19342 `token-name, token-number' instead of the #define.
19343 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19344
19345 2002-03-14 Akim Demaille <akim@epita.fr>
19346
19347 Use Gettext 0.11.1.
19348
19349 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
19350
19351 * data/bison.c++: Make the user able to add members to the generated
19352 parser by subclassing.
19353
19354 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
19355
19356 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19357 a character.
19358 Reported by Nicolas Tisserand and Nicolas Burrus.
19359
19360 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19361
19362 * src/reader.c: Warn about lacking semi-colons, do not complain.
19363
19364 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19365
19366 * data/bison.c++: Remove a debug line.
19367
19368 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19369
19370 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19371 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19372 provide a default implementation.
19373
19374 2002-03-04 Akim Demaille <akim@epita.fr>
19375
19376 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19377 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19378 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19379 * tests/semantic.at (Parsing Guards): Similarly.
19380 * src/reader.at (readgram): Complain if the last rule is not ended
19381 with a semi-colon.
19382
19383 2002-03-04 Akim Demaille <akim@epita.fr>
19384
19385 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19386 * src/closure.c: here.
19387 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19388 RTC.
19389 * src/warshall.h, src/warshall.c: Remove.
19390 * tests/sets.at (Broken Closure): Adjust.
19391
19392 2002-03-04 Akim Demaille <akim@epita.fr>
19393
19394 * src/output.c (output_skeleton): tempdir is const.
19395 bytes_read is unused.
19396
19397 2002-03-04 Akim Demaille <akim@epita.fr>
19398
19399 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19400 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19401 Update.
19402 From Michael Hayes.
19403
19404 2002-03-04 Akim Demaille <akim@epita.fr>
19405
19406 * src/closure.c (closure): `r' is unused.
19407
19408 2002-03-04 Akim Demaille <akim@epita.fr>
19409
19410 * tests/sets.at (Broken Closure): Add the ending `;'.
19411 * src/reader.at (readgram): Complain if a rule is not ended with a
19412 semi-colon.
19413
19414 2002-03-04 Akim Demaille <akim@epita.fr>
19415
19416 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
19417 (count_sr_conflicts): Use bitset_count.
19418 * src/reduce.c (inaccessable_symbols): Ditto.
19419 (bits_size): Remove.
19420 * src/warshall.h, src/warshall.c: Convert to bitsetv.
19421
19422 2002-03-04 Akim Demaille <akim@epita.fr>
19423
19424 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
19425 * src/reduce.c: Remove the `bitset_zero's following the
19426 `bitset_create's, as now it is performed by the latter.
19427
19428 2002-03-04 Akim Demaille <akim@epita.fr>
19429
19430 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
19431 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
19432 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
19433 latest sources from Michael.
19434
19435 2002-03-04 Akim Demaille <akim@epita.fr>
19436
19437 * src/output.c (output): Don't free the grammar.
19438 * src/reader.c (grammar_free): New.
19439 * src/main.c (main): Call it and don't free symtab here.
19440
19441 2002-03-04 Akim Demaille <akim@epita.fr>
19442
19443 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
19444 before returning.
19445 Reported by Benoit Perrot.
19446
19447 2002-03-04 Akim Demaille <akim@epita.fr>
19448
19449 Use bitset operations when possible, not loops over bits.
19450
19451 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
19452 bitset_or.
19453 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
19454 * src/reduce.c (useless_nonterminals): Formatting changes.
19455 * src/warshall.c (TC): Use bitset_or.
19456
19457 2002-03-04 Akim Demaille <akim@epita.fr>
19458
19459 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
19460 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
19461 Ditto.
19462
19463 2002-03-04 Akim Demaille <akim@epita.fr>
19464
19465 * src/lalr.c (F): Now a bitset*.
19466 Adjust all dependencies.
19467
19468 2002-03-04 Akim Demaille <akim@epita.fr>
19469
19470 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
19471 Adjust all dependencies.
19472
19473 2002-03-04 Akim Demaille <akim@epita.fr>
19474
19475 * src/L0.c, src/LR0.h (nstates): Be size_t.
19476 Adjust comparisons (signed vs unsigned).
19477 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
19478 bitset*.
19479 Adjust all dependencies.
19480
19481 2002-03-04 Akim Demaille <akim@epita.fr>
19482
19483 * src/closure.c (firsts): Now, also a bitset.
19484 Adjust all dependencies.
19485 (varsetsize): Remove, now unused.
19486 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
19487
19488 2002-03-04 Akim Demaille <akim@epita.fr>
19489
19490 * src/print.c: Convert to use bitset.h, not hand coded iterations
19491 over ints.
19492
19493 2002-03-04 Akim Demaille <akim@epita.fr>
19494
19495 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
19496
19497 2002-03-04 Akim Demaille <akim@epita.fr>
19498
19499 * src/closure.c (ruleset): Be a bitset.
19500 (rulesetsize): Remove.
19501
19502 2002-03-04 Akim Demaille <akim@epita.fr>
19503
19504 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19505 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
19506 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
19507 * src/closure.c (fderives): Be an array of bitsets.
19508
19509 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
19510
19511 * data/bison.c++: Merge the two generated headers. Insert a copyright
19512 notice in each output file.
19513
19514 2002-02-28 Akim Demaille <akim@epita.fr>
19515
19516 * data/bison.c++: Copy the prologue of bison.simple to fetch
19517 useful M4 definitions, such as b4_header_guard.
19518
19519 2002-02-25 Akim Demaille <akim@epita.fr>
19520
19521 * src/getargs.c (version): Give the name of the authors, and use a
19522 translator friendly scheme for the bgr
19523 copyright notice.
19524
19525 2002-02-25 Akim Demaille <akim@epita.fr>
19526
19527 * src/output.c (header_output): Remove, now handled completely via
19528 M4.
19529
19530 2002-02-25 Akim Demaille <akim@epita.fr>
19531
19532 * m4/m4.m4: New, from CVS Autoconf.
19533 * configure.in: Invoke it.
19534 * src/output.c (output_skeleton): Use its result instead of the
19535 hard coded name.
19536
19537 2002-02-25 Akim Demaille <akim@epita.fr>
19538
19539 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
19540 Fileutils 4.1.5.
19541 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
19542 * src/output.c (output_skeleton): Use mkstemp to create a real
19543 temporary file.
19544 Move the filling of `skeleton' and its muscle to...
19545 (prepare): here.
19546 (output): Move the definition of the prologue muscle to...
19547 (prepare): here.
19548 * src/system.h (DEFAULT_TMPDIR): New.
19549
19550 2002-02-14 Paul Eggert <eggert@twinsun.com>
19551
19552 Remove the support for C++ namespace cleanliness; it was
19553 causing more problems than it was curing, since it didn't work
19554 properly on some nonstandard C++ compilers. This can wait
19555 for a proper C++ parser.
19556
19557 * NEWS: Document this.
19558 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
19559 of C++, as it's treated like C now.
19560 * src/bison.simple (YYSTD): Remove.
19561 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
19562 Treat C++ just like Standard C instead of trying to support
19563 namespace cleanliness.
19564
19565 2002-02-14 Akim Demaille <akim@epita.fr>
19566
19567 * tests/regression.at (else): Adjust to Andreas' change.
19568
19569 2002-02-14 Akim Demaille <akim@epita.fr>
19570
19571 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
19572
19573 2002-02-13 Andreas Schwab <schwab@suse.de>
19574
19575 * src/output.c (output_rule_data): Don't output NULL, it might
19576 not be defined yet.
19577
19578 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
19579
19580 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
19581 (Copyright notice): Update.
19582
19583 2002-02-11 Akim Demaille <akim@epita.fr>
19584
19585 * tests/regression.at (%nonassoc and eof): Don't include
19586 nonportable headers.
19587
19588 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
19589
19590 * data/bison.c++: Correct error recovery. Make the user able to
19591 initialize the starting location.
19592
19593 2002-02-07 Akim Demaille <akim@epita.fr>
19594
19595 * tests/input.at: New.
19596
19597 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19598
19599 * data/bison.c++: Replace some direct m4 expansions by constants. Be
19600 more consistent when naming methods and variables. Put preprocessor
19601 directives around tables only needed for debugging.
19602
19603 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19604
19605 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
19606 C++ parsers.
19607 (yy::b4_name::parse): Use print_.
19608
19609 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19610
19611 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
19612
19613 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19614
19615 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
19616 C++ parsers.
19617 (yy::b4_name::parse): Build verbose error messages, and use error_.
19618
19619 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19620
19621 * data/bison.c++: Fix m4 quoting in comments.
19622
19623 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19624
19625 * data/bison.c++: Adjust the parser code. Fix some muscles that were
19626 not expanded by m4.
19627
19628 2002-02-05 Akim Demaille <akim@epita.fr>
19629
19630 * data/bison.c++: Adjust to the M4 back end.
19631 More is certainly needed.
19632
19633 2002-02-05 Akim Demaille <akim@epita.fr>
19634
19635 Give a try to M4 as a back end.
19636
19637 * lib/readpipe.c: New, from wdiff.
19638 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
19639 BISON_HAIRY.
19640 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
19641 specific values. Now it is m4 that performs the lookup.
19642 * src/parse-skel.y: Remove.
19643 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
19644 * src/output.c (actions_output, guards_output)
19645 (token_definitions_output): No longer keeps track of the output
19646 line number, hence remove the second argument.
19647 (guards_output): Check against the guard member of a rule, not the
19648 action member.
19649 Adjust callers.
19650 (output_skeleton): Don't look for the skeleton location, let m4 do
19651 that.
19652 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
19653 file will be used.
19654 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
19655 (prepare): Given that for the time being changesyntax is not
19656 usable in M4, rename the muscles using `-' to `_'.
19657 Define `defines_flag', `output_parser_name' and `output_header_name'.
19658 * src/output.h (actions_output, guards_output)
19659 (token_definitions_output): Adjust prototypes.
19660 * src/scan-skel.l: Instead of scanning the skeletons, it now
19661 processes the output of m4: `__oline__' and `#output'.
19662 * data/bison.simple: Adjust to be used by M4(sugar).
19663 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
19664 to date.
19665 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
19666 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
19667 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
19668 shamelessly stolen from CVS Autoconf.
19669
19670 2002-02-05 Akim Demaille <akim@epita.fr>
19671
19672 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
19673 * configure.in: Check for the declarations of free and malloc.
19674 * src/muscle_tab.c: Adjust.
19675
19676 2002-02-05 Akim Demaille <akim@epita.fr>
19677
19678 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
19679 which have no values.
19680
19681 2002-02-05 Akim Demaille <akim@epita.fr>
19682
19683 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
19684 * data/: here.
19685
19686 2002-01-29 Paul Eggert <eggert@twinsun.com>
19687
19688 * src/bison.simple (YYSIZE_T): Do not define merely because
19689 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
19690 On some platforms, <alloca.h> does not declare YYSTD (size_t).
19691
19692 2002-01-27 Akim Demaille <akim@epita.fr>
19693
19694 Fix `%nonassoc and eof'.
19695
19696 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
19697 which were not properly copied! Replace
19698 memcpy (res->errs, src->errs, src->nerrs);
19699 with
19700 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
19701 !!!
19702 * tests/regression.at (%nonassoc and eof): Adjust to newest
19703 Autotest: `.' is not in the PATH.
19704
19705 2002-01-27 Akim Demaille <akim@epita.fr>
19706
19707 * tests/sets.at (AT_EXTRACT_SETS): New.
19708 (Nullable): Use it.
19709 (Firsts): New.
19710
19711 2002-01-26 Akim Demaille <akim@epita.fr>
19712
19713 * tests/actions.at, tests/calc.at, tests/headers.at,
19714 * tests/torture.at: Adjust to the newest Autotest which no longer
19715 forces `.' in the PATH.
19716
19717 2002-01-25 Akim Demaille <akim@epita.fr>
19718
19719 * tests/regression.at (%nonassoc and eof): New.
19720 Suggested by Robert Anisko.
19721
19722 2002-01-24 Akim Demaille <akim@epita.fr>
19723
19724 Bison dumps core when trying to complain about broken input files.
19725 Reported by Cris van Pelt.
19726
19727 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
19728 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
19729 into...
19730 (Invalid inputs): Strengthen: exercise parse_percent_token.
19731
19732 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
19733
19734 * src/Makefile.am: Add bison.c++.
19735 * src/bison.c++: New skeleton.
19736
19737 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
19738
19739 * po/it.po: New.
19740
19741 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
19742
19743 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
19744
19745 2002-01-20 Marc Autret <marc@gnu.org>
19746
19747 * src/files.c (compute_output_file_names): Fix
19748
19749 2002-01-20 Marc Autret <marc@gnu.org>
19750
19751 * tests/output.at: New test.
19752 * src/files.c (compute_base_names): Don't map extensions when
19753 the YACC flag is set, use defaults.
19754 Reported by Evgeny Stambulchik.
19755
19756 2002-01-20 Marc Autret <marc@gnu.org>
19757
19758 * src/system.h: Need to define __attribute__ away for non-GCC
19759 compilers as well (i.e., the vendor C compiler).
19760 Suggested by Albert Chin-A-Young.
19761
19762 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
19763
19764 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
19765 canonical definition.
19766 * src/system.h: Use the canonical definition for PARAMS (avoids
19767 a conflict with the macro from lib/hash.h).
19768
19769 2002-01-11 Akim Demaille <akim@epita.fr>
19770
19771 * configure.in: Use AC_FUNC_STRNLEN.
19772 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
19773
19774 2002-01-09 Akim Demaille <akim@epita.fr>
19775
19776 * src/files.c, src/files.h (output_infix): New.
19777 (tab_extension): Remove.
19778 (compute_base_names): Compute the former, drop the latter.
19779 * src/output.c (prepare): Insert the muscles `output-infix', and
19780 `output-suffix'.
19781 * src/parse-skel.y (string, string.1): New.
19782 (section.header): Use it.
19783 (section.yacc): Remove.
19784 (prefix): Remove too.
19785 * src/scan-skel.l: Adjust.
19786 * src/bison.simple, src/bison.hairy: Adjust.
19787
19788 2002-01-09 Akim Demaille <akim@epita.fr>
19789
19790 * configure.in (WERROR_CFLAGS): Compute it.
19791 * src/Makefile.am (CFLAGS): Pass it.
19792 * tests/atlocal.in (CFLAGS): Idem.
19793 * src/files.c: Fix a few warnings.
19794 (get_extension_index): Remove, unused.
19795
19796 2002-01-08 Akim Demaille <akim@epita.fr>
19797
19798 * src/getargs.c (AS_FILE_NAME): New.
19799 (getargs): Use it to convert DOSish file names.
19800 * src/files.c (base_name): Rename as full_base_name to avoid
19801 clashes with `base_name ()'.
19802 (filename_split): New.
19803 (compute_base_names): N-th rewrite, using filename_split.
19804
19805 2002-01-08 Akim Demaille <akim@epita.fr>
19806
19807 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
19808 New, stolen from the Fileutils 4.1.
19809 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19810 * configure.in: Check for the presence of memrchr, and of its
19811 prototype.
19812
19813 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
19814
19815 * lib/hash.h (__P): Added definition for this macro.
19816 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
19817 BUILT_SOURCES, to ensure they are generated first.
19818 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
19819 %error-verbose to allow bootstrapping with bison 1.30x.
19820
19821 2002-01-06 Akim Demaille <akim@epita.fr>
19822
19823 * src/reader.c (parse_braces): Don't fetch the next char, the
19824 convention is to fetch on entry.
19825 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
19826 'switch' without a following semicolon.
19827 * tests/regression.at (braces parsing): New.
19828
19829 2002-01-06 Akim Demaille <akim@epita.fr>
19830
19831 Bison is dead wrong in its RR conflict reports.
19832
19833 * tests/torture.at (GNU Cim Grammar): New.
19834 * src/conflicts.c (count_rr_conflicts): Fix.
19835
19836 2002-01-06 Akim Demaille <akim@epita.fr>
19837
19838 Creating package.m4 from configure.ac causes too many problems.
19839
19840 * tests/Makefile.am (package.m4): Create it by hand,
19841 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
19842
19843 2002-01-06 Akim Demaille <akim@epita.fr>
19844
19845 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
19846 skeleton.h.
19847
19848 2002-01-04 Paul Eggert <eggert@twinsun.com>
19849
19850 * doc/bison.texinfo (Debugging):
19851 Remove YYSTDERR; it's no longer defined or used.
19852 Also, s/cstdio.h/cstdio/.
19853
19854 2002-01-03 Akim Demaille <akim@epita.fr>
19855
19856 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
19857
19858 2002-01-03 Akim Demaille <akim@epita.fr>
19859
19860 * src/parse-skel.y (process_skeleton): Don't bind the parser's
19861 tracing code to --trace, wait for a better --trace option, with
19862 args.
19863
19864 2002-01-03 Akim Demaille <akim@epita.fr>
19865
19866 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
19867 The ISO C++ standard is extremely clear about it: stderr is
19868 considered a macro, not a regular symbol (see table 94 `Header
19869 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19870 Therefore std:: does not apply to it. It still does with fprintf.
19871 Also, s/cstdio.h/cstdio/.
19872
19873 2002-01-03 Akim Demaille <akim@epita.fr>
19874
19875 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19876 for non system headers.
19877
19878 2002-01-02 Akim Demaille <akim@epita.fr>
19879
19880 Equip the skeleton chain with location tracking, runtime trace,
19881 pure parser and scanner.
19882
19883 * src/parse-skel.y: Request a pure parser, locations, and prefix
19884 renaming.
19885 (%union): Having several members with the same type does not help
19886 type mismatches, simplify.
19887 (YYPRINT, yyprint): New.
19888 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19889 (skel_error): this.
19890 Handle locations.
19891 * src/scan-skel.l: Adjust to these changes.
19892 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19893 (LOCATION_PRINT, skel_control_t): New.
19894
19895 2001-12-30 Akim Demaille <akim@epita.fr>
19896
19897 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19898 replace `gb' with BLANKS.
19899 * src/scan-skel.l: Adjust.
19900
19901 2001-12-30 Akim Demaille <akim@epita.fr>
19902
19903 * src/system.h: We don't need nor want bcopy.
19904 Throw away MS-DOS crap: we don't need getpid.
19905 * configure.in: We don't need strndup. It was even causing
19906 problems: because Flex includes the headers *before* us,
19907 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19908 not visible.
19909 * lib/xstrndup.c: New.
19910 * src/scan-skel.l: Use it.
19911 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19912 * src/parse-skel.y: Use %directives instead of #defines.
19913
19914 2001-12-30 Akim Demaille <akim@epita.fr>
19915
19916 * src/skeleton.h: New.
19917 * src/output.c (output_parser, output_master_parser): Remove, dead
19918 code.
19919 * src/output.h (get_lines_number, actions_output, guards_output)
19920 (token_definitions_output): Prototype them.
19921 * src/parse-skel.y: Add the license notice.
19922 Include output.h and skeleton.h.
19923 (process_skeleton): Returns void, and takes a single parameter.
19924 * src/scan-skel.l: Add the license notice.
19925 Include skeleton.h.
19926 Don't use %option yylineno: it seems that then Flex imagines
19927 REJECT has been used, and therefore it won't reallocate its
19928 buffers (which makes no other sense to me than a bug). It results
19929 in warnings for `unused: yy_flex_realloc'.
19930
19931 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19932
19933 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19934 (MUSCLE_INSERT_PREFIX): ...to there.
19935 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19936 (MUSCLE_INSERT_PREFIX): Move from here...
19937
19938 * src/bison.hairy: Add a section directive. Put braces around muscle
19939 names. This parser skeleton is still broken, but Bison should not
19940 choke on a bad muscle 'syntax'.
19941 * src/bison.simple: Add a section directive. Put braces around muscle
19942 names.
19943
19944 * src/files.h (strsuffix, stringappend): Add declarations.
19945 (tab_extension): Add declaration.
19946 (short_base_name): Add declaration.
19947
19948 * src/files.c (strsuffix, stringappend): No longer static. These
19949 functions are used in the skeleton parser.
19950 (tab_extension): New.
19951 (compute_base_names): Use the computations done in this function
19952 to guess if the generated parsers should have '.tab' in their
19953 names.
19954 (short_base_name): No longer static.
19955
19956 * src/output.c (output_skeleton): New.
19957 (output): Disable call to output_master_parser, and give a try to
19958 a new skeleton handling system.
19959 (guards_output, actions_output): No longer static.
19960 (token_definitions_output, get_lines_number): No longer static.
19961
19962 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19963
19964 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19965 parse-skel.y.
19966
19967 * src/parse-skel.y: New file.
19968 * src/scan-skel.l: New file.
19969
19970 2001-12-29 Akim Demaille <akim@epita.fr>
19971
19972 %name-prefix is broken.
19973
19974 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19975 Adjust all dependencies.
19976 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19977 %name-prefix.
19978
19979 Renaming yylval but not yylloc is not consistent. Now we do.
19980
19981 * src/bison.simple: Prefix yylloc if used.
19982 * doc/bison.texinfo (Decl Summary): Document that.
19983
19984 2001-12-29 Akim Demaille <akim@epita.fr>
19985
19986 * doc/bison.texinfo: Promote `%long-directive' over
19987 `%long_directive'.
19988 Remove all references to fixed-output-files, yacc is enough.
19989
19990 2001-12-29 Akim Demaille <akim@epita.fr>
19991
19992 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19993 user prologue. These are defaults.
19994 * tests/actions.at (Mid-rule actions): Make sure the user can
19995 define YYDEBUG and YYERROR_VERBOSE.
19996
19997 2001-12-29 Akim Demaille <akim@epita.fr>
19998
19999 * src/output.c (header_output): Don't forget to export YYLTYPE and
20000 yylloc.
20001 * tests/headers.at (export YYLTYPE): New, make sure it does.
20002 * tests/regression.at (%union and --defines, Invalid CPP headers):
20003 Move to...
20004 * tests/headers.at: here.
20005
20006 2001-12-29 Akim Demaille <akim@epita.fr>
20007
20008 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20009
20010 2001-12-29 Akim Demaille <akim@epita.fr>
20011
20012 * tests/actions.at (Mid-rule actions): Output on a single line
20013 instead of several.
20014
20015 2001-12-29 Akim Demaille <akim@epita.fr>
20016
20017 * doc/bison.texinfo: Formatting changes.
20018
20019 2001-12-29 Akim Demaille <akim@epita.fr>
20020
20021 Don't store the token defs in a muscle, just be ready to output it
20022 on command. Now possible via `symbols'. Fixes a memory leak.
20023
20024 * src/output.c (token_definitions_output): New.
20025 (output_parser, header_output): Use it.
20026 * src/reader.c (symbols_save): Remove.
20027
20028 2001-12-29 Akim Demaille <akim@epita.fr>
20029
20030 * src/bison.simple: Do not provide a default for YYSTYPE and
20031 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20032 default.
20033
20034 2001-12-29 Akim Demaille <akim@epita.fr>
20035
20036 Mid-rule actions are simply... ignored!
20037
20038 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20039 the empty-rule associated to the dummy symbol, not to the host
20040 rule.
20041 * tests/actions.at (Mid-rule actions): New.
20042
20043 2001-12-29 Akim Demaille <akim@epita.fr>
20044
20045 Memory leak.
20046
20047 * src/reader.c (reader): Free grammar.
20048
20049 2001-12-29 Akim Demaille <akim@epita.fr>
20050
20051 Memory leak.
20052
20053 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20054 since it allocates it for each state, although only one is needed.
20055 (allocate_storage): Do it here.
20056
20057 2001-12-29 Akim Demaille <akim@epita.fr>
20058
20059 * src/options.h, src/options.c (create_long_option_table): Rename
20060 as...
20061 (long_option_table_new): this, with a clearer prototype.
20062 (percent_table): Remove, unused,
20063 * src/getargs.c (getargs): Adjust.
20064
20065 2001-12-29 Akim Demaille <akim@epita.fr>
20066
20067 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20068 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20069 as states.
20070
20071 2001-12-29 Akim Demaille <akim@epita.fr>
20072
20073 * src/lalr.c (build_relations): Rename `states' as `states1'.
20074 Sorry, I don't understand exactly what it is, no better name...
20075
20076 2001-12-29 Akim Demaille <akim@epita.fr>
20077
20078 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20079 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20080 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20081 as rules.
20082
20083 2001-12-29 Akim Demaille <akim@epita.fr>
20084
20085 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20086 ago.
20087
20088 2001-12-29 Akim Demaille <akim@epita.fr>
20089
20090 * src/reader.c, src/reader.h (user_toknums): Remove.
20091 Adjust all users to use symbols[i]->user_token_number.
20092
20093 2001-12-29 Akim Demaille <akim@epita.fr>
20094
20095 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20096 Adjust all users to use symbols[i]->prec or ->assoc.
20097
20098 2001-12-29 Akim Demaille <akim@epita.fr>
20099
20100 * src/reader.c, src/reader.h (tags): Remove.
20101 Adjust all users to use symbols[i]->tag.
20102
20103 2001-12-29 Akim Demaille <akim@epita.fr>
20104
20105 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20106 and rule_table.
20107 * src/reader.c (packsymbols): Fill this table.
20108 Drop sprec.
20109 * src/conflicts.c (resolve_sr_conflict): Adjust.
20110 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20111 single table.
20112 Use symbols[i]->tag instead of tags[i].
20113
20114 2001-12-29 Akim Demaille <akim@epita.fr>
20115
20116 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20117 In addition, put a comment in there, to replace...
20118 * tests/regression.at (%union and C comments): Remove.
20119
20120 2001-12-29 Akim Demaille <akim@epita.fr>
20121
20122 * tests/regression.at (Web2c Actions): Blindly move the actual
20123 output as expected output. The contents *seem* right to me, but I
20124 can't pretend reading perfectly parser tables... Nonetheless, all
20125 the other tests pass correctly, the table look OK, even though the
20126 presence of `$axiom' is to be noted: AFAICS it is useless (but
20127 harmless).
20128
20129 2001-12-29 Akim Demaille <akim@epita.fr>
20130
20131 * src/reader.c (readgram): Don't add the rule 0 if there were no
20132 rules read. In other words, add it _after_ having performed
20133 grammar sanity checks.
20134 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20135
20136 2001-12-29 Akim Demaille <akim@epita.fr>
20137
20138 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20139 visible, and some states have now a different number.
20140
20141 2001-12-29 Akim Demaille <akim@epita.fr>
20142
20143 * src/reader.c (readgram): Bind the initial rule's lineno to that
20144 of the first rule.
20145 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20146 (Solved SR Conflicts): Adjust rule 0's line number.
20147
20148 2001-12-29 Akim Demaille <akim@epita.fr>
20149
20150 Fix the `GAWK Grammar' failure.
20151
20152 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20153 the reductions of the first state which was mistakenly confused
20154 with the final state because precisely final_state was initialized
20155 to 0.
20156 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20157 now noticed by Bison.
20158 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20159 have a reduction on $default.
20160
20161 2001-12-29 Akim Demaille <akim@epita.fr>
20162
20163 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20164 rule line numbers.
20165 * src/closure.c (print_closure): Likewise.
20166 * src/derives.c (print_derives): Likewise.
20167 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20168 now.
20169
20170 2001-12-29 Akim Demaille <akim@epita.fr>
20171
20172 * src/lalr.c (lookaheads_print): New.
20173 (lalr): Call it when --trace-flag.
20174 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20175 are dumped.
20176
20177 2001-12-29 Akim Demaille <akim@epita.fr>
20178
20179 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20180 when walking through ritem, even via rule->rhs.
20181 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20182 (useful_production, useless_nonterminals): Likewise.
20183 (reduce_grammar_tables): Likewise, plus update nritems.
20184 * src/nullable.c (set_nullable): Likewise.
20185 * src/lalr.c (build_relations): Likewise.
20186 * tests/sets.at (Nullable): Adjust.
20187 Fortunately, now, the $axiom is no longer nullable.
20188
20189 2001-12-29 Akim Demaille <akim@epita.fr>
20190
20191 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20192 the 0-sentinel.
20193 * src/gram.c (ritem_longest_rhs): Likewise.
20194 * src/reduce.c (nonterminals_reduce): Likewise.
20195 * src/print_graph.c (print_graph): Likewise.
20196 * src/output.c (output_rule_data): Likewise.
20197 * src/nullable.c (set_nullable): Likewise.
20198
20199 2001-12-29 Akim Demaille <akim@epita.fr>
20200
20201 * src/output.c: Comment changes.
20202
20203 2001-12-27 Paul Eggert <eggert@twinsun.com>
20204
20205 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20206 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20207 Sparc, as they were causing more porting problems than the
20208 (minor) performance improvement was worth.
20209
20210 Also, catch up with 1.31's YYSTD.
20211
20212 2001-12-27 Akim Demaille <akim@epita.fr>
20213
20214 * src/output.c (output_gram): Rely on nritems, not the
20215 0-sentinel. See below.
20216 Use -1 as separator, not 0.
20217 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20218 Rely on -1 as separator in yyrhs, instead of 0.
20219 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20220 twice `Now at end of input', therefore there are two lines less to
20221 expect.
20222
20223 2001-12-27 Akim Demaille <akim@epita.fr>
20224
20225 * tests/regression.at (Unresolved SR Conflicts):
20226 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20227 below.
20228
20229 2001-12-27 Akim Demaille <akim@epita.fr>
20230
20231 * src/LR0.c (new_state): Recognize the final state by the fact it
20232 is reached by eoftoken.
20233 (insert_start_shifting_state, insert_eof_shifting_state)
20234 (insert_accepting_state, augment_automaton): Remove, since now
20235 these states are automatically computed from the initial state.
20236 (generate_states): Adjust.
20237 * src/print.c: When reporting a rule number to the user, substract
20238 1, so that the axiom rule is rule 0, and the first user rule is 1.
20239 * src/reduce.c: Likewise.
20240 * src/print_graph.c (print_core): For the time being, just as for
20241 the report, depend upon --trace-flags to dump the full set of
20242 items.
20243 * src/reader.c (readgram): Once the grammar read, insert the rule
20244 0: `$axiom: START-SYMBOL $'.
20245 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20246 number of the states has changed (the final state is no longer
20247 necessarily the last), catch up.
20248
20249 2001-12-27 Akim Demaille <akim@epita.fr>
20250
20251 Try to make the use of the eoftoken valid. Given that its value
20252 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20253 is used instead of > 0 where appropriate, (ii), depend upon nritems
20254 instead of the 0-sentinel.
20255
20256 * src/gram.h, src/gram.c (nritems): New.
20257 Expected to be duplication of nitems, but for the time being...
20258 * src/reader.c (packgram): Assert nritems and nitems are equal.
20259 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20260 * src/closure.c (print_closure, print_fderives): Likewise.
20261 * src/gram.c (ritem_print): Likewise.
20262 * src/print.c (print_core, print_grammar): Likewise.
20263 * src/print_graph.c: Likewise.
20264
20265 2001-12-27 Akim Demaille <akim@epita.fr>
20266
20267 * src/main.c (main): If there are complains after grammar
20268 reductions, then output the report anyway if requested, then die.
20269 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20270 * src/reader.c (eoftoken): New.
20271 (parse_token_decl): If the token being defined has value `0', it
20272 is the eoftoken.
20273 (packsymbols): No longer hack `tags' to insert `$' by hand.
20274 Be sure to preserve the value of the eoftoken.
20275 (reader): Make sure eoftoken is defined.
20276 Initialize nsyms to 0: now eoftoken is created just like the others.
20277 * src/print.c (print_grammar): Don't special case the eof token.
20278 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20279 lie anyway, albeit pleasant.
20280 * tests/calc.at: Exercise error messages with eoftoken.
20281 Change the grammar so that empty input is invalid.
20282 Adjust expectations.
20283 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20284
20285 2001-12-27 Akim Demaille <akim@epita.fr>
20286
20287 * configure.in: Check the protos of strchr ans strspn.
20288 Replace strchr if needed.
20289 * src/system.h: Provide the protos of strchr, strspn and memchr if
20290 missing.
20291 * lib/strchr.c: New.
20292 * src/reader.c (symbols_save): Use strchr.
20293
20294 2001-12-27 Akim Demaille <akim@epita.fr>
20295
20296 * src/print.c, src/print_graph.c (escape): New.
20297 Use it to quote the TAGS outputs.
20298 * src/print_graph.c (print_state): Now errors are in red, and
20299 reductions in green.
20300 Prefer high to wide: output the state number on a line of its own.
20301
20302 2001-12-27 Akim Demaille <akim@epita.fr>
20303
20304 * src/state.h, src/state.c (reductions_new): New.
20305 * src/LR0.c (set_state_table): Let all the states have a
20306 `reductions', even if reduced to 0.
20307 (save_reductions): Adjust.
20308 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20309 * src/print.c (print_reductions, print_actions): Adjust.
20310 * src/output.c (action_row): Adjust.
20311
20312 2001-12-27 Akim Demaille <akim@epita.fr>
20313
20314 * src/state.h, src/state.c (errs_new, errs_dup): New.
20315 * src/LR0.c (set_state_table): Let all the states have an errs,
20316 even if reduced to 0.
20317 * src/print.c (print_errs, print_reductions): Adjust.
20318 * src/output.c (output_actions, action_row): Adjust.
20319 * src/conflicts.c (resolve_sr_conflict): Adjust.
20320
20321 2001-12-27 Akim Demaille <akim@epita.fr>
20322
20323 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20324
20325 2001-12-27 Akim Demaille <akim@epita.fr>
20326
20327 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20328 * src/print.c: here.
20329 (lookaheadset, shiftset): New, used as additional storage by
20330 print_reductions.
20331 (print_results): Adjust.
20332 (print_shifts, print_gotos, print_errs): New, extracted from...
20333 (print_actions): here.
20334 * src/print_graph.c (print_actions): Remove dead code.
20335
20336 2001-12-27 Akim Demaille <akim@epita.fr>
20337
20338 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20339 `$n' and `@n'.
20340
20341 2001-12-27 Akim Demaille <akim@epita.fr>
20342
20343 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20344 (build_relations): Adjust.
20345
20346 2001-12-27 Akim Demaille <akim@epita.fr>
20347
20348 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20349 duplication.
20350
20351 2001-12-27 Akim Demaille <akim@epita.fr>
20352
20353 * src/reader.c (packgram): Catch nitems overflows.
20354
20355 2001-12-27 Akim Demaille <akim@epita.fr>
20356
20357 * src/files.c, src/files.h (guard_obstack): Remove.
20358 * src/output.c (output): Adjust.
20359 * src/reader.c (parse_braces): New, factoring...
20360 (copy_action, copy_guard): these two which are renamed as...
20361 (parse_action, parse_guard): these.
20362 As a voluntary consequence, using braces around guards is now
20363 mandatory.
20364
20365 2001-12-27 Akim Demaille <akim@epita.fr>
20366
20367 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20368 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20369 members.
20370 (symbol_list_new): Adjust.
20371 (copy_action): action_line is the first line, not the last.
20372 (copy_guard): Just as for actions, store the `action' only, not
20373 the switch/case/break flesh.
20374 Don't parse the user action that might follow the guard, let...
20375 (readgram): do it, i.e., now, there can be an action after a
20376 guard.
20377 In other words the guard is just explicitly optional.
20378 (packgram): Adjust.
20379 * src/output.c (guards_output): New.
20380 (output_parser): Call it when needed.
20381 (output): Also free the guard and attrs obstacks.
20382 * src/files.c, src/files.h (obstack_save): Remove.
20383 (output_files): Remove.
20384 As a result, if one needs the former `.act' file, using an
20385 appropriate skeleton which requires actions and guards is now
20386 required.
20387 * src/main.c (main): Adjust.
20388 * tests/semantic.at: New.
20389 * tests/regression.at: Use `input.y' as input file name.
20390 Avoid 8+3 problems by requiring input.c when the test needs the
20391 parser.
20392
20393 2001-12-27 Akim Demaille <akim@epita.fr>
20394
20395 * src/reader.c (symbol_list_new): Be sure to initialize all the
20396 fields.
20397
20398 2001-12-27 Akim Demaille <akim@epita.fr>
20399
20400 All the hacks using a final pseudo state are now useless.
20401
20402 * src/LR0.c (set_state_table): state_table holds exactly nstates.
20403 * src/lalr.c (nLA): New.
20404 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
20405 instead of lookaheadsp from the pseudo state (nstate + 1).
20406
20407 2001-12-27 Akim Demaille <akim@epita.fr>
20408
20409 * src/output.c (action_row, token_actions): Use a state_t instead
20410 of a integer, and nlookaheads instead of the following state's
20411 lookaheadsp.
20412
20413 2001-12-27 Akim Demaille <akim@epita.fr>
20414
20415 * src/conflicts.c (log_resolution, flush_shift)
20416 (resolve_sr_conflict, set_conflicts, solve_conflicts)
20417 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
20418 (conflicts_print, print_reductions): Use a state_t instead of an
20419 integer when referring to a state.
20420 As much as possible, depend upon nlookaheads, instead of the
20421 `lookaheadsp' member of the following state (since lookaheads of
20422 successive states are successive, the difference between state n + 1
20423 and n served as the number of lookaheads for state n).
20424 * src/lalr.c (add_lookback_edge): Likewise.
20425 * src/print.c (print_core, print_actions, print_state)
20426 (print_results): Likewise.
20427 * src/print_graph.c (print_core, print_actions, print_state)
20428 (print_graph): Likewise.
20429 * src/conflicts.h: Adjust.
20430
20431 2001-12-27 Akim Demaille <akim@epita.fr>
20432
20433 * src/bison.hairy: Formatting/comment changes.
20434 ANSIfy.
20435 Remove `register' indications.
20436 Add plenty of `static'.
20437
20438 2001-12-27 Akim Demaille <akim@epita.fr>
20439
20440 * src/output.c (prepare): Drop the muscle `ntbase' which
20441 duplicates ntokens.
20442 * src/bison.simple: Formatting/comment changes.
20443 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
20444 is an undocumented synonym.
20445
20446 2001-12-22 Akim Demaille <akim@epita.fr>
20447
20448 * src/output.c (output_table_data): Change the prototype to use
20449 `int' for array ranges: some invocations do pass an int, not a
20450 short.
20451 Reported by Wayne Green.
20452
20453 2001-12-22 Akim Demaille <akim@epita.fr>
20454
20455 Some actions of web2c.y are improperly triggered.
20456 Reported by Mike Castle.
20457
20458 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
20459 * tests/regression.at (Web2c): Rename as...
20460 (Web2c Report): this.
20461 (Web2c Actions): New.
20462
20463 2001-12-22 Akim Demaille <akim@epita.fr>
20464
20465 Reductions in web2c.y are improperly reported.
20466 Reported by Mike Castle.
20467
20468 * src/conflicts.c (print_reductions): Fix.
20469 * tests/regression.at (Web2c): New.
20470
20471 2001-12-18 Akim Demaille <akim@epita.fr>
20472
20473 Some host fail on `assert (!"foo")', which expands to
20474 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
20475 Reported by Nelson Beebee.
20476
20477 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
20478 `#define it_succeeded 0' and `assert (it_succeeded)'.
20479
20480 2001-12-17 Marc Autret <autret_m@epita.fr>
20481
20482 * src/bison.simple: Don't hard code the skeleton line and filename.
20483 * src/output.c (output_parser): Rename 'line' as 'output_line'.
20484 New line counter 'skeleton_line' (skeleton-line muscle).
20485
20486 2001-12-17 Paul Eggert <eggert@twinsun.com>
20487
20488 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
20489 YYDEBUG must be defined to a nonzero value.
20490
20491 * src/bison.simple (yytname): Do not assume that the user defines
20492 YYDEBUG to a properly parenthesized expression.
20493
20494 2001-12-17 Akim Demaille <akim@epita.fr>
20495
20496 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
20497 nlookaheads is a new member.
20498 Adjust all users.
20499 * src/lalr.h (nlookaheads): Remove this orphan declaration.
20500 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
20501 state.
20502
20503 2001-12-17 Akim Demaille <akim@epita.fr>
20504
20505 * src/files.h, src/files.c (open_files, close_files): Remove.
20506 * src/main.c (main): Don't open/close files, nor invoke lex_free,
20507 let...
20508 * src/reader.c (reader): Do it.
20509
20510 2001-12-17 Akim Demaille <akim@epita.fr>
20511
20512 * src/conflicts.c (print_reductions): Formatting changes.
20513
20514 2001-12-17 Akim Demaille <akim@epita.fr>
20515
20516 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
20517 (flush_reduce): New.
20518 (resolve_sr_conflict): Adjust.
20519
20520 2001-12-17 Akim Demaille <akim@epita.fr>
20521
20522 * src/output.c (output_obstack): Be static and rename as...
20523 (format_obstack): this, to avoid any confusion with files.c's
20524 output_obstack.
20525 * src/reader.h (muscle_obstack): Move to...
20526 * src/output.h: here, since it's defined in output.c.
20527
20528 2001-12-17 Akim Demaille <akim@epita.fr>
20529
20530 * src/output.c (action_row, save_column, default_goto)
20531 (sort_actions, matching_state, pack_vector): Better variable
20532 locality.
20533
20534 2001-12-17 Akim Demaille <akim@epita.fr>
20535
20536 * src/output.c: Various formatting changes.
20537
20538 2001-12-17 Akim Demaille <akim@epita.fr>
20539
20540 * src/files.c (output_files): Free the output_obstack.
20541 * src/main.c (main): Call print and print_graph conditionally.
20542 * src/print.c (print): Work unconditionally.
20543 * src/print_graph.c (print_graph): Work unconditionally.
20544 * src/conflicts.c (log_resolution): Output only if verbose_flag.
20545
20546 2001-12-16 Marc Autret <autret_m@epita.fr>
20547
20548 * src/output.c (actions_output): Fix. When we use %no-lines,
20549 there is one less line per action.
20550
20551 2001-12-16 Marc Autret <autret_m@epita.fr>
20552
20553 * src/bison.simple: Remove a useless #line directive.
20554 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
20555 * src/output.c (get_lines_number): New.
20556 (output_parser): Adjust, now takes care about the lines of a
20557 output muscles.
20558 Fix line numbering.
20559 (actions_output): Computes the number of lines taken by actions.
20560 (output_master_parser): Insert new skeleton which is the name of
20561 the output parser file name.
20562
20563 2001-12-15 Marc Autret <autret_m@epita.fr>
20564
20565 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
20566
20567 2001-12-15 Marc Autret <autret_m@epita.fr>
20568
20569 * src/output.c (output_gram): Keep track of the hairy one.
20570
20571 2001-12-15 Akim Demaille <akim@epita.fr>
20572
20573 Make `make distcheck' work.
20574
20575 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
20576 system.h which uses libgettext.h.
20577
20578 2001-12-15 Akim Demaille <akim@epita.fr>
20579
20580 * src/nullable.c (set_nullable): Useless rules must be skipped,
20581 otherwise, since we range over their symbols, we might look at a
20582 nonterminal which no longer ``exists'', i.e., it is not counted in
20583 `nvars', hence we overflow our arrays.
20584
20585 2001-12-15 Akim Demaille <akim@epita.fr>
20586
20587 The header can also be produced directly, without any obstack!
20588 Yahoo!
20589
20590 * src/files.c, src/files.h (defines_obstack): Remove.
20591 (compute_header_macro): Global.
20592 (defines_obstack_save): Remove.
20593 * src/reader.c (parse_union_decl): No longer output to
20594 defines_obstack: its content can be found in the `stype' muscle
20595 anyway.
20596 (output_token_translations): Merge into...
20597 (symbols_output): this.
20598 Rename as...
20599 (symbols_save): this.
20600 (reader): Adjust.
20601 * src/output.c (header_output): New.
20602 (output): Call it.
20603
20604 2001-12-15 Akim Demaille <akim@epita.fr>
20605
20606 * src/reader.c (parse_union_decl): Instead of handling two obstack
20607 simultaneously, use one to define the `stype' muscle, and use the
20608 value of the latter to fill defines_obstack.
20609 (copy_comment): Remove.
20610 (copy_comment2): Work for a single obstack.
20611 Rename as...
20612 (copy_comment): this.
20613
20614 2001-12-15 Akim Demaille <akim@epita.fr>
20615
20616 * src/lex.c, src/lex.h (xgetc): No longer static.
20617 * src/reader.c (parse_union_decl): Revamp.
20618
20619 2001-12-15 Akim Demaille <akim@epita.fr>
20620
20621 Still making progress in separating Bison into (i) input, (ii)
20622 process, (iii) output: now we can directly output the parser file
20623 without using table_obstack at all.
20624
20625 * src/files.c, src/files.h (table_obstack): Bye bye.
20626 (parser_file_name): New.
20627 * src/files.c (compute_output_file_names): Compute it.
20628 * src/output.c (actions_output, output_parser)
20629 (output_master_parser): To a file instead of an obstack.
20630
20631 2001-12-15 Akim Demaille <akim@epita.fr>
20632
20633 Attach actions to rules, instead of pre-outputting them to
20634 actions_obstack.
20635
20636 * src/gram.h (rule_t): action and action_line are new members.
20637 * src/reader.c (symbol_list): Likewise.
20638 (copy_action): Save the actions within the rule.
20639 (packgram): Save them in rule_table.
20640 * src/output.c (actions_output): New.
20641 (output_parser): Use it on `%%actions'.
20642 (output_rule_data): Don't free rule_table.
20643 (output): Do it.
20644 (prepare): Don't save the `action' muscle.
20645 * src/bison.simple: s/%%action/%%actions/.
20646
20647 2001-12-15 Akim Demaille <akim@epita.fr>
20648
20649 * src/reader.c (copy_action): When --yacc, don't append a `;'
20650 to the user action: let it fail if lacking.
20651 Suggested by Arnold Robbins and Tom Tromey.
20652
20653 2001-12-14 Akim Demaille <akim@epita.fr>
20654
20655 * src/lex.c (literalchar): Simply return the char you decoded, non
20656 longer mess around with obstacks and int pointers.
20657 Adjust all callers.
20658
20659 2001-12-14 Akim Demaille <akim@epita.fr>
20660
20661 * src/lex.c (literalchar): Don't escape the special characters,
20662 just decode them, and keep them as char (before, eol was output as
20663 the 2 char string `\n' etc.).
20664 * src/output.c (output_rule_data): Use quotearg to output the
20665 token strings.
20666
20667 2001-12-13 Paul Eggert <eggert@twinsun.com>
20668
20669 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
20670 Do not infringe on the global user namespace when using C++.
20671 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
20672 All uses of `fprintf' and `stderr' changed.
20673
20674 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
20675
20676 2001-12-13 Akim Demaille <akim@epita.fr>
20677
20678 The computation of nullable is broken: it doesn't handle empty
20679 RHS's properly.
20680
20681 * tests/torture.at (GNU AWK Grammar): New.
20682 * tests/sets.at (Nullable): New.
20683 * src/nullable.c (set_nullable): Instead of blindly looping over
20684 `ritems', loop over the rules, and then over their rhs's.
20685
20686 Work around Autotest bugs.
20687
20688 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
20689 frame, because Autotest understand lines starting with a `+' as
20690 traces from the shell. Then, they are not processed properly.
20691 Admittedly an Autotest bug, but we don't have time to wait for
20692 Autotest to catch up.
20693 * tests/regression.at (Broken Closure): Adjust to the new table
20694 frames.
20695 Move to...
20696 * tests/sets.at: here.
20697
20698 2001-12-13 Akim Demaille <akim@epita.fr>
20699
20700 * src/closure.c (closure): Use nrules instead of playing tricks
20701 with BITS_PER_WORD.
20702
20703 2001-12-13 Akim Demaille <akim@epita.fr>
20704
20705 * src/print.c (print_actions): Output the handling of `$' as the
20706 traces do: shifting the token EOF. Before EOF was treated as a
20707 nonterminal.
20708 * tests/regression.at: Adjust some tests.
20709 * src/print_graph.c (print_core): Complete the set of items via
20710 closure. The next-to-final and final states are still unsatisfying,
20711 but that's to be addressed elsewhere.
20712 No longer output the rule numbers, but do output the state number.
20713 A single loop for the shifts + gotos is enough, but picked a
20714 distinct color for each.
20715 (print_graph): Initialize and finalize closure.
20716
20717 2001-12-13 Akim Demaille <akim@epita.fr>
20718
20719 * src/reader.c (readgram): Remove dead code, an strip useless
20720 braces.
20721 (get_type): Remove, unused.
20722
20723 2001-12-12 Akim Demaille <akim@epita.fr>
20724
20725 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
20726 on that of lib/error.c.
20727
20728 2001-12-12 Akim Demaille <akim@epita.fr>
20729
20730 Some hosts don't like `/' in includes.
20731
20732 * src/system.h: Include libgettext.h without qualifying the path.
20733 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
20734 $(top_srcdir).
20735
20736 2001-12-11 Marc Autret <autret_m@epita.fr>
20737
20738 * src/output.c (output_parser): Remove useless muscle.
20739
20740 2001-12-11 Marc Autret <autret_m@epita.fr>
20741
20742 * src/bison.simple: Remove #line just before %%epilogue. It
20743 is now handled in ...
20744 * src/reader.c (read_additionnal_code): Add the output of a
20745 #line for the epilogue.
20746
20747 2001-12-10 Marc Autret <autret_m@epita.fr>
20748
20749 * src/reader.c (copy_definition): Re-use CPP-outed code which
20750 replace precedent remove.
20751 * src/bison.simple: Remove #line before %%prologue because
20752 %%input-line is wrong at this time.
20753
20754 2001-12-10 Marc Autret <autret_m@epita.fr>
20755
20756 * src/reader.c (symbols_output): Clean up.
20757 * src/output.c (output_gram, output): Clean up.
20758
20759 2001-12-10 Akim Demaille <akim@epita.fr>
20760
20761 * src/lalr.c (initialize_lookaheads): New. Extracted from...
20762 * src/LR0.c (set_state_table): here.
20763 * src/lalr.c (lalr): Call it.
20764
20765 2001-12-10 Akim Demaille <akim@epita.fr>
20766
20767 * src/state.h (shifts): Remove the `number' member: shifts are
20768 attached to state, hence no longer need to be labelled with a
20769 state number.
20770
20771 2001-12-10 Akim Demaille <akim@epita.fr>
20772
20773 Now that states have a complete set of members, the linked list of
20774 shifts is useless: just fill directly the state's shifts member.
20775
20776 * src/state.h (shifts): Remove the `next' member.
20777 * src/LR0.c (first_state, last_state): Remove.
20778 Adjust the callers.
20779 (augment_automaton): Don't look for the shifts that must be added
20780 a shift on EOF: it is those of the state we looked for! But now,
20781 since shifts are attached, it is no longer needed to looking
20782 merely by its id: its number.
20783
20784 2001-12-10 Akim Demaille <akim@epita.fr>
20785
20786 * src/LR0.c (augment_automaton): Better variable locality.
20787 Remove an impossible branch: if there is a state corresponding to
20788 the start symbol being shifted, then there is shift for the start
20789 symbol from the initial state.
20790
20791 2001-12-10 Akim Demaille <akim@epita.fr>
20792
20793 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
20794 only when appropriate: when insert_start_shifting_state' is not
20795 invoked.
20796 * tests/regression.at (Rule Line Numbers): Adjust.
20797
20798 2001-12-10 Akim Demaille <akim@epita.fr>
20799
20800 * src/LR0.c (augment_automaton): Now that all states have shifts,
20801 merge the two cases addition shifts to the initial state.
20802
20803 2001-12-10 Akim Demaille <akim@epita.fr>
20804
20805 * src/lalr.c (set_state_table): Move to...
20806 * src/LR0.c: here.
20807 * src/lalr.c (lalr): Don't call it...
20808 * src/LR0.c (generate_states): do it.
20809 * src/LR0.h (first_state): Remove, only the table is used.
20810
20811 2001-12-10 Akim Demaille <akim@epita.fr>
20812
20813 * src/LR0.h (first_shift, first_reduction): Remove.
20814 * src/lalr.c: Don't use first_shift: find shifts through the
20815 states.
20816
20817 2001-12-10 Akim Demaille <akim@epita.fr>
20818
20819 * src/LR0.c: Attach shifts to states as soon as they are
20820 computed.
20821 * src/lalr.c (set_state_table): Instead of assigning shifts to
20822 state, just assert that the mapping was properly done.
20823
20824 2001-12-10 Akim Demaille <akim@epita.fr>
20825
20826 * src/LR0.c (insert_start_shift): Rename as...
20827 (insert_start_shifting_state): this.
20828 (insert_eof_shifting_state, insert_accepting_state): New.
20829 (augment_automaton): Adjust.
20830 Better locality of the variables.
20831 When looking if the start_symbol is shifted from the initial
20832 state, using `while (... symbol != start_symbol ...)' sounds
20833 better than `while (... symbol < start_symbol ...)': If fail
20834 to see how the order between symbols could be relevant!
20835
20836 2001-12-10 Akim Demaille <akim@epita.fr>
20837
20838 * src/getargs.h: Don't declare `spec_name_prefix' and
20839 `spec_file_prefix', declared by src/files.h.
20840 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
20841 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
20842 * src/output.c (prepare): Adjust.
20843 * src/reader.c (symbols_output): Likewise.
20844 * src/vmsgetargs.c: Vaguely adjust, but who cares?
20845
20846 2001-12-10 Akim Demaille <akim@epita.fr>
20847
20848 * src/muscle_tab.c (muscle_init): NULL is a better default than
20849 `"0"'.
20850
20851 2001-12-10 Akim Demaille <akim@epita.fr>
20852
20853 * src/reader.c (reader): Calling symbols_output once is enough.
20854
20855 2001-12-10 Akim Demaille <akim@epita.fr>
20856
20857 Now that states have a complete set of members, the linked list of
20858 reductions is useless: just fill directly the state's reductions
20859 member.
20860
20861 * src/state.h (struct reductions): Remove member `number' and
20862 `next'.
20863 * src/LR0.c (first_reduction, last_reduction): Remove.
20864 (save_reductions): Don't link the new reductions, store them in
20865 this_state.
20866 * src/lalr.c (set_state_table): No need to attach reductions to
20867 states, it's already done.
20868 * src/output.c (output_actions): No longer free the shifts, then
20869 the reductions, then the states: free all the states and their
20870 members.
20871
20872 2001-12-10 Akim Demaille <akim@epita.fr>
20873
20874 * src/options.c (OPTN, DRTV, BOTH): New.
20875 (option_table): Use them.
20876
20877 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20878 the job of system.h.
20879 * src/options.c: Don't include stdio.h and xalloc.h for the same
20880 reasons.
20881
20882 2001-12-10 Akim Demaille <akim@epita.fr>
20883
20884 * src/output.c (output, prepare): Make sure the values of the
20885 muscles `action' and `prologue' are 0-terminated.
20886
20887 2001-12-10 Akim Demaille <akim@epita.fr>
20888
20889 Clean up GCC warnings.
20890
20891 * src/reader.c (copy_action): `buf' is not used.
20892 (parse_skel_decl): Be static.
20893 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20894 * src/options.h (create_long_option_table): Have a real prototype.
20895 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20896 (hash_delete_at): Return const void *.
20897 Adjust casts to preserve the const.
20898
20899 2001-12-10 Akim Demaille <akim@epita.fr>
20900
20901 * configure.in: Require 2.52g.
20902 M4 is not needed, but AUTOM4TE is.
20903 * m4/m4.m4: Remove.
20904 * tests/Makefile.am: Adjust.
20905
20906 2001-12-10 Akim Demaille <akim@epita.fr>
20907
20908 One structure for states is enough, even though theoretically
20909 there are LR(0) states and LALR(1) states.
20910
20911 * src/lalr.h (state_t): Remove.
20912 (state_table): Be state_t **, not state_t *.
20913 * src/state.h (core, CORE_ALLOC): Rename as...
20914 (state_t, STATE_ALLOC): this.
20915 Add the LALR(1) members: shifts, reductions, errs.
20916 * src/LR0.c (state_table): Rename as...
20917 (state_hash): this, to avoid name clashes with the global
20918 `state_table'.
20919 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20920 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20921
20922 2001-12-10 Akim Demaille <akim@epita.fr>
20923
20924 Bison dumps core on bash.y.
20925 Reported by Pascal Bart.
20926
20927 * src/warshall.c (bitmatrix_print): New.
20928 (TC): Use it.
20929 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20930 j must be the outer loop.
20931 * tests/regression.at (Broken Closure): New.
20932
20933 2001-12-05 Akim Demaille <akim@epita.fr>
20934
20935 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20936 its argument.
20937 Reported by Peter Hamorsky.
20938
20939 2001-12-05 Akim Demaille <akim@epita.fr>
20940
20941 * src/conflicts.c (err_table): Remove.
20942 (resolve_sr_conflict): Adjust.
20943 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20944 Rename as...
20945 (state_t.reductions, state_t.shifts): this.
20946
20947 2001-12-05 Akim Demaille <akim@epita.fr>
20948
20949 * src/reduce.c (reduce_grammar_tables): No longer disable the
20950 removal of useless rules via CPP but via `if (0)', so that the
20951 compiler still check the code is valid.
20952 For instance, it should have noticed `rline' no longer exists: use
20953 the `line' member of rule_t.
20954 * src/gram.c (dummy, rline): Remove, unused.
20955
20956 2001-12-05 Akim Demaille <akim@epita.fr>
20957
20958 * src/output.c (pack_vector): Use assert, not berror.
20959 * src/main.c (berror): Remove, unused.
20960
20961 2001-12-05 Akim Demaille <akim@epita.fr>
20962
20963 New experimental feature: if --verbose --trace output all the
20964 items of a state, not only its kernel.
20965
20966 * src/print.c (print_core): If `trace_flag', then invoke closure
20967 before outputting the items of the state (print_core is no longer
20968 a correct name them).
20969 (print_results): Invoke new_closure/free_closure if needed.
20970
20971 2001-12-05 Akim Demaille <akim@epita.fr>
20972
20973 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20974 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20975 (nitemset): for consistency with the rest of the project.
20976
20977 2001-12-05 Akim Demaille <akim@epita.fr>
20978
20979 * src/closure.c (print_closure): Improve.
20980 (closure): Use it for printing input and output.
20981
20982 2001-12-05 Akim Demaille <akim@epita.fr>
20983
20984 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20985 indexed by nonterminals.
20986
20987 2001-12-05 Akim Demaille <akim@epita.fr>
20988
20989 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20990 what it was!).
20991 * src/warshall.h: Remove accidental duplication of the content.
20992
20993 2001-12-05 Akim Demaille <akim@epita.fr>
20994
20995 * src/closure.c (set_fderives): De-obfuscate.
20996
20997 2001-12-05 Akim Demaille <akim@epita.fr>
20998
20999 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21000
21001 2001-12-05 Akim Demaille <akim@epita.fr>
21002
21003 * src/closure.c (set_firsts): De-obfuscate.
21004
21005 2001-12-05 Akim Demaille <akim@epita.fr>
21006
21007 * src/output.c (action_row): De-obfuscate
21008 using the good o' techniques: arrays not pointers, variable
21009 locality, BITISSET, RESETBIT etc.
21010
21011 2001-12-05 Akim Demaille <akim@epita.fr>
21012
21013 Pessimize the code to simplify it: from now on, all the states
21014 have a valid SHIFTS, which NSHIFTS is possibly 0.
21015
21016 * src/LR0.c (shifts_new): Be global and move to..
21017 * src/state.c, src/state.h: here.
21018 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21019 * src/print_graph: Adjust.
21020
21021 2001-12-05 Akim Demaille <akim@epita.fr>
21022
21023 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21024 * src/conflicts.c: Use it.
21025 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21026 incorrectly ``simplified''.
21027
21028 2001-12-05 Akim Demaille <akim@epita.fr>
21029
21030 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21031 using the good o' techniques: arrays not pointers, variable
21032 locality, BITISSET, RESETBIT etc.
21033
21034 2001-12-05 Akim Demaille <akim@epita.fr>
21035
21036 * src/state.h (SHIFT_SYMBOL): New.
21037 * src/conflicts.c: Use it to deobfuscate.
21038
21039 2001-12-05 Akim Demaille <akim@epita.fr>
21040
21041 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21042 (print_reductions): De-obfuscate using the good o' techniques:
21043 arrays not pointers, variable locality, BITISSET.
21044
21045 2001-12-05 Akim Demaille <akim@epita.fr>
21046
21047 * src/conflicts.c (print_reductions): Arrays, not pointers.
21048 Use BITISSET.
21049
21050 2001-12-05 Akim Demaille <akim@epita.fr>
21051
21052 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21053
21054 2001-12-05 Akim Demaille <akim@epita.fr>
21055
21056 * src/conflicts.c (print_reductions): Improve variable locality.
21057
21058 2001-12-05 Akim Demaille <akim@epita.fr>
21059
21060 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21061
21062 2001-12-05 Akim Demaille <akim@epita.fr>
21063
21064 * src/conflicts.c (print_reductions): Improve variable locality.
21065
21066 2001-12-05 Akim Demaille <akim@epita.fr>
21067
21068 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21069 * src/lalr.c: Use them.
21070
21071 2001-12-05 Akim Demaille <akim@epita.fr>
21072
21073 * src/LR0.c (augment_automaton): Formatting changes.
21074 Better variable locality.
21075
21076 2001-12-05 Akim Demaille <akim@epita.fr>
21077
21078 * src/lalr.c (matrix_print): New.
21079 (transpose): Use it.
21080 Use arrays instead of pointers.
21081
21082 2001-12-05 Akim Demaille <akim@epita.fr>
21083
21084 * src/lalr.c (maxrhs): Move to...
21085 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21086 * src/lalr.c (build_relations): Adjust.
21087
21088 2001-12-05 Akim Demaille <akim@epita.fr>
21089
21090 * src/lalr.c (transpose): Free the memory allocated to the
21091 argument, as it is replaced by the results by the unique caller.
21092 (build_relations): Merely invoke transpose: it handles the memory
21093 deallocation.
21094 Improve variable locality.
21095 Avoid variables used as mere abbreviations.
21096 (compute_lookaheads): Use arrays instead of pointers.
21097
21098 2001-12-05 Akim Demaille <akim@epita.fr>
21099
21100 * src/lalr.c (initialize_F): Improve variable locality.
21101 Avoid variables used as mere abbreviations.
21102
21103 2001-12-05 Akim Demaille <akim@epita.fr>
21104
21105 * src/derives.c (print_derives): Display the ruleno.
21106 * src/lalr.c (initialize_F, transpose): Better variable locality
21107 to improve readability.
21108 Avoid variables used as mere abbreviations.
21109
21110 2001-12-05 Akim Demaille <akim@epita.fr>
21111
21112 * src/lalr.c (traverse): Use arrays instead of pointers.
21113
21114 2001-12-05 Akim Demaille <akim@epita.fr>
21115
21116 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21117 the handling of squeue.
21118 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21119
21120 2001-12-05 Akim Demaille <akim@epita.fr>
21121
21122 Because useless nonterminals are now kept alive (instead of being
21123 `destroyed'), we now sometimes examine them, and store information
21124 related to them. Hence we need to know their number, and adjust
21125 memory allocations.
21126
21127 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21128 static.
21129 * src/LR0.c (allocate_itemsets): The memory allocated to
21130 `symbol_count' was used for two different purpose: once to count
21131 the number of occurrences of each symbol, and later reassigned to
21132 `shift_symbol', containing the symbol that can be shifted from a
21133 given state.
21134 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21135 only, and...
21136 (new_itemsets): Allocate `shift_symbol' here.
21137 (allocate_itemsets): symbol_count includes useless nonterminals.
21138 Make room for them.
21139 (free_storage): Use `free', not `XFREE', for pointers that cannot
21140 be null.
21141
21142 2001-12-05 Akim Demaille <akim@epita.fr>
21143
21144 * src/nullable.c (set_nullable): Deobfuscate the handling of
21145 ritem.
21146 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21147
21148 2001-12-05 Akim Demaille <akim@epita.fr>
21149
21150 * src/gram.c, src/gram.h (ritem_print): New.
21151 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21152 (This useless function was defined only to work around VMS linkers
21153 that can't handle compilation units with variables only).
21154 * src/reduce.c (dump_grammar): Use it to trace the construction of
21155 ritem.
21156
21157 2001-12-04 Paul Eggert <eggert@twinsun.com>
21158
21159 * src/bison.simple (union yyalloc): Change member names
21160 to be the same as the stack names.
21161 (yyparse): yyptr is now union yyalloc *, not char *.
21162 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21163 and may generate better code on some machines.
21164 (yystpcpy): Use prototype if __STDC__ is defined, not just
21165 if __cplusplus is defined.
21166
21167 2001-11-30 Akim Demaille <akim@epita.fr>
21168
21169 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21170 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21171 Gettext doesn't compile cleanly, and dies with -Werror.
21172 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21173 Include WARNING_CFLAGS here.
21174 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21175 before being defined.
21176
21177 2001-11-27 Paul Eggert <eggert@twinsun.com>
21178
21179 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21180 First arg is int, not unsigned.
21181 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21182 (SIZE_MAX, UINT_MAX): New macros.
21183 (quotearg_n_options): Abort if N is negative.
21184 Avoid overflow check on hosts where size_t is 64 bits and int
21185 is 32 bits, as overflow is impossible there.
21186 Fix off-by-one typo that caused unnecessary reallocation.
21187
21188 2001-11-29 Paul Eggert <eggert@twinsun.com>
21189
21190 Name space cleanup in generated parser.
21191
21192 * doc/bison.texinfo (Bison Parser): Discuss system headers
21193 and their effect on the user name space.
21194
21195 * src/bison.simple:
21196 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21197 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21198 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21199
21200 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21201 on user names when possible.
21202
21203 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21204 Simplify test for whather <alloca.h> exists.
21205
21206 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21207
21208 (<stdio.h>): Include if YYDEBUG.
21209
21210 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21211 ! defined (yyoverflow) && ! defined (yymemcpy).
21212
21213 (yymemcpy, yyparse): Rename local variables as needed so that
21214 they all begin with 'yy'.
21215
21216 (yystrlen, yystpcpy): New functions.
21217
21218 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21219 All uses changed.
21220
21221 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21222 instead of relying on string.h functions. Use YYSTACK_ALLOC
21223 and YYSTACK_FREE instead of malloc and free.
21224
21225 2001-11-30 Akim Demaille <akim@epita.fr>
21226
21227 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21228 before their first uses.
21229 (YYBISON, YYPURE): Move to the top of the output.
21230
21231 2001-11-30 Akim Demaille <akim@epita.fr>
21232
21233 * tests/reduce.at (Useless Nonterminals): Fix.
21234
21235 2001-11-30 Akim Demaille <akim@epita.fr>
21236
21237 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21238 if body instead of `;' to pacify GCC's warnings.
21239
21240 2001-11-30 Akim Demaille <akim@epita.fr>
21241
21242 Instead of mapping the LHS of unused rules to -1, keep the LHS
21243 valid, but flag the rules as invalid.
21244
21245 * src/gram.h (rule_t): `useful' is a new member.
21246 * src/print.c (print_grammar): Adjust.
21247 * src/derives.c (set_derives): Likewise.
21248 * src/reader.c (packgram, reduce_output): Likewise.
21249 * src/reduce.c (reduce_grammar_tables): Likewise.
21250 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21251
21252 2001-11-30 Akim Demaille <akim@epita.fr>
21253
21254 * src/reduce.c (reduce_output): Formatting changes.
21255 * src/print.c (print_results, print_grammar): Likewise.
21256 * tests/regression.at (Rule Line Numbers)
21257 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21258
21259 2001-11-30 Akim Demaille <akim@epita.fr>
21260
21261 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21262 useless nonterminals, move them at the end of the symbol arrays.
21263 (reduce_output): Adjust.
21264 * tests/reduce.at (Useless Nonterminals): Adjust.
21265
21266 2001-11-30 Akim Demaille <akim@epita.fr>
21267
21268 * src/reduce.c: Various comment/formatting changes.
21269 (nonterminals_reduce): New, extracted from...
21270 (reduce_grammar_tables): here.
21271 (reduce_grammar): Call nonterminals_reduce.
21272
21273 2001-11-29 Paul Eggert <eggert@twinsun.com>
21274
21275 * src/bison.simple (YYSTACK_REALLOC): Remove.
21276 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21277 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21278 New macros.
21279 (union yyalloc): New type.
21280 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21281 an arbitrary restriction on hosts where size_t is wider than int.
21282
21283 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21284 a parser stack overflow. Allocate just one block of memory for all
21285 three stacks, instead of allocating three blocks; this typically is
21286 faster and reduces fragmentation.
21287
21288 Do not limit the number of items in the stack to a value that fits
21289 in 'int', as this is an arbitrary limit on hosts with 64-bit
21290 size_t and 32-bit int.
21291
21292 2001-11-29 Marc Autret <autret_m@epita.fr>
21293
21294 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21295 of defining YYERROR_VERBOSE.
21296 [AT_DATA]: $4 is now out of C declarations in the prologue.
21297
21298 2001-11-28 Marc Autret <autret_m@epita.fr>
21299
21300 * src/reader.c (parse_dquoted_param): New.
21301 (parse_skel_decl): Use it.
21302 * src/lex.h: Add its prototype.
21303 * src/lex.c (literalchar): Become not static.
21304
21305 2001-11-28 Marc Autret <autret_m@epita.fr>
21306
21307 * src/output.h: And put its extern declaration here.
21308 * src/output.c (error_verbose): Define here.
21309 (prepare): Echo name modification.
21310 * src/getargs.h: Clean its extern declaration.
21311 * src/getargs.c (error_verbose_flag): Remove.
21312 (getargs): Remove case 'e'.
21313 * src/options.c (option_table): 'error-verbose' is now seen as simple
21314 percent option.
21315 Include output.h.
21316
21317 * src/reader.c (read_declarations): Remove case tok_include.
21318 (parse_include_decl): Remove.
21319 * src/lex.h (token_t): Remove tok_include.
21320 * src/options.c (option_table): 'include' is now a simple command line
21321 option.
21322
21323 2001-11-28 Marc Autret <autret_m@epita.fr>
21324
21325 * src/bison.simple: Adjust muscle names.
21326 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21327 * src/output.c (prepare): s/_/-/ for the muscles names.
21328 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21329
21330 2001-11-28 Marc Autret <autret_m@epita.fr>
21331
21332 * src/bison.simple: Fix debug.
21333 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21334
21335 2001-11-28 Akim Demaille <akim@epita.fr>
21336
21337 * src/LR0.c (shifts_new): New.
21338 (save_shifts, insert_start_shift, augment_automaton): Use it.
21339
21340 2001-11-28 Akim Demaille <akim@epita.fr>
21341
21342 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21343 keep ruleno only.
21344
21345 2001-11-28 Akim Demaille <akim@epita.fr>
21346
21347 * src/closure.c (closure): Instead of looping over word in array
21348 then bits in words, loop over bits in array.
21349
21350 2001-11-28 Akim Demaille <akim@epita.fr>
21351
21352 * src/closure.c (closure): No longer optimize the special case
21353 where all the bits of `ruleset[r]' are set to 0, to make the code
21354 clearer.
21355
21356 2001-11-28 Akim Demaille <akim@epita.fr>
21357
21358 * src/closure.c (closure): `r' and `c' are new variables, used to
21359 de-obfuscate accesses to RULESET and CORE.
21360
21361 2001-11-28 Akim Demaille <akim@epita.fr>
21362
21363 * src/reduce.c (reduce_print): Use ngettext.
21364 (dump_grammar): Improve the trace accuracy.
21365
21366 2001-11-28 Akim Demaille <akim@epita.fr>
21367
21368 * src/reduce.c (dump_grammar): Don't translate trace messages.
21369
21370 2001-11-28 Akim Demaille <akim@epita.fr>
21371
21372 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21373 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21374 as all tags are free'ed afterwards.
21375 From Enrico Scholz.
21376
21377 2001-11-27 Paul Eggert <eggert@twinsun.com>
21378
21379 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21380 use alloca when we didn't want to, and vice versa.
21381
21382 2001-11-27 Marc Autret <autret_m@epita.fr>
21383
21384 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21385 initialization.
21386 * src/output.c (prepare): Remove its update.
21387
21388 2001-11-27 Marc Autret <autret_m@epita.fr>
21389
21390 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21391 Use %error-verbose.
21392
21393 2001-11-27 Marc Autret <autret_m@epita.fr>
21394
21395 * src/bison.simple: Remove YYERROR_VERBOSE using.
21396 Use %%error_verbose.
21397 (yyparse): Likewise.
21398 * src/output.c (prepare): Give its final value.
21399 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21400 * src/getargs.h: Add its extern declaration.
21401 * src/getargs.c (error_verbose_flag): New int.
21402 (getargs): Update to catch new case.
21403 * src/options.c (option_table): 'error-verbose' is a new option.
21404 (shortopts): Update.
21405
21406 2001-11-27 Akim Demaille <akim@epita.fr>
21407
21408 * src/system.h: Use intl/libgettext.h.
21409 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
21410
21411 2001-11-27 Akim Demaille <akim@epita.fr>
21412
21413 * tests/torture.at (Exploding the Stack Size with Malloc):
21414 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
21415
21416 2001-11-27 Akim Demaille <akim@epita.fr>
21417
21418 * src/files.c: Include error.h.
21419 Reported by Hans Aberg.
21420
21421 2001-11-26 Marc Autret <autret_m@epita.fr>
21422
21423 * src/reader.c (parse_include_decl): New, not yet implemented.
21424 (read_declarations): Add case tok_include.
21425 * src/getargs.h (include): Add its extern definition.
21426 * src/getargs.c (include): New const char *.
21427 (getargs): Add case '-I'.
21428 * src/options.c (option_table): Add include as command line and
21429 percent option.
21430 * src/lex.h (token_t): Add tok_include.
21431
21432 2001-11-26 Akim Demaille <akim@epita.fr>
21433
21434 * src/reader.c (readgram): Make sure rules for mid-rule actions
21435 have a lineno equal to that of their host rule.
21436 Reported by Hans Aberg.
21437 * tests/regression.at (Rule Line Numbers): New.
21438
21439 2001-11-26 Akim Demaille <akim@epita.fr>
21440
21441 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
21442 size_ts.
21443
21444 2001-11-26 Akim Demaille <akim@epita.fr>
21445
21446 * src/complain.c, src/complain.h (error): Remove, provided by
21447 lib/error.[ch].
21448
21449 2001-11-26 Akim Demaille <akim@epita.fr>
21450
21451 * src/reader.c (read_declarations): Don't abort on tok_illegal,
21452 issue an error message.
21453 * tests/regression.at (Invalid %directive): New.
21454 Reported by Hans Aberg.
21455
21456 2001-11-26 Akim Demaille <akim@epita.fr>
21457
21458 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
21459 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21460
21461 2001-11-26 Akim Demaille <akim@epita.fr>
21462
21463 * src/conflicts.c (conflicts_print): Don't complain at all when
21464 there are no reduce/reduce conflicts, and as many shift/reduce
21465 conflicts as expected.
21466 * tests/regression.at (%expect right): Adjust.
21467
21468 2001-11-23 Akim Demaille <akim@epita.fr>
21469
21470 * lib/alloca.c: Update, from fileutils.
21471
21472 2001-11-23 Akim Demaille <akim@epita.fr>
21473
21474 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
21475
21476 2001-11-23 Akim Demaille <akim@epita.fr>
21477
21478 * src/system.h: Include alloca.h.
21479 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
21480
21481 2001-11-23 Akim Demaille <akim@epita.fr>
21482
21483 * src/print_graph.c (print_actions): Remove `rule', unused.
21484 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
21485 pacify GCC's signed < unsigned warnings.
21486 * src/closure.c (itemsetsize): Likewise.
21487 * src/reader.c (symbol_list_new): Static.
21488
21489 2001-11-23 Akim Demaille <akim@epita.fr>
21490
21491 Attaching lineno to buckets is stupid, since only one copy of each
21492 symbol is kept, only the line of the first occurrence is kept too.
21493
21494 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
21495 * src/reader.c (rline_allocated): Remove, unused.
21496 (symbol_list): Have a `line' member.
21497 (symbol_list_new): New.
21498 (readgram): Use it.
21499 * src/print.c (print_grammar): Output the rule line numbers.
21500 * tests/regression.at (Solved SR Conflicts)
21501 (Unresolved SR Conflicts): Adjust.
21502 Reported by Hans Aberg.
21503
21504 2001-11-22 Marc Autret <autret_m@epita.fr>
21505
21506 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
21507
21508 2001-11-22 Marc Autret <autret_m@epita.fr>
21509
21510 * src/muscle_tab.c (muscle_init): Remove initialization of
21511 skeleton muscle.
21512 * src/output.c (output_master_parser): Do it here.
21513
21514 2001-11-20 Akim Demaille <akim@epita.fr>
21515
21516 * po/sv.po: New.
21517 * configure.in (ALL_LINGUAS): Adjust.
21518 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
21519 longer contains strings to translate.
21520
21521 2001-11-19 Akim Demaille <akim@epita.fr>
21522
21523 * src/conflicts.c (conflicts_print): Add a missing \n.
21524
21525 2001-11-19 Akim Demaille <akim@epita.fr>
21526
21527 * src/nullable.c (nullable_print): New.
21528 (set_nullable): Call it when tracing.
21529 Better locality of variables.
21530
21531 2001-11-19 Akim Demaille <akim@epita.fr>
21532
21533 * src/print.c (print_actions): Better locality of variables.
21534
21535 2001-11-19 Akim Demaille <akim@epita.fr>
21536
21537 * src/derives.c (print_derives): Fix and enrich.
21538 * src/closure.c (print_fderives): Likewise.
21539
21540 2001-11-19 Akim Demaille <akim@epita.fr>
21541
21542 * src/closure.c (itemsetend): Remove, replaced with...
21543 (itemsetsize): new.
21544
21545 2001-11-19 Akim Demaille <akim@epita.fr>
21546
21547 * src/LR0.c (kernel_end): Remove, replaced with...
21548 (kernel_size): new.
21549
21550 2001-11-19 Akim Demaille <akim@epita.fr>
21551
21552 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
21553 to clarify.
21554
21555 2001-11-19 Akim Demaille <akim@epita.fr>
21556
21557 * src/closure.c (closure): Use arrays instead of pointers to clarify.
21558
21559 2001-11-19 Akim Demaille <akim@epita.fr>
21560
21561 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
21562 trace messages.
21563 * src/LR0.c: Likewise.
21564 (allocate_itemsets): Use arrays instead of pointers to clarify.
21565
21566 2001-11-19 Akim Demaille <akim@epita.fr>
21567
21568 * src/getargs.c (statistics_flag): Replace with...
21569 (trace_flag): New.
21570 (longopts): Accept --trace instead of --statistics.
21571 * src/getargs.h, src/options.c: Adjust.
21572 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
21573 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
21574
21575 2001-11-19 Akim Demaille <akim@epita.fr>
21576
21577 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
21578 pointers to clarify the code.
21579 (save_reductions, save_shifts): Factor common parts of alternatives.
21580
21581 2001-11-19 Akim Demaille <akim@epita.fr>
21582
21583 * src/LR0.c (new_state, get_state): Complete TRACE code.
21584 * src/closure.c: Include `reader.h' to get `tags', needed by the
21585 trace code.
21586 Rename the conditional DEBUG as TRACE.
21587 Output consistently TRACEs to stderr, not stdout.
21588 * src/derives.c: Likewise.
21589 * src/reduce.c: (inaccessable_symbols): Using if is better style
21590 than goto.
21591 Use `#if TRACE' instead of `#if 0' for tracing code.
21592
21593 2001-11-19 Akim Demaille <akim@epita.fr>
21594
21595 * src/system.h (LIST_FREE, shortcpy): New.
21596 * src/LR0.c: Use them.
21597 * src/output.c (free_itemsets, free_reductions, free_shifts):
21598 Remove, replaced by LIST_FREE.
21599
21600 2001-11-19 Akim Demaille <akim@epita.fr>
21601
21602 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
21603 (REDUCTIONS_ALLOC): New.
21604 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
21605 allocation.
21606
21607 2001-11-19 Akim Demaille <akim@epita.fr>
21608
21609 * src/LR0.c (new_state): Complete trace code.
21610 * src/nullable.c (set_nullable): Don't translate traces.
21611
21612 2001-11-19 Akim Demaille <akim@epita.fr>
21613
21614 * src/print_graph.c (print_core): Better locality of variables.
21615 * src/print.c (print_core): Likewise.
21616
21617 2001-11-19 Akim Demaille <akim@epita.fr>
21618
21619 * src/vcg.c: You do the output, so you are responsible of the
21620 handling of VCG syntax, in particular: use quotearg.
21621 * src/print_graph.c: Don't.
21622 (print_actions): Don't output the actions as part of the nodes,
21623 since that's the job of the edges.
21624 (print_state): Don't output by hand: fill the node description,
21625 and ask for its output.
21626
21627 2001-11-19 Akim Demaille <akim@epita.fr>
21628
21629 * src/bison.simple (yyparse): When verbosely reporting an error,
21630 no longer put additional quotes around token names.
21631 * tests/calc.at: Adjust.
21632
21633 2001-11-19 Akim Demaille <akim@epita.fr>
21634
21635 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
21636 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
21637 * src/output.c: Adjust.
21638
21639 2001-11-19 Akim Demaille <akim@epita.fr>
21640
21641 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
21642 (rule_t): this.
21643 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
21644
21645 2001-11-19 Akim Demaille <akim@epita.fr>
21646
21647 * src/gram.h (rule_t): New.
21648 (rule_table): New.
21649 (rrhs, rlhs): Remove, part of state_t.
21650 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
21651 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
21652 * src/reader.c, src/reduce.c: Adjust.
21653
21654 2001-11-19 Akim Demaille <akim@epita.fr>
21655
21656 * src/reader.c (symbols_output): New, extracted from...
21657 (packsymbols): Here.
21658 (reader): Call it.
21659
21660 2001-11-19 Akim Demaille <akim@epita.fr>
21661
21662 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
21663 (maxrhs): this new function.
21664
21665 2001-11-19 Akim Demaille <akim@epita.fr>
21666
21667 * src/lalr.c (F): New macro to access the variable F.
21668 Adjust.
21669
21670 2001-11-19 Akim Demaille <akim@epita.fr>
21671
21672 * src/lalr.h (LA): New macro to access the variable LA.
21673 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21674 * src/lalr.c: Adjust.
21675
21676 2001-11-19 Akim Demaille <akim@epita.fr>
21677
21678 * src/lalr.c (initialize_LA): Only initialize LA. Let...
21679 (set_state_table): handle the `lookaheads' members.
21680
21681 2001-11-19 Akim Demaille <akim@epita.fr>
21682
21683 * src/lalr.h (lookaheads): Removed array, whose contents is now
21684 a member of...
21685 (state_t): this structure.
21686 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21687 Adjust.
21688
21689 2001-11-19 Akim Demaille <akim@epita.fr>
21690
21691 * src/lalr.h (consistent): Removed array, whose contents is now
21692 a member of...
21693 (state_t): this structure.
21694 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21695 Adjust.
21696
21697 2001-11-19 Akim Demaille <akim@epita.fr>
21698
21699 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
21700 contents are now members of...
21701 (state_t): this structure.
21702 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21703 Adjust.
21704
21705 2001-11-19 Akim Demaille <akim@epita.fr>
21706
21707 * src/lalr.h (state_t): New.
21708 (state_table): Be a state_t * instead of a core **.
21709 (accessing_symbol): Remove, part of state_t.
21710 * src/lalr.c: Adjust.
21711 (set_accessing_symbol): Merge into...
21712 (set_state_table): this.
21713 * src/print_graph.c, src/conflicts.c: Adjust.
21714
21715 2001-11-14 Akim Demaille <akim@epita.fr>
21716
21717 * tests/calc.at, tests/output.at, tests/regression.at,
21718 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
21719 now the tests are run in private dirs, therefore AC_CLEANUP and
21720 family can be simplified to 0-ary.
21721 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
21722 use abs. path to find config.h.
21723 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
21724 stderr, there can be way too much random noise.
21725 Instead pass -Werror to GCC and rely on the exit status.
21726 Reported by Wolfram Wagner.
21727
21728 2001-11-14 Akim Demaille <akim@epita.fr>
21729
21730 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
21731 defined only if yyoverflow is defined, to avoid `warning: unused
21732 variable `yyvs1''.
21733 Reported by The Test Suite.
21734
21735 2001-11-14 Akim Demaille <akim@epita.fr>
21736
21737 * src/print.c: Include reduce.h.
21738 Reported by Hans Aberg.
21739
21740 2001-11-14 Akim Demaille <akim@epita.fr>
21741
21742 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
21743 Revert a previous patch: these are really const.
21744 * src/conflicts.c (conflict_report): Additional useless pair of
21745 braces to pacify GCC's warnings for `if () if () {} else {}'.
21746 * src/lex.c (parse_percent_token): Replace equal_offset with
21747 arg_offset.
21748 arg is const.
21749 Be sure to strdup `arg' when used, since there is no reason for
21750 token_buffer not to change.
21751
21752 2001-11-14 Akim Demaille <akim@epita.fr>
21753
21754 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
21755 definition.
21756 * src/main.c (main): Use them.
21757 Suggested by Hans Aberg.
21758
21759 2001-11-12 Akim Demaille <akim@epita.fr>
21760
21761 * src/system.h (ngettext): Now that we use ngettext, be sure to
21762 provide a default definition when NLS are not used.
21763
21764 2001-11-12 Akim Demaille <akim@epita.fr>
21765
21766 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
21767 Use @kbd to denote user input.
21768 (Language and Grammar): ANSIfy the example.
21769 Adjust its layout for info/notinfo.
21770 (Location Tracking Calc): Output error messages to stderr.
21771 Output locations in a more GNUtically correct way.
21772 Fix a couple of Englishos.
21773 Adjust @group/@end group pairs.
21774
21775 2001-11-12 Akim Demaille <akim@epita.fr>
21776
21777 %expect was not functioning at all.
21778
21779 * src/conflicts.c (expected_conflicts): Set to -1.
21780 (conflict_report): Use ngettext.
21781 (conflicts_print): Check %expect and make its violation an error.
21782 * doc/bison.texinfo (Expect Decl): Adjust.
21783 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
21784 * tests/regression.at (%expect not enough, %expect right)
21785 (%expect too much): New.
21786
21787 2001-11-12 Akim Demaille <akim@epita.fr>
21788
21789 * tests/regression.at (Conflicts): Rename as...
21790 (Unresolved SR Conflicts): this.
21791 (Solved SR Conflicts): New.
21792
21793 2001-11-12 Akim Demaille <akim@epita.fr>
21794
21795 * src/reduce.c (print_results): Rename as...
21796 (reduce_output): This.
21797 Output to OUT, passed as argument, instead of output_obstack.
21798 (dump_grammar): Likewise.
21799 (reduce_free): New.
21800 Also free V1.
21801 (reduce_grammar): No longer call reduce_output, since...
21802 * src/print.c (print_results): do it.
21803 * src/main.c (main): Call reduce_free;
21804
21805 2001-11-12 Akim Demaille <akim@epita.fr>
21806
21807 * src/conflicts.c (print_reductions): Accept OUT as argument.
21808 Output to it, not to output_obstack.
21809 * src/print.c (print_actions): Adjust.
21810
21811 2001-11-12 Akim Demaille <akim@epita.fr>
21812
21813 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
21814 the result instead of using...
21815 (src_total, rrc_total, src_count, rrc_count): Remove.
21816 (any_conflicts): Remove.
21817 (print_conflicts): Split into...
21818 (conflicts_print, conflicts_output): New.
21819 * src/conflicts.h: Adjust.
21820 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
21821 * src/print.c (print_grammar): Issue `\n' between two rules.
21822 * tests/regression.at (Conflicts): New.
21823 Reported by Tom Lane.
21824
21825 2001-11-12 Akim Demaille <akim@epita.fr>
21826
21827 * tests/regression.at (Invalid input): Remove, duplicate with
21828 ``Invalid input: 1''.
21829
21830 2001-11-12 Akim Demaille <akim@epita.fr>
21831
21832 * tests/torture.at (AT_DATA_STACK_TORTURE)
21833 (Exploding the Stack Size with Alloca)
21834 (Exploding the Stack Size with Malloc): New.
21835
21836 2001-11-12 Akim Demaille <akim@epita.fr>
21837
21838 * src/bison.simple (YYSTACK_REALLOC): New.
21839 (yyparse) [!yyoverflow]: Use it and free the old stack.
21840 Reported by Per Allansson.
21841
21842 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
21843
21844 * src/bison.simple: Define type yystype instead of YYSTYPE, and
21845 define CPP macro, which substitute YYSTYPE by yystype.
21846 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
21847 with yyltype/YYLTYPE. This allows inclusion of the generated
21848 header within the parser if the compiler, such as GGC, accepts
21849 multiple equivalent #defines.
21850 From Akim.
21851
21852 2001-11-05 Akim Demaille <akim@epita.fr>
21853
21854 * src/reader.c (symbols_output): New, extracted from...
21855 (packsymbols): here.
21856 (reader): Adjust.
21857
21858 2001-11-05 Akim Demaille <akim@epita.fr>
21859
21860 * src/lex.c (parse_percent_token): s/quotearg/quote/.
21861
21862 2001-11-05 Akim Demaille <akim@epita.fr>
21863
21864 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
21865 pattern.
21866
21867 2001-11-05 Akim Demaille <akim@epita.fr>
21868
21869 * src/options.h (struct option_table_struct): set_flags is void*.
21870 * src/options.c (longopts): Support `--output' and `%output'.
21871 (usage): Adjust.
21872 * src/lex.h (tok_setopt): Remove, replaced with...
21873 (tok_intopt, tok_stropt): these new guys.
21874 * src/lex.c (getopt.h): Not needed.
21875 (token_buffer, unlexed_token_buffer): Not const.
21876 (percent_table): Promote `-' over `_' in directive names.
21877 Active `%name-prefix', `file-prefix', and `output'.
21878 (parse_percent_token): Accept possible arguments to directives.
21879 Promote `-' over `_' in directive names.
21880
21881 2001-11-04 Akim Demaille <akim@epita.fr>
21882
21883 * doc/bison.texinfo (Decl Summary): Split the list into
21884 `directives for grammars' and `directives for bison'.
21885 Sort'em.
21886 Add description of `%name-prefix', `file-prefix', and `output'.
21887 Promote `-' over `_' in directive names.
21888 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21889 Simplify the description of `--name-prefix'.
21890 Promote `-' over `_' in directive names.
21891 Promote `--output' over `--output-file'.
21892 Fix the description of `--defines'.
21893 * tests/output.at: Exercise %file-prefix and %output.
21894
21895 2001-11-02 Akim Demaille <akim@epita.fr>
21896
21897 * doc/refcard.tex: Update.
21898
21899 2001-11-02 Akim Demaille <akim@epita.fr>
21900
21901 * src/symtab.h (SUNDEF): New.
21902 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21903 stand for `uninitialized', instead of 0.
21904 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21905 * src/lex.c (lex): Adjust.
21906
21907 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21908 Number it 0.
21909 Let yylex return it instead of a plain 0.
21910 Reported by Dick Streefland.
21911
21912 2001-11-02 Akim Demaille <akim@epita.fr>
21913
21914 * tests/regression.at (Mixing %token styles): New test.
21915
21916 2001-11-02 Akim Demaille <akim@epita.fr>
21917
21918 * src/reader.c (parse_thong_decl): Formatting changes.
21919 (token_translations_init): New, extracted from...
21920 (packsymbols): Here.
21921 Adjust.
21922
21923 2001-11-01 Akim Demaille <akim@epita.fr>
21924
21925 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21926 Check that `9foo.y' produces correct cpp guards.
21927 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21928 guards.
21929 Reported by Wwp.
21930
21931 2001-11-01 Akim Demaille <akim@epita.fr>
21932
21933 * tests/regression.at (Invalid input: 2): New.
21934 * src/lex.c (unlexed_token_buffer): New.
21935 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21936 too.
21937 Reported by Wwp.
21938
21939 2001-11-01 Akim Demaille <akim@epita.fr>
21940
21941 * tests/calc.at: Catch up with 1.30.
21942 * configure.in: Bump to 1.49a.
21943 Adjust to newer Autotest.
21944
21945 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21946
21947 * src/conflicts.c: Move global variables rrc_total and src_total ...
21948 (print_conflicts): here.
21949 * src/output.c (output): Free global variable user_toknums.
21950 * src/lex.c (token_obstack): Become static.
21951
21952 2001-10-18 Akim Demaille <akim@epita.fr>
21953
21954 * tests/atlocal.in (GCC): Add.
21955 * tests/calc.at: s/m4_match/m4_bmatch/.
21956 s/m4_patsubst/m4_bpatsubst/.
21957 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21958 * configure.in: AC_SUBST(GCC).
21959
21960 2001-10-14 Marc Autret <autret_m@epita.fr>
21961
21962 * src/options.c (create_long_option_table): Fix.
21963
21964 2001-10-10 Akim Demaille <akim@epita.fr>
21965
21966 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21967
21968 2001-10-04 Akim Demaille <akim@epita.fr>
21969
21970 * src/reader.c (parse_union_decl): Push the caracters in
21971 union_obstack, not attrs_obstack.
21972
21973 2001-10-04 Akim Demaille <akim@epita.fr>
21974
21975 Merge in the branch 1.29.
21976
21977 * src/reader.c (packsymbols): Use a temporary obstack for
21978 `%%tokendef', since output_stack is already used elsewhere.
21979
21980 2001-10-02 Akim Demaille <akim@epita.fr>
21981
21982 Bump 1.29d.
21983
21984 2001-10-02 Akim Demaille <akim@epita.fr>
21985
21986 Version 1.29c.
21987
21988 2001-10-02 Akim Demaille <akim@epita.fr>
21989
21990 * tests/regression.at (Invalid CPP headers): New.
21991 From Alexander Belopolsky.
21992 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21993
21994 2001-10-02 Akim Demaille <akim@epita.fr>
21995
21996 * tests/regression.at (Invalid input): New.
21997 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21998 Reported by Shura.
21999
22000 2001-10-02 Akim Demaille <akim@epita.fr>
22001
22002 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22003
22004 2001-10-02 Akim Demaille <akim@epita.fr>
22005
22006 * src/output.c (output_parser): Assert `skeleton'.
22007 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22008 systems.
22009 From Shura.
22010
22011 2001-10-01 Marc Autret <autret_m@epita.fr>
22012
22013 * src/lex.h: Echo modifications.
22014 * src/lex.c (unlex): Parameter is now token_t.
22015 From Hans Aberg.
22016
22017 2001-10-01 Marc Autret <autret_m@epita.fr>
22018
22019 * src/main.c: Include lex.h.
22020 From Hans Aberg.
22021
22022 2001-09-29 Akim Demaille <akim@epita.fr>
22023
22024 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22025
22026 2001-09-28 Akim Demaille <akim@epita.fr>
22027
22028 * tests/testsuite.at: Update to newer Autotest.
22029 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22030
22031 2001-09-27 Akim Demaille <akim@epita.fr>
22032
22033 Position independent wrapper.
22034
22035 * tests/bison: Remove.
22036 * tests/bison.in: New.
22037 * configure.in: Adjust.
22038
22039 2001-09-27 Paul Eggert <eggert@twinsun.com>
22040
22041 Port quotearg fixes from tar 1.13.24.
22042
22043 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22044 tm to be declared.
22045 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22046 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22047
22048 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22049 * m4/mbrtowc.m4: New file.
22050 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22051 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22052
22053 2001-09-27 Akim Demaille <akim@epita.fr>
22054
22055 Bump to 1.29c.
22056
22057 2001-09-27 Akim Demaille <akim@epita.fr>
22058
22059 Version 1.29b.
22060
22061 2001-09-25 Akim Demaille <akim@epita.fr>
22062
22063 * src/system.h: Include `xalloc.h'.
22064 Remove it from the C files.
22065 * src/files.c (output_files): Free the obstacks.
22066 * src/lex.c (init_lex): Rename as...
22067 (lex_init): this.
22068 (lex_free): New.
22069 * src/main.c (main): Use it.
22070
22071 2001-09-24 Marc Autret <autret_m@epita.fr>
22072
22073 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22074 to output informations in fout (FILE*).
22075 (open_graph, close_graph): Likewise.
22076 (output_graph, output_edge, output_node): Likewise.
22077 * src/vcg.h: Update function prototypes.
22078 * src/print_graph.c (print_graph): Open output graph file.
22079 (print_actions): Adjust.
22080 * src/files.h: Remove extern declaration.
22081 * src/files.c: Remove graph_obstack declaration.
22082 (open_files): Remove graph_obstack initialization.
22083 (output_files): Remove graph_obstack saving.
22084
22085 2001-09-24 Marc Autret <autret_m@epita.fr>
22086
22087 * src/files.c (compute_output_file_names): Fix.
22088
22089 2001-09-24 Marc Autret <autret_m@epita.fr>,
22090 Akim Demaille <akim@epita.fr>
22091
22092 * src/reader.c (reader): Remove call to free_symtab ().
22093 * src/main.c (main): Call it here.
22094 Include symtab.h.
22095 * src/conflicts.c (initialize_conflicts): Rename as...
22096 (solve_conflicts): this.
22097 * src/print.c (print_core, print_actions, print_state)
22098 (print_grammar): Dump to a file instead a `output_obstack'.
22099 (print_results): Dump `output_obstack', and then proceed with the
22100 FILE *.
22101 * src/files.c (compute_output_file_names, close_files): New.
22102 (output_files): Adjust.
22103 * src/main.c (main): Adjust.
22104
22105 2001-09-23 Marc Autret <autret_m@epita.fr>
22106
22107 * src/files.c (compute_header_macro): Computes header macro name
22108 from spec_defines_file when given.
22109
22110 2001-09-23 Marc Autret <autret_m@epita.fr>
22111
22112 * src/files.c (output_files): Add default extensions.
22113
22114 2001-09-22 Akim Demaille <akim@epita.fr>
22115
22116 * src/conflicts.c (finalize_conflicts): Rename as...
22117 (free_conflicts): this.
22118
22119 2001-09-22 Akim Demaille <akim@epita.fr>
22120
22121 * src/gram.c (gram_free): Rename back as...
22122 (dummy): this.
22123 (output_token_translations): Free `token_translations'.
22124 * src/symtab.c (free_symtab): Free the tag field.
22125
22126 2001-09-22 Akim Demaille <akim@epita.fr>
22127
22128 Remove `translations' as it is always set to true.
22129
22130 * src/gram.h: Adjust.
22131 * src/reader.c (packsymbols, parse_token_decl): Adjust
22132 * src/print.c (print_grammar): Adjust.
22133 * src/output.c (output_token_translations): Adjust.
22134 * src/lex.c (lex): Adjust.
22135 * src/gram.c: Be sure the set pointers to NULL.
22136 (dummy): Rename as...
22137 (gram_free): this.
22138
22139 2001-09-22 Akim Demaille <akim@epita.fr>
22140
22141 * configure.in: Invoke AM_LIB_DMALLOC.
22142 * src/system.h: Use dmalloc.
22143 * src/LR0.c: Be sure to have pointers initialized to NULL.
22144 (allocate_itemsets): Allocate kernel_items only if needed.
22145
22146 2001-09-22 Akim Demaille <akim@epita.fr>
22147
22148 * configure.in: Bump to 1.29b.
22149 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22150 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22151 need xmalloc.c in calc.y.
22152 From Pascal Bart.
22153
22154 2001-09-21 Akim Demaille <akim@epita.fr>
22155
22156 Version 1.29a.
22157 * Makefile.maint, config/config.guess, config/config.sub,
22158 * config/missing: Update from masters.
22159 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22160 upon package.m4.
22161 * configure.in (ALL_LINGUAS): Add `tr'.
22162
22163 2001-09-21 Akim Demaille <akim@epita.fr>
22164
22165 * tests/Makefile.am (package.m4): Move to...
22166 ($(srcdir)/$(TESTSUITE)): here.
22167
22168 2001-09-20 Akim Demaille <akim@epita.fr>
22169
22170 * src/complain.c: No longer try to be standalone: use system.h.
22171 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22172 * src/complain.h: Likewise.
22173 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22174 Remove the unused variable `n'.
22175 From Albert Chin-A-Young.
22176
22177 2001-09-18 Marc Autret <autret_m@epita.fr>
22178
22179 * doc/bison.1: Update.
22180 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22181 descriptions.
22182 (Option Cross Key): Update.
22183 Add --graph.
22184
22185 2001-09-18 Marc Autret <autret_m@epita.fr>
22186
22187 * tests/regression.at: New test (comment in %union).
22188
22189 2001-09-18 Marc Autret <autret_m@epita.fr>
22190
22191 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22192 do that.
22193 Reported by Keith Browne.
22194
22195 2001-09-18 Marc Autret <autret_m@epita.fr>
22196
22197 * tests/output.at: Add tests for --defines and --graph.
22198
22199 2001-09-18 Marc Autret <autret_m@epita.fr>
22200
22201 * tests/output.at: Removes tests of %{header,src}_extension features.
22202
22203 2001-09-18 Akim Demaille <akim@epita.fr>
22204
22205 * tests/Makefile.am (package.m4): New.
22206 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22207 (_AT_CHECK_CALC_ERROR): Likewise.
22208 Factor the `, ' part of verbose error messages.
22209
22210 2001-09-18 Marc Autret <autret_m@epita.fr>
22211
22212 * src/getargs.c (longopts): Declare --defines and --graph as options
22213 with optional arguments.
22214 * src/files.h: Add extern declarations.
22215 * src/files.c (spec_graph_file, spec_defines_file): New.
22216 (output_files): Update.
22217 Remove CPP-outed code.
22218
22219 2001-09-18 Marc Autret <autret_m@epita.fr>
22220
22221 Turn off %{source,header}_extension feature.
22222
22223 * src/files.c (compute_exts_from_gf): Update.
22224 (compute_exts_from_src): Update.
22225 (output_files): CPP-out useless code.
22226 * src/files.h: Remove {header,source}_extension extern declarations.
22227 * src/reader.c (parse_dquoted_param): CPP-out.
22228 (parse_header_extension_decl): Remove.
22229 (parse_source_extension_decl): Remove.
22230 (read_declarations): Remove cases tok_{hdrext,srcext}.
22231 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22232 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22233
22234 2001-09-10 Akim Demaille <akim@epita.fr>
22235
22236 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22237 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22238 (AT_CHECK_OUTPUT): this.
22239 Merely check ls' exit status, its output is useless.
22240
22241 2001-09-10 Akim Demaille <akim@epita.fr>
22242
22243 * tests/calc.at: Use m4_match.
22244 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22245
22246 2001-09-10 Marc Autret <autret_m@epita.fr>,
22247 Akim Demaille <akim@epita.fr>
22248
22249 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22250 enum color_e.
22251 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22252 to `normal'.
22253 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22254 * src/lex.h: Adjust prototype.
22255 (token_t): Add `tok_undef'.
22256 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22257 (parse_percent_token): Now returns token_t.
22258 Add default statement in switch.
22259 (lex): Separate `c' as an input variable, from the token_t result
22260 part.
22261 (unlexed): Is a token_t.
22262
22263 2001-09-10 Akim Demaille <akim@epita.fr>
22264
22265 * configure.in: Bump to 1.29a.
22266
22267 2001-09-07 Akim Demaille <akim@epita.fr>
22268
22269 Version 1.29.
22270
22271 2001-08-30 Akim Demaille <akim@epita.fr>
22272
22273 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22274 * m4/atconfig.m4: Remove.
22275 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22276 * tests/bison: New.
22277 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22278 m4_if, m4_patsubst, and m4_regexp.
22279 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22280 `input' file instead of echo.
22281
22282 2001-08-29 Akim Demaille <akim@epita.fr>
22283
22284 Bump to 1.28e.
22285
22286 2001-08-29 Akim Demaille <akim@epita.fr>
22287
22288 Version 1.28d.
22289
22290 2001-08-29 Paul Eggert <eggert@twinsun.com>
22291
22292 * src/bison.simple (yyparse): Don't take the address of an
22293 item before the start of an array, as that doesn't conform to
22294 the C Standard.
22295
22296 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22297
22298 * doc/bison.texinfo (Location Tracking Calc): New node.
22299
22300 2001-08-29 Paul Eggert <eggert@twinsun.com>
22301
22302 * src/output.c (output): Do not define const, as this now
22303 causes more problems than it cures.
22304
22305 2001-08-29 Akim Demaille <akim@epita.fr>
22306
22307 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22308 the nodes.
22309 Be sure to tag the `detailmenu'.
22310
22311 2001-08-29 Akim Demaille <akim@epita.fr>
22312
22313 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22314 download in a tmp dir.
22315
22316 2001-08-28 Marc Autret <autret_m@epita.fr>
22317
22318 * config/depcomp: New file.
22319
22320 2001-08-28 Marc Autret <autret_m@epita.fr>
22321
22322 * doc/bison.1 (mandoc): Adjust.
22323 From Juan Manuel Guerrero.
22324
22325 2001-08-28 Marc Autret <autret_m@epita.fr>
22326
22327 * src/print_graph.c (print_state): Fix.
22328
22329 2001-08-27 Marc Autret <autret_m@epita.fr>
22330
22331 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22332 char * members.
22333 Echo modifications to the functions prototypes.
22334 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22335
22336 2001-08-27 Marc Autret <autret_m@epita.fr>
22337
22338 * src/vcg.c: Include `xalloc.h'.
22339 (add_colorentry): New.
22340 (add_classname): New.
22341 (add_infoname): New.
22342 * src/vcg.h: Add new prototypes.
22343
22344 2001-08-27 Akim Demaille <akim@epita.fr>
22345
22346 * Makefile.maint: Sync. again with CVS Autoconf.
22347
22348 2001-08-27 Akim Demaille <akim@epita.fr>
22349
22350 * Makefile.maint: Formatting changes.
22351 (po-update, cvs-update, update): New targets.
22352 (AMTAR): Remove.
22353
22354 2001-08-27 Akim Demaille <akim@epita.fr>
22355
22356 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22357 * Makefile.maint: Sync. with CVS Autoconf.
22358
22359 2001-08-27 Marc Autret <autret_m@epita.fr>
22360
22361 * src/vcg.h (struct infoname_s): New.
22362 (struct colorentry_s): New.
22363 (graph_s): New fields {vertical,horizontal}_order in structure.
22364 Add `infoname' field.
22365 Add `colorentry' field;
22366 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22367 (G_HORIZONTAL_ORDER): New.
22368 (G_INFONAME): New.
22369 (G_COLORENTRY): New.
22370 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22371 Add output of `infoname'.
22372 Add output of `colorentry'.
22373
22374 2001-08-27 Marc Autret <autret_m@epita.fr>
22375
22376 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22377 This one shadowed a global parameter.
22378
22379 2001-08-24 Marc Autret <autret_m@epita.fr>
22380
22381 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22382 instead of `unsigned'.
22383 (print_state): Do not call obstack_object_size () in obstack_grow ()
22384 to avoid macro variables shadowing.
22385
22386 2001-08-23 Marc Autret <autret_m@epita.fr>
22387
22388 * src/lex.c (percent_table): Typo: s/naem/name/.
22389 Add graph option.
22390 Normalize new options declarations.
22391
22392 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22393
22394 * tests/suite.at: Exercise %header_extension and %source_extension.
22395
22396 2001-08-16 Marc Autret <autret_m@epita.fr>
22397
22398 * src/reader.c (parse_dquoted_param): New.
22399 (parse_header_extension_decl): Use it.
22400 (parse_source_extension_decl): Likewise.
22401
22402 2001-08-16 Marc Autret <autret_m@epita.fr>
22403
22404 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
22405 (get_xxxx_str): Use assert () instead of complain ().
22406 Remove return invokations in default cases.
22407 (get_decision_str): Modify default behaviour. Remove second argument.
22408 Echo modifications on calls.
22409 (output_graph): Fix.
22410
22411 2001-08-16 Marc Autret <autret_m@epita.fr>
22412
22413 * src/getargs.c (usage): Update with ``-g, --graph''.
22414
22415 2001-08-16 Marc Autret <autret_m@epita.fr>
22416
22417 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
22418 (Option Cross Key): Likewise.
22419 * doc/bison.1: Update.
22420
22421 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
22422
22423 * src/output.c (output_master_parser): Don't finish action_obstack.
22424 (output_parser): Don't care about the muscle action, here.
22425 (prepare): Copy the action_obstack in the action muscle.
22426 (output): Free action_obstack.
22427
22428 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22429
22430 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
22431 will contain `%union' declaration.
22432 (parse_union_decl): Delete #line directive output.
22433 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
22434 informations about %union.
22435 (parse_union_decl): Copy the union_obstack in the muscle stype.
22436 * src/bison.simple: Add new #line directive.
22437 Add typdef %%stype YYSTYPE.
22438
22439 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22440
22441 * src/bison.simple: Add new `#line' directive.
22442
22443 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
22444
22445 * src/bison.simple: New `#line' directive.
22446 * src/output.c (output_parser): Support new dynamic muscle input_line.
22447
22448 2001-09-22 Marc Autret <autret_m@epita.fr>
22449
22450 * src/output.c (output_master_parser): New.
22451 (output_parser): Be more re-entrant.
22452
22453 2001-09-21 Marc Autret <autret_m@epita.fr>
22454
22455 * src/reader.c (copy_definition, parse_union_decl): Update and use
22456 `linef' muscle.
22457 (copy_action): Likewise.
22458 Use obstack_1grow ().
22459 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
22460
22461 2001-09-21 Marc Autret <autret_m@epita.fr>
22462
22463 * src/options.c (option_table): Adjust.
22464 * src/lex.c (parse_percent_token): Fix.
22465
22466 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22467
22468 * src/options.c (symtab.h): Include it, need by lex.h.
22469
22470 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22471
22472 * src/lex.c (parse_percent_token): Change type of variable `tx', which
22473 is now an option_table_struct*.
22474 (option_strcmp): New function option_strcmp.
22475 (parse_percent_token): Call option_strcmp.
22476 * src/getargs.c (xalloc.h, options.h): Include it.
22477 (getargs): Call create_long_option_table.
22478 (getargs): Free longopts at the end of the function.
22479 (shortopts): Move in options.c.
22480 * src/options.c (create_long_option_table): New function. Convert
22481 information from option_table to option structure.
22482 * src/reader.c (options.h): Include it.
22483
22484 * src/Makefile.am: Adjust.
22485 * src/options.c (option_table): Create from longopts and percent_table.
22486 * src/getargs.c (longopts): Delete.
22487 * src/lex.c (struct percent_table_struct): Delete.
22488 (percent_table): Delete.
22489 (options.h): Include it.
22490 * src/options.c: Create.
22491 * src/options.h: Create.
22492 Declare enum opt_access_e.
22493 Define struct option_table_struct.
22494
22495 2001-09-20 Marc Autret <autret_m@epita.fr>
22496
22497 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
22498 sections of Bison.
22499
22500 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
22501
22502 * src/bison.simple: s/%%filename/%%skeleton.
22503 * src/muscle_tab.c (getargs.h): Include it.
22504 (muscle_init): Insert new muscle skeleton.
22505
22506 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
22507
22508 * src/output.c (output_parser): Delete unused variable actions_dumped.
22509
22510 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
22511
22512 * src/output.c (output): Delete call to reader_output_yylsp.
22513 * src/reader.c (reader): Likewise.
22514 * src/reader.h: Delete declaration of reader_output_yylsp.
22515
22516 2001-09-02 Marc Autret <autret_m@epita.fr>
22517
22518 * src/reader.c: Include muscle_tab.h.
22519 (parse_union_decl): Update.
22520 (parse_macro_decl): Rename parse_muscle_decl.
22521 Update to use renamed functions and variable.
22522 (read_declarations, copy_action, read_additionnal_code, : Updated
22523 with correct variables and functions names.
22524 (packsymbols, reader): Likewise.
22525
22526 * src/reader.h (muscle_obstack): Extern declaration update.
22527
22528 * src/output.c: Include muscle_tab.h
22529 In all functions using macro_insert, change by using muscle_insert ().
22530 (macro_obstack): Rename muscle_obstack.
22531 Echo modifications in the whole file.
22532 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
22533 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
22534 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
22535
22536 * src/muscle_tab.h: Update double inclusion macros.
22537 (macro_entry_s): Rename muscle_entry_s.
22538 Update prototypes.
22539
22540 * src/muscle_tab.c: Include muscle_tab.h.
22541 Rename macro_tabble to muscle_table.
22542 (mhash1, mhash2, mcmp): Use muscle_entry.
22543 (macro_init): Rename muscle_init. Update.
22544 (macro_insert): Rename muscle_insert. Update.
22545 (macro_find): Rename muscle_find. Update.
22546
22547 * src/main.c: Include muscle_tab.h.
22548 (main): Call muscle_init ().
22549 * src/Makefile.am (bison_SOURCES): Echo modifications.
22550
22551 2001-09-02 Marc Autret <autret_m@epita.fr>
22552
22553 Now the files macro_tab.[ch] are named muscle_tab.[ch].
22554
22555 * src/muscle_tab.c, src/muscle_tab.h: Add files.
22556
22557 2001-09-02 Marc Autret <autret_m@epita.fr>
22558
22559 * src/macrotab.c, src/macrotab.h: Remove.
22560
22561 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
22562
22563 * src/reader.c (copy_guard): Use muscle to specify the `#line'
22564 filename.
22565
22566 2001-09-01 Marc Autret <autret_m@epita.fr>
22567
22568 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
22569 to an explicit value to activate the feature. We do it here.
22570
22571 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22572
22573 * src/output.c (prepare): Delete the `filename' muscule insertion.
22574 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
22575 (parse_union_decl): Likewise.
22576 * src/macrotab.c (macro_init): Initialize filename by infile.
22577
22578 2001-08-31 Marc Autret <autret_m@epita.fr>
22579
22580 * src/bison.simple (YYLSP_NEEDED): New definition.
22581 * src/output.c (prepare): Add macro insertion of `locations_flag'
22582
22583 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22584
22585 * src/output.c (prepare): Delete insertion of previous muscles,
22586 and insert the `prefix' muscles.
22587 * src/macrotab.c (macro_init): Likewise.
22588 (macro_init): Initialization prefix directive by `yy'.
22589 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
22590 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
22591 yylval, yydebug, yyerror, yynerrs and yyparse.
22592 New directive `#define' to substitute yydebug, ... with option
22593 name_prefix.
22594
22595 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22596
22597 * src/main.c (main): Standardize.
22598 * src/output.c (output_table_data, output_parser): Likewise.
22599 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
22600
22601 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
22602
22603 * src/reader.c (read_additionnal_code): Rename %%user_code to
22604 %%epilogue.
22605 * src/output.c (output): Rename %%declarations to %%prologue.
22606 * src/bison.simple: Echo modifications.
22607
22608 2001-08-31 Marc Autret <autret_m@epita.fr>
22609
22610 * src/reader.c (readgram): CleanUp.
22611 (output_token_defines): Likewise.
22612 (packsymbols): Likewise.
22613 (reader): Likewise.
22614 * src/output.c (output): CPP-out useless code.
22615
22616 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22617
22618 * src/reader.c (reader): Delete obsolete call to function
22619 output_trailers and output_headers.
22620 * src/output.h: Remove obsolete functions prototypes of output_headers
22621 and output_trailers.
22622
22623 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
22624
22625 * src/main.c: Include macrotab.h.
22626 * src/macrotab.h (macro_entry_s): Constify fields.
22627 Adjust functions prototypes.
22628 * src/macrotab.c (macro_insert): Constify key and value.
22629 (macro_find): Constify key.
22630 (macro_insert): Include 'xalloc.h'
22631 (macro_insert): Use XMALLOC.
22632 (macro_find): Constify return value.
22633 * src/output.c (output_table_data): Rename table to table_data.
22634 (output_parser): Constify macro_key, macro_value.
22635
22636 2001-08-30 Marc Autret <autret_m@epita.fr>
22637
22638 * src/reader.c (parse_skel_decl): New.
22639 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
22640 * src/lex.h (token_t): New token `tok_skel'.
22641 * src/lex.c (percent_table): Add skeleton option entry.
22642 Standardize.
22643
22644 2001-08-29 Marc Autret <autret_m@epita.fr>
22645
22646 * src/bison.simple: Add %%user_code directive at the end.
22647 * src/reader.c (read_additionnal_code): New.
22648 (reader): Use it.
22649 * src/output.c (output_program): Remove.
22650 (output): Update.
22651
22652 2001-08-28 Marc Autret <autret_m@epita.fr>
22653
22654 * src/output.c (output_actions): Clean up.
22655 (output_gram): CPP-out useless code.
22656 * src/reader.c (reader): Clean up, CPP-out useless code.
22657
22658 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
22659
22660 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
22661 directive.
22662 * src/bison.simple: Add `%%definitions'.
22663
22664 2001-08-28 Marc Autret <autret_m@epita.fr>
22665
22666 * config/depcomp: New file.
22667
22668 2001-08-27 Paul Eggert <eggert@twinsun.com>
22669
22670 * src/bison.simple (yyparse): Don't take the address of an
22671 item before the start of an array, as that doesn't conform to
22672 the C Standard.
22673
22674 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22675
22676 * src/output.c (output): Remove the initialization of the macro
22677 obstack. It was done too late here.
22678
22679 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
22680 completely wrong.
22681 (reader): Initialize the macro obstack here, since we need it to grow
22682 '%define' directives.
22683
22684 * src/reader.h: Declare the macro obstack as extern.
22685
22686 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22687
22688 * src/output.c (output_parser): Fix. Store single '%' characters in
22689 the output obstack instead of throwing them away.
22690
22691 2001-08-27 Akim Demaille <akim@epita.fr>
22692
22693 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22694
22695 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22696
22697 * lib/Makefile.am: Adjust.
22698
22699 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22700
22701 * src/bison.simple: Update and add '%%' directives.
22702
22703 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22704
22705 * src/reader.c (reader): Remove calls to 'output_headers' and
22706 'output_trailers'. Remove some C output.
22707 (readgram): Disable a piece of code that was writing a default
22708 definition for 'YYSTYPE'.
22709 (reader_output_yylsp): Remove.
22710 (packsymbols): Output token defintions to a macro.
22711 (copy_definition): Disable C output.
22712
22713 * src/reader.c (parse_macro_decl): New function used to parse macro
22714 declarations.
22715 (copy_string2): Put the body of copy_string into this new function.
22716 Add a parameter to let the caller choose whether he wants to copy the
22717 string delimiters or not.
22718 (copy_string): Be a simple call to copy_string2 with the last argument
22719 bound to true.
22720 (read_declarations): Add case for macro definition.
22721 (copy_identifier): New.
22722 (parse_macro_decl): Read macro identifiers using copy_identifier
22723 rather than lex.
22724
22725 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22726
22727 * src/output.c (prepare): Add prefixed names.
22728 (output_parser): Output semantic actions.
22729 (output_parser): Fix bug on '%%line' directives.
22730
22731 * src/output.c (output_headers): Remove. The C code printed by this
22732 function should now be in the skeletons.
22733 (output_trailers): Remove.
22734 (output): Disable call to 'reader_output_yylsp'.
22735 (output_rule_data): Do not output tables to the table obstack.
22736
22737 * src/output.c: Remove some C dedicated output.
22738 Improve the use of macro and output obstacks.
22739 (output_defines): Remove.
22740
22741 * src/output.c (output_token_translations): Associate 'translate'
22742 table with a macro. No output to the table obstack.
22743 (output_gram): Same for 'rhs' and 'prhs'.
22744 (output_stos): Same for 'stos'.
22745 (output_rule_data): Same for 'r1' and 'r2'.
22746 (token_actions): Same for 'defact'.
22747 (goto_actions): Same for 'defgoto'.
22748 (output_base): Same for 'pact' and 'pgoto'.
22749 (output_table): Same for 'table'.
22750 (output_check): Same for 'check'.
22751
22752 * src/output.c (output_table_data): New function.
22753 (output_short_table): Remove.
22754 (output_short_or_char_table): Remove.
22755
22756 * src/output.c (output_parser): Replace most of the skeleton copy code
22757 with something new. Skeletons are now processed character by character
22758 rather than line by line, and Bison looks for '%%' macros. This is the
22759 first step in making Bison's output process (a lot) more flexible.
22760 (output_parser): Use the macro table.
22761
22762 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22763
22764 * src/main.c (main): Initialize the macro table.
22765
22766 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22767
22768 * src/lex.c (percent_table): Add tok_define.
22769 * src/lex.h: Add tok_define.
22770
22771 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22772
22773 * src/macrotab.c: New file.
22774 * src/macrotab.h: New file.
22775 * src/Makefile.am: Update.
22776
22777 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22778
22779 * lib/hash.c: New file.
22780 * lib/hash.h: New file.
22781 * lib/Makefile.am: Update.
22782
22783 2001-08-15 Akim Demaille <akim@epita.fr>
22784
22785 Version 1.28c.
22786
22787 2001-08-15 Marc Autret <autret_m@epita.fr>
22788
22789 * src/reader.c (readgram): Indent output macro YYSTYPE.
22790 (packsymbols): Likewise.
22791 (output_token_defines): Likewise.
22792 * src/files.c: Standardize.
22793 (compute_header_macro): New.
22794 (defines_obstack_save): New. Use compute_header_macro.
22795 (output_files): Update. Use defines_obstack_save.
22796
22797 2001-08-15 Akim Demaille <akim@epita.fr>
22798
22799 * doc/bison.texinfo (Table of Symbols): Document
22800 YYSTACK_USE_ALLOCA.
22801
22802 2001-08-15 Akim Demaille <akim@epita.fr>
22803
22804 * missing: Update from CVS Automake.
22805 * config/config.guess, config/config.sub, config/texinfo.tex:
22806 Update from gnu.org.
22807
22808 2001-08-15 Akim Demaille <akim@epita.fr>
22809
22810 * Makefile.maint: Sync with CVS Autoconf.
22811
22812 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
22813
22814 * doc/bison.texinfo: Include GNU Free Documentation License from
22815 `fdl.texi'.
22816 * doc/fdl.texi: Add to package.
22817
22818 2001-08-14 Marc Autret <autret_m@epita.fr>
22819
22820 Turn on %{source,header}_extension features.
22821
22822 * src/lex.c (percent_table): Un-CPP out header_extension and
22823 source_extension.
22824 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
22825 (compute_exts_from_src): Remove conditions. It restores priorities
22826 between options.
22827
22828 2001-08-14 Marc Autret <autret_m@epita.fr>
22829
22830 * src/files.c (compute_base_names): Add extensions computing when
22831 `--file-prefix' used.
22832 Standardize function calls.
22833
22834 2001-08-13 Marc Autret <autret_m@epita.fr>
22835
22836 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
22837 defining it (defined but null disables alloca).
22838
22839 2001-08-13 Marc Autret <autret_m@epita.fr>
22840
22841 * src/bison.simple (_yy_memcpy): CPP reformat.
22842
22843 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
22844
22845 * tests/atconfig.in (CPPFLAGS): Fix.
22846
22847 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
22848
22849 * doc/bison.texinfo: Include GNU General Public License from
22850 `gpl.texi'.
22851 * doc/gpl.texi: Add to package.
22852
22853 2001-08-10 Marc Autret <autret_m@epita.fr>
22854
22855 * src/print_graph.h: Fix.
22856 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
22857
22858 2001-08-10 Akim Demaille <akim@epita.fr>
22859
22860 * src/system.h: Provide default declarations for stpcpy, strndup,
22861 and strnlen.
22862
22863 2001-08-10 Robert Anisko <anisko_r@epita.fr>
22864
22865 * doc/bison.texinfo (Locations): Update @$ stuff.
22866
22867 2001-08-09 Robert Anisko <anisko_r@epita.fr>
22868
22869 * src/bison.simple (YYLLOC_DEFAULT): Update.
22870 (yyparse): Adjust.
22871
22872 2001-08-08 Marc Autret <autret_m@epita.fr>
22873
22874 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
22875 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22876 Reported by Fabrice Bauzac.
22877
22878 2001-08-08 Marc Autret <autret_m@epita.fr>
22879
22880 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22881 * src/vcg.c (output_node): Fix.
22882 * src/vcg.h: Cleanup.
22883 * src/print_graph.c: Add comments.
22884 (node_output_size): New global variable. Simplify the formatting of
22885 the VCG graph output.
22886 (print_actions): Unused code is now used. It notifies the final state
22887 and no action states in the VCG graph. It also give the reduce actions.
22888 The `shift and goto' edges are red and the `go to state' edges are
22889 blue.
22890 Get the current node name and node_obstack by argument.
22891 (node_obstack): New variable.
22892 (print_state): Manage node_obstack.
22893 (print_core): Use node_obstack given by argument.
22894 A node is not only computed here but in print_actions also.
22895 (print_graph): CPP out useless code instead of commenting it.
22896
22897 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22898
22899 * tests/atconfig.in (CPPFLAGS): Fix.
22900
22901 2001-08-07 Akim Demaille <akim@epita.fr>
22902
22903 * src/print_graph.c (quote): New.
22904 (print_core): Use it.
22905
22906 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22907
22908 * src/vcg.c (complain.h): Include it.
22909 Unepitaize `return' invocations.
22910 [NDEBUG] (main): Remove.
22911 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22912 * src/files.c (open_files): Initialize graph_obstack.
22913 * src/print_graph.c (print_actions): CPP out useless code.
22914 (print_core): Don't output the last `\n' in labels.
22915 Use `quote'.
22916 * src/files.c (output_files): Output the VCG file.
22917 * src/main.c (main): Invoke print_graph ();
22918
22919 2001-08-06 Marc Autret <autret_m@epita.fr>
22920
22921 Automaton VCG graph output.
22922 Using option ``-g'' or long option ``--graph'', you can generate
22923 a gram_filename.vcg file containing a VCG description of the LALR (1)
22924 automaton of your grammar.
22925
22926 * src/main.c: Call to print_graph() function.
22927 * src/getargs.h: Update.
22928 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22929 (graph_flag): New flag.
22930 (longopts): Update.
22931 (getargs): Add case `g'.
22932 * src/files.c (graph_obstack): New obstack struct.
22933 (open_files): Initialize new obstack.
22934 (output_files): Saves graph_obstack if required.
22935 * src/files.h (graph_obstack): New extern declaration.
22936 * src/Makefile.am: Add new source files.
22937
22938 2001-08-06 Marc Autret <autret_m@epita.fr>
22939
22940 * src/print_graph.c, src/print_graph.h (graph): New.
22941 * src/vcg.h: New file.
22942 * src/vcg.c: New file, VCG graph handling.
22943
22944 2001-08-06 Marc Autret <autret_m@epita.fr>
22945
22946 Add of %source_extension and %header_extension which specify
22947 the source or/and the header output file extension.
22948
22949 * src/files.c (compute_base_names): Remove initialisation of
22950 src_extension and header_extension.
22951 (compute_exts_from_gf): Update.
22952 (compute_exts_from_src): Update.
22953 (output_files): Update.
22954 * src/reader.c (parse_header_extension_decl): New.
22955 (parse_source_extension_decl): New.
22956 (read_declarations): New case statements for the new tokens.
22957 * src/lex.c (percent_table): Add entries for %source_extension
22958 and %header_extension.
22959 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22960
22961 2001-08-06 Marc Autret <autret_m@epita.fr>
22962
22963 * configure.in: Bump to 1.28c.
22964 * doc/bison.texinfo: Texinfo thingies.
22965
22966 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22967
22968 * tests/atconfig.in (CPPFLAGS): Add.
22969 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22970
22971 2001-08-03 Akim Demaille <akim@epita.fr>
22972
22973 Version 1.28b.
22974
22975 2001-08-03 Akim Demaille <akim@epita.fr>
22976
22977 * tests/Makefile.am (check-local): Ship testsuite.
22978 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22979 Include `string.h'.
22980
22981 2001-08-03 Akim Demaille <akim@epita.fr>
22982
22983 * configure.in: Try using -Wformat when compiling.
22984
22985 2001-08-03 Akim Demaille <akim@epita.fr>
22986
22987 * configure.in: Bump to 1.28b.
22988
22989 2001-08-03 Akim Demaille <akim@epita.fr>
22990
22991 * src/complain.c: Adjust strerror_r portability issues.
22992
22993 2001-08-03 Akim Demaille <akim@epita.fr>
22994
22995 Version 1.28a.
22996
22997 2001-08-03 Akim Demaille <akim@epita.fr>
22998
22999 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23000 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23001 * src/getargs.c: Include complain.h.
23002 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23003 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23004
23005 2001-08-03 Akim Demaille <akim@epita.fr>
23006
23007 * src/reader.c (readgram): Display hidden chars in error messages.
23008
23009 2001-08-03 Akim Demaille <akim@epita.fr>
23010
23011 Update to gettext 0.10.39.
23012
23013 2001-08-03 Akim Demaille <akim@epita.fr>
23014
23015 * lib/strspn.c: New.
23016
23017 2001-08-01 Marc Autret <autret_m@epita.fr>
23018
23019 * doc/bison.texinfo: Update.
23020 * doc/bison.1 (mandoc): Update.
23021 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23022 * src/files.c: Support output files extensions computing.
23023 (src_extension): New static variable.
23024 (header_extension): New static variable.
23025 (tr): New function.
23026 (get_extension_index): New function, gets the index of an extension
23027 filename in a string.
23028 (compute_exts_from_gf): New function, computes extensions from the
23029 grammar file extension.
23030 (compute_exts_from_src): New functions, computes extensions from the
23031 C source file extension, file given by ``-o'' option.
23032 (compute_base_names): Update.
23033 (output_files): Update.
23034
23035 2001-08-01 Robert Anisko <anisko_r@epita.fr>
23036
23037 * doc/bison.texi: Document @$.
23038 (Locations): New section.
23039
23040 2001-07-18 Akim Demaille <akim@epita.fr>
23041
23042 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23043 * config/prev-version.txt, config/move-if-change: New.
23044 * Makefile.am: Adjust.
23045
23046 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
23047
23048 * src/bison.simple (yyparse): Suppress warning `comparaison
23049 between signed and unsigned'.
23050
23051 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
23052
23053 * src/getargs.h (raw_flag): Remove.
23054 * src/getargs.c: Die on `-r'/`--raw'.
23055 * src/lex.c (parse_percent_token): Die on `%raw'.
23056 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23057 * tests/calc.at: Suppress test with option `--raw'.
23058
23059 2001-07-14 Akim Demaille <akim@epita.fr>
23060
23061 * config/: New.
23062 * configure.in: Require Autoconf 2.50.
23063 Update to gettext 0.10.38.
23064
23065 2001-03-16 Akim Demaille <akim@epita.fr>
23066
23067 * doc/bison.texinfo: ANSIfy the examples.
23068
23069 2001-03-16 Akim Demaille <akim@epita.fr>
23070
23071 * getargs.c (skeleton): New variable.
23072 (longopts): --skeleton is a new option.
23073 (shortopts, getargs): -S is a new option.
23074 * getargs.h: Declare skeleton.
23075 * output.c (output_parser): Use it.
23076
23077 2001-03-16 Akim Demaille <akim@epita.fr>
23078
23079 * m4/strerror_r.m4: New.
23080 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23081 * lib/error.h, lib/error.c: Update.
23082
23083 2001-03-16 Akim Demaille <akim@epita.fr>
23084
23085 * src/getargs.c (longopts): Clean up.
23086
23087 2001-02-21 Akim Demaille <akim@epita.fr>
23088
23089 * src/reader.c (gensym): `gensym_count' is your own.
23090 Use a static buf to create the symbol name, as token_buffer is no
23091 longer a buffer.
23092
23093 2001-02-08 Akim Demaille <akim@epita.fr>
23094
23095 * src/conflicts.c (conflict_report): Be sure not to append to res
23096 between two calls, which could happen if both first sprintf were
23097 skipped, but not the first cp += strlen.
23098
23099 2001-02-08 Akim Demaille <akim@epita.fr>
23100
23101 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23102 New, from fileutils 4.0.37.
23103 * configure.in: Require Autoconf 2.49c. I took some time before
23104 making this decision. This is the only way out for portability
23105 issues in Bison, it would mean way too much duplicate effort to
23106 import in Bison features implemented in 2.49c since 2.13.
23107 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23108
23109 2001-02-02 Akim Demaille <akim@epita.fr>
23110
23111 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
23112 * lib/xalloc.h, lib/xmalloc.c: Update.
23113
23114 2001-01-19 Akim Demaille <akim@epita.fr>
23115
23116 Get rid of the ad hoc handling of token_buffer in the scanner: use
23117 the obstacks.
23118
23119 * src/lex.c (token_obstack): New.
23120 (init_lex): Initialize it. No longer call...
23121 (grow_token_buffer): this. Remove it.
23122 Adjust all the places which used it to use the obstack.
23123
23124 2001-01-19 Akim Demaille <akim@epita.fr>
23125
23126 * src/lex.h: Rename all the tokens:
23127 s/\bENDFILE\b/tok_eof/g;
23128 s/\bIDENTIFIER\b/tok_identifier/g;
23129 etc.
23130 Let them be enums, not #define, to ease debugging.
23131 Adjust all the code.
23132
23133 2001-01-18 Akim Demaille <akim@epita.fr>
23134
23135 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23136 * src/lex.c (maxtoken, grow_token_buffer): Static.
23137
23138 2001-01-18 Akim Demaille <akim@epita.fr>
23139
23140 Since we now use obstacks, more % directives can be enabled.
23141
23142 * src/lex.c (percent_table): Also accept `%yacc',
23143 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23144 `%debug'.
23145 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23146 instead of returning a token.
23147 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23148 * src/reader.c (read_declarations): Adjust.
23149 * src/files.c (open_files): Don't call `compute_base_names', don't
23150 compute `attrsfile' since they depend upon data which might be
23151 *in* the input file now.
23152 (output_files): Do it here.
23153 * src/output.c (output_headers): Document the fact that this patch
23154 introduces a guaranteed SEGV for semantic parsers.
23155 * doc/bison.texinfo: Document them.
23156 * tests/suite.at: Exercise these %options.
23157
23158 2000-12-20 Akim Demaille <akim@epita.fr>
23159
23160 Also handle the output file (--verbose) with obstacks.
23161
23162 * files.c (foutput): Remove.
23163 (output_obstack): New.
23164 Adjust all dependencies.
23165 * src/conflicts.c: Return a string.
23166 * src/system.h (obstack_grow_string): Rename as...
23167 (obstack_sgrow): this. Be ready to work with non literals.
23168 (obstack_fgrow4): New.
23169
23170 2000-12-20 Akim Demaille <akim@epita.fr>
23171
23172 * src/files.c (open_files): Fix the computation of short_base_name
23173 in the case of `-o foo.tab.c'.
23174
23175 2000-12-20 Akim Demaille <akim@epita.fr>
23176
23177 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23178 (copy_dollar): Now that everything uses obstacks, get rid of the
23179 FILE * parameters.
23180
23181 2000-12-20 Akim Demaille <akim@epita.fr>
23182
23183 * src/files.c (open_files): Actually the `.output' file is based
23184 on the short_base_name, not base_name.
23185 * tests/suite.at (Checking output file names): Adjust.
23186
23187 2000-12-20 Akim Demaille <akim@epita.fr>
23188
23189 * src/bison.s1: Remove, we now use directly...
23190 * src/bison.simple: this.
23191 * src/Makefile.am: Use pkgdata instead of data.
23192
23193 2000-12-20 Akim Demaille <akim@epita.fr>
23194
23195 * src/files.c (guard_obstack): New.
23196 (open_files): Initialize it.
23197 (output_files): Dump it...
23198 * src/files.h: Export it.
23199 * src/reader.c (copy_guard): Use it.
23200
23201 2000-12-19 Akim Demaille <akim@epita.fr>
23202
23203 * src/files.c (outfile, defsfile, actfile): Removed as global
23204 vars.
23205 (open_files): Don't compute them.
23206 (output_files): Adjust.
23207 (base_name, short_base_name): Be global.
23208 Adjust dependencies.
23209
23210 2000-12-19 Akim Demaille <akim@epita.fr>
23211
23212 * src/files.c (strsuffix): New.
23213 (stringappend): Be just like strcat but allocate.
23214 (base_names): Eve out from open_files.
23215 Try to simplify the rather hairy computation of base_name and
23216 short_base_name.
23217 (open_files): Use it.
23218 * tests/suite.at (Checking output file names): New test.
23219
23220 2000-12-19 Akim Demaille <akim@epita.fr>
23221
23222 * src/system.h (obstack_grow_literal_string): Rename as...
23223 (obstack_grow_string): this.
23224 * src/output.c (output_parser): Recognize `%% actions' instead of
23225 `$'.
23226 * src/bison.s1: s/$/%% actions/.
23227 * src/bison.hairy: Likewise.
23228
23229 2000-12-19 Akim Demaille <akim@epita.fr>
23230
23231 * src/output.c (output_parser): Compute the `#line' lines when
23232 there are.
23233 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23234 Suggested by Hans Aberg.
23235
23236 2000-12-19 Akim Demaille <akim@epita.fr>
23237
23238 Let the handling of the skeleton files be local to the procedures
23239 that use it.
23240
23241 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23242 longer static.
23243 (fparser, open_extra_files): Remove.
23244 (open_files, output_files): Don't take care of fparser.
23245 * src/files.h: Adjust.
23246 * src/output.c (output_parser): Open and close the file to the
23247 skeleton.
23248 * src/reader.c (read_declarations): When %semantic_parser, open
23249 fguard.
23250
23251 2000-12-19 Akim Demaille <akim@epita.fr>
23252
23253 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23254 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23255
23256 2000-12-19 Akim Demaille <akim@epita.fr>
23257
23258 * src/files.c (open_files): Yipee! We no longer need all the code
23259 looking for `/tmp' since we have no tmp file.
23260
23261 2000-12-19 Akim Demaille <akim@epita.fr>
23262
23263 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23264 New macros.
23265 * src/files.c (open_files): Less dependency on MSDOS etc.
23266
23267 2000-12-14 Akim Demaille <akim@epita.fr>
23268
23269 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23270 Provide a default definition.
23271 Use it when executing the default @ action.
23272 * src/reader.c (reader_output_yylsp): No longer include
23273 `timestamp' and `text' in the default YYLTYPE.
23274
23275 2000-12-12 Akim Demaille <akim@epita.fr>
23276
23277 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23278 (copy_guard): Quote the file names.
23279 Reported by Laurent Mascherpa.
23280
23281 2000-12-12 Akim Demaille <akim@epita.fr>
23282
23283 * src/output.c (output_headers, output_program, output): Be sure
23284 to escape special characters when outputting filenames.
23285 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23286 (output_headers): Don't depend on them, Use ACTSTR.
23287
23288 2000-11-17 Akim Demaille <akim@epita.fr>
23289
23290 * lib/obstack.h: Formatting changes.
23291 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23292 prevents type checking.
23293 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23294 cast the value to (void *): assigning a `foo *' to a `void *'
23295 variable is valid.
23296 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23297 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23298 append characters.
23299
23300 2000-11-17 Akim Demaille <akim@epita.fr>
23301
23302 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23303 as...
23304 (suite.m4, regression.m4, calc.m4): these.
23305 * tests/atgeneral.m4: Update from CVS Autoconf.
23306
23307 2000-11-17 Akim Demaille <akim@epita.fr>
23308
23309 * tests/regression.m4 (%union and --defines): New test,
23310 demonstrating a current bug in the obstack implementation.
23311
23312 2000-11-17 Akim Demaille <akim@epita.fr>
23313
23314 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23315 macros.
23316 Use them to declare the variables which are global or local to
23317 `yyparse'.
23318
23319 2000-11-17 Akim Demaille <akim@epita.fr>
23320
23321 * acconfig.h: Remove, no longer used.
23322
23323 2000-11-07 Akim Demaille <akim@epita.fr>
23324
23325 * src: s/Copyright (C)/Copyright/g.
23326
23327 2000-11-07 Akim Demaille <akim@epita.fr>
23328
23329 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23330 defining.
23331 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23332
23333 2000-11-07 Akim Demaille <akim@epita.fr>
23334
23335 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23336 Merge in a single CPP if/else.
23337
23338 2000-11-07 Akim Demaille <akim@epita.fr>
23339
23340 * src/output.c (output): Remove useless variables.
23341 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23342 argument `data' for consistency with the prototypes.
23343 Qualify it `const'.
23344 (obstack_copy, obstack_copy0): Rename the second argument as
23345 `address' for consistency. Qualify it `const'.
23346 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23347 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23348 `const' their input argument (`data' or `address').
23349 Adjust the corresponding macros to include `const' in casts.
23350
23351 2000-11-03 Akim Demaille <akim@epita.fr>
23352
23353 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23354 s/PFILE1/BISON_HAIRY/.
23355 Adjust dependencies.
23356
23357 2000-11-03 Akim Demaille <akim@epita.fr>
23358
23359 For some reason, this was not applied.
23360
23361 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23362 `unlink': it's no longer used.
23363
23364 2000-11-03 Akim Demaille <akim@epita.fr>
23365
23366 * src/files.c (skeleton_find): New function, eved out of...
23367 (open_files, open_extra_files): here.
23368
23369 2000-11-03 Akim Demaille <akim@epita.fr>
23370
23371 Don't use `atexit'.
23372
23373 * src/files.c (obstack_save): New function.
23374 (done): Rename as...
23375 (output_files): this.
23376 Use `obstack_save'.
23377 * src/main.c (main): Don't use `atexit' to register `done', since
23378 it no longer has to remove tmp files, just call `output_files'
23379 when there are no errors.
23380
23381 2000-11-02 Akim Demaille <akim@epita.fr>
23382
23383 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23384 `unlink': it's no longer used.
23385 * src/files.h: Formatting changes.
23386
23387 2000-11-02 Akim Demaille <akim@epita.fr>
23388
23389 Remove the last uses of mktemp and unlink/delete.
23390
23391 * src/files.c (fdefines, ftable): Removed.
23392 (defines_ostack, table_obstack): New.
23393 Adjust dependencies of the former into uses of the latter.
23394 * src/output.c (output_short_or_char_table, output_short_table):
23395 Convert to using obstacks.
23396 * src/reader.c (copy_comment2): Accept one FILE * and two
23397 obstacks.
23398 (output_token_defines, reader_output_yylsp): Use obstacks.
23399 * src/system.h (obstack_fgrow3): New.
23400 * po/POTFILES.in: Adjust.
23401
23402 2000-11-01 Akim Demaille <akim@epita.fr>
23403
23404 Change each use of `fattrs' into a use of `attrs_obstack'.
23405
23406 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
23407 * src/files.c (fattrs): Remove.
23408 (attrs_obstack): New.
23409 Adjust all dependencies.
23410 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
23411
23412 2000-11-01 Akim Demaille <akim@epita.fr>
23413
23414 Introduce obstacks.
23415 Change each use of `faction' into a use of `action_obstack'.
23416
23417 * lib/obstack.h, lib/obstack.c: New files.
23418 * src/files.c (faction): Remove.
23419 (action_obstack): New.
23420 Adjust all dependencies.
23421
23422 2000-10-20 Akim Demaille <akim@epita.fr>
23423
23424 * lib/quote.h (PARAMS): New macro. Use it.
23425
23426 2000-10-16 Akim Demaille <akim@epita.fr>
23427
23428 * src/output.c (output_short_or_char_table): New function.
23429 (output_short_table, output_token_translations): Use it.
23430 (goto_actions): Use output_short_table.
23431
23432 2000-10-16 Akim Demaille <akim@epita.fr>
23433
23434 * src/symtab.c (bucket_new): New function.
23435 (getsym): Use it.
23436
23437 * src/output.c (output_short_table): New argument to display the
23438 comment associated with the table.
23439 Adjust dependencies.
23440 (output_gram): Use it.
23441 (output_rule_data): Nicer output layout for YYTNAME.
23442
23443 2000-10-16 Akim Demaille <akim@epita.fr>
23444
23445 * src/lex.c (read_typename): New function.
23446 (lex): Use it.
23447 * src/reader.c (copy_dollar): Likewise.
23448
23449 2000-10-16 Akim Demaille <akim@epita.fr>
23450
23451 * src/reader.c (copy_comment2): Expect the input stream to be on
23452 the `/' which is suspected to open a comment, instead of being
23453 called after `//' or `/*' was read.
23454 (copy_comment, copy_definition, parse_union_decl, copy_action)
23455 (copy_guard): Adjust.
23456
23457 2000-10-16 Akim Demaille <akim@epita.fr>
23458
23459 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
23460 `read_signed_integer'.
23461
23462 2000-10-16 Akim Demaille <akim@epita.fr>
23463
23464 * src/reader.c (copy_dollar): New function.
23465 (copy_guard, copy_action): Use it.
23466
23467 2000-10-16 Akim Demaille <akim@epita.fr>
23468
23469 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
23470 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
23471 New files, from Fileutils 4.0.27.
23472 * src/main.c (printable_version): Remove.
23473 * src/lex.c, src/reader.c: Use `quote'.
23474
23475 2000-10-04 Akim Demaille <akim@epita.fr>
23476
23477 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
23478
23479 2000-10-04 Akim Demaille <akim@epita.fr>
23480
23481 * doc/bison.texinfo: Various typos spotted by Neil Booth.
23482
23483 2000-10-04 Akim Demaille <akim@epita.fr>
23484
23485 When a literal string is used to define two different tokens,
23486 `bison -v' segfaults.
23487 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
23488
23489 * tests/regression.m4: New file.
23490 Include the core of the sample provided by Piotr Gackiewicz.
23491 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
23492 properly.
23493
23494 2000-10-04 Akim Demaille <akim@epita.fr>
23495
23496 * src/reader.c (parse_expect_decl): Keep `count' within the size
23497 of `buffer'.
23498 From Neil Booth.
23499
23500 2000-10-02 Paul Eggert <eggert@twinsun.com>
23501
23502 * bison.s1 (yyparse): Assign the default value
23503 unconditionally, to avoid a GCC warning and make the parser a
23504 tad smaller.
23505
23506 2000-10-02 Akim Demaille <akim@epita.fr>
23507
23508 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
23509 options.
23510
23511 2000-10-02 Akim Demaille <akim@epita.fr>
23512
23513 * src/derives.c, src/print.c, src/reduce.c: To ease the
23514 translation, move some `\n' out of the translated strings.
23515
23516 2000-10-02 Akim Demaille <akim@epita.fr>
23517
23518 The location tracking mechanism is precious for parse error
23519 messages. Nevertheless, it is enabled only when `@n' is used in
23520 the grammar, which is a different issue (you can use it in error
23521 message, but not in the grammar per se). Therefore, there should
23522 be another means to enable it.
23523
23524 * src/getargs.c (getargs): Support `--locations'.
23525 (usage): Report it.
23526 * src/getargs.h (locationsflag): Export it.
23527 * src/lex.c (percent_table): Support `%locations'.
23528 * src/reader.c (yylsp_needed): Remove this variable, now replaced
23529 with `locationsflag'.
23530 * doc/bison.texinfo: Document `--locations' and `%locations'.
23531 Sort the options.
23532 * tests/calc.m4: Test it.
23533
23534 For regularity of the names, replace each
23535 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
23536 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
23537 In addition replace each `flag' with `_flag'.
23538
23539 2000-10-02 Akim Demaille <akim@epita.fr>
23540
23541 Also test parse error messages, including with YYERROR_VERBOSE.
23542
23543 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
23544 associative).
23545 Use it to check the computations.
23546 Use it to check `nonassoc' is honored.
23547 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
23548 `--yyerror-verbose'.
23549 (_AT_CHECK_CALC): Adjust to this option.
23550 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
23551
23552 2000-10-02 Akim Demaille <akim@epita.fr>
23553
23554 Test also `--verbose', `--defines' and `--name-prefix'. Testing
23555 the latter demonstrates a flaw in the handling of non debugging
23556 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
23557 was used in order to simplify:
23558
23559 #if YYDEBUG
23560 if (yydebug)
23561 {
23562 ...
23563 }
23564 #endif
23565
23566 into
23567
23568 if (yydebug)
23569 {
23570 ...
23571 }
23572
23573 unfortunately this leads to a CPP conflict when
23574 `--name-prefix=foo' is used since it produces `#define yydebug
23575 foodebug'.
23576
23577 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
23578 (YYDPRINTF): New macro.
23579 Spread its use.
23580 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
23581 the bison options.
23582 Also test `--verbose', `--defines' and `--name-prefix'.
23583
23584 2000-10-02 Akim Demaille <akim@epita.fr>
23585
23586 Improve the readability of the produced parsers.
23587
23588 * src/bison.s1: Formatting changes.
23589 Improve the comment related to the `$' mark.
23590 (yydefault): Don't fall through to `yyresume': `goto' there.
23591 * src/output.c (output_parser): When the `$' is met, skip the end
23592 of its line.
23593 New variable, `number_of_dollar_signs', to check there's exactly
23594 one `$' in the parser skeleton.
23595
23596 2000-10-02 Akim Demaille <akim@epita.fr>
23597
23598 * lib/xstrdup.c: New file, from the fileutils.
23599 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
23600 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
23601 instead of strlen + xmalloc + strcpy.
23602 * src/symtab.c (copys): Remove, use xstrdup instead.
23603
23604 2000-10-02 Akim Demaille <akim@epita.fr>
23605
23606 * src/gram.h (associativity): New enum type which replaces the
23607 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
23608 `right_assoc', `left_assoc' and `non_assoc'.
23609 Adjust all dependencies.
23610 * src/reader.c: Formatting changes.
23611 (LTYPESTR): Don't define it, use it as a literal in
23612 `reader_output_yylsp'.
23613 * src/symtab.h (symbol_class): New enum type which replaces the
23614 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
23615 `sunknown', `stoken and `snterm'.
23616
23617 2000-10-02 Akim Demaille <akim@epita.fr>
23618
23619 * src/getargs.c (fixed_outfiles): Rename as...
23620 (yaccflag): for consistency and accuracy.
23621 Adjust dependencies.
23622
23623 2000-10-02 Akim Demaille <akim@epita.fr>
23624
23625 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
23626 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
23627 difficult and introduced a lot of core dump. It turns out that
23628 Bison used an implementation of `xmalloc' based on `calloc', and
23629 at various places it does depend upon the initialization to 0. I
23630 have not tried to isolate the pertinent places, and all the former
23631 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
23632 someone should address this issue.
23633
23634 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
23635 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
23636 files.
23637 Adjust dependencies.
23638 * src/warshall.h: New file.
23639 Propagate.
23640
23641 2000-10-02 Akim Demaille <akim@epita.fr>
23642
23643 Various anti-`extern in *.c' changes.
23644
23645 * src/system.h: Include `assert.h'.
23646
23647 2000-10-02 Akim Demaille <akim@epita.fr>
23648
23649 * src/state.h (nstates, final_state, first_state, first_shift)
23650 (first_reduction): Move their exportation from here...
23651 * src/LR0.h: to here.
23652 Adjust dependencies.
23653 * src/getargs.c (statisticsflag): New variable.
23654 Add support for `--statistics'.
23655 Adjust dependencies.
23656
23657 Remove a lot of now useless `extern' statements in most files.
23658
23659 2000-10-02 Akim Demaille <akim@epita.fr>
23660
23661 * src/LR0.h: New file.
23662 Propagate its use.
23663
23664 2000-10-02 Akim Demaille <akim@epita.fr>
23665
23666 * src/print.h: New file.
23667 Propagate its use.
23668 * src/print.c: Formatting and ordering changes.
23669 (verbose, terse): Replace with...
23670 (print_results): this new function.
23671 Adjust dependencies.
23672
23673 2000-10-02 Akim Demaille <akim@epita.fr>
23674
23675 * src/conflicts.c (conflict_report): New function.
23676 (conflict_log, verbose_conflict_log): Replace with...
23677 (print_conflicts): this function.
23678 Adjust dependencies.
23679 * src/conflicts.h: New file.
23680 Propagate its inclusion.
23681
23682 2000-10-02 Akim Demaille <akim@epita.fr>
23683
23684 * src/nullable.h: New file.
23685 Propagate its inclusion.
23686 * src/nullable.c: Formatting changes.
23687
23688 2000-10-02 Akim Demaille <akim@epita.fr>
23689
23690 * src/reduce.h: New file.
23691 Propagate its inclusion.
23692 * src/reduce.c: Topological sort and other formatting changes.
23693 (bool, TRUE, FALSE): Move their definition to...
23694 * src/system.h: here.
23695
23696 2000-10-02 Akim Demaille <akim@epita.fr>
23697
23698 * src/files.c: Formatting changes.
23699 (tryopen, tryclose, openfiles): Rename as...
23700 (xfopen, xfclose, open_files): this.
23701 (stringappend): static.
23702 * src/files.h: Complete the list of exported symbols.
23703 Propagate its use.
23704
23705 2000-10-02 Akim Demaille <akim@epita.fr>
23706
23707 * src/reader.h: New file.
23708 Propagate its use instead of tedious list of `extern' and
23709 prototypes.
23710 * src/reader.c: Formatting changes, topological sort,
23711 s/register//.
23712
23713 2000-10-02 Akim Demaille <akim@epita.fr>
23714
23715 * src/lex.h: Prototype `lex.c' exported functions.
23716 * src/reader.c: Adjust.
23717 * src/lex.c: Formatting changes.
23718 (safegetc): Rename as...
23719 (xgetc): this.
23720
23721 2000-10-02 Akim Demaille <akim@epita.fr>
23722
23723 * src/lalr.h: New file.
23724 Propagate its inclusion instead of prototypes and `extern'.
23725 * src/lalr.c: Formatting changes, topological sorting etc.
23726
23727 2000-10-02 Akim Demaille <akim@epita.fr>
23728
23729 * src/output.c (token_actions): Introduce a temporary array,
23730 YYDEFACT, that makes it possible for this function to use
23731 output_short_table.
23732
23733 2000-10-02 Akim Demaille <akim@epita.fr>
23734
23735 `user_toknums' is output as a `short[]' in `output.c', while it is
23736 defined as a `int[]' in `reader.c'. For consistency with the
23737 other output tables, `user_toknums' is now defined as a table of
23738 shorts.
23739
23740 * src/reader.c (user_toknums): Be a short table instead of an int
23741 table.
23742 Adjust dependencies.
23743
23744 Factor the short table outputs.
23745
23746 * src/output.c (output_short_table): New function.
23747 * src/output.c (output_gram, output_stos, output_rule_data)
23748 (output_base, output_table, output_check): Use it.
23749
23750 2000-10-02 Akim Demaille <akim@epita.fr>
23751
23752 * src/output.c (output): Topological sort of the functions, in
23753 order to get rid of the `static' prototypes.
23754 No longer use `register'.
23755 * src/output.h: New file.
23756 Propagate its inclusion in files explicitly prototyping functions
23757 from output.c.
23758
23759 2000-09-21 Akim Demaille <akim@epita.fr>
23760
23761 * src/atgeneral.m4: Update from Autoconf.
23762
23763 2000-09-21 Akim Demaille <akim@epita.fr>
23764
23765 * src/closure.h: New file.
23766 * src/closure.c: Formatting changes, topological sort over the
23767 functions, use of closure.h.
23768 (initialize_closure, finalize_closure): Rename as...
23769 (new_closure, free_closure): these. Adjust dependencies.
23770 * src/LR0.c: Formatting changes, topological sort, use of
23771 cloture.h.
23772 (initialize_states): Rename as...
23773 (new_states): this.
23774 * src/Makefile.am (noinst_HEADERS): Adjust.
23775
23776 2000-09-20 Akim Demaille <akim@epita.fr>
23777
23778 * src/acconfig.h: Don't protect config.h against multiple
23779 inclusion.
23780 Don't define PARAMS.
23781 * src/system.h: Define PARAMS.
23782 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
23783 purpose of config.h. system.h must not try to fix wrong
23784 definitions in config.h.
23785
23786 2000-09-20 Akim Demaille <akim@epita.fr>
23787
23788 * src/derives.h: New file.
23789 * src/main.c, src/derives.h: Use it.
23790 Formatting changes.
23791 * src/Makefile.am (noinst_HEADERS): Adjust.
23792
23793 2000-09-20 Akim Demaille <akim@epita.fr>
23794
23795 * tests/atgeneral.m4: Update from Autoconf.
23796 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
23797 (AT_CHECK_CALC): New macros.
23798 Use these macros to test bison with options `', `--raw',
23799 `--debug', `--yacc', `--yacc --debug'.
23800
23801 2000-09-19 Akim Demaille <akim@epita.fr>
23802
23803 * src/output.c: Formatting changes.
23804 * src/machine.h: Remove, leaving its contents in...
23805 * src/system.h: here.
23806 Include stdio.h.
23807 Adjust all dependencies on stdio.h and machine.h.
23808 * src/getargs.h: New file.
23809 Let all `extern' declarations about getargs.c be replaced with
23810 inclusion of `getargs.h'.
23811 * src/Makefile.am (noinst_HEADERS): Adjust.
23812
23813 * tests/calc.m4 (yyin): Be initialized in main, not on the global
23814 scope.
23815 (yyerror): Returns void, not int.
23816 * doc/bison.texinfo: Formatting changes.
23817
23818 2000-09-19 Akim Demaille <akim@epita.fr>
23819
23820 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
23821 portable.
23822
23823 2000-09-18 Akim Demaille <akim@epita.fr>
23824
23825 * configure.in: Append WARNING_CFLAGS to CFLAGS.
23826 * src/Makefile.am (INCLUDES): Don't.
23827 Be ready to fetch headers in lib/.
23828
23829 2000-09-18 Akim Demaille <akim@epita.fr>
23830
23831 * doc/bison.texinfo: Update the copyright.
23832 ANSIfy and GNUify the examples.
23833 Remove the old menu.
23834
23835 2000-09-18 Akim Demaille <akim@epita.fr>
23836
23837 First set of tests: use the `calc' example from the documentation.
23838
23839 * src/bison.s1 (yyparse): Condition the code using `yytname' which
23840 is defined only when YYDEBUG is.
23841 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
23842 * src/files.c (tryopen, tryclose): Formatting changes.
23843 Move to the top and be static.
23844 * src/reader.c (read_signed_integer): Likewise.
23845 * tests/calc.m4: New file.
23846 * Makefile.am, suite.m4: Adjust.
23847 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
23848
23849 2000-09-18 Akim Demaille <akim@epita.fr>
23850
23851 Add support for an Autotest test suite for Bison.
23852
23853 * m4/m4.m4, m4/atconfig.m4: New files.
23854 * m4/Makefile.am (EXTRA_DIST): Adjust.
23855 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
23856 files.
23857 * src/getargs.c: Display a more standard --version message.
23858 * src/reader.c (reader): Formatting changes.
23859 No longer depend upon VERSION_STRING.
23860 * configure.in: No longer use `dnl'.
23861 Set up the test suite and the new directory `tests/.
23862 (VERSION_STRING): Remove.
23863
23864 2000-04-14 Akim Demaille <akim@epita.fr>
23865
23866 * src/reader.c (copy_comment2): New function, same as former
23867 `copy_comment', but outputs into two FILE *.
23868 (copy_comment): Use it.
23869 (parse_union_decl): Use it.
23870 (get_type, parse_start_decl): Use the same `invalid' message.
23871 (parse_start_decl, parse_union_decl): Use the same `multiple'
23872 message.
23873 (parse_union_decl, copy_guard, copy_action): Use the same
23874 `unmatched' message.
23875 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23876
23877 2000-03-31 Akim Demaille <akim@epita.fr>
23878
23879 * src/files.c (tryopen, tryclose): Move to the top.
23880 Be static.
23881
23882 2000-03-31 Akim Demaille <akim@epita.fr>
23883
23884 * src/main.c (main): Don't call `done', exit does it.
23885
23886 2000-03-31 Akim Demaille <akim@epita.fr>
23887
23888 * allocate.c: s/return (foo)/return foo/.
23889 * lalr.c: Likewise.
23890 * LR0.c: Likewise.
23891 * output.c: Likewise.
23892 * reader.c: Likewise.
23893 * symtab.c: Likewise.
23894 * vmsgetargs.c: Likewise.
23895
23896 2000-03-31 Akim Demaille <akim@epita.fr>
23897
23898 Clean up the error reporting functions.
23899
23900 * src/report.c: New file.
23901 * src/report.h: Likewise.
23902 * src/Makefile.am: Adjust.
23903 * m4/error.m4: New file.
23904 * m4/Makefile.am: Adjust.
23905 * configure.in (jm_PREREQ_ERROR): Call it.
23906 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23907 Remove.
23908 (fatal, fatals): Remove. All callers use complain.c::fatal.
23909 (warn, warni, warns, warnss, warnss): Remove. All callers use
23910 complain.c::complain.
23911 (toomany): Remove, use fatal instead.
23912 * src/files.c (done): No argument, use complain_message_count.
23913 * src/main.c (main): Register `done' to `atexit'.
23914
23915 * src/getargs.c (usage): More `fputs', less `fprintf'.
23916
23917 2000-03-28 Akim Demaille <akim@epita.fr>
23918
23919 * lib/: New directory.
23920 * Makefile.am (SUBDIRS): Adjust.
23921 * configure.in: Adjust.
23922 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23923 useless.
23924 * src/alloca.c: Moved to lib/.
23925 * src/getopt.c: Likewise.
23926 * src/getopt1.c: Likewise.
23927 * src/getopt.h: Likewise.
23928 * src/ansi2knr.c: Likewise.
23929 * src/ansi2knr.1: Likewise.
23930 * src/Makefile.am: Adjust.
23931 * lib/Makefile.am: New file.
23932
23933 2000-03-28 Akim Demaille <akim@epita.fr>
23934
23935 * src/getargs.c (usage): Refresh the help message.
23936
23937 2000-03-17 Akim Demaille <akim@epita.fr>
23938
23939 * src/getopt1.c: Updated from textutils 2.0e
23940 * src/getopt.c: Likewise.
23941 * src/getopt.h: Likewise.
23942
23943 2000-03-17 Akim Demaille <akim@epita.fr>
23944
23945 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23946 the file name, not the whole `#line LINE FILE'.
23947
23948 2000-03-17 Akim Demaille <akim@epita.fr>
23949
23950 On syntax errors, report the token on which we choked.
23951
23952 * src/bison.s1 (yyparse): In the label yyerrlab, when
23953 YYERROR_VERBOSE, add yychar in msg.
23954
23955 2000-03-17 Akim Demaille <akim@epita.fr>
23956
23957 * src/reader.c (copy_at): New function.
23958 (copy_guard): Use it.
23959 (copy_action): Use it.
23960
23961 2000-03-17 Akim Demaille <akim@epita.fr>
23962
23963 Be kind to translators, save some useless translations.
23964
23965 * src/main.c (banner): New function.
23966 (fatal_banner): Use it.
23967 (warn_banner): Use it.
23968
23969 2000-03-17 Akim Demaille <akim@epita.fr>
23970
23971 * src/reader.c (copy_definition): Use copy_string and
23972 copy_comment. Removed now unused `match', `ended',
23973 `cplus_comment'.
23974 (copy_comment, copy_string): Moved, to be visible from
23975 copy_definition.
23976
23977 2000-03-17 Akim Demaille <akim@epita.fr>
23978
23979 * src/reader.c (copy_string): Declare `static inline'. No
23980 problems with inline, since it is checked by configure.
23981 (copy_comment): Likewise.
23982
23983 2000-03-17 Akim Demaille <akim@epita.fr>
23984
23985 * src/reader.c (packsymbols): Formatting changes.
23986
23987 2000-03-17 Akim Demaille <akim@epita.fr>
23988
23989 * src/reader.c (copy_comment): New function, factored out from:
23990 (copy_action): Use it. Removed now unused `match', `ended',
23991 `cplus_comment'.
23992 (copy_guard): Likewise.
23993
23994 2000-03-17 Akim Demaille <akim@epita.fr>
23995
23996 * src/reader.c (copy_string): New function, factored out from:
23997 (copy_action): Use it.
23998 (copy_guard): Likewise.
23999
24000 2000-03-17 Akim Demaille <akim@epita.fr>
24001
24002 Change the handling of @s so that they behave exactly like $s.
24003 There is now a pseudo variable @$ (readble and writable), location
24004 of the lhs of the rule (by default ranging from the location of
24005 the first symbol of the rhs, to the location of the last symbol,
24006 or, if the rhs is empty, YYLLOC).
24007
24008 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24009 yyval.
24010 (yyparse): When providing a default semantic action, provide a
24011 default location action.
24012 (after the $): No longer change `*YYLSP', just stack YYLOC the
24013 same way you stack YYVAL.
24014 * src/reader.c (read_declarations): Use warns.
24015 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24016 (copy_action, case '@'): Likewise.
24017 Use a standard error message, to save useless work from
24018 translators.
24019
24020 2000-03-17 Akim Demaille <akim@epita.fr>
24021
24022 * src/bison.s1: Formatting and cosmetics changes.
24023 * src/reader.c: Likewise.
24024 Update the Copyright notice.
24025
24026 2000-03-17 Akim Demaille <akim@epita.fr>
24027
24028 * src/bison.s1 (#line): All set to `#line' only, since the
24029 Makefile now handles them.
24030
24031 2000-03-16 Akim Demaille <akim@epita.fr>
24032
24033 * src/output.c (output_rule_data): Output the documentation of
24034 some of the tables.
24035 (Copyright notice): Update.
24036 Formatting changes.
24037
24038 2000-03-16 Akim Demaille <akim@epita.fr>
24039
24040 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24041 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24042 One `#if YYDEBUG' remains, since it uses variables which are
24043 defined only if `YYDEBUG != 0'.
24044
24045 2000-03-16 Akim Demaille <akim@epita.fr>
24046
24047 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24048 and related variables so that the similarities are highlighted.
24049
24050 2000-03-16 Akim Demaille <akim@epita.fr>
24051
24052 * src/bison.s1: Properly indent CPP directives.
24053
24054 2000-03-16 Akim Demaille <akim@epita.fr>
24055
24056 * src/bison.s1: Properly indent the `alloca' CPP section.
24057
24058 2000-03-16 Akim Demaille <akim@epita.fr>
24059
24060 Do not hard code values of directories in `configure.in'.
24061 Update the `configure' tool chain.
24062
24063 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24064 src/makefile.am.
24065 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24066 (AC_OUTPUT): Add m4/Makefile.
24067 Bump to bison 1.28a, 1.29 has never been released.
24068 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24069 handled via src/Makefile.am.
24070 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24071 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24072 autoheader.
24073 * Makefile.am (SUBDIRS): Add m4.
24074 (ACLOCAL_AM_FLAGS): New variable.
24075 (AUTOMAKE_OPTIONS): Add check-news.
24076 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24077 the proper line number and file name.
24078 (DEFS): Propagate the location of bison library files and of the
24079 locale files.
24080 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24081 builddir.
24082 * acinclude.m4: Remove, replaced by the directory m4.
24083 * m4/Makefile.am (EXTRA_DIST): New variable.
24084 * m4/gettext.m4: New file, from the fileutils.
24085 * m4/lcmessage.m4: Likewise
24086 * m4/progtest.m4: Likewise.
24087 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24088
24089 2000-03-10 Akim Demaille <akim@epita.fr>
24090
24091 * src/closure.c:
24092 Formatting changes of various comments.
24093 Respect the GNU coding standards at various places.
24094 Don't use `_()' when no translation is needed.
24095
24096 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24097
24098 * src/files.c:
24099 OS/2 honors TMPDIR environment variable.
24100
24101 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24102
24103 * doc/bison.texinfo: Tweaked spelling and grammar.
24104 Updated ISBN.
24105 Removed reference to price of printed copy.
24106 Mention BISON_SIMPLE and BISON_HAIRY.
24107
24108 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24109
24110 * configure.in, NEWS:
24111 Bison 1.29 released.
24112
24113 1999-10-27 Jesse Thilo <jthilo@gnu.org>
24114
24115 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24116 Added reference card.
24117
24118 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24119
24120 * po/ru.po: Added Russian translation.
24121
24122 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24123
24124 * configure.in: Added Russian translation.
24125
24126 1999-07-06 Jesse Thilo <jthilo@gnu.org>
24127
24128 * configure.in, NEWS, README:
24129 Released version 1.28.
24130
24131 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24132
24133 * src/system.h:
24134 Squashed redefinition warning on some systems.
24135
24136 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24137 Have configure build version string instead of relying on ANSI string
24138 concatentation.
24139
24140 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24141
24142 * po/POTFILES.in: Got rid of version.c.
24143
24144 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24145
24146 * acconfig.h, configure.in:
24147 Have configure build version string instead of relying on ANSI string
24148 concatentation.
24149
24150 1999-06-08 Jesse Thilo <jthilo@gnu.org>
24151
24152 * doc/bison.1:
24153 Dropped mention of `+' for long-named options.
24154
24155 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24156
24157 * src/files.c: Added <unistd.h> for unlink().
24158
24159 * src/Makefile.am, src/system.h:
24160 I18n fixes.
24161
24162 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24163
24164 * README: Added a FAQ list.
24165
24166 * configure.in, acconfig.h:
24167 I18n fixes.
24168
24169 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24170
24171 * doc/FAQ, doc/Makefile.am:
24172 Added a FAQ list.
24173
24174 1999-05-19 Jesse Thilo <jthilo@gnu.org>
24175
24176 * src/alloc.h, src/symtab.h, src/version.c:
24177 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24178
24179 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24180
24181 * src/.cvsignore, src/Makefile.am:
24182 Reorganized: sources in `src', documentation in `doc'.
24183
24184 * src/lex.c (literalchar):
24185 fixed the code for escaping double quotes (thanks
24186 Jonathan Czisny.)
24187
24188 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24189
24190 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24191 Adjusted paths to reflect directory reorganization.
24192
24193 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24194
24195 * doc/.cvsignore, doc/Makefile.am:
24196 Reorganized: sources in `src', documentation in `doc'.
24197
24198 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24199
24200 * configure.in:
24201 Updated AC_INIT file to reflect directory reorganization.
24202
24203 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24204 Reorganized: sources in `src', documentation in `doc'.
24205
24206 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24207
24208 * src/allocate.c:
24209 Don't declare calloc() and realloc() if not necessary.
24210
24211 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24212
24213 * configure.in, acconfig.h, acinclude.m4:
24214 Don't declare calloc() and realloc() if not necessary.
24215
24216 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24217
24218 * po/.cvsignore: Added i18n support.
24219
24220 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24221
24222 * acconfig.h, configure.in, Makefile.am:
24223 Added i18n support.
24224
24225 1999-03-22 Jesse Thilo <jthilo@gnu.org>
24226
24227 * src/bison.s1: Fixed #line numbers.
24228
24229 1999-03-15 Jesse Thilo <jthilo@gnu.org>
24230
24231 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24232 Added PO files from Translation Project.
24233
24234 1999-03-03 Jesse Thilo <jthilo@gnu.org>
24235
24236 * Makefile.am:
24237 Added support for non-ANSI compilers (ansi2knr).
24238
24239 1999-02-16 Jesse Thilo <jthilo@gnu.org>
24240
24241 * configure.in: Bumped version number to 1.27.
24242
24243 * Makefile.am:
24244 Added `bison.simple' to list of files removed by `make distclean'.
24245
24246 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24247
24248 * src/files.c, src/files.h:
24249 Defined locations of parser files in config.h instead of Makefile.
24250
24251 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24252
24253 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24254 Defined locations of parser files in config.h instead of Makefile.
24255
24256 1999-02-09 Jesse Thilo <jthilo@gnu.org>
24257
24258 * Makefile.am:
24259 Removed inappropriate use of $< macro.
24260
24261 1999-02-05 Jesse Thilo <jthilo@gnu.org>
24262
24263 * po/Makefile.in.in, po/POTFILES.in:
24264 Add `po' directory skeleton.
24265
24266 1999-01-27 Jesse Thilo <jthilo@gnu.org>
24267
24268 * README: Document help-bison list.
24269
24270 * configure.in: Add check for mkstemp().
24271
24272 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24273
24274 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24275 Hush a few compiler warnings.
24276
24277 * src/files.c:
24278 Add tryclose(), which verifies that fclose was successful.
24279 Hush a couple of compiler warnings.
24280
24281 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24282
24283 * Makefile.am, OChangeLog:
24284 ChangeLog is now automatically generated. Include the old version as
24285 OChangeLog.
24286
24287 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24288
24289 * 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:
24290 Update FSF address.
24291
24292 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24293
24294 * doc/bison.texinfo: Fix formatting glitch.
24295
24296 * doc/bison.texinfo: Update FSF address.
24297
24298 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24299
24300 * acconfig.h: Update FSF address.
24301
24302 1999-01-08 Jesse Thilo <jthilo@gnu.org>
24303
24304 * src/system.h:
24305 Don't define PACKAGE here, since config.h defines it.
24306
24307 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24308
24309 * src/reader.c: Update copyright date.
24310
24311 * src/main.c:
24312 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24313 favor of output directly to stderr (avoids buffer overruns).
24314
24315 * src/reader.c: Some checks for premature EOF.
24316
24317 * 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:
24318 Use prototypes if the compiler understands them.
24319
24320 * src/files.c: Honor TMPDIR on Unix hosts.
24321 Use prototypes if the compiler understands them.
24322
24323 * src/reader.c:
24324 Fix a couple of buffer overrun bugs.
24325 Use prototypes if the compiler understands them.
24326
24327 * src/system.h: Include unistd.h and ctype.h.
24328 Use #ifdef instead of #if for NLS symbols.
24329
24330 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24331
24332 * doc/bison.texinfo:
24333 Delete comment "consider using @set for edition number, etc..." since
24334 we now are doing so.
24335
24336 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24337
24338 * configure.in:
24339 Use prototypes if the compiler understands them.
24340
24341 * NEWS: Document 1.26 highlights.
24342
24343 * Makefile.am: Require Automake 1.3 or later.
24344
24345 * acconfig.h:
24346 Use prototypes if the compiler understands them.
24347
24348 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24349
24350 * src/version.c:
24351 Use VERSION symbol from automake for version number.
24352
24353 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24354
24355 * acconfig.h, configure.in, version.cin:
24356 Use VERSION symbol from automake for version number.
24357
24358 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24359
24360 * Makefile.am:
24361 Distribute original version of simple parser (bison.s1), not built
24362 version (bison.simple).
24363
24364 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24365
24366 * doc/bison.texinfo: Add info dir entry.
24367
24368 * doc/bison.texinfo:
24369 Let automake put version number into documentation.
24370
24371 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24372
24373 * src/bison.cld, src/build.com, src/vmshlp.mar:
24374 Add non-RCS files from /gd/gnu/bison.
24375
24376 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24377
24378 * doc/bison.1:
24379 Document the BISON_HAIRY and BISON_SIMPLE variables.
24380
24381 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24382
24383 * src/version.c: Build version.c automatically.
24384
24385 * src/reader.c:
24386 Fix token numbering (used to start at 258, not 257).
24387
24388 * src/system.h: Include config.h.
24389
24390 * src/getargs.c: Update bug report address.
24391
24392 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24393 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24394
24395 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24396
24397 * Makefile.am:
24398 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24399
24400 * configure.in, version.cin:
24401 Build version.c automatically.
24402
24403 * AUTHORS: Add AUTHORS file.
24404
24405 * README: Update bug report address.
24406
24407 * bison.simple:
24408 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24409
24410 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
24411 Add automake stuff.
24412
24413 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24414
24415 * doc/bison.texinfo: Clean up some formatting.
24416
24417 1998-05-05 Richard Stallman <rms@gnu.org>
24418
24419 * doc/bison.texinfo:
24420 Explain better why to make a pure parser.
24421
24422 1998-01-05 Richard Stallman <rms@gnu.org>
24423
24424 * src/files.c (openfiles):
24425 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
24426 find a temporary directory, if possible. Do not unlink files while
24427 they are open.
24428
24429 1997-08-25 Richard Stallman <rms@gnu.org>
24430
24431 * src/reader.c (stack_offset;):
24432 Change some warni to warns.
24433
24434 * src/lex.c (literalchar): Use warns, not warni.
24435
24436 1997-06-28 Richard Stallman <rms@gnu.org>
24437
24438 * src/bison.s1: Add a Bison version comment.
24439
24440 * src/main.c (fatal, warn, berror):
24441 Use program_name.
24442
24443 1997-06-28 Richard Stallman <rms@gnu.org>
24444
24445 * Makefile.in (bison_version): New variable.
24446 (dist): Use that variable.
24447 (bison.s1): Substitute the Bison version into bison.simple.
24448
24449 * bison.simple: Add a Bison version comment.
24450
24451 1997-06-18 Richard Stallman <rms@gnu.org>
24452
24453 * src/main.c (fatal, warn, berror):
24454 Make error messages standard.
24455 (toomany): Improve error message text.
24456
24457 * 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:
24458 new.h renamed to alloc.h.
24459
24460 1997-06-18 Richard Stallman <rms@gnu.org>
24461
24462 * Makefile.in: new.h renamed to alloc.h.
24463
24464 1997-05-24 Richard Stallman <rms@gnu.org>
24465
24466 * src/lex.c (literalchar):
24467 Fix the code for escaping \, " and '.
24468
24469 (lex): Avoid trouble when there are many chars
24470 to discard in a char literal with just several chars in it.
24471
24472 1997-05-17 Richard Stallman <rms@gnu.org>
24473
24474 * src/bison.s1:
24475 Use malloc, if using alloca is troublesome.
24476 (YYSTACK_USE_ALLOCA): New flag macro.
24477 Define it for some systems and compilers.
24478 (YYSTACK_ALLOC): New macro.
24479 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24480 If it was malloc'd, free it.
24481
24482 1997-05-17 Richard Stallman <rms@gnu.org>
24483
24484 * bison.simple:
24485 Use malloc, if using alloca is troublesome.
24486 (YYSTACK_USE_ALLOCA): New flag macro.
24487 Define it for some systems and compilers.
24488 (YYSTACK_ALLOC): New macro.
24489 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24490 If it was malloc'd, free it.
24491
24492 1997-04-23 Richard Stallman <rms@gnu.org>
24493
24494 * src/bison.s1:
24495 (alloca) [__hpux]: Always define as __builtin_alloca.
24496
24497 1997-04-23 Richard Stallman <rms@gnu.org>
24498
24499 * bison.simple:
24500 (alloca) [__hpux]: Always define as __builtin_alloca.
24501
24502 1997-04-22 Richard Stallman <rms@gnu.org>
24503
24504 * src/bison.s1:
24505 [__hpux]: Include alloca.h (right for HPUX 10)
24506 instead of declaring alloca (right for HPUX 9).
24507
24508 * src/bison.s1 (__yy_memcpy):
24509 Declare arg `count' as unsigned int.
24510 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24511
24512 1997-04-22 Richard Stallman <rms@gnu.org>
24513
24514 * bison.simple:
24515 [__hpux]: Include alloca.h (right for HPUX 10)
24516 instead of declaring alloca (right for HPUX 9).
24517
24518 * bison.simple (__yy_memcpy):
24519 Declare arg `count' as unsigned int.
24520 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24521
24522 1997-01-03 Richard Stallman <rms@gnu.org>
24523
24524 * src/allocate.c: [__STDC__ or _MSC_VER]:
24525 Declare calloc and realloc to return void *.
24526
24527 1997-01-02 Richard Stallman <rms@gnu.org>
24528
24529 * src/system.h:
24530 [_MSC_VER]: Include stdlib.h and process.h.
24531 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
24532
24533 * src/main.c (main): Return FAILURE as a value.
24534 (printable_version): Declare arg as int, not char.
24535
24536 1997-01-02 Richard Stallman <rms@gnu.org>
24537
24538 * Makefile.in (dist):
24539 Explicitly check for symlinks, and copy them.
24540
24541 1996-12-19 Richard Stallman <rms@gnu.org>
24542
24543 * src/files.c:
24544 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
24545
24546 1996-12-18 Paul Eggert <eggert@gnu.org>
24547
24548 * src/bison.s1 (yyparse):
24549 If __GNUC__ and YYPARSE_PARAM are both defined,
24550 declare yyparse to have a void * argument.
24551
24552 1996-12-18 Paul Eggert <eggert@gnu.org>
24553
24554 * bison.simple (yyparse):
24555 If __GNUC__ and YYPARSE_PARAM are both defined,
24556 declare yyparse to have a void * argument.
24557
24558 1996-12-17 Richard Stallman <rms@gnu.org>
24559
24560 * src/reduce.c (nbits): Add some casts.
24561
24562 1996-08-12 Richard Stallman <rms@gnu.org>
24563
24564 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
24565
24566 1996-08-12 Richard Stallman <rms@gnu.org>
24567
24568 * bison.simple: Test _MSDOS as well as _MSDOS_.
24569
24570 1996-07-31 Richard Stallman <rms@gnu.org>
24571
24572 * src/bison.s1:
24573 [__sun && __i386]: Include alloca.h.
24574
24575 1996-07-31 Richard Stallman <rms@gnu.org>
24576
24577 * bison.simple:
24578 [__sun && __i386]: Include alloca.h.
24579
24580 1996-07-30 Richard Stallman <rms@gnu.org>
24581
24582 * src/bison.s1: Comment change.
24583
24584 * src/bison.s1: Test _MSDOS_, not MSDOS.
24585
24586 1996-07-30 Richard Stallman <rms@gnu.org>
24587
24588 * bison.simple: Comment change.
24589
24590 * bison.simple: Test _MSDOS_, not MSDOS.
24591
24592 1996-06-01 Richard Stallman <rms@gnu.org>
24593
24594 * 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:
24595 Insert `_' macro around many string constants.
24596
24597 * src/main.c:
24598 Insert `_' macro around many string constants.
24599
24600 (main): Call setlocale, bindtextdomain and textdomain.
24601
24602 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
24603 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
24604 [ENABLE_NLS]: Include libintl.h.
24605 [ENABLE_NLS] (gettext): Define.
24606 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
24607 (N_, PACKAGE, LOCALEDIR): New macros.
24608
24609 1996-06-01 Richard Stallman <rms@gnu.org>
24610
24611 * POTFILES.in: New file.
24612
24613 * Makefile.in (allocate.o):
24614 Define target explicitly.
24615
24616 * Makefile.in (CFLAGS): Set to @CFLAGS@.
24617 (LDFLAGS): Set to @LDFLAGS@.
24618 (configure): Run autoconf only if preceding `cd' succeeds.
24619 (bison.s1): Redirect output to temporary file then move the
24620 temporary to the target, rather than redirecting directly to bison.s1.
24621 (clean): Remove config.status and config.log.
24622 (distclean): Don't remove config.status here.
24623
24624 1996-05-12 Richard Stallman <rms@gnu.org>
24625
24626 * src/bison.s1:
24627 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24628
24629 1996-05-12 Richard Stallman <rms@gnu.org>
24630
24631 * bison.simple:
24632 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24633
24634 1996-05-11 Richard Stallman <rms@gnu.org>
24635
24636 * src/bison.s1 (__yy_memcpy):
24637 Really reorder the args, as was supposedly done on Feb 14 1995.
24638 (yyparse): Calls changed accordingly.
24639
24640 1996-05-11 Richard Stallman <rms@gnu.org>
24641
24642 * Makefile.in (dist): Don't use $(srcdir).
24643
24644 * bison.simple (__yy_memcpy):
24645 Really reorder the args, as was supposedly done on Feb 14 1995.
24646 (yyparse): Calls changed accordingly.
24647
24648 1996-01-27 Richard Stallman <rms@gnu.org>
24649
24650 * src/output.c (output_rule_data):
24651 Test YYERROR_VERBOSE in the conditional
24652 around the definition of ttyname.
24653
24654 1995-12-29 Richard Stallman <rms@gnu.org>
24655
24656 * src/bison.s1:
24657 Fix line numbers in #line commands.
24658
24659 1995-12-29 Richard Stallman <rms@gnu.org>
24660
24661 * bison.simple:
24662 Fix line numbers in #line commands.
24663
24664 1995-12-27 Richard Stallman <rms@gnu.org>
24665
24666 * src/bison.s1 (YYPARSE_PARAM_DECL):
24667 In C++, make it always null.
24668 (YYPARSE_PARAM_ARG): New macro.
24669 (yyparse): Use YYPARSE_PARAM_ARG.
24670
24671 1995-12-27 Richard Stallman <rms@gnu.org>
24672
24673 * bison.simple (YYPARSE_PARAM_DECL):
24674 In C++, make it always null.
24675 (YYPARSE_PARAM_ARG): New macro.
24676 (yyparse): Use YYPARSE_PARAM_ARG.
24677
24678 1995-11-29 Richard Stallman <rms@gnu.org>
24679
24680 * doc/bison.texinfo:
24681 Describe literal string tokens, %raw, %no_lines, %token_table.
24682
24683 1995-11-29 Daniel Hagerty <hag@gnu.org>
24684
24685 * doc/bison.texinfo: Fixed update date
24686
24687 1995-10-16 Richard Stallman <rms@gnu.org>
24688
24689 * src/version.c: Version 1.25.
24690
24691 1995-10-16 Richard Stallman <rms@gnu.org>
24692
24693 * NEWS: *** empty log message ***
24694
24695 1995-10-16 Richard Stallman <rms@gnu.org>
24696
24697 * doc/bison.1, doc/bison.rnh:
24698 Add new options.
24699
24700 1995-10-15 Richard Stallman <rms@gnu.org>
24701
24702 * src/vmsgetargs.c, src/getargs.c:
24703 Added -n, -k, and -raw switches.
24704 (noparserflag, toknumflag, rawtoknumflag): New variables.
24705
24706 * src/symtab.h (SALIAS):
24707 New #define for adding aliases to %token.
24708 (struct bucket): Added `alias' field.
24709
24710 * src/reduce.c (reduce_grammar):
24711 Revise error message.
24712 (print_notices): Remove final `.' from error message.
24713
24714 * src/reader.c (reader_output_yylsp):
24715 New function.
24716 (readgram): Use `#if 0' around code that accepted %command
24717 inside grammar rules: The documentation doesn't allow it,
24718 and it will fail since the %command processors scan for the next %.
24719 (parse_token_decl): Extended the %token
24720 declaration to allow a multi-character symbol as an alias.
24721 (parse_thong_decl): New function.
24722 (read_declarations): Added %thong declarations.
24723 (read_declarations): Handle NOOP to deal with allowing
24724 % declarations as another means to specify the flags.
24725 (readgram): Allow %prec prior to semantics embedded in a rule.
24726 (skip_to_char, read_declarations, copy_definition)
24727 (parse_token_decl, parse_start_decl, parse_type_decl)
24728 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
24729 (get_type_name, copy_guard, copy_action, readgram)
24730 (get_type, packsymbols): Revised most error messages.
24731 Changed `fatal' to `warnxxx' to avoid aborting for error.
24732 Revised and use multiple warnxxx functions to avoid using VARARGS1.
24733 (read_declarations): Improve the error message for
24734 an invalid character. Do not abort.
24735 (read_declarations, copy_guard, copy_action): Use
24736 printable_version to avoid unprintable characters in printed output.
24737 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
24738 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
24739 Allow the type of a non-terminal can be given
24740 more than once, as long as all specifications give the same type.
24741
24742 * src/output.c:
24743 (output_headers, output_trailers, output, output_gram)
24744 (output_rule_data): Implement noparserflag variable.
24745 Implement toknumflag variable.
24746 (output): Call reader_output_yylsp to output LTYPESTR.
24747
24748 * src/main.c (main):
24749 If reader sees an error, don't process the grammar.
24750 (fatals): Updated to not use VARARGS1.
24751 (printable_version, int_to_string, warn, warni, warns, warnss)
24752 (warnsss): New error reporting functions. Avoid abort for error.
24753
24754 * src/lex.h:
24755 Added THONG and NOOP for alias processing.
24756 Added SETOPT for the new code that allows setting options with %flags.
24757
24758 * src/lex.c:
24759 Include getopt.h. Add some extern decls.
24760 (safegetc): New function to deal with EOF gracefully.
24761 (literalchar); new function to deal with reading \ escapes.
24762 (lex): Use literalchar.
24763 (lex): Implemented "..." tokens.
24764 (literalchar, lex, parse_percent_token): Made tokenbuffer
24765 always contain the token. This includes growing the token
24766 buffer while reading an integer.
24767 (parse_percent_token): Replaced if-else statement with percent_table.
24768 (parse_percent_token): Added % declarations as another
24769 way to specify the flags -n, -l, and -r. Also added hooks for
24770 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
24771 major changes to files.c.
24772 (lex) Retain in the incoming stream a character following
24773 an incorrect '/'.
24774 (skip_white_space, lex): Revised most error messages
24775 and changed fatal to warn to avoid aborting.
24776 (percent_table): Added %thong declarations.
24777
24778 * src/gram.h: Comment changes.
24779
24780 * src/files.c (openfiles, open_extra_files, done):
24781 Add faction flag
24782 and actfile file. Handle noparserflag. Both for -n switch.
24783
24784 * src/conflicts.c (resolve_sr_conflict):
24785 Remove use of alloca.
24786
24787 1995-06-01 Jim Meyering <meyering@gnu.org>
24788
24789 * doc/bison.texinfo: *** empty log message ***
24790
24791 1995-05-06 Richard Stallman <rms@gnu.org>
24792
24793 * src/bison.s1: Comment change.
24794
24795 1995-05-06 Richard Stallman <rms@gnu.org>
24796
24797 * bison.simple: Comment change.
24798
24799 1995-05-03 Richard Stallman <rms@gnu.org>
24800
24801 * src/version.c: Version now 1.24.
24802
24803 * src/bison.s1: Change distribution terms.
24804
24805 * src/version.c: Version now 1.23.
24806
24807 1995-05-03 Richard Stallman <rms@gnu.org>
24808
24809 * doc/bison.texinfo:
24810 Rewrite "Conditions for Using Bison".
24811 Update version to 1.24.
24812
24813 1995-05-03 Richard Stallman <rms@gnu.org>
24814
24815 * bison.simple: Change distribution terms.
24816
24817 1995-02-23 Richard Stallman <rms@gnu.org>
24818
24819 * src/files.c: Test __VMS_POSIX as well as VMS.
24820
24821 1995-02-14 Jim Meyering <meyering@gnu.org>
24822
24823 * src/bison.s1 (__yy_memcpy):
24824 Renamed from __yy_bcopy to avoid
24825 confusion. Reverse FROM and TO arguments to be consistent with
24826 those of memcpy.
24827
24828 1995-02-14 Jim Meyering <meyering@gnu.org>
24829
24830 * bison.simple (__yy_memcpy):
24831 Renamed from __yy_bcopy to avoid
24832 confusion. Reverse FROM and TO arguments to be consistent with
24833 those of memcpy.
24834
24835 1994-11-10 David J. MacKenzie <djm@gnu.org>
24836
24837 * NEWS: reformat
24838
24839 * NEWS: New file.
24840
24841 * Makefile.in (DISTFILES): Include NEWS.
24842
24843 * Makefile.in (DISTFILES):
24844 Include install-sh, not install.sh.
24845
24846 * configure.in: Update to Autoconf v2 macro names.
24847
24848 1994-10-05 David J. MacKenzie <djm@gnu.org>
24849
24850 * Makefile.in: fix typo
24851
24852 * Makefile.in (prefix, exec_prefix):
24853 Let configure set them.
24854
24855 1994-09-28 David J. MacKenzie <djm@gnu.org>
24856
24857 * Makefile.in: Set datadir to $(prefix)/share.
24858
24859 1994-09-15 Richard Stallman <rms@gnu.org>
24860
24861 * src/bison.s1:
24862 Update copyright notice and GPL version.
24863
24864 1994-09-15 Richard Stallman <rms@gnu.org>
24865
24866 * bison.simple:
24867 Update copyright notice and GPL version.
24868
24869 1994-07-12 Richard Stallman <rms@gnu.org>
24870
24871 * src/reduce.c, src/reader.c:
24872 entered into RCS
24873
24874 1994-05-05 David J. MacKenzie <djm@gnu.org>
24875
24876 * Makefile.in: entered into RCS
24877
24878 1994-03-26 Richard Stallman <rms@gnu.org>
24879
24880 * src/bison.s1: entered into RCS
24881
24882 1994-03-26 Richard Stallman <rms@gnu.org>
24883
24884 * bison.simple: entered into RCS
24885
24886 1994-03-25 Richard Stallman <rms@gnu.org>
24887
24888 * src/main.c: entered into RCS
24889
24890 1994-03-24 Richard Stallman <rms@gnu.org>
24891
24892 * src/conflicts.c: entered into RCS
24893
24894 1994-01-02 Richard Stallman <rms@gnu.org>
24895
24896 * Makefile.in: *** empty log message ***
24897
24898 1993-11-21 Richard Stallman <rms@gnu.org>
24899
24900 * src/bison.s1: *** empty log message ***
24901
24902 1993-11-21 Richard Stallman <rms@gnu.org>
24903
24904 * doc/bison.texinfo: entered into RCS
24905
24906 * doc/bison.texinfo: *** empty log message ***
24907
24908 1993-11-21 Richard Stallman <rms@gnu.org>
24909
24910 * bison.simple: *** empty log message ***
24911
24912 1993-10-25 David J. MacKenzie <djm@gnu.org>
24913
24914 * doc/bison.texinfo: *** empty log message ***
24915
24916 1993-10-19 Richard Stallman <rms@gnu.org>
24917
24918 * src/bison.s1: *** empty log message ***
24919
24920 1993-10-19 Richard Stallman <rms@gnu.org>
24921
24922 * bison.simple: *** empty log message ***
24923
24924 1993-10-14 Richard Stallman <rms@gnu.org>
24925
24926 * src/bison.s1: *** empty log message ***
24927
24928 1993-10-14 Richard Stallman <rms@gnu.org>
24929
24930 * bison.simple: *** empty log message ***
24931
24932 1993-09-14 David J. MacKenzie <djm@gnu.org>
24933
24934 * doc/bison.texinfo: *** empty log message ***
24935
24936 1993-09-13 Noah Friedman <friedman@gnu.org>
24937
24938 * Makefile.in: *** empty log message ***
24939
24940 1993-09-10 Richard Stallman <rms@gnu.org>
24941
24942 * src/conflicts.c: *** empty log message ***
24943
24944 * src/system.h: entered into RCS
24945
24946 1993-09-10 Richard Stallman <rms@gnu.org>
24947
24948 * doc/bison.1: entered into RCS
24949
24950 1993-09-06 Noah Friedman <friedman@gnu.org>
24951
24952 * src/version.c: entered into RCS
24953
24954 1993-09-06 Noah Friedman <friedman@gnu.org>
24955
24956 * Makefile.in: *** empty log message ***
24957
24958 1993-07-30 David J. MacKenzie <djm@gnu.org>
24959
24960 * Makefile.in: *** empty log message ***
24961
24962 1993-07-24 Richard Stallman <rms@gnu.org>
24963
24964 * src/bison.s1: *** empty log message ***
24965
24966 1993-07-24 Richard Stallman <rms@gnu.org>
24967
24968 * bison.simple: *** empty log message ***
24969
24970 1993-07-08 David J. MacKenzie <djm@gnu.org>
24971
24972 * Makefile.in: *** empty log message ***
24973
24974 1993-07-04 Richard Stallman <rms@gnu.org>
24975
24976 * src/bison.s1: *** empty log message ***
24977
24978 1993-07-04 Richard Stallman <rms@gnu.org>
24979
24980 * bison.simple: *** empty log message ***
24981
24982 1993-06-26 David J. MacKenzie <djm@gnu.org>
24983
24984 * src/getargs.c: entered into RCS
24985
24986 1993-06-26 David J. MacKenzie <djm@gnu.org>
24987
24988 * doc/bison.texinfo: *** empty log message ***
24989
24990 * doc/bison.1: New file.
24991
24992 1993-06-25 Richard Stallman <rms@gnu.org>
24993
24994 * src/getargs.c: New file.
24995
24996 1993-06-16 Richard Stallman <rms@gnu.org>
24997
24998 * src/bison.s1: *** empty log message ***
24999
25000 1993-06-16 Richard Stallman <rms@gnu.org>
25001
25002 * bison.simple: *** empty log message ***
25003
25004 1993-06-03 Richard Stallman <rms@gnu.org>
25005
25006 * src/bison.s1: New file.
25007
25008 1993-06-03 Richard Stallman <rms@gnu.org>
25009
25010 * doc/bison.texinfo: *** empty log message ***
25011
25012 1993-06-03 Richard Stallman <rms@gnu.org>
25013
25014 * bison.simple: New file.
25015
25016 1993-05-19 Richard Stallman <rms@gnu.org>
25017
25018 * doc/bison.texinfo: New file.
25019
25020 1993-05-07 Noah Friedman <friedman@gnu.org>
25021
25022 * Makefile.in: *** empty log message ***
25023
25024 1993-04-28 Noah Friedman <friedman@gnu.org>
25025
25026 * src/reader.c: *** empty log message ***
25027
25028 1993-04-23 Noah Friedman <friedman@gnu.org>
25029
25030 * src/alloc.h: entered into RCS
25031
25032 1993-04-20 David J. MacKenzie <djm@gnu.org>
25033
25034 * src/version.c: *** empty log message ***
25035
25036 * src/files.c, src/allocate.c:
25037 entered into RCS
25038
25039 * src/reader.c: *** empty log message ***
25040
25041 * src/lex.c: entered into RCS
25042
25043 * src/conflicts.c: New file.
25044
25045 * src/symtab.c: entered into RCS
25046
25047 * src/alloc.h: New file.
25048
25049 * src/LR0.c: entered into RCS
25050
25051 1993-04-18 Noah Friedman <friedman@gnu.org>
25052
25053 * src/reader.c: New file.
25054
25055 * src/version.c: *** empty log message ***
25056
25057 1993-04-18 Noah Friedman <friedman@gnu.org>
25058
25059 * Makefile.in: *** empty log message ***
25060
25061 1993-04-17 Noah Friedman <friedman@gnu.org>
25062
25063 * Makefile.in: *** empty log message ***
25064
25065 1993-04-15 Richard Stallman <rms@gnu.org>
25066
25067 * src/main.c, src/files.c:
25068 New file.
25069
25070 1993-04-15 Noah Friedman <friedman@gnu.org>
25071
25072 * configure.in: entered into RCS
25073
25074 * configure.in: *** empty log message ***
25075
25076 * configure.in: New file.
25077
25078 1993-04-14 Richard Stallman <rms@gnu.org>
25079
25080 * Makefile.in: New file.
25081
25082 1993-04-13 Richard Stallman <rms@gnu.org>
25083
25084 * src/version.c: New file.
25085
25086 1993-03-25 Richard Stallman <rms@gnu.org>
25087
25088 * src/output.c: entered into RCS
25089
25090 1992-09-25 Richard Stallman <rms@gnu.org>
25091
25092 * configure.bat: entered into RCS
25093
25094 1992-06-22 Richard Stallman <rms@gnu.org>
25095
25096 * src/vmsgetargs.c: entered into RCS
25097
25098 1992-06-22 Richard Stallman <rms@gnu.org>
25099
25100 * doc/bison.rnh: entered into RCS
25101
25102 1992-04-20 David J. MacKenzie <djm@gnu.org>
25103
25104 * README: entered into RCS
25105
25106 1992-01-22 Richard Stallman <rms@gnu.org>
25107
25108 * src/machine.h: entered into RCS
25109
25110 1991-12-21 Richard Stallman <rms@gnu.org>
25111
25112 * src/lalr.c, src/closure.c:
25113 entered into RCS
25114
25115 1991-12-20 Richard Stallman <rms@gnu.org>
25116
25117 * src/state.h: entered into RCS
25118
25119 1991-12-18 Richard Stallman <rms@gnu.org>
25120
25121 * src/print.c, src/nullable.c, src/derives.c:
25122 entered into RCS
25123
25124 1991-11-03 David J. MacKenzie <djm@gnu.org>
25125
25126 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25127 entered into RCS
25128
25129 1988-09-09 Richard Stallman <rms@gnu.org>
25130
25131 * src/bison.hairy: entered into RCS
25132
25133 1987-12-16 Richard Stallman <rms@gnu.org>
25134
25135 * REFERENCES: entered into RCS
25136
25137
25138 -----
25139
25140 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
25141 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
25142 2008, 2009 Free Software Foundation, Inc.
25143
25144 Copying and distribution of this file, with or without
25145 modification, are permitted provided the copyright notice and this
25146 notice are preserved.