]> git.saurik.com Git - bison.git/blob - ChangeLog
portability: fix several issues with M4 subprocess.
[bison.git] / ChangeLog
1 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 portability: fix several issues with M4 subprocess.
4
5 M4's output pipe was not being drained upon fatal errors during
6 scan_skel. As a result, broken-pipe messages from M4 were seen
7 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
8 failure in the test suite. The problem was that, on platforms
9 where the default disposition for SIGPIPE is ignore instead of
10 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
11 then reported it. However, there's some sort of race condition,
12 because the new test group occasionally succeeded.
13 Reported by Albert Chin at
14 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
15
16 There were also problems with the test suite livelocking on
17 Tru64 5.1b. Reported by Didier Godefroy at
18 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
19 Switching to create_pipe_bidi suggested by Akim Demaille.
20
21 To attempt to solve both of these problems, switch to gnulib's
22 create_pipe_bidi and register M4 process as a slave. Along the
23 way, clean up file name conflict handling, which was affected by
24 the broken-pipe problem before the switch.
25 * NEWS (2.4.2): Document.
26 * THANKS (Didier Godefroy): Add.
27 * bootstrap.conf (gnulib_modules): Add pipe.
28 * gnulib: Update to latest to make sure we have all the latest
29 fixes.
30 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
31 subpipe.c.
32 * po/POTFILES.in (lib/subpipe.c): Remove.
33 * src/files.c (compute_output_file_names): Update invocations
34 of output_file_name_check.
35 (output_file_name_check): In the case that the grammar file
36 would be overwritten, use complain instead of fatal, but replace
37 the output file name with /dev/null. Use the /dev/null solution
38 for the case of two conflicting output files as well because it
39 seems safer in case Bison one day tries to open both files at
40 the same time.
41 * src/files.h (output_file_name_check): Update prototype.
42 * src/output.c (output_skeleton): Use create_pipe_bidi and
43 wait_subprocess. Assert that scan_skel completely drains the
44 pipe.
45 * src/scan-skel.l (at_directive_perform): Update
46 output_file_name_check invocation.
47 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
48 grammar file actually isn't overwritten.
49 (Conflicting output files: -o foo.y): Update expected output.
50 * tests/skeletons.at (Fatal errors but M4 continues producing
51 output): New test group.
52
53 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
54
55 Update POTFILES.
56 * HACKING (Release Procedure): Add reminder about keeping
57 POTFILES files up-to-date.
58 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
59
60 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
61
62 Code cleanup.
63 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
64 which is already defined in atconfig.
65
66 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
67
68 tests: fix missing include caught by g++ 4.4.1.
69 Reported by Tys Lefering.
70 * HACKING (Release checks): Add note about trying a recent GCC.
71 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
72 cstdlib for abort.
73 (_AT_DATA_EXPECT2_Y): Likewise.
74
75 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
76
77 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
78
79 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
80
81 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
82 * HACKING (Release Procedure): Update notes on copyright years.
83 * Makefile.am (update-package-copyright-year): New target rule.
84 * build-aux/update-package-copyright-year: New file.
85 * cfg.mk (update-copyright): Add update-package-copyright-year
86 as a dependency.
87
88 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
89
90 * bootstrap: Import improvements from latest gnulib.
91
92 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
93
94 build: require Automake 1.11.1 to avoid a security flaw.
95 * HACKING (Release Procedure): Don't document Automake security
96 flaw here.
97 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
98 why here.
99
100 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
101
102 gnulib: update to latest.
103
104 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
105
106 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
107
108 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
109
110 Thank the developer of the initial push parser implementation.
111 This unfortunate oversight is several years old.
112 * THANKS (Odd Arild Olsen): Add.
113
114 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
115
116 Fix some comments concerning LR(0) versus LALR(1).
117
118 Stop equating LR(0) with nondeterminism and LALR(1) with
119 determinism. That is, if all states are consistent, then LR(0)
120 tables are deterministic. On the other hand, LALR(1) tables
121 might be nondeterministic before conflict resolution, and GLR
122 permits LALR(1) tables to remain nondeterministic.
123 * src/LR0.c, src/LR0.h: Here.
124 * src/lalr.c, src/lalr.h: Here.
125 * src/main.c (main): Here.
126 * src/state.c, src/state.h: Here.
127
128 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
129 parser tables.
130
131 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
132
133 maint: run "make update-copyright"
134
135 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
136
137 POSIX: complain if %prec's token was not defined.
138 * NEWS (2.5): Document.
139 * src/reader.c (grammar_rule_check): Convert warning to
140 complaint.
141 * tests/input.at (%prec's token must be defined): Update.
142
143 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
144
145 POSIX: warn if %prec's token was not defined.
146 Reported by Florian Krohm at
147 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
148 * NEWS (2.4.2): Document.
149 * src/reader.c (grammar_rule_check): Implement.
150 (grammar_current_rule_prec_set): Add comments explaining that we
151 here assume a %prec identifier is a token, but we still manage
152 to support POSIX.
153 * tests/input.at (%prec's token must be defined): New test
154 group.
155
156 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
157
158 * HACKING (Release Procedure): Recommend a secure automake.
159
160 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
161
162 portability: `<' and `>' are not always defined on addresses.
163 Specifically, don't sort objects by their memory addresses when
164 they're not allocated in the same array or other object. Though
165 I haven't found a test case where that fails on my platform, C
166 says the behavior is undefined.
167 * src/AnnotationList.c (AnnotationList__insertInto): Remove
168 FIXME. Use new id field of InadequacyList nodes rather than
169 their memory addresses when sorting.
170 (AnnotationList__compute_from_inadequacies): Add
171 inadequacy_list_node_count argument to pass to
172 InadequacyList__new_conflict.
173 * src/AnnotationList.h
174 (AnnotationList__compute_from_inadequacies): Update prototype
175 and documentation for new argument.
176 * src/InadequacyList.c (InadequacyList__new_conflict): Add
177 node_count argument and use it to assign a unique ID.
178 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
179 (InadequacyList): Add id field.
180 (InadequacyList__new_conflict): Update prototype and
181 documentation for new argument.
182 * src/ielr.c (ielr_compute_annotation_lists): Update
183 AnnotationList__compute_from_inadequacies invocation.
184
185 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
186
187 Fix handling of yychar manipulation in user semantic actions.
188 The problem was that yacc.c didn't always update the yychar
189 translation afterwards. However, other skeletons appear to be
190 fine. glr.c appears to already translate yychar before every
191 use. lalr1.cc does not define yychar and does not document its
192 replacement, yyla, for users. It does provide yyclearin, but
193 that does not manipulate yyla and thus requires no translation
194 update. In lalr1.java, yychar is out of scope during semantic
195 actions.
196 * NEWS (2.5): Document.
197 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
198 yytoken here.
199 (yyparse, yypush_parse): Instead, translate before every use of
200 yytoken, and add comments explaining this approach.
201 * tests/actions.at (Destroying lookahead assigned by semantic
202 action): New test group checking that translation happens before
203 lookahead destructor calls at parser return. Previously,
204 incorrect destructors were called.
205 * tests/conflicts.at (parse.error=verbose and consistent
206 errors): New test group checking that translation happens at
207 syntax error detection before the associated verbose error
208 message and the associated lookahead destructor calls. While
209 the destructor call is fixed by this patch, the verbose error
210 message is currently incorrect due to another bug (see
211 comments in test group), so this is an expected failure for now.
212
213 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
214
215 YYFAIL: warn about uses and remove from lalr1.java.
216 * NEWS (2.5): Document.
217 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
218 and make it private. Update all uses.
219 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
220
221 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
222
223 YYFAIL: deprecate.
224 * NEWS (2.4.2): Document deprecation and the phase-out plan.
225 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
226 deprecation.
227 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
228 YYFAIL from GCC cpp's -Wunused-macros.
229 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
230 documentation.
231 (LocalWords): Remove YYFAIL.
232
233 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
234
235 tests: cleanup.
236 * tests/c++.at (Syntax error discarding no lookahead): Don't
237 ignore stderr. Instead, eliminate remaining warnings.
238
239 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
240
241 lalr1.cc: don't discard non-existent lookahead on syntax error.
242 * data/lalr1.cc (parser::parse): Check yyempty first.
243 * tests/c++.at (Syntax error discarding no lookahead): New test
244 group.
245
246 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
247
248 Code cleanup.
249 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
250 function, which is no longer used.
251
252 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
253
254 Add gcc's -Wundef to test suite and fix another warning from it.
255 * NEWS (2.4.2): Update description of -Wundef fix.
256 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
257 (WARN_CFLAGS_TEST): New substitution.
258 * data/glr.c: Avoid warning about __STRICT_ANSI__.
259 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
260 WARN_CFLAGS.
261 (NO_WERROR_CFLAGS): Likewise.
262 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
263
264 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
265
266 * data/yacc.c: Reformat m4 a little.
267
268 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
269
270 Document gcc -Wundef fix.
271 * NEWS (2.4.2): Here.
272 * THANKS (Jonathan Nieder): Add.
273
274 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
275
276 Simplify y.tab.c when location tracking is disabled.
277 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
278 tracking is not enabled. Instead, unconditionally define
279 YY_LOCATION_PRINT as a no-op for backward compatibility.
280
281 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
282
283 Avoid warnings from gcc -Wundef y.tab.c.
284 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
285 defined before using them.
286 * data/lalr1.cc: Likewise.
287 * data/yacc.c: Likewise.
288
289 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
290
291 autoconf: update to latest for fix of M4 detection.
292 Reported by Eric Blake.
293 * submodules/autoconf: Update.
294
295 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
296
297 portability: use -DGNULIB_POSIXCHECK.
298 Reported by Eric Blake. See discussions at
299 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
300 and
301 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
302 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
303 * bootstrap.conf (gnulib_modules): Add all the printf modules
304 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
305 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
306 (excluded_files): Remove m4/printf-posix.m4.
307 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
308 lib/libbison.a so gnulib libraries can be linked.
309
310 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
311
312 gnulib: update for fix of fprintf-posix, which we'll use soon.
313 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
314 targets so that gnulib's new arg-nonnull.h and link-warning.h
315 are matched.
316 * gnulib: Update.
317
318 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
319
320 Enable assertion output and --disable-assert for configure.
321 * bootstrap.conf (gnulib_modules): Add assert module.
322 * src/system.h (aver): Define as assert, and summarize the
323 discussion on this issue.
324
325 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
326
327 Expand GLR acronym in summary of Bison.
328 Based on discussion with Akim Demaille starting at
329 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
330 * doc/bison.texinfo (Introduction): Here.
331 * src/getargs.c (usage): Here.
332
333 2009-10-03 Alex Rozenman <rozenman@gmail.com>
334
335 Document named references.
336 * doc/bison.texinfo (Actions): Add new example and xref to
337 Using Named References node.
338 (Using Named References): New node.
339
340 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
341
342 cleanup.
343 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
344 of char*.
345 (Sbitset__isEmpty): Use Sbitset instead of char*.
346 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
347 instead of char. This helps to avoid casting errors.
348 (Sbitset__or): Use Sbitset instead of char*.
349
350 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
351
352 portability: don't assume 8-bit bytes.
353 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
354 * src/Sbitset.h (Sbitset__nbytes): Here.
355 (Sbitset__byteAddress): Here.
356 (Sbitset__bit_mask): Here.
357 (Sbitset__last_byte_mask): Here.
358 (Sbitset__ones): Here.
359 (SBITSET__FOR_EACH): Here.
360
361 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
362
363 portability: use va_start and va_end in the same function.
364 * src/complain.c (error_message): Move va_end from here...
365 (ERROR_MESSAGE): ... to here.
366
367 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
368
369 * data/bison.m4: Update comments for rename to muscle-tab.h.
370
371 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
372
373 Minor code cleanup.
374 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
375 replace all uses with UNIQSTR_CONCAT.
376 * src/uniqstr.c (uniqstr_vsprintf): New function.
377 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
378 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
379 macros.
380
381 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
382
383 * TODO (Complaint submessage indentation): New.
384
385 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
386
387 Minor code cleanup.
388 * src/parse-gram.y: Clean up sorting of declarations.
389 Use types to simplify %printer declarations where possible.
390 Provide %printer for BRACKETED_ID and symbol.prec.
391 * src/symtab.c: Whitespace change.
392
393 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
394
395 tests: skip tests of file names that platform does not support.
396 Reported by Michael Raskin at
397 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
398 * THANKS (Michael Raskin): Add.
399 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
400 to fail at least for file names containing ":" or "\".
401
402 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
403
404 yysyntax_error: avoid duplicate lookahead collection.
405 Except when memory reallocation is required, this change
406 eliminates the need to invoke yysyntax_error twice and thus to
407 repeat the collection of lookaheads. It also prepares for
408 future extensions that will make those repetitions more
409 expensive and that will require additional memory management in
410 yysyntax_error. Finally, it fixes an obscure bug already
411 exercised in the test suite.
412 * data/yacc.c (yysyntax_error): Add arguments for message
413 buffer variables stored in the parser. Instead of size, return
414 status similar to yyparse status but indicating success of
415 message creation. Other than the actual reallocation of the
416 message buffer, import and clean up memory management code
417 from...
418 (yyparse, yypush_parse): ... here.
419 * tests/regression.at (parse.error=verbose overflow): No longer
420 an expected failure.
421
422 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
423
424 yysyntax_error: test memory management more.
425 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
426 * tests/regression.at (parse.error=verbose and
427 YYSTACK_USE_ALLOCA): New test group.
428 (parse.error=verbose overflow): New test group that reveals an
429 obscure bug. Expected fail for now.
430
431 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
432
433 benchmarks: use %debug consistently among grammars.
434 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
435 %debug by default. It can affect the timings even if yydebug=0.
436 (generate_grammar_calc): For consistency with other grammars,
437 use YYDEBUG environment variable to set yydebug.
438
439 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
440
441 Remove dead code.
442 * src/symtab.c (symbol_pack): Here because every symbol's number
443 is always defined by this time.
444
445 2009-10-03 Alex Rozenman <rozenman@gmail.com>
446
447 Add additional space after periods in NEWS.
448 * NEWS (2.5): here.
449
450 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
451
452 Use the correct conversion specifier for size_t.
453 Reported by Jim Meyering.
454 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
455 because Sbitset__Index is size_t.
456 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
457
458 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
459
460 tests: don't abuse AT_BISON_CHECK.
461 * tests/regression.at (parse-gram.y: LALR = IELR): Move
462 additional shell commands outside of AT_BISON_CHECK.
463
464 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
465
466 tests: check that parse-gram.y's IELR and LALR are identical.
467 * tests/atlocal.in (abs_top_srcdir): New shell variable.
468 * tests/regression.at (parse-gram.y: LALR = IELR): New test
469 group.
470
471 2009-09-19 Alex Rozenman <rozenman@gmail.com>
472
473 Keep sub-messages aligned. Fix strings for translation.
474 * src/location.h (location_print): Add return value.
475 * src/location.c (location_print): Return number of printed
476 characters.
477 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
478 new functions.
479 * src/complain.cpp (indent_ptr): New static variable.
480 (error_message, complain_at_indent, warn_at_indent): Implement
481 the alignment mechanism.
482 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
483 for translations. Use new alignment mechanism.
484 * tests/named-ref.at: Adjust test-cases.
485 * NEWS (2.5): Add an announcement about named references.
486
487 2009-09-17 Akim Demaille <demaille@gostai.com>
488
489 doc: fixes.
490 * doc/bison.texinfo: here.
491 Reported by Alex Rozenman.
492
493 2009-09-16 Akim Demaille <demaille@gostai.com>
494
495 doc: lalr1.cc and variants.
496 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
497 "variant" %define variables.
498 (C++ Semantic Values): Split into...
499 (C++ Unions, C++ Variants): these.
500 The latter is new.
501 (C++ Parser Interface): Fix type names.
502 Document parser::syntax_error.
503 Document the fact that locations are not mandatory.
504 (C++ Scanner Interface): Split into...
505 (Split Symbols, Complete Symbols): these.
506 The later is new.
507 (Calc++ Parsing Driver): Use variants.
508 Add more comments.
509 Adjust style.
510 (Calc++ Parser): Declare all the tokens, no
511 longer accept raw characters.
512 Remove %union.
513 Adjust types and printers.
514 Remove destructors.
515 (Calc++ Scanner): Use make_<SYMBOL> functions.
516 Use strerror in error message.
517
518 2009-09-16 Akim Demaille <demaille@gostai.com>
519
520 doc: spell checking.
521 * doc/bison.texinfo: here.
522
523 2009-09-16 Akim Demaille <demaille@gostai.com>
524
525 doc: comment changes.
526 * doc/bison.texinfo: Comment changes.
527
528 2009-09-16 Akim Demaille <demaille@gostai.com>
529
530 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
531 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
532 constructor to take a token_type instead of the (internal) symbol
533 number.
534 Call yytranslate_.
535 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
536 don't call yytranslate_ here.
537
538 2009-09-16 Akim Demaille <demaille@gostai.com>
539
540 TODO: statistics.
541 * TODO (Figures): New.
542
543 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
544
545 tests: clean up push.at test group titles.
546 * tests/push.at: Remove "Push Parsing: " from test group titles
547 because these are already under the banner "Push Parsing Tests".
548
549 2009-09-12 Alex Rozenman <rozenman@gmail.com>
550
551 Provide an additional sub-message for clarity.
552 Add "symbol not found in production" error message when
553 an "invalid reference" is detected in named references
554 resolution.
555 * src/scan-code.l: Update "invalid reference" case.
556 * tests/named-ref.at: Adjust test-cases.
557
558 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
559
560 Clean up yacc.c a little.
561 * data/yacc.c: Clean up M4 for readability, and make output
562 whitespace more consistent. For the main parse function
563 comment, instead of saying "yyparse or yypush_parse", say either
564 "yyparse" or "yypush_parse" depending on which it actually is.
565
566 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
567
568 Fix --enable-gcc-warnings.
569 * src/parse-gram.y (%printer <param>): Handle param_none.
570
571 2009-09-09 Akim Demaille <demaille@gostai.com>
572
573 lalr1.cc: syntax_error as exceptions.
574 It is common to use sort of factories in the user actions. These
575 factories may check some "syntactic" constraints that are not
576 enforced by the grammar itself. This is possible using YYERROR
577 within the action itself. Provide the user with a means to throw
578 a syntax_error exception.
579
580 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
581 Declare and define yy::parser::syntax_error.
582 * data/lalr1.cc: Include stdexcept.
583 (yy::parser::parse): Wrap the user action within a try/catch.
584 * data/glr.cc: Include stdexcept.
585
586 2009-09-09 Akim Demaille <demaille@gostai.com>
587
588 lalr1.cc: add missing "inline".
589 * data/c++.m4 (b4_public_types_define): Add missing inline to
590 implementations provided in headers.
591
592 2009-09-09 Akim Demaille <demaille@gostai.com>
593
594 %param: documentation.
595 * NEWS (2.6): Document %param, %lex-param, and %parse-param
596 changes.
597 * doc/bison.texinfo: Document that %lex-param and %parse-param
598 are n-ary.
599 Changes some examples to demonstrate it.
600 (Calc++ Parser): Use %param.
601
602 2009-09-09 Akim Demaille <demaille@gostai.com>
603
604 Regen.
605
606 2009-09-09 Akim Demaille <demaille@gostai.com>
607
608 style changes.
609 * src/parse-gram.y (add_param): Scope changes.
610
611 2009-09-09 Akim Demaille <demaille@gostai.com>
612
613 %parse: support several arguments.
614 * src/parse-gram.y (current_param): New.
615 (param_type): Add param_none.
616 (params): New nonterminal.
617 Use it.
618
619 2009-09-09 Akim Demaille <demaille@gostai.com>
620
621 Regen.
622
623 2009-09-09 Akim Demaille <demaille@gostai.com>
624
625 %param.
626 Provide a means to factor lex-param and parse-param common
627 declarations.
628
629 * src/parse-gram.y (param_type): New.
630 Define a %printer for it.
631 (add_param): Use it.
632 (%parse-param, %lex-param): Merge into...
633 (%parse): this new token.
634 Adjust the grammar to use it.
635 * src/scan-gram.l (RETURN_VALUE): New.
636 (RETURN_PERCENT_FLAG): Use it.
637 (RETURN_PERCENT_PARAM): New.
638 Use it to support %parse-param, %lex-param and %param.
639
640 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
641
642 Use aver not assert.
643 * src/output.c: Don't include assert.h.
644 (output_skeleton): Use aver not assert.
645 * src/system.h (aver): In documentation of why, add links to
646 Paul Eggert's explanations in the mailing lists.
647
648 2009-09-05 Alex Rozenman <rozenman@gmail.com>
649
650 Use "Unresolved reference" error message when no symbols were found
651 in a symbolic reference resolution. Remove .expr and -expr from
652 the shown reference when the reference is unresolved.
653 * src/scan-code.l: Change the error message, adjust location columns,
654 rename variable "exact_mode" to "explicit_bracketing".
655 * tests/named-ref.at: Adjust existing tests and add a new one.
656
657 2009-09-04 Akim Demaille <demaille@gostai.com>
658
659 Adjust synclines in src/parse-gram.[ch].
660 * tests/bison.in: Do some magic (including working around issues
661 with ylwrap) when this wrapper is used to compile
662 src/parse-gram.y.
663
664 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
665
666 Complain about unused %define variables and %code qualifiers.
667 * NEWS (2.5): Document.
668 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
669 * doc/bison.texinfo (Decl Summary): Document complaint, and
670 improve %define documentation a little otherwise.
671 * tests/input.at (Reject unused %code qualifiers): Update.
672 (%define errors): Update.
673 (%define, --define, --force-define): Update.
674 (%define backward compatibility): Update.
675 (Unused %define api.pure): Update.
676 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
677
678 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
679
680 Don't suppress warnings about unused parse.error.
681 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
682 %define variable parse.error unless b4_error_verbose_flag is
683 actually expanded in a skeleton.
684
685 2009-09-03 Akim Demaille <demaille@gostai.com>
686
687 * NEWS (2.4.2): Add "Internationalization" item.
688
689 2009-09-03 Akim Demaille <demaille@gostai.com>
690
691 bootstrap: fix/improve find_tool.
692 * bootstrap (find_tool): Improve error messages.
693 Fix typo about find_tool_names.
694
695 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
696
697 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
698 See
699 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
700 * src/scan-code.h (code_props_rule_action_init): Rename
701 named_ref arg to name so it doesn't shadow named_ref type. This
702 makes it consistent with the function definition in scan-code.l
703 anyway.
704
705 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
706
707 %define: accept unquoted values.
708 * NEWS (2.5): Group all %define changes together, and document
709 this one. Remove quotes in IELR and canonical LR entry.
710 * doc/bison.texinfo: Remove quotes in most examples throughout.
711 (Decl Summary): Update %define documentation.
712 (Table of Symbols): Likewise.
713 * src/ielr.c (LrType): Update documentation.
714 * src/parse-gram.y (content.opt): Add production for ID.
715 * tests/actions.at: Remove quotes in most tests.
716 * tests/calc.at: Likewise.
717 * tests/existing.at: Likewise.
718 * tests/input.at: Likewise.
719 * tests/local.at: Likewise.
720 * tests/push.at: Likewise.
721 * tests/reduce.at: Likewise.
722 * tests/torture.at: Likewise.
723
724 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
725
726 %define lr.type: make values lowercase IDs.
727 That is, "LALR" => "lalr", "IELR" => "ielr", and
728 "canonical LR" => "canonical-lr".
729 * NEWS (2.5): Update documentation.
730 * doc/bison.texinfo (Decl Summary): Likewise.
731 * src/ielr.c (ielr): Use new values.
732 * src/ielr.h (ielr): Update documentation.
733 * src/reader.c (prepare_percent_define_front_end_variables): Use
734 and validate new values.
735 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
736 grammars.
737 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
738
739 2009-08-27 Eric Blake <ebb9@byu.net>
740
741 scan-gram: avoid portability trap with ctype usage.
742 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
743 Avoid compiler warning.
744
745 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
746
747 tests: use perl for printing special sequences to files.
748 And skip tests if perl is not available. This is better than
749 playing tricks with shell portability. Suggested by Akim
750 Demaille.
751 * tests/input.at (Bad character literals): Use it here for
752 omitting final newlines.
753 (Bad escapes in literals): Use it here for special characters.
754
755 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
756
757 tests: show a use of %define lr.default-reductions "consistent"
758 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
759 prevents the omission of expected tokens for %error-verbose.
760
761 2009-08-26 Akim Demaille <demaille@gostai.com>
762
763 tests: portability fix.
764 * tests/input.at (Bad escapes in literals): Don't expect "echo
765 '\0'" to output \ then 0.
766
767 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
768
769 Actually handle the yytable zero value correctly this time.
770 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
771 zero values in the YYTABLE comments.
772 * data/glr.c (yytable_value_is_error): Don't check for zero
773 value.
774 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
775 * data/yacc.c (yytable_value_is_error): Likewise.
776 * data/lalr1.java (yy_table_value_is_error_): Likewise.
777 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
778 * src/tables.h: In header comments, explain why it's useless to
779 check for a zero value in yytable.
780
781 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
782
783 More fixes related to last two patches.
784 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
785 comments: zero indicates syntax error not default action.
786 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
787 defined.
788 * data/glr.c (yyis_pact_ninf): Rename to...
789 (yypact_value_is_default): ... this.
790 (yyisDefaultedState): Update for rename.
791 (yyis_table_ninf): Rename to...
792 (yytable_value_is_error): ... this, and check for value zero
793 besides just YYTABLE_NINF.
794 (yygetLRActions): Check for default value from yypact. It
795 appears that this check is always performed before this function
796 is invoked, and so adding the check here is probably redundant.
797 However, the code may evolve after this subtlety is forgotten.
798 Also, update for rename to yytable_value_is_error. Because that
799 macro now checks for zero, a different but equivalent branch of
800 the if-then-else here is evaluated.
801 (yyreportSyntaxError): Update for rename to
802 yytable_value_is_error. The zero condition was mishandled
803 before.
804 (yyrecoverSyntaxError): Update for renames. No behavioral
805 changes.
806 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
807 New function.
808 (yy_table_value_is_error_): New function.
809 (parse): Use new functions where possible. No behavioral
810 changes.
811 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
812 The zero condition was mishandled before.
813 * data/yacc.c (yyis_pact_ninf): Rename to...
814 (yypact_value_is_default): ... this.
815 (yyis_table_ninf): Rename to...
816 (yytable_value_is_error): ... this, and check for value zero
817 besides just YYTABLE_NINF.
818 (yysyntax_error): Update for rename to yytable_value_is_error.
819 The zero condition was mishandled before.
820 (yyparse): Update for renames. No behavioral changes.
821 * src/tables.h: Improve comments about yypact, yytable, etc.
822 more. Most importantly, say yytable value of zero means syntax
823 error not default action.
824
825 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
826
827 Fix %error-verbose for conflicts resolved by %nonassoc.
828 * NEWS (2.5): Document.
829 * data/glr.c (yyreportSyntaxError): Fix this by checking
830 yyis_table_ninf.
831 * data/yacc.c (yysyntax_error): Likewise.
832 * data/lalr1.cc (yysyntax_error_): Fix this by checking
833 yytable_ninf_.
834 * data/lalr1.java (yysyntax_error): Likewise.
835 * tests/conflicts.at (%nonassoc and eof): Update expected output
836 and remove FIXME.
837
838 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
839
840 Some code and documentation improvements.
841 * data/c.m4 (b4_table_value_equals): New macro to capture
842 some repeated code.
843 * data/glr.c (yyis_pact_ninf): Use it here.
844 (yyis_table_ninf): Likewise.
845 (yyreportSyntaxError): Improve internal comments.
846 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
847 Use it everywhere possible.
848 (yyis_table_ninf): Likewise.
849 (yysyntax_error): Improve internal comments.
850 * data/lalr1.cc (yysyntax_error_): Likewise.
851 * data/lalr1.java (yysyntax_error): Likewise.
852 * src/tables.h: Improve comments about yypact, yytable, etc.
853
854 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
855
856 Use locale when quoting.
857 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
858 quote rather than implementing quoting here.
859
860 2009-08-20 Eric Blake <ebb9@byu.net>
861
862 Make previous patch more robust.
863 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
864 argmatch.h.
865 (output_skeleton): Use it.
866 Suggested by Akim Demaille.
867
868 Import latest m4/m4.m4.
869 * submodules/autoconf: Update to autoconf 2.64.
870 * configure.ac (M4_GNU_OPTION): New define.
871 * src/output.c (output_skeleton): Use it to resolve FIXME.
872 * NEWS: Mention this.
873
874 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
875
876 Fix complaints about escape sequences.
877 Discussed starting at
878 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
879 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
880 For a \0 and similar escape sequences meaning the null
881 character, report an invalid escape sequence instead of an
882 invalid null character because the latter does not actually
883 appear in the user's input.
884 In all escape sequence complaints, don't escape the initial
885 backslash, and don't quote when the sequence appears at the end
886 of the complaint line unless there's whitespace that quotearg
887 won't escape.
888 Consistently say "invalid" not "unrecognized".
889 Consistently prefer "empty character literal" over "extra
890 characters in character literal" warning for invalid escape
891 sequences; that is, consistently discard those sequences.
892 * tests/input.at (Bad escapes in literals): New.
893
894 2009-08-19 Akim Demaille <demaille@gostai.com>
895
896 doc: fixes.
897 * doc/bison.texinfo: Fix minor Texinfo errors.
898
899 2009-08-19 Akim Demaille <demaille@gostai.com>
900
901 tests: distcc compliance.
902 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
903 error messages from the output.
904
905 2009-08-19 Akim Demaille <demaille@gostai.com>
906
907 variables: simplify the upgrade of namespace into api.namespace.
908
909 This patch simplifies "variables: rename namespace as
910 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
911 Suggested by Joel E. Denny in
912 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
913
914 * src/muscle-tab.c (muscle_percent_variable_update): New.
915 (muscle_percent_define_insert): Use it in replacement of the
916 previous tr invocation.
917 Remove variable_tr, no longer needed.
918 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
919 Remove.
920 * data/c++.m4: No longer handle namespace -> api.namespace.
921 * tests/input.at (%define backward compatibility): Check that
922 namespace is treated as api.namespace.
923
924 2009-08-19 Akim Demaille <demaille@gostai.com>
925
926 doc: %initial-action to initialize yylloc.
927 Reported by Bill Allombert.
928 * doc/bison.texinfo: Set fill-column to 76.
929 (Location Type): Document the use of %initial-action to initialize
930 yylloc.
931
932 2009-08-19 Akim Demaille <demaille@gostai.com>
933
934 lalr1.cc: use state_type.
935 * data/lalr1.cc (yysyntax_error_): Use state_type.
936 Move argument names into yy*.
937
938 2009-08-19 Akim Demaille <demaille@gostai.com>
939
940 lalr1.cc: get rid of yyparse's yystate.
941 yystate and yystack_[0].state are equal, keep only the latter.
942 The former was also used as a temporary variable to compute the
943 post-reduction state. Move this computation into an auxiliary
944 function.
945
946 * data/glr.c (yyLRgotoState): Fuse variable definition and first
947 assignment.
948 * data/lalr1.cc (yy_lr_goto_state_): New.
949 (yyparse): Use it.
950 Replace remaining uses of yystate by yystate_[0].state.
951 Remove the former.
952
953 2009-08-19 Akim Demaille <demaille@gostai.com>
954
955 lalr1.cc: destroy $$ when YYERROR is called.
956 * data/lalr1.cc (yyreduce): Compute the resulting state before
957 running the user action so that yylhs is a valid symbol.
958 (yyerrorlab): Since yylhs is complete (it knows its type), we can
959 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
960 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
961
962 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
963
964 maint: update for gnulib's recent update-copyright changes
965 * gnulib: Update.
966 * .x-update-copyright (COPYING): Add as it's no longer implied
967 when .x-update-copyright is present.
968 * cfg.mk (update-copyright-local): Remove, now ignored.
969 (update-copyright): Declare update-b4-copyright as a dependency.
970
971 2009-08-17 Akim Demaille <demaille@gostai.com>
972
973 build: require gettext 0.17.
974
975 Suggested by Bruno Haible.
976 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
977 * configure.ac: require gettext 0.17 to ensure compatibility with
978 gnulib.
979
980 2009-08-17 Akim Demaille <demaille@gostai.com>
981
982 build: lower gettext requirements.
983
984 Bison was uselessly requiring the formatstring macros from
985 gettext, which resulted in mo files not being installed on systems
986 that perfectly supported Bison mo files. Lower the requirement.
987 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
988
989 * configure.ac: Require need-ngettext instead of
990 need-formatstring-macros.
991 Reported by Martin Jabocs.
992 Suggested by Bruno Haible.
993 * INSTALL: Restructure.
994 (Internationalization): New.
995
996 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
997
998 maint: fix use of copyright year intervals.
999 * gnulib: Update.
1000 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1001 as now recommended in gnulib/NEWS.
1002 * build-aux/update-b4-copyright: Fix.
1003 * cfg.mk (update-copyright-env): Configure update-copyright.
1004
1005 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
1006
1007 Make it easier to write deterministic tests.
1008 Continues Akim's work from his 2009-06-10 commits.
1009 * src/reader.c (check_and_convert_grammar): Don't add any
1010 symbols after the first symbols_do invocation.
1011 * src/symtab.c (symbols_sorted): New static global.
1012 (user_token_number_redeclaration): Update comments.
1013 (symbol_from_uniqstr): If a new symbol is being created, assert
1014 that symbols_sorted hasn't been allocated yet.
1015 (symbols_free): Free symbols_sorted.
1016 (symbols_cmp, symbols_cmp_qsort): New functions.
1017 (symbols_do): Sort symbol_table into symbols_sorted on first
1018 invocation.
1019 * tests/input.at (Numbered tokens): Recombine tests now that the
1020 output should be deterministic across multiple numbers.
1021
1022 2009-08-12 Akim Demaille <demaille@gostai.com>
1023
1024 tests: GCC 4.5 compliance.
1025 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
1026 messages about #error.
1027
1028 2009-08-12 Akim Demaille <demaille@gostai.com>
1029
1030 build: fix the generation of the documentation.
1031 Some of our targets use "bison --help", but they can't depend on
1032 "bison" itself (to avoid additional requirements on the user), so
1033 they used to call "make src/bison" in the commands. Then
1034 concurrent builds may fail: one make might be aiming one of its
1035 jobs at compiling src/bison, and another job at generating the man
1036 page. If the latter is faster than the former, then we have two
1037 makes that concurrently try to compile src/bison.
1038
1039 This might also be a more convincing explanation for the failure
1040 described in the patch "build: fix paths".
1041
1042 * Makefile.am (SUFFIXES): Initialize.
1043 * build-aux/move-if-change: New, symlink to gnulib's.
1044 * build-aux/local.mk: Ship it.
1045 * doc/common.x: Remove, merged into...
1046 * doc/bison.x: here.
1047 * doc/local.mk (doc/bison.help): New.
1048 ($(CROSS_OPTIONS_TEXI)): Depend on it.
1049 Use src/bison.
1050 (.x.1): Replace with...
1051 (doc/bison.1): this explicit, simpler, target.
1052 (common_dep): Remove, inlined where appropriate.
1053 (SUFFIXES, PREPATH): Remove, unused.
1054
1055 2009-08-12 Akim Demaille <demaille@gostai.com>
1056
1057 gnulib: improve prefixing.
1058 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
1059 change the value of...
1060 (gl_LIBOBJS): this.
1061 Adjust more variables.
1062 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
1063 gl_LIBOBJS.
1064 (prefix): Also transform rules whose targets have slashes.
1065 Use $prefix liberally.
1066 Map @MKDIR_P@ to $(MKDIR_P).
1067 Prefix directories that are mkdir'd.
1068
1069 2009-08-12 Akim Demaille <demaille@gostai.com>
1070
1071 build: fix paths.
1072 When using $(top_builddir) inconsistently, Make (including GNU
1073 Make) is sometimes confused. As a result it may want to build
1074 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
1075 file, different names) concurrently, which, amusingly enough,
1076 might end with:
1077
1078 ranlib lib/libbison.a
1079 ranlib lib/libbison.a
1080 make[2]: *** [lib/libbison.a] Segmentation fault
1081
1082 on OS X.
1083
1084 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
1085 needed.
1086
1087 2009-08-12 Akim Demaille <demaille@gostai.com>
1088
1089 distcheck: fix.
1090
1091 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
1092
1093 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1094
1095 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1096
1097 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
1098
1099 Miscellaneous code readability improvements.
1100
1101 * src/reader.c (reader): Move %define front-end variable
1102 defaults and checking into...
1103 (prepare_percent_define_front_end_variables): ... this new
1104 function.
1105
1106 * src/scan-gram.l (INITIAL): For consistency with string
1107 literals, don't store open quote on character literal. It's
1108 discarded before returning anyway.
1109 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1110 Make length test more readable, and make the character stored
1111 for an empty literal more obvious while consistent with the
1112 previous behavior.
1113
1114 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1115 USER_NUMBER_HAS_STRING_ALIAS throughout.
1116 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1117 that is repeated in symtab.h. Improve argument names to make it
1118 clear which side of the symbol-string alias pair is which.
1119 (symbol_check_alias_consistency): Improve local variable names
1120 for the same purpose.
1121 * src/symtab.h (struct symbol): Make comments about aliases
1122 clearer.
1123 (symbol_make_alias): Improve comments and argument name.
1124 * src/output.c (token_definitions_output): Update for rename to
1125 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1126
1127 2009-08-08 Alex Rozenman <rozenman@gmail.com>
1128
1129 Convert "misleading reference" messages to warnings.
1130 * src/scan-code.l: New function 'show_sub_messages', more
1131 factoring.
1132 * tests/named-ref.at: Adjust tests.
1133
1134 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1135
1136 maint: run "make update-copyright"
1137
1138 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
1139
1140 maint: make update-b4-copyright easier to use
1141 * build-aux/update-b4-copyright: In warnings, report line
1142 numbers rather than character positions.
1143 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1144 that update-copyright runs it.
1145 * gnulib: Update.
1146
1147 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
1148
1149 maint: clean up update-b4-copyright code
1150 * build-aux/update-b4-copyright: Do not accept 2-digit
1151 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1152 Don't accept a `[' in a b4_copyright argument.
1153 Format code more consistently.
1154 Don't assume b4*copyright never occurs.
1155
1156 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1157
1158 maint: automate b4_copyright updates.
1159 * Makefile.am (update-b4-copyright): New target rule.
1160 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1161 * build-aux/update-b4-copyright: New.
1162 * data/yacc.c: Remove stray characters around b4_copyright
1163 invocations.
1164
1165 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1166
1167 maint: automate annual package-wide copyright-year update.
1168 * .x-update-copyright: New.
1169 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1170 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1171 update-copyright. Remove gnumakefile, which is implied by
1172 maintainer-makefile.
1173 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1174 * gnulib: Update.
1175 * maint.mk: Remove, now copied from gnulib.
1176 * examples/extexi: Add missing "(C)" in copyright statement so
1177 update-copyright can recognize it.
1178 * src/LR0.h: Likewise.
1179 * src/print.h: Likewise.
1180 * src/print_graph.h: Likewise.
1181 * src/gram.c: Add missing comma in copyright statement.
1182 * src/gram.h: Likewise.
1183
1184 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
1185
1186 Fix "make distcheck".
1187 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1188 of just calc.stamp.
1189
1190 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
1191
1192 Pacify "gcc -Wunused" for the input function from Flex.
1193 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1194 and later.
1195 * src/scan-code.l: Add "%option noinput", which I cannot find in
1196 the Flex manual, but which Flex has supported since at least as
1197 far back as 2.5.4. However, if any of our developers still use
1198 Flex 2.5.4, they'll need to stop configuring with
1199 --enable-gcc-warnings because "%option noinput" didn't work
1200 correctly until Flex 2.5.6.
1201 * src/scan-gram.l: Likewise.
1202 * src/scan-skel.l: Likewise.
1203
1204 2009-07-31 Alex Rozenman <rozenman@gmail.com>
1205
1206 Fix --enable-gcc-warnings problems.
1207 * src/reader.c: Adjust variable names.
1208 * src/scan-code.l: Fix prototypes and adjust names.
1209 * src/named-ref.c: Remove redundant "if".
1210
1211 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1212
1213 Fix a --enable-gcc-warnings problem.
1214 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1215 variable.
1216
1217 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1218
1219 Warn about character literals not of length one.
1220 * NEWS (2.5): Document.
1221 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1222 the length.
1223 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1224 * tests/input.at (Bad character literals): New test group.
1225
1226 2009-07-24 Alex Rozenman <rozenman@gmail.com>
1227
1228 Fix some memory leaks.
1229 * src/named-ref.c: Add a pointer check (named_ref_free).
1230 * src/scan-code.l: New function (variant_table_free). Called in
1231 code_scanner_free.
1232 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1233
1234 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1235
1236 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1237
1238 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1239
1240 Some M4 cleanup in the testsuite.
1241 Suggested by Eric Blake at
1242 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1243 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1244 complicate the code by distinguishing between a missing value
1245 and an empty string value for an optional argument. This fix is
1246 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1247 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1248 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1249 arguments are not needed because of the following changes.
1250 Fix stale comments.
1251 Bison developers should use GNU M4 and should not use
1252 POSIXLY_CORRECT when building the test suite, so do not
1253 complicate the code by avoiding $10 and above.
1254 Do not quote an empty string value for an optional argument, and
1255 do not distinguish between a missing value and an empty string
1256 value.
1257
1258 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1259
1260 Revert unnecessary column realignment in --help output.
1261 Reported by Akim Demaille at
1262 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1263 * src/getargs.c (usage): Here.
1264
1265 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1266
1267 Alphabetical order in src/local.mk.
1268 * src/local.mk: Adjust.
1269
1270 2009-07-04 Alex Rozenman <rozenman@gmail.com>
1271
1272 Style changes and factoring.
1273 * src/named-ref.h: Add comments.
1274 * src/parse-gram.y: Readability and style changes.
1275 * src/reader.c: Factoring: assign_named_ref function.
1276 * src/scan-code.l: Factoring and style changes. Rename
1277 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1278 Use "unsigned" type for variant index. Improve readablity.
1279 * src/scan-gram.l: Change error messages and add comments.
1280 * src/symlist.h: symbol_list_null: New function decl.
1281 * src/symlist.c: symbol_list_null: Implement here.
1282 * tests/named-refs.at: Adjust for new error messages.
1283
1284 2009-06-29 Eric Blake <ebb9@byu.net>
1285
1286 scan-code: avoid compiler warnings
1287 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1288
1289 2009-06-29 Akim Demaille <demaille@gostai.com>
1290
1291 build: avoid concurrent extraction of calc++.
1292 * examples/calc++/Makefile.am (calc.stamp): New.
1293 Depend on it to create the sources of calc++ so that concurrent
1294 builds don't launch several "extexi" in parallel.
1295 Not only this is inefficient, this also builds incorrect sources
1296 with several extractions mixed together.
1297
1298 2009-06-29 Akim Demaille <demaille@gostai.com>
1299
1300 parse.error: fix.
1301 * data/bison.m4: Move code related to specific variables after the
1302 definition of the variable-maintaining macros so that we don't
1303 "invoke" b4_percent_define_check_values before it is defined.
1304
1305 2009-06-29 Akim Demaille <demaille@gostai.com>
1306
1307 variables: parse.error
1308
1309 Implement, document, and test the replacement of %error-verbose
1310 by %define parse.error "verbose".
1311 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1312 values of the parse.error variable.
1313 Make "simple" its default value.
1314 Check the valid values.
1315 * src/parse-gram.y: Use %define parse.error.
1316 (PERCENT_ERROR_VERBOSE): New token.
1317 Support it.
1318 * src/scan-gram.l: Support %error-verbose.
1319
1320 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1321 %define error-verbose by that of %define parse.error.
1322 * NEWS: Document it.
1323
1324 * tests/actions.at, tests/calc.at: Use parse.error instead of
1325 %error-verbose.
1326
1327 2009-06-27 Alex Rozenman <rozenman@gmail.com>
1328
1329 Implement support for named symbol references.
1330 * src/parse-gram.y: Add new syntax (named_ref.opt).
1331 * src/reader.c: Store named refs in symbol lists.
1332 * src/reader.h: New argument for symbol_append and
1333 action_append functions.
1334 * src/scan-code.h: Add new field (named_ref) into
1335 code_props data structure. Keeps named ref of midrule
1336 actions.
1337 * src/scan-code.l: Support for named refs in semantic
1338 action code. New function 'parse_named_ref'.
1339 * src/scan-gram.l: Support bracketed id.
1340 * src/symlist.c: Store named refs in symbol lists.
1341 * src/symlist.h: New field in symbol list: named_ref.
1342 * src/named-ref.h: New file, a struct for named_ref.
1343 * src/named-ref.cp: New file, named_ref_new function.
1344 * src/local.mk: Add two new files.
1345 * tests/testsuite.at: Include new test group:
1346 * tests/named-refs.at: this new file.
1347
1348 2009-06-25 Akim Demaille <demaille@gostai.com>
1349
1350 hash: check insertion for memory exhaustion.
1351 * src/uniqstr.c (uniqstr_new): New.
1352
1353 2009-06-24 Akim Demaille <demaille@gostai.com>
1354
1355 variables: rename namespace as api.namespace.
1356 Discussed in
1357 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1358
1359 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1360 New.
1361 (b4_percent_define_use): New.
1362 Use it where applicable.
1363 * data/c++.m4: Replace uses of the variable "namespace" by
1364 "api.namespace".
1365 Default the latter to the former.
1366 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1367 obsolete.
1368 Document api.namespace.
1369 Use @samp to document %define uses, keep @code for identifiers.
1370 * NEWS: Likewise.
1371 * tests/c++.at, tests/input.at: Test api.namespace instead of
1372 namespace. (The tests passed with namespace.)
1373
1374 2009-06-11 Akim Demaille <demaille@gostai.com>
1375
1376 style changes.
1377 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1378 * src/print-xml.c: Style changes.
1379 * tests/conflicts.at: Comment changes.
1380
1381 2009-06-11 Akim Demaille <demaille@gostai.com>
1382
1383 xml: beware of user strings used to give a %prec to rules.
1384 * tests/conflicts.at (%prec with user strings): New.
1385 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1386 XML output.
1387
1388 2009-06-11 Akim Demaille <demaille@gostai.com>
1389
1390 hash: check insertion for memory exhaustion.
1391 * src/muscle-tab.c (muscle_insert, muscle_grow)
1392 * src/state.c (state_hash_insert): Check the return value of
1393 hash_insert.
1394
1395 2009-06-11 Akim Demaille <demaille@gostai.com>
1396
1397 tests: honor TESTSUITEFLAGS in every check target.
1398 * tests/local.mk (RUN_TESTSUITE): New.
1399 (check-local, installcheck-local, maintainer-check-g++)
1400 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1401
1402 2009-06-10 Akim Demaille <demaille@gostai.com>
1403
1404 deterministic test suite.
1405 Some consistency checks on symbols are performed after all the
1406 symbols were read, by an iteration over the symbol table. This
1407 traversal is nondeterministic, which can be a problem for test
1408 cases.
1409 Avoid this.
1410 Addresses another form of nondeterminism reported by Joel E. Denny.
1411 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1412
1413 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1414 test in two.
1415 Use different file names for the three tests to make the
1416 maintenance easier.
1417
1418 2009-06-10 Akim Demaille <demaille@gostai.com>
1419
1420 gnulib: update.
1421 * gnulib: Update to latest.
1422 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1423 * m4/.gitignore: Regen.
1424 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1425 Call xalloc_die on hash_insert failures.
1426 Requested by the new __warn_unused_result__ attribute of
1427 hash_insert.
1428
1429 2009-06-10 Akim Demaille <demaille@gostai.com>
1430
1431 deterministic user-token-number redeclaration errors.
1432 Address nondeterminism reported by Joel E. Denny.
1433 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1434
1435 * src/uniqstr.h: Comment changes.
1436 * src/location.h (boundary_cmp, location_cmp): New.
1437 * src/symtab.c (user_token_number_redeclaration): New.
1438 (symbol_translation): Use it.
1439 * tests/input.at (Numbered tokens): Adjust the expected output.
1440
1441 2009-05-25 Akim Demaille <demaille@gostai.com>
1442
1443 build: avoid ignored errors.
1444 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1445 errors, they pollute the output.
1446
1447 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1448
1449 Convert multiple variable definition warnings to complaints.
1450 * NEWS (2.5): Add a new entry for that change.
1451 * doc/bison.texinfo (Decl Summary): Update %define entry.
1452 (Bison Options): Update -D/--define/-F/--force-define entry.
1453 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1454 * src/muscle-tab.h (muscle_percent_define_insert): Update
1455 comments.
1456 * tests/input.at (`%define errors'): Update.
1457 (`%define, --define, --force-define'): Update.
1458
1459 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1460
1461 -F/--force-define and relative %define/-D/--define priorities.
1462 * NEWS (2.5): Add documentation to -D/--define entry.
1463 * build-aux/cross-options.pl: Hard-code association of
1464 --force-define with %define.
1465 * doc/bison.texinfo (Decl Summary): In %define entry,
1466 cross-reference command-line options.
1467 (Bison Options): Add documentation to -D/--define entry.
1468 (Option Cross Key): Widen column for --force-define row.
1469 * src/getargs.c (usage): Document -F/--force-define. Realign
1470 options in output.
1471 (short_options, long_options, getargs): Parse -F/--force-define,
1472 and update muscle_percent_define_insert invocations.
1473 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1474 (muscle_percent_define_insert): Add argument with that type.
1475 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1476 -F/--force-define behavior and priorities.
1477 (muscle_percent_define_ensure): Update
1478 muscle_percent_define_insert invocation.
1479 * src/parse-gram.y (prologue_declaration): Update
1480 muscle_percent_define_insert invocations.
1481 * tests/input.at (`%define, --define'): Rename to...
1482 (`%define, --define, --force-define'): ... this and extend.
1483
1484 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1485
1486 Update some comments to make sense for -D.
1487 * data/bison.m4 (b4_check_user_names): In header comments, say
1488 "user occurrence" instead of "grammar occurrence".
1489 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1490 (muscle_percent_code_grow): Likewise just for consistency.
1491
1492 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1493
1494 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1495
1496 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1497
1498 Handle a trailing `:' in a user-supplied C++ namespace better.
1499 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1500 among the closing braces here. This fix might make the
1501 generated code easier to debug, but otherwise it should be
1502 insignificant because a trailing `:' is a C++ error already.
1503
1504 2009-05-19 Akim Demaille <demaille@gostai.com>
1505
1506 remove useless variable.
1507 * src/getargs.c (skeleton_arg): Remove now useless variable.
1508 Should help the compiler see that this printf-like call is sane.
1509
1510 2009-05-15 Akim Demaille <demaille@gostai.com>
1511
1512 Rename token.prefix as api.tokens.prefix.
1513 Discussed here.
1514 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1515
1516 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1517 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1518 (token.prefix): Rename as...
1519 (api.tokens.prefix): this.
1520
1521 2009-05-11 Akim Demaille <demaille@gostai.com>
1522
1523 doc: use C++ headers.
1524 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1525 headers.
1526
1527 2009-05-11 Akim Demaille <demaille@gostai.com>
1528
1529 doc: token.prefix
1530 * doc/bison.simple (Decl Summary): Document token.prefix.
1531 (Calc++ Parser): Various fixes.
1532 Formatting changes.
1533 Use token.prefix.
1534 Introduce a macro TOKEN to shorten the code and make it more
1535 readable.
1536 (Calc++ Scanner): Adjust.
1537 * NEWS (Variable token.prefix): New.
1538
1539 2009-05-04 Akim Demaille <demaille@gostai.com>
1540
1541 bison: catch bad symbol names.
1542 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1543 * tests/input.at: Adjust.
1544
1545 2009-05-04 Akim Demaille <demaille@gostai.com>
1546
1547 identifiers: dashes are letters.
1548 Dashes can now start identifiers (symbols and directives).
1549
1550 * src/scan-gram.l ({letter}): Add dash.
1551 ({id}): Remove it.
1552 * tests/input.at (Symbols): Adjust.
1553 Remove stray comment.
1554 * tests/regression.at (Invalid inputs): Adjust error message.
1555 * doc/bison.texinfo (Symbols): Update.
1556
1557 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1558
1559 Declare %code to be a permanent feature.
1560 * NEWS (2.4.2): Here.
1561 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1562 experimental.
1563 (Decl Summary): Likewise.
1564
1565 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1566
1567 Convert underscores to dashes in some %define variable names.
1568 For now, just api.push-pull and lr.keep-unreachable-states.
1569 Maintain old names for backward compatibility.
1570 * NEWS (2.5): Document.
1571 * data/c.m4 (b4_identification): Update comment.
1572 * data/yacc.c: Update access.
1573 * doc/bison.texinfo: Update.
1574 * etc/bench.pl.in (bench_push_parser): Update use.
1575 * src/files.c (tr): Move to...
1576 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1577 think of a better place to expose it. My logic is that, for all
1578 uses of tr so far, command-line arguments can be involved, and
1579 getargs.h is already included.
1580 * src/main.c (main): Update access.
1581 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1582 variable names to new variable names before assigning value.
1583 * src/reader.c (reader): Update setting default.
1584 * tests/calc.at: Update uses.
1585 * tests/conflicts.at (Unreachable States After Conflict
1586 Resolution): Update use.
1587 * tests/input.at (%define enum variables): Update use.
1588 (%define backward compatibility): New test group.
1589 * tests/push.at: Update uses.
1590 * tests/reduce.at: Update uses.
1591 * tests/torture.at: Update uses.
1592
1593 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1594
1595 Set all front-end %define defaults in one place.
1596 * src/main.c (main): Move lr.keep_unreachable_states default...
1597 * src/reader.c (reader): ... to here.
1598
1599 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1600
1601 Rename lr.default_reductions to lr.default-reductions.
1602 * NEWS (2.5): Here.
1603 * doc/bison.texinfo: Here.
1604 * src/lalr.c (initialize_LA): Here.
1605 * src/print.c (print_reductions): Here.
1606 * src/reader.c (reader): Here.
1607 * src/tables.c (action_row): Here.
1608 * tests/input.at (%define enum variables): Here.
1609 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1610
1611 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1612
1613 Pacify ./configure --enable-gcc-warnings.
1614 * tests/input.at (Symbols): Prototype yyerror and yylex.
1615
1616 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1617
1618 Document how `%define "var" "value"' is not M4-friendly.
1619 * src/parse-gram.y (variable): In comments here.
1620
1621 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1622
1623 Clean up recent patches a little.
1624 Reported by Akim Demaille.
1625 * doc/bison.texinfo (Understanding): Fix typos.
1626 * src/print.c (print_reductions): Don't use negated variable.
1627
1628 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1629
1630 List accepted values for a %define enum variable with an invalid value.
1631 Suggested by Akim Demaille at
1632 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1633 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1634 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
1635 * tests/input.at (%define lr.default_reductions invalid values): Merge
1636 into...
1637 (%define enum variables): ... here, and update output.
1638
1639 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1640
1641 Rename "default rule" to "default reduction".
1642 This includes changing variable names in code, changing
1643 comments, and renaming %define lr.default_rules to %define
1644 lr.default_reductions.
1645 * NEWS (2.5): Update IELR documentation.
1646 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
1647 documentation.
1648 * data/glr.c, data/lalr1.java: Sync copyright dates.
1649 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1650 and lr.type documentation. Make some other wording
1651 improvements.
1652 (Glossary): Adjust cross-references and Default Reduction
1653 definition.
1654 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1655 Remove a confusing comment pointed out by Akim Demaille.
1656 (initialize_LA): Adjust code.
1657 * src/print-xml.c (print_reductions): Adjust code.
1658 * src/print.c (print_reductions): Adjust code.
1659 * src/reader.c (reader): Adjust code.
1660 * src/tables.c (action_row): Adjust code.
1661 (token_actions): Adjust code.
1662 * src/tables.h: Adjust YYDEFACT documentation.
1663 * tests/input.at (%define lr.default_rules invalid values):
1664 Rename test group to...
1665 (%define lr.default_reductions invalid values): ... this, and
1666 update grammar file and expected output.
1667 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1668 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1669
1670 2009-04-21 Akim Demaille <demaille@gostai.com>
1671
1672 tests: check the use of dashes and periods in symbols.
1673 * tests/input.at (Symbol): New test group.
1674
1675 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1676
1677 Document %define lr.type and lr.default_rules.
1678 * NEWS (2.5): Add an entry.
1679 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1680 besides just LALR(1) and GLR(1).
1681 * doc/bison.texinfo (Introduction): Likewise.
1682 (Language and Grammar): Bison is no longer limited to LALR(1)
1683 restrictions.
1684 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1685 when trying to distinguish from GLR. Talk about LR(1) grammars
1686 rather than LALR(1) grammars.
1687 (Decl Summary): In %define api.push_pull entry, say it applies
1688 to deterministic parsers in C rather than LALR(1) parsers in C.
1689 Add lr.default_rules entry.
1690 Add lr.type entry.
1691 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1692 restrictions.
1693 (Generalized LR Parsing): Same changes as for the previous GLR
1694 section.
1695 (Memory Management): Say deterministic rather than LALR(1).
1696 (Understanding): Correct some bison output.
1697 Index discussion of "accepting state".
1698 Say deterministic rather than LALR(1).
1699 (Bison Options): In --yacc entry, say deterministic rather than
1700 LALR(1).
1701 In --report, --graph, and --xml entries, just don't mention
1702 LALR(1).
1703 (C++ Parsers): Say deterministic rather than LALR(1).
1704 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1705 (Glossary): Add Accepting State, Consistent State, Default Rule,
1706 and IELR(1) definitions.
1707 In Generalized LR (GLR) definition, make same changes as in
1708 previous GLR sections.
1709 In LALR(1) definition, say Bison uses LALR(1) by default rather
1710 than implying Bison is limited to LALR(1).
1711 (LocalWords): Add IELR.
1712
1713 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1714
1715 Finish implementing %define lr.type.
1716 Its value can be "LALR", "IELR", or "canonical LR".
1717 * lib/timevar.def (TV_IELR_PHASE1): New var.
1718 (TV_IELR_PHASE2): New var.
1719 (TV_IELR_PHASE3): New var.
1720 (TV_IELR_PHASE4): New var.
1721 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1722 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1723 Sbitset.h, ielr.h, and ielr.c.
1724 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1725 trace_types): Add trace_ielr.
1726 * src/lalr.h, src/lalr.c (ngotos): Export it.
1727 (F): Rename to...
1728 (goto_follows): ... this, update all uses, and export it.
1729 (set_goto_map): Export it.
1730 (map_goto): Export it.
1731 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1732 handled in ielr.
1733 (initialize_LA): Export it. Move lookback allocation to...
1734 (lalr): ... here because, for canonical LR, initialize_LA must
1735 be invoked but lookback and much of the rest of LALR isn't
1736 needed.
1737 * main.c (main): Instead of lalr, invoke ielr, which invokes
1738 lalr.
1739 * src/reader.c (reader): Default lr.type to "LALR".
1740 Default lr.default_rules to "accepting" if lr.type is "canonical
1741 LR". Leave the default as "all" otherwise.
1742 Check for a valid lr.type value.
1743 * src/state.h, src/state.c (struct state_list): Add state_list
1744 member.
1745 (state_new): Initialize state_list member to NULL.
1746 (state_new_isocore): New function, exported.
1747 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1748 exercises all values of lr.type.
1749 (GNU AWK Grammar): Rename test group to...
1750 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1751 AT_TEST_EXISTING_GRAMMAR.
1752 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1753 (GNU pic Grammar): Rename test group to...
1754 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1755 AT_TEST_EXISTING_GRAMMAR.
1756 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1757 all values of lr.type.
1758 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1759 (Lane Split): Likewise.
1760 (Complex Lane Split): Likewise.
1761 (Split During Added Lookahead Propagation): Likewise.
1762
1763 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1764
1765 Add new files for IELR and canonical LR implementation.
1766 * src/AnnotationList.c: New.
1767 * src/AnnotationList.h: New.
1768 * src/InadequacyList.c: New.
1769 * src/InadequacyList.h: New.
1770 * src/Sbitset.c: New.
1771 * src/Sbitset.h: New.
1772 * src/ielr.c: New.
1773 * src/ielr.h: New.
1774
1775 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1776
1777 Implement %define lr.default_rules.
1778 Its value describes the states that are permitted to contain
1779 default rules: "all", "consistent", or "accepting".
1780 * src/reader.c (reader): Default lr.default_rules to "all".
1781 Check for a valid lr.default_rules value.
1782 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1783 is "accepting", then only mark the accepting state as
1784 consistent.
1785 (initialize_LA): Tell state_lookahead_tokens_count whether
1786 lr.default_rules is "accepting".
1787 * src/tables.c (action_row): If lr.default_rules is not "all",
1788 then disable default rules in inconsistent states.
1789 * src/print.c (print_reductions): Use this opportunity to
1790 perform some assertions about whether lr.default_rules was
1791 obeyed correctly.
1792 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1793 helps with checking the parser tables for a grammar.
1794 * tests/input.at (%define lr.default_rules invalid values): New
1795 test group.
1796 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1797 AT_TEST_TABLES_AND_PARSE.
1798 (`no %define lr.default_rules'): New test group generated by
1799 AT_TEST_LR_DEFAULT_RULES.
1800 (`%define lr.default_rules "all"'): Likewise.
1801 (`%define lr.default_rules "consistent"'): Likewise.
1802 (`%define lr.default_rules "accepting"'): Likewise.
1803
1804 2009-04-20 Akim Demaille <demaille@gostai.com>
1805
1806 Formatting change.
1807
1808 2009-04-20 Akim Demaille <demaille@gostai.com>
1809
1810 bison: factoring.
1811 * src/output.c (token_definitions_output): Use symbol_id_get
1812 instead of duplicating its logic.
1813 * TODO (YYERRCODE): Extend.
1814
1815 2009-04-20 Akim Demaille <demaille@gostai.com>
1816
1817 variables: prefer error-verbose to error_verbose.
1818 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
1819 instead of error_verbose.
1820 * src/scan-gram.l (%error-verbose): Map to the error-verbose
1821 variable.
1822 * doc/bison.texinfo: Promote %define error-verbose instead of
1823 %error-verbose.
1824 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
1825
1826 2009-04-15 Akim Demaille <demaille@gostai.com>
1827
1828 variables: accept dashes.
1829 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
1830 underscores.
1831 * src/scan-gram.l ({id}): Also accept dashes after the initial
1832 letter.
1833 ({directive}): Use {id}.
1834 * src/parse-gram.y: Comment and formatting changes.
1835 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1836 symbols.
1837 * src/complain.h, src/complain.c (yacc_at): New.
1838 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1839 symbol names.
1840 * src/output.c (token_definitions_output): Do not #define token
1841 names with dashes.
1842
1843 2009-04-20 Akim Demaille <demaille@gostai.com>
1844
1845 Consistently refer to Yacc, not YACC.
1846 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1847
1848 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1849
1850 Pacify make maintainer-check-posix.
1851 * tests/input.at (%define, --define): Move bison command-line
1852 options before grammar file name.
1853
1854 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1855
1856 Document semicolon warnings.
1857 * NEWS (2.5): Here.
1858
1859 2009-04-14 Akim Demaille <demaille@gostai.com>
1860
1861 variables: use `parse.assert' instead of `assert'.
1862 * TODO (assert): Remove.
1863 * data/bison.m4 (b4_assert_if): Replace with...
1864 (b4_parse_assert_if): this.
1865 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
1866 * doc/bison.texinfo (Decl Summary): Document parse.assert.
1867
1868 2009-04-14 Akim Demaille <demaille@gostai.com>
1869
1870 variables: use `parse.trace' instead of `debug'.
1871 * src/getargs.c (getargs): Map -t to %define trace.parse.
1872 * src/scan-gram.l (%debug): Map to %define trace.parse.
1873 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
1874 names to `_' in macro names.
1875 (b4_debug_if): Replace with...
1876 (b4_parse_trace_if): this.
1877 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1878 * data/yacc.c: Adjust.
1879 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
1880 Use @code to label the variable list.
1881 Document the variable parse.trace.
1882 (Tracing): Promote the parse.trace variable.
1883 * TODO: %printer is not documented.
1884
1885 2009-04-14 Akim Demaille <demaille@gostai.com>
1886
1887 doc: minor fixes.
1888 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1889 (Table of Symbols): Remove duplicate entry for %debug.
1890
1891 2009-04-10 Eric Blake <ebb9@byu.net>
1892
1893 submodules: update to latest
1894 * submodules/autoconf: Use latest upstream Autoconf.
1895
1896 2009-04-06 Eric Blake <ebb9@byu.net>
1897
1898 Work around autoconf 2.63b bug in testsuite.
1899 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1900 autoconf bug related to # in test.
1901
1902 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1903
1904 * NEWS (2.5): New section. Describe new -D/--define feature.
1905
1906 2009-04-06 Akim Demaille <demaille@gostai.com>
1907
1908 Regen.
1909 * src/parse-gram.h, src/parse-gram.c: Regen.
1910
1911 2009-04-06 Akim Demaille <demaille@gostai.com>
1912
1913 rename muscle_tab.* as muscle-tab.* for consistency.
1914 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
1915 * src/muscle-tab.h, src/muscle-tab.c: these.
1916 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
1917 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
1918
1919 2009-04-06 Akim Demaille <demaille@gostai.com>
1920
1921 Makefile: introduce $(BISON).
1922 * src/local.mk (BISON): New.
1923 (YACC): Use it.
1924
1925 2009-04-06 Akim Demaille <demaille@gostai.com>
1926
1927 parser: handle %locations as %define locations.
1928 * src/getargs.h, src/getargs.c (locations_flag): Remove.
1929 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
1930 to set "locations" to true.
1931 * src/output.c (prepare): Don't output "locations".
1932 * src/scan-gram.l (%locations): Handle it as a %<flag>.
1933 * src/parse-gram.y: It's no longer a token.
1934 Don't handle it.
1935 * data/bison.m4 (b4_locations_if): Define it with
1936 b4_percent_define_if_define.
1937 * data/c.m4, data/glr.cc: Adjust.
1938
1939 2009-04-06 Akim Demaille <demaille@gostai.com>
1940
1941 Regen.
1942 * src/parse-gram.c: Regen.
1943
1944 2009-04-06 Akim Demaille <demaille@gostai.com>
1945
1946 muscle: factor the handling of obsolete of obsolete directives.
1947 Suggested by Joel E. Denny.
1948
1949 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
1950 New, extracted from...
1951 * src/parse-gram.y (prologue_declaration: pure-parser): here.
1952 Remove it.
1953 (prologue_declaration: "%<flag>"): Use
1954 muscle_percent_define_ensure.
1955 (%error-verbose, %pure-parser): No longer tokens.
1956 * src/scan-gram.l (pure-parser): Return as a %<flag>.
1957
1958 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1959
1960 Fix options documentation.
1961 * build-aux/cross-options.pl: As in --help output, write optional
1962 arguments as [=ARG] not =[ARG].
1963 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1964
1965 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1966
1967 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1968 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1969 requirements for a correct m4 are stricter.
1970 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
1971 * configure.ac: Update to use AC_PROG_GNU_M4.
1972 Reported by Eric Blake.
1973
1974 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1975
1976 Help with updating web manual.
1977 * HACKING: Incorporate instructions from gnulib/doc/README.
1978 * bootstrap.conf (gnulib_modules): Add gendocs.
1979
1980 2009-04-03 Akim Demaille <demaille@gostai.com>
1981
1982 Regen.
1983 * src/parse-gram.h, src/parse-gram.c: Regen.
1984
1985 2009-04-03 Akim Demaille <demaille@gostai.com>
1986
1987 Factor %FLAG at scan level.
1988 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
1989 definitions and associated rules, replaced by....
1990 (PERCENT_FLAG): this new token type, and rule.
1991 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
1992 Use it for %debug and %error-verbose.
1993
1994 2009-04-03 Akim Demaille <demaille@gostai.com>
1995
1996 Regen.
1997 * src/parse-gram.h, src/parse-gram.c: Regen.
1998
1999 2009-04-03 Akim Demaille <demaille@gostai.com>
2000
2001 Treat %debug as %define debug.
2002 * data/bison.m4 (b4_debug_if): New.
2003 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
2004 * data/lalr1.java: Use it instead of b4_debug_flag.
2005 * src/getargs.h, src/getargs.c (debug_flag): Remove.
2006 * src/output.c (prepare): Don't output it.
2007 * src/parse-gram.y: Treat %debug as %define debug.
2008
2009 2009-04-03 Akim Demaille <demaille@gostai.com>
2010
2011 Treat %error-verbose as %define error_verbose.
2012 This allows to pass -Derror_verbose on the command line. Better
2013 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
2014 ERROR_VERBOSE being defined as false or true.
2015 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
2016 on b4_percent_define_ifdef, for does not check the defined value,
2017 but only whether the symbol is defined, rely on
2018 b4_percent_define_flag_if, so that a value of "false" is processed
2019 as a false.
2020 If not defined, define the flag to "false".
2021 (b4_error_verbose_if): New.
2022 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
2023 b4_error_verbose_flag.
2024 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
2025 * src/output.c (prepare): Don't output it.
2026 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
2027
2028 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2029
2030 Fix strange %define locations for default values.
2031 Reported by Akim Demaille at
2032 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2033 and discussed again starting at
2034 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2035 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2036 because location information is bogus.
2037 Use angle brackets to delimit fake file name because square brackets
2038 look like underexpanded m4. Choose a better fake file name.
2039 Use negative line numbers.
2040 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2041 * src/location.c (location_print): If line for a boundary is negative,
2042 only print that boundary's file name.
2043 * src/location.h: Document that.
2044 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2045 defaults): Update output.
2046
2047 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2048
2049 Pacify ./configure --enable-gcc-warnings.
2050 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
2051 in lib won't compile with it.
2052 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
2053
2054 2009-03-31 Akim Demaille <demaille@gostai.com>
2055
2056 bootstrap: --help to stdout.
2057 * bootstrap (usage): Don't send --help to stderr.
2058 Use a here doc instead of a long string.
2059
2060 2009-03-31 Akim Demaille <demaille@gostai.com>
2061
2062 bootstrap: README-hacking no longer exists
2063 * bootstrap (checkout_only_file): Set to HACKING.
2064
2065 2009-03-26 Akim Demaille <demaille@gostai.com>
2066
2067 doc: merge HACKING and README-hacking.
2068 Two files is confusing.
2069 Reported by Alexandre Duret-Lutz.
2070
2071 * README-hacking: Merge into...
2072 * HACKING (Working from the repository): here.
2073
2074 2009-03-26 Akim Demaille <demaille@gostai.com>
2075
2076 doc: update README-hacking.
2077 * README-hacking: We now use git and git submodules.
2078 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2079
2080 2009-03-26 Akim Demaille <demaille@gostai.com>
2081
2082 lalr1.cc: avoid GCC 4.3 warnings.
2083 GCC 4.3 now warns about "a || b && c" and asks for explicit
2084 parentheses.
2085 Reported by Alexandre Duret-Lutz.
2086 * data/location.cc: Update copyright years.
2087 (Position::operator==): Use parens to make precedence explicit.
2088 Compare lines and columns first, as they are more likely to be
2089 different, and they are faster to compare.
2090
2091 2009-03-26 Akim Demaille <demaille@gostai.com>
2092
2093 gnulib: update.
2094 * gnulib: Update to latest.
2095 * src/local.mk (AM_CFLAGS): Move to...
2096 * Makefile.am: here.
2097 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2098 AM_CFLAGS.
2099
2100 2009-03-02 Akim Demaille <demaille@gostai.com>
2101
2102 Comment changes.
2103
2104 2009-03-02 Akim Demaille <demaille@gostai.com>
2105
2106 Share b4_yytranslate_define.
2107 * data/lalr1.cc (b4_yytranslate_define): Move to...
2108 * data/c++.m4: here.
2109
2110 2009-03-02 Akim Demaille <demaille@gostai.com>
2111
2112 Use locations in the variant example.
2113 Yes, this obfuscates the point of this example, variants only.
2114 But glr.cc cannot work (yet?) without locations. This change
2115 makes it easier to use this example with glr.cc.
2116
2117 * examples/variant.yy (assert): %define it.
2118 (locations): Request them.
2119 (yylex): Bind the location to the stage.
2120
2121 2009-03-02 Akim Demaille <demaille@gostai.com>
2122
2123 Dub make_TOKEN as a public type interface.
2124 * data/c++.m4 (b4_symbol_constructor_declare)
2125 (b4_symbol_constructor_define): New empty stubs.
2126 (b4_public_types_declare, b4_public_types_define): Use them.
2127 * data/lalr1.cc (b4_symbol_constructor_declare)
2128 (b4_symbol_constructor_declare_)
2129 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2130 Move to...
2131 * data/variant.hh: here.
2132 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2133 needed.
2134 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2135 b4_symbol_constructor_declare, as it is now done by
2136 b4_public_types_define and b4_public_types_declare.
2137
2138 2009-03-02 Akim Demaille <demaille@gostai.com>
2139
2140 Coding style changes.
2141 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2142 (b4_symbol_constructor_declarations)
2143 (b4_symbol_constructor_definition_)
2144 (b4_symbol_constructor_definitions)
2145 (b4_yytranslate_definition): Rename as...
2146 (b4_symbol_constructor_declare_)
2147 (b4_symbol_constructor_declare)
2148 (b4_symbol_constructor_define_)
2149 (b4_symbol_constructor_define)
2150 (b4_yytranslate_define): these.
2151 * data/variant.hh (b4_variant_definition): Rename as...
2152 (b4_variant_define): this.
2153
2154 2009-03-02 Akim Demaille <demaille@gostai.com>
2155
2156 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2157 * data/bison.m4 (b4_percent_define_if_define): New.
2158 * data/c++.m4 (b4_variant_if): Move to...
2159 * data/bison.m4: Here, using b4_percent_define_if_define.
2160 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2161 * data/bison.m4: Here, using b4_percent_define_if_define.
2162
2163 2009-03-02 Akim Demaille <demaille@gostai.com>
2164
2165 Dub symbol_type_base as a public type.
2166 * data/c++.m4 (b4_public_types_declare): Now define
2167 symbol_type_base and symbol_type.
2168 (b4_public_types_define): New.
2169 In both cases, the definitions are taken verbatim from lalr1.cc.
2170 * data/lalr1.cc: Adjust.
2171
2172 2009-03-02 Akim Demaille <demaille@gostai.com>
2173
2174 b4_public_types_declare.
2175 * data/c++.m4 (b4_public_types_declare): New.
2176 * data/glr.cc, data/lalr1.cc: Use it.
2177
2178 2009-03-02 Akim Demaille <demaille@gostai.com>
2179
2180 b4_semantic_type_declare.
2181 * data/c++.m4 (b4_semantic_type_declare): New.
2182 Factors and generalizes what was in glr.cc and lalr1.cc.
2183 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2184 variants.
2185 * data/lalr1.cc, data/glr.cc: Use it.
2186
2187 2009-02-26 Akim Demaille <demaille@gostai.com>
2188
2189 Upgrade gnulib.
2190 * gnulib: Upgrade from master.
2191 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2192 Regen.
2193
2194 2009-02-25 Akim Demaille <demaille@gostai.com>
2195
2196 Remove useless arguments.
2197 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2198 relevant.
2199
2200 2009-02-25 Akim Demaille <demaille@gostai.com>
2201
2202 Comment changes.
2203 * data/lalr1.cc: here.
2204
2205 2009-02-25 Akim Demaille <demaille@gostai.com>
2206
2207 Fix glr.cc's debug level handling.
2208 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2209 glr.c which is used.
2210 (debug_level, set_debug_level): Adjust.
2211
2212 2009-02-25 Akim Demaille <demaille@gostai.com>
2213
2214 Copyright years.
2215 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2216
2217 2009-02-25 Akim Demaille <demaille@gostai.com>
2218
2219 Style changes.
2220 * etc/bench.pl.in (generate_grammar_list): Consitently use
2221 location_type, not yy::location.
2222
2223 2009-02-25 Akim Demaille <demaille@gostai.com>
2224
2225 Comment change.
2226 * data/lalr1.cc: here.
2227
2228 2009-02-19 Akim Demaille <demaille@gostai.com>
2229
2230 Make yyparser::error public.
2231 * data/lalr1.cc: here.
2232 There is no good reason to keep it private (and it is convenient
2233 to use it from the scanner for instance). It is already public in
2234 glr.cc.
2235
2236 2009-02-19 Akim Demaille <demaille@gostai.com>
2237
2238 Comment changes.
2239 * data/glr.cc: here.
2240
2241 2009-02-19 Akim Demaille <demaille@gostai.com>
2242
2243 Remove trailing blanks.
2244 The epilogue has its own ending \n, no need to add another.
2245
2246 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2247 epilogue.
2248 * data/glr.cc: dnl when extending the epilogue.
2249 Remove stray "private:".
2250
2251 2009-02-19 Akim Demaille <demaille@gostai.com>
2252
2253 Use b4_c_modern.
2254 * data/c.m4 (b4_c_function_decl): Here.
2255
2256 2009-02-19 Akim Demaille <demaille@gostai.com>
2257
2258 Comment changes.
2259 * data/lalr1.cc: here.
2260
2261 2009-02-19 Akim Demaille <demaille@gostai.com>
2262
2263 Extract variant.hh
2264 * data/variant.hh: New, extracted from...
2265 * data/lalr1.cc: here.
2266 Adjust.
2267 * data/local.mk: Adjust.
2268
2269 2009-02-19 Akim Demaille <demaille@gostai.com>
2270
2271 Extract stack.hh from lalr1.cc.
2272 * data/stack.hh: New.
2273 * data/lalr1.cc: Extract from here.
2274 * data/local.mk: Adjust.
2275
2276 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2277
2278 Add reminder about uploading public key to keys.gnupg.net.
2279 * HACKING (Release Procedure): Here.
2280
2281 2009-01-28 Akim Demaille <demaille@gostai.com>
2282
2283 * NEWS: Update information about 2.4.1 and 2.4.2.
2284
2285 2008-11-04 Akim Demaille <demaille@gostai.com>
2286
2287 Reformat NEWS.
2288 * NEWS: Use more outline-mode markup.
2289 Suggested by Jim Meyering.
2290
2291 2009-01-08 Akim Demaille <demaille@gostai.com>
2292
2293 Fix grep portability issues.
2294 Grep on Solaris does not support -q.
2295 Reported by Summum Bonum.
2296
2297 * NEWS: Add a stub for 2.4.2.
2298 * THANKS: Add Summum Bonum.
2299 * tests/atlocal.in (EGREP): New.
2300 (CC, CXX, XSLTPROC): Make it possible to override them via
2301 envvars.
2302 * tests/java.at: Use $EGREP instead of egrep.
2303 Use AT_CHECK's ignore instead of grep's -q.
2304
2305 2008-12-11 Akim Demaille <demaille@gostai.com>
2306
2307 Pass the token type to yysyntax_error.
2308 * data/yacc.c (yysyntax_error): Take the transated token instead
2309 of the raw number.
2310 Adjust callers.
2311 * TODO: Update.
2312
2313 2008-12-11 Akim Demaille <demaille@gostai.com>
2314
2315 Formatting changes.
2316 * data/glr.c: Formatting changes.
2317
2318 2008-12-11 Akim Demaille <demaille@gostai.com>
2319
2320 Propagate i18n changes into glr.c.
2321 * TODO: Update.
2322 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2323 building the error message format dynamically.
2324 * data/lalr1.java: Formatting changes.
2325
2326 2008-12-11 Akim Demaille <demaille@gostai.com>
2327
2328 Use testsuite -C.
2329 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2330 Solves problems when top_srcdir is an absolute path.
2331 Suggested by Eric Blake.
2332 * configure.ac: Require Autoconf 2.62.
2333
2334 2008-12-11 Akim Demaille <demaille@gostai.com>
2335
2336 Simplify the i18n of the error messages.
2337 * data/lalr1.cc: Comment changes.
2338 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2339 lalr1.cc instead of building dynamically the format string.
2340
2341 2008-12-08 Akim Demaille <demaille@gostai.com>
2342
2343 Fix portability issue in the test suite.
2344 * tests/local.at (AT_MATCHES_CHECK): New.
2345 Based on Perl instead of Sed. Sed has too many portability
2346 pitfalls, not ever Sed is GNU Sed.
2347 * tests/actions.at (Fix user actions without a trailing semicolon):
2348 Use it.
2349
2350 2008-12-08 Akim Demaille <demaille@gostai.com>
2351
2352 Update data/README.
2353 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2354
2355 2008-12-08 Akim Demaille <demaille@gostai.com>
2356
2357 Install autoconf as a submodule to get m4sugar.
2358 * .gitmodules: Add submodules/autoconf.
2359 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2360 submodules/autoconf.
2361
2362 2008-12-08 Akim Demaille <demaille@gostai.com>
2363
2364 Test token.prefix in all the skeletons.
2365 * data/java.m4 (b4_token_enum): Use the token.prefix.
2366 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2367 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2368 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2369 * tests/java.at: Comment changes.
2370 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2371 (Java parser class and package names): Add token.prefix check.
2372
2373 2008-12-08 Akim Demaille <demaille@gostai.com>
2374
2375 Fix regeneration of atconfig.
2376 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2377 remove it: now that there is no tests/Makefile.am, the top-level
2378 Makefile properly updates atconfig when needed.
2379
2380 2008-12-07 Di-an Jan <dianj@freeshell.org>
2381
2382 Implement the FIXME that ends an user action with a semicolon
2383 if it seems necessary.
2384 * src/scan-code.l (flex rules section): Flag cpp directive from
2385 any `#' to the first unescaped end-of-line. Semicolon is not
2386 needed after `;', `{', '}', or cpp directives and is needed after
2387 any other token (whitespaces and comments have no effect).
2388 * tests/actions.at (Fix user actions without a trailing semicolon):
2389 New test.
2390 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2391 to make user actions complete statements.
2392 Adjust column numbers in error messages.
2393 * tests/regression.at (Fix user actions without a trailing semicolon):
2394 Remove. Covered by new test.
2395
2396 2008-12-07 Akim Demaille <demaille@gostai.com>
2397
2398 Update gnulib.
2399 * gnulib: Update from master.
2400
2401 2008-12-05 Eric Blake <ebb9@byu.net>
2402
2403 Avoid compiler warning.
2404 * src/output.c (muscle_insert_item_number_table): Delete unused
2405 function.
2406
2407 2008-12-02 Eric Blake <ebb9@byu.net>
2408
2409 Build testsuite with newer autoconf.
2410 * tests/output.at (m4_expand): Don't override in newer autoconf,
2411 where the underlying implementation changed.
2412 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2413 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2414 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2415 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2416 since some of them contain unbalanced ')'.
2417
2418 2008-12-01 Akim Demaille <demaille@gostai.com>
2419
2420 Use b4_symbol for printers and destructors everywhere.
2421 * data/bison.m4 (b4_symbol_action_location): New.
2422 * data/c.m4 (b4_symbol_actions): Remove.
2423 Adjust all callers to use by b4_symbol_foreach and the corresponding
2424 b4_symbol_printer/destructor macro.
2425 * data/glr.cc: Adjust.
2426 * data/lalr1.java: Adjust the %destructor sanity check.
2427 * src/output.c (symbol_code_props_output): Remove, we no longer
2428 need the b4_symbol_printers/destructors tables.
2429
2430 2008-12-01 Akim Demaille <demaille@gostai.com>
2431
2432 Use b4_symbol_case_.
2433 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2434 b4_symbol_case_.
2435
2436 2008-12-01 Akim Demaille <demaille@gostai.com>
2437
2438 Move b4_symbol based macro to bison.m4.
2439 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2440 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2441 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2442 (b4_type_foreach): Move to...
2443 * data/bison.m4: Here.
2444 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2445 b4_symbol_value_template instead of b4_symbol_value.
2446
2447 2008-12-01 Akim Demaille <demaille@gostai.com>
2448
2449 b4_symbol/type_foreach.
2450 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2451 Use them.
2452
2453 2008-12-01 Akim Demaille <demaille@gostai.com>
2454
2455 Use the symbol properties to output the printer/destructor for lalr1.cc.
2456 Instead of defining complex list of tuples to define various
2457 properties of the symbols, we now prefer to define symbols as
2458 "structs" in m4: using the symbol key (its number), and the
2459 property name, b4_symbol gives it value. Use this to handle
2460 destructors and printers.
2461
2462 * src/output.c (CODE_PROP): New.
2463 (prepare_symbol_definitions): Use it to define the printer and
2464 destructor related attributes of the symbols.
2465 * data/lalr1.cc (b4_symbol_actions): Rename as...
2466 (b4_symbol_action): this.
2467 Use b4_symbol instead of 6 arguments.
2468 (b4_symbol_printer, b4_symbol_destructor): New.
2469 Use them instead of b4_symbol_actions.
2470
2471 2008-12-01 Akim Demaille <demaille@gostai.com>
2472
2473 Avoid capturing variables too easily.
2474 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2475 v__ and p__ instead of v and p.
2476
2477 2008-12-01 Akim Demaille <demaille@gostai.com>
2478
2479 Remove spurious empty line before syncline.
2480 * data/bison.m4 (b4_syncline): Don't output an empty line before
2481 the output.
2482
2483 2008-11-26 Akim Demaille <demaille@gostai.com>
2484
2485 Convert lib/Makefile.am into lib/local.mk.
2486 The real problem is rather gnulib.mk, which itself is extracted
2487 from a Makefile.am that gnulib expects to the "recursive". The
2488 tool prefix-gnulib-mk converts such a gnulib.mk to be
2489 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2490
2491 * etc/prefix-gnulib-mk: New.
2492 * bootstrap (slurp): Use it to convert further gnulib.mk.
2493 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2494 are deeper.
2495 * lib/Makefile.am: Rename as...
2496 * lib/local.mk: this.
2497 Adjust to be prefixed.
2498 * Makefile.am, configure.ac: Adjust.
2499 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2500
2501 2008-11-26 Akim Demaille <demaille@gostai.com>
2502
2503 s/_FLAGS/FLAGS/.
2504 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2505 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2506 Reported by Eric Blake.
2507
2508 2008-11-26 Akim Demaille <demaille@gostai.com>
2509
2510 Use b4_parser_tables_define in glr.cc.
2511 * data/glr.c: Use b4_parser_tables_define instead of defining the
2512 (deterministic integral) tables by hand.
2513
2514 2008-11-26 Akim Demaille <demaille@gostai.com>
2515
2516 Use b4_parser_tables_define in Java.
2517 * data/java.m4 (b4_typed_parser_table): Rename as...
2518 (b4_typed_parser_table_define): this, for consistency.
2519 Accept a comment as $4.
2520 Move $2 into yy*_.
2521 (b4_integral_parser_table): Rename as...
2522 (b4_integral_parser_table_define): this.
2523 * data/lalr1.java: Adjust all uses.
2524 Use b4_parser_tables_define instead of generation by hand.
2525
2526 2008-11-26 Akim Demaille <demaille@gostai.com>
2527
2528 Prepare the convergence bw C style and Java table generation.
2529 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2530 (b4_tables_define): Rename as...
2531 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2532 (b4_parser_tables_define): these.
2533 * data/c.m4 (b4_table_define): Rename as...
2534 (b4_integral_parser_table_define): this.
2535 * data/lalr1.cc: Adjust.
2536 (b4_table_define, b4_table_declare): Rename as...
2537 (b4_integral_parser_table_define)
2538 (b4_integral_parser_table_declare): these.
2539 (yyrline_): Move the comment where it is actually used.
2540 * data/yacc.c: Adjust.
2541 (yyrline): Use b4_integral_parser_table_define.
2542
2543 2008-11-26 Akim Demaille <demaille@gostai.com>
2544
2545 Regen.
2546 * src/parse-gram.h, src/parse-gram.c: Regen.
2547
2548 2008-11-26 Akim Demaille <demaille@gostai.com>
2549
2550 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
2551 * data/lalr1.cc (b4_tables_map): Move to...
2552 * data/bison.m4: here.
2553 Update the comment for yytable during the flight.
2554 (b4_tables_declare, b4_tables_define): New.
2555 * data/lalr1.cc: Use them.
2556 * data/c.m4 (b4_table_define): New.
2557 * data/yacc.c: Use b4_tables_define instead of output the tables
2558 by hand.
2559 * tests/regression.at (Web2c Actions): Adjust the expected output,
2560 the order of the tables changed.
2561
2562 2008-11-26 Akim Demaille <demaille@gostai.com>
2563
2564 Get rid of (yy)rhs and (yy)prhs.
2565 These tables are no longer needed in the parsers, and they don't seem to
2566 be useful. They are not documented either.
2567
2568 * src/output.c (prepare_rules): Get rid of rhs and prhs.
2569 Adjust the computation of (yy)r2.
2570
2571 2008-11-26 Akim Demaille <demaille@gostai.com>
2572
2573 Rule length is unsigned.
2574 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
2575
2576 2008-11-26 Akim Demaille <demaille@gostai.com>
2577
2578 Get rid of lalr1-split.cc.
2579 It was no longer maintainer.
2580
2581 * data/lalr1-split.cc: Remove.
2582 * etc/bench.pl.in (bench_fusion_parser): Remove.
2583 Adjust.
2584
2585 2008-11-26 Akim Demaille <demaille@gostai.com>
2586
2587 Use yy* consistently.
2588 * data/glr.c: Now that yyrhs no longer exists as a global
2589 variable, rename local "rhs" variables into "yyrhs" for
2590 consistency.
2591
2592 2008-11-25 Akim Demaille <demaille@gostai.com>
2593
2594 Get rid of yyrhs and yyprhs in glr.c.
2595 * data/glr.c (yyrhs, yyprhs): Remove.
2596 Instead, use the state stack and yystos.
2597
2598 2008-11-25 Akim Demaille <demaille@gostai.com>
2599
2600 Flag glr tests.
2601 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
2602 as an Autotest keyword.
2603
2604 2008-11-25 Akim Demaille <demaille@gostai.com>
2605
2606 Prefer TESTSUITE_FLAGS.
2607 TESTSUITEFLAGS is barely readable.
2608
2609 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
2610 for backward compatibility.
2611 Use the former instead of the latter.
2612
2613 2008-11-25 Akim Demaille <demaille@gostai.com>
2614
2615 Get rid of yyrhs and yyprhs in larl1.java.
2616 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
2617 (yy_reduce_print): Rather, use yystos_ and the state stack.
2618
2619 2008-11-25 Akim Demaille <demaille@gostai.com>
2620
2621 Formatting changes.
2622
2623 2008-11-25 Akim Demaille <demaille@gostai.com>
2624
2625 Get rid of yyrhs and yyprhs in yacc.c.
2626 They were used to get the symbol types, given a rule number, when
2627 displaying the top of the stack before a reduction. But the
2628 symbol type is available from the state stack. This has two be
2629 benefits: two tables less in the parser (making it smaller), and a
2630 more consistent use of the three stacks which will help to fuse
2631 them.
2632
2633 * data/yacc.c (yyprhs, yyrhs): Remove.
2634 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
2635 (yy_reduce_print): Take yyssp as argument.
2636 Use it, together with yystos, to get the symbol type.
2637 * tests/regression.at (Web2c Report): Remove these tables from the
2638 expected output.
2639
2640 2008-11-25 Akim Demaille <demaille@gostai.com>
2641
2642 b4_tables_map.
2643 The point is to factor the generation of the tables across skeletons.
2644 This is language dependant.
2645
2646 * data/c.m4 (b4_comment_): New.
2647 Should be usable to define how to generate tables independently of
2648 the language.
2649 (b4_c_comment): New.
2650 (b4_comment): Bounce to b4_c_comment.
2651 Now support $2 = [PREFIX] for indentation.
2652 * data/lalr1.cc (b4_table_declare): Don't output a comment if
2653 there is no comment.
2654 Indent it properly when there is one.
2655 Output the ending semicolon.
2656 (b4_table_define): Space changes.
2657 Output the ending semicolon.
2658 (b4_tables_map): New.
2659 Use it twice instead of declaring and defining the (integral)
2660 tables by hand.
2661
2662 2008-11-25 Akim Demaille <demaille@gostai.com>
2663
2664 b4_table_declare.
2665 * data/lalr1.cc (b4_table_declare): New.
2666 Use it to declare the tables defined with b4_table_define.
2667 (b4_table_define): Declare a third arg to match b4_table_declare
2668 signature.
2669 Move all the comments around invocations of b4_table_define into
2670 the invocations itselves.
2671 Move things around to have the order for declarations and
2672 definitions.
2673
2674 2008-11-25 Akim Demaille <demaille@gostai.com>
2675
2676 Formatting changes.
2677 * data/lalr1.java: here.
2678
2679 2008-11-25 Akim Demaille <demaille@gostai.com>
2680
2681 b4_args is more general than only C++.
2682 * data/lalr1.cc (b4_args, _b4_args): Move to...
2683 * data/bison.m4: here.
2684
2685 2008-11-21 Di-an Jan <dianj@freeshell.org>
2686
2687 Implement no-XXX arguments for --warnings, --report, --trace.
2688 * src/getargs.c (flags_argmatch): Handles no-XXX.
2689 Fix typo in doxygen comment.
2690
2691 2008-11-21 Akim Demaille <demaille@gostai.com>
2692
2693 Display the changes in cross-options.texi.
2694 * build-aux/cross-options.pl ($sep): New, to separate items.
2695 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
2696 changes.
2697
2698 2008-11-20 Di-an Jan <dianj@freeshell.org>
2699
2700 Improves options in the manual.
2701 * doc/bison.texinfo (-g, -x): Add space before argument.
2702 (Option Cross Key): Implement FIXME: listing directives also.
2703 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2704 (Short Option): Special case -d. Put arguments inside @option.
2705 (Bison Directive): Add column, automatically extracted from
2706 src/scan-gram.l (actual name passed as the first argument)
2707 with special case for %define.
2708 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
2709 to build-aux/cross-options.pl.
2710 * src/getargs.c (usage): Document limitations of cross-options.pl.
2711 * src/scan-gram.l: Likewise.
2712
2713 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2714
2715 Fix unexpanded macros in GLR defines file.
2716 Reported by Csaba Raduly at
2717 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2718 * THANKS (Csaba Raduly): Add.
2719 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2720 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2721 lexer in a separate module that includes the defines file.
2722 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
2723 source.
2724 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2725 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2726 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2727 (AT_DATA_SOURCE_PROLOGUE): New.
2728 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2729 (AT_DATA_SOURCE): New.
2730 (AT_FULL_COMPILE): Extend to support an additional source file.
2731
2732 2008-11-18 Akim Demaille <demaille@gostai.com>
2733
2734 More TODO.
2735 * TODO: More short term issues.
2736
2737 2008-11-18 Akim Demaille <demaille@gostai.com>
2738
2739 Regen.
2740 * src/parse-gram.h, src/parse-gram.c: Regen.
2741
2742 2008-11-18 Akim Demaille <demaille@gostai.com>
2743
2744 Use b4_subtract where possible.
2745 * data/lalr1.cc (b4_subtract): Move to...
2746 * data/bison.m4: here.
2747 * data/glr.c (b4_rhs_data): Use it.
2748 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
2749
2750 2008-11-18 Akim Demaille <demaille@gostai.com>
2751
2752 Remove incorrect mode specification.
2753 * data/glr.cc: Don't pretend it's C code.
2754
2755 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2756
2757 Simplify last patch slightly.
2758 * src/getargs.c (getargs): Here.
2759
2760 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2761
2762 Fix last warning from --enable-gcc-warnings.
2763 * src/getargs.c (getargs): Don't assign const address to non-const
2764 pointer.
2765
2766 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2767
2768 Don't let maintainer-*-check targets force a version update.
2769 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2770 handled.
2771
2772 2008-11-17 Di-an Jan <dianj@freeshell.org>
2773
2774 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2775 Align menus. Adjust word wrapping. Use node names for menu names.
2776 (Examples): Don't abbreviate node names.
2777 (LocalWords): Remove abbreviations.
2778 (Copying): Make description a sentence.
2779 (Java Action Features): Remove period to match the rest of menu.
2780
2781 2008-11-17 Di-an Jan <dianj@freeshell.org>
2782
2783 Handles several --enable-gcc-warnings.
2784 * src/getargs.c (command_line_location): Set parameters to void.
2785 * src/output.c (symbol_type_name_cmp): Make static.
2786 (symbols_by_type_name): Set parameters to void.
2787 (symbol_definitions_output): Remove unused parameter. Rename as...
2788 (prepare_symbol_definitions): this.
2789 (muscles_output): Move symbol_definitions_output to...
2790 (output): here as prepare_symbol_definitions.
2791 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
2792 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
2793
2794 2008-11-17 Di-an Jan <dianj@freeshell.org>
2795
2796 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
2797 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
2798
2799 2008-11-16 Akim Demaille <demaille@gostai.com>
2800
2801 Add missing $(EXEEXT).
2802 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
2803 "src/bison$(EXEEXT)".
2804 Reported by Di-an Jan.
2805
2806 2008-11-15 Akim Demaille <demaille@gostai.com>
2807
2808 * TODO: Update.
2809
2810 2008-11-15 Akim Demaille <demaille@gostai.com>
2811
2812 Formatting changes.
2813 * tests/input.at: here.
2814
2815 2008-11-15 Akim Demaille <demaille@gostai.com>
2816
2817 Remove duplicate header inclusion.
2818 * src/LR0.c: here.
2819
2820 2008-11-15 Akim Demaille <demaille@gostai.com>
2821
2822 * src/parse-gram.h, src/parse-gram.c: Regen.
2823
2824 2008-11-15 Akim Demaille <demaille@gostai.com>
2825
2826 Support parametric types.
2827
2828 There are two issues to handle: first scanning nested angle
2829 bracket pairs to support types such as std::pair< std::string,
2830 std::list<std::string> > >.
2831
2832 Another issue is to address idiosyncracies of C++: do not glue two
2833 closing angle brackets together (otherwise it's operator>>), and
2834 avoid sticking blindly a TYPE to the opening <, as it can result
2835 in '<:' which is a digraph for '['.
2836
2837 * src/scan-gram.l (brace_level): Rename as...
2838 (nesting): this.
2839 (SC_TAG): New.
2840 Implement support for complex tags.
2841 (tag): Accept
2842 , but not <.
2843 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
2844 (b4_symbol_variant): Leave space around types as parameters.
2845 * examples/variant.yy: Use nested template types and leading ::.
2846 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
2847 Rename as...
2848 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
2849 * tests/c++.at: Test parametric types.
2850
2851 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2852
2853 Test token.prefix.
2854 This is not sufficient, but we test at least that the make_SYMBOL
2855 interface is not affected by token.prefix. A more general test
2856 will be implemented when the support of token.prefix is generalized
2857 to more skeletons.
2858
2859 * tests/c++.at: One more variant test, using token.prefix.
2860
2861 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2862
2863 Test the make_TOKEN interface.
2864 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
2865 Factor the common code in yylex.
2866 Use it to test "%define lex_symbol".
2867
2868 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2869
2870 Formatting change.
2871
2872 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2873
2874 Simplify code for variants bench marks.
2875 * etc/bench.pl.in (&generate_grammar_list): Define and use
2876 location_type.
2877 Factor the common code in yylex.
2878
2879 2008-11-15 Akim Demaille <demaille@gostai.com>
2880
2881 Better error message.
2882 * bootstrap (find_tool): Fix the error message.
2883
2884 2008-11-15 Akim Demaille <demaille@gostai.com>
2885
2886 Update variant.yy to newest interface.
2887 * examples/variant.yy: Define lex_symbol.
2888 Adjust.
2889
2890 2008-11-15 Akim Demaille <demaille@gostai.com>
2891
2892 Don't use locations in variant.yy.
2893 * examples/variant.yy: Adjust to not using locations.
2894
2895 2008-11-15 Akim Demaille <demaille@gostai.com>
2896
2897 Comment changes.
2898 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
2899 comments for the license.
2900
2901 2008-11-15 Akim Demaille <demaille@gostai.com>
2902
2903 Remove tests/Makefile.am.
2904 * tests/Makefile.am: Rename as...
2905 * tests/local.mk: this.
2906 * Makefile.am, configure.ac: Adjust.
2907 * Makefile.am (DISTCLEANFILES): Define.
2908 (maintainer-check, maintainer-xml-check, maintainer-push-check):
2909 Remove, we no longer need to bounce to the real targets.
2910
2911 2008-11-15 Akim Demaille <demaille@gostai.com>
2912
2913 Comment changes.
2914
2915 2008-11-15 Akim Demaille <demaille@gostai.com>
2916
2917 djgpp/local.mk.
2918 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
2919 * djgpp/local.mk: this new file.
2920
2921 2008-11-15 Akim Demaille <demaille@gostai.com>
2922
2923 Remove doc/Makefile.am.
2924 * doc/Makefile.am: Rename as...
2925 * doc/local.mk: this.
2926 Adjust paths
2927 * Makefile.am, configure.ac: Adjust.
2928 * Makefile.am (MOSTLYCLEANFILES): New.
2929 * src/local.mk: Adjust.
2930
2931 2008-11-15 Akim Demaille <demaille@gostai.com>
2932
2933 Move sc_tight_scope into maint.mk.
2934 It does not work, and I don't know how it was supposed to work: it
2935 seems to be looking for sources in the build tree. I just moved
2936 it at a better place, fixing it is still required.
2937
2938 * src/local.mk (echo): Remove.
2939 (sc_tight_scope): Move to...
2940 * maint.mk: here.
2941
2942 2008-11-15 Akim Demaille <demaille@gostai.com>
2943
2944 Regen.
2945 * src/parse-gram.h, src/parse-gram.h: Regen.
2946
2947 2008-11-15 Akim Demaille <demaille@gostai.com>
2948
2949 Remove src/Makefile.am.
2950 * src/Makefile.am: Rename as...
2951 * src/local.mk: this.
2952 Prefix all the paths with src/.
2953 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
2954 (AM_CPPFLAGS): Find find in builddir/src.
2955 (YACC): Move the flags into...
2956 (AM_YFLAGS): here.
2957 * maint.mk (sc_tight_scope): Disable.
2958 It used to bounce to the version in src/Makefile.am which is now
2959 part of this very Makefile.
2960 * Makefile.am, configure.ac: Adjust.
2961 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
2962 include "..." to find files "here": we are no longer in src/, so
2963 qualify the includes with src/.
2964 * doc/Makefile.am (PREPATH): No longer include the top_builddir
2965 prefix.
2966 (.x.1): Adjust to be able to create src/foo from the top level
2967 Makefile, instead of going bounce to src/Makefile the creation of
2968 foo.
2969
2970 2008-11-15 Akim Demaille <demaille@gostai.com>
2971
2972 Remove useless variable.
2973 * doc/Makefile.am (srcsrcdir): Remove.
2974
2975 2008-11-15 Akim Demaille <demaille@gostai.com>
2976
2977 Remove data/Makefile.am.
2978 * data/Makefile.am: Rename as...
2979 * data/local.mk: this.
2980 Adjust paths.
2981 * Makefile.am, configure.ac: Adjust.
2982
2983 2008-11-15 Akim Demaille <demaille@gostai.com>
2984
2985 Remove etc/Makefile.am.
2986 * etc/Makefile.am: Rename as...
2987 * etc/local.mk: this.
2988 Adjust.
2989 * Makefile.am, configure.ac: Adjust.
2990
2991 2008-11-15 Akim Demaille <demaille@gostai.com>
2992
2993 Remove examples/local.mk.
2994 examples/calc++/Makefile.am might be interesting to keep as is, since
2995 it is an example in itself.
2996
2997 * examples/Makefile.am: Rename as...
2998 * examples/local.mk: this.
2999 Adjust.
3000 * Makefile.am, configure.ac: Adjust.
3001
3002 2008-11-15 Akim Demaille <demaille@gostai.com>
3003
3004 Remove build-aux/Makefile.am.
3005 Recursive Makefiles are really way too slow, let's get rid of some of
3006 them.
3007
3008 * build-aux/Makefile.am: Rename as...
3009 * build-aux/local.mk: this.
3010 Adjust paths.
3011 * Makefile.am, configure.ac: Adjust.
3012
3013 2008-11-15 Akim Demaille <demaille@gostai.com>
3014
3015 Provide convenience constructors for locations and positions.
3016 * data/location.cc (position::position): Accept file, line and
3017 column as arguments with default values.
3018 Always qualify initial line and column literals as unsigned.
3019 (location::location): Provide convenience constructors.
3020
3021 2008-11-15 Akim Demaille <demaille@gostai.com>
3022
3023 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
3024 token type.
3025 Using template buys us nothing, and makes it uselessly complex to
3026 construct a symbol. Besides, it could not be generalized to other
3027 languages, while make_FOO would work in C/Java etc.
3028
3029 * data/lalr1.cc (b4_symbol_): New.
3030 (b4_symbol): Use it.
3031 (b4_symbol_constructor_declaration_)
3032 (b4_symbol_constructor_definition_): Instead of generating
3033 specializations of an overloaded template function, just generate
3034 several functions whose names are forged from the token names
3035 without the token.prefix.
3036 (b4_symbol_constructor_declarations): Generate them for all the
3037 symbols, not just by class of symbol type, now that instead of
3038 specializing a function template by the token, we generate a
3039 function named after the token.
3040 (b4_symbol_constructor_specialization_)
3041 (b4_symbol_constructor_specializations): Remove.
3042 * etc/bench.pl.in: Adjust to this new API.
3043
3044 2008-11-13 Akim Demaille <demaille@gostai.com>
3045
3046 %define token.prefix.
3047 Provide a means to add a prefix to the name of the tokens as
3048 output in the generated files. Because of name clashes, it is
3049 good to have such a prefix such as TOK_ that protects from names
3050 such as EOF, FILE etc. But it clutters the grammar itself.
3051
3052 * data/bison.m4 (token.prefix): Empty by default.
3053 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
3054 * data/lalr1.cc (b4_symbol): Ditto.
3055
3056 2008-11-13 Akim Demaille <demaille@gostai.com>
3057
3058 Compute at M4 time some of the subtractions.
3059 * data/lalr1.cc (b4_subtract): New.
3060 (b4_rhs_data): Use it.
3061
3062 2008-11-13 Akim Demaille <demaille@gostai.com>
3063
3064 symbol::token.
3065 This allows the user to get the type of a token returned by yylex.
3066
3067 * data/lalr1.cc (symbol::token): New.
3068 (yytoknum_): Define when %define lex_symbol, independently of
3069 %debug.
3070 (yytoken_number_): Move into...
3071 (symbol::token): here, since that's the only use.
3072 The other one is YYPRINT which was not officially supported
3073 by lalr1.cc, and anyway it did not work since YYPRINT uses this
3074 array under a different name (yytoknum).
3075
3076 2008-11-13 Akim Demaille <demaille@gostai.com>
3077
3078 YYERRCODE.
3079 * TODO (YYERRCODE): Mention the case of $undef.
3080
3081 2008-11-13 Akim Demaille <demaille@gostai.com>
3082
3083 TODO: YYPRINT.
3084 * TODO (YYPRINT): New.
3085
3086 2008-11-13 Akim Demaille <demaille@gostai.com>
3087
3088 Comment changes.
3089 * data/lalr1.cc, data/yacc.c: Fix the description of the
3090 yytranslate and yytoknum tables.
3091
3092 2008-11-13 Akim Demaille <demaille@gostai.com>
3093
3094 Define make_symbol in the header.
3095 To reach good performances these functions should be inlined (yet
3096 this is to measure precisely). To this end they must be available
3097 to the caller.
3098
3099 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3100 location_type with the class name.
3101 Since will now be output in the header, declare "inline".
3102 No longer use b4_symbol_constructor_specializations, but
3103 b4_symbol_constructor_definitions in the header.
3104 Don't call it in the *.cc file.
3105
3106 2008-11-13 Akim Demaille <demaille@gostai.com>
3107
3108 Define yytranslate in the header for lex_symbol.
3109 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3110 into the header file when using %define lex_symbol.
3111 (yytranslate_): Declare inline.
3112
3113 2008-11-13 Akim Demaille <demaille@gostai.com>
3114
3115 Define the constructors of symbol_type in
3116 b4_symbol_constructor_definitions.
3117 The constructors are called by the make_symbol functions, which a
3118 forthcoming patch will move elsewhere. Hence the interest of
3119 putting them together.
3120
3121 The stack_symbol_type does not need to be moved, it is used only
3122 by the parser.
3123
3124 * data/lalr1.cc: Move symbol_type and symbol_base_type
3125 constructors into...
3126 (b4_symbol_constructor_definitions): here.
3127 Adjust.
3128
3129 2008-11-13 Akim Demaille <demaille@gostai.com>
3130
3131 Make it easier to move the definition of yytranslate_.
3132 Forthcoming changes will make it possible to use yytranslate_
3133 from outside the parser implementation file.
3134
3135 * data/lalr1.cc (b4_yytranslate_definition): New.
3136 Use it.
3137
3138 2008-11-13 Akim Demaille <demaille@gostai.com>
3139
3140 Remove useless class specification.
3141 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3142 to refer to the class name to use a type defined by the class for
3143 arguments of member functions.
3144
3145 2008-11-13 Akim Demaille <demaille@gostai.com>
3146
3147 Finer input type for yytranslate.
3148 This patch is debatable: the tradition expects yylex to return an int
3149 which happens to correspond to token_number (which is an enum). This
3150 allows for instance to return characters (such as '*' etc.). But this
3151 goes against the stronger typing I am trying to have with the new
3152 lex interface which return a symbol_type. So in this case, feed
3153 yytranslate_ with a token_type.
3154
3155 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3156 expect a token_type.
3157
3158 2008-11-13 Akim Demaille <demaille@gostai.com>
3159
3160 Honor lex-params in %define lex_symbol mode.
3161 * data/lalr1.cc: Use b4_lex_param.
3162
3163 2008-11-13 Akim Demaille <demaille@gostai.com>
3164
3165 Simplify names.
3166 * src/output.c (symbol_definitions_output): Rename symbol
3167 attributes type_name and has_type_name as type and has_type.
3168 * data/lalr1.cc: Adjust uses.
3169
3170 2008-11-13 Akim Demaille <demaille@gostai.com>
3171
3172 Use b4_type_names for the union type.
3173 The union used to compute the size of the variant used to iterate
3174 over the type of all the symbols, with a lot of redundancy. Now
3175 iterate over the lists of symbols having the same type-name.
3176
3177 * data/lalr1.cc (b4_char_sizeof_): New.
3178 (b4_char_sizeof): Use it.
3179 Adjust to be called with a list of numbers instead of a single
3180 number.
3181 Adjust its caller for new-line issues.
3182
3183 2008-11-13 Akim Demaille <demaille@gostai.com>
3184
3185 Define the "identifier" of a symbol.
3186 Symbols may have several string representations, for instance if
3187 they have an alias. What I call its "id" is a string that can be
3188 used as an identifier. May not exist.
3189
3190 Currently the symbols which have the "tag_is_id" flag set are
3191 those that don't have an alias. Look harder for the id.
3192
3193 * src/output.c (is_identifier): Move to...
3194 * src/symtab.c (is_identifier): here.
3195 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3196 * src/output.c (symbol_definitions_output): Use it to define "id"
3197 and "has_id".
3198 Remove the definition of "tag_is_id".
3199 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3200 "tag_is_id" were used to produce code.
3201 We still use "tag" for documentation.
3202
3203 2008-11-11 Akim Demaille <demaille@gostai.com>
3204
3205 Locations are no longer required by lalr1.cc.
3206 * data/lalr1.cc (_b4_args, b4_args): New.
3207 Adjust all uses of locations to make them optional.
3208 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3209 (AT_CHECK_NAMESPACE): Check the use of locations.
3210 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3211 without locations with lalr1.cc.
3212 Test these cases.
3213 * tests/output.at: Check lalr1.cc with and without location
3214 support.
3215 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3216 Don't use locations.
3217
3218 2008-11-11 Akim Demaille <demaille@gostai.com>
3219
3220 AT_FULL_COMPILE.
3221 * tests/local.at (AT_FULL_COMPILE): New.
3222 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3223
3224 2008-11-11 Akim Demaille <demaille@gostai.com>
3225
3226 Support parens in calc++.
3227 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3228 * examples/calc++/test (run): Check the expected output.
3229 Adjust callers.
3230 Check parens too.
3231
3232 2008-11-11 Akim Demaille <demaille@gostai.com>
3233
3234 Simplify lalr1.cc since %defines is mandatory.
3235 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3236
3237 2008-11-11 Akim Demaille <demaille@gostai.com>
3238
3239 TODO: yyfmt.
3240 * TODO (yysyntax_error): New item.
3241
3242 2008-11-11 Akim Demaille <demaille@gostai.com>
3243
3244 Prefer M4 to CPP.
3245 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3246 YYERROR_VERBOSE.
3247
3248 2008-11-11 Akim Demaille <demaille@gostai.com>
3249
3250 Support i18n of the parse error messages.
3251 * TODO (lalr1.cc/I18n): Remove.
3252 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3253 error messages, as done in yacc.c.
3254 Stay within the yy* pseudo namespace.
3255
3256 2008-11-11 Akim Demaille <demaille@gostai.com>
3257
3258 More TODO.
3259 * TODO (single stack, yysyntax_error): New.
3260
3261 2008-11-11 Akim Demaille <demaille@gostai.com>
3262
3263 Make it possible to return a symbol_type from yylex.
3264 * data/lalr1.cc (b4_lex_symbol_if): New.
3265 (parse): When lex_symbol is defined, expected yylex to return the
3266 complete lookahead.
3267 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3268 yylex interface.
3269 (bench_variant_parser): Exercise it.
3270
3271 2008-11-11 Akim Demaille <demaille@gostai.com>
3272
3273 Remove useless bench case.
3274 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3275 no longer used.
3276
3277 2008-11-11 Akim Demaille <demaille@gostai.com>
3278
3279 Improve display of directives.
3280 * etc/bench.pl.in (parse_term): Don't add useless eol.
3281
3282 2008-11-11 Akim Demaille <demaille@gostai.com>
3283
3284 Use string_cast in the bench.
3285 * etc/bench.pl.in (generate_grammar_list): Define and use
3286 string_cast.
3287
3288 2008-11-11 Akim Demaille <demaille@gostai.com>
3289
3290 Replace yychar with a Boolean.
3291 * data/lalr1.cc (parse::yychar): Replace by...
3292 (parse::yyempty): this.
3293
3294 2008-11-11 Akim Demaille <demaille@gostai.com>
3295
3296 Factor the tables.
3297 * TODO: New item.
3298
3299 2008-11-11 Akim Demaille <demaille@gostai.com>
3300
3301 Let yytranslate handle the eof case.
3302 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3303 Adjust callers.
3304 No longer expect yychar to be equal to yyeof_, rather, test the
3305 lookahead's (translated) kind.
3306
3307 2008-11-11 Akim Demaille <demaille@gostai.com>
3308
3309 yychar cannot be empty in yyerrlab.
3310 * TODO (yychar == yyempty_): New.
3311 * data/lalr1.cc: Remove the handling of this case.
3312 This eases forthcoming changes related to yychar and yytranslate.
3313
3314 2008-11-11 Akim Demaille <demaille@gostai.com>
3315
3316 Bench: syntactic sugar for %define/#define.
3317 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3318 (&bench_push_parser, bench_variant_parser): Use this feature.
3319 (&eat): New.
3320 Use it.
3321
3322 2008-11-11 Akim Demaille <demaille@gostai.com>
3323
3324 Less memory pressure on the "list" bench.
3325 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3326 the values, to limit memory pressure.
3327
3328 2008-11-11 Akim Demaille <demaille@gostai.com>
3329
3330 Introduce make_symbol.
3331 make_symbol provides a means to construct a full symbol (kind,
3332 value, location) in a single shot. It is meant to be a Symbol
3333 constructor, parameterized by the symbol kind so that overloading
3334 would prevent incorrect kind/value pairs. Unfortunately
3335 parameterized constructors do not work well in C++ (unless the
3336 parameter also appears as an argument, which is not acceptable),
3337 hence the use of a function instead of a constructor.
3338
3339 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3340 (b4_symbol_constructor_declarations)
3341 (b4_symbol_constructor_specialization_)
3342 (b4_symbol_constructor_specializations)
3343 (b4_symbol_constructor_definition_)
3344 (b4_symbol_constructor_definitions): New.
3345 Use them where appropriate to generate declaration, declaration of
3346 the specializations, and implementations of the templated
3347 overloaded function "make_symbol".
3348 (variant::variant): Always define a default ctor.
3349 Also provide a copy ctor.
3350 (symbol_base_type, symbol_type): New ctor overloads for value-less
3351 symbols.
3352 (symbol_type): Now public, so that functions such as yylex can use
3353 it.
3354
3355 2008-11-11 Akim Demaille <demaille@gostai.com>
3356
3357 Inform m4 whether a tag is a valid id.
3358 * src/output.c (is_identifier): New.
3359 (symbol_definitions_output): Use it to define tag_is_id.
3360 But maybe this should be done at m4 level?
3361
3362 2008-11-11 Akim Demaille <demaille@gostai.com>
3363
3364 Test 214 was failing: it greps with a pattern containing [ ]*
3365 which obviously meant to catch spaces and tabs, but contained only
3366 spaces. Tabulations in sources are a nuisance, so to simplify the
3367 matter, get rid of all the tabulations in the Java sources. The
3368 other skeletons will be treated equally later.
3369
3370 * data/java.m4, data/lalr1.java: Untabify.
3371 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3372 tabulations are no longer generated.
3373
3374 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3375
3376 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3377 * configure.ac: Adjust usage.
3378 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3379 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3380 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3381
3382 2008-11-10 Di-an Jan <dianj@freeshell.org>
3383
3384 Workaround Java's ``code too large'' problem for parser tables
3385 in most cases, by using one function per initialization.
3386 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3387 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3388 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3389 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3390 (yytname_): Use b4_typed_parser_table.
3391 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3392 ``code too large'' error.
3393
3394 2008-11-10 Di-an Jan <dianj@freeshell.org>
3395
3396 * NEWS: Document them.
3397
3398 General Java skeleton improvements.
3399 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3400 using gcj < 4.3 in the testsuite, according to comments in
3401 gnulib/m4/javacomp.m4.
3402 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3403 location_type, position_type): Remove extraneous brackets from
3404 b4_percent_define_default.
3405 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3406 m4_define and m4_define_default.
3407 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3408 which marks the end of user code with appropriate syncline, like all
3409 the other skeletons.
3410 (b4_user_post_prologue): Add. Don't silently drop.
3411 (yylex): Remove.
3412 (parse): Inline yylex.
3413 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3414 (%{...%}): Fix typo of %code imports.
3415 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3416
3417 Support annotations on parser class with %define annotations.
3418 * data/lalr1.java (annotations): Add to parser class modifier.
3419 * doc/bison.texinfo (Java Parser Interface): Document
3420 %define annotations.
3421 (Java Declarations Summary): Document %define annotations.
3422 * tests/java.at (Java parser class modifiers): Test annotations.
3423
3424 Do not generate code for %error-verbose unless requested.
3425 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3426 Make private. Make conditional on %error-verbose.
3427 (getErrorVerbose, setErrorVerbose): New.
3428 (yytnamerr_): Make conditional on %error-verbose.
3429 (yysyntax_error): Make some code conditional on %error-verbose.
3430 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3431 about %error-verbose having no effect.
3432 (getErrorVerbose, setErrorVerbose): Document.
3433
3434 Move constants for token names to Lexer interface.
3435 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3436 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3437 (parse): Qualify EOF to Lexer.EOF.
3438 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3439 EOF and token names to Java Lexer Interface.
3440 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3441
3442 Make yyerror public.
3443 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3444 (yyerror): Change to public. Add Javadoc comments. Use longer
3445 parameter names. Make the body rather than the declarator
3446 conditional on %locations.
3447 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3448
3449 Allow user to add code to the constructor with %code init.
3450 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3451 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3452 Add %code init to the front of the constructor body.
3453 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3454 and %define init_throws.
3455 (Java Declarations Summary): Document %code init and
3456 %define init_throws.
3457 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3458 (Java constructor init and init_throws): Add tests.
3459
3460 2008-11-10 Akim Demaille <demaille@gostai.com>
3461
3462 Update TODO.
3463 * TODO (-D): is implemented.
3464 (associativity): Same precedence must have the same associativity.
3465 For instance, how can a * b / c be parsed if * is %left and / is
3466 %right?
3467 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3468
3469 2008-11-10 Akim Demaille <demaille@gostai.com>
3470
3471 Formatting changes.
3472
3473 2008-11-10 Akim Demaille <demaille@gostai.com>
3474
3475 More information about the symbols.
3476 * src/output.c (type_names_output): Document all the symbols,
3477 including those that don't have a type-name.
3478 (symbol_definitions_output): Define "is_token" and
3479 "has_type_name".
3480 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3481 type-name, now that they are defined too in b4_type_names.
3482
3483 2008-11-10 Akim Demaille <demaille@gostai.com>
3484
3485 Regen.
3486
3487 2008-11-10 Akim Demaille <demaille@gostai.com>
3488
3489 Make parser::yytranslate static.
3490 Small speedup (1%) on the list grammar. And makes yytranslate_
3491 available in non member functions.
3492
3493 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3494 function.
3495
3496 2008-11-10 Akim Demaille <demaille@gostai.com>
3497
3498 Avoid trailing spaces.
3499 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3500 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3501 they can be empty, and anyway this incorrectly indents the first
3502 action.
3503
3504 2008-11-10 Akim Demaille <demaille@gostai.com>
3505
3506 Comment changes.
3507
3508 2008-11-10 Akim Demaille <demaille@gostai.com>
3509
3510 Use "enum" for integral constants.
3511 This is just nicer to read, I observed no speedup.
3512
3513 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3514 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3515 (yyuser_token_number_max_, yyundef_token_): Move into...
3516 (yytranslate_): here.
3517
3518 2008-11-10 Akim Demaille <demaille@gostai.com>
3519
3520 Shortcuts in bench directives.
3521 * etc/bench.pl.in (parse_dirs): New.
3522 Use it.
3523 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3524 Create the benches in "benches/".
3525
3526 2008-11-10 Akim Demaille <demaille@gostai.com>
3527
3528 Formatting changes.
3529 * data/lalr1.cc: here.
3530
3531 2008-11-10 Akim Demaille <demaille@gostai.com>
3532
3533 Adjust verbose message to using emacs.
3534 * etc/bench.pl.in: Inform compilation-mode when we change the
3535 directory.
3536 (generate_grammar_list): Recognize %define "variant" in addition
3537 to %define variant.
3538
3539 2008-11-10 Akim Demaille <demaille@gostai.com>
3540
3541 Classify symbols by type-name.
3542 * src/uniqstr.h (UNIQSTR_CMP): New.
3543 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
3544 (type_names_output): New.
3545 (muscles_output): Use it.
3546 * data/lalr1.cc (b4_symbol_action_): Remove.
3547 (b4_symbol_case_, b4_type_action_): New.
3548 Adjust uses of b4_symbol_action_ to use b4_type_action_.
3549
3550 2008-11-10 Akim Demaille <demaille@gostai.com>
3551
3552 Change the handling of the symbols in the skeletons.
3553 Before we were using tables which lines were the symbols and which
3554 columns were things like number, tag, type-name etc. It is was
3555 difficult to extend: each time a column was added, all the numbers had
3556 to be updated (you asked for colon $2, not for "tag"). Also, it was
3557 hard to filter these tables when only a subset of the symbols (say the
3558 tokens, or the nterms, or the tokens that have and external number
3559 *and* a type-name) was of interest.
3560
3561 Now instead of monolithic tables, we define one macro per cell. For
3562 instance "b4_symbol(0, tag)" is a macro name which contents is
3563 self-decriptive. The macro "b4_symbol" provides easier access to
3564 these cells.
3565
3566 * src/output.c (type_names_output): Remove.
3567 (symbol_numbers_output, symbol_definitions_output): New.
3568 (muscles_output): Call them.
3569 (prepare_symbols): Define b4_symbols_number.
3570
3571 2008-11-10 Akim Demaille <demaille@gostai.com>
3572
3573 --trace=muscles
3574 * src/getargs.h, src/getargs.c (trace_muscle): New.
3575 (trace_types, trace_args): Support it.
3576 * src/output.c (output_skeleton): Use it.
3577
3578 2008-11-10 Akim Demaille <demaille@gostai.com>
3579
3580 muscles_output.
3581 * src/output.c (muscles_output): New, extracted from...
3582 (output_skeleton): here.
3583 Adjust.
3584
3585 2008-11-10 Akim Demaille <demaille@gostai.com>
3586
3587 Formatting changes.
3588
3589 2008-11-10 Akim Demaille <demaille@gostai.com>
3590
3591 Update the variant example.
3592 * examples/variant.yy: Formatting changes.
3593 One stage build.
3594
3595 2008-11-10 Akim Demaille <demaille@gostai.com>
3596
3597 Support constructor with an argument.
3598 This improves the "list" bench by 2%.
3599
3600 * data/lalr1.cc (variant::build): Add an overloaded version with
3601 an argument.
3602 * tests/c++.at (AT_CHECK_VARIANT): Check it.
3603
3604 2008-11-10 Akim Demaille <demaille@gostai.com>
3605
3606 Test variants.
3607 * tests/c++.at (AT_CHECK_VARIANTS): New.
3608 Use it with and without %define assert.
3609
3610 2008-11-10 Akim Demaille <demaille@gostai.com>
3611
3612 Add %precedence support.
3613 Unfortunately it is not possible to reuse the %prec directive. This
3614 is because to please POSIX, we do not require to end the rules with a
3615 semicolon. As a result,
3616
3617 foo: bar %prec baz
3618
3619 is ambiguous: either a rule which precedence is that of baz, or a rule,
3620 and then a declaration of the precedence of the token baz.
3621
3622 * doc/bison.texinfo: Document %precedence.
3623 (Precedence Only): New.
3624 * src/assoc.h, src/assoc.c (precedence_assoc): New.
3625 * src/conflicts.c (resolve_sr_conflict): Support it.
3626 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
3627 Parse it.
3628 * tests/calc.at: Use %precedence for NEG.
3629 * tests/conflicts.at (%precedence does not suffice)
3630 (%precedence suffices): New tests.
3631
3632 2008-11-09 Akim Demaille <demaille@gostai.com>
3633
3634 Make benches in a sub dirs.
3635 * etc/bench.pl.in ($dir): New.
3636 Use it.
3637 Check the use of constructors with an argument.
3638 (bench_variant_parser): Fix.
3639
3640 2008-11-09 Akim Demaille <demaille@gostai.com>
3641
3642 fix eof condition
3643
3644 2008-11-09 Akim Demaille <demaille@gostai.com>
3645
3646 Fix --help.
3647
3648 2008-11-09 Akim Demaille <demaille@gostai.com>
3649
3650 Require the generation of parse-gram.output.
3651 * src/Makefile.am (YACC): Pass --report=all.
3652
3653 2008-11-09 Akim Demaille <demaille@gostai.com>
3654
3655 Formatting changes.
3656
3657 2008-11-09 Akim Demaille <demaille@gostai.com>
3658
3659 Update TODO.
3660 * TODO: Remove obsolete items.
3661 Update others.
3662
3663 2008-11-09 Akim Demaille <demaille@gostai.com>
3664
3665 Enhance bench.pl.
3666 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
3667 (@token, $grammar, $bench): New.
3668 (generate_grammar_variant): Rename as...
3669 (generate_grammar_list): this.
3670 (generate_grammar): Adjust.
3671 (bench_grammar): Rename as...
3672 (bench): this.
3673 Use it in the various bench-marking routines.
3674 (-b, -g): New options.
3675
3676 2008-11-09 Akim Demaille <demaille@gostai.com>
3677
3678 Use a static hierarchy for symbols in the C++ parser.
3679 * data/lalr1.cc (symbol_base_type, symbol_type)
3680 (stack_symbol_type): Make it a static hierarchy.
3681 Adjust dependencies.
3682
3683 2008-11-09 Akim Demaille <demaille@gostai.com>
3684
3685 bench.pl -d, --directive.
3686 * etc/bench.pl.in (@directive): New.
3687 (&bench_grammar): Use it.
3688 (&bench_list_grammar): New, to provide access to the "variant"
3689 grammar.
3690 Use it.
3691 (getopts): Support -d, --directive.
3692
3693 2008-11-09 Akim Demaille <demaille@gostai.com>
3694
3695 Use inline for small operations.
3696 * data/lalr1.cc (symbol_base_type, symbol_type)
3697 (stack_symbol_type): Declare constructor and other operations as
3698 inline.
3699 (yy_destroy_): Inline.
3700
3701 2008-11-09 Akim Demaille <demaille@gostai.com>
3702
3703 Introduce a hierarchy for symbols.
3704 * data/lalr1.cc (symbol_base_type, symbol_type): New.
3705 (data_type): Rename as...
3706 (stack_symbol_type): this.
3707 Derive from symbol_base_type.
3708 (yy_symbol_value_print_): Merge into...
3709 (yy_symbol_print_): this.
3710 Rename as...
3711 (yy_print_): this.
3712 (yydestruct_): Rename as...
3713 (yy_destroy_): this.
3714 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
3715 (parser::parse): yyla is now of symbol_type.
3716 Use its type member instead of yytoken.
3717
3718 2008-11-09 Akim Demaille <demaille@gostai.com>
3719
3720 Rename data_type and stack_symbol_type.
3721 * data/lalr1.cc (data_type): Rename as...
3722 (stack_symbol_type): this.
3723
3724 2008-11-09 Akim Demaille <demaille@gostai.com>
3725
3726 Handle semantic value and location together.
3727 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
3728 yydata.value and yydata.location.
3729 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
3730 (YY_SYMBOL_PRINT): Now take semantic value and location as a
3731 single arg.
3732 Adjust all callers.
3733 (yydestruct_): New overload for a stack symbol.
3734
3735 2008-11-09 Akim Demaille <demaille@gostai.com>
3736
3737 Push a complete symbol, not connected parts.
3738 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
3739 state, value and location.
3740 Adjust callers.
3741
3742 2008-11-09 Akim Demaille <demaille@gostai.com>
3743
3744 Agregate yylval and yylloc.
3745 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
3746 (parser::yyla): this.
3747
3748 2008-11-09 Akim Demaille <demaille@gostai.com>
3749
3750 Rely on the state stack to display reduction traces.
3751 To display rhs symbols before a reduction, we used information
3752 about the rule reduced, which required the tables yyrhs and
3753 yyprhs. Now use rely only on the state stack to get the same
3754 information.
3755
3756 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
3757 Use them.
3758 (parser::yyrhs_, parser::yyprhs_): Remove.
3759 (parser::yy_reduce_print_): Use the state stack.
3760
3761 2008-11-09 Akim Demaille <demaille@gostai.com>
3762
3763 Fuse yyval and yyloc into yylhs.
3764 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
3765 yylhs.
3766 (parse): Replace yyval and yyloc with yylhs.value and
3767 yylhs.location.
3768 After a user action, compute yylhs.state earlier.
3769 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
3770 fresh error_token.
3771
3772 2008-11-09 Di-an Jan <dianj@freeshell.org>
3773
3774 Remove unused variable.
3775 * src/output.c (type_names_output): Remove unused variable sep.
3776
3777 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
3778
3779 Change tests/output.at quoting.
3780 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
3781 expanding arguments.
3782
3783 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3784
3785 Don't add a semicolon to actions for %skeleton or %language.
3786 It breaks Java test cases as reported by Akim Demaille.
3787 * src/scan-code.l: Implement.
3788
3789 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3790
3791 Clean up %skeleton and %language priority implementation.
3792 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3793 remove static qualifier because others will soon need to see it.
3794 (language_prio): Likewise.
3795 (getargs): Use command_line_prio rather than 0.
3796 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3797 enum fields.
3798 (skeleton_prio): Extern it.
3799 (language_prio): Extern it.
3800 * src/parse-gram.y: Use grammar_prio rather than 1.
3801
3802 2008-11-07 Akim Demaille <demaille@gostai.com>
3803
3804 Moving push traces into yypush_.
3805 * data/lalr1.cc (yypush_): Now takes a optional trace message.
3806 Adjust all uses.
3807
3808 2008-11-07 Akim Demaille <demaille@gostai.com>
3809
3810 The single-stack C++ parser is now the standard one.
3811 * data/lalr1.cc: Rename as...
3812 * data/lalr1-split.cc: this.
3813 * data/lalr1-fusion.cc: Rename as...
3814 * data/lalr1.cc: this.
3815 * etc/bench.pl.in: Adjust.
3816
3817 2008-11-07 Akim Demaille <demaille@gostai.com>
3818
3819 Avoid empty-if warnings.
3820 Reported by Quentin Hocquet.
3821
3822 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
3823 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
3824
3825 2008-11-07 Akim Demaille <demaille@gostai.com>
3826
3827 Pass command line location to skeleton_arg and language_argmatch.
3828 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
3829 The location argument is now mandatory.
3830 Adjust all dependencies.
3831 (getargs): Use command_line_location.
3832
3833 2008-11-07 Akim Demaille <demaille@gostai.com>
3834
3835 -D, --define.
3836 * src/getargs.c (usage): Document -D.
3837 Fix help string for --locations.
3838 (command_line_location): New.
3839 (short_options, long_options, getargs): Support -D, --define.
3840 (getargs): Move -d support at the right place.
3841 * doc/bison.texinfo (Bison Options): Update.
3842 * tests/input.at (%define, --define): New.
3843
3844 2008-11-07 Akim Demaille <demaille@gostai.com>
3845
3846 Initialize the muscle table before parsing the command line.
3847 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
3848 (getargs): Define file_name.
3849 * src/main.c (main): Initialize muscle_tab before calling
3850 getargs.
3851 * src/muscle_tab.c (muscle_init): No longer define file_name, as
3852 its value is not available yet.
3853
3854 2008-11-07 Akim Demaille <demaille@gostai.com>
3855
3856 Locations without columns for command line arguments.
3857 * src/location.c (location_print): Don't display negative columns.
3858 * src/location.h: Document this.
3859
3860 2008-11-07 Akim Demaille <demaille@gostai.com>
3861
3862 Fix --help.
3863 * src/getargs.c (usage): Fix help string for -W.
3864
3865 2008-11-07 Akim Demaille <demaille@gostai.com>
3866
3867 Handle more general types of option arguments.
3868 * build-aux/cross-options.pl: The argument ends at the first
3869 space, not the first non-symbol character.
3870 Use @var for each word appearing the argument description.
3871
3872 2008-11-07 Akim Demaille <demaille@gostai.com>
3873
3874 Destroy the variants that remain on the stack in case of error.
3875 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
3876 destructor.
3877 Display the value only if yymsg is nonnull.
3878 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
3879
3880 2008-11-07 Akim Demaille <demaille@gostai.com>
3881
3882 Add "%define assert" to variants.
3883 This is used to help the user catch cases where some value gets
3884 ovewritten by a new one. This should not happen, as this will
3885 probably leak.
3886
3887 Unfortunately this uncovered a bug in the C++ parser itself: the
3888 lookahead value was not destroyed between two calls to yylex. For
3889 instance if the previous lookahead was a std::string, and then an int,
3890 then the value of the std::string was correctly taken (i.e., the
3891 lookahead was now an empty string), but std::string structure itself
3892 was not reclaimed.
3893
3894 This is now done in variant::build(other&) (which is used to take the
3895 value of the lookahead): other is not only stolen from its value, it
3896 is also destroyed. This incurs a new performance penalty of a few
3897 percent, and union becomes faster again.
3898
3899 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
3900 (b4_variant_if): New.
3901 (variant::built): New.
3902 Use it whereever the status of the variant changes.
3903 * etc/bench.pl.in: Check the penalty of %define assert.
3904
3905 2008-11-07 Akim Demaille <demaille@gostai.com>
3906
3907 Use "%define variant" in bench.pl.
3908 * etc/bench.pl.in: No longer use the pseudo directive %variants,
3909 just use %define variants.
3910
3911 2008-11-07 Akim Demaille <demaille@gostai.com>
3912
3913 Regen.
3914 * src/parse-gram.h, src/parse-gram.c: Regen.
3915
3916 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3917
3918 Fix user actions without a trailing semicolon.
3919 Reported by Sergei Steshenko at
3920 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3921 * THANKS (Sergei Steshenko): Add.
3922 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3923 * tests/regression.at (Fix user actions without a trailing semicolon):
3924 New test case.
3925
3926 2008-11-04 Akim Demaille <demaille@gostai.com>
3927
3928 Use b4_copyright_years.
3929 * data/yacc.c (b4_copyright_years): New.
3930 Fix its value according to the comments in the file.
3931 Use it and undefine it.
3932
3933 2008-11-04 Akim Demaille <demaille@gostai.com>
3934
3935 Formatting changes.
3936 * data/lalr1-fusion.cc, src/parse-gram.y: here.
3937
3938 2008-11-04 Akim Demaille <demaille@gostai.com>
3939
3940 Formatting changes.
3941 * data/lalr1-fusion.cc: here.
3942
3943 2008-11-04 Akim Demaille <demaille@gostai.com>
3944
3945 Use strict on bench.pl.
3946 * etc/bench.pl.in (&run, &generate_grammar): New.
3947 Rename the grammar generating functions for consistency.
3948 Change the interface so that the list of benches to run is passed
3949 as (optionless) arguments.
3950 (&compile): Use &run.
3951
3952 2008-11-04 Akim Demaille <demaille@gostai.com>
3953
3954 Remove spurious initial empty lines.
3955 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3956 * data/yacc.c: End the @output lines with an @.
3957
3958 2008-11-04 Akim Demaille <demaille@gostai.com>
3959
3960 Improve the display of sizes.
3961 * etc/bench.p.in: Higher precision.
3962 Sort by decreasing size.
3963
3964 2008-11-04 Akim Demaille <demaille@gostai.com>
3965
3966 Don't memcpy C++ structures.
3967 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
3968 arguments.
3969 (variant::build): New overload for
3970 copy-construction-that-destroys.
3971 (variant::swap): New.
3972 (parser::yypush_): Use it in variant mode.
3973
3974 2008-11-04 Akim Demaille <demaille@gostai.com>
3975
3976 Better defaults for bench.pl.
3977 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
3978 default values.
3979 Adjust &verbose uses.
3980 (-q, --quiet): New.
3981
3982 2008-11-04 Akim Demaille <demaille@gostai.com>
3983
3984 Make variant.yy more complex.
3985 std::list cannot be copied via memcpy, they are more demanding than
3986 std::string. Use one std::list to strengthen the test.
3987
3988 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
3989 Adjust.
3990 Create a list of strings, instead of a single large string.
3991
3992 2008-11-04 Akim Demaille <demaille@gostai.com>
3993
3994 bench.pl --bench.
3995 * etc/bench.pl.in (--bench, $bench): New.
3996
3997 2008-11-04 Akim Demaille <demaille@gostai.com>
3998
3999 Sort methods.
4000 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
4001 Define it after as().
4002
4003 2008-11-04 Akim Demaille <demaille@gostai.com>
4004
4005 Useless parens.
4006 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
4007
4008 2008-11-04 Akim Demaille <demaille@gostai.com>
4009
4010 Issue missing synclines after user actions.
4011 * data/c.m4 (b4_case): Issue synclines on the output file.
4012
4013 2008-11-04 Akim Demaille <demaille@gostai.com>
4014
4015 Remove trailing empty line.
4016 * data/lalr1-fusion.cc: Don't add an empty line after the user's
4017 epilogue.
4018
4019 2008-11-04 Akim Demaille <demaille@gostai.com>
4020
4021 Fix output of copyright years.
4022 * data/bison.m4 (b4_copyright): Fix the indentation of the
4023 copyright year paragraph.
4024 Use b4_copyright_years when no years are given.
4025 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
4026 (b4_copyright_years): New.
4027 Use it.
4028
4029 2008-11-04 Akim Demaille <demaille@gostai.com>
4030
4031 Avoid the spurious initial empty line.
4032 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
4033 the end of @output request to suppress the empty line that
4034 results.
4035
4036 2008-11-04 Akim Demaille <demaille@gostai.com>
4037
4038 Remove parser::rhs_number_type.
4039 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
4040 (yyrhs_): Use b4_table_define.
4041
4042 2008-11-04 Akim Demaille <demaille@gostai.com>
4043
4044 Fix iteration type.
4045 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
4046
4047 2008-11-04 Akim Demaille <demaille@gostai.com>
4048
4049 Factor the declaration of the integer tables.
4050 * data/lalr1-fusion.cc (b4_table_define): New.
4051 Use it.
4052
4053 2008-11-03 Akim Demaille <demaille@gostai.com>
4054
4055 Fix indentation of tables in lalr1.cc
4056 * data/lalr1-fusion.cc: Fix the indentation.
4057
4058 2008-11-03 Akim Demaille <demaille@gostai.com>
4059
4060 Destroy the lhs symbols after reduction.
4061 * data/lalr1-fusion.cc (parse): After the user action, when in
4062 variant mode, destroy the lhs symbols.
4063
4064 2008-11-03 Akim Demaille <demaille@gostai.com>
4065
4066 Simplify yysyntax_error_ use.
4067 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
4068 type, but make it unnamed in the declaration when it is not used.
4069
4070 2008-11-03 Akim Demaille <demaille@gostai.com>
4071
4072 Let yy::variant::build return an lvalue.
4073 * data/lalr1-fusion.cc (variant::build): Return a reference to the
4074 object.
4075
4076 2008-11-03 Akim Demaille <demaille@gostai.com>
4077
4078 Define yy::variant only when needed.
4079 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
4080 used.
4081
4082 2008-11-03 Akim Demaille <demaille@gostai.com>
4083
4084 Bench the three-stack lalr1.cc.
4085 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
4086 one-stack one.
4087
4088 2008-11-03 Akim Demaille <demaille@gostai.com>
4089
4090 Fail on parse error in calc++.
4091 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4092 status.
4093 * examples/calc++/test ($me, $number, $exit, run): New.
4094 Use them to propagate errors to the exit status.
4095
4096 2008-11-03 Akim Demaille <demaille@gostai.com>
4097
4098 Don't specify the skeleton twice in the example.
4099 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4100 file does what is needed.
4101
4102 2008-11-03 Akim Demaille <demaille@gostai.com>
4103
4104 bench: Improve output.
4105 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4106
4107 2008-11-03 Akim Demaille <demaille@gostai.com>
4108
4109 bench: check impact of %debug on variants.
4110 * etc/bench.pl.in (variant_grammar): Fix the computation of
4111 $variant.
4112 Generate a grammar file that can work with or without %debug.
4113 Do use the @directive.
4114 (bench_variant_parser): Check impact of %debug.
4115 (@directives): Rename all the occurrences to...
4116 (@directive): this, for consistency.
4117
4118 2008-11-03 Akim Demaille <demaille@gostai.com>
4119
4120 bench: report the size too.
4121 * etc/bench.pl.in ($iterations): Defaults to -3.
4122 (&bench_grammar): Require hireswallclock.
4123 Compute and display the size of the result.
4124 More comments.
4125
4126 2008-11-03 Akim Demaille <demaille@gostai.com>
4127
4128 bench: More use of the verbosity level.
4129 * etc/bench.pl.in ($verbose, &verbose): New.
4130 Use them.
4131 More POD documentation.
4132
4133 2008-11-03 Akim Demaille <demaille@gostai.com>
4134
4135 bench.pl: a command line interface
4136 * etc/bench.pl.in: More doc.
4137 Some fixes in the documentation.
4138 ($cflags, $iterations, &help, &getopt): New.
4139 Use them.
4140 (&variant_grammar): Let the number of stages be 10 times what is
4141 specified.
4142
4143 2008-11-03 Akim Demaille <demaille@gostai.com>
4144
4145 Bench the use of Boost.Variants.
4146 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4147 New.
4148 (&compile): Be ready to compile C++ parsers.
4149 (&bench_push_parser): Move debug information to the outermost
4150 level.
4151 * THANKS: Add Michiel De Wilde.
4152
4153 2008-11-03 Akim Demaille <demaille@gostai.com>
4154
4155 bench.pl: Pass directives as a list instead of as a string.
4156 * etc/bench.pl.in (&directives): New.
4157 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4158 directives.
4159 (&triangular_grammar): Do use the directives (were ignored).
4160 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4161 directives.
4162
4163 2008-11-03 Akim Demaille <demaille@gostai.com>
4164
4165 Improve genericity of bench.pl.
4166 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4167 argument.
4168 (&bench_push_parser): New.
4169 Call it.
4170
4171 2008-11-03 Akim Demaille <demaille@gostai.com>
4172
4173 Add documentation to bench.pl.
4174 * etc/bench.pl.in: Comment changes.
4175
4176 2008-11-03 Akim Demaille <demaille@gostai.com>
4177
4178 Fuse the three stacks into a single one.
4179
4180 In order to make it easy to perform benchmarks to ensure that
4181 there are no performance loss, lalr1.cc is forked into
4182 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4183 lalr1.cc.
4184
4185 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4186 exercized by the test suite, the user must install a symbolic link
4187 from lalr1.cc to it.
4188
4189 Instead of having three stacks (state, value, location), use a
4190 stack of triples. This considerably simplifies the code (and it
4191 will be easier not to require locations as currently does the C++
4192 parser), and also gives a 10% speedup according to
4193 etc/bench (probably mainly since memory allocation is done once
4194 instead of three times).
4195
4196 Another motivation is to make it easier to destruct properly
4197 semantic values: now that they are bound to their state (hence
4198 symbol type) it will be easier to call the appropriate destructor.
4199
4200 These changes should probably benefit the C parser too.
4201
4202 * data/lalr1.cc: Copy as...
4203 * data/lalr1-fusion.cc: this new file.
4204 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4205 from c++.m4.
4206 (state_stack_type, semantic_stack_type, location_stack_type)
4207 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4208 (data_type, stack_type, yystack_): New.
4209 (YYLLOC_DEFAULT, yypush_): Adjust.
4210 (yyerror_range): Now based on data_type, not location_type.
4211
4212 2008-11-03 Akim Demaille <demaille@gostai.com>
4213
4214 Push the state, value, and location at the same time.
4215 This is needed to prepare a forthcoming patch that fuses the three
4216 stacks into one.
4217
4218 * data/lalr1.cc (parser::yypush_): New.
4219 (parser::yynewstate): Change the semantics: instead of arriving to
4220 this label when value and location have been pushed, but yystate
4221 is to be pushed on the state stack, now the three of them must
4222 have been pushed before. yystate still must be the new state.
4223 This allows to use yypush_ everywhere instead of individual
4224 handling of the stacks.
4225
4226 2008-11-03 Akim Demaille <demaille@gostai.com>
4227
4228 Prefer references to pointers.
4229 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4230 definition to use references instead of pointers.
4231 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4232 Take the value and location as references.
4233 Adjust callers.
4234
4235 2008-11-03 Akim Demaille <demaille@gostai.com>
4236
4237 stack::size instead of stack::height.
4238 * data/lalr1.cc (stack::height): Rename as...
4239 (stack::size): this.
4240 Fix the output type.
4241 Comment changes.
4242
4243 2008-11-03 Akim Demaille <demaille@gostai.com>
4244
4245 Use variants to support objects as semantic values.
4246 This patch was inspired by work by Michiel De Wilde. But he used
4247 Boost variants which (i) requires Boost on the user side, (ii) is
4248 slow, and (iii) has useless overhead (the parser knows the type of
4249 the semantic value there is no reason to duplicate this
4250 information as Boost.Variants do).
4251
4252 This implementation reserves a buffer large enough to store the
4253 largest objects. yy::variant implements this buffer. It was
4254 implemented with Quentin Hocquet.
4255
4256 * src/output.c (type_names_output): New.
4257 (output_skeleton): Invoke it.
4258 * data/c++.m4 (b4_variant_if): New.
4259 (b4_symbol_value): If needed, provide a definition for variants.
4260 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4261 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4262 (b4_char_sizeof, yy::variant): New.
4263 (parser::parse): If variants are requested, define
4264 parser::union_type, parser::variant, change the definition of
4265 semantic_type, construct $$ before running the user action instead
4266 of performing a default $$ = $1.
4267 * examples/variant.yy: New.
4268 Based on an example by Michiel De Wilde.
4269
4270 2008-11-03 Akim Demaille <demaille@gostai.com>
4271
4272 Parameterize the extraction of semantic values.
4273 To make future changes easier, no longer rely on ".TYPE" being the
4274 way to get a semantic value.
4275
4276 * data/c.m4 (b4_symbol_value): New.
4277 Use it.
4278 * data/c++.m4, data/yacc.c: Use it.
4279 * data/glr.c: Use b4_symbol_value.
4280 (b4_rhs_data): New.
4281 Use it.
4282
4283 2008-11-03 Akim Demaille <demaille@gostai.com>
4284
4285 Prepare easier M4 changes.
4286 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4287 future changes.
4288
4289 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4290
4291 Initiate further development.
4292 * NEWS: Create an empty section for new entries.
4293 * gnulib: Update submodule to HEAD.
4294
4295 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4296
4297 * NEWS: Version 2.4.
4298
4299 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4300
4301 Prepare for next release.
4302 * NEWS: Briefly mention changes since 2.3b.
4303 * README: Say GNU m4 1.4.6, which we've been requiring in release
4304 announcements already, not 1.4.3, which breaks the build.
4305
4306 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4307
4308 Say %language is experimental.
4309 We're thinking of extending it's effect on output file naming. See the
4310 thread at
4311 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4312 * NEWS: Say it's experimental.
4313 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4314 recommend it over %skeleton for now.
4315 (Bison Options): Likewise.
4316 (C++ Bison Interface): Use %skeleton not %language.
4317 (Calc++ Parser): Use %skeleton not %language.
4318 * src/getargs.c (usage): Say it's experimental.
4319
4320 2008-11-01 Di-an Jan <dianj@freeshell.org>
4321 Paolo Bonzini <bonzini@gnu.org>
4322
4323 Support all Java parser class modifiers.
4324 * data/java.m4 (b4_percent_define_get3): New.
4325 (b4_final_if, b4_strictfp_if): New.
4326 * data/lalr1.java (final, strictfp, extends, implements): Support.
4327 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4328 documentation.
4329 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4330 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4331 (AT_CHECK_JAVA_GREP): New.
4332 (Java parser class modifiers): New test.
4333 (Java parser class extends and implements): New test.
4334
4335 Model exception propagation better with throws and lex_throws.
4336 * data/java.m4 (b4_list2): New.
4337 (throws): Change default.
4338 * data/lalr1.java (yyaction): Add throws.
4339 (parse): Add lex_throws in addition to throws.
4340 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4341 * tests/java.at (Java throws specifications): New test.
4342
4343 Improve documentation for Java parsers.
4344 * doc/bison.texinfo (Java Parsers): Add subsections.
4345 Don't quote first argument of %define.
4346 (Java Bison Interface): Document output files. Move documentation
4347 of parser class and merge into Java Parser Interface. Document
4348 features that error out. Document directives with no effect.
4349 Move note about Javadoc higher.
4350 (Java Semantic Values): Explicitly mention stype.
4351 Document that generic types cannot be used.
4352 (Java Location Values): Use @deftypeivar. Document constructors.
4353 Correct return value for toString.
4354 (Java Parser Interface): List undocumented constants/fields.
4355 Move documentation of fields added by %parse-param closer to list
4356 of members. Document that token names are added as fields.
4357 Document constructors accurately. Remove error method.
4358 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4359 Interface. Describe %code lexer and yylex accutately.
4360 Remove documentation that does not match the code.
4361 (Java Action Features): New.
4362 (Java Differences): Add reference. Add item on semantic values.
4363 Add note about @{ ... @}. Clarify %% epilogue placement.
4364 (Java Declarations Summary): New.
4365
4366 Fix Java skeleton.
4367 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4368 (b4_remove_comma): Quote test argument.
4369 (b4_identification): Remove "bison" field.
4370 * tests/java.at (Java parser class and package names): New test.
4371 (Java %parse-param and %lex-param): New test.
4372 (Java stype, position_class and location_class): New test.
4373
4374 2008-10-31 Di-an Jan <dianj@freeshell.org>
4375
4376 * data/lalr1.jave: Update copyright years.
4377 (YYParser): Correct name of "generated from" file in Javadoc:
4378 use b4_file_name instead of @ofile@.
4379 (Location constructor): Correct Javadoc parameter name.
4380 (yylloc): Add missing opening m4 quote after b4_location_if.
4381 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4382 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4383 (YYParser constructor): Correct Javadoc parameter name.
4384
4385 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4386
4387 Always put auxiliary code files in the same dir as other output files.
4388 * src/files.c (compute_file_name_parts): When the user specifies
4389 --output but not --file-prefix, extract the directory prefix from the
4390 file prefix not from the grammar file name. This affects the location
4391 of files like location.hh generated by the C++ skeleton. The includes
4392 in the other output files require this fix.
4393 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4394 for expected output files.
4395 (Output files): Add a test for the above.
4396
4397 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4398
4399 * gnulib: Update submodule to HEAD.
4400
4401 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4402
4403 Update copyright year.
4404 * src/files.c: Here.
4405
4406 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4407
4408 Don't overwrite the input file.
4409 * src/files.c (output_file_name_check): Fatal error if using input file
4410 for output.
4411 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4412 argument.
4413 (Conflicting output files): Add test.
4414
4415 2008-10-28 Akim Demaille <demaille@gostai.com>
4416
4417 Space changes.
4418 * data/lalr1.cc: Formatting changes.
4419
4420 2008-10-28 Akim Demaille <demaille@gostai.com>
4421
4422 Don't define debugging functions when !YYDEBUG.
4423 * data/lalr1.cc (debug_stream, set_debug_stream)
4424 (debug_level_type, debug_level, set_debug_level): Don't
4425 declare them when YYDEBUG is not defined.
4426 The implementation are already YYDEBUG-aware.
4427
4428 2008-10-28 Akim Demaille <demaille@gostai.com>
4429
4430 Prefer "continue" for empty loop bodies.
4431 * etc/bench.pl.in: Use "continue" instead of {}.
4432
4433 2008-10-28 Akim Demaille <demaille@gostai.com>
4434
4435 Space and comments changes.
4436 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4437 * data/c.m4, data/lalr1.cc: Space changes.
4438
4439 2008-10-28 Akim Demaille <demaille@gostai.com>
4440
4441 Make gnulib a submodule.
4442 * gnulib: New.
4443 * .gitmodules (gnulib): New.
4444
4445 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4446
4447 Fix yyerror_range for user-defined location type in C++. Reported by
4448 Georg Sauthoff at
4449 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4450 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4451 * THANKS (Georg Sauthoff): Add.
4452
4453 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4454
4455 Update several administrative files mainly to facilitate releasing.
4456 * HACKING (Administrivia): Make the git-merge-changelog notes more
4457 helpful.
4458 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4459 (Release Procedure): Update for git and add numerous details that were
4460 previously missing.
4461 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4462 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4463 that announcements don't claim we bootstrapped with whatever bison
4464 happened to be in PATH. Add flex as a bootstrap tool.
4465 * Makefile.maint: Remove, previously replaced by maint.mk.
4466 * Makefile.cfg: Remove, and migrate settings to...
4467 * cfg.mk: ... here for the sake of `make announcement'.
4468 * bootstrap.conf (gnulib_modules): Add announce-gen.
4469 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4470 Berry.
4471
4472 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4473
4474 Small but important bugfixes for the Java skeleton.
4475 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4476 (yy_symbol_print): Call toString on yyvaluep.
4477
4478 2008-08-29 Akim Demaille <demaille@gostai.com>
4479
4480 Clarify UPDATED use.
4481 * doc/bison.texinfo: It refers to the last edition of this file,
4482 not to the release date of Bison.
4483 Reported by Joel E. Denny.
4484
4485 2008-08-29 Akim Demaille <demaille@gostai.com>
4486
4487 * README: Update FAQ pointer.
4488 Reported by Joel E. Denny.
4489
4490 2008-08-27 Eric Blake <ebb9@byu.net>
4491
4492 Resync m4sugar from autoconf.
4493 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4494 (m4_init): Adjust to latest m4.git changes.
4495 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4496 effects.
4497 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4498 (_m4_list_cmp): Reduce side effects.
4499
4500 2008-08-27 Akim Demaille <demaille@gostai.com>
4501
4502 Check yyerrok in calc.at.
4503 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4504 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4505 expected.
4506
4507 2008-08-27 Akim Demaille <demaille@gostai.com>
4508
4509 Support yyerrok in lalr1.cc.
4510 YYBACKUP is still to import back into lalr1.cc.
4511 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4512
4513 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4514
4515 For maintainer-check*, don't recompile for a $(VERSION) update.
4516 * cfg.mk: New file.
4517 (_is-dist-target): Override the one in GNUmakefile.
4518 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4519
4520 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4521
4522 Update for recent change to gnulib.
4523 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4524 string.h now.
4525
4526 2008-08-15 Eric Blake <ebb9@byu.net>
4527
4528 Remaining m4sugar merge from autoconf.
4529 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4530 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4531 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4532 * src/output.c (output_skeleton): Tell m4 how to find it.
4533
4534 Partial m4sugar merge from autoconf: m4_map.
4535 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4536 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4537 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4538 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
4539 for empty list.
4540 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
4541 Likewise.
4542 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
4543 declares it.
4544
4545 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
4546
4547 Keep .version and PACKAGE_VERSION in sync.
4548 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
4549 dependency, and add comments justifying this in more detail. Discussed
4550 starting at
4551 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
4552
4553 2008-08-06 Eric Blake <ebb9@byu.net>
4554
4555 Partial m4sugar merge from autoconf: m4_shiftn.
4556 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
4557 (m4_shift2, m4_shift3): New macros.
4558 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
4559 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
4560 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
4561 * data/java.m4 (b4_remove_comma): Likewise.
4562
4563 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
4564 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
4565 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
4566 (m4_init): Consolidate wrapped text into single m4_wrap.
4567 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
4568 in wrapped text.
4569
4570 2008-08-05 Eric Blake <ebb9@byu.net>
4571
4572 Partial m4sugar merge from autoconf: builtins, version.m4.
4573 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
4574 (m4_prepend): Remove, as it is unused and inherently quadratic,
4575 whereas m4_append is linear in newer m4.
4576 (m4_mkstemp): New builtin.
4577 (m4_symbols): Make rename conditional.
4578 (m4_version_prereq): Ensure fatal error if used in bison, which
4579 intentionally lacks version.m4.
4580
4581 Fix comments in m4sugar.
4582 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
4583
4584 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4585
4586 Update for recent .gitignore fix in Gnulib.
4587 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
4588 anchored .gitignore entries.
4589
4590 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4591
4592 Set gnu or gnits strictness.
4593 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
4594 development and gnits strictness for releases. Based on Eric Blake's
4595 suggestion at
4596 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
4597
4598 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4599
4600 * NEWS: Clarify documentation of %language.
4601
4602 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4603
4604 Support usage of git-merge-changelog.
4605 * .gitattributes: New.
4606 * HACKING: Document usage of git-merge-changelog.
4607 * bootstrap: Install git-merge-changelog entries in .git/config
4608 if appropriate.
4609
4610 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4611
4612 Remove remaining dependence on CVS Id keyword.
4613 * ChangeLog: For the sake of people still using CVS, don't use dollars
4614 when mentioning Id.
4615 * data/xslt/bison.xsl: Remove Id from header comments, where it was
4616 unusual anyway.
4617 * data/xslt/xml2dot.xsl: Likewise.
4618 * data/xslt/xml2text.xsl: Likewise.
4619 * data/xslt/xml2xhtml.xsl: Likewise.
4620 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
4621 * doc/Makefile.am (neutralize): Remove, no longer needed.
4622 (.x.1): Don't use neutralize.
4623 (edit): Don't substitute for ID.
4624 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
4625
4626 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4627
4628 Fix dependence on computed configure variables.
4629 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
4630 $(top_srcdir)/configure.ac so that changes to computed variables, such
4631 as PACKAGE_VERSION, are seen.
4632 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
4633
4634 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
4635
4636 Update copyright dates for recent changes.
4637 * Makefile.am: Here.
4638 * src/Makefile.am: Here.
4639 * src/reduce.c: Here.
4640 * tests/reduce.at: Here.
4641
4642 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
4643
4644 Use git-version-gen for version names between releases.
4645 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
4646 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
4647 * .prev-version: New.
4648 * .version.in: Remove.
4649 * ChangeLog: Remove the Id previously used for capturing the CVS
4650 revision.
4651 * GNUmakefile: Remove, now copied from Gnulib.
4652 * Makefile.am: Add code suggested by comments in
4653 build-aux/git-version-gen.
4654 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
4655 .prev-version, and .version.
4656 * NEWS (2.3b+): Rename to...
4657 (?.?): ... this because we're dropping the "+" version naming scheme,
4658 but, in general, we still can't be sure of our next release name.
4659 * bootstrap: Add a quick hack to remove from .gitignore the
4660 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
4661 entry. This should really be fixed in gnulib instead.
4662 * bootstrap.conf (gnulib_modules): Add gnumakefile.
4663 * configure.ac (AC_INIT): Set version name by invoking
4664 build-aux/git-version-gen.
4665 (AC_CONFIG_FILES): Remove .version, now generated by
4666 build-aux/git-version-gen.
4667 * maint.mk: New, copied from coreutils.
4668 * doc/.cvsignore (bison.1): Add.
4669 * doc/.gitignore (/bison.1): Add.
4670 * doc/bison.1: Remove, generated.
4671 * src/.cvsignore (revision.c): Remove.
4672 * src/.gitignore (/revision.c): Remove.
4673 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
4674 (BUILT_SOURCES): Remove revision.c.
4675 (revision.c): Remove.
4676 * src/getargs.c (version): Don't print revision after the VERSION.
4677 * src/revision.h: Remove.
4678
4679 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4680
4681 Fix untranslatable composition of sentences. Reported by Goran
4682 Uddeborg at
4683 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
4684 * THANKS (Goran Uddeborg): Add.
4685 * src/reduce.c (reduce_print): Report the number of nonterminals and
4686 rules useless in the grammar in separate sentences.
4687 * tests/reduce.at (Useless Rules): Update output.
4688 (Reduced Automaton): Likewise.
4689 (Underivable Rules): Likewise.
4690 (Empty Language): Likewise.
4691
4692 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4693
4694 Fix some .gitignore and .cvsignore problems.
4695 * bootstrap (insert_sorted_if_absent): Replace all uses with...
4696 (insert_vc_ignore): ... this new function, which prepends `/' to all
4697 .gitignore entries before passing them to insert_sorted_if_absent.
4698 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
4699 .cvsignore files are maintained even though Bison developers run
4700 bootstrap while using Git.
4701 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
4702 unneeded by Bison.
4703 (gnulib): Add.
4704 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
4705 unneeded. Reported by Eric Blake.
4706 * lib/.gitignore (/*~): Add.
4707 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
4708 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
4709 Blake.
4710 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
4711
4712 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4713
4714 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
4715 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
4716 * bootstrap.conf (gnulib_modules): Add unsetenv.
4717 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
4718 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
4719 (/setenv.m4): Add.
4720 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
4721 the first argument because it may become position-dependent, and unset
4722 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
4723 Add comments explaining these issues in more detail.
4724
4725 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
4726
4727 Add .gitignore everywhere based on .cvsignore.
4728 * .gitignore: New.
4729 * build-aux/.gitignore: New.
4730 * data/.gitignore: New.
4731 * doc/.gitignore: New.
4732 * etc/.gitignore: New.
4733 * examples/.gitignore: New.
4734 * examples/calc++/.gitignore: New.
4735 * lib/.gitignore: New.
4736 * m4/.gitignore: New.
4737 * po/.gitignore: New.
4738 * runtime-po/.gitignore: New.
4739 * src/.gitignore: New.
4740 * tests/.gitignore: New.
4741
4742 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4743
4744 * NEWS (2.3b+): New section, empty for now.
4745 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
4746
4747 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4748
4749 * NEWS (2.3b): Update release date since there has been a delay in
4750 getting the announcements and tarballs out.
4751
4752 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4753
4754 * NEWS: Version 2.3b.
4755 * configure.ac (AC_INIT): Likewise.
4756 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
4757
4758 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4759
4760 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
4761 been doing it for years.
4762 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
4763 (Release Procedure): Add FIXME about make alpha being unmaintained.
4764
4765 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
4766
4767 * data/yacc.c: Reformat m4 a little for readability.
4768 * src/lalr.c (build_relations): Correct comment.
4769
4770 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4771
4772 DJGPP specific issue.
4773 * djgpp/config.sed: Fixes required to run configure scripts generated
4774 by autoconf 2.62.
4775
4776 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4777
4778 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
4779 coordinator@translationproject.org.
4780
4781 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4782
4783 * THANKS: Add Eric Blake.
4784
4785 2008-04-23 Eric Blake <ebb9@byu.net>
4786
4787 Revert prior patch, by working around autoconf regression.
4788 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
4789 ("Output file name: ("): Uncomment test.
4790 ("Output file name: )"): Likewise.
4791 Based on an idea from Noah Misch.
4792
4793 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4794
4795 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
4796 2.61. Reported by Juan Manuel Guerrero at
4797 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
4798 * tests/output.at ("Output file name: ("): Comment out test case for
4799 now.
4800 ("Output file name: )"): Likewise.
4801
4802 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4803
4804 * GNUmakefile: Update git-version-gen invocation so make dist
4805 succeeds.
4806
4807 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4808
4809 Update to the current gnulib CVS repository, and fix trigraph handling
4810 in Bison.
4811 * bootstrap: Update gnulib CVS repository URL.
4812 (symlink_to_dir): Encapsulate the code that guarantees the destination
4813 directory exists into...
4814 (check_dst_dir): ... this new function, and...
4815 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
4816 fail when copying files into lib/uniwidth/.
4817 * src/output.c (prepare_symbols): When writing yytname muscles, where
4818 symbol names will be encoded in C-string literals, tell quotearg to
4819 escape trigraphs. This used to be the default in gnulib.
4820 * tests/regression.at (Token definitions): Because of the change in
4821 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
4822 escapes trigraphs in symbol names. Thus, yytname no longer has
4823 trigraphs unnecessarily doubly escaped. Update test case output.
4824 Extend test case to be sure Bison's own error messages will no longer
4825 have trigraphs in symbol names unnecessarily escaped once.
4826
4827 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
4828
4829 Fix make dist infinite loop reported by Juan Manuel Guerrero at
4830 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
4831 * .cvsignore: Add .version.
4832 * .version.in: New.
4833 * bootstrap.conf (gnulib_modules): Add git-version-gen.
4834 * configure.ac (AC_CONFIG_FILES): Add .version.
4835 * build-aux/.cvsignore: Add git-version-gen.
4836
4837 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4838
4839 * NEWS (2.3a+): Mention that -g now takes an argument.
4840 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
4841 consistency. Update the -g and -x entries now that they take
4842 arguments. Use brackets to indicate optional arguments.
4843 * src/getargs.c (usage): Explain the relationship between arguments of
4844 long and short options more completely. Document --defines and -d
4845 separately since the former takes an argument but, for POSIX Yacc, the
4846 latter does not.
4847 (short_options): Let -W take an optional argument like --warnings.
4848 (getargs): Sort cases.
4849
4850 2008-02-28 Akim Demaille <demaille@gostai.com>
4851
4852 * doc/bison.texinfo: Fix a few typos.
4853
4854 2008-02-28 Akim Demaille <akim@epita.fr>
4855
4856 * doc/bison.texinfo (Bison Options): Document -W.
4857 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
4858
4859 2008-02-28 Akim Demaille <akim@epita.fr>
4860
4861 * src/getargs.c (short_options): Split and sort for readability.
4862 -g and -x take optional arguments, just like their long options.
4863 * build-aux/cross-options.pl: Use /x to make the regexp easier to
4864 understand.
4865 Fix the handling of $opt which resulted in all the argument to be
4866 considered as optional.
4867
4868 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
4869
4870 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
4871 say its interface is experimental.
4872 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4873 Java.
4874 (Bison Options): In the -L and --language entry, mention Java.
4875 (Java Bison Interface): Say the interface is experimental.
4876 * src/getargs.c (usage): Mention -L and --language.
4877
4878 * NEWS (2.3a+): Say the push parsing interface is experimental.
4879 * doc/bison.texinfo (Push Decl): Likewise.
4880 (Decl Summary): Likewise in the "%define api.push_pull" entry.
4881 (Push Parser Function): Likewise.
4882 (Pull Parser Function): Likewise.
4883 (Parser Create Function): Likewise.
4884 (Parser Delete Function): Likewise.
4885 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
4886 yypull_parse, and yypush_parse entries.
4887
4888 * NEWS (2.3a+): Mention XML support, and say the schema is
4889 experimental.
4890 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
4891 * src/getargs.c (usage): Say the XML schema is experimental.
4892
4893 * NEWS (2.3a+): Say option instead of flag.
4894
4895 2008-02-21 Wojciech Polak <polak@gnu.org>
4896
4897 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
4898 text.
4899
4900 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
4901
4902 Fix impure push parser compile error reported by Bob Rossi at
4903 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
4904 * data/yacc.c: Clean up whitespace in the output a little.
4905 (yypstate_allocated): Define for impure push parsers regardless of
4906 whether the pull interface is also requested.
4907 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
4908 check impure push parsers without the pull interface.
4909
4910 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
4911 yyerror takes arguments specified by %parse-param while yypstate_new
4912 does not.
4913 * doc/bison.texinfo (Parser Create Function): Document that
4914 yypstate_new returns 0 for multiple impure parser instances.
4915 * tests/push.at (Push Parsing: Multiple impure instances): Update
4916 expected stderr output.
4917
4918 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4919
4920 * runtime-po/POTFILES.in (push.c): Remove.
4921
4922 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4923
4924 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
4925 * data/push.c: Rename to...
4926 * data/yacc.c: ... this, overwriting it.
4927 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
4928 `%push-pull-parser' -> `%define api.push_pull "both"'.
4929 Remove old yacc.c tests, and update push.c tests to yacc.c.
4930
4931 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4932
4933 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4934 `"%code top" blocks' instead of `%code "top" blocks'.
4935 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
4936 Clean up whitespace in the output a little.
4937
4938 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4939
4940 Fix documentation problems reported by Tim Josling at
4941 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
4942 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
4943 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
4944 integers. Explain the effect of literal string aliases on error
4945 messages. Copy token 0 documentation from the C++ skeleton
4946 documentation.
4947
4948 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4949
4950 Accept a token number in a %left, %right, or %nonassoc for POSIX
4951 conformance. Reported by Tim Josling at
4952 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
4953 * NEWS (2.3a+): Mention.
4954 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
4955 and code numbers are treated by precedence declarations.
4956 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
4957 of symbols.1.
4958 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
4959 of symbol.
4960 (symbol.prec): New, just like symbol but allows INT.
4961 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
4962 longer holds.
4963 * tests/regression.at (Token number in precedence declaration): New
4964 test case.
4965
4966 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4967
4968 DJGPP specific issues.
4969 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
4970 be changed. Copyright timestamp adjusted.
4971 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
4972 be changed. Copyright timestamp adjusted.
4973 * djgpp/config.site: Copyright timestamp adjusted.
4974 * djgpp/config_h.sed: Copyright timestamp adjusted.
4975 * djgpp/djunpack.bat: Copyright timestamp adjusted.
4976 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
4977 filename translation list.
4978 * djgpp/subpipe.c (init_subpipe): Check the environment variables
4979 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
4980 files shall be created. Before trying to use the temp dir where the
4981 environment variable points to check that the dir really exists. If
4982 not default to the cwd as temp dir. Copyright timestamp adjusted.
4983 * djgpp/subpipe.h: Copyright timestamp adjusted.
4984 * djgpp/testsuite.sed: Copyright timestamp adjusted.
4985
4986 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4987
4988 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
4989
4990 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
4991
4992 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
4993 Problem reported by Claudio Saavedra in
4994 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
4995
4996 2008-01-05 Wojciech Polak <polak@gnu.org>
4997
4998 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
4999 document's title with the input grammar file name.
5000
5001 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
5002
5003 Automate regression testing of the XML/XSLT implementation. Discussed
5004 starting at
5005 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
5006 * configure.ac (XSLTPROC): New substitution.
5007 * Makefile.am (maintainer-xml-check): New phony target invoking...
5008 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
5009 invoking make maintainer-check with BISON_TEST_XML=1.
5010 * tests/atlocal.in (XSLTPROC): New.
5011 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
5012 not to report reachable memory when Bison is expected to have a
5013 non-zero exit status and (2) to compare XML/XSLT output with --graph
5014 and --report=all output for every working grammar when
5015 BISON_TEST_XML=1.
5016 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
5017 (AT_BISON_CHECK_XML): New.
5018 (AT_QUELL_VALGRIND): New.
5019 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
5020 (AT_CHECK): ... don't redefine this since this was the old way to
5021 quell Valgrind.
5022 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
5023 AT_BISON_CHECK invocations.
5024 * tests/c++.at: Likewise.
5025 * tests/calc.at: Likewise.
5026 * tests/conflicts.at: Likewise.
5027 * tests/cxx-type.at: Likewise.
5028 * tests/existing.at: Likewise.
5029 * tests/glr-regression.at: Likewise.
5030 * tests/headers.at: Likewise.
5031 * tests/input.at: Likewise.
5032 * tests/java.at: Likewise.
5033 * tests/output.at: Likewise.
5034 * tests/push.at: Likewise.
5035 * tests/reduce.at: Likewise.
5036 * tests/regression.at: Likewise.
5037 * tests/sets.at: Likewise.
5038 * tests/skeletons.at: Likewise.
5039 * tests/synclines.at: Likewise.
5040 * tests/torture.at: Likewise.
5041 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
5042 tends to hang xsltproc.
5043 (Big horizontal): Likewise.
5044
5045 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5046
5047 In XML output, remove redundant class attribute on symbol element.
5048 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
5049 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
5050 look up a symbol to determine whether it's a nonterminal or terminal.
5051 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
5052 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
5053
5054 Add prec/assoc information to XML output.
5055 * src/gram.c (grammar_rules_print_xml): For each rule that has a
5056 %prec, add a percent_prec attribute.
5057 * src/print-xml.c (print_grammar): For each terminal that has a
5058 precedence or associativity, add a prec or assoc attribute.
5059 (xml_indent): New.
5060 (xml_puts): Use xml_indent.
5061 (xml_printf): Use xml_indent.
5062 * src/print-xml.h (xml_indent): Prototype.
5063
5064 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
5065 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5066
5067 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
5068
5069 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
5070 (bison:ruleByNumber): ... this for clarity.
5071 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
5072 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
5073 (xsl:template match="reduction"): Update.
5074 (xsl:template match="item"): Update.
5075 (xsl:template match="reduction"): Update.
5076
5077 In the XML output, don't print the list of rules where symbols appear.
5078 Compute it in XSLT instead. Discussed at
5079 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
5080 * data/xslt/bison.xsl (bison:ruleByLhs): New.
5081 (bison:ruleByRhs): New.
5082 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
5083 bison:ruleByRhs.
5084 (xsl:template match="terminal/rule"): Remove.
5085 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5086 bison:ruleByRhs.
5087 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5088 Remove.
5089 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
5090 bison:ruleByRhs and mode="number-link" for rule template.
5091 (xsl:template match="terminal/rule"): Remove.
5092 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5093 bison:ruleByRhs and mode="number-link" for rule template.
5094 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5095 Rewrite as...
5096 (xsl:template match="rule" mode="number-link"): ... this.
5097 * src/print-xml.c (print_grammar): Don't print the list of rules.
5098
5099 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5100
5101 Don't let --report affect XML output; always print all information.
5102 Discussed at
5103 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5104 * src/conflicts.c (log_resolution): Implement.
5105 * src/print-xml.c (print_core): Implement.
5106 (print_state): Implement.
5107 (print_xml): Implement.
5108
5109 * NEWS (2.3a+): Fix quotes.
5110 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5111 don't let %verbose clear the list specified by --report.
5112
5113 2007-11-26 Akim Demaille <akim@epita.fr>
5114
5115 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5116
5117 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5118
5119 In the XML output, list useless and unused symbols and rules with the
5120 useful ones and add a "usefulness" attribute. Discussed starting at
5121 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5122 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5123 (grammar_rules_print_xml): Print all rules instead of just those
5124 useful in the grammar, and add a "usefulness" attribute.
5125 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5126 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5127 (print_grammar): Print all nonterminals instead of just useful ones,
5128 and add a "usefulness" attribute to nonterminals and terminals.
5129 (print_xml): Don't print a separate "reductions" or
5130 "rules-useless-in-parser" element.
5131 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5132 (reduce_xml): Remove.
5133 (reduce_token_unused_in_grammar): New.
5134 (reduce_nonterminal_useless_in_grammar): New.
5135 * src/reduce.h (reduce_xml): Remove prototype.
5136 (reduce_token_unused_in_grammar): Add prototype.
5137 (reduce_nonterminal_useless_in_grammar): Add prototype.
5138 * data/xslt/xml2text.xsl: Update for XML changes.
5139 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5140 * tests/reduce.at (Useless Terminals): Update output.
5141 (Useless Rules): Update output.
5142 (Reduced Automaton): Update output.
5143
5144 Say "Terminals unused in grammar" instead of "Unused terminals".
5145 * NEWS (2.3a+): Update.
5146 * doc/bison.texinfo (Understanding): Update example output.
5147 * src/reduce.c (reduce_output): Implement.
5148 * data/xslt/xml2text.xsl: Implement.
5149 * data/xslt/xml2xhtml.xsl: Implement.
5150
5151 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5152
5153 Accept --report-file=FILE to override the default `.output' filename.
5154 * NEWS (2.3a+): Mention.
5155 * doc/bison.texinfo (Bison Options): Add an entry.
5156 * src/files.c (compute_output_file_names): Don't override
5157 spec_verbose_file if already set.
5158 * src/getargs.c (usage): Document --report-file.
5159 (REPORT_FILE_OPTION): New anonymous enum member.
5160 (long_options): Add entry for it.
5161 (getargs): Add case for it setting spec_verbose_file.
5162
5163 * build-aux/cross-options.pl: Don't record a short option just because
5164 there's an arg.
5165 * doc/.cvsignore: Add yacc.1.
5166
5167 2007-11-14 Akim Demaille <akim@epita.fr>
5168
5169 * doc/yacc.1.in: New.
5170 * configure.ac, doc/Makefile.am: Adjust.
5171 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5172 config.h symbol.
5173 Use AC_SUBST for assignments too.
5174 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5175
5176 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5177
5178 * src/gram.c: Remove comments that duplicate comments in gram.h.
5179
5180 When reporting useless rules and nonterminals, say "useless in grammar"
5181 instead of "useless", and say "useless in parser" instead of "never
5182 reduced". Discussed starting at
5183 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5184 * NEWS (2.3a+): Mention this change.
5185 * data/xslt/xml2text.xsl: Update output text and expected input XML
5186 element names to match changes below.
5187 * data/xslt/xml2xhtml.xsl: Likewise.
5188 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5189 Contents: "Rules useless in parser due to conflicts".
5190 * doc/bison.texinfo (Decl Summary): Reword a little.
5191 (Understanding): Update example output for changes below.
5192 * src/gram.c: (rule_useful_p): Rename to...
5193 (rule_useful_in_grammar_p): ... this.
5194 (rule_useless_p): Rename to...
5195 (rule_useless_in_grammar_p): ... this.
5196 (rule_never_reduced_p): Rename to...
5197 (rule_useless_in_parser_p): ... this.
5198 (grammar_rules_print): Update for renames.
5199 (grammar_rules_print_xml): Update for renames.
5200 (grammar_rules_never_reduced_report): Rename to...
5201 (grammar_rules_useless_report): ... this since it is used for either
5202 kind of useless rule.
5203 * src/gram.h: Reword comments and update function names in prototypes.
5204 * src/main.c (main): Say "rule useless in parser due to conflicts".
5205 * src/print-xml.c (print_rules_never_reduced): Rename to...
5206 (print_rules_useless_in_parser): ... this, and rename output XML
5207 element "rules-never-reduced" to "rules-useless-in-parser".
5208 (print_xml): Update for rename.
5209 * src/print.c (print_results): Say "Rules useless in parser due to
5210 conflicts".
5211 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5212 (nonterminals_reduce): Say "nonterminal useless in grammar".
5213 (reduce_output): Say "Nonterminals useless in grammar".
5214 Say "Rules useless in grammar".
5215 (reduce_xml): Rename output XML element "useless" to
5216 "useless-in-grammar".
5217 (reduce_print): Don't report the count of grammatically useless rules
5218 as "rules never reduced" just because %yacc is specified.
5219 In the correct report of this count, say nonterminal(s) and rule(s)
5220 "useless in grammar".
5221 * tests/conflicts.at (S/R in initial): Update expected output.
5222 (Defaulted Conflicted Reduction): Likewise.
5223 (Unreachable States After Conflict Resolution): Likewise.
5224 * tests/existing.at (GNU pic Grammar): Likewise.
5225 * tests/reduce.at (Useless Nonterminals): Likewise.
5226 (Useless Rules): Likewise.
5227 (Reduced Automaton): Likewise.
5228 (Underivable Rules): Likewise.
5229 (Empty Language): Likewise.
5230
5231 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5232
5233 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5234 here document and before the EOF so that BSD's implementation of Bourne
5235 shell doesn't parse the delimiter as part of the here document.
5236 * doc/.cvsignore: Add cross-options.texi.
5237 * src/getargs.c (usage): Add a blank line after the warning categories.
5238
5239 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
5240
5241 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5242
5243 2007-11-05 Akim Demaille <akim@epita.fr>
5244
5245 Remove Id: from bison.1.
5246 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5247 (perl -0777 -pi -e 's/\.PP\nId): New.
5248 (.x.1): Use it to ignore the version control revision.
5249
5250 2007-11-05 Akim Demaille <demaille@gostai.com>
5251
5252 * build-aux/Makefile.am: Ship cross-options.pl.
5253 * doc/Makefile.am: Always refer to cross-options.texi with
5254 $(srcdir).
5255 (MAINTAINERCLEANFILES): Add it.
5256
5257 2007-11-04 Akim Demaille <demaille@gostai.com>
5258
5259 Generate the long/short option cross-table.
5260 * build-aux/cross-options.pl: New.
5261 * doc/Makefile.am (cross-options.texi): New.
5262 * doc/bison.texinfo: Use it.
5263
5264 2007-11-04 Akim Demaille <demaille@gostai.com>
5265
5266 Generate bison.1 using help2man.
5267 * doc/common.x, doc/bison.x: New.
5268 * doc/Makefile.am (bison.1, .x.1): New.
5269 The code is taken from autoconf-2.61/man/Makefile.am.
5270 * configure.ac: Look for help2man.
5271
5272 2007-11-04 Akim Demaille <demaille@gostai.com>
5273
5274 Complete --help.
5275 * src/getargs.c (usage): Document -W, make it clear that -d,
5276 -g and -x have optional arguments.
5277
5278 2007-11-04 Akim Demaille <demaille@gostai.com>
5279
5280 Find sha1sum when named gsha1sum.
5281 * bootstrap (find_tool): New.
5282 ($SHA1SUM): New.
5283
5284 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5285
5286 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5287 at
5288 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5289 * NEWS (2.3a+): Mention.
5290 * data/bison.m4 (b4_pure_if): Don't define it here.
5291 * data/c.m4 (b4_identification): Depend on individual skeletons to
5292 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5293 values of the %define variables api.pure or api.push_pull. Define
5294 YYPURE, YYPUSH, and YYPULL accordingly.
5295 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5296 glr.cc has already defined b4_pure_flag.
5297 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5298 Remove YYPUSH and YYPULL since they're back in b4_identification again.
5299 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
5300 * doc/bison.texinfo (Pure Decl): Update.
5301 (Push Decl): Update.
5302 (Decl Summary): Add api.pure to %define entry.
5303 In %pure-parser entry, say it's deprecated and reference %define.
5304 (Pure Calling): Update.
5305 (Error Reporting): Update.
5306 (C++ Scanner Interface): Update.
5307 (How Can I Reset the Parser): Update.
5308 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5309 reference %define.
5310 * src/getargs.c (pure_parser): Remove global variable.
5311 * src/getargs.h (pure_parser): Remove extern.
5312 * src/output.c (prepare): Don't define pure_flag muscle.
5313 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5314 wrapper around `%define api.pure'.
5315 * tests/calc.at (Simple LALR Calculator): Update.
5316 (Simple GLR Calculator): Update.
5317 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5318 Update.
5319 (GLR: Resolve ambiguity, pure, locations): Update.
5320 (GLR: Merge conflicting parses, pure, no locations): Update.
5321 (GLR: Merge conflicting parses, pure, locations): Update.
5322 * tests/glr-regression.at (Uninitialized location when reporting
5323 ambiguity): Update
5324 * tests/input.at (Unused %define api.pure): New test case.
5325 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5326 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5327 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5328
5329 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5330
5331 %define push_pull -> %define api.push_pull. Discussed starting at
5332 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5333 * data/push.c: Expect the new name.
5334 * data/yacc.c: Likewise.
5335 * doc/bison.texinfo (Push Decl): Update.
5336 (Decl Summary): Update %define entry.
5337 (Push Parser Function): Update.
5338 (Pull Parser Function): Update.
5339 (Parser Create Function): Update.
5340 (Parser Delete Function): Update.
5341 * tests/calc.at (Simple LALR Calculator): Update.
5342 * tests/input.at (%define enum variables): Update.
5343 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5344 (Push Parsing: Multiple impure instances): Update.
5345 (Push Parsing: Unsupported Skeletons): Update.
5346 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5347 (Exploding the Stack Size with Malloc): Update.
5348
5349 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5350 other entries some.
5351
5352 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5353
5354 For the XML output's terminal element, rename @number to @token-number,
5355 and add @symbol-number. In the nonterminal element, rename @number to
5356 @symbol-number. Discussed starting at
5357 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5358 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5359 renames.
5360 (xsl:template match="nonterminal"): Likewise.
5361 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5362 (xsl:template match="nonterminal"): Likewise.
5363 * src/print-xml.c (print_grammar): Implement.
5364
5365 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5366
5367 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5368 2007-10-11 change, the child elements here are items not rules.
5369 (xsl:template match="item"): New.
5370 (xsl:template match="rule"): Update for new reduced itemset.
5371 (xsl:template match="point"): Remove.
5372 (xsl:template match="empty"): For consistency with --graph, don't
5373 output "/* empty */".
5374 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5375 line-wrap, don't pass a negative value as first-line-length since this
5376 won't work with the following changes.
5377 (xsl:template name="line-wrap"): Simplify slightly.
5378 (xsl:template name="ws-search"): Eliminate recursion.
5379 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5380 set next to an item whose dot is not at the end of the RHS even if it
5381 happens to be associated with the same rule.
5382
5383 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5384
5385 Add %define lr.keep_unreachable_states.
5386 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5387 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5388 * src/main.c (main): Implement it.
5389 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5390 Extend to test it, and fix a typo.
5391
5392 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5393
5394 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
5395 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5396 the example .output text.
5397 * tests/regression.at (Extra lookahead sets in report): Improve wording
5398 of comments.
5399
5400 2007-10-17 Wojciech Polak <polak@gnu.org>
5401
5402 * src/print-xml.c (print_grammar): Renamed
5403 <terminal> and <nonterminal> attributes:
5404 "type" to "number" and "symbol" to "name".
5405 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5406 Use new attribute names.
5407 (xsl:template match="nonterminal"): Likewise.
5408 * data/xslt/xml2xhtml.xsl: Likewise.
5409
5410 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5411
5412 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5413 (Option Cross Key): Likewise.
5414
5415 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5416 next to an item whose dot is not at the end of the RHS even if it
5417 happens to be associated with the same rule.
5418 * src/print.c (print_core): Likewise.
5419 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5420 (Resolved SR Conflicts): Update output.
5421 * tests/regression.at (Extra lookahead sets in report): New test case.
5422
5423 2007-10-11 Wojciech Polak <polak@gnu.org>
5424
5425 * src/print-xml.c (print_core): Remove item set
5426 redundancy.
5427 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5428 Improve processing time. Suggested by Joel E. Denny.
5429 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5430 Write xsl:param "required" attribute as comment.
5431 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5432 (xsl:template match="rule"): Support new reduced itemset.
5433 (xsl:template match="point"): Remove.
5434 * data/xslt/xml2xhtml.xsl: Likewise.
5435
5436 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5437
5438 * src/getargs.c (version): Update copyright year.
5439
5440 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5441
5442 Make xml2dot.xsl and --graph produce the same output.
5443 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5444 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5445 escaped later.
5446 (xsl:template name="output-node"): Use the new escape template instead
5447 of the string-replace template directly.
5448 (xsl:template name="output-edge"): Likewise.
5449 (xsl:template name="escape"): New, escapes backslashes and newlines in
5450 addition to quotation marks.
5451 * src/graphviz.c (start_graph, output_node, output_edge): Add
5452 whitespace to output for legibility.
5453
5454 Make xml2text.xsl and --report produce the same output, and remove the
5455 XML "conflicts" element since a conflict summary is easily extracted
5456 from the automaton.
5457 * data/xslt/bison.xsl: New.
5458 (xsl:template match="state" mode="bison:count-conflicts): New.
5459 * data/xslt/xml2text.xsl: Import bison.xsl.
5460 (xsl:template match="bison-xml-report"): Instead of styling the
5461 "conflicts" element, style the "automaton" element with mode
5462 "conflicts". Unlike the former, the latter lists S/R and R/R
5463 conflicts for a state on the same line.
5464 (xsl:template match="conflicts"): Remove.
5465 (xsl:template match="conflict"): Remove.
5466 (xsl:template match="terminal"): Line-wrap the list of rules in which
5467 the terminal is used.
5468 (xsl:template match="nonterminal"): Likewise for nonterminals.
5469 (xsl:template match="automaton" mode="conflicts"): New.
5470 (xsl:template match="state" mode="conflicts"): New.
5471 (xsl:template name="line-wrap"): New.
5472 (xsl:template name="ws-search"): New.
5473 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5474 (xsl:template match="bison-xml-report"): Instead of styling the
5475 "conflicts" element, style the "automaton" element with mode
5476 "conflicts."
5477 (xsl:template match="conflicts"): Remove.
5478 (xsl:template match="conflict"): Remove.
5479 (xsl:template match="automaton" mode="conflicts"): New.
5480 (xsl:template match="state" mode="conflicts): New.
5481 * src/conflicts.c (conflicts_output_xml): Remove.
5482 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5483 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5484 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5485 the corresponding XSLT is easier. Also, never wrap between a word and
5486 the comma that follows it.
5487
5488 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5489
5490 Improve C++ namespace support. Discussed starting at
5491 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5492 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5493 b4_namespace_close): New macros that interpret the %define variable
5494 "namespace" so its value can contain "::" to indicate nested
5495 namespaces.
5496 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5497 the above macros.
5498 * data/lalr1.cc (b4_namespace): Likewise.
5499 * data/location.cc (b4_namespace): Likewise.
5500 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5501 inside a new table in the general %define entry. Document `%define
5502 namespace' there as well. Point the %name-prefix entry to it since it
5503 explains it more completely in the case of C++.
5504 (C++ Bison Interface): Mention `%define namespace' instead of
5505 %name-prefix.
5506 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5507 entry suffices.
5508 * tests/c++.at (Relative namespace references): New test case.
5509 (Absolute namespace references): New test case.
5510 (Syntactically invalid namespace references): New test case.
5511 * tests/input.at (C++ namespace reference errors): New test case.
5512
5513 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5514
5515 Add syncline support and location accessor to internal %define
5516 interfaces.
5517 * data/bison.m4 (b4_percent_define_get_loc): New.
5518 (b4_percent_define_get_syncline): New.
5519 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5520 (b4_percent_define_default): Record defining location as line 1 rather
5521 than 0 for the sake of synchronizing #line's, and define
5522 b4_percent_define_syncline(VARIABLE).
5523 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5524 * src/muscle_tab.c (muscle_syncline_grow): New.
5525 (muscle_code_grow): Use muscle_syncline_grow.
5526 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5527 define b4_percent_define_syncline(VARIABLE).
5528 (muscle_percent_define_get_loc): New.
5529 (muscle_percent_define_get_syncline): New.
5530 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5531 remove some unused variables.
5532 (muscle_percent_define_default): Record defining location as line 1
5533 rather than 0 for the sake of synchronizing #line's, and define
5534 b4_percent_define_syncline(VARIABLE).
5535 (muscle_percent_define_check_values): Use
5536 muscle_percent_define_get_loc.
5537 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5538 (muscle_percent_define_get_syncline): Prototype.
5539 * tests/skeletons.at (%define Boolean variables: invalid skeleton
5540 defaults): Update output for location change.
5541 (Complaining during macro argument expansion): Extend to test
5542 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
5543
5544 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
5545
5546 Fix some error-reporting macro bugs.
5547 * data/bison.m4 (b4_cat): New.
5548 (b4_error, b4_error_at): Use b4_cat to send error directives directly
5549 to stdout so they don't become arguments to other macros. Update
5550 comments and add examples.
5551 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
5552 add examples.
5553 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
5554 after printing the error directive so that M4 doesn't report subsequent
5555 problems that are induced by this problem.
5556 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
5557 instead of just in them. Recognize @\n in both places. Both expand to
5558 the empty string. Needed by b4_cat.
5559 * tests/skeletons.at (Complaining during macro argument expansion):
5560 New test case.
5561 (Fatal errors make M4 exit immediately): New test case.
5562
5563 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
5564
5565 Implement --print-datadir.
5566 * src/getargs.c (usage): Mention.
5567 (PRINT_DATADIR_OPTION): New anonymous enum member.
5568 (long_options): Add entry for it.
5569 (getargs): Add case for it calling compute_pkgdatadir.
5570 * src/output.c (output_skeleton): Encapsulate data directory
5571 computation from here...
5572 (prepare): ... and from here...
5573 (compute_pkgdatadir): ... into this new function.
5574 * src/output.h (compute_pkgdatadir): Prototype.
5575
5576 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
5577
5578 * src/print-xml.c (escape_bufs): New static global variable
5579 replacing...
5580 (xml_escape_n): ... the static local variable buf here.
5581 (print_xml): Free memory for escape_bufs.
5582 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
5583
5584 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
5585
5586 Replace `%push-parser' and `%push-pull-parser' with
5587 `%define push_pull "push"' and `%define push_pull "both"'.
5588 `%define push_pull "pull"' is the default.
5589 * doc/bison.texinfo (Push Decl, Push Parser Function,
5590 Pull Parser Function, Parser Create Function, Parser Delete Function):
5591 Update declarations.
5592 (Decl Summary, Table of Symbols): Replace %push-parser and
5593 %push-pull-parser entries with a %define push_pull entry.
5594 * data/bison.m4 (b4_percent_define_check_values): New macro.
5595 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
5596 definitions...
5597 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
5598 definitions...
5599 * data/push.c: ... to here and compute them from the value of the
5600 %define variable push_pull.
5601 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
5602 parsing requests here...
5603 * data/yacc.c: ... hack this to switch to push.c any time
5604 b4_use_push_pull_flag or the %define variable push_pull is set. This
5605 will go away when we mv push.c yacc.c.
5606 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
5607 push parsing is not supported since unused %define variables are
5608 reported anyway.
5609 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
5610 * src/muscle_tab.h (muscle_percent_define_check_values): Update
5611 comments for consistency with b4_percent_define_check_values.
5612 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
5613 muscles.
5614 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
5615 Remove.
5616 (prologue_declaration): Remove %push-parser and %push-pull-parser
5617 rules.
5618 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
5619 * tests/calc.at: Update declarations.
5620 * tests/input.at (%define enum variables): New test case.
5621 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
5622 declaration.
5623 (Push Parsing: Multiple impure instances): Update declaration.
5624 (Push Parsing: Unsupported Skeletons): New test case.
5625 * tests/torture.at (Exploding the Stack Size with Alloca): Update
5626 declaration.
5627 (Exploding the Stack Size with Malloc): Update declaration.
5628
5629 2007-09-24 Wojciech Polak <polak@gnu.org>
5630
5631 Add XSLT transformations.
5632
5633 * data/xslt/xml2dot.xsl: Transform XML into DOT.
5634 * data/xslt/xml2text.xsl: Transform XML into plain text.
5635 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
5636 * data/Makefile.am (xsltdir): New variable.
5637 (dist_xslt_DATA): Add xslt/*.xsl files.
5638
5639 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
5640
5641 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
5642 Problem reported by Wojciech Polak.
5643 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
5644 (xml_printf): Undo change I made on 21 September; that is,
5645 indent 2 spaces, not 1.
5646
5647 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
5648
5649 Pacify ./configure --enable-gcc-warnings.
5650 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
5651 `char const *' instead of `char *'.
5652 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
5653 local variable `sep'.
5654
5655 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5656
5657 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
5658 elsewhere.
5659 * src/print-xml.c: Prefer "const" after types; that's more consistent.
5660 (xml_printf): Indent just 1 space for level.
5661 (e_char, xlate_char): Remove.
5662 (xml_escape_string): Rewrite to avoid undefined behavior (used
5663 storage that was freed from the stack).
5664 (xml_escape_n): Don't bother checking for subscript error.
5665
5666 2007-09-21 Wojciech Polak <polak@gnu.org>
5667
5668 Add Bison XML Automaton Report.
5669
5670 Add support for an -x option to generate an XML report.
5671 It is not documented yet.
5672 * src/print-xml.c: New file.
5673 * src/print-xml.h: Likewise.
5674 * lib/timevar.def (TV_XML): New var.
5675 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
5676 * src/conflicts.c: Include print-xml.h.
5677 (solved_conflicts_xml_obstack): New var.
5678 (log_resolution, conflicts_solve, conflicts_free):
5679 Add support for XML report.
5680 (conflicts_output_val): New function.
5681 * src/conflicts.h (conflicts_output_val): New decl.
5682 * src/files.c (spec_xml_file): New var.
5683 (compute_output_file_names, output_file_names_free): Add XML support.
5684 * src/files.h (spec_xml_file): New decl.
5685 * src/getargs.c (xml_flag): New var.
5686 (usage, short_options, long_options, getargs): Add XML support.
5687 * src/getargs.h (xml_flag): New decl.
5688 * src/gram.c: Include print-xml.h.
5689 (rule_lhs_print_xml, rule_rhs_print_xml):
5690 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
5691 New functions.
5692 * src/gram.h: Declare external ones.
5693 * src/main.c: Include print-xml.h.
5694 (main): Add XML support.
5695 * src/reduce.c: Include print-xml.h.
5696 (reduce_xml): New function.
5697 * src/reduce.h: Declare it.
5698 * src/state.c: Include print-xml.h.
5699 (state_new): Add XML support.
5700 (state_rule_lookahead_tokens_print_xml): New function.
5701 * src/state.h: Declare it.
5702 (struct state): New member solved_conflicts_xml.
5703 * src/symtab.c (symbol_class_get_string): New function.
5704 * src/symtab.h: Declare it.
5705
5706 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5707
5708 * GNUmakefile: Switch to coreutils's version.
5709 * bootstrap: Likewise.
5710 * Makefile.cfg: Adjust to new GNUmakefile.
5711 * README-hacking: Likewise.
5712
5713 Import from gnulib:
5714
5715 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5716 Bruno Haible <bruno@clisp.org>
5717
5718 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5719 and is a script that invokes bison. Tighten the code. Add comments.
5720
5721 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
5722
5723 Spell "boolean" as "Boolean". Reported by Akim Demaille.
5724 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
5725 * doc/bison.texinfo (Decl Summary): Fix.
5726 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
5727 * tests/input.at (Boolean %define variables): Update output.
5728 * tests/skeletons.at (%define boolean variables: invalid skeleton
5729 defaults): Rename to...
5730 (%define Boolean variables: invalid skeleton defaults): ... this and
5731 update output.
5732
5733 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
5734
5735 In impure push mode, don't allow more than one yypstate to be allocated
5736 since multiple impure parsers would corrupt yynerrs.
5737 * data/push.c (yypstate_allocated): New static global variable
5738 initialized to 0.
5739 (yypull_parse): If yypstate_new returns 0, don't report it as memory
5740 exhaustion if yypstate_allocated is 1, but still return 2.
5741 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
5742 already 1. Otherwise, set it to 1.
5743 (yypstate_delete): Set it to 0.
5744 * tests/push.at (Push Parsing: Multiple impure instances): New test
5745 case.
5746
5747 2007-08-17 Bob Rossi <bob@brasko.net>
5748
5749 * doc/bison.texinfo (Push Decl): Document the push parser.
5750 (Table of Symbols): Ditto.
5751 (Pure Decl): Ditto.
5752 (Decl Summary): Ditto.
5753 (Multiple Parsers, Push Parser Function, Pull Parser Function,
5754 Parser Create Function, Parser Delete Function):
5755 Add new push parser symbols.
5756 (Table of Symbols): Document push-parser, push-pull-parser,
5757 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
5758
5759 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
5760
5761 Update to GPLv3.
5762 * doc/gpl-3.0.texi: New file.
5763 * doc/gpl.texi: Remove.
5764 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
5765 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
5766 * README-hacking, TODO, bootstrap, bootstrap.conf:
5767 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
5768 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
5769 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
5770 * data/lalr1.cc, data/lalr1.java, data/location.cc:
5771 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
5772 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
5773 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
5774 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
5775 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
5776 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
5777 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
5778 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
5779 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
5780 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
5781 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
5782 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
5783 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
5784 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
5785 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
5786 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
5787 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
5788 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
5789 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
5790 * src/complain.c, src/complain.h, src/conflicts.c:
5791 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
5792 * src/files.h, src/flex-scanner.h, src/getargs.c:
5793 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
5794 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
5795 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
5796 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
5797 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
5798 * src/print.c, src/print.h, src/print_graph.c:
5799 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
5800 * src/reduce.h, src/relation.c, src/relation.h:
5801 * src/revision.h, src/scan-code.h, src/scan-code.l:
5802 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
5803 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
5804 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
5805 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
5806 * tests/Makefile.am, tests/actions.at, tests/c++.at:
5807 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
5808 * tests/existing.at, tests/glr-regression.at:
5809 * tests/headers.at, tests/input.at, tests/java.at:
5810 * tests/local.at, tests/output.at, tests/push.at:
5811 * tests/reduce.at, tests/regression.at, tests/sets.at:
5812 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
5813 * tests/torture.at:
5814 Update to GPLv3.
5815
5816 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5817
5818 Get rid of broken %no-parser, -n, and --no-parser implementation and
5819 documentation.
5820 * TODO: Don't mention them.
5821 * doc/bison.1: Likewise.
5822 * doc/bison.texinfo (Decl Summary): Likewise.
5823 (Bison Options): Likewise.
5824 (Option Cross Key): Likewise.
5825 * src/getargs.c (no_parser_flag): Remove global variable.
5826 (usage): Don't print description of -n and --no-parser.
5827 (long_options): Remove --no-parser entry here.
5828 (getargs): Remove -n case in the switch here.
5829 * src/getargs.h (no_parser_flag): Remove extern.
5830 * tests/regression.at (Web2c Actions): Remove comment that mentions
5831 --no-parser.
5832
5833 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5834
5835 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
5836 name user variables starting with `yy'. Just pass NULL instead of a
5837 dummy local &yylval to yypush_parse.
5838 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
5839 starting with `yy'.
5840
5841 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
5842
5843 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
5844 true since it's then always used regardless of whether yyoverflow is
5845 defined. Reported by Christian Burger at
5846 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
5847 * THANKS: Add Christian Burger.
5848
5849 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5850 node names: say "Decl Summary" not "Bison Declaration Summary".
5851
5852 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
5853
5854 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
5855 determine whether this function has already complained about an invalid
5856 value for a %define boolean variable, don't check whether Bison has
5857 ever examined the value. As written, the check was a tautology.
5858 Instead, record and check for this complaint using a separate muscle.
5859
5860 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5861
5862 Fix push parsing memory leak reported by Brandon Lucia at
5863 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
5864 * THANKS: Add Brandon Lucia.
5865 * data/push.c (yypstate_delete): Free the stack if it was reallocated
5866 but the parse never completed and thus freed it.
5867 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
5868 * tests/testsuite.at: Include push.at.
5869 * test/push.at: New.
5870 (Push Parsing: Memory Leak for Early Deletion): New test case.
5871
5872 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
5873
5874 Improve handling of multiple S/R conflicts in the same state and of S/R
5875 conflicts involving multiple reductions.
5876 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
5877 set for a state here or Bison will abort if it is reassigned on a
5878 later conflicted reduction in the same state.
5879 Similarly, don't finalize and assign the solved conflicts report here
5880 or it will be lost if it is reassigned on a later conflicted reduction
5881 in the same state.
5882 (set_conflicts): Instead, assign them both here after all S/R conflicts
5883 in the state have been fully examined.
5884 * src/print.c (shift_set): Rename to...
5885 (no_reduce_set): ... this.
5886 (print_reductions): Update for rename, and add %nonassoc error action
5887 tokens to no_reduce_set so that, when printing the first remaining
5888 reduction on an error action token, the reduction is enclosed in
5889 brackets.
5890 (print_results): Update for rename.
5891 * tests/conflicts.at (Solved conflicts report for multiple reductions
5892 in a state): New test case.
5893 (%nonassoc error actions for multiple reductions in a state): New test
5894 case.
5895
5896 * src/main.c (main): Don't depend on C99 features.
5897
5898 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5899
5900 * build-aux/.cvsignore: Add compile.
5901 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
5902 uniwidth.
5903
5904 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
5905
5906 * bootstrap (slurp): Create target directories that don't exist.
5907 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
5908
5909 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5910
5911 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
5912 than item number.
5913 * closure.c (closure): Likewise.
5914 * state.h (reductions): Comment sorting of rules.
5915 (state): Comment sorting of items.
5916
5917 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
5918
5919 Fix C++ test cases after recent Gnulib changes. Discussed starting at
5920 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
5921 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
5922 definition in order to avoid Gnulib headers since we don't use config.h
5923 here.
5924 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
5925 rather than AT_DATA so that config.h is included.
5926
5927 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
5928
5929 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
5930 instead of fprintf. Guard these functions with #if YYDEBUG instead of
5931 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
5932 and so that YYFPRINTF is guaranteed to be defined here.
5933
5934 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5935
5936 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
5937 with...
5938 (muscle_percent_define_check_values): ... this more helpful function.
5939 Again, it's not used yet, but it will be.
5940 * src/muscle_tab.h: Likewise.
5941
5942 Improve some comments in parser table construction.
5943 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
5944 (generate_states): Don't mention ruleset, which is internal to closure.
5945 * src/closure.c (closure): Explain sorting of core and itemset, which
5946 is required for this function to behave correctly.
5947 * src/closure.h (closure): Mention sorting.
5948
5949 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
5950
5951 * src/lalr.c (state_lookahead_tokens_count): For code readability,
5952 move the check for disabled transitions to an aver since conflict
5953 resolution hasn't happened yet.
5954
5955 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
5956 labels a state as inconsistent just because it has error transitions.
5957 The original form of this check appeared in revision 1.1 of lalr.c,
5958 which was committed on 1991-12-21. Now (at least), changing the
5959 consistency label on such a state appears to have no useful effect in
5960 any of the places it is examined, which I enumerate below. The key
5961 point to understanding each item in this enumeration is that a state
5962 with an error transition is labelled consistent in the first place only
5963 if it has no rules, so the check cannot matter for states that have
5964 rules. (1) Labelling a state as inconsistent will cause set_conflicts
5965 to try to identify its conflicts, and a state must have *rules* to have
5966 conflicts. (2) Labelling a state as inconsistent will affect how
5967 action_row sets the default *rule* for the state. (3) Labelling a
5968 state as inconsistent will cause build_relations to add lookback edges
5969 to *rules* in that state.
5970 * src/state.h (struct state): Word the comment for member consistent
5971 more carefully.
5972
5973 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5974
5975 Don't depend on C99 features.
5976 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
5977 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
5978 * src/reader.c (check_and_convert_grammar): Fix for-loop.
5979 * src/state.c (state_mark_reachable_states): Fix for-loop.
5980 (state_remove_unreachable_states): Fix for-loop.
5981
5982 Don't widen struct state with member reachable just to temporarily
5983 record reachability. Instead, use a local bitset.
5984 * src/state.h (struct state): Remove member.
5985 * src/state.c (state_new): Don't initialize it.
5986 (state_mark_reachable_states): Rename to...
5987 (state_record_reachable_states): ... this, and use bitset.
5988 (state_remove_unreachable_states): Use bitset.
5989
5990 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
5991
5992 * src/Makefile.am (yacc): Quote target action commands properly so
5993 that the yacc script isn't corrupt. Reported by Hans Aberg at
5994 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
5995
5996 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
5997 the case of pure parsers. Reported by Frans Englich at
5998 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
5999 * THANKS: Add Frans Englich.
6000
6001 * NEWS (2.3a+): In the %code entry, reference section `Bison
6002 Declaration Summary' from the manual now since the %code summary has
6003 moved there.
6004 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
6005 in the rules section must be terminated by semicolons.
6006
6007 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
6008
6009 Extend the front-end API for %define variables to more completely
6010 mirror the back-end. This will be useful in the future.
6011 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
6012 Update comments to mention the new front-end counterparts of these
6013 macros.
6014 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
6015 for muscle_string_decode and muscle_location_decode.
6016 (muscle_string_decode): New static function.
6017 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
6018 (muscle_percent_define_get, muscle_percent_define_ifdef): New
6019 functions.
6020 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
6021 muscle_percent_define_get to mimic the b4_percent_define_flag_if
6022 implementation more closely.
6023 (muscle_percent_define_invalid_value): New function.
6024 * src/muscle_tab.h (muscle_percent_define_get,
6025 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
6026 Prototype.
6027
6028 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6029
6030 * NEWS (2.3a+): Mention yesterday's state-removal change.
6031 (2.3a): Remove the %language entry, which was added after 2.3a.
6032 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
6033 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
6034 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
6035 tests/existing.at: Update copyright date.
6036
6037 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6038
6039 If conflict resolution makes states unreachable, remove those states,
6040 report rules that are then unused, and don't report conflicts in those
6041 states.
6042 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
6043 New global function.
6044 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
6045 function.
6046 * src/main.c (main): After conflict resolution, remove the unreachable
6047 states and update all data structures that reference states by number.
6048 * src/state.c (state_new): Initialize each state's reachable member to
6049 false.
6050 (state_mark_reachable_states): New static function.
6051 (state_remove_unreachable_states): New global function.
6052 * src/state.h (struct state): Add member bool reachable.
6053 (state_remove_unreachable_states): Prototype.
6054 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6055 New test case.
6056 * tests/existing.at (GNU pic Grammar): Update test case output now that
6057 an unused rule is discovered.
6058
6059 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6060
6061 Minor code cleanup in parser table construction.
6062 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
6063 (new_itemsets, save_reductions): Update for rename to nitemset.
6064 * src/closure.c (nritemset): Rename to...
6065 (nitemset): ... this since the "r" appears to meaningless and isn't
6066 used in the comments.
6067 (closure): Update for rename.
6068 * src/closure.h (nritemset): Update extern to...
6069 (nitemset): ... this.
6070 * src/lalr.c (LA): Fix a typo in comments.
6071 * src/print.c (print_core): Update for rename to nitemset.
6072 * src/print_graph.c (print_graph): Likewise.
6073 * src/state.h: Fix some typos in header comments.
6074
6075 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
6076
6077 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
6078 still sticks to ASCII. Sorry!
6079
6080 * README-hacking: New file, taken mostly from coreutils, with changes
6081 for Bison. Contains much of the contents of:
6082 * README-cvs: Remove.
6083 * bootstrap: Sync from gnulib.
6084 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
6085 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
6086
6087 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
6088
6089 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
6090 Setzer.
6091 (Java Differences): Fix some typos.
6092 * THANKS: Add Sebastian Setzer.
6093
6094 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
6095
6096 * data/java.m4 (b4_single_class_if): Remove.
6097 (b4_abstract_if): Look at "%define abstract".
6098 (b4_lexer_if): New.
6099 (b4_union_name): Rename...
6100 (b4_yystype): ... to this. Map to "%define stype".
6101 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6102 b4_maybe_throws): Fix quoting.
6103 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6104 * data/lalr1.java (Lexer interface): Always define.
6105 (Lexer interface within parser class): Remove.
6106 (YYLexer class): New, used when "%code lexer" is present.
6107 (constructor): When "%code lexer" is used, pass %lex-param
6108 to the lexer constructor.
6109 (yylex, yyparse): Remove %lex-param from method invocations
6110 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6111
6112 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6113 abstract". Rename "%define union_name" to "%define stype".
6114 Rename method names according to previous patch.
6115 (Java Scanner Interface): Describe "%code lexer" instead of
6116 "%pure-parser" and "%define single_class".
6117 (Java Differences): Mention "%code lexer".
6118
6119 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6120 Include scanner here, using macros from tests/local.at.
6121 (AT_DATA_CALC_Y): Remove final argument.
6122 (_AT_CHECK_JAVA_CALC): Likewise.
6123 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6124 of %locations and %error-verbose.
6125 (main): Test with and without %lex-param.
6126 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6127 (AT_BISON_OPTION_POPDEFS): Pop it.
6128
6129 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6130
6131 DJGPP spefic issue. Inhibit the use of disallowed characters for
6132 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6133 and concern testsuite case 46.
6134 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6135 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6136 * djgpp/config.bat: Inhibit the use of disallowed characters.
6137
6138 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6139
6140 Miscellaneous %define and %code cleanup.
6141 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6142 values are interpreted.
6143 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6144 documentation a little more.
6145 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6146 muscle_percent_define_insert, muscle_percent_code_grow): New
6147 functions/macros.
6148 * src/muscle_tab.h (muscle_percent_define_insert,
6149 muscle_percent_code_grow): Prototype.
6150 * src/parse-gram.y (prologue_declaration): Use
6151 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6152 %define and %code directives.
6153
6154 Make it easy to share %define boolean variables between the front-end
6155 and back-end. Though not used yet, this will be useful in the future.
6156 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6157 Bison uses of names rather than just skeleton uses of names.
6158 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6159 b4_percent_define_skeleton_variables(VARIABLE) to
6160 b4_percent_define_bison_variables(VARIABLE).
6161 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6162 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6163 b4_percent_code_bison_qualifiers(QUALIFIER).
6164 (b4_check_user_names_wrap): Update for renames.
6165 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6166 muscle_percent_define_default): New functions mimicking
6167 b4_percent_define_flag_if and b4_percent_define_default.
6168
6169 For %define variables, report locations for invalid values and
6170 redefinitions.
6171 * data/bison.m4 (b4_percent_define_flag_if): Read
6172 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6173 value for VARIABLE.
6174 (b4_percent_define_default): Save a special location in
6175 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6176 must later be reported as invalid.
6177 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6178 functions.
6179 (muscle_percent_define_insert): Record the location of VARIABLE in
6180 muscle percent_define_loc(VARIABLE), and use it to report the previous
6181 location for a redefinition.
6182 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6183 (muscle_percent_define_default): Update like b4_percent_define_default.
6184 (muscle_grow_user_name_list): Rename to...
6185 (muscle_user_name_list_grow): ... this for consistency and use
6186 muscle_location_grow.
6187 * src/muscle_tab.h (muscle_location_grow): Prototype.
6188 * tests/input.at (%define errors): Update expected output.
6189 * tests/skeletons.at (%define boolean variables: invalid skeleton
6190 defaults): New test case.
6191
6192 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6193
6194 * src/print.c (lookahead_set, state_default_rule): Remove.
6195 (print_reductions): Replace state_default_rule invocation with
6196 equivalent use of yydefact, which was computed in token_actions in
6197 tables.c.
6198 (print_results): Don't allocate lookahead_set.
6199
6200 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
6201
6202 * data/lalr1.java: Prefix all private members with yy.
6203
6204 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6205
6206 Use YYFPRINTF instead of fprintf where appropriate. Reported by
6207 Sebastien Fricker at
6208 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6209 * THANKS: Add Sebastien Fricker.
6210 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6211 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6212 accept a variable number of arguments.
6213
6214 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6215
6216 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6217
6218 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6219
6220 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6221 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6222 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6223
6224 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6225
6226 Undo my 2007-02-07 change, switching back to the c-strcase module
6227 introduced in the 2007-02-03 change. Bruno Haible reported that
6228 the 2007-02-07 change would be dangerous in Turkish if we add a
6229 language whose name contains "i", since "i" is not lowercase "I"
6230 in Turkish.
6231 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6232 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6233 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6234 * m4/.cvsignore: Remove strcase.m4.
6235 * src/getargs.c: Revert 2007-02-07 change, as follows.
6236 Include c-strcase.h.
6237 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6238
6239 2007-02-11 Bruno Haible <bruno@clisp.org>
6240
6241 Enable the Java related testsuite tests when the only Java compiler
6242 found is a gcj < 4.3. Discussed at
6243 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6244 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6245
6246 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6247
6248 * data/Makefile.am: Update copyright date.
6249 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6250 yypstate_new returns NULL.
6251 (yypstate_new): Return NULL if malloc does.
6252 * src/reader.c (packgram): Move translation of rule actions from the
6253 beginning of packgram to...
6254 (check_and_convert_grammar): ... here right before packgram is invoked
6255 so it's easier to write more complete comments, and remove redundant
6256 code.
6257
6258 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6259
6260 As in semantic actions, make @$ in %initial-action, %destructor, and
6261 %printer imply %locations.
6262 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6263 scanning @$.
6264 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6265 (@$ in %initial-action implies %locations,
6266 @$ in %destructor implies %locations,
6267 @$ in %printer implies %locations): ... these new test cases.
6268
6269 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6270
6271 Undo most of the 2007-02-03 change, switching to the strcase module
6272 now that gnulib strcase has been fixed.
6273 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6274 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6275 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6276 * m4/.cvsignore: Add strcase.m4.
6277 * src/getargs.c: Revert 2007-02-03 change, as follows.
6278 Don't include c-strcase.h.
6279 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6280 strcasecmp has "unspecified behavior" outside the POSIX locale,
6281 but it works fine in practice if at least one argument is ASCII,
6282 as is the case in Bison.
6283
6284 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
6285
6286 * tests/java.at: Skip tests if only one of javac/java is present.
6287 Reported by Joel E. Denny.
6288 * tests/atlocal.in: Adjust copyright years.
6289
6290 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6291
6292 * data/lalr1.java (Stack): Work around old verifiers that disallow
6293 access to the private fields of an inner class, from the outer class.
6294 We can make Stack's fields public because user code doesn't have access
6295 to the instance of Stack used by parse(). Reported by Paul Eggert.
6296
6297 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6298
6299 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6300 the right spot for these files?
6301 * bootstrap.conf (gnulib_modules): Add c-strcase.
6302 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6303 c-strncasecmp.c.
6304 * src/getargs.c: Include c-strcase.h.
6305 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6306 to avoid unspecified behavior.
6307
6308 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6309
6310 * doc/bison.texinfo (Decl Summary): Correct typo.
6311
6312 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
6313
6314 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6315 Complain if the value does not match empty, "true" or "false".
6316 * data/c++.m4: Adjust default definitions of %define variables.
6317 * data/java.m4: Adjust default definitions of %define variables.
6318 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6319 to above behavior.
6320 * tests/input.at (Boolean %define variables): Test new behavior.
6321
6322 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
6323
6324 * NEWS: Mention java.
6325 * TODO: Remove things that are done.
6326 * bootstrap.conf: Add javacomp-script and javaexec-script.
6327 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6328
6329 * data/Makefile.am: Add new files.
6330 * data/java-skel.m4: New.
6331 * data/java.m4: New.
6332 * data/lalr1.java: New.
6333
6334 * doc/bison.texinfo: Put "A Complete C++ Example" under
6335 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6336 under Other Languages.
6337
6338 * src/getargs.c (valid_languages): Add Java.
6339 * src/getargs.h (struct bison_language): Update size of string fields.
6340
6341 * tests/Makefile.am: Add java.at.
6342 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6343 * tests/java.at: New.
6344 * tests/testsuite.at: Include it.
6345
6346 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6347
6348 Clean up.
6349 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6350 at_directive_argv arguments so these no longer have to be global
6351 variables. Also, update the implementation for the following changes.
6352 (fail_for_at_directive_too_many_args,
6353 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6354 (at_directive_name): Remove as at_directive_argv[0] will be used for
6355 this now.
6356 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6357 for the directive name.
6358 (at_directive_argc, at_directive_argv): Make these local within
6359 skel_lex instead of global.
6360 (INITIAL): Update directive start action for above changes.
6361 (SC_AT_DIRECTIVE_ARG): Rename to...
6362 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6363 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6364 (scan_skel): Move yylex_destroy to...
6365 (skel_scanner_free): ... here.
6366 * tests/skeletons.at (installed skeleton file name): Rename to...
6367 (installed skeleton file names): ... this.
6368
6369 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6370
6371 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6372 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6373 Summary" not "Directives".
6374 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6375 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6376 since the former is now the more complete one.
6377 (Prologue Alternatives): Likewise and do the same for %defines.
6378 (Table of Symbols): Add summary of %code, add summary of %define, and
6379 move full %code documentation to...
6380 (Decl Summary): ... here for consistency with other entries in these
6381 sections.
6382 Move %define entry in order to keep this list alphabetized.
6383 Reword %define entry a little to put less emphasis on the skeleton
6384 concept, which most users shouldn't have to think about.
6385
6386 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6387
6388 Adjust to recent gnulib changes.
6389 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6390 Add string.h, string_.h, unistd_.h, wchar_.h.
6391 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6392 * src/system.h: Don't include <stpcpy.h>; this is now done by
6393 <string.h>.
6394
6395 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
6396
6397 Simplify implementation of unqualified %code, implement macros for
6398 uniform treatment of boolean %define flags. Document %define.
6399 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6400 b4_percent_code_ifdef): New.
6401 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6402 * data/c++.m4: Define default value for global_tokens_and_yystype.
6403 * data/glr.cc: Likewise.
6404 * data/location.cc: Use b4_percent_define_flag_if.
6405
6406 * doc/bison.texinfo (Decl Summary): Document %define.
6407
6408 * src/parse-gram.y (Unqualified %code): Change muscle name to
6409 b4_percent_code().
6410 (content.opt): Default to empty.
6411
6412 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6413
6414 Implement support for relative and absolute skeleton file names.
6415 Discussed starting at
6416 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6417 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6418 (Bison Options): Document in --skeleton entry.
6419 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6420 full_skeleton can't necessarily hold all of pkgdatadir.
6421 If the specified skeleton file name contains a `/', don't prepend
6422 pkgdatadir.
6423 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6424 file name contains a `/', prepend the grammar file directory.
6425 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6426 * skeletons.at: New file.
6427 (relative skeleton file names): New test case.
6428 (installed skeleton file names): New test case.
6429 * tests/testsuite.at: Include skeletons.at.
6430
6431 * bootstrap: Update copyright to 2007.
6432
6433 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
6434
6435 * bootstrap: Remove occurrences of .#bootmp from the files.
6436
6437 2007-01-17 Akim Demaille <akim@epita.fr>
6438
6439 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6440 nonterminals.
6441 Use per-type %printer.
6442
6443 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6444
6445 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6446 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6447 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6448 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6449 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6450 tests/glr-regression.at, tests/input.at, tests/local.at,
6451 tests/output.at, tests/torture.at: Update copyright to 2007.
6452
6453 2007-01-16 Akim Demaille <akim@epita.fr>
6454
6455 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6456 error code.
6457 (Calc++ Scanner): Exit with failure if we can't open the input
6458 file.
6459 Accept "-" standing for stdin.
6460 (Calc++ Top Level): Print the result only if the parsing was
6461 successful.
6462
6463 2007-01-16 Akim Demaille <akim@epita.fr>
6464
6465 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6466
6467 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
6468 and Joel E. Denny <jdenny@ces.clemson.edu>
6469
6470 Clean up %define and %code implementation in M4 some. Most
6471 importantly, rename all related macros to be in the b4_percent_define
6472 and b4_percent_code namespaces. Also, complete support for `.' in
6473 %define variable names and %code qualifiers.
6474 * data/bison.m4 (b4_check_user_names): Check for special
6475 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6476 m4_foreach loops.
6477 (b4_get_percent_define, b4_get_percent_code): Rename to...
6478 (b4_percent_define_get, b4_percent_code_get): ... these.
6479 Extend documentation with examples.
6480 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6481 b4_percent_define_skeleton_variables and
6482 b4_percent_code_skeleton_qualifiers.
6483 Expect any value for the %define variable `foo' to be stored in the
6484 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6485 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6486 expect any unqualified %code blocks to be stored in a macro named
6487 `b4_percent_code_unqualified'.
6488 Use m4_indir so that %define variable names and %code qualifiers can
6489 contain `.', which is allowed by the grammar parser.
6490 (b4_percent_define_default): New macro to set a default value for a
6491 %define variable.
6492 (m4_wrap): Update wrapped code, and fix some underquoting.
6493 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6494 Expect grammar uses of %define variables and %code qualifiers to be
6495 defined in b4_percent_define_user_variables and
6496 b4_percent_code_user_qualifiers.
6497 * data/c++.m4: Use b4_percent_define_default rather than
6498 m4_define_default. Fix some underquoting. Skeleton usage of %define
6499 variable define_location_comparison now implies skeleton usage of
6500 %define variable filename_type.
6501 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6502 data/push.c, data/yacc.c: Update macro names.
6503 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6504 muscle names.
6505
6506 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6507
6508 DJGPP specific issues.
6509
6510 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6511 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6512
6513 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6514
6515 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6516 run parsers in all tests so that Valgrind is invoked during
6517 maintainer-check-valgrind.
6518 (Duplicate representation of merged trees): Free all semantic values.
6519 (Duplicated user destructor for lookahead): Likewise.
6520
6521 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6522
6523 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6524 command-line prefix.
6525 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6526 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6527 miss Valgrind messages.
6528 (Exploding the Stack Size with Malloc): Likewise.
6529
6530 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6531
6532 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6533 locals. Reported by Juan Manuel Guerrero at
6534 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6535 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6536 Fix some indentation also.
6537 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6538 explaining this issue.
6539
6540 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
6541 and Joel E. Denny <jdenny@ces.clemson.edu>
6542
6543 Simplify union and prologue handling, and escape union and lex/parse
6544 params with digraphs.
6545 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
6546 values to the empty string since these are no longer guaranteed
6547 initialized by the front-end.
6548 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
6549 braces around b4_user_stype since this is no longer done by the
6550 front-end.
6551 * src/files.c, src/files.h (pre_prologue_obstack,
6552 post_prologue_obstack): Remove.
6553 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
6554 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
6555 with digraphs. This fixes lex params and parse params.
6556 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
6557 * src/output.c (prepare): Remove muscle insertion of the prologues.
6558 (output): Remove freeing of pre_prologue_obstack and
6559 post_prologue_obstack.
6560 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
6561 than prologue_augment for prologue parsing so you don't need prologue
6562 obstacks.
6563 (grammar_declaration): For %union RHS, use `braceless' instead of
6564 "{...}" so that braces are already stripped and code is escaped with
6565 digraphs.
6566 * src/reader.c (prologue_augment): Remove.
6567 (reader): Remove initialization of pre_prologue_obstack and
6568 post_prologue_obstack.
6569 * src/reader.h (prologue_augment): Remove.
6570
6571 * data/c.m4: Remove stray parenthesis.
6572
6573 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6574
6575 Remove quotes from variables names in %define directives and from
6576 qualifiers in %code directives, and restrict the characters that are
6577 allowed in them to M4-friendly ones. For %define, continue to support
6578 the quoted form as a deprecated feature. Discussed starting at
6579 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
6580 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
6581 %code.
6582 * doc/bison.texinfo (Prologue Alternatives): Update.
6583 (Decl Summary): In %defines entry, update mention of `%code requires'
6584 and `%code provides'.
6585 (C++ Location Values): Update %define uses.
6586 (Calc++ Parser Interface): Likewise.
6587 (Calc++ Parser): Likewise, and update `%code requires' uses.
6588 (Table of Symbols): Update %code documentation.
6589 * src/parse-gram.y (prologue_declaration): For %define variables, use
6590 `variable' instead of `STRING'.
6591 (grammar_declaration): For %code qualifiers, use `ID' instead of
6592 `STRING'.
6593 (variable): New nonterminal that takes an `ID' or a `STRING'.
6594 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
6595 and %define uses.
6596 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
6597 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
6598 (%define errors): Update %define uses.
6599
6600 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6601
6602 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
6603 instead of muscle_insert for %define values so that M4-special
6604 characters are replaced with digraphs.
6605 * tests/input.at (%define errors): Extend to check weird values.
6606
6607 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6608
6609 Instead of having skeletons declare all valid %define variables and
6610 %code qualifiers, provide macros that retrieve the associated values
6611 and build these lists automatically. Thus Bison will now warn when a
6612 variable or qualifier is not used by the skeleton in the current
6613 invocation regardless of whether it might sometimes be used by that
6614 skeleton in other invocations. Also, move all %define value macros to
6615 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
6616 form, which is replaced by %code.
6617 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
6618 (b4_check_user_names): ... this, and change the series of valid name
6619 arguments to a single list argument for names used in the skeleton
6620 similar to the existing list argument for names used in the grammar.
6621 Warn instead of complaining.
6622 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
6623 values and %code code, to format %code code properly, and to build
6624 lists of all %define variables and %code qualifiers used in the
6625 skeleton: b4_skeleton_percent_define_variables and
6626 b4_skeleton_percent_code_qualifiers.
6627 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
6628 Remove, and...
6629 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
6630 the skeleton names lists can finish building first. In place of
6631 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
6632 expect the lists b4_user_percent_define_variables and
6633 b4_user_percent_code_qualifiers.
6634 * data/c++.m4: Where setting default values for b4_parser_class_name,
6635 b4_location_type, b4_filename_type, b4_namespace, and
6636 b4_define_location_comparison, update their names to the
6637 b4_percent_define_ namespace.
6638 * data/glr.c: Don't use b4_check_percent_define_variables and
6639 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6640 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
6641 (b4_parser_class_name, b4_namespace): Define these using
6642 b4_get_percent_define for parser_class_name and namespace.
6643 * data/location.cc: Use b4_get_percent_define.
6644 * data/push.c: Don't use b4_check_percent_define_variables and
6645 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6646 * data/yacc.c: Likewise, and don't call m4_exit in
6647 b4_use_push_for_pull_if or m4_wrap code will never execute.
6648 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
6649 Rename to...
6650 (muscle_grow_user_name_list): ... this for consistency with the
6651 terminology used in bison.m4.
6652 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
6653 %define variable names, and rename muscle used_percent_define_variables
6654 to user_percent_define_variables.
6655 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
6656 user_percent_code_qualifiers.
6657 (content): Remove.
6658 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
6659 {CODE} form is no longer accepted.
6660 * tests/input.at (Reject bad %code qualifiers): Rename to...
6661 (Reject unused %code qualifiers): ... this, and update test output.
6662 (%define error): Update test output.
6663
6664 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
6665
6666 Check for unrecognized %define variables similar to checking for
6667 unrecognized %code qualifiers. Check for redefined %define variables.
6668 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
6669 generalizes...
6670 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
6671 (b4_check_percent_define_variables): New, also wraps it.
6672 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
6673 variables using b4_check_percent_define_variables.
6674 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
6675 all those exercised in the test suite and all those listed in the
6676 `Default values' section of c++.m4. Are there others?
6677 * data/push.c, data/yacc.c: Declare no valid %define variables.
6678 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
6679 similar to muscle_find, but it works even when the muscle stores a
6680 const value.
6681 (muscle_grow_used_name_list): New function for constructing the used
6682 name list muscles that b4_check_for_unrecognized_names requires.
6683 * src/parse-gram.y (prologue_declaration): Warn if a variable is
6684 %define'd more than once. Define the b4_used_percent_define_variables
6685 muscle with muscle_grow_used_name_list.
6686 (grammar_declaration): Abbreviate %code code with
6687 muscle_grow_used_name_list.
6688 * tests/input.at (%define errors): New.
6689
6690 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6691
6692 Provide warn_at, complain_at, and fatal_at function callbacks to the
6693 skeletons, and use this for %code qualifier complaints.
6694 * data/bison.m4 (b4_error_at): New, invoked by...
6695 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
6696 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
6697 @fatal_at(...@) directives.
6698 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
6699 qualifiers in b4_used_percent_code_qualifiers and to use
6700 b4_complain_at.
6701 * src/location.c, src/location.h (boundary_set_from_string): New global
6702 function.
6703 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
6704 function.
6705 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
6706 to b4_used_percent_code_qualifiers.
6707 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
6708 function.
6709 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
6710 (lineno): Rename to...
6711 (out_lineno): ... this so I don't misunderstand it again.
6712 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
6713 here; these newlines are in the input but not the output file.
6714 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
6715 (at_directive_perform): ... this new static function, and add handling
6716 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
6717 directives.
6718 * tests/input.at (Reject bad %code qualifiers): Update test output with
6719 locations and extend.
6720
6721 * tests/output.at (Output file name: [, Output file name: ]): Remove
6722 bogus comment about these tests failing.
6723
6724 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6725
6726 Clean up b4_check_percent_code_qualifiers a little.
6727 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
6728 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
6729 documentation and add examples.
6730 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
6731 qualifiers here.
6732
6733 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6734
6735 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
6736 unreliable -- especially when they're hidden inside another macro.
6737 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
6738 data/c.m4: Remove m4_divert(-1).
6739 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6740 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
6741 m4_divert_push(0) and m4_divert_pop(0).
6742 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
6743 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
6744 pushed and popped by m4sugar, should be first on the stack.
6745
6746 Provide warn, complain, and fatal function callbacks to the skeletons.
6747 This provides more flexibility than m4_fatal, improves the error
6748 message format, and captures messages for translation. Discussed
6749 starting at
6750 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
6751 * data/bison.m4 (b4_error): New, invoked by...
6752 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
6753 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
6754 directives. Because these M4 macros might be called when the current
6755 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
6756 the previous removal of uses of m4_divert, which caused trouble.
6757 (b4_check_percent_code_qualifiers): Use b4_complain instead of
6758 m4_fatal to report unrecognized %code qualifiers.
6759 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
6760 push parser requests.
6761 * data/glr.c: Use b4_complain instead of m4_fatal to report
6762 non-deterministic push parser requests.
6763 Update @output usage to @output(...@) form.
6764 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
6765 report missing %defines. Update @output usage to @output(...@) form.
6766 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
6767 @output(...@) form.
6768 * src/main.c (main): Invoke skel_scanner_free.
6769 * src/scan-skel.h (skel_scanner_free): Prototype new function.
6770 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
6771 obstack_for_string from flex-scanner.h.
6772 (YY_DECL): Use to declare skel_lex static.
6773 (decode_at_digraphs): Remove; now handled in the new
6774 SC_AT_DIRECTIVE_ARG start condition.
6775 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
6776 functions.
6777 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
6778 at_directive_argv): New static globals.
6779 (INITIAL): Use fail_for_invalid_at.
6780 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
6781 recognize the start of a generalized `@directive(...@)' form and
6782 start...
6783 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
6784 directive args (using the new obstack_for_string), to decode the
6785 contained @ diagraphs, and to perform the directive. It recognizes
6786 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
6787 @output(...@).
6788 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
6789 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
6790 `@,'.
6791 (scan_skel): Initialize obstack_for_string on the first call.
6792 (skel_scanner_free): New function to free obstack_for_string.
6793 * tests/input.at (Reject bad %code qualifiers): Update test output.
6794
6795 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
6796
6797 Consolidate the 4 prologue alternative directives (%code, %requires,
6798 %provides, and %code-top) into a single %code directive with an
6799 optional qualifier field. Discussed at
6800 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
6801 * NEWS (2.3a+): Rewrite the existing entry for the prologue
6802 alternatives.
6803 * doc/bison.texinfo (Prologue Alternatives): Update.
6804 (Decl Summary): Update to %code "requires" and %code "provides".
6805 (Calc++ Parser): Update to %code "requires".
6806 (Table of Symbols): Remove entries for %requires, %provides, and
6807 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
6808 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
6809 are replaced by b4_percent_code_provides and b4_percent_code_requires,
6810 which are skeleton-specific.
6811 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
6812 declare what %code qualifiers it supports and to complain if any other
6813 qualifiers were used in the grammar.
6814 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
6815 and b4_user_code([b4_percent_code_provides]) in place of
6816 b4_user_requires and b4_user_provides.
6817 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
6818 Add b4_user_code([b4_percent_code_top]) and
6819 b4_user_code([b4_percent_code]).
6820 Invoke b4_check_percent_code_qualifiers.
6821 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6822 PERCENT_REQUIRES): Remove.
6823 (grammar_declaration): Remove RHS's for %code-top, %provides, and
6824 %requires. Rewrite the %code RHS as the unqualified form defining the
6825 muscle b4_percent_code. Add another RHS for the qualified %code form,
6826 which defines muscles of the form b4_percent_code_QUALIFIER and the
6827 b4_used_percent_code_qualifiers muscle.
6828 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6829 PERCENT_REQUIRES): Remove.
6830 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
6831 %code "requires" and %code "provides".
6832 * tests/input.at (Reject bad %code qualifiers): New.
6833
6834 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6835
6836 Use the new code_props interface for destructors and printers.
6837 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
6838 printer_location members, and change the type of the destructor and
6839 printer members to code_props.
6840 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
6841 symbol_printer_get, semantic_type_destructor_set,
6842 semantic_type_printer_set, default_tagged_destructor_set,
6843 default_tagless_destructor_set, default_tagged_printer_set,
6844 default_tagless_printer_set): Use code_props in arguments and return
6845 types in place of char const * and location.
6846 (symbol_destructor_location_get, symbol_printer_location_get): Remove
6847 since the locations are now contained in the return of
6848 symbol_destructor_get and symbol_printer_get.
6849 * src/output.c (symbol_destructors_output, symbol_printers_output):
6850 Replace with...
6851 (symbol_code_props_output): ... this to eliminate duplicate code.
6852 (output_skeleton): Update to use symbol_code_props_output.
6853 * src/reader.c (symbol_should_be_used): Update use of
6854 symbol_destructor_get.
6855 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6856 Update uses of the various _destructor_set and _printer_set functions.
6857 * src/symtab.c: (default_tagged_destructor_location,
6858 default_tagless_destructor_location, default_tagged_printer_location,
6859 default_tagless_printer_location): Remove since we...
6860 (default_tagged_destructor, default_tagless_destructor,
6861 default_tagged_printer, default_tagless_printer): ... change the type
6862 of these to code_props.
6863 (symbol_new, semantic_type_new, symbol_destructor_set,
6864 semantic_type_destructor_set, symbol_destructor_get,
6865 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
6866 symbol_check_alias_consistency, default_tagged_destructor_set,
6867 default_tagless_destructor_set, default_tagged_printer_set,
6868 default_tagless_printer_set): Update.
6869 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
6870 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
6871 code_props members.
6872 (symbol_print): Use SYMBOL_CODE_PRINT.
6873
6874 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6875
6876 Use the new code_props interface for rule actions.
6877 * src/symlist.h (symbol_list): Replace action, action_location, and
6878 used members with a code_props action_props member.
6879 * src/reader.c (symbol_should_be_used, grammar_rule_check,
6880 grammar_midrule_action, grammar_current_rule_merge_set,
6881 grammar_current_rule_symbol_append, packgram): Update.
6882 * src/scan-code.h (translate_rule_action): Remove, no longer used.
6883 * src/scan-code.l (handle_action_dollar): Update.
6884 (translate_rule_action): Remove, no longer used.
6885 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
6886
6887 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6888
6889 Use the new code_props interface in parse-gram.y.
6890 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
6891 Update all uses of translate_* functions to use the new code_props
6892 interface and to use gram_scanner_last_string_free and
6893 code_scanner_last_string_free where possible.
6894 (grammar_declaration): symbol_list_destructor_set and
6895 symbol_list_printer_set now perform the translation, so don't do it
6896 here. Use gram_scanner_last_string_free where possible.
6897 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
6898 translate_code): Remove, no longer used.
6899 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
6900 symbol_list_printer_set): Perform code translation here rather than
6901 depending on the caller to do so.
6902
6903 * src/symlist.h (struct symbol_list): Correct some documentation typos.
6904 * src/scan-gram.h (gram_last_string): Remove declaration.
6905 * src/scan-gram.l (last_string): Declare it static.
6906
6907 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6908
6909 Encapsulate code properties and related functionality for the various
6910 destructors, printers, and actions into a code_props structure and
6911 interface. This patch merely implements code_props in scan-code.h and
6912 scan-code.l. Future patches will rewrite other modules to use it.
6913 Discussed starting at
6914 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
6915 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
6916 consistently initialize const structs that have an empty location
6917 field.
6918 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
6919 to ensure consistency.
6920 * src/scan-code.h (code_props): New structure.
6921 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
6922 function, macro, and const global variable for initializing a
6923 code_props with no code.
6924 (code_props_plain_init, code_props_symbol_action_init,
6925 code_props_rule_action_init, code_props_translate_code): The rest of
6926 the new code_props functional interface. Among other things, the init
6927 functions set the code_props kind field so that
6928 code_props_translate_code will know whether to behave like
6929 translate_symbol_action, translate_rule_action, or translate_code.
6930 These old translate functions must remain until all other modules are
6931 updated to use the new code_props interface.
6932 (code_scanner_last_string_free): New function similar to
6933 gram_scanner_last_string_free.
6934 (code_scanner_free): Add documentation.
6935 * src/scan-code.l: Implement the new interface.
6936 (code_lex): Make it static, add a code_props* argument, and remove the
6937 rule argument.
6938 (last_string): New static global similar to the one in scan-gram.l.
6939 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
6940 instead of rule.
6941 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
6942 code_props since Bison may one day use this information for destructors
6943 and printers.
6944 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
6945 (handle_action_dollar): Use symbol_list_n_get and set used flag
6946 directly since symbol_list_n_used_set is removed.
6947 (translate_action): Add a code_props* argument and remove the rule,
6948 action, and location arguments. Pass the code_props* on to code_lex.
6949 (translate_rule_action, translate_symbol_action, translate_code):
6950 Rewrite as wrappers around the new code_props interface.
6951 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
6952 it would eventually need to break the encapsulation of code_props.
6953
6954 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6955
6956 * etc/.cvsignore: New.
6957
6958 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6959
6960 Add maintainer-push-check to run maintainer-check using push parsing in
6961 place of pull parsing where available.
6962 * Makefile.am (maintainer-push-check): New.
6963 * data/bison.m4 (b4_use_push_for_pull_if): New.
6964 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
6965 appropriately based on their existing values.
6966 (yypush_parse): Don't print push-parser-specific diagnostics if push
6967 parsing is being used in place of pull parsing.
6968 * data/yacc.c: If push parsing should replace pull parsing, redirect to
6969 push.c.
6970 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
6971 variable, and insert b4_use_push_for_pull_flag into muscles.
6972 * tests/Makefile.am (maintainer-push-check): New.
6973
6974 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6975
6976 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
6977 (whether successful or failed) so that yypush_parse can be invoked
6978 again to start a new parse using the same yypstate.
6979 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
6980 check multiple yypull_parse invocations on the same yypstate. For pull
6981 mode, extend to check multiple yyparse invocations.
6982 (Exploding the Stack Size with Alloca): Extend to try with
6983 %push-pull-parser.
6984 (Exploding the Stack Size with Malloc): Likewise.
6985
6986 * tests/calc.at (Simple LALR Calculator): Don't specify
6987 %skeleton "push.c" since %push-pull-parser implies that now.
6988 * tests/headers.at (export YYLTYPE): Don't check for the push
6989 declarations. Otherwise, this test case can't be used to see if push
6990 mode can truly emulate pull mode.
6991 * tests/input.at (Torturing the Scanner): Likewise.
6992 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
6993 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
6994 AT_YACC_IF, which now includes the case of push mode since %skeleton
6995 need not be used for push mode. This will be more intuitive once
6996 push.c is renamed to yacc.c.
6997
6998 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6999
7000 For push mode, convert yyparse from a macro to a function, invoke yylex
7001 instead of passing a yylexp argument to yypull_parse, and don't
7002 generate yypull_parse or yyparse unless %push-pull-parser is declared.
7003 Discussed starting at
7004 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
7005 * data/bison.m4 (b4_pull_if): New.
7006 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
7007 * data/push.c: Improve M4 quoting a little.
7008 (b4_generate_macro_args, b4_parenthesize): Remove.
7009 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
7010 any time a pull parser is requested.
7011 Don't #define this as a wrapper around yypull_parse. Instead, when
7012 both push and pull are requested, make it a function that does that
7013 same thing.
7014 (yypull_parse): If there's a b4_prefix, #define this to
7015 b4_prefix[pull_parse] when both push and pull are requested.
7016 Don't define this as a function unless both push and pull are
7017 requested.
7018 Remove the yylexp argument and hard-code yylex invocation instead.
7019 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
7020 %push-parser.
7021 * src/getargs.c (pull_parser): New global initialized to true.
7022 * getargs.h (pull_parser): extern it.
7023 * src/output.c (prepare): Insert pull_flag muscle.
7024 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
7025 (prologue_declaration): Set both push_parser and pull_parser = true for
7026 %push-pull-parser. Set push_parser = true and pull_parser = false for
7027 %push-parser.
7028 * src/scan-gram.l: Don't accept %push_parser as an alternative to
7029 %push-parser since there's no backward-compatibility concern here.
7030 Scan %push-pull-parser.
7031 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
7032 instead of %push-parser.
7033 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
7034 prototype it in the module that calls yyparse.
7035 * tests/input.at (Torturing the Scanner): Likewise.
7036 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
7037
7038 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
7039
7040 Update etc/bench.pl. Optimize push mode a little (the yyn change
7041 deserves most of the credit).
7042 * Makefile.am (SUBDIRS): Add etc subdirectory.
7043 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
7044 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
7045 yytoken, yyval, and yyloc declarations to...
7046 (yyparse or yypush_parse): ... here to improve performance. For
7047 yypush_parse invocations after the first, be sure to assign yyn its old
7048 value again.
7049 (yypstate_new): Don't bother initializing the yyresult field since the
7050 initial value isn't used.
7051 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
7052 remove the #define that, in push mode, set it to yyps->NAME.
7053 * etc/Makefile.am: New.
7054 * etc/bench.pl: Remove and build it instead from...
7055 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
7056 "tests/bison" from the build directory by default rather than just
7057 invoking "bison" from $PATH.
7058 (calc_grammar): Update push parser code: don't declare yylval globally,
7059 don't define yyparse_wrapper, and don't #define yyparse.
7060 (bench_grammar): Update to check all working combinations of yacc.c,
7061 push.c, impure, pure, pull, and push.
7062
7063 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7064
7065 For push mode, add pull wrappers around yypush_parse.
7066 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
7067 (yypull_parse): New function wrapping yypush_parse.
7068 (yyparse): New #define wrapping yypull_parse.
7069 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
7070 is declared.
7071 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
7072 prototype yylex in the module that calls yyparse, and don't prototype
7073 yyparse there. Otherwise, the yyparse expansion won't compile.
7074 * tests/input.at (Torturing the Scanner): Likewise.
7075
7076 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
7077
7078 Enable push parsers to operate in impure mode. Thus, %push-parser no
7079 longer implies %pure-parser. The point of this change is to move
7080 towards being able to test the push parser code by running the entire
7081 test suite as if %push-parser had been declared.
7082 * data/push.c (yypush_parse): For impure mode, remove the
7083 yypushed_char, yypushed_val, and yypushed_loc arguments.
7084 Instead, declare these as local variables initialized to the global
7085 yychar, yylval, and yylloc.
7086 For the first yypush_parse invocation only, restore the initial values
7087 of these global variables when it's time to read a token since they
7088 have been overwritten.
7089 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
7090 %push-parser.
7091 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7092 %pure-parser along with %push-parser since this test case was designed
7093 for pure push parsers.
7094 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7095 (AT_YACC_OR_PUSH_IF): New.
7096 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7097 add a note that it's still wrong for some cases (as it has been for a
7098 while).
7099 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7100 %push-parser no longer implies %pure-parser.
7101
7102 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7103
7104 Remove some unnecessary differences between the pull parser code and
7105 the push parser code. This patch enables yynerrs in push mode.
7106 * data/push.c: Reformat M4 a little.
7107 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7108 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7109 because push mode is on. Instead, if pure mode is on, move yynerrs
7110 to...
7111 (b4_declare_parser_state_variables): ... here.
7112 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7113 to yyps->NAME so it can be used in yypush_parse.
7114 (yypush_parse): Don't omit uses of yynerrs in push mode.
7115
7116 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7117
7118 Fix bug such that the first pushed token's value and location are
7119 sometimes overwritten (sometimes by %initial-action) before being used.
7120 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7121 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7122 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7123 more closely mimic the pull parser logic.
7124 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7125 time to read a token, which is after any initialization of yylval and
7126 yylloc.
7127 (gottoken): Rename label to...
7128 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7129 user namespace.
7130
7131 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7132
7133 Rearrange initialization of the parser state variables so that the
7134 skeleton doesn't have to have a copy for pull mode and another for push
7135 mode. This patch also fixes at least a bug such that yylloc was not
7136 initialized (with b4_location_initial_line and
7137 b4_location_initial_column) upon calling yypush_parse. However, that
7138 initialization now overwrites the first token's location;
7139 %initial-action assigning @$ already did the same thing, and both bugs
7140 will be fixed in a later patch.
7141 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7142 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7143 yyss, yyvs, yyls, and yystacksize.
7144 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7145 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7146 yylsp.
7147 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7148 yyps->NAME so it can be used in yypush_parse.
7149 (yyparse or yypush_parse): For yypush_parse, don't print the
7150 "Starting parse" diagnostic for invocations after the first.
7151 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7152 yypush_parse, only do it for the first invocation.
7153 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7154 initialization to occur in yypush_parse but only on the first
7155 invocation.
7156
7157 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7158
7159 * data/push.c: Add CPP guards around push parser declarations in both
7160 the header and the code file.
7161 In the code file, move the push parser declarations to the same place
7162 they appear in the header file.
7163 Clean up the M4 some, especially the inconsistent underquoting in
7164 some b4_c_function_def and b4_c_function_decl uses.
7165
7166 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7167
7168 Encapsulate the push parser state variables into an M4 macro so the
7169 push skeleton doesn't have to list them again for pull mode's yyparse.
7170 For push mode, remove yypush_parse's local equivalents of these
7171 variables to eliminate unnecessary copying between the two sets at
7172 run-time. This patch also fixes at least a bug related to multiple
7173 %initial-action invocations in push mode.
7174 * data/push.c (b4_declare_parser_variables): Rename to...
7175 (b4_declare_scanner_communication_variables): ... this for clarity and
7176 update both uses.
7177 (b4_declare_yyparse_variables): Remove and move its contents to the one
7178 spot where it was invoked.
7179 (b4_declare_parser_state_variables): New macro containing the parser
7180 state variables required by push mode.
7181 (struct yypstate): Replace all fields but yynew with
7182 b4_declare_parser_state_variables.
7183 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7184 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7185 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7186 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7187 parser state variable declarations with
7188 b4_declare_parser_state_variables.
7189 Don't initialize parser state variables when calling yypush_parse since
7190 yypstate_new already does that.
7191 Invoke the user's initial action only upon the first yypush_parse
7192 invocation.
7193 Remove all code that copies between the local parser state variables
7194 and the yypstate.
7195
7196 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7197
7198 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7199 prevent a name collision in a future patch where these names will
7200 sometimes be #define'd.
7201 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7202 since it no longer has the same name as the existing argument.
7203 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7204
7205 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
7206 and Joel E. Denny <jdenny@ces.clemson.edu>
7207
7208 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7209 that the argument is case-insensitive, and there's no `=' here.
7210 For the %skeleton entry, mention that %language is better.
7211 (Bison Options): Likewise for --language and --skeleton. Move the
7212 --skeleton entry so that the `Tuning the parser' section is sorted
7213 alphabetically on long options.
7214 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7215 %language directive in detail here; cross-reference the %language
7216 documentation instead.
7217 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7218 `%require "2.3b"' so that the example is always up-to-date.
7219 (Table of Symbols): Add entries for %language and %skeleton.
7220 * examples/extexi (normalize): Instead of replacing every %require
7221 argument with the current Bison version, just substitute for
7222 `@value{VERSION}'. This guarantees that we're testing what actually
7223 appears in the documentation.
7224 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7225 rather than `@VERSION@'.
7226
7227 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7228
7229 * NEWS: Reword the %language news a bit, and put it earlier.
7230
7231 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7232 Rewrite to simplify the logic.
7233 (language_argmatch): Likewise.
7234 (program_name): We now own this var.
7235 * src/getargs.h (struct bison_language): Use char[] rather than
7236 const char *.
7237
7238 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7239 Java is supported.
7240 * src/complain.c (program_name): Remove decl; no longer needed.
7241 * src/main.c (program_name): Remove; now belongs to getargs.
7242
7243 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
7244
7245 * NEWS: Document %language.
7246
7247 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7248
7249 * data/c-skel.m4, data/c++-skel.m4: New files.
7250 * data/glr.c: Complain on push parsers.
7251
7252 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7253 over %skeleton.
7254 (Decl Summary): Document %language and %skeleton.
7255 (Command line): Document -L.
7256
7257 * examples/extexi: Rewrite %require directive.
7258 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7259
7260 * src/files.c (compute_exts_from_gc): Look in language structure
7261 for .y extension.
7262 (compute_file_name_parts): Check whether .tab should be added.
7263 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7264 (language, skeleton_arg, language_argmatch): New.
7265 (long_options): Add --language.
7266 (getargs): Use skeleton_arg, add -L/--language.
7267 * src/getargs.h: Include location.h.
7268 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7269 * src/output.c (prepare): Pick default skeleton from struct language.
7270 Don't dispatch C skeletons here.
7271 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7272 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7273 * src/scan-gram.l ("%language"): New rule.
7274
7275 * tests/calc.at: Test %skeleton and %language.
7276 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7277 (AT_GLR_IF): Look for %skeleton "glr.cc".
7278 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7279 (AT_YACC_IF): Reject %language.
7280
7281 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7282
7283 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7284 since it wasn't used; only the typedef name 'semantic_type' is needed.
7285 Also, omit trailing white space.
7286
7287 * bootstrap: Sync from coreutils.
7288 (gnulib_extra_files): Add build-aux/announce.gen.
7289 (slurp): Adjust .gitignore files like .cvsignore files.
7290 * build-aux/announce-gen: Remove from CVS, since bootstrap
7291 now creates this.
7292
7293 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7294
7295 Make %push-parser imply %pure-parser. This fixes several bugs; see
7296 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7297 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7298 pure_parser = true.
7299 * data/push.c: Don't bother testing b4_push_if when deciding whether
7300 to expand b4_declare_parser_variables globally.
7301 (yypush_parse): Likewise in here.
7302
7303 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7304 (yy_reduce_print): Reformat M4 for readability.
7305
7306 2006-12-15 Bob Rossi <bob@brasko.net>
7307 and Joel Denny <jdenny@ces.clemson.edu>
7308
7309 * data/push.c (yypstate): Add typedef, and update all uses of
7310 struct yypstate to just yypstate.
7311 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7312
7313 2006-12-14 Bob Rossi <bob@brasko.net>
7314
7315 * data/push.c (yypush_parse): Declare prototype regardless of
7316 %locations option.
7317
7318 2006-12-14 Bob Rossi <bob@brasko.net>
7319
7320 * data/push.c (yyparse): Remove the prototype and the #define when in
7321 push-parser mode.
7322
7323 2006-12-13 Bob Rossi <bob@brasko.net>
7324
7325 * data/push.c (yypstate_init): Rename to...
7326 (yypstate_new): ... this and use b4_c_function_def.
7327 (yypstate_delete): New.
7328 (yypush_parse): Change parameters yynval and yynlloc to be const.
7329 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7330 yypstate_delete functions.
7331
7332 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7333
7334 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7335 strange test case titles. Reported by Bob Rossi.
7336
7337 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7338
7339 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7340 of potential ambiguities in GLR grammers.
7341
7342 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7343
7344 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7345 `bison ', use m4_index instead of m4_substr since chopping up a string
7346 containing M4-special characters causes problems here.
7347
7348 Fix a couple of bugs related to special characters in user-specified
7349 file names, and make it easier for skeletons to compute output file
7350 names with the same file name prefix as Bison-computed output file
7351 names.
7352 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7353 b4_parser_file_name and b4_spec_defines_file instead of
7354 @output_parser_name@ and @output_header_name@, which are now redundant.
7355 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7356 b4_parser_file_name, b4_spec_defines_file, and the new
7357 @basename(FILENAME@) instead of @output_parser_name@ and
7358 @output_header_name@, which inappropriately escaped the file names as
7359 C string literals.
7360 * src/files.c (all_but_ext): Remove static qualifier.
7361 (compute_output_file_names): Move `free (all_but_ext)' to...
7362 (output_file_names_free): ... here since all_but_ext is needed later.
7363 * src/files.h (all_but_ext): Extern.
7364 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7365 exactly what MUSCLE_INSERT_STRING used to do.
7366 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7367 characters are escaped properly.
7368 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7369 all_but_ext.
7370 For pkgdatadir muscle, maintain previous functionality by using
7371 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7372 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7373 digraphs would never be expanded. Hopefully no one has M4-special
7374 characters in his Bison installation path.
7375 * src/scan-skel.l: Don't parse @output_header_name@ and
7376 @output_parser_name@ anymore since they're now redundant.
7377 In @output, use decode_at_digraphs.
7378 Parse a new @basename command that invokes last_component.
7379 (decode_at_digraphs): New.
7380 (BASE_QPUTS): Remove unused.
7381 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7382 (Output file name): New tests.
7383
7384 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7385
7386 Warn about output files that are generated by the skeletons and that
7387 conflict with other output files.
7388 * data/glr.c: Don't generate the header file here when glr.cc does.
7389 * src/files.c (file_names, file_names_count): New static globals.
7390 (compute_output_file_names): Invoke output_file_name_check for files
7391 not generated by the skeletons and remove existing checks.
7392 (output_file_name_check): New function that warns about conflicting
7393 output file names.
7394 (output_file_names_free): Free file_names.
7395 * src/files.h (output_file_name_check): Declare.
7396 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7397 the skeletons.
7398 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7399 (Conflicting output files): New tests.
7400
7401 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7402
7403 * doc/bison.texinfo: Fix a couple of typos.
7404
7405 2006-12-08 Bob Rossi <bob@brasko.net>
7406
7407 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7408 Rename to...
7409 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7410 update all uses.
7411 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7412 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7413 local pv.
7414 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7415 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7416
7417 2006-12-07 Bob Rossi <bob@brasko.net>
7418 and Joel Denny <jdenny@ces.clemson.edu>
7419
7420 * data/push.c (yypvarsinit): Change return type from void* to struct
7421 yypvars*. No longer cast to void* on return.
7422 (struct yypvars): Remove yylen since it need not be remembered between
7423 yypushparse invocations.
7424 (yypushparse): Don't copy between yylen and pv->yylen.
7425
7426 2006-12-05 Bob Rossi <bob@brasko.net>
7427
7428 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7429 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7430 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7431 (struct yypvars): Remove b4_declare_parser_variables.
7432 (yypvarsinit): Remove init code for removed variables.
7433 (global scope): Do not declare b4_declare_parser_variables if
7434 push or pure mode.
7435 (yypushparse): Add b4_declare_parser_variables.
7436 Init new local variables, and remove init code for removed
7437 yypvars variables.
7438 (yyparse): Delete.
7439 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7440 and yyparse for other modes.
7441 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7442 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7443 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7444 (AT_PURE_LEX_IF): True if pure or push parser.
7445
7446 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7447
7448 Document Yacc prologue alternatives and default %destructor's and
7449 %printer's as experimental. Don't mention Java yet. Discussed at
7450 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7451 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7452 (2.3a): Annotate this entry to say the old forms of these features were
7453 also experimental.
7454 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
7455 Table of Symbols): Say they're experimental. Comment out any mention
7456 of Java (we'll want this back eventually).
7457
7458 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7459
7460 Support a file name argument to %defines. Deprecate `=' in
7461 %file-prefix, %name-prefix, and %output. Discussed at
7462 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7463 * NEWS (2.3a+): Mention.
7464 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
7465 form of %defines, and remove `=' from entries for %file-prefix,
7466 %name-prefix, and %output.
7467 * src/parse-gram.y (prologue_declaration): Implement.
7468 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7469 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7470 all but one occurrence of %name-prefix.
7471 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7472 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7473 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7474 occurrence of each of %file-prefix and %output. Add check for %defines
7475 with argument.
7476 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7477 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7478 Remove the `=' from %output.
7479
7480 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7481
7482 Don't escape $ in test case titles since Autoconf 2.61 now does that
7483 correctly.
7484 * tests/actions.at (Default %printer and %destructor are not for error
7485 or $undefined): Here.
7486 (Default %printer and %destructor are not for $accept): Here.
7487 * tests/input.at (Invalid $n and @n): Here.
7488
7489 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7490
7491 Rename <!> to <>. Discussed starting at
7492 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7493 * NEWS (2.3a+): Update.
7494 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7495 Update.
7496 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7497 * src/scan-gram.l (INITIAL): Implement.
7498 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7499 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7500 comment.
7501 * tests/actions.at (Default tagless %printer and %destructor,
7502 Default tagged and per-type %printer and %destructor,
7503 Default %printer and %destructor are not for error or $undefined,
7504 Default %printer and %destructor are not for $accept,
7505 Default %printer and %destructor for mid-rule values): Update.
7506 * tests/input.at (Default %printer and %destructor redeclared,
7507 Unused values with default %destructor): Update.
7508
7509 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7510
7511 Don't let %prec take a nonterminal.
7512 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7513 token.
7514 * tests/input.at (%prec takes a token): New test checking that %prec
7515 won't take a nonterminal.
7516
7517 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7518
7519 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7520 it was double-quoted.
7521 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7522 grammar is maintained with Bison's highest standards.
7523 * src/getargs.c: Fix some typos in Doxygen comments.
7524
7525 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7526
7527 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7528 later. Reported by Paul Eggert in
7529 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7530 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7531 * src/scan-code.l (translate_action): Don't bother invoking
7532 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7533 (code_scanner_free): Instead of invoking
7534 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7535 which frees more.
7536 * src/scan-gram.l (gram_scanner_free): Likewise.
7537 * src/scan-skel.l (scan_skel): Likewise.
7538
7539 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
7540
7541 * src/files.c (tr): Change return type to void.
7542 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
7543 has been called previously for the same key.
7544 (muscle_find): Return storage instead of value so that
7545 --enable-gcc-warnings doesn't produce warnings that the return discards
7546 const. aver that the value and storage are the same since storage
7547 could potentially be NULL when value is not.
7548 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
7549 same as 0.
7550
7551 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7552
7553 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
7554 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
7555 us a slightly cleaner distribution, and also works.
7556 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
7557 gnulib changes.
7558
7559 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
7560 and Paul Eggert <eggert@cs.ucla.edu>
7561
7562 Don't let Bison leak memory except when it complains.
7563 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
7564 (spec_defines_file, dir_prefix): Now char *, not const char *,
7565 since they are freed.
7566 * src/files.c: Likewise.
7567 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
7568 Likewise.
7569 (tr): Now operates in-place. All uses changed.
7570 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
7571 values.
7572 (compute_file_name_parts, compute_output_file_names): Don't store
7573 read-only data in variables that will be freed.
7574 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
7575 src_extension, and header_extension.
7576 (output_file_names_free): New public function to free
7577 spec_verbose_file, spec_graph_file, spec_defines_file,
7578 parser_file_name, and dir_prefix.
7579 * src/getargs.c (getargs): Don't store read-only data in variables that
7580 will be freed.
7581 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
7582 (which previously existed but was unused), and quotearg_free.
7583 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
7584 * src/muscle_tab.c: Likewise.
7585 (muscle_entry): Make the value char const *,
7586 and add a new storage member that is char * and can be freed.
7587 (muscle_entry_free): New private function.
7588 (muscle_init): Use it instead of free.
7589 (muscle_insert, muscle_grow): Update and use new storage member.
7590 (muscle_code_grow): Free the string passed to muscle_grow
7591 since it's not needed anymore.
7592 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
7593 add a new `char *code' member.
7594 ("{...}"): Declare semantic type as code.
7595 * src/scan-code.h (translate_rule_action):
7596 (translate_symbol_action, translate_code, translate_action): Return
7597 `char const *' rather than `char *' since external code should not free
7598 these strings.
7599 * src/scan-code.l: Likewise.
7600 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
7601 which is "{...}" in the parser.
7602 * tests/Makefile.am (maintainer-check-valgrind): Set
7603 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
7604 Valgrind.
7605 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
7606 complain.
7607 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
7608 expecting a non-zero exit status sets --leak-check=summary and
7609 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
7610 this case, and we don't want to hear about it.
7611
7612 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7613
7614 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
7615 instead of from the template, to simplify configuration a bit.
7616 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
7617 and m4/wint_t.m4, as they are needed with the latest gnulib.
7618
7619 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7620
7621 Disable unset/unused mid-rule value warnings by default, and recognize
7622 --warnings=midrule-values to enable them. Discussed starting at
7623 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
7624 * NEWS (2.3a+): Mention.
7625 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
7626 warnings): Add entry for midrule-values subargument.
7627 * src/reader.c (symbol_should_be_used): Don't return true just because
7628 the value is a set/used mid-rule value unless
7629 --warnings=midrule-values was specified.
7630 * tests/input.at (Unused values, Unused values before symbol
7631 declarations): Run tests with and without --warnings=midrule-values.
7632
7633 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
7634 than LIST_FREE directly.
7635
7636 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7637
7638 Finish implementing --warnings=error, which should not be implied by
7639 --warnings=all (or by its synonyms -W and --warnings without
7640 subarguments).
7641 * src/complain.c (set_warning_issued): New function to report that
7642 warnings are being treated as errors and to record an error if so.
7643 Invoke...
7644 (warn_at, warn): ... here.
7645 * src/getargs.c (warnings_args, warnings_types): Reorder so that
7646 "error - warnings are errors" does not appear above "all - all of the
7647 above".
7648 (getargs): For -W and --warnings without subarguments, don't let
7649 FLAGS_ARGMATCH set warnings_error in warnings_flag.
7650 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
7651
7652 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7653
7654 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
7655 empty subargument list. For example: `bison --warnings= parser.y'.
7656
7657 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7658
7659 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
7660 the parser header file so that gcc doesn't warn.
7661
7662 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7663
7664 Split the default %destructor/%printer into two kinds: <*> and <!>.
7665 Discussed starting at
7666 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
7667 * NEWS (2.3a+): Mention.
7668 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
7669 previous change today related to mid-rules.
7670 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
7671 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
7672 (TYPE_TAG_ANY): Add as <*>.
7673 (TYPE_TAG_NONE): Add as <!>.
7674 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
7675 for <*> and <!>.
7676 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
7677 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
7678 * src/symlist.c (symbol_list_default_new): Split into tagged and
7679 tagless versions.
7680 (symbol_list_destructor_set, symbol_list_printer_set): Split
7681 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
7682 SYMLIST_DEFAULT_TAGLESS.
7683 * src/symlist.h: Update symbol_list_default*_new prototypes.
7684 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
7685 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
7686 * src/symtab.c (default_destructor, default_destructor_location,
7687 default_printer, default_printer_location): Split each into tagged and
7688 tagless versions.
7689 (symbol_destructor_get, symbol_destructor_location_get,
7690 symbol_printer_get, symbol_printer_location_get): Implement tagged
7691 default and tagless default cases.
7692 (default_destructor_set, default_printer_set): Split each into tagged
7693 and tagless versions.
7694 * src/symtab.h: Update prototypes.
7695 * tests/actions.at (Default %printer and %destructor): Rename to...
7696 (Default tagless %printer and %destructor): ... this, and extend.
7697 (Per-type %printer and %destructor): Rename to...
7698 (Default tagged and per-type %printer and %destructor): ... this, and
7699 extend.
7700 (Default %printer and %destructor for user-defined end token): Extend.
7701 (Default %printer and %destructor are not for error or $undefined):
7702 Update.
7703 (Default %printer and %destructor are not for $accept): Update.
7704 (Default %printer and %destructor for mid-rule values): Extend.
7705 * tests/input.at (Default %printer and %destructor redeclared): Extend.
7706 (Unused values with default %destructor): Extend.
7707
7708 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7709
7710 Don't apply the default %destructor/%printer to an unreferenced midrule
7711 value. Mentioned at
7712 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
7713 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
7714 like $@n instead of just @n so that the default %destructor/%printer
7715 logic doesn't see them as user-defined symbols.
7716 (symbol_is_dummy): Check for both forms of the name.
7717 * src/reader.c (packgram): Remove the `$' from each midrule symbol
7718 name for which the midrule value is referenced in any action.
7719 * tests/actions.at (Default %printer and %destructor for mid-rule
7720 values): New test.
7721 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
7722 for change to dummy symbol names.
7723
7724 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7725
7726 Warn about unset midrule $$ if the corresponding $n is used.
7727 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
7728 $n usage.
7729 (packgram): Before invoking grammar_rule_check on any rule, make sure
7730 all actions have already been scanned in order to set `used' flags.
7731 Otherwise, checking that a midrule's $$ is set will not always work
7732 properly because the midrule check must forward-reference the midrule's
7733 parent rule.
7734 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
7735 warning.
7736
7737 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7738
7739 More improvements to the documentation of the prologue alternatives:
7740 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
7741 Bison manual.
7742 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
7743 some text to clarify the relative importance of the new directives and
7744 to show how these directives may be viewed as code labels.
7745
7746 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
7747
7748 Similar to the recently removed %before-header, add %code-top as the
7749 alternative to the pre-prologue. Mentioned at
7750 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
7751 Also, let the prologue alternatives appear in the grammar section.
7752 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
7753 (prologue_declaration): Move the existing prologue alternatives to...
7754 (grammar_declaration): ... here and add %code-top.
7755 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
7756
7757 Clean up and extend documentation for the prologue alternatives.
7758 * NEWS (2.3a+): Describe prologue alternatives.
7759 * doc/bison.texinfo (Prologue): Move discussion of prologue
7760 alternatives to...
7761 (Prologue Alternatives): ... this new section, and extend it to discuss
7762 all 4 directives in detail.
7763 (Table of Symbols): Clean up discussion of prologue alternatives and
7764 add %code-top.
7765
7766 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7767
7768 DJGPP specific issues.
7769
7770 * djgpp/config.bat: config.hin has been moved to lib. Adjust
7771 config.bat accordingly.
7772 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
7773 * djgpp/config.site: Likewise.
7774
7775 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
7776
7777 Replace %*-header with %provides, %requires, %code. See discussion at
7778 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
7779
7780 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
7781 (b4_user_start_header): Remove.
7782 * data/glr.c: Use new macros instead of b4_*start_header
7783 and b4_*end_header.
7784 * data/glr.cc: Likewise.
7785 * data/lalr1.cc: Likewise.
7786 * data/push.c: Likewise.
7787 * data/yacc.c: Likewise.
7788
7789 * doc/bison.texinfo: Remove %before-header, rename
7790 %{start,end,after}-header to %requires, %provides, %code.
7791
7792 * src/parse-gram.y: Likewise (also rename token names accordingly).
7793 * src/scan-gram.l: Likewise.
7794 * tests/actions.at: Likewise.
7795
7796 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
7797
7798 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
7799 Problem reported by Joel E. Denny.
7800
7801 2006-10-14 Jim Meyering <jim@meyering.net>
7802
7803 (Sync from coreutils.)
7804 Work also when the working directory (with e.g. coreutils sources)
7805 is version controlled with git, rather than CVS.
7806 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
7807 rather than CVS.
7808 In messages and comments, say e.g., "checked-out sources",
7809 rather than "CVS sources".
7810 (version_controlled_file): New function. Work for git as well as
7811 for CVS. Don't use grep's -q option.
7812 (slurp): Call it here, in place of CVS-specific code.
7813
7814 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
7815
7816 Fix testsuite for ./configure --enable-gcc-warnings:
7817 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
7818 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
7819 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
7820 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
7821 * test/regression.at (Diagnostic that expects two alternatives):
7822 Likewise.
7823
7824 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7825
7826 * bootstrap.conf (gnulib_modules): Add config-h.
7827 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
7828 worry about HAVE_CONFIG_H.
7829 * lib/abitset.c: Likewise.
7830 * lib/bitset.c: Likewise.
7831 * lib/bitset_stats.c: Likewise.
7832 * lib/bitsetv-print.c: Likewise.
7833 * lib/bitsetv.c: Likewise.
7834 * lib/ebitset.c: Likewise.
7835 * lib/get-errno.c: Likewise.
7836 * lib/lbitset.c: Likewise.
7837 * lib/subpipe.c: Likewise.
7838 * lib/timevar.c: Likewise.
7839 * lib/vbitset.c: Likewise.
7840 * lib/bitset.c: Include "bitset.h" first, to test interface.
7841 * lib/bitset_stats.c: Include "bitset_stats.h" first.
7842 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
7843 * lib/bitsetv.c: Include "bitsetv.h" first.
7844 * lib/get-errno.c: Include "get-errno.h" first.
7845 * m4/.cvsignore: Add config-h.m4.
7846 * tests/actions.at (Default %printer and %destructor for ...):
7847 Adjust expected line numbers in output to reflect removal of #if
7848 HAVE_CONFIG_H lines.
7849 * tests/glr-regression.at (Missed %merge type warnings when ...):
7850 Likewise.
7851 * tests/regression.at (Braced code in declaration in rules section):
7852 Likewise.
7853 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
7854 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
7855 Include <config.h> unconditionally.
7856
7857 * bootstrap: Sync from coreutils, as follows:
7858
7859 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7860
7861 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
7862 variable was sometimes used without being initialized. This
7863 messed up the installation of the INSTALL file in some cases.
7864
7865 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7866
7867 * bootstrap (usage, main program, symlink_to_gnulib): Add option
7868 --copy. Inspired by a suggestion from Bruno Haible.
7869
7870 2006-10-03 Jim Meyering <jim@meyering.net>
7871
7872 * bootstrap: Undo last change to this file, since now gnulib-tool
7873 sticks with the automake default in generating dependencies.
7874
7875 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7876
7877 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
7878 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
7879
7880 * doc/bison.1: Add copyright notice.
7881
7882 * data/glr.c: Don't include <stdarg.h>; not used.
7883
7884 * NEWS: The -g and --graph options now output graphs in Graphviz
7885 DOT format, not VCG format.
7886 * doc/bison.1: Likewise.
7887 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
7888 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
7889 of this change in
7890 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
7891 * TODO: Remove Graphviz entry.
7892 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
7893 remove vcg.c, vcg.h, vcg_defaults.h.
7894 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
7895 * src/graphviz.c, src/graphviz.h: New files.
7896 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
7897 * src/files.h: Make comment more generic.
7898 * src/main.c (main): Likewise.
7899 * src/print_graph.h: Likewise.
7900 * src/getargs.c (usage): Make usage description more generic.
7901 * src/print_graph.c: Include graphviz.h rather than vcg.h.
7902 (static_graph, fgraph): Remove. All uses changed to pass
7903 arguments instead of sharing a static var.
7904 (print_core, print_actions, print_state, print_graph):
7905 Output graphviz format rather than VCG format.
7906 * tests/.cvsignore: Remove *.vcg; add *.dot.
7907 * tests/output.at: Expect *.dot files, not *.vcg files.
7908
7909 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
7910 accommodates the 2006-10-08 change.
7911
7912 2006-10-11 Bob Rossi <bob@brasko.net>
7913
7914 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
7915 (b4_yyssa, b4_yyerror_range): New macros.
7916 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
7917 (yypvarsinit): Remove init of removed fields.
7918 (yypushparse): Remove use of removed fields; use new macros instead.
7919
7920 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7921
7922 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
7923 in a push parser. Reindent slightly to match yacc.c better.
7924
7925 2006-10-11 Bob Rossi <bob@brasko.net>
7926
7927 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
7928 yymsg_alloc fields.
7929 (yypvarsinit, yypushparse): Remove init of removed fields.
7930 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
7931
7932 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7933
7934 * THANKS: Add Paolo Bonzini and Bob Rossi.
7935
7936 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
7937
7938 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
7939 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
7940 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
7941 b4_define_user_cde and uses): Remove.
7942 (b4_comment, b4_prefix, b4_sync_start): New.
7943 * data/bison.m4: New file, with most of the content removed from c.m4.
7944 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
7945 * src/output.c (output_skeleton): Pass bison.m4.
7946 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
7947 only if specified.
7948
7949 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
7950
7951 Fix test failure reported by Tom Lane in
7952 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
7953 and try to make such failures easier to catch in the future.
7954 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
7955 that's now the caller's responsibility.
7956 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
7957 Set yychar = YYEOF if it's negative.
7958 * tests/actions.at (yylex): Abort if asked to read past EOF.
7959 * tests/conflicts.at (yylex): Likewise.
7960 * tests/cxx-type.at (yylex): Likewise.
7961 * tests/glr-regression.at (yylex): Likewise.
7962 * tests/input.at (yylex): Likewise.
7963 * tests/regression.at (yylex): Likewise.
7964 * tests/torture.at (yylex): Likewise.
7965
7966 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
7967
7968 Fix problems with translating English-language diagnostics.
7969 * bootstrap: Fix bug introduced in recent bootstrap changes, with
7970 respect to bison-runtime pot generation. The YY_ stuff
7971 wasn't being captured.
7972 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
7973 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
7974 * runtime-po/POTFILES.in: Add data/push.c.
7975
7976 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
7977
7978 Merge bootstrap changes from coreutils.
7979
7980 2006-09-28 Jim Meyering <jim@meyering.net>
7981
7982 Automatically generated dependencies are important even
7983 when all of the sources in a directory come from gnulib.
7984 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
7985 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
7986
7987 2006-09-23 Jim Meyering <jim@meyering.net>
7988
7989 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
7990
7991 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7992
7993 * bootstrap: Add support for --force.
7994 (usage): New function. Describe usage less tersely.
7995 (CVS_only_file): New var.
7996
7997 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
7998
7999 * data/push.c (YYPUSH_MORE): Make it an enum instead.
8000 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
8001 Adjust white space and comments to match GNU style better.
8002
8003 2006-09-20 Bob Rossi <bob@brasko.net>
8004
8005 * data/push.c (yyresult_get): Remove function.
8006 (YYPUSH_MORE): Add #define.
8007 (yypushparse): Modify return value.
8008
8009 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8010
8011 * stamp-h.in: Remove; no longer needed.
8012 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
8013 Remove config.h, config.hin, intl (no longer created).
8014 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
8015 stamp-h1.
8016
8017 Sync bootstrap from coreutils, as follows:
8018
8019 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
8020
8021 * bootstrap (symlink_to_gnulib): New function.
8022 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
8023 to copies-of-gnulib.
8024 (cp_mark_as_generated, slurp, gnulib_files):
8025 Avoid making a copy if it's the same as the old version.
8026 (gnulib_files): Add support for this variable (used by Bison).
8027
8028 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
8029
8030 * src/getargs.c (usage): Rework to use conventions similar to
8031 coreutils, to make translation a bit easier and the code a bit
8032 smaller. Problem reported by Tim Van Holder.
8033
8034 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
8035
8036 Use some of gnulib's new modules, taken from coreutils.
8037
8038 * bootstrap: Sync from coreutils, except add support for gnulib_files.
8039 * bootstrap.conf: New file.
8040 (gnulib_modules): Add configmake, inttypes, unistd.
8041 (XGETTEXT_OPTIONS): Add complain, complain_at,
8042 fatal, fatal_at, warn, warn_at, unexpected_end.
8043 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
8044 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
8045 (gl_EARLY): Add.
8046 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
8047 (gl_INIT): Add
8048 (GNULIB_AUTOCONF_SNIPPET): Remove.
8049 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
8050 the pickiest.
8051 * lib/.cvsignore: Add inttypes_.h.
8052 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
8053 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
8054 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
8055 no-longer-necessary initializations.
8056 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
8057 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
8058 use the unistd module.
8059 * src/system.h: Likewise.
8060 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
8061 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
8062 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
8063 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
8064 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
8065 * src/system.h: Include inttypes.h unconditionally, now that we
8066 use the inttypes module. Don't bother to include stdint.h, since
8067 inttypes.h now does that for us.
8068 (LOCALEDIR): Remove, now that we use the configmake module.
8069 * src/getargs.c: Include configmake.h.
8070 * src/main.c: Likewise.
8071 * src/output.c: Likewise.
8072 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
8073 not from $abs_top_builddir, since config.h moved.
8074
8075
8076 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
8077 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
8078
8079 * src/parse-gram.y (symbol_declaration): Don't put statements
8080 before declarations; it's not portable to C89.
8081 * src/scan-code.l (handle_action_at): Likewise.
8082
8083 * src/scan-code.l: Always initialize braces_level; the old code
8084 left it uninitialized and therefore had undefined behavior.
8085
8086 Don't attempt to redefine 'assert', since it runs afoul of
8087 systems where standard headers (mistakenly) include <assert.h>.
8088 Instead, define and use our own alternative, called 'aver'.
8089 * src/reader.c: Don't include assert.h, since we no longer
8090 use assert.
8091 * src/scan-code.l: Likewise.
8092 * src/system.h (assert): Remove, replacing with....
8093 (aver): New function, taking a bool arg. All uses changed.
8094 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8095 not merely an integer.
8096
8097 2006-09-15 Bob Rossi <bob@brasko.net>
8098
8099 Add support for push parsing. Based on the original work of
8100 Odd Arild Olsen <oao@fibula.no>.
8101 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8102 * data/c.m4 (YYPUSH): New.
8103 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
8104 * data/push.c: New file.
8105 * src/getargs.c (push_parser): New var.
8106 * src/getargs.h (push_parser): New declaration.
8107 * src/output.c (prepare): Add macro insertion of `push_flag'.
8108 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8109 (prologue_declaration): Parse %push-parser.
8110 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8111 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8112 list of removed lines from the traces observed.
8113 (AT_CHECK_CALC_LALR): Added push parser tests.
8114
8115 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8116
8117 * NEWS: Version 2.3a.
8118 * configure.ac (AC_INIT): Likewise.
8119
8120 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8121 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8122 due to header ordering dependencies. I don't know why the #define
8123 was there.
8124
8125 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8126 runtime cost when YYDEBUG is not defined, and so that some tests
8127 that used to fail now work. Problem and initial suggestion by
8128 Paolo Bonzini.
8129 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8130 * data/glr.cc (b4_parser_class_name):
8131 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8132 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8133 (yydebug_) [YYDEBUG]: New member.
8134 (yycdebug_): Now defined only if YYDEBUG.
8135 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8136 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8137 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8138 if YYYDEBUG.
8139 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8140 Define only if YYDEBUG.
8141 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8142 set_debug_level.
8143 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8144 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8145 AT_CHECK_CALC_GLR_CC that are working now.
8146
8147 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8148
8149 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8150 We don't need them in glr.cc, and glr.c defines them.
8151 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8152 assumes that defining it to anything is the same as defining
8153 it to 1. Problem reported by Paolo Bonzini.
8154
8155 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8156
8157 * data/c.m4 (b4_null, b4_case): Define.
8158 * src/output.c (prepare_symbols): Use b4_null.
8159 (user_actions_output): Use b4_case.
8160
8161 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8162
8163 * data/glr.c (b4_shared_declarations): Put start-header first,
8164 before any #includes that we generate, so that feature-test
8165 macros work. Problem reported by Michael Deutschmann in
8166 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8167 * data/lalr1.cc: Likewise.
8168 * doc/bison.texinfo (Prologue): Document that feature-test macros
8169 should be defined before any Bison declarations.
8170 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8171 that depend on location.hh after, not before, Bison decls, since
8172 we now include location.hh after the first user prologue.
8173
8174 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8175 Sander Brandenburg in
8176 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8177 Also, fix minor white space and comment issues.
8178 (Prologue): Mention that it's better to define feature-test macros
8179 before Bison declarations. Problem reported by Michael Deutschmann.
8180
8181 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8182 by Jim Meyering.
8183 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8184 This adjusts to recent gnulib changes.
8185
8186 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8187
8188 Finish implementation of per-type %destructor/%printer. Discussed
8189 starting at
8190 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8191 and
8192 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8193 * NEWS (2.3+): Add a description of this feature to the default
8194 %destructor/%printer description.
8195 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8196 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8197 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8198 list node contains a semantic type.
8199 * src/symtab.c, src/symtab.h: Extend with a table that associates
8200 semantic types with their %destructor's and %printer's.
8201 (semantic_type_from_uniqstr, semantic_type_get,
8202 semantic_type_destructor_set, semantic_type_printer_set): New functions
8203 composing the public interface of that table.
8204 (symbol_destructor_get, symbol_destructor_location_get,
8205 symbol_printer_get, symbol_printer_location_get): If there's no
8206 per-symbol %destructor/%printer, look up the per-type before trying
8207 the default.
8208 * tests/actions.at (Per-type %printer and %destructor): New test case.
8209 * tests/input.at (Default %printer and %destructor redeclared):
8210 Extend to check that multiple occurrences of %symbol-default in a
8211 single %destructor/%printer declaration is an error.
8212 (Per-type %printer and %destructor redeclared, Unused values with
8213 per-type %destructor): New test cases.
8214
8215 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8216
8217 Require default %destructor/%printer to be declared using
8218 %symbol-default instead of an empty symbol list, and start working on
8219 new per-type %destructor/%printer. Discussed at
8220 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8221 * NEWS (2.3+): Add %symbol-default to example.
8222 * bison.texinfo (Freeing Discarded Symbols): Likewise.
8223 (Table of Symbols): Add entry for %symbol-default.
8224 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8225 (generic_symlist, generic_symlist_item): New nonterminals for creating
8226 a list in which each item is a symbol, semantic type, or
8227 %symbol-default.
8228 (grammar_declaration): Use generic_symlist in %destructor and %printer
8229 declarations instead of symbols.1 or an empty list.
8230 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8231 for changes to symbol_list.
8232 * src/reader.c: Update for changes to symbol_list.
8233 * src/scan-code.l: Likewise.
8234 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8235 * src/symlist.c, src/symlist.h: Extend such that a list node may
8236 represent a semantic type or a %symbol-default in addition to just an
8237 ordinary symbol. Add switched functions for setting %destructor's and
8238 %printer's.
8239 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8240 %destructor/%printer declarations.
8241
8242 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8243
8244 Whether the default %destructor/%printer applies to a particular symbol
8245 isn't a question of whether the user *declares* that symbol (in %token,
8246 for example). It's a question of whether the user by any means
8247 *defines* the symbol at all (by simply using a char token, for
8248 example). $end is defined by Bison whereas any other token with token
8249 number 0 is defined by the user. The error token is always defined by
8250 Bison regardless of whether the user declares it with %token, but we
8251 may one day let the user define error as a nonterminal instead.
8252 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8253 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8254 the meaning of "user-defined".
8255 * tests/actions.at (Default %printer and %destructor for user-declared
8256 end token): Rename to...
8257 (Default %printer and %destructor for user-defined end token): ...
8258 this.
8259
8260 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8261 computation of whether to apply the default, don't maintain a list of
8262 every Bison-defined symbol. Instead, just check for a first character
8263 of '$', which a user symbol cannot have, and check for the error token.
8264
8265 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8266
8267 Don't apply the default %destructor or %printer to the error token,
8268 $undefined, or $accept. This change fits the general rule that the
8269 default %destructor and %printer are only for user-declared symbols,
8270 and it solves several difficulties that are described in the new test
8271 cases listed below.
8272 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8273 * tests/actions.at (Default %printer and %destructor are not for error
8274 or $undefined, Default %printer and %destructor are not for $accept):
8275 New test cases.
8276
8277 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8278
8279 Allow %start after the first rule.
8280 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8281 when parsing the first rule.
8282 (check_and_convert_grammar): Search for it here after all grammar
8283 declarations have been parsed. Skip midrules, which have dummy LHS
8284 nonterminals.
8285 * src/symtab.c (symbol_is_dummy): New function.
8286 * src/symtab.h (symbol_is_dummy): Declare it.
8287 * tests/input.at (%start after first rule): New test.
8288
8289 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8290
8291 Redo some of the previous commit: add back the ability to use
8292 non-aliased/undeclared string literals since it might be useful to
8293 those declaring %token-table.
8294 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8295 commit: don't worry about complaints from symbols_pack.
8296 * src/symtab.c (symbol_new, symbol_class_set,
8297 symbol_check_alias_consistency): Undo changes in previous commit: count
8298 each string literal as a new symbol and token, assign it a symbol
8299 number, and don't complain about non-aliased string literals.
8300 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8301 and token counts but does still set aliased tokens to the same number,
8302 symbol_pack_processor now leaves empty slots in the symbols array.
8303 Remove those slots.
8304 * tests/regression.at (Undeclared string literal): Remove test case
8305 added in previous commit since non-aliased string literals are allowed
8306 again.
8307 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8308 remove unnecessary string literal declarations.
8309 * tests/sets.at (Firsts): Likewise.
8310
8311 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8312
8313 Don't allow an undeclared string literal, but allow a string literal to
8314 be used before its declaration.
8315 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8316 symbols_pack complained.
8317 * src/symtab.c (symbol_new): Don't count a string literal as a new
8318 symbol.
8319 (symbol_class_set): Don't count a string literal as a new token, and
8320 don't assign it a symbol number since symbol_make_alias does that.
8321 (symbol_make_alias): It's not necessary to decrement the symbol and
8322 token counts anymore. Don't assume that an alias declaration occurs
8323 before any uses of the identifier or string, and thus don't assert that
8324 one of them has the highest symbol number so far.
8325 (symbol_check_alias_consistency): Complain if there's a string literal
8326 that wasn't declared as an alias.
8327 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8328 symbol_pack asserts that every token has been assigned a symbol number
8329 although undeclared string literals have not.
8330 * tests/regression.at (String alias declared after use, Undeclared
8331 string literal): New test cases.
8332 (Characters Escapes, Web2c Actions): Declare string literals as
8333 aliases.
8334 * tests/sets.at (Firsts): Likewise.
8335
8336 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8337
8338 In the grammar scanner, STRING_FINISH unclosed constructs and return
8339 them to the parser in order to improve error messages.
8340 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8341 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8342 * tests/input.at (Unclosed constructs): New test case.
8343 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8344 seen.
8345
8346 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8347 unused global.
8348
8349 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8350
8351 Handle string aliases for character tokens correctly.
8352 * src/symtab.c (symbol_user_token_number_set): If the token has an
8353 alias, check and set its alias's user token number instead of its own,
8354 which is set to indicate the alias. Previously, every occurrence of
8355 the character token in the grammar overwrote that alias indicator with
8356 the character code.
8357 * tests/input.at (String aliases for character tokens): New test.
8358
8359 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8360
8361 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8362
8363 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8364
8365 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8366 to prevent failures when building on older platforms.
8367 Check for autopoint failure.
8368 Set XGETTEXT_OPTIONS to values that check for C format strings,
8369 so that translators are warned about them (this also helps
8370 prevent core dumps).
8371
8372 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8373 function, since it simplifies our code a bit.
8374
8375 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8376 rather than -W, so we don't get bogus warnings about sign comparisons.
8377 Add -Wpointer-arith, since that warning is useful (it reports code
8378 that does not conform to C89 and that some compilers reject).
8379 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8380 since it's no longer needed.
8381
8382 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8383
8384 Clean up scanners a bit.
8385 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8386 definitions so gcc won't warn when obstack_for_string is unused.
8387 * src/scan-code.l: config.h and system.h are already #include'd by
8388 scan-code-c.c, so get rid of them here.
8389 * src/scan-gram.l: Likewise.
8390 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8391 definitions rather than duplicating the rest of it.
8392 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8393
8394 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8395
8396 Suppress signed/unsigned comparison warnings for yycheck.
8397 * data/c.m4 (b4_safest_int_type): New macro.
8398 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8399 a signed int type, cast it to b4_safest_int_type first.
8400 * data/yacc.c: Likewise.
8401 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8402 also overwritten.
8403
8404 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8405
8406 * doc/bison.texinfo: Fix some typos.
8407
8408 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8409
8410 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8411 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8412
8413 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8414 the latest gnulib does this a different way.
8415 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8416 translation was patched, so stop omitting it.
8417
8418 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8419
8420 Enable declaration of default %printer/%destructor. Make the parser
8421 use these for all user-declared grammar symbols for which the user does
8422 not declare a specific %printer/%destructor. Thus, the parser uses it
8423 for token 0 if the user declares it but not if Bison generates it as
8424 $end. Discussed starting at
8425 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8426 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8427 and
8428 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8429 * NEWS (2.3+): Mention.
8430 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8431 declare a %destructor for a mid-rule's semantic value. It's just
8432 impossible to declare one specific to it.
8433 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8434 code. Describe default %destructor form.
8435 * src/parse-gram.y (grammar_declaration): Parse default
8436 %printer/%destructor declarations.
8437 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8438 and symbol_destructor_location_get rather than accessing the destructor
8439 and destructor_location members of struct symbol.
8440 (symbol_printers_output): Likewise but for %printer's.
8441 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8442 again.
8443 * src/symtab.c (default_destructor, default_destructor_location,
8444 default_printer, default_printer_location): New static global
8445 variables to record the default %destructor and %printer.
8446 (symbol_destructor_get, symbol_destructor_location_get,
8447 symbol_printer_get, symbol_printer_location_get): New functions to
8448 compute the appropriate %destructor and %printer for a symbol.
8449 (default_destructor_set, default_printer_set): New functions to set the
8450 default %destructor and %printer.
8451 * src/symtab.h: Prototype all those new functions.
8452 * tests/actions.at (Default %printer and %destructor): New test to
8453 check that the right %printer and %destructor are called, that they're
8454 not called for $end, and that $$ and @$ work correctly.
8455 (Default %printer and %destructor for user-declared end token): New
8456 test to check that the default %printer and %destructor are called for
8457 a user-declared end token.
8458 * tests/input.at (Default %printer and %destructor redeclared, Unused
8459 values with default %destructor): New tests to check related grammar
8460 warnings and errors.
8461
8462 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8463
8464 Clean up handling of %destructor for the end token (token 0).
8465 Discussed starting at
8466 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8467 and
8468 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8469
8470 Make the skeletons consistent in how they pop the end token and invoke
8471 its %destructor.
8472 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8473 state, which has token number 0, since this would invoke the
8474 %destructor for the end token.
8475 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8476 until after shifting the end token, or else it won't be popped.
8477 * data/yacc.c (yyparse): Likewise.
8478
8479 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8480 it's the end token. Upon termination, destroy an unshifted lookahead
8481 even when it's the end token.
8482 * data/lalr1.cc (yy::parser::parse): Likewise.
8483 * data/yacc.c (yyparse): Likewise.
8484
8485 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8486 value warnings for the end token when the user gives the end token a
8487 %destructor.
8488
8489 * tests/actions.at (Printers and Destructors): Test all the above.
8490
8491 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8492
8493 Update to latest gnulib and gettext versions.
8494 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8495 Add fopen-safer.
8496 (gnulib_files): Add m4/warning.m4. Don't worry about files
8497 overwritten by autopoint.
8498 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8499 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8500 rejects them.
8501 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8502 so that we can remove the intl files at a better time.
8503 (intl_files_to_remove): Remove aclocal.m4, since it gets
8504 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8505 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8506 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8507 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8508 Remove datarootdir hack; no longer needed.
8509 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8510 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8511 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8512 strdup.h.
8513 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8514 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8515
8516 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8517
8518 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8519 it with --assume-autoconf='latest-stable'.
8520
8521 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8522
8523 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8524 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8525 YYSTYPE' and `{'.
8526 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8527 those from muscle_tab.c since the old ones are misleading.
8528
8529 2006-07-13 Akim Demaille <akim@epita.fr>
8530
8531 Support %define "KEY" {VALUE}.
8532 * src/scan-code.h, src/scan-code.l (translate_action)
8533 (translate_rule_action, translate_symbol_action, translate_code):
8534 Return char *, not const char *.
8535 * src/parse-gram.y (declaration): Rename as...
8536 (prologue_declaration): this.
8537 (string_content): Remove this nonterminal, use STRING.
8538 (braceless, content, content.opt): New nonterminal.
8539 Use them.
8540 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
8541 as value.
8542 * src/scan-gram.l (getargs.h): Don't include it.
8543
8544 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
8545
8546 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
8547 rather than a for-loop that declares a local bool variable. This
8548 should work around a compatibility problem with a Cray x1e C++
8549 compiler reported by Hung Nguyen in
8550 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
8551 The for-loop was introduced in the 2004-11-17 change but I don't
8552 know why it was needed.
8553
8554 2006-07-12 Akim Demaille <akim@epita.fr>
8555
8556 * data/c.m4: Comment changes.
8557
8558 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
8559
8560 * src/complain.c (error_message, ERROR_MESSAGE): New.
8561 To factor...
8562 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
8563 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
8564
8565 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8566
8567 * NEWS: Instead of %union, you can define and use your own union type
8568 YYSTYPE if your grammar contains at least one <type> tag.
8569 Your YYSTYPE need not be a macro; it can be a typedef.
8570 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
8571 (Union Decl, Decl Summary): Document this.
8572 * data/glr.c (YYSTYPE): Implement this.
8573 * data/glr.cc (YYSTYPE): Likewise.
8574 * data/lalr1.cc (YYSTYPE): Likewise.
8575 * data/yacc.c (YYSTYPE): Likewise.
8576 * src/output.c (prepare): Output tag_seen_flag.
8577 * src/parse-gram.y (declaration, grammar_declaration):
8578 Use 'union_seen' rather than 'typed' to determine whether
8579 %union has been seen, since grammars can now be typed without
8580 %union.
8581 (symbol_declaration, type.opt, symbol_def):
8582 Keep track of whether a tag has been seen.
8583 * src/reader.c (union_seen, tag_seen): New vars.
8584 (typed): remove.
8585 * src/reader.h (union_seen, tag_seen, typed): Likewise.
8586 * src/scan-code.l (untyped_var_seen): New variable.
8587 (handle_action_dollar): Adjust to above changes.
8588 (handle_action_dollar, handle_action_at):
8589 Improve overflow checking for outlandish numbers.
8590 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
8591 avoid new diagnostics generated by above changes.
8592 * tests/regression.at (YYSTYPE typedef): Add test to check
8593 for type tags without %union.
8594
8595 * src/symlist.c (symbol_list_length): Return int, not unsigned
8596 int, since callers expect int. This may need to get revisited
8597 once we have proper integer overflow checking.
8598
8599 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
8600 object is now static.
8601
8602 * src/getargs.c (flags_argmatch): Return void, not int,
8603 to pacify ./configure --enable-gcc-warnings.
8604
8605 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
8606 since last_string is already defined to FLEX_PREFIX (last_string).
8607
8608 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8609
8610 Implement --warnings/-W.
8611 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
8612 replaced by...
8613 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
8614 Adjust callers.
8615 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
8616 (warnings_args, warnings_types): New.
8617 (getargs, short_options, long_options): Accept -W/--warnings.
8618 Sort the options by alphabetical order, upper case letter right
8619 before its lower case.
8620
8621 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
8622
8623 Change %merge result type clash warnings to errors. Discussed at
8624 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
8625 * src/reader.c (record_merge_function_type): Use complain_at.
8626 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8627 declared later): Update test case results.
8628
8629 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8630
8631 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
8632 to be in alphabetical order.
8633 (trace_args): Spelling fixes.
8634
8635 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8636
8637 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
8638 so they don't collide with user-defined macros.
8639 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
8640 this was never guaranteed, and now that we're using gnulib stdint,
8641 which defines int_fast16_t to long int, the problem is exposed.
8642
8643 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
8644
8645 * data/c.m4 (b4_basename): Simplify a bit, since we don't
8646 need the full POSIX semantics (and weren't implementing them
8647 anyway).
8648
8649 Adjust to Autoconf 2.60 and today's gnulib.
8650 * bootstrap (gnulib_modules): Add stdint.
8651 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
8652 no longer copies it.
8653 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
8654 since stdint needs the former and wcwidth (which is now required
8655 by mbswidth) needs the latter.
8656 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
8657 work around a compatibility glitch between gettext 0.14.6 and
8658 Autoconf 2.60.
8659 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
8660 Do not check for uintptr_t, since new stdint module does the right
8661 thing.
8662 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
8663 Add stdint.h, stdint_.h, wcwidth.h.
8664 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
8665 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
8666 stdint.m4, wchar_t.m4, wcwidth.m4.
8667 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
8668 usual order for ../lib/*.h files.
8669 (file_name_split): Use last_component, not base_name, to adjust
8670 to gnulib changes.
8671 * src/parse-gram.h: Include <strverscmp.h> in the usual order
8672 for ../lib/*.h files.
8673 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
8674 Define unconditionally, since we now assume the stdint module.
8675 * src/scan-skel.l: Include <dirname.h>.
8676 (BASE_QPUTS): Use last_component, not base_name.
8677 * src/system.h: Include <unlocked-io.h> in the usual order
8678 for ../lib/*.h files. Include <stdint.h> unconditionally,
8679 since we now use the stdint module.
8680 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
8681 HAVE_UINTPTR_T, since we now use the stdint module.
8682 (base_name): Remove decl, since files now include <dirname.h>
8683 to get the decl.
8684
8685 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8686
8687 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
8688 New, default to 1.
8689 * data/yacc.c, data/glr.c, data/location.cc: Use them.
8690 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
8691 default.
8692 * tests/calc.at: Adjust.
8693
8694 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8695
8696 * data/c.m4 (b4_basename): New.
8697 (b4_syncline): Also output the location of its invocation (from
8698 the skeleton).
8699 (b4_user_action, b4_define_user_action, b4_user_actions)
8700 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
8701 (b4_user_stype): New.
8702 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
8703
8704 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8705
8706 In the grammar file, the first column is 1 not 0 on the first line as
8707 on every other line.
8708 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
8709 * tests/input.at (Torturing the Scanner): Update output.
8710
8711 * src/scan-gram.l (scanner_cursor): Declare it static.
8712
8713 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8714
8715 In warnings, say "previous declaration" rather than "first
8716 declaration".
8717 * src/symtab.c (redeclaration): Do that here.
8718 * src/reader.c (record_merge_function_type): In the case of a result
8719 type clash, report the previous declaration rather than the very first
8720 one in the grammar file.
8721 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8722 declared later): Add a third declaration to check this behavior.
8723 * tests/input.at (Incompatible Aliases): Update output.
8724
8725 2006-06-27 Akim Demaille <akim@epita.fr>
8726
8727 * doc/Doxyfile.in: New.
8728 * doc/Makefile.am: Use it.
8729 * src/lalr.h, src/symtab.h: Initial doxygenation.
8730
8731 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8732
8733 Don't miss %merge result type warnings just because the LHS types are
8734 declared after the %merge. This continues the effort of the previous
8735 patch.
8736 * src/reader.c (get_merge_function): Don't set the merger type yet.
8737 (record_merge_function_type): New function for setting the merger type
8738 and checking for clashes.
8739 (grammar_current_rule_merge_set): Set the location of the %merge for
8740 the current rule.
8741 (packgram): Invoke record_merge_function_type for each rule now that
8742 all symbol type declarations have been parsed.
8743 * src/reader.h (merger_list.type_declaration_location): New member
8744 storing the location of the first %merge from which the type for this
8745 merging function was derived.
8746 * src/symlist.h (symbol_list.merger_declaration_location): New member
8747 storing the location of a rule's %merge, if any.
8748 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8749 declared later): New test to catch the error fixed by the above patch.
8750
8751 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8752
8753 Get action warnings (grammar_rule_check) right even when symbol
8754 declarations appear after the rules. Discussed at
8755 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
8756 and
8757 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
8758 Don't mistake the type of $$ in a midrule to be that of its parent
8759 rule's $$.
8760 * src/reader.c (grammar_current_rule_end): Don't invoke
8761 grammar_rule_check yet since not all symbol declarations may have been
8762 parsed yet.
8763 (grammar_midrule_action): Likewise.
8764 Don't record whether the midrule's $$ has been used yet since actions
8765 haven't been translated yet.
8766 Record the midrule's parent rule and its RHS index within the parent
8767 rule.
8768 (grammar_current_rule_action_append): Don't translate the action yet
8769 since not all symbol declarations may have been parsed yet and, thus,
8770 warnings about types for $$, $n, @$, and @n can't be reported yet.
8771 (packgram): Translate the action and invoke grammar_rule_check now that
8772 all symbol declarations have been parsed.
8773 * src/scan-code.l (handle_action_dollar): Now that this is invoked
8774 after parsing the entire grammar file, the symbol list here in the case
8775 of a midrule is actually the midrule's empty RHS, so reference its
8776 parent rule's RHS where necessary.
8777 On the other hand, now that you can already know it's a midrule, you
8778 aren't forced to think $$ has the same type as its parent rule's $$.
8779 (handle_action_at): In the case of a midrule, reference the parent rule
8780 where necessary.
8781 * src/symlist.c (symbol_list_new): Initialize new midrule-related
8782 members.
8783 (symbol_list_length): Now that this is invoked after all rules have
8784 been parsed, a NULL symbol (rather than a NULL symbol list node)
8785 terminates a rule. symbol_list_print already does this correctly.
8786 * src/symlist.h (symbol_list.midrule_parent_rule,
8787 symbol_list.midrule_parent_rhs_index): New members so that midrules can
8788 remember their relationships with their parents.
8789 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
8790 fixed by the above patch.
8791 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
8792 implementing...
8793 (Unused values): ... this old test case and...
8794 (Unused values before symbol declarations): ... this new test case.
8795 This one is the same as `Unused values' except that all symbol
8796 declarations appear after the rules in order to catch the rest of the
8797 errors fixed by the above patch.
8798
8799 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8800
8801 More cleanup.
8802 * src/reader.c (current_rule): Declare it static since it's no longer
8803 used outside this file.
8804 (grammar_current_rule_action_append): Remove redundant arguments from
8805 translate_rule_action invocation.
8806 * src/reader.h (current_rule): Remove this unused extern.
8807 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
8808 * src/scan-code.l (translate_rule_action): Likewise.
8809
8810 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
8811
8812 Clean up yesterday's patch.
8813 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
8814 to...
8815 * src/reader.c (grammar_current_rule_action_append): ... here for
8816 consistency with grammar_current_rule_symbol_append.
8817 * tests/regression.at (Braced code in declaration in rules section):
8818 Make yyerror and yylex static as usual.
8819
8820 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
8821
8822 Fix bug that mistakes braced code in a declaration in the rules section
8823 to be a rule action. Mentioned at
8824 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
8825 * src/scan-gram.l: Move midrule action detection from the start of the
8826 scanning of any braced code to...
8827 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
8828 action. For readability, use $2 and @2 rather than the equivalent
8829 global variables.
8830 * tests/regression.at (Braced code in declaration in rules section):
8831 New test to catch the error fixed by the above patch.
8832
8833 Work on code readability some.
8834 * src/scan-code.l (current_rule): Get rid of this misleading and
8835 redundant declaration: it's actually extern'ed in reader.h.
8836 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
8837 translate_action): Add a rule argument and use it instead of the global
8838 current_rule.
8839 (translate_rule_action): This already receives current_rule through an
8840 argument, so pass it on to translate_action instead of assigning
8841 current_rule to current_rule.
8842 (translate_symbol_action, translate_code): Pass rule = NULL to
8843 translate_action.
8844
8845 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
8846
8847 Rename %before-definitions to %start-header and %after-definitions to
8848 %end-header. Don't use these declarations to separate pre-prologue
8849 blocks from post-prologue blocks. Add new order-independent
8850 declarations %before-header and %after-header as alternatives to the
8851 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
8852 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
8853 * NEWS (2.3+): Update for these changes.
8854 * data/glr.c (b4_before_definitions): Update to...
8855 (b4_start_header): ... this.
8856 (b4_after_definitions): Update to...
8857 (b4_end_header): ... this.
8858 * data/glr.cc: Likewise.
8859 * data/lalr1.cc: Likewise.
8860 * data/yacc.c: Likewise.
8861 * doc/bison.texinfo (The prologue): Update names, and replace remaining
8862 prologue blocks with %*-header declarations.
8863 (Calc++ Parser): Likewise.
8864 (Decl Summary): Update names.
8865 (Table of Symbols): Update description.
8866 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
8867 (PERCENT_END_HEADER): ... this.
8868 (PERCENT_BEFORE_DEFINITIONS): Update to...
8869 (PERCENT_START_HEADER): ... this.
8870 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8871 (declaration): Update token names and m4 macro names.
8872 When parsing %end-header and %start-header, invoke translate_code
8873 before muscle_code_grow, and no longer set global booleans to remember
8874 whether these declarations have been seen.
8875 Parse new %after-header and %before-header.
8876 * src/reader.c (before_definitions, after_definitions): Remove.
8877 (prologue_augment): Accept a new bool argument to specify whether to
8878 augment the pre-prologue or post-prologue.
8879 * src/reader.h (before_definitions, after_definitions): Remove these
8880 extern's.
8881 (prologue_augment): Add new bool argument.
8882 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
8883 (PERCENT_END_HEADER): ... this.
8884 (PERCENT_BEFORE_DEFINITIONS): Update to...
8885 (PERCENT_START_HEADER): ... this.
8886 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8887 * tests/actions.at (Printers and Destructors): Update names.
8888
8889 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
8890
8891 Add comparison operators for C++ location classes. Discussed at
8892 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
8893 * data/c++.m4 (b4_define_location_comparison): New boolean %define
8894 declaration indicating whether filename_type has an operator==. If
8895 filename_type is `std::string', it defaults to `1', `0' otherwise.
8896 * data/location.cc: Iff b4_define_location_comparison is `1', add
8897 operator== and operator!= for class position and for class location.
8898
8899 Some minor fixes.
8900 * src/scan-action.l: Remove unused file.
8901 * src/symtab.c (symbol_printer_set): Use printer_location not
8902 destructor_location.
8903 * src/symtab.h (struct symbol): Replace incorrect source comment for
8904 printer members.
8905 * tests/input.at (Incompatible Aliases): Update output with correct
8906 printer location.
8907
8908 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
8909
8910 Don't put the pre-prologue in the header file. For the yacc.c code
8911 file and the glr.c header and code files, move the pre-prologue before
8912 the token definitions. Add new %before-definitions and
8913 %after-definitions to declare code that will go in both the header file
8914 and code file. Discussed at
8915 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
8916 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
8917 and
8918 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
8919 * NEWS (2.3+): Describe these changes.
8920 * data/glr.c (b4_pre_prologue): Move from within to before...
8921 (b4_shared_declarations): ... this.
8922 Add new b4_before_definitions before b4_token_enums.
8923 Add new b4_after_definitions at the end.
8924 * data/glr.cc (b4_pre_prologue): Replace with...
8925 (b4_before_definitions): ... this in the header file.
8926 (b4_after_definitions): New near the end of the header file.
8927 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
8928 code file right before including the header file.
8929 (b4_before_definitions): New in the previous position of
8930 b4_pre_prologue in the header file.
8931 (b4_after_definitions): New near the end of the header file.
8932 * data/yacc.c: Clean up some m4 quoting especially in the header file.
8933 (b4_token_enums_defines): In the code file, move to right before
8934 YYSTYPE for consistency with the header file.
8935 (b4_before_definitions): New right before b4_token_enums_defines in
8936 both the header and code file.
8937 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
8938 header and code file.
8939 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
8940 of prologues for %union dependencies.
8941 (Decl Summary): In %defines description, mention the effect of
8942 %before-definitions and %after-definitions on the header file.
8943 (Calc++ Parser): Forward declare driver in a %before-definitions rather
8944 than in the pre-prologue so that make check succeeds.
8945 (Table of Symbols): Add entries for %before-definitions and
8946 %after-definitions.
8947 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
8948 %before-definitions.
8949 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
8950 (declaration): Parse those declarations and append to
8951 b4_before_definitions and b4_after_definitions, respectively.
8952 * src/reader.c (before_definitions, after_definitions): New bools to
8953 track whether those declarations have been seen.
8954 (prologue_augment): Add to the post-prologue if %union,
8955 %before-definitions, or %after-definitions has been seen.
8956 * src/reader.h (before_definitions, after_definitions): New extern's.
8957 * src/scan-gram.l: Scan the new declarations.
8958 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
8959 prologue block in a %before-definitions or a %after-definitions based
8960 on whether the %union is declared.
8961 * tests/regression.at (Early token definitions with --yacc, Early token
8962 definitions without --yacc): Move tests for token definitions into the
8963 post-prologue since token names are no longer defined in the
8964 pre-prologue.
8965
8966 2006-06-20 Akim Demaille <akim@epita.fr>
8967
8968 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
8969 (symbol_get): Use it.
8970 * src/parse-gram.y: Use it.
8971
8972 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
8973
8974 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
8975 build succeeds when configured with --enable-gcc-warnings.
8976
8977 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
8978
8979 * src/parse-gram.y (char_name): New function.
8980 (CHAR, STRING, string_content): For %printer, properly escape.
8981 (ID): Prefer fputs to fprintf.
8982 (id): Reindent to be consistent with other rules.
8983 Properly quote char.
8984
8985 The Translation Project changed its way of publishing translations
8986 to maintainers. I haven't received any responses to my request
8987 for supporting the old way, or for documenting the new way. I
8988 have modified 'bootstrap' to use screen scraping
8989 (in this case, HTML scraping). This is unreliable and inelegant,
8990 but I don't see any better way. Yuck.
8991 * bootstrap (TP_URL, WGET_COMMAND): New vars.
8992 (get_translations): New function, which uses HTML scraping to
8993 deduce locations of latest translations.
8994 Use this function to grab both bison and bison-runtime .po files.
8995 Don't bother priming the pump for the runtime-po domain any more,
8996 as it's now translated better than bison is.
8997
8998 2006-06-19 Akim Demaille <akim@epita.fr>
8999
9000 * src/scan-gram.l: No longer "parse" things after `%union' until
9001 `{'. Rather, return a single "%union" token.
9002 No longer make symbols: return strings, and leave the conversion
9003 to symbols to the parser.
9004 (SC_PRE_CODE, token_type): Remove.
9005 * src/parse-gram.y (%union): New field `character'.
9006 Sort tokens.
9007 (CHAR): New token.
9008 (ID, ID_COLON): Now that the scanner no longer makes them
9009 identifiers, adjust all uses to invoke symbol_get.
9010 (id_colon): New, wraps the conversion from string to symbol.
9011 (%union): Accept a possible union_name.
9012 (symbol): Now can be a char.
9013 * data/c.m4 (b4_union_name): Leave a default value.
9014 * data/glr.c, data/yacc.c: Use it.
9015
9016 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
9017
9018 For associating token numbers with token names for "yacc.c", don't use
9019 #define statements unless `--yacc' is specified; always use enum
9020 yytokentype. Most important discussions start at:
9021 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
9022 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
9023 and
9024 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
9025 * NEWS (2.3+): Mention.
9026 * data/c.m4 (b4_yacc_if): New.
9027 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
9028 token #define's.
9029 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
9030 on token name definitions.
9031 * src/getargs.c (usage): Capitalize `Yacc' in English.
9032 * src/output.c (prepare): Define b4_yacc_flag.
9033 * tests/regression.at (Early token definitions): Test that tokens names
9034 are defined before the pre-prologue not just before the post-prologue.
9035 Remove this test case and copy to...
9036 (Early token definitions with --yacc): ... this to test #define's.
9037 (Early token definitions without --yacc): ... and this to test enums.
9038
9039 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
9040
9041 * NEWS: Reword the post-2.3 change to not be so optimistic about
9042 removing the old "look-ahead" spelling.
9043 Update previous look-ahead/lookahead change reports.
9044 * REFERENCES: look-ahead -> lookahead (since that's
9045 what he actually wrote).
9046 * doc/refcard.tex: look ahead -> lookahead,
9047 look-ahead -> lookahead
9048
9049 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
9050
9051 For consistency, use `lookahead' instead of `look-ahead' or
9052 `look_ahead'. Discussed starting at
9053 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
9054 and then at
9055 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
9056 * NEWS: For the next release, note the change to `--report'.
9057 * TODO, doc/bison.1: Update English.
9058 * doc/bison.texinfo: Update English.
9059 (Understanding Your Parser, Bison Options): Document as
9060 `--report=lookahead' rather than `--report=look-ahead'.
9061 * src/conflicts.c: Update English in comments.
9062 (lookahead_set): Rename from look_ahead_set.
9063 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
9064 (resolve_sr_conflict): Rename local look_ahead_tokens to
9065 lookahead_tokens, and update other uses.
9066 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
9067 count_rr_conflicts, conflicts_free): Update uses.
9068 * src/getargs.c (report_args): Move "lookahead" before alternate
9069 spellings.
9070 (report_types): Update uses.
9071 (usage): For `--report' usage description, state `lookahead' spelling
9072 rather than `look-ahead'.
9073 * src/getargs.h (report.report_lookahead_tokens): Rename from
9074 report_look_ahead_tokens.
9075 * src/lalr.c: Update English in comments.
9076 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
9077 (state_lookahead_tokens_count): Rename from
9078 state_look_ahead_tokens_count.
9079 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9080 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
9081 Rename local n_look_ahead_tokens to n_lookahead_tokens.
9082 Update other uses.
9083 Update English in output.
9084 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
9085 * src/print.c: Update English in comments.
9086 (lookahead_set): Rename from look_ahead_set.
9087 (print_reduction): Rename argument lookahead_token from
9088 look_ahead_token.
9089 (print_core, state_default_rule, print_reductions, print_results):
9090 Update uses.
9091 * src/print_graph.c: Update English in comments.
9092 (print_core): Update uses.
9093 * src/state.c: Update English in comments.
9094 (reductions_new): Update uses.
9095 (state_rule_lookahead_tokens_print): Rename from
9096 state_rule_look_ahead_tokens_print, and update other uses.
9097 * src/state.h: Update English in comments.
9098 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9099 (state_rule_lookahead_tokens_print): Rename from
9100 state_rule_look_ahead_tokens_print.
9101 * src/tables.c: Update English in comments.
9102 (conflict_row, action_row): Update uses.
9103 * tests/glr-regression.at
9104 (Incorrect lookahead during deterministic GLR,
9105 Incorrect lookahead during nondeterministic GLR): Rename
9106 print_look_ahead to print_lookahead.
9107 * tests/torture.at: Update English in comments.
9108 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9109 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9110 (Many lookahead tokens): Update uses.
9111 * data/glr.c: Update English in comments.
9112 * lalr1.cc: Likewise.
9113 * yacc.c: Likewise.
9114 * src/conflicts.h: Likewise.
9115 * src/lalr.h: Likewise.
9116 * src/main.c: Likewise.
9117 * src/output.c: Likewise.
9118 * src/parse-gram.c: Likewise.
9119 * src/tables.h: Likewise.
9120 * tests/calc.at: Likewise.
9121
9122 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9123
9124 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9125
9126 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9127
9128 * TODO: Add request from Nelson H. F. Beebe to be able to install
9129 Bison without installing the yacc script.
9130
9131 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9132
9133 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9134 and yytext if they're already #define'd.
9135 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9136 * src/scan-code-c.c: ... here.
9137 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9138 <config.h>.
9139
9140 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9141
9142 Get Bison to build again when configured with --enable-gcc-warnings.
9143 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9144 missing #include's.
9145 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9146 loc argument as it shadows a global.
9147 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9148 invocation.
9149
9150 * src/.cvsignore: Add scan-code.c.
9151
9152 2006-06-07 Akim Demaille <akim@epita.fr>
9153
9154 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9155 to...
9156 * src/scan-code.l: here.
9157 * tests/input.at (Torturing the Scanner): Fix another location
9158 error.
9159
9160 2006-06-07 Akim Demaille <akim@epita.fr>
9161
9162 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9163
9164 2006-06-06 Akim Demaille <akim@epita.fr>
9165
9166 Extract the parsing of user actions from the grammar scanner.
9167 As a consequence, the relation between the grammar scanner and
9168 parser is much simpler. We can also split "composite tokens" back
9169 into simple tokens.
9170 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9171 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9172 rename as...
9173 * src/location.h, src/location.c (add_column_width)
9174 (location_compute): these.
9175 Fix the column count: the initial column is 0.
9176 (location_print): Be robust to ending column being 0.
9177 * src/location.h (boundary_set): New.
9178 * src/main.c: Adjust to scanner_free being renamed as
9179 gram_scanner_free.
9180 * src/output.c: Include scan-code.h.
9181 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9182 Use boundary_set.
9183 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9184 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9185 which is now, again, a separate token.
9186 Adjust all dependencies.
9187 Whereever actions with $ and @ are used, use translate_code.
9188 (action): Remove this nonterminal which is now useless.
9189 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9190 (grammar_current_rule_action_append): Use translate_code.
9191 (packgram): Bound check ruleno, itemno, and rule_length.
9192 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9193 (last_string, last_braced_code_loc, max_left_semantic_context)
9194 (scanner_initialize, scanner_free, scanner_last_string_free)
9195 (gram_out, gram_lineno, YY_DECL_): Move to...
9196 * src/scan-gram.h: this new file.
9197 (YY_DECL): Rename as...
9198 (GRAM_DECL): this.
9199 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9200 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9201 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9202 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9203 Move these declarations, and...
9204 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9205 these to...
9206 * src/flex-scanner.h: this new file.
9207 * src/scan-gram.l (rule_length, rule_length_overflow)
9208 (increment_rule_length): Remove.
9209 (last_braced_code_loc): Rename as...
9210 (gram_last_braced_code_loc): this.
9211 Adjust to the changes of the parser.
9212 Move all the handling of $ and @ into...
9213 * src/scan-code.l: here.
9214 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9215 (handle_action_dollar, handle_action_at): Move to...
9216 * src/scan-code.l: here.
9217 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9218 scan-code.h, scan-code-c.c, scan-gram.h.
9219 (EXTRA_bison_SOURCES): Add scan-code.l.
9220 (BUILT_SOURCES): Add scan-code.c.
9221 (yacc): Be robust to white spaces.
9222
9223 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9224 * tests/regression.at: Adjust the column numbers.
9225 * tests/regression.at: Adjust the error message.
9226
9227 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9228
9229 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9230 Use Akim's wording from
9231 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9232
9233 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9234
9235 Between Bison releases, manually append `+' to the previous Bison
9236 release number, and use that as a signal to automatically print the
9237 ChangeLog's CVS Id keyword from --version. Discussed starting at
9238 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9239 * ChangeLog: Add Id header.
9240 * configure.ac (AC_INIT): Append `+' to `2.3'.
9241 * src/.cvsignore: Add revision.c.
9242 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9243 (BUILT_SOURCES): Add revision.c.
9244 (revision.c): New target rule. This file defines a new global variable
9245 named revision. It initializes it with either the Id from ChangeLog
9246 or, if VERSION doesn't contain `+', with the empty string.
9247 * src/getargs.c (version): Print the value of revision.
9248 * src/revision.h: Extern revision.
9249
9250 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9251
9252 * NEWS: Version 2.3.
9253 * configure.ac (AC_INIT): Likewise.
9254
9255 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9256
9257 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9258 with no arguments, not as an object-like macro. This is for
9259 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9260 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9261 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9262 Document this.
9263
9264 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9265
9266 * src/getargs.c (usage): Back out yesterday's modification of the
9267 --help output so that we don't have to wait for translation before
9268 releasing 2.3.
9269
9270 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9271
9272 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9273 Problem reported by Akim Demaille.
9274
9275 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9276
9277 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9278
9279 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9280
9281 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9282 generated source code. Problem reported by Frans Englich in
9283 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9284
9285 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9286
9287 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9288 shell, not within 'make', so that 'make' by an ordinary builder
9289 (using GNU make) does not worry about configuring gzip. This also
9290 works around a bug reported independently by Keith Thompson and by
9291 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9292 stderr rather than stdout, messing up the build logs.
9293
9294 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9295
9296 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9297 to make sure that YYID will never be unused. This fixes a 'make
9298 maintainer-check' failure caused by the recent changes to the 'Trivial
9299 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9300 not used.
9301 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9302
9303 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9304
9305 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9306 state before an empty RHS is always resolved here. Only the location
9307 of that state is guaranteed to be resolved, and that's enough. This
9308 fixes the remaining bug reported by Derek M. Jones in
9309 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9310 * tests/glr-regression.at (Uninitialized location when reporting
9311 ambiguity): Test the above case.
9312 Also, the embedded comments in this test case claim it checks the case
9313 of an empty RHS that has inherited the initial location. However, the
9314 corresponding LHS was already resolved, so yyresolveLocations didn't
9315 actually have reason to modify it. Fix this by forcing
9316 nondeterministic operation at the beginning of the parse.
9317
9318 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9319
9320 * data/c.m4 (b4_yy_symbol_print_generate):
9321 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9322 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9323 of the bugs reported today by Derek M Jones in
9324 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9325 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9326 defined to be a type name without parens or brackets.
9327 (Location Type): Similarly for YYLTYPE.
9328 * tests/regression.at (Trivial grammars): Put in a test for this
9329 bug that will be caught by 'make maintainer-check' (though not,
9330 alas, by 'make check' unless your compiler is picky).
9331
9332 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9333
9334 * NEWS: Version 2.2.
9335 * configure.ac (AC_INIT): Likewise.
9336
9337 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9338
9339 * data/glr.c (yyreportTree): Make room in yystates for the state
9340 preceding the RHS. This fixes the segmentation fault reported by Derek
9341 M. Jones in
9342 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9343 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9344 to the user. Reported for yyreportTree by Derek M. Jones later in the
9345 same thread.
9346 * THANKS: Add Derek M. Jones.
9347 Update my email address.
9348 Fix typo in Steve Murphy's name.
9349
9350 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9351
9352 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9353 checking against YYLAST that caused the parser to miss a potential
9354 alternative in its diagnostic.
9355 Problem reported by Maria Jose Moron Fernandez in
9356 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9357 * data/lalr1.cc (yysyntax_error_): Likewise.
9358 * data/yacc.c (yysyntax_error): Likewise.
9359 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9360 tokens, in case we run into an older C compiler.
9361 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9362 Use them to check for the off-by-one error fixed above.
9363
9364 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9365 YYSIZE_T, not size_t.
9366 * tests/regression.at (Trivial grammars): New test, to catch
9367 the error fixed by the above patch.
9368
9369 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9370
9371 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9372 scheme.
9373 Reported by Steve Murphy.
9374
9375 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9376
9377 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9378 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9379
9380 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9381
9382 Implement --trace=m4.
9383 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9384 * src/output.c (output_skeleton): When set, pass -dV to m4.
9385
9386 Factor the handling of flags in m4.
9387 * src/output.c (prepare): Rename the muscle names debug, defines,
9388 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9389 * data/c.m4: Adjust.
9390 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9391 Use b4_define_flag_if to define other b4_FLAG_if macros.
9392 (b4_location_if): As a consequence, rename as...
9393 (b4_locations_if): this, for consistency.
9394 Adjust all the skeletons.
9395
9396 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9397
9398 * etc/bench.pm: Shorten bench names.
9399
9400 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9401
9402 * src/output.h, src/output.c (error_verbose): Move to...
9403 * src/getargs.h, src/getargs.c: here.
9404 Sort the flags.
9405 Adjust dependencies.
9406
9407 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9408
9409 * data/c.m4 (b4_copyright): Put the special exception for Bison
9410 skeletons here, so we don't have to put it in each skeleton. All
9411 uses changed. Suggested by Akim Demaille. Also, wrap the
9412 copyright notice, in case it is longer than 80 columns. Replace
9413 comma by newline after title.
9414
9415 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9416
9417 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9418 incompatibility, not a bug. Mention that it wasn't fixed as of
9419 flex 2.5.33.
9420
9421 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9422
9423 * examples/extexi: Enforce the precedence of concatenation over
9424 >>.
9425 Reported by Tommy Nordgren.
9426
9427 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
9428
9429 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9430 with the member "token".
9431 Reported by Martin Nylin.
9432
9433 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9434
9435 * data/glr.c: Switch to Bison 2.2 special-exception language in
9436 the copyright notice. Use more-regular format for titles and
9437 copyright notices.
9438 * data/glr.cc: Likewise.
9439 * data/location.cc: Likewise.
9440 * data/yacc.cc: Likewise.
9441 * doc/bison.texinfo (Conditions): Document this.
9442 * NEWS: likewise. Upgrade version to 2.2.
9443
9444 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
9445
9446 * data/glr.cc: Remove dead code.
9447
9448 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9449
9450 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9451 that variable and the line breaks the bootstrap. Problem reported
9452 by Juan M. Guerrero.
9453
9454 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9455
9456 * doc/bison.texinfo (Multiple start-symbols): New.
9457
9458 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9459
9460 * etc/README, etc/bench.pl: New.
9461
9462 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
9463
9464 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9465 rule.
9466 Reported by Mickael Labau.
9467 * tests/input.at (Torturing the Scanner): Test it.
9468
9469 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9470
9471 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9472 Problem reported by Bob Rossi.
9473
9474 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9475
9476 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9477 and didn't really work.
9478 For the index, use @ifnotinfo, not @iftex.
9479 Minor cleanups of spacing and terminology.
9480
9481 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9482
9483 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9484 of AT_NAME_PREFIX when %name-prefix is not used.
9485
9486 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9487
9488 Apply --prefix to C++ skeletons too: they change the namespace.
9489 The test suite already exercize these cases.
9490 * data/c++.m4 (b4_namespace): New.
9491 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9492 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9493 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9494 * doc/bison.texinfo: Document it.
9495 (Option Cross Key): Use @multitable in all formats. It looks
9496 nicer, even in TeX outputs.
9497 (Rules): Use the same code whatever the output type is.
9498 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9499 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9500 * tests/calc.at: Use it, instead of hard coding `yy'.
9501
9502 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9503
9504 * TODO: Remove dead items.
9505
9506 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9507
9508 * doc/FAQ: Remove, merged into...
9509 * doc/bison.texinfo (FAQ): this.
9510 * doc/Makefile.am (EXTRA_DIST): Adjust.
9511
9512 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9513
9514 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9515 even if empty.
9516 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9517 * doc/bison.texinfo (Calc++ Scanner): Use it.
9518
9519 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9520
9521 Fix two nits reported by twlevo, plus one more that I discovered.
9522
9523 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9524 this is the usual Bison style.
9525 * src/location.h (location_print): Likewise.
9526
9527 * src/reader.h (token_name): Likewise.
9528
9529 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9530
9531 Fix some nits reported by twlevo.
9532 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9533 and "POSIX". Use more-modern syntax for URLs. Mention C++
9534 and ask for Java. Don't hardwire OS version numbers. Add
9535 copyright notice.
9536 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9537 * src/conflicts.c (solved_conflicts_obstack): Now static.
9538
9539 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
9540
9541 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
9542 page. Say "you can use it" not "you may use it" as on the web page;
9543 we're describing capabilities not granting permission.
9544
9545 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
9546
9547 * data/glr.c (yyresolveLocations): Rename local variables to avoid
9548 shadowing warnings. Use usual patter for iterating through RHS.
9549 * tests/glr-regression.at
9550 (Uninitialized location when reporting ambiguity):
9551 Modify yylex so that it uses its argument, rather than trying
9552 to rely on ARGSUSED (which doesn't work for gcc with warnings).
9553 const char -> char const.
9554
9555 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
9556 Don't use tabs inside commands; it messes up 'ps'.
9557 Problem reported by twlevo.
9558
9559 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
9560
9561 * tests/glr-regression.at (Uninitialized location when reporting
9562 ambiguity): New test case.
9563 * data/glr.c (yyresolveLocations): New function, which uses
9564 YYLLOC_DEFAULT.
9565 (yyresolveValue): Invoke yyresolveLocations before reporting an
9566 ambiguity.
9567 * doc/bison.texinfo (Default Action for Locations): Note
9568 YYLLOC_DEFAULT's usage for ambiguity locations.
9569 (GLR Semantic Actions): Cross-reference those notes.
9570
9571 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
9572
9573 * tests/glr-regression.at (Leaked semantic values when reporting
9574 ambiguity): Remove unnecessary union and type declarations.
9575 (Leaked lookahead after nondeterministic parse syntax error): New test
9576 case.
9577 * data/glr.c (yyparse): Check for zero stacks remaining before
9578 attempting to shift the lookahead so that you don't lose it.
9579
9580 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9581
9582 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
9583 * tests/glr-regression.at (Leaked semantic values when reporting
9584 ambiguity): New test case.
9585 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
9586 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
9587 now unnecessary yystackp parameter.
9588 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
9589 destructors can be called.
9590
9591 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
9592 in existing testcases.
9593
9594 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9595
9596 Don't leak semantic values for parent RHS when a user action cuts the
9597 parser, and clean up related code a bit.
9598 * tests/glr-regression.at (Leaked merged semantic value if user action
9599 cuts parse): Rename to...
9600 (Leaked semantic values if user action cuts parse): ... this. Add check
9601 for leaked parent RHS values.
9602 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
9603 between an unresolved state (non-empty chain of semantic options) and
9604 an incomplete one (signaled by an empty chain).
9605 (yyresolveStates): Document the interface. Move all manipulation of a
9606 successfully or unsuccessfully resolved yyGLRState to...
9607 (yyresolveValue): ... here so that yyresolveValue always leaves a
9608 yyGLRState with consistent data and thus is easier to understand.
9609 Remove the yyvalp and yylocp parameters since they are always just
9610 taken from the yys parameter. When reporting a discarded merged value
9611 in debugging output, note that it is incompletely merged. Document the
9612 interface.
9613 (yyresolveAction): If resolving any of the RHS states fails, destroy
9614 them all rather than leaking them. Thus, as long as user actions are
9615 written to clean up the RHS correctly, yyresolveAction always cleans up
9616 the RHS of a semantic option. Document the interface.
9617
9618 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
9619
9620 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
9621 led to a segmentation fault in GNU Pascal. Problem reported
9622 by Waldek Hebisch.
9623
9624 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
9625
9626 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
9627 mid-rule action inside a nonterminal symbol in order to declare a
9628 destructor for its semantic value.
9629
9630 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
9631
9632 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
9633 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
9634 __cplusplus && ! defined _STDLIB_H && !
9635 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
9636 defined free))]: Include <stdlib.h> rather than rolling our own
9637 declarations of malloc and free, to avoid problems with
9638 incompatible declarations (using 'throw') C++'s stdlib.h. This
9639 should fix Debian bug 340012
9640 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
9641 reported by Guillaume Melquiond.
9642
9643 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9644
9645 * NEWS: Clarify symbols versus types in unused-value warnings.
9646
9647 * configure.ac (AC_INIT): Bump version number.
9648
9649 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9650
9651 * NEWS: Version 2.1a.
9652 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
9653 since C99 requires this.
9654
9655 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
9656
9657 * m4/c-working.m4: New file.
9658 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
9659
9660 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
9661
9662 * Makefile.maint: Merge from coreutils.
9663
9664 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
9665
9666 More portability fixes for problems summarized by Nelson H. F. Beebe.
9667
9668 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
9669 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
9670 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
9671 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
9672 messes up because C++ code is compiled in 32-bit mode but linked
9673 in 64-bit mode.
9674
9675 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
9676
9677 More portability fixes for problems summarized by Nelson H. F. Beebe.
9678
9679 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
9680 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
9681
9682 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
9683 nodist_PROGRAMS, since we don't need to actually compile the
9684 example if we're just doing a plain 'make'. This avoids bothering
9685 the installer unnecessarily about problems due to weird C++
9686 compilers.
9687
9688 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
9689
9690 More portability fixes for problems summarized by Nelson H. F. Beebe.
9691
9692 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
9693 than #include "...", and compile with -I'.'. The old method was
9694 not portable, according to Posix and the C standard, and it does
9695 not work with Sun C 5.7, where previous #line directives affect
9696 the working directory used in later #include "..." directives.
9697
9698 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9699
9700 Various DJGGP specific issues in /djgpp
9701
9702 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
9703
9704 More portability fixes for problems summarized by Nelson H. F. Beebe.
9705
9706 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
9707 '#include <map>' works and that you can apply ++ to iterators.
9708
9709 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
9710
9711 Work around portability problems summarized by Nelson H. F. Beebe in
9712 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
9713
9714 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9715 that '#include <string>' works.
9716
9717 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
9718 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
9719 "warning: sorry: semantics of inline function static data `const
9720 unsigned char translate_table[262]' are wrong (you'll wind up with
9721 multiple copies)".
9722
9723 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
9724 or, xor to not_, and_, or_, and xor_, respectively. This works
9725 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
9726 random system header somewhere that includes the equivalent of
9727 <iso646.h>.
9728
9729 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
9730 -E" works; it apparently doesn't work with PathScale EKO Compiler
9731 Suite Version 2.0.
9732
9733 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
9734
9735 During deterministic GLR operation, user actions should be able to
9736 influence the parse by changing yychar. To make this easier to fix and
9737 to make glr.c easier to evolve in general, don't maintain yytoken in
9738 parallel with yychar; just compute yytoken when needed.
9739 * tests/glr-regression.at (Incorrect lookahead during deterministic
9740 GLR): Check that setting yychar in a user action has the intended
9741 effect.
9742 * data/glr.c (yyGLRStack): Remove yytokenp member.
9743 (yyclearin): Don't set *yytokenp.
9744 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
9745 yychar rather than *yytokenp to determine the current lookahead.
9746 Compute yytoken locally when needed.
9747 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
9748 point to.
9749
9750 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
9751 after `--report' documentation.
9752
9753 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
9754
9755 * src/parse-gram.y (grammar_declaration): Location of printer
9756 symbol is @1, not list->location. Bug reported by twlevo.
9757 * tests/input.at (Incompatible Aliases): Adjust to above change.
9758
9759 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
9760
9761 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
9762 all the test at once. This makes the output easier to read in the
9763 normal case.
9764
9765 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
9766 got from <http://bro-ids.org/download.html>. The bug is that
9767 when two actions appeared in succession, the second one was
9768 scanned before the first one was added to the grammar rule
9769 as a midrule action. Bison then output the incorrect warning
9770 "parse.y:905.17-906.36: warning: unused value: $3".
9771 * src/parse-gram.y (BRACED_CODE, action): These are no longer
9772 associated with a value.
9773 (rhs): Don't invoke grammar_current_rule_action_append.
9774 (action): Invoke it here instead.
9775 * src/reader.c (grammar_midrule_action): Now extern.
9776 (grammar_current_rule_action_append): Don't invoke
9777 grammar_midrule_action; that is now the scanner's job.
9778 * src/reader.h (last_string, last_braced_code_loc):
9779 (grammar_midrule_action): New decls.
9780 * src/scan-gram.l (last_string): Now extern, sigh.
9781 (last_braced_code_loc): New extern variable.
9782 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
9783 rule already has an action.
9784 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
9785 * tests/input.at (AT_CHECK_UNUSED_VALUES):
9786 Add some tests to check that the above changes fixed the bug.
9787
9788 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
9789
9790 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
9791 All used changed. Check whether the symbol has a destructor,
9792 not whether it is typed.
9793 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
9794 that the values are still reported as unused. All line numbers
9795 adjusted.
9796
9797 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
9798
9799 Work around a bug in bro 0.8, which underparenthesizes its
9800 definition of YYLLOC_DEFAULT.
9801 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
9802 their arguments.
9803 * data/lalr1.cc: Likewise.
9804 * data/yacc.cc: Likewise.
9805
9806 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
9807
9808 Work around a bug in Pike 7.0, and give the Pike folks a
9809 better way to override the usual int widths.
9810 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
9811 user can override the types.
9812 (short): #undef, to work around a bug in Pike 7.0.
9813 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
9814 (union yyalloc.yyss): Use yytype_int16 rather than short.
9815 All uses changed.
9816 (yysigned_char): Remove.
9817 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
9818 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
9819 * tests/regression.at (Web2c Actions): Adjust to above changes.
9820
9821 * src/reader.c (check_and_convert_grammar): New function.
9822 (reader): Close the input file even if something went wrong during
9823 parsing. Minor file descriptor leak reported by twlevo.
9824
9825 * src/assoc.c (assoc_to_string): Use a default: abort (); case
9826 to pacify gcc -Wswitch-default.
9827 * src/scan-gram.l (adjust_location): Use a default: break; case
9828 to pacify gcc -Wswitch-default.
9829 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
9830 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9831 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9832 Move these decls to scan-skel.l, since they don't need to be
9833 visible elsewhere.
9834 * src/scan-skel.l: Accept the above decls.
9835 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
9836 is used.
9837
9838 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
9839
9840 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
9841 since we don't want to insist on a version number at the start
9842 of the changelog every time.
9843 * Makefile.maint: Sync from coreutils a bit better.
9844 (sc_trailing_blank): Renamed from sc_trailing_space.
9845 All uses changed.
9846 (sc_no_if_have_config_h, sc_require_config_h):
9847 (sc_prohibit_assert_without_use): New rules.
9848 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
9849 (sc_dd_max_sym_length): Fix leading spaces in rule.
9850 (sc_system_h_headers): Prefix with @.
9851 (sc_useless_cpp_parens, m4-check): Output line numbers.
9852 (changelog-check): Allow version only in head.
9853 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
9854 satisfy new Makefile.maint rule.
9855 * data/glr.c: Likewise.
9856 * data/glr.cc: Likewise.
9857 * data/lalr1.cc: Likewise.
9858 * data/yacc.c: Likewise.
9859 * lib/ebitsetv.c: Likewise.
9860 * lib/lbitset.c: Likewise.
9861 * lib/subpipe.c: Likewise.
9862 * lib/timevar.c: Likewise.
9863 * src/system.h: Likewise.
9864 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
9865 * djgpp/Makefile.maint: Add copyright notice.
9866 * djgpp/README.in: Likewise.
9867 * djgpp/config.bat: Likewise.
9868 * djgpp/config.site: Likewise.
9869 * djgpp/config_h.sed: Likewise.
9870 * djgpp/djunpack.bat: Likewise.
9871 * djgpp/config.sed: Fix copyright notice to match standard format.
9872 * djgpp/subpipe.h: Likewise.
9873 * lib/bitsetv-print.c: Likewise.
9874 * lib/bitsetv.c: Likewise.
9875 * lib/subpipe.h: Likewise.
9876 * lib/timevar.c: Likewise.
9877 * lib/timevar.h: Likewise.
9878 * djgpp/subpipe.c: Use standard recipe for config.h.
9879 * lib/abitset.c: Likewise.
9880 * lib/bitset.c: Likewise.
9881 * lib/bitset_stats.c: Likewise.
9882 * lib/bitsetv-print.c: Likewise.
9883 * lib/bitsetv.c: Likewise.
9884 * lib/ebitsetv.c: Likewise.
9885 * lib/get-errno.c: Likewise.
9886 * lib/lbitset.c: Likewise.
9887 * lib/subpipe.c: Likewise.
9888 * lib/timevar.c: Likewise.
9889 * lib/vbitset.c: Likewise.
9890 * tests/local.at: Likewise.
9891 * src/scan-gram.l: Don't include verify.h, since system.h does
9892 that for us.
9893 * .x-sc_require_config_h: New file.
9894 * .x-sc_unmarked_diagnostics: New file.
9895
9896 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
9897
9898 Be a bit more systematic about using 'abort'.
9899 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
9900 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
9901 Put 'default: abort ();' before some other case, to satisfy older
9902 pedantic compilers.
9903 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9904 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
9905 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
9906 * src/conflicts.c (resolve_sr_conflict): Likewise.
9907 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
9908 (get_decision_str, get_orientation_str, get_node_alignment_str):
9909 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
9910 (get_linestyle_str, get_arrowstyle_str): Likewise.
9911 * src/conflicts.c (resolve_sr_conflict):
9912 Use a default case rather than one for the one remaining enum
9913 value, to catch invalid enum values as well.
9914 * src/lalr.c (set_goto_map, map_goto):
9915 Prefer "assert (FOO);" to "if (!FOO) abort ();".
9916 * src/nullable.c (nullable_compute, token_definitions_output):
9917 Likewise.
9918 * src/reader.c (packgram, reader): Likewise.
9919 * src/state.c (transitions_to, state_new, state_reduction_find):
9920 Likewise.
9921 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
9922 (symbol_pack): Likewise.
9923 * src/tables.c (conflict_row, pack_vector): Likewise.
9924 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
9925 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
9926 * src/system.h: Don't include <assert.h>.
9927 (assert): New macro.
9928
9929 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
9930 (Destructor Decl, Parser Function, Pure Calling):
9931 Describe rules for braces inside C code more carefully.
9932
9933 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
9934
9935 Fix some porting glitches found by Nelson H. F. Beebe.
9936 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
9937 compilers that don't understand that abort () does not return.
9938 * src/state.c (transitions_to): Likewise.
9939 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9940 that '#include <cstdlib>' works.
9941 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
9942 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
9943 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
9944 for the benefit of some pre-C99 compilers.
9945
9946 * bootstrap: Undo changes to gnulib files that autoreconf made.
9947
9948 Minor fixups to get 'make maintainer-check' to work.
9949 * configure.ac: Don't use -Wnested-externs, as it's incompatible
9950 with the new verify.h implementation.
9951 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
9952 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
9953 * data/yacc.c (YYUSE): Likewise.
9954 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
9955 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
9956 * src/parse-gram.y (declaration): Don't pass a string constant
9957 to a function that expects char *, since GCC might complain
9958 about the constant value.
9959 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
9960 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
9961 before #defining them.
9962 * tests/glr-regression.at
9963 (Incorrectly initialized location for empty right-hand side in GLR):
9964 In yyerror, use the msg arg.
9965 (Corrupted semantic options if user action cuts parse):
9966 (Incorrect lookahead during deterministic GLR):
9967 (Incorrect lookahead during nondeterministic GLR):
9968 Don't name a local var 'index'; it shadows string.h's 'index'.
9969
9970 2006-01-19 Akim Demaille <akim@epita.fr>
9971
9972 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
9973 location, not just parts of it.
9974
9975 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
9976
9977 * NEWS: Document the fact that multiple %unions are now allowed.
9978 * doc/bison.texinfo (Union Decl): Likewise.
9979 * TODO: This feature is now implemented, so remove it from
9980 the wishlist.
9981
9982 * Makefile.maint: Merge with coreutils Makefile.maint.
9983 (CVS_LIST): Use build-aux version if available.
9984 (VERSION_REGEXP): New macro.
9985 (syntax-check-rules): Add sc_no_if_have_config_h,
9986 sc_prohibit_assert_without_use, sc_require_config_h,
9987 sc_useless_cpp_parens.
9988 (sc_obsolete_symbols): Check for O_NDELAY.
9989 (sc_dd_max_sym_length): Track coreutils.
9990 (sc_unmarked_diagnostics): Look in all files, not just *.c.
9991 (sc_useless_cpp_parens): New rule.
9992 (news-date-check): Look for version or today's date.
9993 (changelog-check): Don't require version number near head.
9994 (copyright-check): Use current year instead of hardwiring 2005.
9995 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
9996 (announcement): Add --gpg-key-ID.
9997
9998 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
9999 with "file system".
10000
10001 Avoid undefined behavior that addressed just before the start of an
10002 array. Problem reported by twlevo.
10003 * src/reader.c (packgram): Prepend a new sentinel before ritem.
10004 * src/lalr.c (build_relations): Rely on new sentinel.
10005 * src/gram.c (gram_free): Adjust to new sentinel.
10006
10007 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
10008
10009 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
10010 yylookaheadNeeds. All uses updated.
10011 (yysplitStack): Rename local yynewLookaheadStatuses to
10012 yynewLookaheadNeeds.
10013 * data/glr-regression.at (Incorrect lookahead during nondeterministic
10014 GLR): In comments, change `lookahead status' to `lookahead need'.
10015
10016 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10017
10018 * data/glr.c (yysplitStack): A little stylistic rewrite.
10019
10020 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10021
10022 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
10023
10024 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10025
10026 * doc/bison.texinfo: Fix some typos.
10027 (GLR Semantic Actions): New subsection discussing special
10028 considerations because GLR semantic actions might be deferred.
10029 (Actions): Mention look-ahead usage of yylval.
10030 (Actions and Locations): Mention look-ahead usage of yylloc.
10031 (Special Features for Use in Actions): Add YYEOF entry and mention it
10032 in the yychar entry.
10033 In the yychar entry, remove mention of the local yychar case (pure
10034 parser) since this is irrelevant information when writing semantic
10035 actions and since it's already discussed in `Table of Symbols' where
10036 yychar is otherwise described as an external variable.
10037 In the yychar entry, don't call it the `current' look-ahead since it
10038 isn't when semantic actions are deferred.
10039 In the yychar and yyclearin entries, add note about deferred semantic
10040 actions.
10041 Add yylloc and yylval entries discussing look-ahead usage.
10042 (Look-Ahead Tokens): When discussing yychar, don't call it the
10043 `current' look-ahead, and do mention yylval and yylloc.
10044 (Error Recovery): Cross-reference `Action Features' when mentioning
10045 yyclearin.
10046 (Table of Symbols): In the yychar entry, don't call it the `current'
10047 look-ahead.
10048 In the yylloc and yylval entries, mention look-ahead usage.
10049
10050 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
10051
10052 * tests/glr-regression.at: Update copyright year to 2006.
10053
10054 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10055
10056 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
10057 use during nondeterministic operation to track which stacks have
10058 actually needed the current lookahead.
10059 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
10060 Allocate, deallocate, resize, and otherwise shuffle space for
10061 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
10062 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
10063 appropriately during nondeterministic operation.
10064 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
10065 members to store the current lookahead to be used by the deferred
10066 user action.
10067 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
10068 from which the RHS is taken. Set the lookahead members of the new
10069 yySemanticOption according to the lookahead status for stack yyk.
10070 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
10071 yyaddDeferredAction.
10072 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
10073 members of yySemanticOption before invoking yyuserAction, and then set
10074 them back to their current values afterward.
10075 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
10076 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
10077 * tests/glr-regression.at: Remove `.' from the ends of recent test case
10078 titles for consistency.
10079 (Leaked merged semantic value if user action cuts parse): In order to
10080 suppress lint warnings, use arguments in merge function, and assign
10081 char value < 128 in main.
10082 (Incorrect lookahead during deterministic GLR): New test case.
10083 (Incorrect lookahead during nondeterministic GLR): New test case.
10084
10085 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10086
10087 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
10088 !yyvaluep as signal that no semantic value is available to print.
10089 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
10090 to print a semantic value.
10091
10092 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
10093
10094 * tests/glr-regression.at: For consistency with my newer test cases,
10095 don't thank myself.
10096
10097 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10098
10099 * data/glr.c (yyresolveValue): When merging semantic options, if at
10100 least one user action succeeds but a later one cuts the parse, then
10101 destroy the semantic value before returning rather than leaking it.
10102 (yyresolveStates): If a user action cuts the parse and thus
10103 yyresolveValue fails, ignore the (unset) semantic value rather than
10104 corrupting the yyGLRState, and empty the semantic options list since
10105 the user actions should have called all necessary destructors.
10106 Simplify code with YYCHK.
10107 * tests/glr-regression.at (Corrupted semantic options if user action
10108 cuts parse): New test case.
10109 (Undesirable destructors if user action cuts parse): New test case.
10110 Before applying any of this patch, this test case never actually failed
10111 for me... but only because the corrupted semantic options usually
10112 masked this bug.
10113 (Leaked merged semantic value if user action cuts parse): New test
10114 case.
10115
10116 2006-01-05 Akim Demaille <akim@epita.fr>
10117
10118 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10119
10120 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10121
10122 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10123 _MSC_VER. Problem reported by Cenzato Marco.
10124 (b4_c_function_def): Use it.
10125 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10126 b4_c_modern.
10127 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10128 than rolling our own.
10129
10130 2006-01-04 Akim Demaille <akim@epita.fr>
10131
10132 Also warn about non-used mid-rule values.
10133 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10134 member.
10135 (symbol_list_new): Adjust.
10136 * src/reader.c (symbol_typed_p): New.
10137 (grammar_rule_check): Use it.
10138 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10139 Check its rule.
10140 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10141 Use it.
10142 * tests/actions.at (Exotic Dollars): Adjust.
10143
10144 2006-01-04 Akim Demaille <akim@epita.fr>
10145
10146 * src/reader.c (grammar_midrule_action): If $$ is set in a
10147 mid-rule, move the `used' bit to its lhs.
10148 * tests/input.at (Unused values): New.
10149 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10150
10151 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10152
10153 * doc/bison.texinfo (Bison Options): Say more accurately what
10154 --yacc does.
10155 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10156 about declarations in the grammar when in Yacc mode, as POSIX does
10157 not require a diagnostic when the grammar uses extensions.
10158
10159 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10160
10161 Warn about dubious constructions like "%token T T".
10162 Reported by twlevo.
10163 * src/symtab.h (struct symbol.declared): New member.
10164 * src/symtab.c (symbol_new): Initialize it to false.
10165 (symbol_class_set): New arg DECLARING, specifying whether
10166 this is a declaration that we want to warn about, if there
10167 is more than one of them. All uses changed.
10168
10169 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10170 Allow multiple %union directives, whose contents concatenate.
10171 * src/parse-gram.y (grammar_declaration): Likewise.
10172 Use muscle_code_grow, so that we don't need stype_line any more.
10173 All uses changed.
10174
10175 * src/muscle_tab.c (muscle_grow): Fix comment.
10176
10177 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10178 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10179 Update copyright year to 2006.
10180
10181 2006-01-03 Akim Demaille <akim@epita.fr>
10182
10183 Have glr.cc pass (some of) the calc.at tests.
10184 * data/glr.cc (b4_parse_param_orig): New.
10185 (b4_parse_param): Improve its definition, and bound it more
10186 clearly in the skeleton.
10187 (b4_epilogue): Append, instead of prepending, in order to keep
10188 #line consistency.
10189 Simplify the generation of auxiliary functions: locations and
10190 purity are mandated.
10191 (b4_global_tokens_and_yystype): Honor it.
10192 * data/location.cc (c++.m4): Don't include it.
10193 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10194 and AT_SKEL_CC_IF.
10195 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10196 AT_LALR1_CC_IF.
10197 Be sure to initialize the first position's filename.
10198 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10199 mandated anyway.
10200 (AT_CHECK_CALC_GLR_CC): New.
10201 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10202
10203 2006-01-02 Akim Demaille <akim@epita.fr>
10204
10205 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10206 c.m4.
10207 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
10208 * data/glr.cc: Do not include stack.hh.
10209
10210 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10211
10212 * data/glr.c: Reformat whitespace with tabs.
10213 (b4_lpure_formals): Remove this unused m4 macro.
10214 * tests/cxx-type.at: Reformat whitespace with tabs.
10215 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10216 since it's a member. Rename type to isNterm for clarity.
10217
10218 2005-12-29 Akim <akim@sulaco.local>
10219
10220 Let glr.cc catch up with symbol_value_print.
10221 * data/glr.cc (b4_yysymprint_generate): Replace by...
10222 (b4_yy_symbol_print_generate): this.
10223 (yy_symbol_print, yy_symbol_value_print): Declare them.
10224
10225 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10226
10227 * src/location.h (boundary): Note that a line or column equal
10228 to INT_MAX indicates an overflow.
10229 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10230 (rule_length_overflow, increment_rule_length, add_column_width):
10231 New functions.
10232 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10233 (<SC_BRACED_CODE>"}"):
10234 Use increment_rule_length rather than incrementing it by hand.
10235 (adjust_location, handle_syncline): Diagnose overflow.
10236 (handle_action_dollar, handle_action_at):
10237 Fix bug with monstrosities like $-2147483648.
10238 Remove now-unnecessary checks.
10239 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10240 (convert_ucn_to_byte): Verify assumptions.
10241 (handle_syncline): New arg LOC. All callers changed.
10242 Don't store through a value derived from char const * pointer.
10243
10244 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10245 GCC warnings.
10246
10247 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10248
10249 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10250 Remove unnecessary forward static decls.
10251
10252 2005-12-27 Akim Demaille <akim@epita.fr>
10253
10254 * src/reader.c (grammar_current_rule_check): Also check that $$
10255 is used.
10256 Take the rule to check as argument, hence rename as...
10257 (grammar_rule_check): this.
10258 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10259 Rename as...
10260 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10261 (grammar_midrule_action, grammar_symbol_append): Now static.
10262 * tests/torture.at (input): Don't rely on the default action
10263 being always performed.
10264 * tests/calc.at: "Set" $$ even when the action is "cut" with
10265 YYERROR or other.
10266 * tests/actions.at (Exotic Dollars): Instead of using unused
10267 values, check that the warning is issued.
10268
10269 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10270
10271 * NEWS: Improve wording for unused-value warnings.
10272
10273 2005-12-22 Akim Demaille <akim@epita.fr>
10274
10275 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10276 (b4_yysymprint_generate): Rename as...
10277 (b4_yy_symbol_print_generate): this.
10278 Generate yy_symbol_print instead of yysymprint.
10279 Generate also yy_symbol_value_print, and use it.
10280
10281 2005-12-22 Akim Demaille <akim@epita.fr>
10282
10283 * NEWS: Warn about unused values.
10284 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10285 a `used' member.
10286 (symbol_list_n_get, symbol_list_n_used_set): New.
10287 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10288 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10289 * src/reader.c (grammar_current_rule_check): Check that values are
10290 used.
10291 * src/symtab.c (symbol_print): Accept 0.
10292 * tests/existing.at: Remove the type information.
10293 Empty the actions.
10294 Remove useless actions (beware of mid-rule actions: perl -000
10295 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10296 * tests/actions.at (Exotic Dollars): Use unused values.
10297 * tests/calc.at: Likewise.
10298 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10299 Likewise.
10300
10301 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10302 rule_useful_p.
10303
10304 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10305
10306 Undo 2005-12-01 tentative license wording change. The wording is
10307 still being reviewed by the lawyers, and we don't want to wait for
10308 them before publishing a test release. For now, revert to the
10309 previous wording.
10310 * NEWS: Undo 2005-12-01 change.
10311 * data/glr.c: Revert to previous license wording.
10312 * data/glr.cc: Likewise.
10313 * data/lalr1.cc: Likewise.
10314 * data/location.cc: Likewise.
10315 * data/yacc.c: Likewise.
10316
10317 * NEWS: Reword %destructor vs YYABORT etc.
10318 * data/glr.c: Use American spacing, for consistency.
10319 * data/glr.cc: Likewise.
10320 * data/lalr1.cc: Likewise.
10321 * data/yacc.c: Likewise.
10322 * data/yacc.c: Reformat comments slightly.
10323 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10324 for consistency. Fix some spelling errors and reword recently-included
10325 text slightly.
10326 * tests/cxx-type.at: Cast results of malloc, for C++.
10327
10328 2005-12-21 Joel E. Denny <address@hidden>
10329
10330 * tests/cxx-type.at: Construct a tree, count the parents of shared
10331 nodes, and free each node once and only once. Previously, the memory
10332 for semantic values was leaked instead.
10333
10334 2005-12-21 Joel E. Denny <address@hidden>
10335
10336 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10337 (yylval, yylloc): If pure, #define to yystackp->yyval and
10338 yystackp->yyloc similar to yychar and yynerrs.
10339 (yyparse): If pure, remove local yylval and yylloc. Add local
10340 yystackp to accommodate pure definitions of yylval and yylloc.
10341 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10342 yylvalp and yyllocp to &yylval and &yylloc.
10343 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10344 namespace. Previously, nerrs and char were missing, but lval and lloc
10345 weren't necessary.
10346 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10347 yylvalp and yyllocp parameters since, if pure, these are now always
10348 accessible through yystackp. If not pure, they are still accessible
10349 globally.
10350 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10351 `if (YYID (N))' to pacify lint.
10352
10353 2005-12-21 Akim Demaille <akim@epita.fr>
10354
10355 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10356 destroy the RHS symbols of a rule.
10357 * data/yacc.c (yylen): Initialize to 0.
10358 Keep its value to the number of items to possibly shift.
10359 In particular, a regular successful parse that ends on YYFINAL by
10360 a (internal) YYACCEPT must not have yylen != 0.
10361 (yyerrorlab, yyreturn): Pop the RHS.
10362 Reorder a bit to emphasize the `shifting' bits of code.
10363 (YYPOPSTACK): Now accept a number of items to pop.
10364 * data/lalr1.cc: Likewise.
10365 * data/glr.c: Formatting changes.
10366 Use goto instead of fall through.
10367 * doc/bison.texinfo (Destructor Decl): Complete.
10368
10369 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10370
10371 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10372 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10373 * djgpp/config.bat: Replace every occurence of the file name
10374 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10375 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10376 * djgpp/config.sed: Replace every occurence of the file name
10377 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10378 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10379 * djgpp/djunpack.bat: DJGPP specific file.
10380 * djgpp/fnchange.lst: DJGPP specific file.
10381 * djgpp/README.in: Add new information about how to unpack the bison
10382 source on MSDOS and other systems which have 8.3 file name restrictions
10383 using djunpack.bat and fnchange.lst.
10384
10385 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10386
10387 * bootstrap (build_cvs_prefix): Remove; unused.
10388 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10389 when getting gnulib.
10390
10391 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10392
10393 * data/glr.c: Reorder typedef declarations for structs to match order
10394 of struct declarations.
10395 Rename yystack everywhere to yystackp except in yyparse where it's not
10396 a pointer.
10397 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10398 consistency.
10399 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10400 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10401 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10402 lint.
10403
10404 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10405
10406 * tests/sets.at (Accept): Fix typos in regular expression used to
10407 sed out the final state number.
10408
10409 Work around portability problem on Solaris 10: flex-generated
10410 files include <stdio.h> before <config.h>, which messes up
10411 because the latter defines __EXTENSIONS__. Address the problem
10412 by creating two new little files that include <config.h> first,
10413 then include the flex-generated files. Rewrite everyone else
10414 to include <config.h> first, as well.
10415 * lib/timevar.c: Always include "config.h".
10416 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10417 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10418 (EXTRA_bison_SOURCES): New macro.
10419 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10420 * src/system.h: Don't include config.h.
10421 * src/LR0.c: Include <config.h> first.
10422 * src/assoc.c: Likewise.
10423 * src/closure.c: Likewise.
10424 * src/complain.c: Likewise.
10425 * src/conflicts.c: Likewise.
10426 * src/derives.c: Likewise.
10427 * src/files.c: Likewise.
10428 * src/getargs.c: Likewise.
10429 * src/gram.c: Likewise.
10430 * src/lalr.c: Likewise.
10431 * src/location.c: Likewise.
10432 * src/main.c: Likewise.
10433 * src/muscle_tab.c: Likewise.
10434 * src/nullable.c: Likewise.
10435 * src/output.c: Likewise.
10436 * src/parse-gram.y: Likewise.
10437 * src/print.c: Likewise.
10438 * src/print_graph.c: Likewise.
10439 * src/reader.c: Likewise.
10440 * src/reduce.c: Likewise.
10441 * src/relation.c: Likewise.
10442 * src/state.c: Likewise.
10443 * src/symlist.c: Likewise.
10444 * src/symtab.c: Likewise.
10445 * src/tables.c: Likewise.
10446 * src/uniqstr.c: Likewise.
10447 * src/vcg.c: Likewise.
10448
10449 * src/parse-gram.y: Fix minor problems uncovered by lint.
10450 (current_lhs, current_lhs_location): Now static.
10451 (current_assoc): Remove unused variable.
10452
10453 Cleanups so that Bison-generated parsers have less lint.
10454 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10455 Prepend /*ARGSUSED*/, for lint's sake.
10456 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10457 definition if 'lint' is defined.
10458 (YYID): New macro (or function, if lint).
10459 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10460 * data/yacc.c: Likewise.
10461 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10462 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10463 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10464 is C++ only.
10465 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10466 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10467 Use YYID(0) rather than 0, for lint.
10468 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10469 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10470
10471 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10472
10473 * tests/glr-regression.at
10474 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10475 Close memory leak reported by twlevo.
10476
10477 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10478
10479 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10480 all stacks.
10481 (yyparse): Iterate another stack in order to call user destructors.
10482 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10483 New test case.
10484 (Duplicated user destructor for lookahead): This test now is expected
10485 to succeed.
10486
10487 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10488
10489 * NEWS: Document the following change.
10490 * data/yacc.c: Say "parser skeleton" rather than "file", since
10491 it's no longer just a file.
10492 * data/glr.c: Grant a special exception for C GLR parsers, that
10493 reads like the already-existing exception for C LALR(1) parsers.
10494 * data/glr.cc: Likewise.
10495 * data/lalr1.cc: Likewise.
10496 * data/location.cc: Likewise.
10497 * data/yacc.c: Reword the "written by" statement to clarify that
10498 it was the parser skeleton, not the entire output file.
10499 * data/glr.c: Written by Paul Hilfinger.
10500 * data/glr.cc: Written by Akim Demaille.
10501 * data/lalr1.cc: Likewise.
10502
10503 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10504
10505 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10506 Fix typos in previous change that broke 'make check'.
10507 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10508 supported in C.
10509 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10510 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10511 We can revert this once things settle down.
10512
10513 * src/conflicts.c (conflicts_print): Don't print file name twice
10514 when %expect fails because there were no conflicts.
10515 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10516 change.
10517 * tests/conflicts.at (%expect not enough, %expect too much):
10518 (%expect with reduce conflicts): Adjust to new behavior.
10519
10520 2005-11-18 Akim Demaille <akim@epita.fr>
10521
10522 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10523 errors.
10524 * NEWS: Document this.
10525 * doc/bison.texinfo (Expect Decl): Likewise.
10526
10527 2005-11-16 Akim Demaille <akim@epita.fr>
10528
10529 Generalize the display of semantic values and locations in traces.
10530 * data/glr.c (yy_reduce_print): Fix indices (again).
10531 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10532 literal integers.
10533 * data/lalr1.cc (yyreduce_print): Rename as...
10534 (yy_reduce_print): this.
10535 Display values and locations.
10536 * data/yacc.c (yy_reduce_print): Likewise.
10537 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10538 (yysymprint): Move higher to be visible from yy_reduce_print).
10539 (yyparse): Adjust.
10540 * tests/calc.at: Adjust the expected length of the traces.
10541
10542 2005-11-14 Akim Demaille <akim@epita.fr>
10543
10544 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
10545 from 1 to N, while values and location start at 0.
10546 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
10547
10548 2005-11-14 Akim Demaille <akim@epita.fr>
10549
10550 * data/glr.c (yy_reduce_print): Fix the $ number.
10551
10552 2005-11-14 Akim Demaille <akim@epita.fr>
10553
10554 "Use" parse parameters.
10555 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
10556 * data/glr.c, data/glr.cc: Use them.
10557 * data/glr.c (YYUSE): Have a C++ definition that supports
10558 non-pointer types.
10559
10560 2005-11-14 Akim Demaille <akim@epita.fr>
10561
10562 * data/glr.c (yyexpandGLRStack): Declare only if defined.
10563
10564 2005-11-14 Akim Demaille <akim@epita.fr>
10565
10566 * data/glr.cc: New.
10567 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
10568
10569 2005-11-12 Akim Demaille <akim@epita.fr>
10570
10571 Let position and location be PODs.
10572 * data/location.cc (position::initialize, location::initialize): New.
10573 (position::position, location::location): Define only if
10574 b4_location_constructors is defined.
10575 * data/lalr1.cc (b4_location_constructors): Define it for backward
10576 compatibility.
10577 * doc/bison.texinfo (Initial Action Decl): Use initialize.
10578
10579 2005-11-12 Akim Demaille <akim@epita.fr>
10580
10581 * data/lalr1.cc: Move the body of the ctor and dtor into the
10582 parser file (instead of the header).
10583 Wrap the implementations in a "namespace yy".
10584
10585 2005-11-12 Akim Demaille <akim@epita.fr>
10586
10587 Have glr.c include its header file when created.
10588 * data/glr.c (b4_shared_declarations): New.
10589 Output them verbatim in the parser if !%defines, otherwise
10590 output then in the header file, and include it instead.
10591
10592 2005-11-11 Akim Demaille <akim@epita.fr>
10593
10594 * data/glr.c: Comment changes.
10595
10596 2005-11-11 Akim Demaille <akim@epita.fr>
10597
10598 When yydebug, report semantic and location values for reductions.
10599 * data/glr.c (yy_reduce_print): Report the semantic values and the
10600 locations.
10601 (YY_REDUCE_PRINT): Adjust.
10602 (yyglrReduce): Use them.
10603 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
10604 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
10605 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
10606 traces.
10607
10608 2005-11-10 Akim Demaille <akim@epita.fr>
10609
10610 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
10611 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
10612 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
10613
10614 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
10615
10616 * m4/cxx.m4, examples/Makefile.am: Don't build
10617 examples/calc++ if no C++ compiler is available. (trivial change)
10618
10619 2005-11-09 Akim Demaille <akim@epita.fr>
10620
10621 * src/scan-skel.l: Use a couple of asserts.
10622
10623 2005-11-03 Akim Demaille <akim@epita.fr>
10624
10625 In some (weird) cases, the final state number is incorrect.
10626 Reported by Alexandre Duret-Lutz.
10627 * src/LR0.c (state_list_append): Remove the computation of
10628 final_state.
10629 (save_reductions): Do it here.
10630 (get_state): Alpha conversion.
10631 (generate_states): Use a for loop.
10632 * src/gram.h (item_number_is_rule_number)
10633 (item_number_is_symbol_number): New.
10634 * src/state.c: Use assert.
10635 * src/system.h: Include assert.h.
10636 * tests/sets.at (Accept): New.
10637
10638 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10639
10640 * data/glr.c (yyfill): Adjust comment.
10641 (yyresolveAction): Initialize default location properly
10642 for empty right-hand sides.
10643 (yydoAction): Ditto.
10644 Add comment explaining apparently dead code.
10645 * tests/glr-regression.at
10646 (Incorrectly initialized location for empty right-hand side in GLR):
10647 New test.
10648
10649 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
10650
10651 * bootstrap (cleanup_gnulib): New function. Use it to clean up
10652 gnulib when interrupted. This fixes some race conditions and
10653 works around some portability problems (one noted by Paul
10654 Hilfinger).
10655
10656 2005-10-22 Akim <akim@epita.fr>
10657
10658 * Makefile.cfg: Adjust to config -> build-aux.
10659 Reported by twledo.
10660
10661 2005-10-21 Akim Demaille <akim@epita.fr>
10662
10663 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
10664 the %parse-params.
10665 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
10666 * data/yacc.c (b4_Pure_if): Rename as...
10667 (b4_yacc_pure_if): this.
10668 (YY_SYMBOL_PRINT, yyparse): Adjust.
10669 * doc/bison.texinfo: Formatting changes.
10670
10671 2005-10-21 Akim Demaille <akim@epita.fr>
10672
10673 Finish the transition config -> build-aux.
10674 * configure.ac, Makefile.am: Use build-aux.
10675 * config/prev-version, config/announce-gen, config/Makefile.am:
10676 Move to...
10677 * build-aux/prev-version, build-aux/announce-gen,
10678 * build-aux/Makefile.am: here.
10679
10680 2005-10-14 Akim Demaille <akim@epita.fr>
10681
10682 * examples/calc++/test: Use set -x only when VERBOSE.
10683
10684 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
10685
10686 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
10687 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
10688
10689 2005-10-13 Akim Demaille <akim@epita.fr>
10690
10691 * src/scan-skel.l: Output the base name parts of the parser and
10692 header file names.
10693 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
10694 additional checks.
10695 Use this to exercise C++ outputs in subdirs.
10696 Reported by Oleg Smolsky.
10697
10698 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
10699
10700 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
10701 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
10702 Problem reported by John P. Hartmann.
10703 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
10704 already defined it.
10705
10706 2005-10-12 Akim Demaille <akim@epita.fr>
10707
10708 * src/parse-gram.y (version_check): Exit 63 to please missing
10709 (stands for "version mismatch).
10710 * tests/input.at, doc/bison.texinfo: Adjust.
10711
10712 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
10713
10714 Work around portability problems with Visual Age C compiler
10715 (xlc and xlC_r) reported by John P. Hartmann.
10716 * data/location.cc (initial_column, initial_line): Remove.
10717 All uses replaced by 0 and 1.
10718 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
10719 that xlc complains about.
10720 * src/scan-skel.l (skel_wrap): Likewise.
10721 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
10722 as __STDC__.
10723 * data/yacc.c (YYMODERN_C): New macro, which also looks at
10724 __STDC_VERSION__. Use it everywhere instead of looking at
10725 __STDC__ and __cplusplus.
10726
10727 2005-10-10 Akim Demaille <akim@epita.fr>
10728
10729 * examples/calc++/test: Be quiet unless VERBOSE.
10730
10731 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
10732
10733 * data/c.m4 (yydestruct, yysymprint):
10734 Use YYUSE instead of casting to void.
10735 * data/glr.c (YYUSE): New macro.
10736 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10737 Use it instead of rolling our own.
10738 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10739 (YYCHK1):
10740 Use /*CONSTCOND*/ to suppress lint warnings.
10741 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10742 (YY_STACK_PRINT): Use 'false' not '0'.
10743 (YYUSE): New macro.
10744 (yysymprint_, yydestruct_): Use it instead of rolling our own.
10745 * data/yacc.c (YYUSE): New macro.
10746 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
10747 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
10748 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
10749
10750
10751 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
10752 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
10753
10754 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
10755
10756 Undo the parts of the unlocked-I/O change that substituted
10757 putc or puts for printf. This might hurt performance a bit,
10758 but some people prefer the printf style.
10759 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
10760 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
10761 All uses replaced by YYFPRINTF and YYDPRINTF.
10762 * data/yacc.c: Likewise.
10763 * lib/bitset.c (bitset_print): Likewise.
10764 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
10765 putc and puts.
10766 * lib/lbitset.c (debug_lbitset): Likewise.
10767 * src/closure.c (print_firsts, print_fderives): Likewise.
10768 * src/gram.c (grammar_dump): Likewise.
10769 * src/lalr.c (look_ahead_tokens_print): Likewise.
10770 * src/output.c (escaped_output): Likewise.
10771 (user_actions_output): Break apart two printfs.
10772 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
10773 * src/reduce.c (reduce_print): Likewise.
10774 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10775 * src/system.h: Include unlocked-io.h rathe than stdio.h.
10776
10777 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10778 Use assignments rather than casts-to-void to suppress
10779 unused-variable warnings. This pacifies 'lint'.
10780 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
10781 unused-variable warnings.
10782
10783 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10784
10785 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10786
10787 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
10788
10789 Use unlocked I/O for a minor performance improvement on hosts like
10790 GNU/Linux and Solaris that support unlocked I/O. The basic idea
10791 is to use the gnlib unlocked-io module, and to prefer putc and
10792 puts to printf when either will work (since the latter doesn't
10793 come in an unlocked flavor).
10794 * bootstrap (gnulib_modules): Add unlocked-io.
10795 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
10796 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
10797 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
10798 and similarly for puts and putc and printf.
10799 * data/yacc.c: Likewise.
10800 * lib/bitset.c (bitset_print): Likewise.
10801 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
10802 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
10803 to printf.
10804 * lib/lbitset.c (debug_lbitset): Likewise.
10805 * src/closure.c (print_firsts, print_fderives): Likewise.
10806 * src/gram.c (grammar_dump): Likewise.
10807 * src/lalr.c (look_ahead_tokens_print): Likewise.
10808 * src/output.c (escaped_output): Likewise.
10809 (user_actions_output): Coalesce two printfs.
10810 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
10811 * src/reduce.c (reduce_print): Likewise.
10812 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10813 * src/system.h: Include unlocked-io.h rather than stdio.h.
10814
10815 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
10816 this confuses xgettext.
10817
10818 2005-10-02 Akim Demaille <akim@epita.fr>
10819
10820 * bootstrap (gnulib_modules): Add strverscmp.
10821 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
10822 * m4/.cvsignore: Add strverscmp.m4.
10823 * src/parse-gram.y (%require): New token, new rule.
10824 (version_check): New.
10825 * src/scan-gram.l (%require): Adjust.
10826 * tests/input.at (AT_REQUIRE): New.
10827 Use it.
10828 * doc/bison.texinfo (Require Decl): New.
10829 (Calc++ Parser): Use %require.
10830
10831 2005-10-02 Akim Demaille <akim@epita.fr>
10832
10833 * data/location.cc: New.
10834
10835 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
10836 Akim Demaille <akim@epita.fr>
10837
10838 Make sure -odir/foo.cc creates dir/location.hh etc.
10839 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
10840 (spec_file_prefix, spec_verbose_file, spec_graph_file)
10841 (spec_defines_file): Now const.
10842 (dir_prefix): New.
10843 (short_base_name): Remove.
10844 * src/files.c: Adjust.
10845 (dirname.h): Include.
10846 (base_name): Don't prototype it.
10847 (finput): Remove, duplicates gram_in.
10848 (full_base_name, short_base_name): Replace by...
10849 (all_but_ext, all_but_tab_ext): these.
10850 (compute_base_names): Rename as...
10851 (compute_file_name_parts): this.
10852 Update to compute the new variables, including dir_prefix.
10853 Adjust dependencies.
10854 * src/output.c (prepare): Output them.
10855 * src/reader.c: Adjust to use gram_in, not finput.
10856 * src/scan-skel.l (@dir_prefix@): New.
10857
10858 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10859
10860 * lib/subpipe.c: New function end_of_output_subpipe() added
10861 to allow support for non-posix systems. This is a no-op function
10862 for posix systems.
10863
10864 * lib/subpipe.h: New function end_of_output_subpipe() added
10865 to allow support for non-posix systems. This is a no-op function
10866 for posix systems.
10867
10868 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
10869 handle the lack of pipe/fork functionality on non-posix systems.
10870
10871 * djgpp/Makefile.maint: DJGPP specific file.
10872
10873 * djgpp/README.in: DJGPP specific file.
10874
10875 * djgpp/config.bat: DJGPP specific configuration file.
10876
10877 * djgpp/config.sed: DJGPP specific configuration file.
10878
10879 * djgpp/config.site: DJGPP specific configuration file.
10880
10881 * djgpp/config_h.sed: DJGPP specific configuration file.
10882
10883 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
10884
10885 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
10886
10887 2005-10-02 Akim Demaille <akim@epita.fr>
10888
10889 * data/location.cc: New, extract from...
10890 * data/lalr1.cc: here.
10891 (location.hh): Include it after the user prologue, in case the
10892 filename type is defined by the user.
10893 Forward declation location and position before the pre-prologue.
10894 (yyresult_): Rename as...
10895 (yyresult): this, it's a local variable, not an attribute.
10896 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
10897
10898 2005-10-01 Akim Demaille <akim@epita.fr>
10899
10900 * examples/extexi: Restore the #line generation.
10901
10902 2005-09-30 Akim Demaille <akim@epita.fr>,
10903 Alexandre Duret-Lutz <adl@gnu.org>
10904
10905 Move the token type and YYSTYPE in the parser class.
10906 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
10907 (parser::token): New, from the moved free definition of tokens.
10908 (parser::semantic_value): Now a full definition instead of an
10909 indirection to YYSTYPE.
10910 (b4_post_prologue): No longer included in the header file, but
10911 in the implementation file.
10912 * doc/bison.texi (C+ Language Interface): Update.
10913 * src/parse-gram.y: Support unary %define.
10914 * tests/actions.at: Define global_tokens_and_yystype for backward
10915 compatibility until we update the tests.
10916 * tests/calc.at: Idem.
10917 (first_line, first_column, last_line, last_column): Define for lalr1.cc
10918 to simplify the code.
10919
10920 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
10921
10922 Port to SunOS 4.1.4, which lacks strtoul and strerror.
10923 Ah, the good old days! Problem reported by Peter Klein.
10924 * bootstrap (gnulib_modules): Add strerror, strtoul.
10925 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
10926 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
10927
10928 2005-09-29 Akim Demaille <akim@epita.fr>
10929
10930 * data/c.m4 (b4_error_verbose_if): New.
10931 * data/lalr1.cc: Use it.
10932 (YYERROR_VERBOSE_IF): Remove.
10933 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
10934 parser members, replaced by...
10935 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
10936 local variables.
10937 (yysyntax_error_): Takes the state number as argument.
10938 (yyreduce_print_): Use the argument yyrule, not the former
10939 attribute yyn_.
10940
10941 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
10942
10943 * bootstrap (gnulib_modules): Add verify.
10944 * lib/.cvsignore: Add verify.h.
10945 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
10946 * src/system.h (verify): Remove.
10947 Include verify.h instead.
10948 * src/tables.c (tables_generate): Use new API for 'verify'.
10949
10950 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
10951
10952 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
10953 local variables whose names begin with 'yy'.
10954 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10955 Trivial changes from Joel E. Denny.
10956
10957 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
10958 it itself.
10959 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
10960 don't use alloca any more.
10961
10962 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
10963 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
10964 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
10965 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
10966 to match yacc.c, to test more hosts.
10967
10968 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
10969
10970 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
10971 doesn't affect behavior.
10972 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
10973 Solaris, AIX, MSC.
10974 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
10975 This works a bit better with glibc, if user code has already included
10976 stdlib.h.
10977 * doc/bison.texinfo (Bison Parser): Document that users can't
10978 arbitrarily use malloc and free for other purposes. Document
10979 that <alloca.h> and <malloc.h> might be included.
10980 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
10981 user must declare alloca.
10982
10983 * HACKING (release): Forwarn the Translation Project about
10984 stable releses.
10985
10986 2005-09-20 Akim Demaille <akim@epita.fr>
10987
10988 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
10989
10990 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
10991
10992 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
10993 (YYSTACK_ALLOC_MAXIMUM): Use it.
10994 (yysyntax_error): New function.
10995 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
10996 multiple syntax errors are reported, and alloca is being used.
10997 Instead, reallocate buffers twice as big each time, so that
10998 we waste at most half the allocated memory. Start with a small
10999 (128-byte) buffer that will suffice in most cases anyway.
11000 Use yysyntax_error to do most of the work.
11001
11002 * doc/bison.texinfo (Error Reporting, Table of Symbols):
11003 yynerrs is the number of errors reported, not the number of
11004 errors encountered.
11005
11006 * tests/glr-regression.at (Duplicated user destructor for lookahead):
11007 Mark it as expected to fail.
11008 Cast result of malloc; problem reported by twlevo@xs4all.nl.
11009 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
11010 Don't start user-code symbols with "yy", to avoid name space problems.
11011
11012 2005-09-19 Akim Demaille <akim@epita.fr>
11013
11014 Remove the traits, failed experiment.
11015 It never proved useful, and anyway because of the current
11016 definition, it was not possible to have several specialization of
11017 this traits, making it useless.
11018 * data/lalr1.cc (yy:traits): Remove.
11019 Inline its definitions in the parser class.
11020
11021 2005-09-19 Akim Demaille <akim@epita.fr>
11022
11023 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
11024 least Mac OSX with a /usr/local install of gettext.
11025
11026 2005-09-19 Akim Demaille <akim@epita.fr>
11027
11028 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
11029 and yytoken for similarity with the other skeletons.
11030
11031 2005-09-19 Akim Demaille <akim@epita.fr>
11032
11033 * NEWS, configure.ac: update version number to 2.1a.
11034
11035 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
11036
11037 * NEWS: Version 2.1.
11038
11039 * NEWS: Remove notice of yytname change, since it was never in an
11040 official release.
11041 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
11042 diagnostic.
11043 * src/output.c (prepare): Likewise.
11044 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11045 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
11046 is not defined. This is an awful hack, but it's enough for now.
11047 All callers changed.
11048 * tests/glr-regression-at (make_value): Args are const pointers now,
11049 to avoid GCC warning.
11050 (Duplicated user destructor for lookahead): New test. Currently
11051 skipped. It fails on my host but I'm not sure it'll always fail.
11052
11053 2005-09-16 Akim Demaille <akim@epita.fr>
11054
11055 * src/symtab.h (struct symbol): Declare the printer and destructor
11056 as const, to avoid accidental calls to free.
11057 (symbol_destructor_set, symbol_printer_set): Adjust.
11058 * src/symtab.c: Adjust.
11059
11060 2005-09-16 Akim Demaille <akim@epita.fr>
11061
11062 * data/c.m4 (b4_token_enums): New.
11063 (b4_token_defines): Rename as...
11064 (b4_token_enums_defines): this.
11065 (b4_token_defines): New, output only the #defines.
11066 * data/yacc.c, data/glr.c: Adjust.
11067 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
11068 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
11069 as default values.
11070
11071 2005-09-16 Akim Demaille <akim@epita.fr>
11072
11073 * data/lalr1.cc (yylex_): Remove, inline its code.
11074 (yyreport_syntax_error_): Remove, replaced by...
11075 (yysyntax_error_): this which returns a string and leaves to the
11076 caller the call to the users' error function.
11077 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
11078 Move from members of the parser object...
11079 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
11080 to local variables of the parse function.
11081
11082 2005-09-16 Akim Demaille <akim@epita.fr>
11083
11084 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
11085 since it's in Bison's name space.
11086
11087 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
11088
11089 * data/glr.c (yyresolveValue): Add default case to pacify
11090 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11091
11092 * NEWS: Document when yyparse started to return 2.
11093 * doc/bison.texinfo (Parser Function): Document when yyparse
11094 returns 2.
11095
11096 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11097 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11098 changed.
11099 (class position): file_name -> filename (reverting). All uses changed.
11100
11101 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11102
11103 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11104 do anything if $@ exists. This reverts part of the 2005-07-07
11105 patch.
11106
11107 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11108
11109 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11110 contains obsolete information and isn't worth distributing as a
11111 separate file anyway.
11112 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11113 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11114 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11115 (yyparse): Abort if user code uses longjmp to throw an unexpected
11116 value.
11117
11118 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11119
11120 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11121 Suggested by twlevo@xs4all.nl.
11122
11123 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11124 This avoids a diagnostic from gcc -Wswitch-enum.
11125 Problem reported by twlevo@xs4all.nl.
11126
11127 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11128 standards. Use "file name" or "file" or "name", depending on
11129 the context.
11130 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11131 not to hack/foo.tab.c.
11132 (Calc++ Top Level): 2nd arg of main is not const.
11133 * data/glr.c: b4_filename -> b4_file_name.
11134 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11135 All uses changed.
11136 (class position): filename -> file_name. All uses changed.
11137 * data/yacc.c: b4_filename -> b4_file_name.
11138 * lib/bitset.h: filename -> file_name in local vars.
11139 * lib/bitset_stats.c: Likewise.
11140 * src/files.c: Likewise.
11141 * src/scan-skel.l ("@output ".*\n): Likewise.
11142 * src/files.c (file_name_split): Renamed from filename_split.
11143 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
11144
11145 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11146
11147 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11148 to accommodate latest gnulib.
11149
11150 * tests/glr-regression.at (Duplicate representation of merged trees):
11151 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11152
11153 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11154 needed.
11155
11156 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11157
11158 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11159 All uses changed. Invoke user destructor after an error during a
11160 split parse (trivial change from Joel E. Denny).
11161
11162 * tests/glr-regression.at
11163 (User destructor after an error during a split parse): New test case.
11164 Problem reported by Joel E. Denny in:
11165 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11166
11167 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11168
11169 * README-cvs: Give URLs for recommended tools.
11170 Mention Gzip version problem, and bootstrapping issues.
11171 Remove troubleshooting section, as it's somewhat obsolete.
11172
11173 * bootstrap (no_cache): New var, to accommodate different wget
11174 variants. Use it instead of '-C off'. Problem reported by
11175 twlevo@xs4all.nl.
11176
11177 * data/glr.c (yydestroyStackItem): New function.
11178 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11179 debugging information. Problem reported by Joel E. Denny.
11180
11181 2005-08-25 Akim Demaille <akim@epita.fr>
11182
11183 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11184
11185 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11186
11187 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11188 Don't invoke destructor on unresolved entries.
11189 * tests/glr-regression.at
11190 (User destructor for unresolved GLR semantic value): New test case.
11191 Problem reported by Joel E. Denny in:
11192 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11193
11194 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11195
11196 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11197 Add strnlen.c.
11198 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11199 lib-prefix.m4, po.m4.
11200
11201 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11202 in yydestruct diagnostic, since it might not be an error.
11203 Problem reported by Joel Denny near end of
11204 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11205 * data/lalr1.cc (yyerturn): Likewise.
11206 * data/yacc.c (yyreturn): Likewise.
11207 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11208
11209 * src/files.c: Remove obsolete FIXME comment.
11210
11211 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11212 with the other templates, and to fix bogus run-on messages such
11213 as the one reported at the end of
11214 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11215 All callers changed to avoid the newline.
11216 (yyprocessOneStack): Output two lines rather than one, to accommodate
11217 the above change. This changes the debug output format slightly.
11218
11219 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11220 reported by Joel E. Denny in
11221 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11222 (trivial change).
11223 * tests/glr-regression.at (Duplicate representation of merged trees):
11224 New test, from Joel E. Denny in:
11225 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11226 * THANKS: Add Joel E. Denny.
11227
11228 * configure.ac (AC_INIT): Bump to 2.0c.
11229
11230 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11231
11232 * NEWS: Version 2.0b.
11233
11234 * Makefile.am (SUBDIRS): Put examples before tests, so that
11235 "make check" doesn't finish with "All 1 tests passed".
11236
11237 * tests/regression.at (Token definitions): Don't rely on
11238 AT_PARSER_CHECK for data that contains backslashes. It currently
11239 uses 'echo', and 'echo' isn't portable if its argument contains
11240 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11241 that the byte '\0xff' is not printable in the C locale; it is,
11242 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11243 not printable, so use '\0x81' to test.
11244
11245 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11246 version of GCC, since the macro is used with non-GCC compilers.
11247
11248 Fix core dump reported by Pablo De Napoli in
11249 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11250 * tests/regression.at (Invalid inputs with {}): New test.
11251 * src/parse-gram.y (token_name): Translate type before using
11252 it as an index.
11253
11254 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11255 the user's name space. All uses changed to __attribute__
11256 ((__unused__)).
11257 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11258 Add __attribute__ ((__noreturn__)).
11259
11260 * etc/clcommit: Remove. We weren't using it, and it failed
11261 "make maintainer-distcheck".
11262 * Makefile.maint: Merge from coreutils.
11263 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11264 (syntax-check-rules): Change list of rules as described below.
11265 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11266 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11267 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11268 (sc_trailing_space): New rules.
11269 (sc_xalloc_h_in_src): Remove.
11270 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11271 (sc_space_tab, sc_error_exit_success, sc_changelog):
11272 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11273 (makefile-check, po-check, author_mark_check):
11274 (makefile_path_separator_check, copyright-check):
11275 Use grep -n, to make it easier to find violations.
11276 Use CVS_LIST and CVS_LIST_EXCEPT.
11277 (header_regexp, h_re): Remove.
11278 (dd_c): New macro.
11279 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11280 (my-distcheck): Use more-modern GCC flags.
11281 (signatures, %.asc): Remove.
11282 (rel-files, announcement): Remove signatures.
11283 Restore old updating code, even though we don't use it, so
11284 that we're the same as coreutils.
11285 (alpha, beta, major): Depend on news-date-check.
11286 Make the upload commands.
11287
11288 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11289 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11290 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11291 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11292 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11293 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11294 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11295 * tests/sets.at: Likewise.
11296
11297 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11298 we comment out the Autoconf version number.
11299 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11300 it's error-prone and "make maintainer-distcheck" rejects it.
11301
11302 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11303 Indent calls to "error" to pacify "make maintainer-distcheck",
11304 when the calls are not intended to be translated.
11305 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11306
11307 * src/Makefile.am (DEFS): Use +=, to pacify
11308 "make maintainer-distcheck".
11309 (bison_SOURCES): Add scan-skel.h.
11310 (sc_tight_scope): New rule, from coreutils.
11311
11312 * src/files.c (src_extension, header_extension):
11313 Now static, not extern.
11314 * src/getargs.c (short_options): Likewise.
11315 * src/muscle_tab.c (muscle_table): Likewise.
11316 * src/parse-gram.y (current_class, current_type, current_prec):
11317 Likewise.
11318 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11319 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11320 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11321 void, to avoid warning when NLS is disabled.
11322 * src/output.c: Include scan-skel.h.
11323 (scan_skel): Remove decl, since scan-skel.h does this.
11324 (output_skeleton):
11325 Indent calls to "error" to pacify "make maintainer-distcheck".
11326 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11327 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11328 "make maintainer-distcheck".
11329 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11330 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11331 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11332 (skel_lex_destroy, scan_skel): Move these decls to...
11333 * src/scan-skel.h: New file.
11334 * src/uniqstr.c (uniqstr_assert):
11335 Indent calls to "error" to pacify "make maintainer-distcheck".
11336
11337 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11338 not @VAR@.
11339
11340 * tests/torture.at: Revamp to avoid misuse of atoi that
11341 "make maintainer-distcheck" complained about.
11342
11343 * examples/extexi (message): Don't print a message more than once,
11344 and omit line-number decoration that makes Emacs compile think
11345 that informative messages are worth worrying about.
11346
11347 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11348
11349 * configure.ac: Update version number.
11350
11351 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11352 accidentally.
11353 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11354 autogenerated by the maintainer.
11355 * examples/calc++/.cvsignore: Add *.yy.
11356
11357 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11358 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11359 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11360
11361 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11362
11363 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11364 from maintainer-distcheck about casting the argument of 'free'.
11365
11366 * NEWS: Mention recent yytname changes.
11367 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11368
11369 * bootstrap: For translations that have not yet been upgraded to
11370 the new runtime-po domain, prime the pump by extracting the
11371 relevant strings from the obsolete translations. This code can be
11372 removed once the bison-runtime domain has been translated by each
11373 team.
11374
11375 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11376 now that token names are already quoted.
11377
11378 Fix problem reported by Anthony Heading.
11379 * data/glr.c (YYTOKEN_TABLE): New macro.
11380 (yytname): Define if YYTOKEN_TABLE.
11381 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11382 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11383 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11384 * src/output.c (prepare_symbols): Output token_table_flag.
11385
11386 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11387
11388 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11389 again if the first call fails.
11390
11391 * data/glr.c (yytnamerr): New function.
11392 (yyreportSyntaxError): Use it to dequote most string literals.
11393 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11394 with other skeletons. All uses changed.
11395 (yytnameerr_): New function.
11396 (yyreport_syntax_error): Use it to dequote most string literals.
11397 * data/yacc.c (yytnamerr): New function.
11398 (yyerrlab): Use it to decode most string literals.
11399 * doc/bison.texinfo (Decl Summary, Calling Convention):
11400 Clarify quoting convention of yytname.
11401 * src/output.c (prepare_symbols): Quote all names. This undoes
11402 the 2005-04-17 change, which is now accomplished (mostly) via
11403 changes in the parsers as described above.
11404 * tests/regression.at (Token definitions, Web2c Actions):
11405 Undo most 2005-04-17 change here, too.
11406
11407 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11408
11409 Fix more problems reported by twlevo@xs4all.nl.
11410 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11411 remove trailing spaces. This loses the exit status of ./types,
11412 and isn't needed since ./types shouldn't be emitting trailing
11413 spaces.
11414 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11415 as the stack isn't valid in that case.
11416
11417 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11418 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11419 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11420 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11421 is used.
11422 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11423 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11424 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11425 Likewise.
11426
11427 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11428 overly-picky compilers that reject 'char *foo = "bar";'.
11429
11430 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11431 to FILE * parameter, not to stderr. This fixes a typo introduced
11432 in the 2005-07-12 change.
11433
11434 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11435 warnings from GCC 4.
11436
11437 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11438 (yyglrShiftDefer, yysplitStack):
11439 Remove unused parameters b4_pure_formals. All uses changed.
11440 (yyglrShift): Remove unused parameters b4_user_formals.
11441 All uses changed.
11442 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11443
11444 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11445
11446 Destructor cleanups and regularization among the three skeletons.
11447 * NEWS: Document the behavior changes.
11448 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11449 stack before failing, as the cleanup code will do it for us now.
11450 * data/lalr1.cc (yyerrlab): Likewise.
11451 * data/glr.c (yyparse): Pop everything off the stack before
11452 freeing it, so that destructors get called properly.
11453 * data/lalr1.cc (yyreturn): Likewise.
11454 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11455 This is more consistent.
11456 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11457 why destructors might be called. 1.875 -> 2.1.
11458 (Destructor Decl, Decl Summary, Table of Symbols):
11459 Some English-language cleanups for %destructor.
11460 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11461 Add output line for destructor of start symbol.
11462 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11463 because of that same extra output line.
11464
11465 * NEWS: Document minor wording changes in diagnostics of
11466 Bison-generated parsers.
11467 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11468 Remove unused formals. All uses changed.
11469 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11470 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11471 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11472 Rename yyoverflowab to yyexhaustedlab.
11473 When memory exhaustion occurs during syntax-error reporting,
11474 report it separately rather than in a single diagnostic; this
11475 eases translation.
11476 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11477 (Memory Exhausted): Renamed from Parser Stack Overflow.
11478 Revamp wording slightly to prefer "memory exhaustion".
11479 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11480
11481 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11482
11483 Add i18n support to the GLR skeleton. Partially fix the C++
11484 skeleton; a C++ expert needs to finish this. Remove debugging
11485 msgids; there's little point to having them translated, since they
11486 can be understood only by someone who can read the
11487 (English-language) source code.
11488
11489 Generate runtime-po/bison-runtime.pot automatically, so that we
11490 don't have to worry about garbage getting in that file. We'll
11491 make sure after the next official release that old msgids don't
11492 get lost. See
11493 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11494
11495 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11496 Now auto-generated.
11497 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11498 Fix typos in explanations of the runtime file.
11499 * bootstrap: Change gettext keyword from YYI18N to YY_.
11500 Use standard Makefile.in.in in runtime-po, since we'll arrange
11501 for backward-compatible bison-runtime.po files in a different way.
11502 * data/glr.c (YY_): New macro, from yacc.c.
11503 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11504 Translate messages intended for users.
11505 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11506 the wording in the other skeletons. We don't know that the memory
11507 is virtual.
11508 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11509 Use same method that yacc.c uses.
11510 Don't translate debugging messages.
11511 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11512 it doesn't work (yet), and requires C++ expertise to fix.
11513 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11514 Move defn to a more logical place, to be consistent with other
11515 skeletons.
11516 Don't translate debugging messages.
11517 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11518 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11519 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11520 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11521
11522 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11523 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11524 void, not int.
11525 * tests/glr-regression.at (Badly Collapsed GLR States):
11526 Likewise.
11527 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11528 yylex should return 0 at EOF rather than aborting.
11529
11530 Improve tests for stack overflow in GLR parser.
11531 Problem reported by twlevo@xs4all.nl.
11532 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11533 All uses removed.
11534 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11535 can handle the problem.
11536 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11537 (yyparse): New local variable yyresult to record the result.
11538 Use result of setjmp to set it, rather than storing itinto
11539 struct.
11540 (yyDone): Remove label.
11541 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
11542 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
11543 if YYABORT is used).
11544 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
11545 yyparse status; put status > 1 into diagnostic.
11546 Check that status==2 works.
11547 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
11548 Use exit status 3 for failure to open (which shouldn't happen).
11549
11550 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
11551
11552 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
11553 1 on syntax error; just let yyparse do its thing.
11554 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
11555 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
11556 (Exploding the Stack Size with Alloca):
11557 (Exploding the Stack Size with Malloc):
11558 Expect exit status 2, not 1, since the parser is supposed to blow
11559 its stack. Problem reported by twlevo@xs4all.nl.
11560
11561 * data/glr.c (yyparse): Don't assume that the initial calls
11562 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
11563 Print a stack-overflow message and fail instead.
11564 Initialize the line-number information before creating the stack,
11565 so that the stack-overflow message can report line zero safely.
11566
11567 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
11568
11569 Fix problems reported by twlevo@xs4all.nl.
11570 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
11571 (yyuserMerge): Provide a default case if b4_mergers is empty.
11572 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
11573 * tests/glr-regression.at
11574 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11575 Add casts to pacify C++ compilers.
11576 * tests/glr-regression.at (Improper merging of GLR delayed action
11577 sets): Declare yylex before using it.
11578 * tests/Makefile.am (maintainer-check-g++): Fix a stray
11579 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
11580 test for valgrind; valgrind is independent of g++.
11581 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
11582 for compatibility with POSIX 1003.1-2001 (if running coreutils).
11583 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
11584 Use a destructor, so that we can expand the stack. Change
11585 YYSTYPE to char * so that we can free it. Cast result of malloc.
11586
11587 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11588
11589 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
11590 a valgrind failure. Problem reported by twlevo@xs4all.nl.
11591
11592 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
11593
11594 * PACKAGING: New file, suggested by Bruno Haible and taken from
11595 similar wording in gettext's PACKAGING file.
11596 * NEWS: Mention PACKAGING.
11597 * Makefile.am (EXTRA_DIST): Add PACKAGING.
11598
11599 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
11600
11601 * NEWS: Document recent i18n improvements.
11602 * bootstrap: Get runtime translations into runtime-po.
11603 Create runtime-po files automatically, if possible.
11604 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
11605 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
11606 does not infringe on the user's name space.
11607 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
11608 * doc/bison.texinfo (Internationalization): Revamp the English
11609 and Texinfo syntax a bit, to try to make it clearer.
11610 (Bison Options, Option Cross Key): Mention --print-localedir.
11611 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
11612 YYENABLE_NLS. Quote a bit more.
11613 * runtime-po/.cvsignore: New file.
11614 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
11615 * runtime-po/Rules-quot: Remove; now created by bootstrap.
11616 * runtime-po/quot.sed: Likewise.
11617 * runtime-po/boldquot.sed: Likewise.
11618 * runtime-po/en@quot.header: Likewise.
11619 * runtime-po/en@boldquot.header: Likewise.
11620 * runtime-po/insert-header.sin: Likewise.
11621 * runtime-po/remove-potcdate.sin: Likewise.
11622 * runtime-po/Makevars: Likewise.
11623 * runtime-po/LINGUAS: Likewise.
11624 * runtime-po/de.po: Likewise; we will rely on the translation project
11625 to maintain this, so "bootstrap" should get it.
11626 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
11627 its value.
11628 * src/main.c (main): Bind the bison-runtime domain, too.
11629
11630 2005-07-12 Bruno Haible <bruno@clisp.org>
11631
11632 * data/yacc.c: Include <libintl.h> when NLS is enabled.
11633 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
11634 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
11635 * runtime-po: New directory.
11636 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
11637 $(DOMAIN).pot-update rule, so that old messages are never dropped.
11638 * runtime-po/Rules-quot: New file, copied from po/.
11639 * runtime-po/quot.sed: Likewise.
11640 * runtime-po/boldquot.sed: Likewise.
11641 * runtime-po/en@quot.header: Likewise.
11642 * runtime-po/en@boldquot.header: Likewise.
11643 * runtime-po/insert-header.sin: Likewise.
11644 * runtime-po/remove-potcdate.sin: Likewise.
11645 * runtime-po/Makevars: New file.
11646 * runtime-po/POTFILES.in: New file.
11647 * runtime-po/LINGUAS: New file.
11648 * runtime-po/bison-runtime.pot: New file.
11649 * runtime-po/de.po: New file.
11650 * m4/bison.m4: New file.
11651 * Makefile.am (SUBDIRS): Add runtime-po.
11652 (aclocaldir, aclocal_DATA): New variables.
11653 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
11654 Define aclocaldir.
11655 * src/getargs.c (usage): Document --print-localedir option.
11656 (PRINT_LOCALEDIR_OPTION): New enum item.
11657 (long_options): Add --print-localedir option.
11658 (getargs): Handle --print-localedir option.
11659 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
11660 (Internationalization): New section.
11661
11662 2005-07-12 Akim Demaille <akim@epita.fr>
11663
11664 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
11665 for consistency with the rest of the code.
11666 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
11667 Add separators.
11668
11669 2005-07-12 Akim Demaille <akim@epita.fr>
11670
11671 * src/parse-gram.y: Use %printer instead of YYPRINT.
11672
11673 2005-07-12 Akim Demaille <akim@epita.fr>
11674
11675 * src/symtab.h, src/symtab.c (symbol_print): New.
11676 * src/symlist.h, src/symlist.c (symbol_list_print): New.
11677 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
11678
11679 2005-07-12 Akim Demaille <akim@epita.fr>
11680
11681 * data/glr.c (b4_syncline): Fix (swap) the definitions of
11682 b4_at_dollar and b4_dollar_dollar.
11683
11684 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
11685
11686 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
11687 and Pennello's paper.
11688
11689 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
11690
11691 * data/yacc.c (yyparse): Undo previous patch. Instead,
11692 set yylsp[0] and yyvsp[0] only if the initial action
11693 sets yylloc and yylval, respectively.
11694
11695 * data/yacc.c (yyparse): In the initial action, set
11696 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
11697 This avoids the use of undefined variables if the initial
11698 action does not set yylloc and/or yylval.
11699
11700 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
11701
11702 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
11703 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
11704 Remove from CVS. These files are automatically generated.
11705 * examples/extexi: Clarify that this file is now part of Bison,
11706 not GNU M4, and that it works with any POSIX-compatible Awk.
11707 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
11708 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
11709 so that we also get calc++-parser.yy. Geneate it.
11710 Use $(AWK), not gawk, since any conforming Awk will do.
11711 Put comment before action, since older 'make' can't handle comment
11712 in action.
11713 $(BUILT_SOURCES): List all built sources, not just some of them.
11714 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
11715 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
11716 $($(calc_sources_generated)): Remove unnecessary test for existence
11717 of target. (This had a shell syntax error anyway; a stray "x".)
11718 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
11719 calc++-parser.yy.
11720 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
11721
11722 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
11723 implied by the other modules.
11724
11725 2005-07-06 Akim Demaille <akim@epita.fr>
11726
11727 Bind examples/calc++ to the package.
11728 * examples/calc++/Makefile: Remove, replaced by...
11729 * examples/calc++/Makefile.am: ... this new file.
11730 * examples/calc++/test: Remove input.
11731 * examples/calc++/compile: Remove.
11732 * examples/Makefile.am: New.
11733 * configure.ac, Makefile.am: Adjust.
11734 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
11735
11736 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
11737
11738 * data/glr.c (yyFail): Drastically simplify; since the format argument
11739 never had any % directives, we can simply pass it to yyerror.
11740 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
11741 be modified later, as that is the usual style in glr.c.
11742 Problems reported by Paul Hilfinger.
11743
11744 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
11745 and size overflow errors.
11746 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
11747 in case the user prolog sets feature-test macros like _GNU_SOURCE.
11748 (YYSIZEMAX): New macro.
11749 (yystpcpy): New function, taken from yacc.c.
11750 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
11751 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
11752 so that we don't have to maintain their signatures.
11753 (yyFail): Check for buffer overflow, by using vsnprintf rather
11754 than vsprintf. Allocate a bigger buffer if possible.
11755 Report an error if buffer allocation fails.
11756 (yyStackOverflow): New function.
11757 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
11758 the initialization was successful. It might fail if storage was
11759 exhausted.
11760 (yyexpandGLRStack): Add more checks for storage allocation failure.
11761 Use yyStackOverflow to report failures.
11762 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
11763 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
11764 Don't assume stack number fits in int.
11765 (yysplitStack): Check for storage allocation failure.
11766 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
11767 can print diagnostics on storage allocation failure. All callers
11768 changed.
11769 (yyresolveValue): Use yybool for boolean.
11770 (yyreportSyntaxError): Check for size-calculation overflow.
11771 This code is taken from yacc.c.
11772 (yyparse): Check for storage allocation errors when allocating
11773 the initial stack.
11774
11775 2005-07-05 Akim Demaille <akim@epita.fr>
11776
11777 Extract calc++ from the documentation.
11778 * doc/bison.texinfo (Calc++): Add the extraction marks.
11779 * examples/extexi: New, from the aborted GNU Programming 2E.
11780 Separate the different paragraph of a file with empty lines.
11781 * examples/Makefile: Use it to extract the whole calc++ example.
11782
11783 2005-06-24 Akim Demaille <akim@epita.fr>
11784
11785 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
11786 class typedefs.
11787
11788 2005-06-22 Akim Demaille <akim@epita.fr>
11789
11790 * doc/bison.texinfo (C++ Language Interface): First stab.
11791 (C++ Parsers): Remove.
11792
11793 2005-06-22 Akim Demaille <akim@epita.fr>
11794
11795 * data/lalr1.cc (yylex_): Honor %lex-param.
11796
11797 2005-06-22 Akim Demaille <akim@epita.fr>
11798
11799 Start a set of simple examples.
11800 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
11801 * examples/calc++/calc++-driver.hh,
11802 * examples/calc++/calc++-parser.yy,
11803 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
11804 * examples/calc++/compile, examples/calc++/test: New.
11805
11806 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
11807
11808 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
11809 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
11810 which stems from the 2005-05-27 patch.
11811
11812 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11813
11814 * data/glr.c: Modify treatment of unused parameters to permit use
11815 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
11816
11817 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
11818
11819 Fix infringement on user name space reported by Janos Zoltan Szabo.
11820 * data/yacc.c (yyparse): strlen -> yystrlen.
11821
11822 2005-05-30 Akim Demaille <akim@epita.fr>
11823
11824 * data/lalr1.cc (_): New.
11825 Translate the various messages.
11826
11827 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
11828
11829 Fix infringement on user name space reported by Bruno Haible.
11830 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
11831 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
11832 the user's name space.
11833 (alloca): Include <stdlib.h> to get it, if it's not built in.
11834 (YYMALLOC, YYFREE): Define only if needed.
11835 (malloc, free): Declare, but only if needed, as this infringes on
11836 the user name space.
11837
11838 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
11839
11840 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
11841 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
11842 with %d format.
11843 * lib/ebitset.c (min, max): Undef before defining.
11844 * lib/vbitset.c (min, max): Likewise.
11845 * lib/subpipe.c (create_subpipe): Save local variables in case
11846 vfork clobbers them.
11847
11848 2005-05-24 Bruno Haible <bruno@clisp.org>
11849
11850 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
11851 error message syntax used by gcc-4.0.
11852
11853 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
11854
11855 * README: Mention m4 1.4.3. Remove obsolete advice about
11856 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
11857
11858 * bootstrap: Remove workaround for problem I encountered with
11859 gettext 0.14.1; it seems to be fixed now.
11860
11861 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
11862
11863 * NEWS: Version 2.0a.
11864
11865 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
11866 the previous change.
11867
11868 Various maintainer cleanups.
11869 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
11870 conftest*, for benefit of CVS commands run at the same time as
11871 "configure". Add build-aux, since "bootstrap" now creates it and
11872 its subfiles.
11873 * Makefile.cfg (move_if_change): Remove.
11874 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
11875 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
11876 (po_repo, do-po-update, po-update, wget_files, get-targets):
11877 (config.guess-url_prefix, config.sub-url_prefix):
11878 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
11879 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
11880 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
11881 Remove.
11882 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
11883 this is now the recommended name.
11884 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
11885 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
11886 ylwrap. These files now go into build-aux.
11887 * config/move-if-change: Remove.
11888 * config/prev-version.txt: Bump from 1.75 to 2.0.
11889
11890 * bootstrap: Add stdio-safer, unistd-safer modules.
11891 Remove m4/glibc2.m4 (introduced by latest gnulib, but
11892 we don't need it).
11893 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
11894 fopen-safer.c, stdio-safer.h, unistd-safer.h.
11895 * lib/subpipe.c: Include "unistd-safer.h".
11896 (create_subpipe): Make sure all the newly-created
11897 file descriptors are > 2, so that diagnostics don't
11898 get sent down them (which might cause Bison to hang, in theory).
11899 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
11900 * src/files.c (xfopen): Use fopen_safer, not fopen.
11901
11902 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
11903 yesterday's yacc.c fix.
11904
11905 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
11906
11907 * data/glr.c, data/lalr1.cc: Update copyright date.
11908
11909 Fix a destructor bug reported by Wolfgang Spraul in
11910 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
11911 * data/yacc.c (yyabortlab): Don't call destructor, and
11912 don't set yychar to EMPTY.
11913 (yyoverflowlab): Don't call destructor.
11914 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
11915 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
11916 since we no longer output the message "discarding lookahead token
11917 end of input ()".
11918
11919 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11920
11921 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
11922 fix a small glitch in debugging output.
11923 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
11924 after YY_SYMBOL_PRINT where needed.
11925
11926 (struct yyGLRState): Add some comments.
11927 (struct yySemanticOption): Add some comments.
11928 (union yyGLRStackItem): Add comment.
11929
11930 (yymergeOptionSets): Correct this to properly perform the union,
11931 avoiding infinite reported by Michael Rosien.
11932 Update comment.
11933
11934 * tests/glr-regression.at: Add test for GLR merging error reported
11935 by M. Rosien.
11936
11937 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
11938
11939 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
11940 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
11941 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
11942 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
11943 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
11944 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
11945 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
11946 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
11947 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
11948 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
11949 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
11950 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
11951 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
11952 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
11953 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
11954 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
11955 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
11956 src/derives.h, src/files.c, src/files.h, src/getargs.c,
11957 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
11958 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
11959 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
11960 src/output.h, src/parse-gram.c, src/parse-gram.h,
11961 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
11962 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
11963 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
11964 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
11965 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
11966 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
11967 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
11968 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
11969 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
11970 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
11971 tests/reduce.at, tests/regression.at, tests/sets.at,
11972 tests/synclines.at, tests/testsuite.at, tests/torture.at:
11973 Update FSF postal mail address.
11974
11975 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
11976
11977 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
11978 Problem reported by Ralf Menzel.
11979
11980 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
11981
11982 * tests/actions.at: Test that stack overflow invokes destructors.
11983 From Marcus Holland-Moritz.
11984 * data/yacc.c (yyerrlab): Move the code that destroys the stack
11985 from here....
11986 (yyreturn): to here. That way, destructors are called properly
11987 even if the stack overflows, or the user calls YYACCEPT or
11988 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
11989 (yyoverflowlab): Destroy the lookahead.
11990
11991 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
11992
11993 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
11994
11995 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
11996
11997 * NEWS: Bison-generated C parsers no longer quote literal strings
11998 associated with tokens.
11999 * src/output.c (prepare_symbols): Don't escape strings,
12000 since users don't want to see C escapes.
12001 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
12002 in diagnostics.
12003 * tests/input.at (Torturing the Scanner): Likewise.
12004 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
12005
12006 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
12007
12008 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
12009 the data size is known to be too small and we can't increase it.
12010 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
12011
12012 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
12013
12014 * src/parse-gram.y: Include quotearg.h.
12015 (string_as_id): Quote $1 before using it as a key, since the
12016 lexer no longer quotes it for us.
12017 (string_content): Don't strip quotes, since lexer no longer
12018 quotes it for us.
12019 * src/scan-gram.l: Include quotearg.h.
12020 ("\""): Omit quote.
12021 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
12022 a key, since the rest of the lexer doesn't quote it.
12023 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
12024 * tests/regression.at (Token definitions): Check for backslashes
12025 in token strings.
12026
12027 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
12028 (YYSIZE_T): Define to unsigned long int when using an older compiler.
12029 (yyparse): Revamp code to generate long syntax error message, to
12030 make it easier to translate, and to avoid problems with arithmetic
12031 overflow. Change "virtual memory" to "memory" in diagnostic, since
12032 we don't know whether the memory is virtual.
12033
12034 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
12035
12036 * NEWS: Bison-generated C parsers now use the _ macro to
12037 translate strings.
12038 * data/yacc.c (_) [!defined _]: New macro.
12039 All English strings wrapped inside this macro.
12040 * doc/bison.texinfo (Bison Parser): Document _.
12041 * po/POTFILES.in: Include src/parse-gram.c, since it now
12042 includes translateable strings that parse-gram.y doesn't.
12043
12044 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
12045
12046 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
12047 reverting the 2004-10-11 change to this function.
12048 (symbol_check_alias_consistency): Don't call symbol_type_set
12049 if the type name is already correct.
12050 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
12051
12052 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
12053
12054 * tests/regression.at (Token definitions): Don't use a token named
12055 c, as that generates a "#define c ..." that runs afoul of buggy
12056 stdlib.h that uses the identifier c as a member of struct
12057 drand48_data. Problem reported by Horst Wente.
12058
12059 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
12060
12061 * bootstrap: Change translation URL from
12062 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
12063 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
12064 redirection glitches. Problem reported by twlevo@xs4all.nl.
12065
12066 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
12067
12068 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
12069 after operands; POSIX says this isn't portable for the c99 command.
12070
12071 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
12072
12073 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
12074 immediately if a data overrun has occurred; this may help us track
12075 down what may be a spurious failure on MacOS.
12076
12077 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
12078
12079 Respond to problems reported by twlevo@xs4all.nl.
12080
12081 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
12082
12083 * src/vcg.h: Comment fix.
12084 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
12085 (G_CMAX): Change to -1 instead of INT_MAX.
12086
12087 * data/yacc.c (yyparse): Omit spaces before #line.
12088
12089 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
12090
12091 * src/tables.c (state_number_to_vector_number): Put it inside an
12092 "#if 0", since it's not currently used. Problem reported by
12093 Roland McGrath.
12094
12095 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12096
12097 * src/output.c (escaped_output): Renamed from
12098 escaped_file_name_output, since we now use it for symbol tags as
12099 well. All uses changed.
12100 (symbol_destructors_output, symbol_printers_output):
12101 Escape symbol tags too.
12102 Problem reported by Matyas Forstner in
12103 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12104
12105 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12106 not needed.
12107 * src/output.c (user_actions_output, token_definitions_output,
12108 symbol_destructors_output, symbol_printers_output): Likewise.
12109 * src/reader.c (prologue_augment): Likewise.
12110 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12111
12112 * src/vcg.c (output_edge): Don't quote linestyle arg.
12113 Problem reported by twlevo@xs4all.nl.
12114
12115 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12116
12117 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12118 example, reported by Derek M Jones. Also, make the example even
12119 more outrageous, to better illustrate how bad the problem is.
12120
12121 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12122
12123 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12124 putsym. Typo reported by Sebastian Piping.
12125
12126 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12127
12128 * doc/bison.texinfo (Language and Grammar): some -> same
12129 (Epilogue): int he -> in the
12130 Typos reported by Sebastian Piping via Justin Pence.
12131
12132 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12133
12134 * tests/glr-regression.at (Improper handling of embedded actions
12135 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12136 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12137 with dollar signs in test names.
12138 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12139 for a similar reason.
12140
12141 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12142
12143 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12144 wants to redefine G_VIEW.
12145
12146 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12147
12148 * src/vcg.c (get_view_str): Remove case for normal_view.
12149 Problem reported by twlevo@xs4all.nl.
12150
12151 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12152
12153 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12154 Problem reported by twlevo@xs4all.nl.
12155
12156 * doc/bison.texinfo: Change @dircategory from "GNU programming
12157 tools" to "Software development". Requested by Richard Stallman
12158 via Karl Berry.
12159
12160 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12161
12162 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12163 Problem reported by twlevo@xs4all.nl.
12164
12165 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12166
12167 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12168 keyword; it's not needed with modern compilers, and it doesn't
12169 affect correctness with older compilers. Suggested by
12170 twlevo@xs4all.nl.
12171
12172 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12173
12174 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12175 gcc -Wswitch-default.
12176 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12177 * data/yacc.c (yyparse): Likewise.
12178
12179 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12180
12181 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12182 already. Let config.h define any nonstandard values.
12183
12184 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12185
12186 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12187 for the benefit of slower hosts. Problem reported by
12188 Nelson H. F. Beebe.
12189
12190 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12191
12192 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12193 being defined and not used.
12194 * data/lalr1.cc (yyparse): Likewise.
12195 Use "if (false)" rather than "if (0)".
12196
12197 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12198
12199 * TODO: Mention that we should allow NUL bytes in tokens.
12200
12201 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12202
12203 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12204 Problem reported by Hans Aberg.
12205
12206 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12207
12208 * src/getargs.c (version): Happy new year; update overall
12209 program copyright date from 2004 to 2005.
12210
12211 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12212 Problem reported by Hans Aberg.
12213 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12214 (Output file names.): Add a test for the case when standard output
12215 is closed.
12216
12217 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12218
12219 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12220 to fix an oversight in the Bison 2.0 manual.
12221
12222 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12223
12224 * NEWS: Version 2.0. Reformat the existing news items since
12225 1.875, so that related items are grouped together.
12226 * configure.ac (AC_INIT): Bump version to 2.0.
12227 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12228
12229 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12230 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12231 otherwise, we're not testing alloca. Unfortunately there's no
12232 simple way to consult HAVE_ALLOCA here.
12233
12234 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12235 for yymsg, too.
12236
12237 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12238 hand. This avoids a warning about comparing int to size_t when
12239 GCC warnings are enabled.
12240
12241 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12242
12243 * NEWS: Bison-generated parsers no longer default to using the
12244 alloca function (when available) to extend the parser stack, due
12245 to widespread problems in unchecked stack-overflow detection.
12246 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12247 responsibility to set it to a positive value. This lets the user
12248 specify a value that is not a preprocessor constant.
12249 * data/yacc.c (YYMAXDEPTH): Likewise.
12250 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12251 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12252 to be a compile-time constant. However, explain the constraints on it.
12253 Also, explain the constraints on YYINITDEPTH.
12254 (Table of Symbols): Explain that alloca is no longer the default.
12255 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12256 to 1.
12257
12258 * doc/bison.texinfo (Location Default Action): Mention that n must
12259 be zero when k is zero. Suggested by Frank Heckenbach.
12260
12261 2004-12-22 Akim Demaille <akim@epita.fr>
12262
12263 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12264 (parser::state_type, parser::semantic_type, parser::location_type):
12265 Private, not public.
12266 (parser::parse): Return ints, not bool.
12267 Returning a bool introduces a problem: 0 corresponds to false, and
12268 it seems weird to return false on success. Returning true changes
12269 the conventions for yyparse.
12270 Alternatively we could return void and send an exception.
12271 There is no clear consensus (yet?).
12272 (state_stack, semantic_stack, location_stack): Rename as...
12273 (state_stack_type, semantic_stack_type, location_stack_type): these.
12274 Private, not public.
12275 * tests/c++.at: New.
12276 * tests/testsuite.at, tests/Makefile.am: Adjust.
12277
12278 2004-12-21 Akim Demaille <akim@epita.fr>
12279
12280 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12281
12282 2004-12-21 Akim Demaille <akim@epita.fr>
12283
12284 Don't impose std::string for filenames.
12285
12286 * data/lalr1.cc (b4_filename_type): New.
12287 (position::filename): Use it.
12288 (parser.hh): Move the inclusion of stack.hh and location.hh below
12289 the user code, so that needed headers for the filename type can be
12290 included first.
12291 Forward declare them before the user code.
12292 * tests/Makefile.am (check-local, installcheck-local): Pass
12293 TESTSUITEFLAGS to the TESTSUITE.
12294
12295 2004-12-20 Akim Demaille <akim@epita.fr>
12296
12297 Use more STL like names: my_class instead of MyClass.
12298
12299 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12300 (SemanticStack, SemanticType, StateStack, StateType)
12301 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12302 (Parser::value): Rename as...
12303 (location_stack, location_type, rhs_number_type, semantic_stack)
12304 (semantic_type, state_stack, state_type, token_number_type, stack)
12305 (slice, traits, parser::yylloc, parser::yylval): these.
12306
12307 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12308
12309 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12310
12311 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12312 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12313
12314 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12315
12316 Remove uses of 'short int' and 'unsigned short int'. This raises
12317 some arbitrary limits. It uses more memory but nowadays that's
12318 not much of an issue.
12319
12320 This change does not affect the generated parsers; that's a different
12321 task, as some users will want to conserve memory there.
12322
12323 Ideally we should use size_t to represent all object counts, and
12324 something like ptrdiff_t to represent signed differences of object
12325 counts; but that will require more code-cleanup than I have the
12326 time to do right now.
12327
12328 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12329 Use size_t, not int or short int, to count objects.
12330 * src/closure.c (nritemset, closure): Likewise.
12331 * src/closure.h (nritemset, closure): Likewise.
12332 * src/nullable.c (nullable_compute): Likewise.
12333 * src/print.c (print_core): Likewise.
12334 * src/print_graph.c (print_core): Likewise.
12335 * src/state.c (state_compare, state_hash): Likewise.
12336 * src/state.h (struct state): Likewise.
12337 * src/tables.c (default_goto, goto_actions): Likewise.
12338
12339 * src/gram.h (rule_number, rule): Use int, not short int.
12340 * src/output.c (prepare_rules): Likewise.
12341 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12342 errs, reductions): Likewise.
12343 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12344 Likewise.
12345 * src/tables.c (vector_number, tally, action_number,
12346 ACTION_NUMBER_MINIMUM): Likewise.
12347 * src/output.c (muscle_insert_short_int_table): Remove.
12348
12349 2004-12-17 Akim Demaille <akim@epita.fr>
12350
12351 * data/lalr1.cc: Extensive Doxygenation.
12352 (error_): Rename as...
12353 (error): this, since it is visible to the user.
12354 Adjust callers.
12355 (Parser::message): Now an automatic variable from...
12356 (Parser::yyreport_syntax_error_): here.
12357 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12358 Parser::error.
12359 * tests/input.at: Escape $.
12360
12361 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12362
12363 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12364 Parenthesize rhs to avoid obscure problems with mistakes like
12365 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12366 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12367 b4_rhs_location): Likewise.
12368 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12369 b4_rhs_location): Likewise.
12370
12371 2004-12-16 Akim Demaille <akim@epita.fr>
12372
12373 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12374 yacc.c: be sure to stay within yycheck_.
12375 * tests/actions.at: Re-enable C++ tests.
12376
12377 2004-12-16 Akim Demaille <akim@epita.fr>
12378
12379 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12380 real.
12381
12382 2004-12-16 Akim Demaille <akim@epita.fr>
12383
12384 Use #define to handle the %name-prefix.
12385
12386 * data/glr.c, data/yacc.c: Comment changes.
12387 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12388 so that one can refer to yylex in the parser file, and have it
12389 renamed, as is the case with other skeletons.
12390
12391 2004-12-16 Akim Demaille <akim@epita.fr>
12392
12393 Move lalr1.cc internals into yy*.
12394
12395 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12396 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12397 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12398 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12399 (empty_, final_, terror_, errcode_, ntokens_)
12400 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12401 (looka_, ilooka_, error_range_, nerrs_):
12402 Rename as...
12403 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12404 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12405 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12406 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12407 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12408 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12409 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12410 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12411 these.
12412
12413 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12414
12415 Fix some problems reported by twlevo at xs4all.
12416 * src/symtab.c (symbol_new): Report an error if the input grammar
12417 contains too many symbols. This is better than calling abort() later.
12418 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12419 (struct node, struct graph):
12420 Rename member expand to stretch. All uses changed.
12421 (struct graph): Remove member layoutalgorithm. All uses removed.
12422 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12423 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12424 All uses changed.
12425 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12426
12427 2004-12-15 Akim Demaille <akim@epita.fr>
12428
12429 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12430 Add more Doxygen comments.
12431 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12432 (report_syntax_error_, translate_): Rename as...
12433 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12434 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12435
12436 2004-12-15 Akim Demaille <akim@epita.fr>
12437
12438 * data/lalr1.cc (lex_): Rename as...
12439 (yylex_): this.
12440 Move the trace here.
12441 Take the %name-prefix into account.
12442 Reported by Alexandre Duret-Lutz.
12443
12444 2004-12-15 Akim Demaille <akim@epita.fr>
12445
12446 Simplify the C++ parser constructor.
12447
12448 * data/lalr1.cc (debug_): Rename as...
12449 (yydebug_): so that the parser's internals are always in the yy*
12450 pseudo namespace.
12451 Adjust uses.
12452 (b4_parse_param_decl): Remove the leading comma as it is now only
12453 called as unique argument list.
12454 (Parser::Parser): Remove the constructor accepting a location and
12455 an initial debugging level.
12456 Remove from the other ctor the argument for the debugging level.
12457 (debug_level_type, debug_level, set_debug_level): New.
12458
12459 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12460 constructor calls.
12461
12462 2004-12-15 Akim Demaille <akim@epita.fr>
12463
12464 Remove b4_root related material: failure experiment
12465 (which goal was to allow to derive from a class).
12466
12467 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12468 definitions and uses.
12469
12470 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12471
12472 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12473 not 2, since it's not portable to subtract 1 from the start of an
12474 array. The new item 0 is never set or used. All uses changed.
12475
12476 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12477 the default definition of YYLLOC_DEFAULT. Problem reported
12478 by Frank Heckenbach.
12479
12480 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12481
12482 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12483 the normal case and one for the error case. Just use the
12484 first one uniformly. Problem reported by Frank Heckenbach.
12485 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12486 use exactly the same macro in both places.
12487 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12488 so that the normal-case YYRHSLOC works for the error case too.
12489 All uses changed.
12490 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12491 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12492 * doc/bison.texinfo (Location Default Action): Don't claim that
12493 we have an array of locations. Use the same macro for both glr
12494 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12495 the index is 0.
12496
12497 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12498
12499 * HACKING: Update email addresses to send announcements to.
12500
12501 * configure.ac (AC_INIT): Bump version to 1.875f.
12502
12503 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12504
12505 * NEWS: Version 1.875e.
12506 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12507
12508 * src/scan-skel.l: Include "complain.h", for "fatal".
12509
12510 * src/relation.h (relation_print, relation_digraph):
12511 Relation sizes are of type relation_node, not size_t (this is
12512 merely a doc fix, since the two types are equivalent).
12513 (relation_transpose): Relation sizes are of type relation_node,
12514 not int.
12515 * src/relation.c: Likewise.
12516 (top, infinity): Now of type relation_node, not int.
12517 (traverse, relation_transpose): Use relation_node, not int.
12518
12519 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12520 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12521 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12522
12523 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
12524 specifying whether the test should be skipped. Use it tp
12525 specify that the [%defines %skeleton "lalr1.cc"] tests currently
12526 fail on some hosts, and should be skipped.
12527
12528 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12529
12530 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12531 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12532 unless otherwise specified below.
12533
12534 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12535 to allocate kernel_base, kernel_items, kernel_size, since
12536 they needn't be initialized to 0.
12537 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12538 * src/closure.c (new_closure): Likewise, for itemset.
12539 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
12540 * src/lalr.c (set_goto_map): Likewise, for temp_map.
12541 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
12542 (build_relations): Likewise for edge, states1, includes.
12543 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
12544 * src/reader.c (packgram): Likewise, for ritem, rules.
12545 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
12546 * src/relation.c (relation_digraph): Likewise for VERTICES.
12547 (relation_transpose): Likewise for new_R, end_R.
12548 * src/symtab.c (symbols_token_translations_init): Likewise for
12549 token_translations.
12550 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
12551 (token_actions): Likewise for yydefact, actrow, conflrow,
12552 conflict_list.
12553 (save_column): Likewise for froms[symno], tos[symno].
12554 (goto_actions): Likewise for state_count.
12555 (pack_table): Likewise for base, pos, check.
12556 (tables_generate): Likewise for width.
12557
12558 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
12559 for initial core. Just have a separate core, so we needn't worry
12560 about whether kernel_size and kernel_base are initialized.
12561
12562 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
12563 kernel_size, kernel_items): Remove unnecessary initialization.
12564 * src/conflicts.c (conflicts): Likewise.
12565 * src/derives.c (derives): Likewise.
12566 * src/muscle_tablc (muscle_insert): Likewise.
12567 * src/relation.c (relation_digraph): Likewise.
12568 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
12569 conflrow, conflict_table, conflict_list, table, check):
12570 Likewise.
12571
12572 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
12573 This is because all callers pass unsigned int.
12574 * src/closure.h (new_closure): Likewise.
12575
12576 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
12577 (build_relations): Initialize includes[i] in all cases.
12578 * src/reader.c (packgram): Always initialize rules[ruleno].prec
12579 and rules[ruleno].precsym. Initialize members in order.
12580 * src/relation.c (relation_transpose): Always initialize new_R[i]
12581 and end_R[i].
12582 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
12583
12584 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
12585 conflict_list[0] was always 0, but now it isn't initialized.
12586
12587 * src/table.c (table_grow): When conflict_table grew, the grown
12588 area wasn't cleared. Fix this.
12589
12590 * lib/.cvsignore: Add strdup.c, strdup.h.
12591 * m4/.cvsignore: Add strdup.m4.
12592
12593 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
12594
12595 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
12596 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
12597 GOTO_NUMBER_MAXIMUM, since we occasionally compute
12598 ngotos + 1 without checking for overflow.
12599 (build_relations): Use END_NODE, not -1, to denote end of edges.
12600 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
12601 build_relations): Use goto_number, not int, for goto numbers.
12602 * src/tables.c (save_column, default_goto): Likewise.
12603
12604 2004-11-23 Akim Demaille <akim@epita.fr>
12605
12606 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
12607 of #defining from yystype.
12608 Don't typedef yystype, C++ does not need it.
12609 This lets it possible to forward declare it as union.
12610
12611 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
12612
12613 * bootstrap (gnulib_modules): Add extensions.
12614 Problem reported by Jim Meyering.
12615
12616 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
12617
12618 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
12619 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
12620 src/system.h, src/tables.c: XFREE -> free, to accommodate
12621 recent change to gnulib xalloc.h.
12622 Problem reported by Jim Meyering.
12623
12624 2004-11-17 Akim Demaille <akim@epita.fr>
12625
12626 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
12627
12628 2004-11-17 Akim Demaille <akim@epita.fr>,
12629 Alexandre Duret-Lutz <adl@gnu.org>
12630
12631 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
12632 changes.
12633 (YYCDEBUG): Adjust.
12634 Use it instead of cdebug_.
12635 (Parser::debug_stream, Parser::set_debug_stream): New.
12636 (Parser::symprint_): Define cdebug_ for temporary backward
12637 compatibility.
12638 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
12639 debug_stream ().
12640
12641 2004-11-17 Akim Demaille <akim@epita.fr>
12642
12643 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
12644 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
12645 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
12646 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12647
12648 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
12649
12650 * data/glr.c (yyloc_default): Remove; not used.
12651 Problem reported by Frank Heckenbach.
12652
12653 2004-10-25 Akim Demaille <akim@epita.fr>
12654
12655 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
12656 Introduce another definition to address simple location arrays.
12657 (yyGLRStack): New member: yyerror_range.
12658 (yyrecoverSyntaxError, yyparse): Update it.
12659 (yyrecoverSyntaxError): Use it when shifting the error token to
12660 have an accurate range, equivalent to the one computed by both
12661 yacc.c and lalr1.cc.
12662 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
12663 that column numbers start at column 0, as per GNU Coding
12664 Standards, the others tests, and the doc.
12665 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
12666 Adjust to the above change (first column is 0).
12667 And adjust the location of the "<error>", now covering the whole
12668 line.
12669
12670 2004-10-22 Akim Demaille <akim@epita.fr>
12671 and Paul Eggert <eggert@cs.ucla.edu>
12672
12673 Remove some arbitrary limits on goto numbers and relations.
12674 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
12675 initial values, since they're never used.
12676 (set_goto_map): ngotos is now unsigned, so test for overflow
12677 by seeing whether it wraps around to zero.
12678 * src/lalr.h (goto_number): Now size_t, not short int.
12679 (GOTO_NUMBER_MAXIMUM): Remove.
12680 * src/relation.c (relation_print, traverse, relation_transpose):
12681 Check for END_NODE rather than looking at sign.
12682 * src/relation.h (END_NODE): New macro.
12683 (relation_node): Now size_t, not short int.
12684
12685 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
12686
12687 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
12688 keyword, not an identifier. Problem reported by Baron Schwartz in
12689 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
12690
12691 2004-10-11 Akim Demaille <akim@epita.fr>
12692
12693 * src/symtab.c (symbol_check_alias_consistency): Also check
12694 type names, destructors, and printers.
12695 Reported by Alexandre Duret-Lutz.
12696 Recode the handling of associativity and precedence in terms
12697 of symbol_precedence_set.
12698 Accept no redeclaration at all, not even equal to the previous
12699 value.
12700 (redeclaration): New.
12701 Use it to factor redeclaration complaints.
12702 (symbol_make_alias): Don't set the type of the alias, let
12703 symbol_check_alias_consistency do it as for other features.
12704 * src/symtab.h (symbol): Add new member prec_location, and
12705 type_location.
12706 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
12707 * tests/input.at (Incompatible Aliases): New.
12708
12709 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
12710
12711 .cvsignore fixes to accommodate gnulib changes,
12712 and the practice of naming build directories "_build".
12713 * .cvsignore: Add "_*". Sort.
12714 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
12715 * m4/.cvsignore: Add "*_gl.m4".
12716
12717 2004-10-06 Akim Demaille <akim@epita.fr>
12718
12719 * src/parse-gram.y (add_param): Fix the truncation of trailing
12720 spaces.
12721
12722 2004-10-05 Akim Demaille <akim@epita.fr>
12723
12724 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
12725 whether the reducion was empty or not. This leaves room to
12726 improve the use of YYLLOC_DEFAULT in such a case.
12727 lalr1.cc is still experimental, so changing this is acceptable.
12728 And finally, there are probably not many users who changed the
12729 handling of locations in GLR, so changing is admissible too.
12730
12731 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
12732 empty reduction, set @$ to an empty location ending the previously
12733 stacked symbol.
12734 Adjust uses to make sure the code is triggered on empty
12735 reductions.
12736 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
12737 expected output: empty reductions have empty locations.
12738
12739 2004-09-29 Akim Demaille <akim@epita.fr>
12740
12741 * data/lalr1.cc: Move towards a more standard C++ coding style
12742 for templates: Class < T > -> Class<T>.
12743
12744 2004-09-29 Akim Demaille <akim@epita.fr>
12745
12746 * data/lalr1.cc: Reinstall the former ctor, for sake of
12747 compatibility, but warn it will be removed.
12748 Move towards a more standard C++ coding style (i.e., type *var ->
12749 type* var).
12750
12751 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
12752
12753 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
12754 since it's less likely to work if NULs are involved in the future.
12755
12756 2004-09-27 Akim Demaille <akim@epita.fr>
12757
12758 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
12759
12760 2004-09-27 Akim Demaille <akim@epita.fr>
12761
12762 * data/lalr1.cc (b4_parse_param_decl_1): New.
12763 (b4_parse_param_decl): Use it to have different names between attribute
12764 and argument names.
12765 (b4_cc_constructor_call): Likewise.
12766
12767 2004-09-24 Akim Demaille <akim@epita.fr>
12768
12769 * src/parse-gram.y (add_param): Strip the leading and trailing
12770 blanks from a formal argument declaration.
12771 (YY_LOCATION_PRINT): New.
12772
12773 2004-09-24 Akim Demaille <akim@epita.fr>
12774
12775 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
12776 after the location.
12777
12778 2004-09-24 Akim Demaille <akim@epita.fr>
12779
12780 * doc/bison.texinfo (Table of Symbols): Sort.
12781
12782 2004-09-21 Akim Demaille <akim@epita.fr>
12783
12784 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
12785 the useless parentheses.
12786 Suggested by Paul Eggert.
12787
12788 2004-09-20 Akim Demaille <akim@epita.fr>
12789
12790 Let the initial-action act on the look-ahead, and use it for the
12791 "initial push" (corresponding to an hypothetical beginning-of-file).
12792 And let lalr1.cc honor %initial-action.
12793
12794 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
12795 example.
12796 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
12797 (Parser::Parser): Remove the ctor that used to initialize it.
12798 (Parser::parse): Like in the other skeletons, issue the "starting
12799 parse" message before any action.
12800 Honor %initial-action.
12801 Initialize the stacks with the lookahead.
12802 * data/yacc.c: Let $$ and @$ in %initial-action designate the
12803 look-ahead.
12804 Push them in the stacks.
12805 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
12806
12807 2004-09-20 Akim Demaille <akim@epita.fr>
12808
12809 * doc/bison.texinfo (Initial Action Decl): New.
12810
12811 2004-09-20 Akim Demaille <akim@epita.fr>
12812
12813 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
12814 clearer criterion to define it.
12815 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
12816 When reducing on an empty RHS, use the latest stacked location as
12817 location.
12818 yylloc is not always available.
12819 * data/glr.c: Likewise.
12820 Also, honor initial-actions.
12821
12822 2004-09-20 Akim Demaille <akim@epita.fr>
12823
12824 * data/yacc.c (YY_LOCATION_PRINT): New.
12825 Define when we know YYLTYPE's structure, i.e., when the default
12826 YYLLOC_DEFAULT is used.
12827 * data/c.m4 (b4_yysymprint_generate): Use it.
12828 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
12829 value of the result.
12830 (error_start_): Replace with...
12831 (error_range_): this location array.
12832 This allows to replace code relying on the implementation of
12833 locations by portable code.
12834 * data/yacc.c (yylerrsp): Replace with...
12835 (yyerror_range): this.
12836 Every time a token is popped, update yyerror_range[0], to have an
12837 accurate location for the error token.
12838 * data/glr.c (YY_LOCATION_PRINT): New.
12839 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
12840 deference a pointer.
12841 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
12842 report the location in %printers.
12843
12844 * src/scan-skel.l: Instead of abort, report error messages to ease
12845 understanding skeleton scanning failures.
12846
12847 2004-09-16 Akim Demaille <akim@epita.fr>
12848
12849 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
12850 (iterator, const_iterator): these, to be more in the C++ spirit.
12851 Also, return reverse iterators so that when displaying the stack
12852 we display its bottom first.
12853 (Parser::stack_print_, Parser::reduce_print_): Match the messages
12854 from yacc.c.
12855 We should probably use vector here though.
12856
12857 2004-09-16 Akim Demaille <akim@epita.fr>
12858
12859 Have more complete shift traces.
12860
12861 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
12862 to report Shifts instead of ad hoc YYDPRINTF invocations,
12863 including for the error token.
12864 * data/lalr1.cc (symprint_): Output the location.
12865 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
12866 output the location within the %printer.
12867 Activate GLR tests, at least to make sure they compile properly.
12868 They still don't pass though.
12869 * tests/calc.at: Adjust expect verbose output, since now "Entering
12870 state..." is on a different line than the "Shifting" message.
12871
12872 2004-09-08 Akim Demaille <akim@epita.fr>
12873
12874 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
12875 Bison directive from the Bison file to the invocation of this
12876 macro, so that these directives are passed to
12877 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
12878 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
12879 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
12880 the extra Bison directives instead of the whole series.
12881 Change the grammar so that there are recoverable errors, and
12882 unrecoverable errors. Now we can have the parser give up before
12883 consuming the whole input. As a result we now can observe that
12884 the lookahead is freed when needed.
12885 Change the parser source to parse argv[1] instead of a hard coded
12886 string.
12887 Simplify yylex, and give a value and location to EOF.
12888 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
12889 passed directives already coded in the file.
12890 Add some tests to check the location of "error".
12891 For some tests, the C++ parser is correct, and not yacc.c.
12892 For other tests, they provide different, but unsatisfying, values,
12893 so keep the C++ value so that at least one parser is "correct"
12894 according to the test suite.
12895 (Actions after errors): Remove, this is subsumed by the
12896 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
12897
12898 2004-09-06 Akim Demaille <akim@epita.fr>
12899
12900 * data/lalr1.cc: Adjust the indentation of the labels.
12901 (Parser::pop): New.
12902 Use it.
12903
12904 2004-09-06 Akim Demaille <akim@epita.fr>
12905
12906 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
12907 argument, an informative message.
12908 Call YY_SYMBOL_PRINT.
12909 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
12910 * data/lalr1.cc (destruct_): Likewise.
12911 In addition, no longer depend on b4_yysymprint_generate and
12912 b4_yydestruct_generate to generate these functions, do it "by
12913 hand".
12914
12915 2004-09-03 Akim Demaille <akim@epita.fr>
12916
12917 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
12918 invoked, yydestruct the lookahead.
12919 * tests/calc.at (Calculator $1): Update the expected lengths of
12920 traces: there is an added line for the discarded lookahead.
12921 * doc/bison.texinfo (Destructor Decl): Some rewording.
12922 Define "discarded" symbols.
12923
12924 2004-09-02 Akim Demaille <akim@epita.fr>
12925
12926 * data/lalr1.cc (translate_, destruct_): No reason to be static.
12927
12928 2004-09-02 Akim Demaille <akim@epita.fr>
12929
12930 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
12931 (YYDSYMPRINTF): Rename as...
12932 (YY_SYMBOL_PRINT): this.
12933 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
12934 two.
12935 Use it instead of direct symprint_ calls.
12936 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
12937 one.
12938
12939 2004-09-02 Akim Demaille <akim@epita.fr>
12940
12941 * data/lalr1.cc (b4_yysymprint_generate): New.
12942 (symprint_): New member function, defined when YYDEBUG.
12943 Use it consistently instead of token/nterm debugging output by
12944 hand.
12945 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
12946 %printer calls to use cdebug_ when using lalr1.cc.
12947
12948 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
12949
12950 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
12951 with #ifdef YYDEBUG.
12952
12953 2004-08-26 Akim Demaille <akim@epita.fr>
12954
12955 * doc/bison.texinfo (Implementing Loops): Rename as...
12956 (Implementing Gotos/Loops): this.
12957
12958 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
12959
12960 Adjust to latest gnulib.
12961 * bootstrap (gnulib_modules): Add xalloc-die.
12962 Set LC_ALL=C so that file names sort consistently.
12963 Prefer the gnulib copies of gettext.m4, glibc21.m4,
12964 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
12965 uintmax_t.m4, ulonglong.m4.
12966 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
12967 po.m4 since we are now using _gl.m4 instead.
12968
12969 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
12970
12971 * src/scan-action.l: Remove. Scanning of semantic actions is
12972 handled in scan-gram.l.
12973
12974 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
12975
12976 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
12977
12978 * src/location.h (struct): The file member is a uniqstr.
12979 (equal_boundaries): Use UNIQSTR_EQ for comparison.
12980
12981 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
12982
12983 Fix bug with non-%union parsers that have printers or destructors,
12984 which led to a Bison core dump. Reported by Peter Fales in
12985 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
12986
12987 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
12988 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
12989 not to our own type.
12990 * src/output.c (symbol_destructors_output, symbol_printers_output):
12991 Don't assume %union.
12992 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
12993 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
12994 UNION-FLAG. All callers changed.
12995 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
12996 Use type char, not unsigned int, when declaring an array of char;
12997 this lets us remove a cast.
12998 (Printers and Destructors): Add non-%union test cases.
12999
13000 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13001
13002 * doc/bison.texinfo: Minor editorial changes, mostly to the new
13003 GLR writeups. E.g., avoid frenchspacing and the future tense,
13004 change "lookahead" to "look-ahead", and change "wrt" to "with
13005 respect to".
13006
13007 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13008
13009 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
13010 New sections, split off from the GLR Parsers section. Put the new
13011 Simple GLR Parser near the start of the GLR section, for clarity.
13012 Rewrite connective text.
13013
13014 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
13015
13016 * doc/bison.texinfo (Simple GLR Parsers): New section.
13017
13018 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
13019
13020 * NEWS, TODO, doc/bison.texinfo:
13021 Use "look-ahead" instead of "lookahead", to be consistent.
13022 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
13023 while we're fixing "look-ahead".
13024 * src/conflicts.c (shift_set): Renamed from shiftset.
13025 (look_ahead_set): Renamed from lookaheadset.
13026 * src/print.c: Likewise.
13027 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
13028 name for "lookahead".
13029 (report_types, usage): Likewise.
13030 * src/getargs.h (report_look_ahead_tokens): Renamed from
13031 report_lookaheads.
13032 * src/lalr.c (compute_look_ahead_tokens): Renamed from
13033 compute_lookaheads.
13034 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
13035 (look_ahead_tokens_print): Renamed from lookaheads_print.
13036 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
13037 state_rule_lookaheads_print.
13038 * src/state.h: Likewise.
13039 (reductions.look_ahead_tokens): Renamed from lookaheads.
13040 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
13041 AT_DATA_LOOKAHEADS_GRAMMAR.
13042
13043 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
13044
13045 * README: Update location of patched M4 distribution.
13046
13047 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
13048
13049 Don't assume the C++ compiler takes the same arguments as the C compiler
13050 (trivial change).
13051 * configure.ac (O0CXXFLAGS): New var.
13052 * tests/atlocal.in (CXXFLAGS): Use it.
13053
13054 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
13055
13056 Fix some "make check" problems with C++ reported by
13057 Albert Chin-A-Young for Tru64 C++ in this thread:
13058 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
13059
13060 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
13061 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13062 Output to a .cc file for C++, not to a .c file.
13063 * tests/calc.at (AT_CHECK_CALC): Likewise.
13064 * tests/regression.at (AT_CHECK_DANCER): Likewise.
13065 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
13066
13067 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
13068
13069 * tests/calc.at, tests/actions.at: Workaround for SGI
13070 C++ compiler. (trivial change)
13071
13072 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
13073
13074 Spent a few hours checking out which prerequisite versions the
13075 current sources actually require. I went all the way back to
13076 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
13077 a seemingly endless set of combinations of versions more recent
13078 than that. The bottom line is that the current sources require
13079 fairly recent versions of the build tools, and it'll be some work
13080 to change this.
13081 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
13082 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
13083 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
13084 Add comments explaining why those particular versions are
13085 currently needed.
13086
13087 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
13088 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
13089 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
13090
13091 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13092 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13093
13094 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13095
13096 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13097 0.11.5. Suggested by Bruno Haible.
13098 * bootstrap: Remove gettext version checking.
13099
13100 * doc/bison.texinfo (Decl Summary): Also mention that %union
13101 can depend on prerequisite types. Problem reported by Tim
13102 Van Holder.
13103
13104 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13105
13106 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13107 * README-alpha: Don't tell people not to package this.
13108
13109 * bootstrap: Don't assume $(...) works; use `...` instead.
13110 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13111 gettext better.
13112
13113 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13114 put into the -d output file, and mention what to do if YYSTYPE is
13115 defined as a macro.
13116
13117 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13118
13119 Undo change made earlier today: it caused autopoint to not bring
13120 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13121 autopoint's.
13122
13123 * bootstrap: Check that gettext version matches what's in
13124 configure.ac. Warn users to ignore robots.txt ERROR 404.
13125 * bootstrap: Undo today's earlier change (logged below).
13126 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
13127
13128 The gettext version checking is causing more trouble than it's
13129 curing; remove it. Problem reported by Paul Hilfinger.
13130
13131 * bootstrap: Issue a warning that one can expect a message
13132 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13133 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13134
13135 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13136
13137 Ensure that the C++ compiler used for testing actually works on a
13138 simple test program; if not, skip the C++-related tests. Problem
13139 reported by Vin Shelton in:
13140 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
13141
13142 * m4/cxx.m4: New file.
13143 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13144 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13145 * tests/local.at (AT_COMPILE_CXX): Use it.
13146
13147 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13148
13149 * data/glr.c (yylloc): Output this macro even if locations are not
13150 being generated, as the GLR parser needs it even in that case.
13151 Problem reported by Troy A. Johnson
13152 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13153
13154 * configure.ac (AC_INIT): Update to 1.875e.
13155
13156 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13157
13158 * NEWS: Version 1.875d.
13159 * configure.ac (AC_INIT): Likewise.
13160 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13161
13162 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13163 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13164 lalr1.cc runs afoul of the first, and the last two are no longer
13165 supported by GCC 3.4.0.
13166 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13167 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13168
13169 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13170
13171 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13172 unsigned int, for compatibility with latest gnulib hash module.
13173 * src/state.c (state_hash, state_hasher): Likewise.
13174 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13175 * src/uniqstr.c (hash_uniqstr): Likewise.
13176
13177 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13178
13179 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13180
13181 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13182 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13183 character and string literals.
13184 (unexpected_end): New function.
13185 (unexpected_eof): Use it.
13186 (unexpected_newline): New function.
13187 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13188 actions.
13189
13190 * NEWS: Document %expect-rr.
13191
13192 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13193 Fix typo by replacing $1 with $option.
13194 Remove more 'intl'-related files.
13195 Don't DEFUN AM_INTL_SUBDIR twice.
13196
13197 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13198 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13199 strtoul.c.
13200 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13201 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13202 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13203 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13204 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13205 * src/.cvsignore: Add *.output.
13206
13207 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13208 gets copied to the output file.
13209
13210 2004-04-28 Paul Eggert <eggert@twinsun.com>
13211
13212 Get files from the gnulib and po repositories, instead of relying
13213 on them being in our CVS. Upgrade to latest versions of gnulib
13214 and Automake.
13215
13216 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13217 * bootstrap: Bootstrap from gnulib and po repositories.
13218 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13219 * README-cvs: Document these changes. Remove version numbers from
13220 mentions of build tools, since they change so often. Mention Flex.
13221
13222 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13223 (gl_USE_SYSTEM_EXTENSIONS): Add.
13224 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13225 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
13226 does this for us.
13227 (AC_ISC_POSIX): Remove; we no longer support this
13228 ancient OS, as it gets in the way of latest Autoconf & gnulib.
13229 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13230 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13231 Do not check for C89 headers, except for locale.h which is used
13232 by the Yacc library and must port to K&R hosts.
13233 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13234 Do not check for C89 functions, except for setlocale which is
13235 used by the Yacc library.
13236 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13237 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13238 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13239 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13240 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13241 AM_GNU_GETTEXT): Remove; now done by:
13242 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13243 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13244 for us.
13245
13246 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13247 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13248 Define to empty, as gnulib.mk will do the rest for us.
13249 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13250 for us.
13251 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13252 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13253
13254 * src/files.c: Include gnulib's xstrndup.h.
13255
13256 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13257 (REALLOC): Use xnrealloc, for likewise.
13258 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13259 (strnlen, memrchr): Remove decls; functions no longer used.
13260 Include <stpcpy.h>.
13261
13262 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13263 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13264 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13265 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13266 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13267 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13268 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13269 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13270 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13271 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13272 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13273 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13274 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13275 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13276 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13277 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13278 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13279 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13280 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13281 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13282 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13283 Remove, as these files are now generated automatically
13284 by bootstrap or automake.
13285
13286 * po/ChangeLog: Remove: all but one entry was a duplicate
13287 of this file, and I moved that 2000-11-02 entry here.
13288
13289 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13290 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13291 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13292 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13293 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13294 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13295 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13296 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13297 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13298 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13299 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13300 xstrndup.h.
13301 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13302 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13303 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13304 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13305 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13306 * src/.cvsignore: Remove *_.c.
13307
13308
13309 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13310 support it. (The latest stable gzip doesn't.)
13311
13312 2004-04-27 Paul Eggert <eggert@twinsun.com>
13313
13314 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13315 case, as stos_ is now used by destructors due to the 2004-02-09
13316 change.
13317
13318 Remove more K&R C support.
13319 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13320 * lib/subpipe.c (errno): Remove decl.
13321 Include <stdlib.h> unconditionally.
13322 (EXIT_FAILURE): Remove macro.
13323 * src/complain.c (vfprintf, strerror): Remove.
13324 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13325 unconditionally.
13326 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13327 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13328 (strchr, strspn, memchr): Remove decls.
13329 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13330 unconditionally. Do not declare perror.
13331 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13332 unconditionally.
13333
13334 * src/complain.c (_): Remove useless defn, as system.h defines this.
13335
13336 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13337 with latest obstack.h.
13338 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13339 to procedure types, as obstack.h now does that for us.
13340 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13341
13342 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13343 so that this include file can stand alone.
13344 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13345 does this now. Include subpipe.h first after config.h, to
13346 test whether it can stand alone.
13347
13348 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13349 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13350 unused declaration.
13351
13352 * tests/synclines.at (%union synch line): Put a dummy member in
13353 the union, because empty unions aren't allowed in C. Caught
13354 by GCC 3.4.0.
13355
13356 2004-04-13 Jim Meyering <jim@meyering.net>
13357
13358 * src/conflicts.c (conflicts_print): Correct format string typo:
13359 use `%%' to produce literal `%'. (trivial change)
13360
13361 2004-03-30 Paul Eggert <eggert@twinsun.com>
13362
13363 * src/getargs.c (version): Update copyright year to 2004.
13364
13365 * data/c.m4 (b4_int_type): Use 'short int' rather than
13366 'short', and similarly for 'long', 'unsigned', etc.
13367 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13368 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13369 yy_yypstack, yydumpstack): Likewise.
13370 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13371 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13372 Likewise.
13373 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13374 yy_stack_print, yyparse): Likewise.
13375 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13376 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13377 * lib/bitset.c (bitset_print): Likewise.
13378 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13379 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13380 * lib/bitsetv.c (bitsetv_dump): Likewise.
13381 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13382 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13383 Likewise.
13384 * src/LR0.c (allocate_itemsets): Likewise.
13385 * src/gram.h (rule_number, rule): Likewise.
13386 * src/lalr.h (goto_number): Likewise.
13387 * src/nullable.c (nullable_compute): Likewise.
13388 * src/output.c (prepare_rules): Likewise.
13389 * src/relation.c (relation_print, relation_digraph): Likewise.
13390 * src/relation.h (relation_node): Likewise.
13391 * src/state.h (state_number, transitions, errs, reductions,
13392 struct state): Likewise.
13393 * src/symtab.h (symbol_number, struct symbol): Likewise.
13394 * src/tables.c (vector_number, tally, action_number,
13395 default_goto, goto_actions): Likewise.
13396 * tests/existing.at (GNU Cim Grammar): Likewise.
13397 * tests/regression.at (Web2c Actions): Likewise.
13398
13399 * src/output.c (muscle_insert_short_int_table): Renamed from
13400 muscle_insert_short_table. All uses changed.
13401
13402 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13403
13404 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13405 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13406 Add %expect-rr rule.
13407
13408 * src/scan-gram.l: Recognize %expect-rr.
13409
13410 * src/conflicts.h (expected_sr_conflicts): Rename from
13411 expected_conflicts.
13412 (expected_rr_conflicts): Declare.
13413
13414 * src/conflicts.c (expected_sr_conflicts): Rename from
13415 expected_conflicts.
13416 (expected_rr_conflicts): Define.
13417 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13418 for GLR parsers.
13419 Use expected_sr_conflicts in place of expected_conflicts.
13420 Warn if expected_rr_conflicts used in non-GLR parser.
13421
13422 * doc/bison.texinfo: Add documentation for %expect-rr.
13423
13424 2004-03-08 Paul Eggert <eggert@gnu.org>
13425
13426 Add support for hex token numbers. Suggested by Odd Arild Olsen in
13427 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
13428
13429 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13430 in lalr1.cc.
13431 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13432 * src/scan-gram.l (scan_integer): New function.
13433 ({int}): Use it.
13434 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13435 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13436 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13437 Say "long int", not "long", for uniformity with GNU style.
13438
13439 2004-02-25 Paul Eggert <eggert@twinsun.com>
13440
13441 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13442 compilers. This fixes a problem with Intel's C++ compiler being
13443 chatty, reported by Guido Trentalancia in
13444 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
13445
13446 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13447
13448 Support %destructor and merge error locations in lalr1.cc.
13449
13450 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13451 (Parser::stos_): Define unconditionally.
13452 (Parser::destruct_): New method. Generate its body with
13453 b4_yydestruct_generate.
13454 (Parser::error_start_): New attribute.
13455 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13456 token which are discarded.
13457 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13458 error_start_ when erroneous token are discarded.
13459 (Parser::parse) <yyerrlab1>: Compute the location of the error
13460 token so that it covers all the discarded tokens.
13461 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13462 it can be called with `%skeleton "lalr1.cc"', and do that.
13463
13464 2004-02-02 Paul Eggert <eggert@twinsun.com>
13465
13466 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13467 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13468 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13469 There's no need to mention top_builddir since Automake does that
13470 for us.
13471 (INCLUDES): Remove, as Automake says it's obsolescent.
13472 Contents migrated into AM_CPPFLAGS as described above.
13473 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13474
13475 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13476
13477 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13478 (yyreportSyntaxError): Handle case where lookahead token is
13479 YYEMPTY.
13480
13481 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13482
13483 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13484 resulting parsers are compilable with C++.
13485
13486 2003-12-23 Paul Eggert <eggert@twinsun.com>
13487
13488 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13489 * src/output.c (output_skeleton): Rename local var.
13490 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13491 Bison tokens, as this runs afoul of the 2003-10-07 change that
13492 disallowed NUL bytes in character constants or string literals.
13493
13494 * tests/local.at: Require Autoconf 2.59's Autotest.
13495 * tests/testsuite.at: Don't include local.at, since we now assume
13496 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13497 including it.
13498 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13499 multiple inclusion warnings.
13500
13501 2003-12-02 Akim Demaille <akim@epita.fr>
13502
13503 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13504 conditions.
13505 From Bruno Haible.
13506
13507 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13508
13509 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13510
13511 2003-10-07 Paul Eggert <eggert@twinsun.com>
13512
13513 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13514 if testsuite doesn't exist.
13515
13516 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13517 literals, unfortunately.
13518 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13519 Complain about NUL bytes in character constants or string literals.
13520
13521 2003-10-05 Paul Eggert <eggert@twinsun.com>
13522
13523 * NEWS: Don't document %no-default-prec, as it's still
13524 too experimental.
13525 * doc/bison.texinfo: Document %no-default-prec only if
13526 the defaultprec flag is set. Normally it's not.
13527
13528 2003-10-04 Paul Eggert <eggert@twinsun.com>
13529
13530 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13531 non-modifiable lvalue, instead of a modifiable one.
13532 * doc/bison.texinfo (Actions): Document that $$ can
13533 be assigned to. Do not claim that $$ and $N are
13534 array element references: user code should not rely on this.
13535
13536 2003-10-01 Paul Eggert <eggert@twinsun.com>
13537
13538 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
13539 (grammar_declaration): Use it.
13540 * src/scan-gram.l: New token %no-default-prec.
13541 * tests/conflicts.at: Revamp tests to use %no-default-prec.
13542 * NEWS, doc/bison.texinfo: Document the above.
13543
13544 2003-10-01 Akim Demaille <akim@epita.fr>
13545
13546 VCG no longer supports long_straight_phase.
13547
13548 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
13549 * src/print_graph.c (print_graph): Adjust.
13550
13551 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
13552 and Paul Eggert <eggert@twinsun.com>
13553
13554 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
13555 Table of Symbols): Document %default-prec.
13556 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
13557 (grammar_declaration): Set default_prec on %default-prec.
13558 * src/scan-gram.l (%default-prec): New token.
13559 * src/reader.h (default_prec): New flag.
13560 * src/reader.c: Likewise.
13561 (packgram): Handle it.
13562 * tests/conflicts.at (%default-prec without %prec,
13563 %default-prec with %prec, %default-prec 1): New tests.
13564
13565 2003-09-30 Paul Eggert <eggert@twinsun.com>
13566
13567 * tests/testsuite.at: Include local.at, not input.at, fixing
13568 a typo in the 2003-08-25 patch.
13569
13570 2003-08-27 Akim Demaille <akim@epita.fr>
13571
13572 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
13573 GCC warnings.
13574
13575 2003-08-26 Akim Demaille <akim@epita.fr>
13576
13577 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
13578 "<\#" to avoid magic from Gnus when posting parts of this script.
13579
13580 2003-08-26 Akim Demaille <akim@epita.fr>
13581
13582 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
13583 (Parser::parse): here.
13584 Adjust: nerrs and errstatus is now replaced by...
13585 (Parser::nerrs_, Parser::errstatus_): New.
13586
13587 2003-08-25 Akim Demaille <akim@epita.fr>
13588
13589 * config/announce-gen, Makefile.cfg: New.
13590 * Makefile.am: Adjust.
13591 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
13592 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
13593
13594 2003-08-25 Akim Demaille <akim@epita.fr>
13595
13596 When reducing initial empty rules, Bison parser read an initial
13597 location that is not defined. This results in garbage, and that
13598 affects Bison's own parser. Therefore we need (i) to extend Bison
13599 to support a means to initialize this location, and (ii) to use
13600 this CVS Bison to fix CVS Bison's parser.
13601
13602 * src/reader.h, reader.c (epilogue_augment): Remove, replace
13603 with...
13604 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
13605 * src/parse-gram.y: Adjust.
13606 (%initial-action): New.
13607 (%error-verbose): Since we require CVS Bison, there is no reason
13608 not to use it.
13609 * src/scan-gram.l: Adjust.
13610 * src/Makefile.am (YACC): New, to make sure we use our own parser.
13611 * data/yacc.c (yyparse): Use b4_initial_action.
13612
13613 2003-08-25 Akim Demaille <akim@epita.fr>
13614
13615 * doc/bison.texinfo: Don't promote stdout for error messages.
13616
13617 2003-08-25 Akim Demaille <akim@epita.fr>
13618
13619 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
13620 From Alexandre Duret-Lutz.
13621
13622 2003-08-25 Akim Demaille <akim@epita.fr>
13623
13624 Version 1.875c.
13625
13626 2003-08-25 Akim Demaille <akim@epita.fr>
13627
13628 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
13629 Use them.
13630
13631 2003-08-25 Akim Demaille <akim@epita.fr>
13632
13633 * data/lalr1.cc (Parser::reduce_print_): New.
13634 Use it.
13635
13636 2003-08-25 Akim Demaille <akim@epita.fr>
13637
13638 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
13639 error recovery loops. This patch is based on
13640 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
13641 Also, augment the similarity between lalr1.cc and yacc.c.
13642 Note: the locations of error recovery rules are not correct yet.
13643
13644 * data/lalr1.cc: Comment changes to augment the similarity between
13645 lalr1.cc and yacc.c.
13646 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
13647 (yyerrlab1): Remove, but where it used to be (now the bottom part of
13648 yyerrlab), when hitting EOF, pop the whole stack here instead of
13649 merely falling thru the default error handling mechanism.
13650 (yyerrorlab): New label, with the old contents of YYERROR,
13651 plus the following change: pop the stack of rhs corresponding
13652 to the production that invoked YYERROR. That is how Yacc
13653 behaves (required by POSIX).
13654 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
13655 fail.
13656
13657 2003-08-25 Akim Demaille <akim@epita.fr>
13658
13659 Tune local.at so that people can "autom4te -l autotest calc.at -o
13660 calc" for instance, to extract a sub test suite.
13661
13662 * tests/testsuite.at: Move the initialization, Autotest version
13663 requirement, and AT_TESTED invocation into...
13664 * tests/local.at: here.
13665 * tests/testsuite.at: Include it for compatibility with Autoconf
13666 2.57.
13667 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
13668 be ignore.
13669
13670 2003-08-04 Paul Eggert <eggert@twinsun.com>
13671
13672 Rework code slightly to avoid gcc -Wtraditional warnings.
13673 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
13674 The returned value is now stored in *YY0. All callers changed.
13675 * src/output.c (merge_output): Adjust to the above change.
13676
13677 2003-07-26 Paul Eggert <eggert@twinsun.com>
13678
13679 * data/glr.c (YYASSERT): New macro.
13680 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
13681 yyresolveStates, yyprocessOneStack):
13682 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
13683 Derived from a suggestion by Frank Heckenbach.
13684
13685 2003-07-25 Paul Eggert <eggert@twinsun.com>
13686
13687 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
13688 for portability to K&R C (after ansi2knr, presumably). See
13689 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
13690 by Frank Heckenbach, though I have omitted the structure-initialization
13691 part of his glr-knr.diff patch since I recall that the Portable
13692 C Compiler didn't require that change.
13693
13694 Let the user specify how to allocate and free memory.
13695 Derived from a suggestion by Frank Heckenbach in
13696 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
13697 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
13698 All uses of free, malloc, realloc changed to use these macros,
13699 and unnecessary casts removed.
13700 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
13701
13702 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
13703
13704 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
13705 use s.empty() rather than s == "" to test for empty string; see
13706 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
13707 (trivial change)
13708
13709 2003-06-25 Akim Demaille <akim@epita.fr>
13710
13711 * config/depcomp, config/install-sh: Update from masters.
13712
13713 2003-06-20 Paul Eggert <eggert@twinsun.com>
13714
13715 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
13716 and return properly parenthesized result.
13717 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
13718 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13719 Remove unnecessary parentheses from uses.
13720 * doc/bison.texinfo (Location Default Action): Describe the
13721 conventions for parentheses.
13722
13723 2003-06-19 Paul Eggert <eggert@twinsun.com>
13724
13725 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
13726 yyreportTree): Do not assume that size_t is the same width as int,
13727 when printing sizes. Print sizes using an unsigned format.
13728 Problem reported by Frank Heckenbach in
13729 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
13730
13731 Port to Forte Developer 7 C compiler.
13732 * data/glr.c (struct YYLTYPE): If locations are not being used,
13733 declare a single dummy member, as empty structs do not conform
13734 to the C standard.
13735 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
13736 the Forte Developer 7 C compiler complains that end-of-loop
13737 code is not reached.
13738
13739 2003-06-17 Paul Eggert <eggert@twinsun.com>
13740
13741 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
13742 avoid warnings from picky compilers about redefinition of PARAMS.
13743
13744 2003-06-17 Paul Eggert <eggert@twinsun.com>
13745
13746 Version 1.875b.
13747
13748 * NEWS: Document 1.875b.
13749
13750 * lib/bbitset.h: Do not include config.h; that's the includer's job.
13751 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
13752 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
13753 Don't use 'index' in comments, as it's a builtin fn on some hosts.
13754 * lib/bitset_stats.c: Include gettext.h unconditionally, as
13755 per recent gettext manual's suggestion.
13756 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
13757 Use prototypes, not old-style definitions.
13758 * lib/lbitset.c (lbitset_unused_clear): Likewise.
13759 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
13760 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
13761 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
13762 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
13763 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
13764 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
13765 vbitset_or_and_cmp, vbitset_copy): Likewise.
13766
13767 * lib/libiberty.h: Do not include config.h; that's the includer's job.
13768 Do not include <stdlib.h>.
13769 (PARAMS): Define unconditionally for C89.
13770 (ATTRIBUTE_NORETURN): Remove.
13771 (ATTRIBUTE_UNUSED): Define unconditionally.
13772
13773 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
13774 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
13775 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
13776 * lib/vbitset.c, lib/vbitset.h: New files.
13777 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13778 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
13779 from libbitset.
13780
13781 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
13782 `How Can I Reset @code{yyparse}', since texinfo does not allow
13783 arbitrary @ in node names.
13784
13785 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
13786 shouldn't be needed according to the gettext 0.12.1 documentation
13787 but which seem to be needed anyway: codeset.m4 glibc21.m4
13788 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
13789 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
13790 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
13791
13792 * lib/.cvsignore: Add stdbool.h.
13793 * m4/.cvsignore: Add nls.m4, po.m4.
13794
13795 Upgrade to CVS gnulib.
13796 * stdbool_.h: File renamed from stdbool.h.in.
13797 * configure.ac (AM_STDBOOL_H): Invoke this instead of
13798 AC_HEADER_STDBOOL.
13799 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
13800 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
13801 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
13802 (MOSTLYCLEANFILES): New var.
13803 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
13804 (stdbool.h): New rule.
13805 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
13806 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
13807 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
13808 m4/quote.m4: Upgrade to today's gnulib.
13809
13810 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
13811 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
13812 the tests right now.
13813 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
13814 yyerror are declared before use; C99 requires this.
13815
13816 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13817
13818 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
13819 first.
13820 (yyrecoverSyntaxError): Correct the logic for setting and testing
13821 yyerrState.
13822 Correct comment on handling EOF.
13823 Allow states with only a default reduction, rather than failing
13824 (I can't quite reconstruct why these were not allowed before).
13825
13826 Fixes to avoid problem that $-N rules in GLR parsers can cause
13827 buffer overruns, corrupting state.
13828
13829 * src/output.c (prepare_rules): Output max_left_semantic_context
13830 definition.
13831 * src/reader.h (max_left_semantic_context): New variable declaration.
13832 * src/scan-gram.l (max_left_semantic_context): Define.
13833 (handle_action_dollar): Update max_left_semantic_context.
13834 * data/glr.c (YYMAXLEFT): New definition.
13835 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
13836 (yyresolveAction): Ditto.
13837
13838 Fixes to problems with location handling in GLR parsers reported by
13839 Frank Heckenbach (2003/06/05).
13840
13841 * data/glr.c (YYLTYPE): Make trivial if locations not used.
13842 (YYRHSLOC): Add parentheses, and define only if locations used.
13843 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
13844 locations not used.
13845 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
13846 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
13847
13848 * tests/cxx-type.at: Exercise location information; update tests
13849 to differentiate output with and without locations.
13850 Remove forward declarations of yylex and yyerror---caused errors
13851 because default YYLTYPE not yet defined.
13852 Change semantic actions to compute strings, rather than printing
13853 them directly (to test proper passing of semantics values). Change
13854 output to prefix notation and update test data and expected results.
13855 (yylex): Track locations.
13856 (stmtMerge): Return value rather than printing, and include arguments
13857 in value.
13858
13859 2003-06-03 Paul Eggert <eggert@twinsun.com>
13860
13861 Avoid warnings generated by GCC 2.95.4 when Bison is
13862 configured with --enable-gcc-warnings.
13863 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
13864 yy::]b4_parser_class_name[::translate_,
13865 yy::Stack::operator[] (unsigned),
13866 yy::Stack::operator[] (unsigned) const,
13867 yy::Slice::operator[] (unsigned),
13868 yy::Slice::operator[] (unsigned) const):
13869 Rename local vars to avoid warnings.
13870 * tests/glr-regression.at (Improper handling of embedded actions
13871 and $-N in GLR parsers): Remove unused local variable from yylex.
13872 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
13873 (void) as arg when not pure, since we now assume C89 when building
13874 Bison. Pacify GCC by using parameter.
13875
13876 2003-06-02 Paul Eggert <eggert@twinsun.com>
13877
13878 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
13879 yy::Location::lines, yy::Location::columns): Rename arguments
13880 to avoid shadowing; this removes a warning generated by GCC 3.3.
13881
13882 2003-06-01 Paul Eggert <eggert@twinsun.com>
13883
13884 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
13885 to g++, as GCC 3.3 complains if you do it.
13886 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
13887 everything that WARNING_CFLAGS has, except omit warnings
13888 not suitable for C++.
13889 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
13890 * tests/atlocal.in (CXXFLAGS): New var.
13891 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
13892
13893 Fix a GLR parser bug I reported in February; see
13894 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
13895 The problem was that GLR parsers did not conform to the C standard,
13896 because actions like { $1 = $2 + $3; } expanded to expressions
13897 that invoked YYFILL in separate subexpressions, and YYFILL assigned
13898 to a local variable. The C standard says that expressions
13899 like (var = f ()) + (var = f ()) have undefined behavior.
13900 Another problem was that GCC sometimes issues warnings that
13901 yyfill and its parameters are unused.
13902
13903 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
13904 as possibly unused.
13905 (yyfill): New function.
13906 (YYFILL): Use it.
13907 (yyuserAction): Change type of yynormal to bool, so that it matches
13908 the new yyfill signature. Mark it as possibly unused.
13909
13910
13911 Follow up on a bug I reported in February, where a Bison-generated
13912 parser can loop. Provide a test case and a fix for yacc.c. I
13913 don't have a fix for lalr1.cc or for glr.c, unfortunately.
13914 The original bug report is in:
13915 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
13916
13917 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
13918 macro's size was becoming unwieldy.
13919 (yyerrlab): Do not discard an empty lookahead symbol, as this
13920 might destroy garbage.
13921 (yyerrorlab): New label, with the old contents of YYERROR,
13922 plus the following change: pop the stack of rhs corresponding
13923 to the production that invoked YYERROR. That is how Yacc
13924 behaves, and POSIX requires this behavior.
13925 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
13926 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
13927 Define 'alarm' to do nothing if unistd.h is not available.
13928 Add a new rule "exp: '-' error;" to test the above change to
13929 data/yacc.c. Use 'alarm' to abort any test taking longer than
13930 10 seconds, as it's probably looping.
13931 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
13932 Also, the new yacc.c generates two fewer diagnostics for an
13933 existing test.
13934
13935 2003-05-24 Paul Eggert <eggert@twinsun.com>
13936
13937 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
13938 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
13939 This fixes a problem reported by John Bowman when the Compaq/HP
13940 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
13941 -ansi -Wall -gall).
13942 * data/yacc.c (union yyalloc): Likewise.
13943 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
13944
13945 Switch from 'int' to 'bool' where that makes sense.
13946
13947 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
13948 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
13949 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
13950 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
13951 Return or accept bool, not int. All callers changed.
13952 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
13953 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
13954 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
13955 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
13956 bitset_or_and_cmp_): Likewise.
13957 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
13958 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
13959 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
13960 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
13961 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
13962 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
13963 bitset_stats_or_and_cmp): Likewise.
13964 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
13965 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
13966 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
13967 ebitset_xor_cmp): Likewise.
13968 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
13969 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
13970 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
13971 lbitset_xor_cmp): Likewise.
13972 * lib/bbitset.h: Include <stdbool.h>.
13973 (struct bitset_vtable): The following members now return bool, not
13974 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
13975 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
13976 or_and_cmp).
13977 * src/conflicts.c (count_rr_conflicts): Likewise.
13978 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
13979 All uses changed.
13980 * lib/ebitset.c (ebitset_obstack_init): Likewise.
13981 * lib/lbitset.c (lbitset_obstack_init): Likewise.
13982 * src/getargs.c (debug_flag, defines_flag, locations_flag,
13983 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13984 graph_flag): Likewise.
13985 * src/getargs.h (debug_flag, defines_flag, locations_flag,
13986 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13987 graph_flag): Likewise.
13988 * src/output.c (error_verbose): Likewise.
13989 * src/output.h (error_verbose): Likewise.
13990 * src/reader.c (start_flag, typed): Likewise.
13991 * src/reader.h (typed): Likewise.
13992 * src/getargs.c (LOCATIONS_OPTION): New constant.
13993 (long_options, getargs): Use it.
13994 * src/lalr.c (build_relations): Use bool, not int.
13995 * src/nullable.c (nullable_compute): Likewise.
13996 * src/print.c (print_reductions): Likewise.
13997 * src/tables.c (action_row, pack_vector): Likewise.
13998 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
13999 * src/output.c (prepare): Use it.
14000 * src/output.c (token_definitions_output,
14001 symbol_destructors_output, symbol_destructors_output): Use string,
14002 not boolean integer, to keep track of whether to output separator.
14003 * src/print_graph.c (print_core): Likewise.
14004 * src/state.c (state_rule_lookaheads_print): Likewise.
14005
14006 * config/install-sh: Sync from automake 1.7.5.
14007
14008 2003-05-14 Paul Eggert <eggert@twinsun.com>
14009
14010 * src/parse-gram.y (rules_or_grammar_declaration): Require a
14011 semicolon after a grammar declaration, in the interest of possible
14012 future changes to the Bison input language.
14013 Do not allow a stray semicolon at the start of the grammar.
14014 (rhses.1): Allow one or more semicolons after any rule, including
14015 just before "|" as required by POSIX.
14016 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
14017 grammar.
14018
14019 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
14020
14021 %parse-param support for lalr1.cc.
14022
14023 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
14024 b4_cc_constructor_calls, b4_cc_constructor_call,
14025 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
14026 definitions.
14027 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
14028 parse-param arguments.
14029 (yy::b4_parser_class_name): Declare instance variables to
14030 hold parse-param arguments.
14031 * tests/calc.at: s/value/semantic_value/ because value clashes
14032 with a member of yy::b4_parser_class_name. Adjust C++ code
14033 to handle %parse-param. Enable %parse-param test in C++.
14034
14035 2003-05-12 Paul Eggert <eggert@twinsun.com>
14036
14037 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
14038 English a bit. Fix fclose typo. Change "const char" to "char
14039 const", and use ANSI C rather than K&R for "main". Suggest
14040 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
14041 and suggest yy_switch_to_buffer.
14042
14043 2003-05-05 Paul Eggert <eggert@twinsun.com>
14044
14045 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
14046 C89. This avoids a diagnostic on compilers that define __STDC__
14047 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14048 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14049
14050 2003-05-03 Paul Eggert <eggert@twinsun.com>
14051
14052 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
14053 Do not overrun array bounds.
14054 This should fix a bug reported today by Olatunji Oluwabukunmi in
14055 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
14056
14057 2003-04-29 Akim Demaille <akim@epita.fr>
14058
14059 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
14060 * src/getargs.c, src/getargs.h: here, as bool, not int.
14061 (nondeterministic_parser): New.
14062 * src/parse-gram.y, src/scan-gram.l: Support
14063 %nondeterministic-parser.
14064 * src/output.c (prepare): Use nondeterministic_parser instead
14065 of glr_parser where appropriate.
14066 * src/tables.c (conflict_row, action_row, save_row)
14067 (token_actions, token_actions, pack_vector): Ditto.
14068
14069 2003-04-29 Akim Demaille <akim@epita.fr>
14070
14071 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
14072
14073 2003-04-29 Akim Demaille <akim@epita.fr>
14074
14075 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
14076 with %pure-parser and %locations to exercise the patch from Yakov
14077 Markovitch below.
14078
14079 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
14080
14081 * data/yacc.c: (b4_lex_param): Corrected for the case where
14082 %lex-param is provided and %pure-parser isn't.
14083
14084 2003-04-27 Paul Eggert <eggert@twinsun.com>
14085
14086 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
14087 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
14088 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
14089 if it is not defined.
14090 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14091
14092 2003-04-26 Paul Eggert <eggert@twinsun.com>
14093
14094 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14095 Declare to be of type suitable for the ninf value itself, not of
14096 type suitable for the corresponding table, since the latter might
14097 be unsigned but the ninf value might be negative. This fixes a
14098 bug reported by Alexandre Duret-Lutz in
14099 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
14100
14101 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14102 invokes it. We shouldn't invoke it twice because it will attempt
14103 to put error.o in the archive twice. This fixes a glitch reported
14104 by Martin Mokrejs in
14105 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
14106
14107 2003-04-21 Paul Eggert <eggert@twinsun.com>
14108
14109 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14110 to gnulib.
14111
14112 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14113
14114 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14115 Fix obvious typo that results in uncompilable GLR parsers
14116 when both %pure-parser and %locations are used. (trivial change)
14117
14118 2003-04-17 Paul Eggert <eggert@twinsun.com>
14119
14120 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14121 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14122 Do not insert the expected token via unput, as this runs afoul
14123 of a POSIX-compatibility bug in flex 2.5.31.
14124 All uses changed to BEGIN the parent state,
14125 since we no longer insert the expected token via unput.
14126 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14127 that is no longer emitted after the above change.
14128
14129 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14130 the first one. This change is from Paul Hilfinger, and it fixes
14131 regression reported by Werner Lemberg in
14132 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
14133
14134 (resolve_sr_conflict): Don't invoke state_errs_set
14135 unless one or more tokens have been explicitly made errors.
14136 Otherwise, the above change causes Bison to abort.
14137
14138 * tests/existing.at (GNU pic Grammar): New test case, taken from
14139 Lemberg's email.
14140
14141 2003-03-31 Akim Demaille <akim@epita.fr>
14142
14143 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14144
14145 2003-03-31 Akim Demaille <akim@epita.fr>
14146
14147 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14148 output.
14149
14150 2003-03-31 Akim Demaille <akim@epita.fr>
14151
14152 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14153 From Paul Hilfinger.
14154
14155 2003-03-29 Akim Demaille <akim@epita.fr>
14156
14157 * m4/error.m4: Do not put under dynamic conditions some code which
14158 expansion is under static control.
14159
14160 2003-03-29 Akim Demaille <akim@epita.fr>
14161
14162 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14163
14164 2003-03-29 Akim Demaille <akim@epita.fr>
14165
14166 * doc/bison.texinfo (Strings are Destroyed): New.
14167
14168 2003-03-13 Paul Eggert <eggert@twinsun.com>
14169
14170 * .cvsignore: Add configure.lineno.
14171 * src/.cvsignore: Add yacc.
14172 * tests/.cvsignore: Add testsuite.log.
14173 * doc/fdl.texi: Sync with latest FSF version.
14174
14175 2003-03-12 Paul Eggert <eggert@twinsun.com>
14176
14177 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14178 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14179 cursor, instead of leaving it undefined. This fixes a bug
14180 reported by Tim Van Holder in
14181 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
14182 * tests/input.at (Torturing the Scanner): Test the scanner on
14183 an empty input file, which was Tim Van Holder's test case.
14184
14185 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14186 <sys/resource.h> can be included, include sys/time.h and
14187 sys/times.h first, if available. This works around the SunOS
14188 4.1.4 porting bug reported by Bruce Becker in
14189 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
14190
14191 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14192 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14193 AC_HEADER_SYS_WAIT.
14194
14195 Merge changes from gnulib. This was prompted because the CVS
14196 snapshot didn't build on Solaris 7 due to strnlen problems.
14197
14198 These changes need to be merged back into gnulib:
14199 * lib/hash.c: Include <stdbool.h> unconditionally.
14200 * m4/onceonly.m4 (m4_quote): New macro.
14201 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14202 Quote AC_FOREACH variable-expansions properly.
14203 The 2003-01-03 obstack.h change also needs merging.
14204 {end of changes requiring merging}
14205
14206 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14207 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14208 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14209 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14210 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14211 New files, imported from gnulib.
14212 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14213 above.
14214
14215 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14216 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14217 gnulib sources.
14218
14219 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14220 Add.
14221 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14222 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14223 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14224 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14225 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14226 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14227 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14228 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14229 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14230 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14231 (jm_PREREQ_ARGMATCH): Remove.
14232 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14233 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14234
14235 * src/system.h: Include <stdbool.h> unconditionally.
14236
14237 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14238 assuming at least C89 in the bitset code for some time now.
14239
14240 2003-03-03 Akim Demaille <akim@epita.fr>
14241
14242 * ro.po: New.
14243
14244 2003-03-02 Akim Demaille <akim@epita.fr>
14245
14246 * doc/bison.texinfo (Table of Symbols): Reactivate the
14247 documentation for %lex-param, and %parse-param.
14248
14249 2003-03-02 Akim Demaille <akim@epita.fr>
14250
14251 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14252 generate verbose error messages.
14253 Use the number of tokens as an upper bound in yytname, as it
14254 cannot be a non terminal.
14255
14256 2003-03-02 Akim Demaille <akim@epita.fr>
14257
14258 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14259 message.
14260
14261 2003-03-02 Akim Demaille <akim@epita.fr>
14262
14263 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14264 Use them to exercise yycheck overrun.
14265 Based on Andrew Suffield's grammar.
14266
14267 2003-03-02 Akim Demaille <akim@epita.fr>
14268
14269 Create tests/local.at for Bison generic testing macros.
14270
14271 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14272 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14273 This new file.
14274 * tests/calc.at (AT_CHECK_CALC): Adjust.
14275 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14276 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14277 * tests/local.at: here.
14278 (AT_COMPILE_CXX): Tags the tests using it as c++.
14279 Ignore the test if CXX is not functional.
14280
14281 2003-03-01 Paul Eggert <eggert@twinsun.com>
14282
14283 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14284 not loc->end, since loc->end might contain garbage and this leads
14285 to undefined behavior on some platforms.
14286 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14287 depend on *loc, so that the reader doesn't give the the false
14288 impression that *loc is initialized.
14289 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14290 does not survive the return.
14291
14292 2003-03-01 Akim Demaille <akim@epita.fr>
14293
14294 * src/scan-gram.l (code_start): Always initialize it when entering
14295 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14296 yylex invocation. An alternative would be making it static, but
14297 then it starts with the second %%'s beginning, instead of its end.
14298
14299 2003-02-28 Paul Eggert <eggert@twinsun.com>
14300
14301 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14302 around a UnixWare 7.1.1 porting bug reported by John Hughes in
14303 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
14304
14305 2003-02-26 Paul Eggert <eggert@twinsun.com>
14306
14307 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14308 Remove Sequent/Pyramid discussion (nobody uses them any more).
14309 Merge VMS and MS-DOS discussion; these ports may well be dead
14310 but let's keep mentioning them for now. Put <> around email
14311 addresses. Add copyright notice.
14312
14313 2003-02-24 Paul Eggert <eggert@twinsun.com>
14314
14315 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14316 to avoid collision with flex use of yylineno.
14317 Problem reported by Bruce Lilly in
14318 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
14319 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14320 * data/yacc.c (yy_reduce_print): Likewise.
14321
14322 * config/depcomp: Sync with Automake 1.7.3.
14323
14324 2003-02-21 Akim Demaille <akim@epita.fr>
14325
14326 * data/lalr1.cc: Use temporary variables instead of casts to
14327 change integer types.
14328 Suggested by Paul Eggert.
14329
14330 2003-02-21 Akim Demaille <akim@epita.fr>
14331
14332 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14333 to avoid confusions with lalr1.cc's notion of Position.
14334 Suggested by Paul Eggert.
14335
14336 2003-02-20 Akim Demaille <akim@epita.fr>
14337
14338 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14339 before initial_columns.
14340 (location.hh): Use consistent variable names when defining the
14341 operator<<.
14342 Use "last" so that we subtract from Positions, not from unsigned.
14343
14344 2003-02-20 Akim Demaille <akim@epita.fr>
14345
14346 * data/lalr1.cc (position.hh): New subfile, including the extended
14347 and Doxygen'ed documentation of class Position.
14348 (location.hh): Use it.
14349 Document a` la Doxygen.
14350 With the help of Benoit Perrot.
14351
14352 2003-02-20 Akim Demaille <akim@epita.fr>
14353
14354 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14355 AT_YACC_IF.
14356 Redefine AT_YYERROR_SEES_LOC_IF using it.
14357 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14358 not defined.
14359 Don't use the location in yy::Parser::error_ and
14360 yy::Parser::print_ when not %locations.
14361 Activate more lalr1.cc tests.
14362
14363 2003-02-19 Akim Demaille <akim@epita.fr>
14364
14365 * data/lalr1.cc: When displaying a line number, be sure to make it
14366 an int.
14367
14368 2003-02-19 Akim Demaille <akim@epita.fr>
14369
14370 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14371 Remove, useless.
14372 (YYABORT, YYACCEPT, YYERROR): New.
14373 * tests/calc.at: Renable the lalr1.cc test.
14374
14375 2003-02-19 Akim Demaille <akim@epita.fr>
14376
14377 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14378 error recovery, mixing with/without pops and discarding of the
14379 lookahead.
14380 Exercise YYERROR.
14381 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14382
14383 2003-02-17 Paul Eggert <eggert@twinsun.com>
14384
14385 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14386 * tests/testsuite.at (AT_COMPILE): Use them.
14387 This fixes the testsuite problem reported by Robert Lentz in
14388 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
14389
14390 2003-02-12 Paul Eggert <eggert@twinsun.com>
14391
14392 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14393 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
14394 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
14395 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14396 Check for malloc failure, for consistency with yacc.c.
14397 (yytname_size): Remove, for consistency with yacc.c.
14398
14399 The bug still remains in data/lalr1.cc, as I didn't have time
14400 to fix it there.
14401
14402 2003-02-06 Akim Demaille <akim@epita.fr>
14403
14404 * configure.ac (GXX): Rename as...
14405 (CXX): this, to keep the original Autoconf semantics.
14406 Require 2.57.
14407 * data/lalr1.cc: Fix b4_copyright invocations.
14408 If YYDEBUG is not defined, don't depend upon name_ being defined.
14409 (location.hh): Include string and iostream.
14410 (Position::filename): New member.
14411 (Position::Position ()): New.
14412 (operator<< (Position)): New.
14413 (operator- (Position, int)): New.
14414 (Location::first, Location::last): Rename as...
14415 (Location::begin, Location::end): these, to mock the conventional
14416 iterator names.
14417 (operator<< (Location)): New.
14418 * tests/atlocal.in (CXX): New.
14419 * tests/testsuite.at (AT_COMPILE_CXX): New.
14420 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14421 locations in a more synthetic way.
14422 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14423 lalr1.cc is used.
14424 Adjust the C locations to match those from Emacs: first column is
14425 column 0.
14426 Change all the expected results.
14427 Conform to the GCS: simplify the locations when applicable.
14428 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14429 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14430 these CPP macros with the m4 macros new defined by...
14431 (AT_CHECK_PUSHDEFS): this, i.e.:
14432 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
14433 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
14434 New macros.
14435 (AT_CHECK_POPDEFS): Undefine them.
14436 (AT_CHECK_CALC_LALR1_CC): New.
14437 Use it for the first lalr1.cc test.
14438
14439 2003-02-04 Akim Demaille <akim@epita.fr>
14440
14441 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14442 Location as is defined.
14443
14444 2003-02-04 Akim Demaille <akim@epita.fr>
14445
14446 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14447 name_ being defined.
14448
14449 2003-02-03 Paul Eggert <eggert@twinsun.com>
14450
14451 * src/gram.h (start_symbol): Remove unused decl.
14452
14453 Use more-consistent naming conventions for local vars.
14454
14455 * src/derives.c (derives_compute): Change type of local var from
14456 int to rule_number.
14457 * src/gram.c (grammar_rules_partial_print): Likewise.
14458 * src/print.c (print_core): Likewise.
14459 * src/reduce.c (reduce_grammar_tables): Likewise.
14460
14461 * src/gram.c (grammar_dump): Change name of item_number *
14462 local var from r to rp.
14463 * src/nullable.c (nullable_compute): Likewise.
14464
14465 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14466
14467 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14468 for symbol or symbol_number var.
14469 * src/reader.c (grammar_start_symbol_set): Likewise.
14470 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14471 Likewise.
14472 * src/state.c (transitions_to): Likewise.
14473 * src/state.h: Likewise.
14474 * src/tables.c (symbol_number_to_vector_number): Likewise.
14475
14476 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14477 char * var.
14478
14479 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14480 var.
14481
14482 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14483 var.
14484
14485 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14486 Use str, not s, for char * var. Use ch, not c, for character var.
14487 Use size for size var.
14488
14489 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14490 char * var.
14491 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14492 uniqstr var.
14493 * src/uniqstr.h: Likewise.
14494
14495 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14496 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14497 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14498 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14499 param to have same name as that of enum, so that we don't use
14500 "s" to stand for a non-state.
14501
14502 2003-02-02 Akim Demaille <akim@epita.fr>
14503
14504 * src/scan-skel.l: Scan more than one inert character per yylex
14505 invocation.
14506
14507 2003-02-01 Paul Eggert <eggert@twinsun.com>
14508
14509 Version 1.875a.
14510
14511 * po/LINGUAS: Add ms.
14512
14513 2003-01-30 Akim Demaille <akim@epita.fr>
14514
14515 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14516
14517 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14518
14519 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14520 of $1.
14521
14522 Changes in response to error report by S. Eken: GLR mode does not
14523 handle negative $ indices or $ indices in embedded rules correctly.
14524 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
14525
14526 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14527 (b4_rhs_location): Ditto.
14528 (yyfill): New function to copy from stack tree into array
14529 incrementally.
14530 (yyuserAction): Modify to allow incremental move of semantic values
14531 to rhs array when in GLR mode.
14532 Define YYFILL to use in user-defined actions to fill semantic array
14533 as needed.
14534 Remove dummy use of yystack, as there is now a guaranteed use.
14535 (yydoAction): Modify to allow incremental move of semantic values
14536 to rhs array when in GLR mode.
14537 (yyresolveAction): Ditto.
14538 (yyglrShiftDefer): Update comment.
14539 (yyresolveStates): Use X == NULL for pointers, not !X.
14540 (yyglrReduce): Ditto.
14541 (yydoAction): Ditto
14542
14543 * tests/glr-regr1.at: Rename to ...
14544 * tests/glr-regression.at: Add new regression test for the problems
14545 described above (adapted from S. Eken).
14546 Update copyright notice.
14547 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
14548 * tests/Makefile.am: Ditto.
14549
14550 2003-01-28 Paul Eggert <eggert@twinsun.com>
14551
14552 * data/lalr1.cc: Do not use @output_header_name@ unless
14553 b4_defines_flag is set. This fixes two bugs reported by
14554 Tim Van Holder in
14555 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
14556 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
14557
14558 2003-01-21 Paul Eggert <eggert@twinsun.com>
14559
14560 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
14561 we don't need to worry about yyerrlab1 being reported as an
14562 "unused label" by non-GCC C compilers. The downside is that if
14563 locations are used then a couple of statements are duplicated each
14564 time YYERROR is invoked, but the upside is that the warnings
14565 should vanish.
14566 (yyerrlab1): Move code to YERROR.
14567 (yyerrlab2): Remove. Change uses back to yyerrlab1.
14568 This reverts some of the 2002-12-27 change.
14569
14570 2003-01-17 Paul Eggert <eggert@twinsun.com>
14571
14572 * src/output.c (symbol_printers_output): Fix typo that led
14573 to core dump. Problem reported by Antonio Rus in
14574 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
14575
14576 2003-01-13 Akim Demaille <akim@epita.fr>,
14577 Quoc Peyrot <chojin@lrde.epita.fr>,
14578 Robert Anisko <anisko_r@lrde.epita.fr>
14579
14580 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
14581 when the stacks contain one element, as the loop would otherwise
14582 free the last state, and then use the top state (the one we just
14583 popped). This means that the initial elements will not be freed
14584 explicitly, as is the case in yacc.c; it is not a problem, as
14585 these elements have fake values.
14586
14587 2003-01-11 Paul Eggert <eggert@twinsun.com>
14588
14589 * NEWS: %expect-violations are now just warnings, reverting
14590 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
14591 bootstrapping problem reported by Matthias Klose; see
14592 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
14593 * src/conflicts.c (conflicts_print): Likewise.
14594 * tests/conflicts.at (%expect not enough, %expect too much,
14595 %expect with reduce conflicts): Likewise.
14596 * doc/bison.texinfo (Expect Decl): Document this. Also mention
14597 that the warning is enabled if the number of conflicts changes
14598 (not necessarily increases).
14599
14600 * src/getargs.c (version): Update copyright year.
14601
14602 2003-01-09 Akim Demaille <akim@epita.fr>
14603
14604 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
14605
14606 2003-01-08 Paul Eggert <eggert@twinsun.com>
14607
14608 * Makefile.maint (WGETFLAGS):
14609 New macro, containing "-C off" to disable proxy caches.
14610 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
14611 (rel-check): Use $(WGET) instead of wget.
14612
14613 2003-01-06 Paul Eggert <eggert@twinsun.com>
14614
14615 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
14616 the GLR paper of Scott, Johnstone and Hussain.
14617
14618 2003-01-04 Paul Eggert <eggert@twinsun.com>
14619
14620 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
14621 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
14622 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
14623 (EXTRA_LIBRARIES): New var, for liby.a.
14624 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
14625 (EXTRA_SCRIPTS): New var, for yacc.
14626
14627 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
14628 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
14629 Problem reported by Nelson H. F. Beebe.
14630
14631 2003-01-03 Paul Eggert <eggert@twinsun.com>
14632
14633 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
14634 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
14635 when compiling Bison 1.875's `bitset bset = obstack_alloc
14636 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
14637
14638 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
14639 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
14640 grow to a huge size with typical invocation.
14641
14642 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
14643 Use the pattern recommended by Autoconf 2.57, except also protect
14644 against double-definition.
14645 * src/system.h: Likewise.
14646 Portability issues reported by Nelson H. F. Beebe.
14647
14648 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
14649 All uses changed. Provide a definition in both C and C++.
14650 (yytrue, yyfalse): Define even if defined (__cplusplus).
14651
14652 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
14653 Reported by Nelson H. F. Beebe.
14654
14655 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
14656
14657 2003-01-02 Paul Eggert <eggert@twinsun.com>
14658
14659 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
14660 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
14661 Bug reported by Nelson H. F. Beebe.
14662
14663 2003-01-01 Paul Eggert <eggert@twinsun.com>
14664
14665 * Version 1.875.
14666
14667 2002-12-30 Paul Eggert <eggert@twinsun.com>
14668
14669 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
14670 Moved here from...
14671 (<INITIAL>","): Here. This causes stray "," to be treated
14672 more uniformly.
14673
14674 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
14675 last brace in braced code when not in Yacc mode, for compatibility
14676 with Bison 1.35. This resurrects the 2001-12-15 patch to
14677 src/reader.c.
14678
14679 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
14680 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
14681
14682 2002-12-28 Paul Eggert <eggert@twinsun.com>
14683
14684 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
14685 that of SYM's type. This fixes Debian bug 168069, reported by
14686 Thomas Olsson.
14687
14688 2002-12-28 Paul Eggert <eggert@twinsun.com>
14689
14690 Version 1.75f.
14691
14692 Switch back to the Yacc style of conflict reports, undoing some
14693 of the 2002-07-30 change.
14694 * doc/bison.texinfo (Understanding): Use Yacc style for
14695 conflict reports. Also, use new way of locating rules.
14696 * src/conflicts.c (conflict_report):
14697 Renamed from conflict_report_yacc, removing the old
14698 'conflict_report'. Translate the entire conflict report at once,
14699 so that we don't assume that "," has the same interpretation in
14700 all languages.
14701 (conflicts_output): Use Yacc-style conflict report for each state,
14702 instead of our more-complicated style.
14703 (conflicts_print): Use Yacc-style conflict report, except print
14704 the input file name when not emulating Yacc.
14705 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
14706 Conflicted Reduction, %expect not enough, %expect too much,
14707 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
14708 * tests/existing.at (GNU Cim Grammar): Likewise.
14709 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
14710
14711 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
14712 fatal): Don't invoke fflush; it's not needed and it might even be
14713 harmful for stdout, as stdout might not be open.
14714 * src/reduce.c (reduce_print): Likewise.
14715
14716 2002-12-27 Paul Eggert <eggert@twinsun.com>
14717
14718 Fix a bug where error locations were not being recorded correctly.
14719 This problem was originally reported by Paul Hilfinger in
14720 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
14721
14722 * data/yacc.c (yyparse): New local var yylerrsp, to record the
14723 top of the location stack's error locations.
14724 (yyerrlab): Set it. When discarding a token, push its location
14725 onto yylerrsp so that we don't lose track of the error's end.
14726 (yyerrlab1): Now is only the target of YYERROR, so that we can
14727 properly record the location of the action that failed. For GCC
14728 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
14729 GCC warning about yyerrlab1 being unused if YYERROR is unused.
14730 (yyerrlab2): New label, which yyerrlab now falls through to.
14731 Compute the error's location by applying YYLLOC_DEFAULT to
14732 the locations of all the symbols that went into the error.
14733 * doc/bison.texinfo (Location Default Action): Mention that
14734 YYLLOC_DEFAULT is also invoked for syntax errors.
14735 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14736 Error locations include the locations of all the tokens that were
14737 discarded, not just the last token.
14738
14739 2002-12-26 Paul Eggert <eggert@twinsun.com>
14740
14741 * src/files.c: Include quote.h.
14742 (compute_output_file_names): Warn if we detect conflicting
14743 outputs to the same file. This should catch the misunderstanding
14744 exemplified by Debian Bug 165349, reported by Bruce Stephens..
14745
14746 * src/conflicts.c (conflicts_print): If the user specifies
14747 "%expect N", report an error if there are any reduce/reduce
14748 conflicts. This is what the manual says should happen.
14749 This fixes Debian bug 130890, reported by Anthony DeRobertis.
14750 * tests/conflicts.at (%expect with reduce conflicts): New test.
14751
14752 Don't use m4_include on relative file names, as it doesn't work as
14753 desired if there happens to be a file with that name under ".".
14754
14755 * m4sugar/version.m4: Remove; it was included but it wasn't used.
14756 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
14757 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
14758 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
14759 * src/output.c (output_skeleton): Use full path names when
14760 specifying a file to include; don't rely on include path, as
14761 it's unreliable when the working file contains a file with
14762 that name.
14763
14764 2002-12-25 Paul Eggert <eggert@twinsun.com>
14765
14766 Remove obsolete references to bison.simple and bison.hairy.
14767 Problem mentioned by Aubin Mahe in
14768 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
14769 * data/glr.c: Comment fix.
14770 * doc/bison.1: Remove references. Also, mention "yacc".
14771
14772 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
14773 with -g option.
14774
14775 * src/parse-gram.y (declaration): Use enum "report_states" rather
14776 than its numeric value 1.
14777
14778 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
14779 opening a new one. This fixes Debian bug 165349, reported by
14780 Bruce Stephens.
14781
14782 2002-12-24 Paul Eggert <eggert@twinsun.com>
14783
14784 Version 1.75e.
14785
14786 * Makefile.maint (cvs-update): Don't assume that the shell
14787 supports $(...), as Solaris sh doesn't.
14788
14789 * src/parse-gram.y (lloc_default): Remove test for empty
14790 nonterminals at the end, since it didn't change the result.
14791
14792 2002-12-24 Paul Eggert <eggert@twinsun.com>
14793
14794 If the user does not define YYSTYPE as a macro, Bison now declares it
14795 using typedef instead of defining it as a macro. POSIX requires this.
14796 For consistency, YYLTYPE is also declared instead of defined.
14797
14798 %union directives can now have a tag before the `{', e.g., the
14799 directive `%union foo {...}' now generates the C code
14800 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
14801 The default union tag is `YYSTYPE', for compatibility with Solaris 9
14802 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
14803 instead of `yyltype'.
14804
14805 `yystype' and `yyltype' are now obsolescent macros instead of being
14806 typedefs or tags; they are no longer documented and will be
14807 withdrawn in a future release.
14808
14809 * data/glr.c (b4_location_type): Remove.
14810 (YYSTYPE): Renamed from yystype.
14811 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
14812 (struct YYLTYPE): Renamed from struct yyltype.
14813 (YYLTYPE): Renamed from yyltype.
14814 (yyltype, yystype): New (and obsolescent) macros,
14815 for backward compatibility.
14816 * data/yacc.c: Likewise.
14817
14818 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
14819 does not specify a union tag. This is for compatibility with
14820 Solaris 9 yacc.
14821
14822 * src/parse-gram.y (add_param): 2nd arg is now char * not char
14823 const *, since it is now modified by stripping surrounding { }.
14824 (current_braced_code): Remove.
14825 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
14826 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
14827 trailing " {...}". Now of type <chars>.
14828 (grammar_declaration): Adjust to bundled tokens.
14829 (code_content): Remove; stripping is now done by add_param.
14830 (print_token_value): Print contents of bundled tokens.
14831 (token_name): New function.
14832
14833 * src/reader.h (braced_code, current_braced_code): Remove.
14834 (token_name): New decl.
14835
14836 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
14837 token_type, not braced_code code_kind. All uses changed.
14838 (SC_PRE_CODE): New state, for scanning after a keyword that
14839 has (or usually has) an immediately-following braced code.
14840 (token_type): New local var, to keep track of which token type
14841 to return when scanning braced code.
14842 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
14843 <INITIAL>"%parse-param", <INITIAL>"%printer",
14844 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
14845 instead of returning a token type immediately.
14846 (<INITIAL>"{"): Set token type.
14847 (<SC_BRACED_CODE>"}"): Use it.
14848 (handle_action_dollar, handle_action_at): Now returns bool
14849 indicating success. Fail if ! current_rule; this prevents a core dump.
14850 (handle_symbol_code_dollar, handle_symbol_code_at):
14851 Remove; merge body into caller.
14852 (handle_dollar, handle_at): Complain in invalid contexts.
14853
14854 * NEWS, doc/bison.texinfo: Document the above.
14855 * NEWS: Fix years and program names in copyright notice.
14856
14857 2002-12-17 Paul Eggert <eggert@twinsun.com>
14858
14859 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
14860 Reporting, Table of Symbols): Omit mentions of %lex-param and
14861 %parse-param from the documentation for now.
14862
14863 2002-12-15 Paul Eggert <eggert@twinsun.com>
14864
14865 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
14866 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
14867 lookahead symbol, and which sets yychar in parser actions) and it
14868 disagreed with the Bison documentation. Bug
14869 reported by Andrew Walrond.
14870
14871 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
14872 as the caller now does that.
14873 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
14874 (YYEMPTY): Parenthesize right hand side, since others use it.
14875 (yyparse): Don't assume that our generated code is the only code
14876 that sets yychar.
14877
14878 2002-12-13 Paul Eggert <eggert@twinsun.com>
14879
14880 Version 1.75d.
14881
14882 POSIX requires a "yacc" command.
14883 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
14884 (MOSTLYCLEANFILES): Add yacc.
14885 (yacc): New rule.
14886 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
14887 as an alias for bison y.
14888
14889 * po/LINGUAS: Add da.
14890
14891 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
14892 problem with latest <getopt.h>.
14893 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
14894
14895 * doc/fdl.texi: Upgrade to 1.2.
14896 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
14897 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
14898 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
14899 gnulib.
14900 * config/install-sh: Sync with autotools.
14901
14902 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
14903 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14904 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
14905 locations are requested.
14906 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
14907 locations are requested.
14908
14909 2002-12-12 Paul Eggert <eggert@twinsun.com>
14910
14911 Remove unportable casts and storage allocation tricks.
14912 While we're at it, remove almost all casts, since they
14913 usually aren't needed and are a sign of trouble.
14914
14915 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
14916
14917 * src/derives.c (derives_compute): Do not subtract NTOKENS from
14918 the pointer DSET returned by malloc; this isn't portable.
14919 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
14920 Similarly for DERIVES.
14921 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
14922 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
14923 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
14924
14925 * src/derives.c (derives_compute): Do not bother invoking
14926 int_of_rule_number, since rule numbers are integers.
14927
14928 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
14929 rather than XMALLOC (char, N).
14930
14931 * src/files.c (filename_split): Rewrite to avoid cast.
14932
14933 * src/gram.h (symbol_number_as_item_number,
14934 item_number_as_symbol_number, rule_number_as_item_number,
14935 item_number_as_rule_number):
14936 Now inline functions rather than macros, to avoid casts.
14937 * src/state.h (state_number_as_int): Likewise.
14938 * src/tables.c (state_number_to_vector_number,
14939 symbol_number_to_vector_number): Likewise.
14940
14941 * src/gram.h (int_of_rule_number): Remove; no longer used.
14942
14943 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
14944 since the resulting storage is always stored into.
14945
14946 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
14947 where it's needed.
14948
14949 * src/muscle_tab.c (muscle_m4_output):
14950 Now inline. Return bool, not int.
14951 * src/state.c (state_compare): Likewise.
14952 * src/symtab.c (symbol_check_defined,
14953 symbol_check_alias_consistency, symbol_pack, symbol_translation,
14954 hash_compare_symbol, hash_symbol):
14955 Likewise.
14956 * src/uniqstr.c (uniqstr_print): Likewise.
14957 * src/muscle_tab.c (muscle_m4_output_processor):
14958 New function, to avoid casts.
14959 * src/state.c (state_comparator, stage_hasher): Likewise.
14960 * src/symtab.c (symbol_check_defined_processor,
14961 symbol_check_alias_consistency_processor, symbol_pack_processor,
14962 symbol_translation_processor, hash_symbol_comparator,
14963 hash_symbol_hasher): Likewise.
14964 * src/uniqstr.c (uniqstr_print_processor): Likewise.
14965 * src/muscle_tab.c (muscles_m4_output):
14966 Use new functions instead of casting old functions unportably.
14967 * src/state.c (state_hash_new): Likewise.
14968 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
14969 symbols_token_translations_init):
14970 Likewise.
14971 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
14972
14973 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
14974 var instead of casting to long, to avoid casts.
14975 (prepare_states): Use MALLOC rather than alloca, so that we don't
14976 have to worry about alloca.
14977 * src/state.c (state_hash_lookup): Likewise.
14978
14979 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
14980 local var instead of casting to unsigned char, to avoid casts.
14981
14982 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
14983 STATE_ALLOC): Remove.
14984 (transitions_new, errs_new, reductions_new, state_new): Use malloc
14985 rather than calloc, and use offsetof to avoid allocating slightly
14986 too much storage.
14987 (state_new): Initialize all members.
14988
14989 * src/state.c (state_hash): Use unsigned accumulator, not signed.
14990
14991 * src/symtab.c (symbol_free): Remove; unused.
14992 (symbol_get): Remove cast in lhs of assignment.
14993 (symbols_do): Now static. Accept generic arguments, not
14994 hashing-related ones.
14995
14996 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
14997 (symbol_processor): Remove.
14998 (symbols_do): Remove decl; now static.
14999
15000 * src/system.h (alloca): Remove; decl no longer needed.
15001 (<stddef.h>): Include, for offsetof.
15002 (<inttypes.>, <stdint.h>): Include if available.
15003 (uintptr_t): New type, if system lacks it.
15004 (CALLOC, MALLOC, REALLOC): New macros.
15005 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
15006 new macros.
15007
15008 * src/tables.c (table_size): Now int, to pacify GCC.
15009 (table_grow, table_ninf_remap): Use signed table size.
15010 (save_row): Don't bother initializing locals when not needed.
15011 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
15012 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
15013
15014 * src/vcg.h: Correct misspellings.
15015
15016 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
15017
15018
15019 * src/getargs.c (getargs): Don't assume EOF == -1.
15020
15021 2002-12-09 Paul Eggert <eggert@twinsun.com>
15022
15023 Change identifier spellings to avoid collisions with names
15024 that are reserved by POSIX.
15025
15026 Don't use names ending in _t, since POSIX reserves them.
15027 For consistency, remove _e and _s endings -- they're weren't
15028 needed to remove ambiguity. All uses changed.
15029 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
15030 turn was just renamed from struniq_t.
15031 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
15032 which in turn was just renamed from struniq_processor_t.
15033 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
15034 in turn was renamed from hash_compare_struniq_t.
15035 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
15036 (state_list): Renamed from state_list_t.
15037 * src/assoc.h (assoc): Renamed from assoc_t.
15038 * src/conflicts.c (enum conflict_resolution): Renamed from
15039 enum conflict_resolution_e.
15040 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
15041 (rule_list): Renamed from rule_list_t.
15042 * src/getargs.h (enum trace): Renamed from enum trace_e.
15043 (enum report): Renamed from enum report_e.
15044 * src/gram.h (item_number): Renamed from item_number_t.
15045 (rule_number): Renamed from rule_number_t.
15046 (struct rule_s): Remove the "rule_s" part; not used.
15047 (rule): Renamed from rule_t.
15048 (rule_filter): Renamed from rule_filter_t.
15049 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
15050 (goto_list): Renamed from goto_list_t.
15051 * src/lalr.h (goto_number): Renamed from goto_number_t.
15052 * src/location.h (location): Renamed from location_t.
15053 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
15054 and moved here from:
15055 * src/muscle_tab.h (muscle_entry_t): here.
15056 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
15057 (rule_list): Renamed from rule_list_t.
15058 * src/print_graph.c (static_graph): Renamed from graph.
15059 * src/reader.h (braced_code): Renamed from braced_code_t.
15060 Remove brace_code_e tag.
15061 * src/relation.h (relation_node): Renamed from relation_node_t.
15062 (relation_nodes): Renamed from relation_nodes_t.
15063 (relation): Renamed from relation_t.
15064 * src/state.h (state_number): Renamed from state_number_t.
15065 (struct state): Renamed from struct state_s.
15066 (state): Renamed from state_t.
15067 (transitions): Renamed from transitions_t. Unused (and
15068 misspelled) transtion_s tag removed.
15069 (errs): Renamed from errs_t. Unused errs_s tag removed.
15070 (reductions): Renamed from reductions_t. Unused tag
15071 reductions_s removed.
15072 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
15073 (struct symbol_list): Renamed from struct symbol_list_s.
15074 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
15075 (struct symbol): Renamed from struct symbol_s.
15076 (symbol): Renamed from symbol_t.
15077 * src/tables.c (vector_number): Renamed from vector_number_t.
15078 (action_number): Renamed from action_t.
15079 * src/tables.h (base_number): Renamed from base_t.
15080 * src/vcg.h (enum color): Renamed from enum color_e.
15081 (enum textmode): Renamed from enum textmode_e.
15082 (enum shape): Renamed from enum shape_e.
15083 (struct colorentry): Renamed from struct colorentry_s.
15084 (struct classname): Renamed from struct classname_s.
15085 (struct infoname): Renamed from struct infoname_s.
15086 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
15087 (enum decision): Renamed from enum decision_e.
15088 (enum orientation): Renamed from enum orientation_e.
15089 (enum alignment): Renamed from enum alignment_e.
15090 (enum arrow_mode): Renamed from enum arrow_mode_e.
15091 (enum crossing_type): Renamed from enum crossing_type_e.
15092 (enum view): Renamed from enum view_e.
15093 (struct node): Renamed from struct node_s.
15094 (node): Renamed from node_t.
15095 (enum linestyle): Renamed from enum linestyle_e.
15096 (enum arrowstyle): Renamed from enum arrowstyle_e.
15097 (struct edge): Renamed from struct edge.
15098 (edge): Renamed from edge_t.
15099 (struct graph): Renamed from struct graph_s.
15100 (graph): Renamed from graph_t.
15101 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15102 Rename value_t -> value.
15103 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15104 value_t_as_yystype -> value_as_yystype.
15105
15106 Don't include <errno.h> in the mainstream code, since it
15107 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15108 * lib/get-errno.c, lib/get-errno.h: New files.
15109 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15110 get-errno.c.
15111 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15112 * src/output.c (output_skeleton): Likewise.
15113 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15114 instead of errno.
15115 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15116 Likewise.
15117 (handle_action_dollar, handle_action_at): Likewise.
15118 * src/system.h: Do not include <errno.h>.
15119 (TAB_EXT): Renamed from EXT_TAB.
15120 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15121
15122 Avoid str[a-z]*, since <string.h> reserves that name space.
15123 Change all instances of "struniq" in names to "uniqstr", and
15124 likewise for "STRUNIQ" and "UNIQSTR".
15125 * src/uniqstr.c: Renamed from src/struniq.c.
15126 * src/uniqstr.h: Renamed from src/struniq.h.
15127 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15128 * src/files.c (strsuffix): Remove; unused.
15129 (concat2): Renamed from stringappend. Now static.
15130 * src/files.h (strsuffix, stringappend): Remove; unused.
15131 * src/parse-gram.y (<chars>): Renamed from <string>.
15132 (<uniqstr>): Renamed from <struniq>.
15133 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15134 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15135 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15136 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15137 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15138 (N_EXPAND): Renamed from N_STRETCH.
15139
15140 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15141 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15142 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15143 Remove; unused.
15144 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15145 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15146 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15147 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15148 (BASE_MAXIMUM): Renamed from BASE_MAX.
15149 (BASE_MINIMUM): Renamed from BASE_MIN.
15150 (ACTION_MAX): Remove; unused.
15151 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15152 Unnecessary casts removed from above defines.
15153
15154
15155 Fix misspelling in names.
15156 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15157 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15158 G_NODE_ALIGNEMENT.
15159
15160
15161 * lib/timevar.c (timevar_report): Renamed from time_report,
15162 for consistency with other names.
15163 * lib/timevar.h (timevar_report): New decl.
15164 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15165
15166
15167 Sort include-file uses.
15168
15169 Reorder all include files under src to be in the order "system.h".
15170 then the ../lib include files in angle brackets (alphabetized),
15171 then the . include files in double-quotes (alphabetized). Fix
15172 dependency breakages encountered in this process, as follows:
15173 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15174 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15175 * src/state.h: Include "symtab.h".
15176
15177 2002-12-08 Paul Eggert <eggert@twinsun.com>
15178
15179 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15180 since this causes problems when __file__ contains character
15181 sequences like "@" that are treated specially by src/scan-skel.l.
15182 Instead, just use the file's basename. This fixes the bug
15183 reported by Martin Mokrejs in
15184 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
15185
15186 2002-12-06 Paul Eggert <eggert@twinsun.com>
15187
15188 Add support for rules that do not have trailing semicolons, as
15189 POSIX requires. Improve the quality of locations in Bison
15190 diagnostics.
15191
15192 * src/location.c: Include <quotearg.h>.
15193 (empty_location): Now const.
15194 (location_print): New function. Follow the recommendation of the
15195 GNU Coding Standards for locations that span file boundaries.
15196 * src/location.h: Do not include <quotearg.h>; no longer needed.
15197 (boundary): New type.
15198 (location_t): Use it. This allows locations to span file boundaries.
15199 All member uses changed: file -> start.file or end.file (as needed),
15200 first_line -> start.line, first_column -> start.column,
15201 last_line -> end.line, last_column -> end.column.
15202 (equal_boundaries): New function.
15203 (LOCATION_RESET, LOCATION_STEP): Remove.
15204 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15205 (empty_location): Now const.
15206 (location_print): New decl.
15207 * src/parse-gram.y (lloc_default): New function, which handles
15208 empty locations more accurately.
15209 (YYLLOC_DEFAULT): Use it.
15210 (%token COLON): Remove.
15211 (%token ID_COLON): New token.
15212 (rules): Use it.
15213 (declarations, rules): Remove trailing semicolon.
15214 (declaration, rules_or_grammar_declaration):
15215 Allow empty (";") declaration.
15216 (symbol_def): Remove empty actions; no longer needed.
15217 (rules_or_grammar_declaration): Remove trailing semicolon.
15218 (semi_colon.opt): Remove.
15219 * src/reader.h: Include location.h.
15220 (scanner_cursor): New decl.
15221 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15222 rolling our own.
15223 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15224 of *loc.
15225 (STEP): Remove. No longer needed, now that adjust_location does
15226 the work. All uses removed.
15227 (scanner_cursor): New var.
15228 (adjust_location): Renamed from extend_location. It now sets
15229 *loc and adjusts the scanner cursor. All uses changed.
15230 Don't bother testing for CR.
15231 (handle_syncline): Remove location arg; now updates scanner cursor.
15232 All callers changed.
15233 (unexpected_end_of_file): Now accepts start boundary of token or
15234 comment, not location. All callers changed. Update scanner cursor,
15235 not the location.
15236 (SC_AFTER_IDENTIFIER): New state.
15237 (context_state): Renamed from c_context. All uses changed.
15238 (id_loc, code_start, token_start): New local vars.
15239 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15240 processing of Yacc white space and equivalents here.
15241 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15242 instead of returning ID immediately, since we need to search for
15243 a subsequent colon.
15244 (<INITIAL>"'", "\""): Save token_start.
15245 (<INITIAL>"%{", "{", "%%"): Save code_start.
15246 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15247 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15248 BEGIN context_state at end, not INITIAL.
15249 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15250 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15251 Return correct token start.
15252 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15253 the start of a character, string or multiline comment is found.
15254 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15255 Reduction): Adjust reported locations to match the more-precise
15256 results now expected.
15257 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15258 * tests/reduce.at (Useless Rules, Reduced Automaton,
15259 Underivable Rules): Likewise.
15260 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15261 or "|"' now that so many other tokens are allowed by the new grammar.
15262
15263 * src/complain.h (current_file): Remove duplicate decl;
15264 current_file is now owned by files.h.
15265 * src/complain.c, src/scan-gram.l: Include files.h.
15266
15267 2002-12-06 Paul Eggert <eggert@twinsun.com>
15268
15269 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15270 promotes to int; it might be unsigned int.
15271 * data/yacc.c (yy_reduce_print): Likewise.
15272
15273 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15274 be #defined in the prologue, not in the Bison declarations.
15275 This fixes Debian Bug 102878, reported by Shaul Karl.
15276
15277 2002-12-02 Paul Eggert <eggert@twinsun.com>
15278
15279 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15280 * lib/strtoul.c: New file, from gnulib.
15281 This fixes a porting bug reported by Peter Klein in
15282 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
15283
15284 2002-11-30 Paul Eggert <eggert@twinsun.com>
15285
15286 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15287 and put only a forward declaration in the prologue. This is for
15288 consistency with the other scanner helper functions.
15289
15290 Type clashes now generate warnings, not errors, since it
15291 appears that POSIX may allow some grammars with type clashes.
15292 * src/reader.c (grammar_current_rule_check): Warn about
15293 type clashes instead of complaining.
15294 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15295
15296 Add Yacc library, since POSIX requires it.
15297 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15298 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15299 * lib/main.c, lib/yyerror.c: New files.
15300
15301 gram_error can be static; it need not be extern.
15302 * src/reader.h (gram_error): Remove decl.
15303 * src/parse-gram.y (gram_error): Now static. Add static decl.
15304 (print_token_value): Omit parameter names from forward decl,
15305 for consistency.
15306
15307 2002-11-29 Paul Eggert <eggert@twinsun.com>
15308
15309 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15310 be declared before being used. E.g., one should typically
15311 declare them in the prologue. Use GNU coding style in examples.
15312 Put "const" consistently after the type it modifies. Mention
15313 that C99 supports "inline". Mention that yyerror traditionally
15314 returns "int".
15315
15316 %parse-param and %lex-param now take just one argument, the
15317 declaration; the argument name is deduced from the declaration.
15318
15319 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15320 Reporting, Table of Symbols): Document this.
15321 * src/parse-gram.y (add_param): New function.
15322 (COMMA): Remove.
15323 (declaration): Implement new rule for %parse-param and %lex-param.
15324 * src/scan-gram.l: "," now elicits a warning, rather than being
15325 a token; this is more compatible with byacc.
15326 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15327
15328 2002-11-27 Paul Eggert <eggert@twinsun.com>
15329
15330 Rename identifiers to avoid real and potential collisions.
15331
15332 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15333 to avoid collision with lex macro described by Bruce Lilly in
15334 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
15335 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15336 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15337 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15338 All uses changed.
15339 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15340 The name "yycontrol" violates the name space rules, and this stuff
15341 wasn't being used anyway.
15342 (input): Remove action; this stuff wasn't being used.
15343 (gram_error): Rename local variable yylloc -> loc.
15344 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15345 (YY_DECL): Don't use "yy" at start of local variables.
15346 All uses changed, e.g., yylloc -> loc.
15347 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15348 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15349 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15350 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15351
15352 * src/parse-gram.y (gram_error): loc is now const *.
15353 * src/reader.h (gram_error): Likewise.
15354
15355 2002-11-24 Paul Eggert <eggert@twinsun.com>
15356
15357 Version 1.75c.
15358
15359 * tests/actions.at (Actions after errors): Use an output format
15360 more similar to that of the Printers and Destructors test.
15361 Test the position of the ';' token too.
15362 (Printers and Destructors): Likewise.
15363 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15364 unnecessarily alarming people when the test fails.
15365
15366 * data/yacc.c (yyerrlab1): Move this label down, so that the
15367 parser does not discard the lookahead token if the user code
15368 invokes YYERROR. This change is required for POSIX conformance.
15369
15370 * lib/error.c: Sync with gnulib.
15371
15372 2002-11-22 Paul Eggert <eggert@twinsun.com>
15373
15374 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15375 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15376 * lib/xmalloc.c: Likewise.
15377
15378 2002-11-20 Paul Eggert <eggert@twinsun.com>
15379
15380 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15381
15382 2002-11-20 Paul Eggert <eggert@twinsun.com>
15383
15384 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15385 should use `if (! x) abort ();' rather than `assert (x);', and
15386 anyway it's one less thing to worry about configuring.
15387
15388 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15389 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15390 and replace all instances of assert with abort.
15391 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15392 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15393
15394 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15395 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15396 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15397 hash_find_entry, hash_rehash, hash_insert): Likewise.
15398 * src/conflicts.c (resolve_sr_conflict): Likewise.
15399 * src/lalr.c (set_goto_map, map_goto): Likewise.
15400 * src/nullable.c (nullable_compute): Likewise.
15401 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15402 * src/reader.c (packgram, reader): Likewise.
15403 * src/state.c (state_new, state_free, state_transitions_set,
15404 state_reduction_find): Likewise.
15405 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15406 symbol_pack): Likewise.
15407 * src/tables.c (conflict_row, pack_vector): Likewise.
15408 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15409 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15410 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15411 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15412
15413 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15414 (ARGMATCH_CONSTRAINT): New macro.
15415 (ARGMATCH_ASSERT): Use it.
15416
15417 * src/system.h (verify): New macro.
15418 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15419 rather than assert.
15420 * src/tables.c (tables_generate): Likewise.
15421
15422 * src/struniq.c (struniq_assert): Now returns void, and aborts
15423 if the assertion is false.
15424 (struniq_assert_p): Remove.
15425 * src/struniq.h: Likewise.
15426
15427 2002-11-18 Paul Eggert <eggert@twinsun.com>
15428
15429 * data/glr.c (yygetLRActions): Replace `yyindex' with
15430 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15431 This fixes the regression with Sun ONE Studio 7 cc that I reported in
15432 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
15433
15434 2002-11-18 Akim Demaille <akim@epita.fr>
15435
15436 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15437 space.
15438 From Tim Van Holder.
15439
15440 2002-11-17 Paul Eggert <eggert@twinsun.com>
15441
15442 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15443 to "SyntaxError" for consistency with my 2002-11-15 change.
15444
15445 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15446 not define to {}, since this breaks the common use of `YYDPRINTF
15447 ((...));' if a single statement is desired (e.g. before `else').
15448 Work around GCC warnings by surrounding corresponding calls with
15449 {} if needed.
15450 (yyhasResolvedValue): Remove unused function.
15451 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15452 loop body.
15453 (yyreportSyntaxError): Renamed from yyreportParseError.
15454 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15455 All uses changed.
15456 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15457 extern when possible. Remove unused initializations.
15458
15459 2002-11-16 Akim Demaille <akim@epita.fr>
15460
15461 Augment the similarity between GLR and LALR traces.
15462
15463 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15464 (YY_REDUCE_PRINT): New.
15465 (yyparse): Use them.
15466 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15467 YYDPRINT here.
15468 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15469 state reached after the reduction/recovery, since...
15470 (yyparse, yyprocessOneStack): Report the state we are entering in.
15471
15472 2002-11-16 Akim Demaille <akim@epita.fr>
15473
15474 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15475 Add support for --trace=skeleton.
15476 * src/scan-skel.l: %option debug.
15477 Scan strings of non-@ or \n instead of character by character.
15478 (scan_skel): Handle trace_skeleton.
15479 (QPUTS): New.
15480 (@output_parser_name@, @output_header_name@): ``Restore'' their
15481 support (used to be M4 macros).
15482 * data/yacc.c: Quote larger chunks, a la glr.c.
15483 * data/lalr1.cc: Likewise.
15484 The header guards are no longer available, so use some other
15485 string than `YYLSP_NEEDED'.
15486
15487 2002-11-16 Akim Demaille <akim@epita.fr>
15488
15489 Make the ``Printers and Destructors'' test more verbose, taking
15490 `yacc.c''s behavior as (possibly wrong) reference.
15491
15492 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15493 instead of fprint on stdout.
15494 Set and report the last_line of the symbols.
15495 Consistently display values and locations.
15496
15497 2002-11-16 Paul Eggert <eggert@twinsun.com>
15498
15499 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15500
15501 2002-11-15 Paul Eggert <eggert@twinsun.com>
15502
15503 * tests/actions.at (Actions after errors): New test case.
15504
15505 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15506 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15507 tests/action.at, tests/calc.at, tests/conflicts.at,
15508 tests/cxx-type.at, tests/regression.at:
15509 "parse error" -> "syntax error" for POSIX compatibility.
15510 "parsing stack overflow..." -> "parser stack overflow" so
15511 that code matches Bison documentation.
15512
15513 2002-11-15 Akim Demaille <akim@epita.fr>
15514
15515 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15516 take two BRACED_CODE, not two string_content.
15517 Free the scanner's obstack when we are done.
15518 (code_content): New.
15519 * tests/calc.at: Adjust.
15520 * doc/bison.texinfo: Adjust.
15521 Also, make sure to include the `,' for these declarations.
15522
15523 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15524
15525 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15526 definition; avoids potential autoreconf problems.
15527
15528 2002-11-15 Akim Demaille <akim@epita.fr>
15529
15530 Always check the value returned by yyparse.
15531
15532 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15533 returned by yyparse.
15534 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15535 Adjust calls.
15536 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15537 returned by yyparse.
15538
15539 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15540
15541 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
15542 on input.at test.
15543
15544 2002-11-14 Paul Eggert <eggert@twinsun.com>
15545
15546 * src/output.c (output_skeleton): Call xfopen instead of
15547 duplicating xfopen's body.
15548
15549 Fix bugs reported by Nelson H. F. Beebe in
15550 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
15551
15552 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
15553 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
15554 Group compiler. Instead, use "$CC -E bar.c". Include the .h
15555 file twice in the grammar, as an extra check.
15556
15557 * tests/input.at (Torturing the Scanner): Surround the
15558 backslash-newline tests with "#if 0", to make it less likely that
15559 we'll run into compiler bugs. Bring back solitary \ inside
15560 comment, but add a closing comment to work around HP C bug. Don't
15561 test backslash-newline in C character constant.
15562
15563 2002-11-14 Akim Demaille <akim@epita.fr>
15564
15565 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
15566 status of the compiler.
15567 Calling `exit 1' is no longer needed.
15568 Reported by Nelson H. F. Beebe.
15569
15570 2002-11-14 Akim Demaille <akim@epita.fr>
15571
15572 * tests/atlocal.in (CPPFLAGS): We have config.h.
15573 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
15574 New.
15575 * tests/actions.at, tests/calc.at, tests/conflicts.at,
15576 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
15577 * tests/regression.at, tests/torture.at: Use them for all the
15578 grammars that are to be compiled.
15579 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
15580 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
15581 * doc/bison.texinfo (GLR Parsers): Document `inline'.
15582
15583 2002-11-14 Akim Demaille <akim@epita.fr>
15584
15585 * doc/bison.texinfo: Various formatting changes (alignments in
15586 samples, additional @group/@end group, GCS in samples.
15587 Use @deffn instead of simple @table to define the directives,
15588 macros, variables etc.
15589
15590 2002-11-13 Paul Eggert <eggert@twinsun.com>
15591
15592 Fix some bugs reported by Albert Chin-A-Young in
15593 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
15594
15595 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
15596 -o c"; the HP C compiler chatters during compilation.
15597 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
15598 * tests/headers.at (export YYLTYPE): Likewise.
15599
15600 * tests/input.at (Torturing the Scanner): Remove lines containing
15601 solitary backslashes, as they tickle a bug in the HP C compiler.
15602
15603 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
15604 comments, since they're not portable. Use GNU coding style.
15605
15606 2002-11-13 Akim Demaille <akim@epita.fr>
15607
15608 * data/yacc.c: Leave bigger chunks of quoted text.
15609 (YYDSYMPRINTF): New.
15610 Use it to report symbol activities.
15611 * data/glr.c (YYDSYMPRINTF): New.
15612 Use it.
15613
15614 2002-11-12 Paul Eggert <eggert@twinsun.com>
15615
15616 Version 1.75b.
15617
15618 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
15619 (yyglrReduce): Return yyok, not 0.
15620 This should avoid the enumerated-type warnings reported
15621 by Nelson H. F. Beebe in
15622 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
15623
15624 * lib/bbitset.h (BITSET_INLINE): Remove.
15625 * lib/bitset.h [! BITSET_INLINE]: Remove.
15626 (bitset_set, bitset_reset, bitset_test): Rename local vars
15627 to avoid shadowing warnings by GCC.
15628
15629 * data/glr.c (inline): Remove #define. It's the user's
15630 responsibility to #define it away, just like 'const'.
15631 This fixes one of the bugs reported by Nelson H. F. Beebe in
15632 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
15633
15634 * Makefile.maint (po-check): Scan .l and .y files instead of the
15635 .c and the .h files that they generate. This fixes the bug
15636 reported by Tim Van Holder in:
15637 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
15638 Look for N_ as well as for _. Try to avoid matching #define for
15639 N_ and _.
15640 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
15641 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
15642 * src/scan-gram.l: Revamp regular expressions so that " and '
15643 do not confuse xgettext.
15644
15645 * src/struniq.h (struniq_new): Do not declare the return type
15646 to be 'const'; this violates the C standard.
15647 * src/struniq.c (struniq_new): Likewise.
15648
15649 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
15650
15651 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
15652 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
15653 linker.
15654
15655 2002-11-12 Akim Demaille <akim@epita.fr>
15656
15657 * Makefile.maint: Sync with Autoconf:
15658 (local_updates): New.
15659
15660 2002-11-12 Akim Demaille <akim@epita.fr>
15661
15662 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
15663
15664 2002-11-12 Akim Demaille <akim@epita.fr>
15665
15666 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
15667 locations.
15668
15669 2002-11-12 Akim Demaille <akim@epita.fr>
15670
15671 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
15672 not yyvalue.
15673
15674 2002-11-12 Akim Demaille <akim@epita.fr>
15675
15676 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
15677 Use it to test the GLR parser.
15678
15679 2002-11-12 Akim Demaille <akim@epita.fr>
15680
15681 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
15682 defines it.
15683 * data/glr.c (yystos): New.
15684 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
15685 (YYDSYMPRINT): New.
15686 (yyval): Don't define it, it is handled via M4.
15687 (yyrecoverParseError): Free verbosely the discarded symbols.
15688 * data/yacc.c (yysymprint): Remove, rather...
15689 (b4_yysymprint_generate): invoke.
15690 * data/c.m4 (b4_yysymprint_generate): New.
15691 Accept pointers as arguments, as opposed to the version from
15692 yacc.c.
15693 (b4_yydestruct_generate): Likewise.
15694 * tests/cations.at (Printers and Destructors): Use Bison directives
15695 instead of CPP macros.
15696 Don't rely on internal details.
15697
15698 2002-11-12 Akim Demaille <akim@epita.fr>
15699
15700 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
15701 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
15702 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
15703 it against YYEMPTY and so forth), work on yytoken (i.e., set
15704 it to YYEMPTY etc.).
15705 (yydestruct): Replace with a b4_yydestruct_generate invocation.
15706 (b4_symbol_actions): Remove.
15707 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
15708 for 0, end-of-input.
15709
15710 2002-11-12 Akim Demaille <akim@epita.fr>
15711
15712 * doc/bison.texinfo (Destructor Decl): New.
15713
15714 2002-11-12 Akim Demaille <akim@epita.fr>
15715
15716 * src/tables.c (tables_generate): Use free for pointers that
15717 cannot be NULL, not XFREE.
15718 (pack_vector): Use assert, not fatal, for bound violations.
15719 * src/state.c (state_new): Likewise.
15720 * src/reader.c (reader): Likewise.
15721 * src/lalr.c (set_goto_map): Likewise.
15722 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
15723 the file name.
15724
15725 2002-11-12 Akim Demaille <akim@epita.fr>
15726
15727 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
15728 Restore.
15729 * src/scan-gram.l (last_string): Is global to the file, not to
15730 yylex.
15731 * src/parse-gram.y (input): Don't append the epilogue here,
15732 (epilogue.opt): do it here, and free the scanner's obstack.
15733 * src/reader.c (epilogue_set): Rename as...
15734 (epilogue_augment): this.
15735 * data/c.m4 (b4_epilogue): Defaults to empty.
15736
15737 2002-11-12 Akim Demaille <akim@epita.fr>
15738
15739 * src/getargs.c (long_options): Remove duplicates.
15740 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
15741 Remove.
15742 * doc/bison.rnh: Remove.
15743 * doc/bison.texinfo (VMS Invocation): Remove.
15744
15745 2002-11-12 Akim Demaille <akim@epita.fr>
15746
15747 * src/struniq.h, src/struniq.c (struniq_t): Is const.
15748 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
15749
15750 Use struniq for symbols.
15751
15752 * src/symtab.h (symbol_t): The tag member is a struniq.
15753 (symbol_type_set): Adjust.
15754 * src/symtab.c (symbol_new): Takes a struniq.
15755 (symbol_free): Don't free the tag member.
15756 (hash_compare_symbol_t, hash_symbol_t): Rename as...
15757 (hash_compare_symbol, hash_symbol): these.
15758 Use the fact that tags as struniqs.
15759 (symbol_get): Use struniq_new.
15760 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
15761 Returns a strniq.
15762 * src/reader.h (merger_list, grammar_currentmerge_set): The name
15763 and type members are struniqs.
15764 * src/reader.c (get_merge_function)
15765 (grammar_current_rule_merge_set): Adjust.
15766 (TYPE, current_type): Are struniq.
15767
15768 Use struniq for file names.
15769
15770 * src/files.h, src/files.c (infile): Split into...
15771 (grammar_file, current_file): these.
15772 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
15773 * src/reduce.c (reduce_print): Likewise.
15774 * src/getargs.c (getargs): Likewise.
15775 * src/complain.h, src/complain.c: Likewise.
15776 * src/main.c (main): Call struniqs_new early enough to use it for
15777 file names.
15778 Don't free the input file name.
15779
15780 2002-11-12 Akim Demaille <akim@epita.fr>
15781
15782 * src/symtab.c (symbol_free): Remove dead deactivated code:
15783 type_name are properly removed.
15784 Don't use XFREE to free items that cannot be NULL.
15785 * src/struniq.h, src/struniq.c: New.
15786 * src/main.c (main): Initialize/free struniqs.
15787 * src/parse-gram.y (%union): Add astruniq member.
15788 (yyprint): Adjust.
15789 * src/scan-gram.l (<{tag}>): Return a struniq.
15790 Free the obstack bit that used to store it.
15791 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
15792
15793 2002-11-11 Paul Eggert <eggert@twinsun.com>
15794
15795 Revamp to fix many (but not all) of the C- and M4-related quoting
15796 problems. Among other things, this fixes the Bison bug reported
15797 by Jan Hubicka when processing the Bash grammar; see:
15798 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
15799
15800 Use new @ escapes consistently. Represent brackets with @{ and @}
15801 rather than @<:@ and @:>@, since this works a bit better with dumb
15802 editors like vi. Represent @ with @@, since @ is now consistently
15803 an escape. Use @oline@ and @ofile@ rather than __oline__ and
15804 __ofile__, to avoid unexpected expansions. Similarly, use @output
15805 rather than #output.
15806
15807 * data/c.m4 (b4_copyright): Omit file name from comment, since
15808 the file name could contain "*/".
15809 (b4_synclines_flag): Don't quote the 2nd argument; it should already
15810 be quoted. All uses changed.
15811
15812 * data/glr.c: Use new @ escapes consistently.
15813 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
15814 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
15815 Remove, since they couldn't handle arbitrary characters in file
15816 names.
15817 * data/lalr1.cc: Likewise.
15818 * data/yacc.c: Likewise.
15819
15820 * src/files.c (output_infix): Remove; all uses removed.
15821 * src/files.h: Likewise.
15822
15823 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
15824 mishandled funny characters in file names, and anyway it isn't
15825 needed any more.
15826 * data/yacc.c: Likewise.
15827 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
15828
15829 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
15830 * data/yacc.c: Likewise.
15831
15832 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
15833 strings now.
15834 (muscle_init): Quote filename as a C string.
15835 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
15836 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
15837 * src/output.c (escaped_file_name_output): New function.
15838 (prepare_symbols): Quote tokens for M4.
15839 (prepare): Don't insert output_infix, output_prefix,
15840 output_parser_name, output_header_name; this is now down by scan-skel.
15841 Insert skeleton as a C string.
15842
15843 * src/output.c (user_actions_output, symbol_destructors_output,
15844 symbol_printers_output): Quote filenames for C and M4.
15845 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15846
15847 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
15848 escapes other than \\ and \'; this simplifies the code.
15849 (<SC_STRING>): Likewise, for \\ and \".
15850 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
15851 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
15852 Use new escapes @{ and @} for [ and ].
15853
15854 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
15855 them with auto vars.
15856 Switch to new escape scheme, where @ is the escape character uniformly.
15857 Abort if a stray escape character is found. Avoid unbounded input
15858 buffer when parsing non-escaped text.
15859
15860 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
15861 __oline__, #output, $@, and @{ do not have unintended meanings.
15862
15863 2002-11-09 Paul Eggert <eggert@twinsun.com>
15864
15865 Fix the test failure due to GCC warnings described in
15866 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
15867 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
15868 evaluate to 0 if it's impossible for NINF to be in the respective
15869 table.
15870 (yygetLRActions, yyrecoverParseError): Use them.
15871
15872 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
15873 counted in the token inserted at end of file. Now takes
15874 location_t *, not location_t, so that the location can be
15875 adjusted. All uses changed.
15876
15877 * tests/regression.at (Invalid inputs): Adjust wording in
15878 diagnostic to match the new behavior.
15879
15880 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
15881 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
15882 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
15883 abort ();'. This reduces the runtime of the "Many lookaheads"
15884 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
15885 GCC 3.2.
15886
15887 2002-11-07 Paul Eggert <eggert@twinsun.com>
15888
15889 * src/parse-gram.y (CHARACTER): Remove unused token.
15890 All uses removed.
15891
15892 * src/scan-gram.l: Remove stack option. We no longer use the
15893 stack, since the stack was never deeper than 1; instead, use the
15894 new auto var c_context to record the stacked value.
15895
15896 Remove nounput option. At an unexpected end of file, we now unput
15897 the minimal input necessary to end cleanly; this simplifies the
15898 code.
15899
15900 Avoid unbounded token sizes where this is easy.
15901
15902 (unexpected_end_of_file): New function.
15903 Use it to systematize the error message on unexpected EOF.
15904 (last-string): Now auto, not static.
15905 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
15906 (scanner_last_string_free): Remove; not used.
15907 (percent_percent_count): Move decl to just before use.
15908 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
15909 not the (never otherwised-used) CHARACTER.
15910
15911 2002-11-07 Akim Demaille <akim@epita.fr>
15912
15913 Let yyerror always receive the msg as last argument, so that
15914 yyerror can be variadic.
15915
15916 * data/yacc.c (b4_yyerror_args): New.
15917 Use it when calling yyerror.
15918 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
15919 Use it when calling yyerror.
15920 * doc/bison.texinfo (Error Reporting): Adjust.
15921 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
15922 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
15923
15924 2002-11-06 Akim Demaille <akim@epita.fr>
15925
15926 #line should have quoted strings.
15927 Ideally, this should be done by m4_quotearg.
15928
15929 * src/scan-skel.l: Include quotearg.h.
15930 Quote __ofile__.
15931 * src/output.c (symbol_printers_output)
15932 (symbol_destructors_output): Quote the file name.
15933
15934 2002-11-06 Akim Demaille <akim@epita.fr>
15935
15936 * tests/regression.at (Invalid inputs): Adjust to the recent
15937 messages.
15938
15939 2002-11-06 Akim Demaille <akim@epita.fr>
15940
15941 Restore --no-lines.
15942 Reported by Jim Kent.
15943
15944 * data/c.m4 (b4_syncline): New.
15945 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
15946 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
15947 * src/output.c (user_actions_output): Likewise.
15948 (prepare): Define 'b4_synclines_flag'.
15949 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
15950
15951 2002-11-06 Akim Demaille <akim@epita.fr>
15952
15953 * src/main.c (main): Free `infile'.
15954 * src/scan-gram.l (handle_syncline): New.
15955 Recognize `#line'.
15956 * src/output.c (user_actions_output, symbol_destructors_output)
15957 (symbol_printers_output): Use the location's file name, not
15958 infile.
15959 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15960
15961 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15962
15963 * src/tables.c (matching_state): Don't allow states to match if
15964 either has GLR conflict entries.
15965
15966 2002-11-05 Paul Eggert <eggert@twinsun.com>
15967
15968 * src/scan-gram.l: Use more accurate diagnostics, e.g.
15969 "integer out of range" rather than "invalid value".
15970 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
15971 accordingly.
15972
15973 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
15974 Also, remove one static variable in the scanner.
15975
15976 * src/scan-gram.l (braces_level): Now auto, not static.
15977 Initialize to zero if the compiler is being picky.
15978 (INITIAL): Clear braces_level instead of incrementing it.
15979 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
15980 as POSIX 1003.1-2001 requires.
15981 * src/system.h (IF_LINT): New macro, taken from coreutils.
15982 * configure.ac: Define "lint" if --enable-gcc-warnings.
15983
15984 2002-11-05 Akim Demaille <akim@epita.fr>
15985
15986 * src/scan-gram.l: When it starts with `%', complain about the
15987 whole directive, not just that `invalid character: %'.
15988
15989 2002-11-04 Akim Demaille <akim@epita.fr>
15990
15991 * Makefile.maint: Update from Autoconf.
15992 (update, cvs-update, po-update, do-po-update): New.
15993
15994 2002-11-04 Akim Demaille <akim@epita.fr>
15995
15996 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
15997 and yyerror.
15998 Have yyerror `use' its arguments.
15999 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
16000 returns true when location & yacc & pure & parse-param.
16001 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
16002
16003 2002-11-04 Akim Demaille <akim@epita.fr>
16004
16005 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
16006 clashes.
16007 * src/scan-gram.l: Use [\'] instead of ['] to pacify
16008 font-lock-mode.
16009 Use complain_at.
16010 Use quote, not quote_n since LOCATION_PRINT no longer uses the
16011 slot 0.
16012
16013 2002-11-03 Paul Eggert <eggert@twinsun.com>
16014
16015 * src/reader.c (get_merge_function, grammar_current_rule_check):
16016 Use consistent diagnostics for reporting type name clashes.
16017 Quote the types with <>, for consistency with Yacc.
16018 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
16019
16020 2002-11-03 Akim Demaille <akim@epita.fr>
16021
16022 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
16023 New.
16024 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
16025 (b4_parse_param): Remove.
16026 Use b4_identification.
16027 Propagate b4_pure_args where needed to pass them to yyerror.
16028 * data/glr.m4 (b4_parse_param): Remove.
16029 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
16030 (b4_lpure_formals): New.
16031 Use b4_identification.
16032 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
16033 b4_user_formals and b4_user_args.
16034 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
16035 (yyreportAmbiguity): When using a pure parser, also need
16036 the location, and the parse-params.
16037 Adjust callers.
16038 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
16039 When using a pure parser, also need the parse-params.
16040 Adjust callers.
16041 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
16042 (%pure-parser + %parse-param) LALR and GLR parsers.
16043 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
16044 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
16045 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
16046 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
16047 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
16048 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
16049 * doc/bison.texinfo: Untabify the whole file.
16050 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
16051 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
16052 (Error Reporting): Adjust to these new directives.
16053 Document %error-verbose, deprecate YYERROR_VERBOSE.
16054
16055 2002-11-03 Akim Demaille <akim@epita.fr>
16056
16057 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
16058 AT_CHECK_CALC_GLR invocations to use % directives, instead of
16059 command line options.
16060 * tests/cxx-type.at: Formatting changes.
16061
16062 2002-11-03 Paul Eggert <eggert@twinsun.com>
16063
16064 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
16065 to count columns correctly, and to check for invalid inputs.
16066
16067 Use mbsnwidth to count columns correctly. Account for tabs, too.
16068 Include mbswidth.h.
16069 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
16070 (extend_location): New function.
16071 (YY_LINES): Remove.
16072
16073 Handle CRLF in C code rather than in Lex code.
16074 (YY_INPUT): New macro.
16075 (no_cr_read): New function.
16076
16077 Scan UCNs, even though we don't fully handle them yet.
16078 (convert_ucn_to_byte): New function.
16079
16080 Handle backslash-newline correctly in C code.
16081 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
16082 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
16083 all uses changed.
16084 (tag, splice): New EREs. Do not allow NUL or newline in tags.
16085 Use {splice} wherever C allows backslash-newline.
16086 YY_STEP after space, newline, vertical-tab.
16087 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
16088
16089 (letter, id): Don't assume ASCII; e.g., spell out a-z.
16090
16091 ({int}, handle_action_dollar, handle_action_at): Check for integer
16092 overflow.
16093
16094 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16095
16096 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16097 as well as \000. Check for UCHAR_MAX, not 255.
16098 Allow \x with an arbitrary positive number of digits, as in C.
16099 Check for overflow here.
16100 Allow \? and UCNs, for compatibility with C.
16101
16102 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16103 with quote slot used by complain_at.
16104
16105 * tests/input.at: Add tests for backslash-newline, m4 quotes
16106 in symbols, long literals, and funny escapes in strings.
16107
16108 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16109 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16110 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16111 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16112 * m4/mbswidth.m4: New file, from GNU coreutils.
16113
16114 * doc/bison.texinfo (Grammar Outline): Document // comments.
16115 (Symbols): Document that trigraphs have no special meaning in Bison,
16116 nor is backslash-newline allowed.
16117 (Actions): Document that trigraphs have no special meaning.
16118
16119 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16120 no longer used.
16121
16122 2002-11-02 Paul Eggert <eggert@twinsun.com>
16123
16124 * src/reader.c: Don't include quote.h; not needed.
16125 (get_merge_function): Reword warning to be consistent with
16126 type clash diagnostic in grammar_current_rule_check.
16127
16128 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16129 bug in trigraph handling.
16130
16131 * src/output.c (prepare_symbols): When printing token names,
16132 escape "[" as "@<:@" and likewise for "]".
16133
16134 * src/system.h (errno): Remove declaration, as we are now
16135 assuming C89 or better, and C89 guarantees errno.
16136
16137 2002-10-30 Paul Eggert <eggert@twinsun.com>
16138
16139 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16140 Check for close failures.
16141 * src/files.h (xfclose): Return void, not int, since it always
16142 returned zero.
16143 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16144 indicates one.
16145 * src/output.c (output_skeleton): Use xfclose rather than fclose
16146 and ferror. xfclose now checks ferror.
16147
16148 * data/glr.c (YYLEFTMOST_STATE): Remove.
16149 (yyreportTree): Use a stack-based leftmost state. This avoids
16150 our continuing battles with bogus warnings about initializers.
16151
16152 2002-10-30 Akim Demaille <akim@epita.fr>
16153
16154 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16155 #if.
16156
16157 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16158
16159 * tests/glr-regr1.at: New test for reported regressions.
16160 * tests/testsuite.at: Add glr-regr1.at test.
16161 * tests/Makefile.am: Add glr-regr1.at test.
16162
16163 2002-10-24 Paul Eggert <eggert@twinsun.com>
16164
16165 Version 1.75a.
16166
16167 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16168 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16169 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16170 Don't assume strdup exists; POSIX says its an XSI extension.
16171 Check for buffer overflow on input.
16172
16173 2002-10-24 Akim Demaille <akim@epita.fr>
16174
16175 * src/output.c (output_skeleton): Don't disable M4sugar comments
16176 too soon: it results in comments being expanded.
16177 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16178 first output.
16179
16180 2002-10-24 Akim Demaille <akim@epita.fr>
16181
16182 * data/yacc.c (m4_int_type): New.
16183 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16184 char' as only yacc.c wants K&R portability.
16185 * data/glr.c (yysigned_char): Remove.
16186 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16187 Reported by Quoc Peyrot.
16188
16189 2002-10-23 Paul Eggert <eggert@twinsun.com>
16190
16191 * src/main.c (main): With --trace=time, report times even if a
16192 non-fatal error occurs. Formerly, the times were reported in some
16193 such cases but not in others.
16194 * src/reader.c (reader): Just return if a complaint has been issued,
16195 instead of exiting, so that 'main' can report times.
16196
16197 2002-10-22 Akim Demaille <akim@epita.fr>
16198
16199 * src/system.h: Include sys/types.
16200 Reported by Bert Deknuydt.
16201
16202 2002-10-23 Paul Eggert <eggert@twinsun.com>
16203
16204 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16205 Suggested by Art Haas.
16206
16207 2002-10-22 Paul Eggert <eggert@twinsun.com>
16208
16209 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16210 decl; not needed any more.
16211 * src/main.c (main): Use return to exit, undoing yesterday's change.
16212 The last OS that we could find where this wouldn't work is
16213 SunOS 3.5, and that's too old to worry about now.
16214
16215 * data/glr.c (struct yyltype): Define members even when not
16216 doing locations. This is more consistent with yacc.c, and it
16217 works around the following bug reports:
16218 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16219 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
16220
16221 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16222 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16223 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16224
16225 2002-10-22 Akim Demaille <akim@epita.fr>
16226
16227 * data/README: New.
16228
16229 2002-10-21 Paul Eggert <eggert@twinsun.com>
16230
16231 Be consistent about 'bool'; the old code used an enum in one
16232 module and an int in another, and this violates the C standard.
16233 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16234 * configure.ac (AC_HEADER_STDBOOL): Add.
16235 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16236 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16237 * src/symtab.c (hash_compare_symbol_t): Likewise.
16238 * src/system.h (bool, false, true): Use a definition consistent
16239 with ../lib/hash.c. All uses changed.
16240
16241 * src/complain.c (warning_issued): Renamed from warn_message_count,
16242 so that we needn't worry about integer overflow (!).
16243 Now of type bool. All uses changed.
16244 (complaint_issued): Renamed from complain_message_count; likewise.
16245
16246 * src/main.c (main): Use exit to exit with failure.
16247
16248 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16249 rather than 1 and 0.
16250 * src/main.c (main): Likewise.
16251 * src/getargs.c (getargs): Likewise.
16252 * src/reader.c (reader): Likewise.
16253
16254 * src/getarg.c (getargs): Remove duplicate code for
16255 "Try `bison --help'".
16256
16257 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16258 What was that "2" for?
16259
16260 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16261 * src/getargs.c (usage): Likewise.
16262
16263 * src/getargs.c (getargs): When there are too few operands, report
16264 the last one. When there are too many, report the first extra
16265 one. This is how diffutils does it.
16266
16267 2002-10-20 Paul Eggert <eggert@twinsun.com>
16268
16269 Remove K&R vestiges.
16270 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16271 * src/complain.c (VA_START): Remove. Assume prototypes.
16272 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16273 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16274 fatal): Assume prototypes.
16275 * src/complain.h: Assume prototypes.
16276 * src/system.h (PARAMS): Remove.
16277 Include <limits.h> unconditionally, since it's guaranteeed even
16278 for a freestanding C89 compiler.
16279 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16280 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
16281
16282 2002-10-20 Akim Demaille <akim@epita.fr>
16283
16284 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16285 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16286 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16287 (yyresolveStates, yyresolveAction, yyresolveStack)
16288 (yyprocessOneStack): Use them.
16289 (yy_reduce_print): New.
16290 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16291
16292 2002-10-20 Akim Demaille <akim@epita.fr>
16293
16294 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16295 arguments and output `void'.
16296 (b4_c_function): Rename as...
16297 (b4_c_function_def): this.
16298 (b4_c_function_decl, b4_c_ansi_function_def)
16299 (b4_c_ansi_function_decl): New.
16300 Change the interpretation of the arguments: before `int, foo', now
16301 `int foo, foo'.
16302 * data/yacc.c (yyparse): Prototype and define thanks to these.
16303 Adjust b4_c_function_def uses.
16304 * data/glr.c (yyparse): Likewise, but ANSI only.
16305
16306 2002-10-20 Akim Demaille <akim@epita.fr>
16307
16308 * src/output.c (prepare): Move the definition of `tokens_number',
16309 `nterms_number', `undef_token_number', `user_token_number_max'
16310 to...
16311 (prepare_tokens): Here.
16312 (prepare_tokens): Rename as...
16313 (prepare_symbols): this.
16314 (prepare): Move the definition of `rules_number' to...
16315 (prepare_rules): here.
16316 (prepare): Move the definition of `last', `final_state_number',
16317 `states_number' to...
16318 (prepare_states): here.
16319 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16320
16321 2002-10-20 Akim Demaille <akim@epita.fr>
16322
16323 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16324
16325 2002-10-20 Akim Demaille <akim@epita.fr>
16326
16327 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16328 * data/c.m4: here.
16329
16330 2002-10-20 Akim Demaille <akim@epita.fr>
16331
16332 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16333 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16334 `pair'.
16335 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16336 `name' to...
16337 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16338 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16339 These.
16340
16341 2002-10-19 Paul Eggert <eggert@twinsun.com>
16342
16343 Do not create a temporary file, as that involves security and
16344 cleanup headaches. Instead, use a pair of pipes.
16345 Derived from a suggestion by Florian Krohm.
16346 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16347 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16348 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16349 (BISON_PREREQ_SUBPIPE): Add.
16350 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16351 Add subpipe.h, subpipe.c.
16352 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16353 * po/POTFILES.in: Add lib/subpipe.c.
16354 * src/output.c: Include "subpipe.h".
16355 (m4_invoke): Remove decl.
16356 (scan_skel): New decl.
16357 (output_skeleton): Use pipe rather than temporary file for m4 input.
16358 Check that m4sugar.m4 is readable, to avoid deadlock.
16359 Check for pipe I/O error.
16360 * src/scan-skel.l (readpipe): Remove decl.
16361 (scan_skel): New function, to be used in place of m4_invoke.
16362 Read from stream rather than file.
16363
16364 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16365 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16366 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16367 this generates a more-accurate value anyway.
16368
16369 * lib/timevar.c (timervar_accumulate): Rename locals to
16370 avoid confusion with similarly-named more-global.
16371 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16372
16373 * src/output.c (prepare): Use xstrdup to convert char const *
16374 to char *, to avoid GCC warning.
16375
16376 2002-10-19 Akim Demaille <akim@epita.fr>
16377
16378 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16379 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16380 Use them to have `calc.y' ready for %pure-parser.
16381 * data/yacc.c (YYLEX): Pass a yylex return type to
16382 b4_c_function_call.
16383
16384 2002-10-19 Akim Demaille <akim@epita.fr>
16385
16386 Prototype support of %lex-param and %parse-param.
16387
16388 * src/parse-gram.y: Add the definition of the %lex-param and
16389 %parse-param tokens, plus their rules.
16390 Drop the `_' version of %glr-parser.
16391 Add the "," token.
16392 * src/scan-gram.l (INITIAL): Scan them.
16393 * src/muscle_tab.c: Comment changes.
16394 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16395 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16396 (muscle_entry_s): The `value' member is no longer const.
16397 Adjust all dependencies.
16398 * src/muscle_tab.c (muscle_init): Adjust: use
16399 MUSCLE_INSERT_STRING.
16400 Initialize the obstack earlier.
16401 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16402 (muscle_pair_list_grow): New.
16403 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16404 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16405 * tests/calc.at: Use %locations, not --locations.
16406 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16407
16408 2002-10-19 Akim Demaille <akim@epita.fr>
16409
16410 * src/getargs.c (usage): Take status as argument and exit
16411 accordingly.
16412 Report the traditional `Try ... --help' message when status != 0.
16413 (usage, version): Don't take a FILE * as arg, it is pointless.
16414 (getargs): When there is an incorrect number of arguments, make it
16415 an error, and report it GNUlically thanks to `usage ()'.
16416
16417 2002-10-18 Paul Eggert <eggert@twinsun.com>
16418
16419 * data/glr.c (yyreportParseError): Don't assume that sprintf
16420 yields the length of the printed string, as this is not true
16421 on SunOS 4.1.4. Reported by Peter Klein.
16422
16423 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16424 * tests/conflicts.at (%nonassoc and eof): Likewise.
16425 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16426
16427 2002-10-17 Akim Demaille <akim@epita.fr>
16428
16429 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16430 * src/getargs.c (trace_types, trace_args): Adjust.
16431 * src/reader.c (grammar_current_rule_prec_set)
16432 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16433 Standardize error messages.
16434 And s/@prec/%prec/!
16435 (reader): Use trace_flag to enable scanner/parser debugging,
16436 instead of an adhoc scheme.
16437 * src/scan-gram.l: Remove trailing debugging code.
16438
16439 2002-10-16 Paul Eggert <eggert@twinsun.com>
16440
16441 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16442 MUSCLE_TAB_H.
16443
16444 * NEWS: Officially drop support for building Bison with K&R C,
16445 since it didn't work anyway and it's not worth worrying about.
16446 * Makefile.maint (wget_files): Remove ansi2knr.c.
16447 (ansi2knr.c-url_prefix): Remove.
16448 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16449 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16450 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16451
16452 2002-10-15 Paul Eggert <eggert@twinsun.com>
16453
16454 Stop using the "enum_" trick for K&R-style function definitions;
16455 it confused me, and I was the author! Instead, assume that people
16456 who want to use K&R C compilers (when using these modules in GCC,
16457 perhaps?) will run ansi2knr.
16458
16459 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16460 All uses of "enum_" changed to "enum ".
16461 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16462 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16463
16464 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16465 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16466 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16467 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16468 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16469 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16470 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16471 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16472 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16473 Use function prototypes; this removes the need for declaring
16474 static functions simply to provide their prototypes.
16475 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16476 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16477 bitset_count_, bitset_create, bitset_dump, bitset_first,
16478 bitset_free, bitset_init, bitset_last, bitset_next,
16479 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16480 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16481 bitset_print, bitset_release_memory, bitset_toggle_,
16482 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16483 debug_bitset): Likewise.
16484 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16485 * lib/bitset_stats.c (bitset_log_histogram_print,
16486 bitset_percent_histogram_print, bitset_stats_and,
16487 bitset_stats_and_cmp, bitset_stats_and_or,
16488 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16489 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16490 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16491 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16492 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16493 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16494 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16495 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16496 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16497 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16498 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16499 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16500 bitset_stats_zero): Likewise.
16501 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16502 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16503 bitsetv_dump, debug_bitsetv): Likewise.
16504 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16505 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16506 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16507 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16508 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16509 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16510 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16511 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16512 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16513 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16514 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16515 Likewise.
16516 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16517 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16518 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16519 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16520 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16521 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16522 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16523 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16524 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16525 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16526 lbitset_xor_cmp, lbitset_zero): Likewise.
16527
16528 2002-10-14 Akim Demaille <akim@epita.fr>
16529
16530 Version 1.75.
16531
16532 2002-10-14 Akim Demaille <akim@epita.fr>
16533
16534 * tests/Makefile.am (maintainer-check-posix): New.
16535
16536 2002-10-14 Akim Demaille <akim@epita.fr>
16537
16538 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
16539 member.
16540
16541 2002-10-14 Akim Demaille <akim@epita.fr>
16542
16543 * src/tables.c (table_ninf_remap): base -> tab.
16544 Reported by Matt Rosing.
16545
16546 2002-10-14 Paul Eggert <eggert@twinsun.com>
16547
16548 * tests/action.at, tests/calc.at, tests/conflicts.at,
16549 tests/cxx-type.at, tests/headers.at, tests/input.at,
16550 tests/regression.at, tests/synclines.at, tests/torture.at:
16551 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
16552 so that the tests still work even if POSIXLY_CORRECT is set.
16553 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
16554
16555 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
16556 for portability to K&R hosts. Fix typo: signed char is guaranteed
16557 only to 127, not to 128.
16558 * data/glr.c (yysigned_char): New type.
16559 * data/yacc.c (yysigned_char): Likewise.
16560 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
16561
16562 2002-10-13 Paul Eggert <eggert@twinsun.com>
16563
16564 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
16565 true due to limited range of data type" warning from GCC.
16566
16567 * data/c.m4 (b4_token_defines): Protect against double-inclusion
16568 by wrapping enum yytokentype's definition inside #ifndef
16569 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
16570
16571 2002-10-13 Akim Demaille <akim@epita.fr>
16572
16573 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
16574 Un yy- yyrhs to avoid the name clash with the global YYRHS.
16575
16576 2002-10-13 Akim Demaille <akim@epita.fr>
16577
16578 * Makefile.maint: Update from Autoconf 2.54.
16579 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
16580
16581 2002-10-13 Akim Demaille <akim@epita.fr>
16582
16583 * src/print.c (print_state): Separate the list of solved conflicts
16584 from the other items.
16585 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
16586
16587 2002-10-13 Akim Demaille <akim@epita.fr>
16588
16589 Let nondeterministic skeletons be usable with deterministic
16590 tables.
16591
16592 With the patch, GAWK compiled by GCC without -O2 passes its test
16593 suite using a GLR parser driven by LALR tables. It fails with -O2
16594 because `struct stat' gives two different answers on my machine:
16595 88 (definition of an auto var) and later 96 (memset on this var).
16596 Hence the stack is badly corrumpted. The headers inclusion is to
16597 blame: if I move the awk.h inclusion before GLR's system header
16598 inclusion, the two struct stat have the same size.
16599
16600 * src/tables.c (pack_table): Always create conflict_table.
16601 (token_actions): Always create conflict_list.
16602 * data/glr.c (YYFLAG): Remove, unused.
16603
16604 2002-10-13 Akim Demaille <akim@epita.fr>
16605
16606 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
16607 (O0FLAGS): New.
16608 (VALGRIND, GXX): New.
16609 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
16610 * tests/bison.in: Run $PREBISON a pre-command.
16611 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
16612 (maintainer-check-g++): New.
16613 * Makefile.am (maintainer-check): New.
16614
16615 2002-10-13 Akim Demaille <akim@epita.fr>
16616
16617 * data/glr.c: Formatting changes.
16618 Tweak some trace messages to match yacc.c's.
16619
16620 2002-10-13 Akim Demaille <akim@epita.fr>
16621
16622 GLR parsers sometimes raise parse errors instead of performing the
16623 default reduction.
16624 Reported by Charles-Henry de Boysson.
16625
16626 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
16627 check the length of the traces when %glr.
16628 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
16629 GLR's traces.
16630 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
16631 Test GLR parsers.
16632 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
16633 (yyltype): Remove the yy prefix from the member names.
16634 (yytable): Complete its comment.
16635 (yygetLRActions): Map error action number from YYTABLE from
16636 YYTABLE_NINF to 0.
16637 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
16638 (which was a bug: it should have been YYTABEL_NINF, and yet it was
16639 not satisfying as we could compare an YYACTION computed from
16640 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
16641 only value for error actions.
16642 (yyreportParseError): In verbose parse error messages, don't issue
16643 `error' in the list of expected tokens.
16644 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
16645 next action to perform to match glr.c's decoding.
16646 (yytable): Complete its comment.
16647
16648 2002-10-13 Paul Eggert <eggert@twinsun.com>
16649
16650 Fix problem reported by Henrik Grubbstroem in
16651 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
16652 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
16653 because the Bison parser reads the second action before reducing
16654 the first one.
16655 * src/scan-gram.l (rule_length): New static var.
16656 Use it to keep track of the rule length in the scanner, since
16657 we can't expect the parser to be in lock-step sync with the scanner.
16658 (handle_action_dollar, handle_action_at): Use this var.
16659 * tests/actions.at (Exotic Dollars): Test for the problem.
16660
16661 2002-10-12 Paul Eggert <eggert@twinsun.com>
16662
16663 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
16664 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
16665 Include <sys/time.h> when checking for clock_t and struct tms.
16666 Use same include order as source.
16667 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
16668 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
16669
16670 * lib/timevar.c: Update copyright date and clarify comments.
16671 (get_time) [IN_GCC]: Keep the GCC version for reference.
16672
16673 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
16674 GCC version as of today, then merge Bison's changes.
16675 Change "GCC" to "Bison" in copyright notice. timevar.def's
16676 author is Akim, so change that too.
16677
16678 * src/reader.c (grammar_current_rule_check):
16679 Don't worry about the default action if $$ is untyped.
16680 Prevents bogus warnings reported by Jim Gifford in
16681 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
16682
16683 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
16684 * data/glr.c, data/lalr1.cc, data/yacc.c:
16685 Output token definitions before the first part of user declarations.
16686 Fixes compatibility problem reported by Jim Gifford for kbd in
16687 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
16688
16689 2002-10-11 Paul Eggert <eggert@twinsun.com>
16690
16691 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
16692 (yyparse): here. This undoes some of the 2002-07-25 change.
16693 Compatibility problem reported by Ralf S. Engelschall with
16694 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
16695
16696 2002-10-11 Akim Demaille <akim@epita.fr>
16697
16698 * tests/regression.at Characters Escapes): New.
16699 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
16700 characters.
16701 Reported by Jan Nieuwenhuizen.
16702
16703 2002-10-11 Akim Demaille <akim@epita.fr>
16704
16705 * po/id.po: New.
16706
16707 2002-10-10 Paul Eggert <eggert@twinsun.com>
16708
16709 Portability fixes for bitsets; this also avoids several GCC
16710 warnings.
16711
16712 * lib/abitset.c: Include <stddef.h>, for offsetof.
16713 * lib/lbitset.c: Likewise.
16714
16715 * lib/abitset.c (abitset_bytes): Return a size that is aligned
16716 properly for vectors of objects. Do not assume that adding a
16717 header size to a multiple of a word size yields a value that is
16718 properly aligned for the whole union.
16719 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16720
16721 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
16722 unique names for structures.
16723 * lib/ebitset.c (ebitset_bytes): Likewise.
16724 * lib/lbitset.c (lbitset_bytes): Likewise.
16725
16726 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
16727 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
16728 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
16729 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
16730 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
16731 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
16732 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
16733 to improve the type-checking that GCC can do.
16734 * lib/bitset.c (bitset_op4_cmp): Likewise.
16735 * lib/bitset_stats.c (bitset_stats_count,
16736 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
16737 bitset_stats_copy, bitset_stats_disjoint_p,
16738 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
16739 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
16740 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
16741 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
16742 bitset_stats_and_or_cmp, bitset_stats_andn_or,
16743 bitset_stats_andn_or_cmp, bitset_stats_or_and,
16744 bitset_stats_or_and_cmp): Likewise.
16745 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
16746 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
16747 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
16748 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
16749
16750 * lib/abitset.h: Include bitset.h, not bbitset.h.
16751 * lib/ebitset.h: Likewise.
16752 * lib/lbitset.h: Likewise.
16753
16754 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
16755 All instances of parameters of type enum bitset_opts are now of
16756 type enum_bitset_opts, to conform to the C Standard, and similarly
16757 for enum_bitset_type.
16758 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16759 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16760
16761 Do not use "struct bitset_struct" to mean different things in
16762 different modules. Not only is this confusing, it violates
16763 the C Standard, which requires that structure types in different
16764 modules must be compatible if one is to be passed to the other.
16765 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
16766 All instances of "struct bitset_struct *" replaced with "bitset".
16767 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
16768 (union bitset_union, struct abitset_struct, struct ebitset_struct,
16769 struct lbitset_struct, struct bitset_stats_struct): New types.
16770 All uses of struct bitset_struct changed to union bitset_union,
16771 etc.
16772 * lib/abitset.c (struct abitset_struct, abitset,
16773 struct bitset_struct): Remove.
16774 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
16775 struct bitset_struct): Remove.
16776 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
16777 bitset_struct): Remove.
16778 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
16779 Likewise.
16780
16781 Do not call a function of type T using a call that assumes the
16782 function is of a different type U. Standard C requires that a
16783 function must be called with a type that is compatible with its
16784 definition.
16785 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16786 New decls.
16787 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16788 New functions.
16789 * lib/ebitset.c (PFV): Remove.
16790 * lib/lbitset.c (PFV): Likewise.
16791 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
16792 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
16793 decls.
16794 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
16795 (ebitset_vtable): Use them.
16796 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
16797 lbitset_xor): New functions.
16798 (lbitset_vtable): Use them.
16799
16800 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
16801 Declare.
16802
16803 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
16804 GCC warning.
16805 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
16806 Use offsetof, for simplicity.
16807
16808 2002-10-06 Paul Eggert <eggert@twinsun.com>
16809
16810 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
16811 the same width as int. This reapplies a hunk of the 2002-08-12 patch
16812 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
16813 which was inadvertently undone by the 2002-09-30 patch.
16814 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
16815 the same width as int.
16816
16817 2002-10-04 Paul Eggert <eggert@twinsun.com>
16818
16819 Version 1.50.
16820
16821 * configure.ac (AC_INIT), NEWS: Increment version number.
16822
16823 * doc/bison.texinfo: Minor spelling, grammar, and white space
16824 fixes.
16825 (Symbols): Mention that any negative value returned from yylex
16826 signifies end-of-input. Warn about negative chars. Mention
16827 the portable Standard C character set.
16828
16829 The GNU coding standard says CFLAGS and YFLAGS are reserved
16830 for the installer to set.
16831 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
16832 * src/Makefile.am (AM_CFLAGS): Likewise.
16833 (AM_YFLAGS): Renamed from YFLAGS.
16834
16835 Fix some MAX and MIN problems.
16836 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
16837 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
16838 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
16839 * src/reader.c (reader): Use it.
16840
16841 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
16842 POSIX 1003.1-2001 has removed fgrep.
16843
16844 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
16845
16846 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
16847 interpreted as signed.
16848 * lib/ebitset.c (ebitset_list): Fix bug.
16849
16850 2002-10-01 Paul Eggert <eggert@twinsun.com>
16851
16852 More fixes for 64-bit hosts and large bitsets.
16853
16854 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
16855 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
16856 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
16857 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
16858 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
16859 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
16860 bitset_count_): Likewise.
16861 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
16862 bitset_first, bitset_last): Likewise.
16863 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
16864 bitset_stats_list_reverse, bitset_stats_size,
16865 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
16866 Likewise.
16867 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16868 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16869 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16870 bitsetv_reflexive_transitive_closure): Likewise.
16871 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
16872 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
16873 Likewise.
16874 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
16875 Likewise.
16876
16877 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
16878 Use size_t, not unsigned int, to count bytes.
16879 * lib/abitset.h (abitset_bytes): Likewise.
16880 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
16881 Likewise.
16882 * lib/bitset.h (bitset_bytes): Likewise.
16883 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
16884 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
16885 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16886 * lib/ebitset.c (ebitset_bytes): Likewise.
16887 * lib/ebitset.h (ebitset_bytes): Likewise.
16888 * lib/lbitset.c (lbitset_bytes): Likewise.
16889 * lib/lbitset.h (lbitset_bytes): Likewise.
16890
16891 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
16892 abitset_subset_p, abitset_disjoint_p, abitset_and,
16893 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
16894 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
16895 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
16896 abitset_or_and, abitset_or_and_cmp):
16897 Use bitset_windex instead of unsigned int.
16898 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16899 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
16900 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
16901 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
16902 Likewise.
16903 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
16904
16905 * lib/bitset.c (bitset_print):
16906 Use proper printf formats for widths of integer types.
16907 * lib/bitset_stats.c (bitset_percent_histogram_print,
16908 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
16909 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16910 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16911 * lib/lbitset.c (lbitset_bytes): Likewise.
16912
16913 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
16914 BITSET_SIZE_MAX): New macros.
16915 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
16916 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
16917 to BITSET_WINDEX_MAX.
16918
16919 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
16920 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
16921 since we now return the bitset_bindex type (not int).
16922
16923 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
16924 when computing sizes.
16925 * lib/ebitset.c (ebitset_elts_grow): Likewise.
16926
16927 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
16928 and avoid cast to unsigned.
16929
16930 2002-09-30 Akim Demaille <akim@epita.fr>
16931
16932 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
16933 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
16934 Updates from Michael Hayes.
16935
16936 2002-09-30 Art Haas <ahaas@neosoft.com>
16937
16938 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
16939 invocations.
16940 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
16941 defined.
16942
16943 2002-09-27 Akim Demaille <akim@epita.fr>
16944
16945 Version 1.49c.
16946
16947 2002-09-27 Akim Demaille <akim@epita.fr>
16948
16949 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
16950 (Because of AC_LIBSOURCE).
16951
16952 2002-09-27 Akim Demaille <akim@epita.fr>
16953
16954 Playing with Autoscan.
16955
16956 * configure.ac: Remove the old LIBOBJ tweaks.
16957 (AC_REPLACE_FUNCS): Add strrchr and strtol.
16958 * lib/strrchr.c: New.
16959 * lib/strtol.c: New, from the Coreutils 4.5.1.
16960
16961 2002-09-27 Akim Demaille <akim@epita.fr>
16962
16963 Playing with Autoscan.
16964
16965 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
16966 * lib/Makefile.am (libbison_a_SOURCES): No longer include
16967 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
16968 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
16969 Coreutils 4.5.1.
16970
16971 2002-09-24 Akim Demaille <akim@epita.fr>
16972
16973 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
16974 (Frequently Asked Questions, Parser Stack Overflow): New.
16975
16976 2002-09-13 Akim Demaille <akim@epita.fr>
16977
16978 Playing with autoscan.
16979
16980 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
16981 * src/files.c (skeleton_find): Remove, unused.
16982 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
16983 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
16984
16985 2002-09-13 Akim Demaille <akim@epita.fr>
16986
16987 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
16988 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
16989
16990 2002-09-13 Akim Demaille <akim@epita.fr>
16991
16992 * configure.ac: Require 2.54.
16993 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
16994 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
16995 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
16996 Remove, provided by Autoconf macros.
16997
16998 2002-09-12 Akim Demaille <akim@epita.fr>
16999
17000 * m4/prereq.m4: Update, from Coreutils 4.5.1.
17001
17002 2002-09-12 Akim Demaille <akim@epita.fr>
17003
17004 * m4/prereq.m4: Update, from Fileutils 4.1.5.
17005 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
17006 Reported by Martin Mokrejs.
17007
17008 2002-09-10 Akim Demaille <akim@epita.fr>
17009
17010 * src/parse-gram.y: Associate a human readable string to each
17011 token type.
17012 * tests/regression.at (Invalid inputs): Adjust.
17013
17014 2002-09-10 Gary V. Vaughan <gary@gnu.org>
17015
17016 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
17017 with an Autoconf-2.5x style configure.ac.
17018
17019 2002-09-06 Paul Eggert <eggert@twinsun.com>
17020
17021 * doc/bison.texinfo (Conditions): Make explicit that the GPL
17022 exception applies only to yacc.c. This is a modification of a
17023 patch originally suggested by Akim Demaille.
17024
17025 2002-09-06 Akim Demaille <akim@epita.fr>
17026
17027 * data/c.m4 (b4_copyright): Move the GPL exception comment from
17028 here to...
17029 * data/yacc.c: here.
17030
17031 * data/lalr1.cc (struct yyltype): Don't define it, since we use
17032 LocationType.
17033 (b4_ltype): Default to yy::Location from location.hh.
17034
17035 2002-09-04 Jim Meyering <jim@meyering.net>
17036
17037 * data/yacc.c: Guard the declaration of yytoknum also with
17038 `#ifdef YYPRINT', so it is declared only when used.
17039
17040 2002-09-04 Akim Demaille <akim@epita.fr>
17041
17042 * configure.in: Rename as...
17043 * configure.ac: this.
17044 Bump to 1.49c.
17045
17046 2002-09-04 Akim Demaille <akim@epita.fr>
17047
17048 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
17049 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
17050 translate maintainer only messages.
17051
17052 2002-08-12 Paul Eggert <eggert@twinsun.com>
17053
17054 Version 1.49b.
17055
17056 * Makefile.am (SUBDIRS): Remove intl.
17057 (DISTCLEANFILES): Remove.
17058 * NEWS: Mention that GNU M4 is now required. Clarify what is
17059 meant by "larger grammars". Mention the pt_BR translation.
17060 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
17061 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
17062 Bump version from 0.11.2 to 0.11.5.
17063 (BISON_PREREQ_STAGE): Remove.
17064 (AM_GNU_GETTEXT): Use external gettext.
17065 (AC_OUTPUT): Remove intl/Makefile.
17066
17067 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
17068
17069 * data/glr.c: Include string.h, for strlen.
17070 (yyreportParseError): Use size_t for yysize.
17071 (yy_yypstack): No longer nested inside yypstates, as nested
17072 functions are not portable. Do not assume size_t is the
17073 same width as int.
17074 (yypstates): Do not assume that ptrdiff_t is the same width
17075 as int, and similarly for yyposn and YYINDEX.
17076
17077 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
17078
17079 * lib/Makefile.am (INCLUDES): Do not include from the intl
17080 directory, which has been removed.
17081 * src/Makefile.am (INCLUDES): Likewise.
17082
17083 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
17084 (bitsets_sources, additional_bitsets_sources, timevars_sources):
17085 New vars.
17086
17087 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
17088 * tests/Makefile.am (EXTRA_DIST): Likewise.
17089
17090 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17091 Do not assume that bitset_windex is the same width as unsigned.
17092
17093 * lib/abitset.c (abitset_unused_clear): Do not assume that
17094 bitset_word is the same width as int.
17095 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17096 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17097 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17098 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17099 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17100
17101 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17102 portability to one's complement hosts!).
17103 * lib/ebitset.c (ebitset_op1): Likewise.
17104 * lib/lbitset.c (lbitset_op1): Likewise.
17105
17106 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17107 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17108 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17109 Sync with fileutils.
17110 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17111 lib/gettext.h: Sync with diffutils.
17112
17113 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17114 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17115
17116 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17117 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17118 check for void *.
17119
17120 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17121 size_t; the old version tried to do this but casted improperly.
17122 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17123 (bitset_test): Now returns int, not unsigned long.
17124
17125 * lib/bitset_stats.c: Include "gettext.h".
17126 (_): New macro.
17127 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17128 name locals "index", as it generates unnecessary warnings on some
17129 hosts that have an "index" function.
17130
17131 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17132 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17133 they need translation.
17134 * src/LR0.c (state_list_append, new_itemsets, get_state,
17135 append_states, generate_states): Likewise.
17136 * src/assoc.c (assoc_to_string): Likewise.
17137 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17138 * src/gram.c (grammar_dump): Likewise.
17139 * src/injections.c (injections_compute): Likewise.
17140 * src/lalr.c (lookaheads_print): Likewise.
17141 * src/relation.c (relation_transpose): Likewise.
17142 * src/scan-gram.l: Likewise.
17143 * src/tables.c (table_grow, pack_vector): Likewise.
17144
17145 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17146 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17147 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17148 * m4/mbstate_t.m4: Sync with fileutils.
17149 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17150
17151 * po/LINGUAS: Add pt_BR.
17152 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17153 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17154 lib/timevar.c.
17155 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17156 manual recommends.
17157 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17158
17159 * src/complain.c (strerror_r): Remove decl; not needed.
17160 (strerror): Use same pattern as ../lib/error.c.
17161
17162 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17163
17164 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17165
17166 * src/main.c (main): Cast result of bindtextdomain and textdomain
17167 to void, to avoid a GCC warning when --disable-nls is in effect.
17168
17169 * src/scan-gram.l: Use strings rather than escapes when possible,
17170 to minimize the number of warnings from xgettext.
17171 (handle_action_dollar, handle_action_at): Don't use isdigit,
17172 as it mishandles negative chars and it may not work as expected
17173 outside the C locale.
17174
17175 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17176 this is a GCC extension and is not portable to other compilers.
17177
17178 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17179 Do not include <ctype.h>; no longer needed.
17180 Do not include <malloc.h>; no longer needed (and generates
17181 warnings on OpenBSD 3.0).
17182
17183 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17184 it's not portable.
17185
17186 * tests/regression.at: Do not use 'cc -c input.c -o input';
17187 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17188
17189 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17190 exit status as failure, not just exit status 1. Sun C exits
17191 with status 2 sometimes.
17192
17193 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17194 Use it for the two large tests.
17195
17196 2002-08-02 Akim Demaille <akim@epita.fr>
17197
17198 * src/conflicts.c (conflicts_output): Don't output rules never
17199 reduced here, since anyway that computation doesn't work.
17200 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17201 (rule_useless_p, rule_never_reduced_p): New.
17202 (grammar_rules_partial_print): Use a filter instead of a range.
17203 Display the title only if needed.
17204 (grammar_rules_print): Adjust.
17205 (grammar_rules_never_reduced_report): New.
17206 * src/tables.c (action_row): Move the computation of rules never
17207 reduced to...
17208 (token_actions): here.
17209 * src/main.c (main): Make the parser before making the report, so
17210 that rules never reduced are computed.
17211 Call grammar_rules_never_reduced_report.
17212 * src/print.c (print_results): Report rules never reduced.
17213 * tests/conflicts.at, tests/reduce.at: Adjust.
17214
17215 2002-08-01 Akim Demaille <akim@epita.fr>
17216
17217 Instead of attaching lookaheads and duplicating the rules being
17218 reduced by a state, attach the lookaheads to the reductions.
17219
17220 * src/state.h (state_t): Remove the `lookaheads',
17221 `lookaheads_rule' member.
17222 (reductions_t): Add a `lookaheads' member.
17223 Use a regular array for the `rules'.
17224 * src/state.c (reductions_new): Initialize the lookaheads member
17225 to 0.
17226 (state_rule_lookaheads_print): Adjust.
17227 * src/state.h, src/state.c (state_reductions_find): New.
17228 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17229 (count_rr_conflicts): Adjust.
17230 * src/lalr.c (LArule): Remove.
17231 (add_lookback_edge): Adjust.
17232 (state_lookaheads_count): New.
17233 (states_lookaheads_initialize): Merge into...
17234 (initialize_LA): this.
17235 (lalr_free): Adjust.
17236 * src/main.c (main): Don't free nullable and derives too early: it
17237 is used by --verbose.
17238 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17239
17240 2002-08-01 Akim Demaille <akim@epita.fr>
17241
17242 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17243 `rule_number_t**'.
17244 (set_derives, free_derives): Rename as...
17245 (derives_compute, derives_free): this.
17246 Adjust all dependencies.
17247 * src/nullable.c (set_nullable, free_nullable): Rename as...
17248 (nullable_compute, nullable_free): these.
17249 (rule_list_t): Store rule_t *, not rule_number_t.
17250 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17251 pointers, instead of their numbers.
17252 * src/main.c (main): Call nullable_free, and derives_free earlier,
17253 as they were lo longer used.
17254
17255 2002-08-01 Akim Demaille <akim@epita.fr>
17256
17257 * lib/timevar.c (get_time): Include children time.
17258 * src/lalr.h (LA, LArule): Don't export them: used with the
17259 state_t.
17260 * src/lalr.c (LA, LArule): Static.
17261 * src/lalr.h, src/lalr.c (lalr_free): New.
17262 * src/main.c (main): Call it.
17263 * src/tables.c (pack_vector): Check whether loc is >= to the
17264 table_size, not >.
17265 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17266 (tables_generate): do it, since that's also it which allocates
17267 them.
17268 Don't free LA and LArule, main does.
17269
17270 2002-07-31 Akim Demaille <akim@epita.fr>
17271
17272 Separate parser tables computation and output.
17273
17274 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17275 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17276 (yydefgoto, yydefact, high): Move to...
17277 * src/tables.h, src/tables.c: here.
17278 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17279 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17280 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17281 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17282 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17283 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17284 (action_row, save_row, token_actions, save_column, default_goto)
17285 (goto_actions, sort_actions, matching_state, pack_vector)
17286 (table_ninf_remap, pack_table, prepare_actions): Move to...
17287 * src/tables.c: here.
17288 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17289 * src/output.c (token_actions, output_base, output_conflicts)
17290 (output_check): Merge into...
17291 (prepare_actions): this.
17292 (actions_output): Rename as...
17293 (user_actions_output): this.
17294 * src/main.c (main): Call tables_generate and tables_free.
17295
17296 2002-07-31 Akim Demaille <akim@epita.fr>
17297
17298 Steal GCC's --time-report support.
17299
17300 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17301 stolen/adjusted from GCC.
17302 * m4/stage.m4: Remove time related checks.
17303 * m4/timevar.m4: New.
17304 * configure.in: Adjust.
17305 * src/system.h: Adjust to using timevar.h.
17306 * src/getargs.h, src/getargs.c: Support trace_time for
17307 --trace=time.
17308 * src/main.c (stage): Remove.
17309 (main): Replace `stage' invocations with timevar calls.
17310 * src/output.c: Insert pertinent timevar calls.
17311
17312 2002-07-31 Akim Demaille <akim@epita.fr>
17313
17314 Let --trace have arguments.
17315
17316 * src/getargs.h (enum trace_e): New.
17317 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17318 (long_options, short_options): --trace/-T takes an optional
17319 argument.
17320 Change all the uses of trace_flag to reflect the new flags.
17321 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17322
17323 Strengthen `stage' portability.
17324
17325 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17326 * configure.in: Use it.
17327 Don't check for malloc.h and sys/times.h.
17328 * src/system.h: Include them when appropriate.
17329 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17330 times and struct tms are available.
17331
17332 2002-07-30 Akim Demaille <akim@epita.fr>
17333
17334 In verbose parse error message, don't report `error' as an
17335 expected token.
17336 * tests/actions.at (Printers and Destructors): Adjust.
17337 * tests/calc.at (Calculator $1): Adjust.
17338 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17339 error message, do not report the parser accepts the error token in
17340 that state.
17341
17342 2002-07-30 Akim Demaille <akim@epita.fr>
17343
17344 Normalize conflict related messages.
17345
17346 * src/complain.h, src/complain.c (warn, complain): New.
17347 * src/conflicts.c (conflicts_print): Use them.
17348 (conflict_report_yacc): New, extracted from...
17349 (conflicts_print): here.
17350 * tests/conflicts.at, tests/existing.at: Adjust.
17351
17352 2002-07-30 Akim Demaille <akim@epita.fr>
17353
17354 Report rules which are never reduced by the parser: those hidden
17355 by conflicts.
17356
17357 * src/LR0.c (save_reductions): Don't make the final state too
17358 different: save its reduction (accept) instead of having a state
17359 without any action (no shift or goto, no reduce).
17360 Note: the final state is now a ``regular'' state, i.e., the
17361 parsers now contain `reduce 0' as default reduction.
17362 Nevertheless, since they decide to `accept' when yystate =
17363 final_state, they still will not reduce rule 0.
17364 * src/print.c (print_actions, print_reduction): Adjust.
17365 * src/output.c (action_row): Track reduced rules.
17366 (token_actions): Report rules never reduced.
17367 * tests/conflicts.at, tests/regression.at: Adjust.
17368
17369 2002-07-30 Akim Demaille <akim@epita.fr>
17370
17371 `stage' was accidently included in a previous patch.
17372 Initiate its autoconfiscation.
17373
17374 * configure.in: Look for malloc.h and sys/times.h.
17375 * src/main.c (stage): Adjust.
17376 Report only when trace_flag.
17377
17378 2002-07-29 Akim Demaille <akim@epita.fr>
17379
17380 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17381 state_number_t.
17382 (errs_t): symbol_t*, not symbol_number_t.
17383 (reductions_t): rule_t*, not rule_number_t.
17384 (FOR_EACH_SHIFT): New.
17385 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17386 * src/print.c, src/print_graph.c: Adjust.
17387
17388 2002-07-29 Akim Demaille <akim@epita.fr>
17389
17390 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17391
17392 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17393 (endtoken, accept): these.
17394 * src/reader.c (reader): Set endtoken's default tag to "$end".
17395 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17396 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17397 Adjust.
17398
17399 2002-07-29 Akim Demaille <akim@epita.fr>
17400
17401 * src/reduce.c (reduce_grammar): When the language is empty,
17402 complain about the start symbol, not the axiom.
17403 Use its location.
17404 * tests/reduce.at (Empty Language): New.
17405
17406 2002-07-26 Akim Demaille <akim@epita.fr>
17407
17408 * src/reader.h, src/reader.c (gram_error): ... can't get
17409 yycontrol without making too strong assumptions on the parser
17410 itself.
17411 * src/output.c (prepare_tokens): Use the real 0th value of
17412 token_translations instead of `0'.
17413 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17414 visible here.
17415 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17416 for the time being: %locations ought to provide it to yyerror.
17417
17418 2002-07-25 Akim Demaille <akim@epita.fr>
17419
17420 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17421 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17422 * tests/regression.at (Web2c Actions): Adjust.
17423
17424 2002-07-25 Akim Demaille <akim@epita.fr>
17425
17426 Stop storing rules from 1 to nrules + 1.
17427
17428 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17429 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17430 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17431 Iterate from 0 to nrules.
17432 Use rule_number_as_item_number and item_number_as_rule_number.
17433 Adjust to `derive' now containing possibly 0.
17434 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17435 Handle the `- 1' part in rule numbers from/to item numbers.
17436 * src/conflicts.c (log_resolution): Fix the message which reversed
17437 shift and reduce.
17438 * src/output.c (action_row): Initialize default_rule to -1.
17439 (token_actions): Adjust.
17440 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17441 expected output.
17442 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17443
17444 2002-07-25 Akim Demaille <akim@epita.fr>
17445
17446 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17447 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17448 (b4_c_knr_arg_decl): New.
17449 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17450 yyreport_parse_error.
17451
17452 2002-07-25 Akim Demaille <akim@epita.fr>
17453
17454 * data/yacc.c (yyreport_parse_error): New, extracted from...
17455 (yyparse): here.
17456 (yydestruct, yysymprint): Move above yyparse.
17457 Be K&R compliant.
17458
17459 2002-07-25 Akim Demaille <akim@epita.fr>
17460
17461 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17462 replace...
17463 (b4_sint_type, b4_uint_type): these.
17464 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17465 * tests/regression.at (Web2c Actions): Adjust.
17466
17467 2002-07-25 Akim Demaille <akim@epita.fr>
17468
17469 * src/gram.h (TIEM_NUMBER_MAX): New.
17470 (item_number_of_rule_number, rule_number_of_item_number): Rename
17471 as...
17472 (rule_number_as_item_number, item_number_as_rule_number): these.
17473 Adjust dependencies.
17474 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17475 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17476 (symbol_number_to_vector_number): New.
17477 (order): Of vector_number_t* type.
17478 (base_t, BASE_MAX, BASE_MIN): New.
17479 (froms, tos, width, pos, check): Of base_t type.
17480 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17481 (actrow): Of action_number_t type.
17482 (conflrow): Of unsigned int type.
17483 (table_ninf, base_ninf): New.
17484 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17485 (muscle_insert_int_table, muscle_insert_base_table)
17486 (muscle_insert_rule_number_table): New.
17487 (prepare_tokens): Output `toknum' as int_table.
17488 (action_row): Returns a rule_number_t.
17489 Use ACTION_MIN, not SHRT_MIN.
17490 (token_actions): yydefact is rule_number_t*.
17491 (table_ninf_remap): New.
17492 (pack_table): Use it for `base' and `table'.
17493 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17494 replaced with...
17495 (YYPACT_NINF, YYTABLE_NINF): these.
17496 (yypact, yytable): Compute their types instead of hard-coded
17497 `short'.
17498 * tests/regression.at (Web2c Actions): Adjust.
17499
17500 2002-07-19 Akim Demaille <akim@epita.fr>
17501
17502 * src/scan-gram.l (id): Can start with an underscore.
17503
17504 2002-07-16 Akim Demaille <akim@epita.fr>
17505
17506 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17507 Adjust all former `associativity' dependencies.
17508 * src/symtab.c (symbol_new): Default associativity is `undef', not
17509 `right'.
17510 (symbol_check_alias_consistence): Adjust.
17511
17512 2002-07-09 Akim Demaille <akim@epita.fr>
17513
17514 * doc/bison.texinfo: Properly set the ``header'' part.
17515 Use @dircategory ``GNU programming tools'' as per Texinfo's
17516 documentation.
17517 Use @copying.
17518
17519 2002-07-09 Akim Demaille <akim@epita.fr>
17520
17521 * lib/quotearg.h: Protect against multiple inclusions.
17522 * src/location.h (location_t): Add a `file' member.
17523 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17524 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17525 `error_one_per_line' support.
17526
17527 2002-07-09 Akim Demaille <akim@epita.fr>
17528
17529 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17530 * src/reader.c (lineno): Remove.
17531 Adjust all dependencies.
17532 (get_merge_function): Take a location and use complain_at.
17533 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17534 * tests/regression.at (Invalid inputs, Mixing %token styles):
17535 Adjust.
17536
17537 2002-07-09 Akim Demaille <akim@epita.fr>
17538
17539 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
17540 recovery rule, and forbid extensions when --yacc.
17541 (gram_error): Use complain_at.
17542 * src/reader.c (reader): Exit if there were parse errors.
17543
17544 2002-07-09 Akim Demaille <akim@epita.fr>
17545
17546 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
17547 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
17548 Reported by R Blake <blakers@mac.com>.
17549
17550 2002-07-09 Akim Demaille <akim@epita.fr>
17551
17552 * data/yacc.c: Output the copyright notive in the header.
17553
17554 2002-07-03 Akim Demaille <akim@epita.fr>
17555
17556 * src/output.c (froms, tos): Are state_number_t.
17557 (save_column): sp, sp1, and sp2 are state_number_t.
17558 (prepare): Rename `final' as `final_state_number', `nnts' as
17559 `nterms_number', `nrules' as `rules_number', `nstates' as
17560 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
17561 unused.
17562 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
17563 * data/lalr1.cc (nsym_): Remove, unused.
17564
17565 2002-07-03 Akim Demaille <akim@epita.fr>
17566
17567 * src/lalr.h, src/lalr.c (goto_number_t): New.
17568 * src/lalr.c (goto_list_t): New.
17569 Propagate them.
17570 * src/nullable.c (rule_list_t): New.
17571 Propagate.
17572 * src/types.h: Remove.
17573
17574 2002-07-03 Akim Demaille <akim@epita.fr>
17575
17576 * src/closure.c (print_fderives): Use rule_rhs_print.
17577 * src/derives.c (print_derives): Use rule_rhs_print.
17578 (rule_list_t): New, replaces `shorts'.
17579 (set_derives): Add comments.
17580 * tests/sets.at (Nullable, Firsts): Adjust.
17581
17582 2002-07-03 Akim Demaille <akim@epita.fr>
17583
17584 * src/output.c (prepare_actions): Free `tally' and `width'.
17585 (prepare_actions): Allocate and free `order'.
17586 * src/symtab.c (symbols_free): Free `symbols'.
17587 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
17588 * src/output.c (m4_invoke): Move to...
17589 * src/scan-skel.l: here.
17590 (<<EOF>>): Close yyout, and free its name.
17591
17592 2002-07-03 Akim Demaille <akim@epita.fr>
17593
17594 Fix some memory leaks, and fix a bug: state 0 was examined twice.
17595
17596 * src/LR0.c (new_state): Merge into...
17597 (state_list_append): this.
17598 (new_states): Merge into...
17599 (generate_states): here.
17600 (set_states): Don't ensure a proper `errs' state member here, do it...
17601 * src/conflicts.c (conflicts_solve): here.
17602 * src/state.h, src/state.c: Comment changes.
17603 (state_t): Rename member `shifts' as `transitions'.
17604 Adjust all dependencies.
17605 (errs_new): For consistency, also take the values as argument.
17606 (errs_dup): Remove.
17607 (state_errs_set): New.
17608 (state_reductions_set, state_transitions_set): Assert that no
17609 previous value was assigned.
17610 (state_free): New.
17611 (states_free): Use it.
17612 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
17613 temporary storage: use `errs' and `nerrs' as elsewhere.
17614 (set_conflicts): Allocate and free this `errs'.
17615
17616 2002-07-02 Akim Demaille <akim@epita.fr>
17617
17618 * lib/libiberty.h: New.
17619 * lib: Update the bitset implementation from upstream.
17620 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
17621 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
17622 * src/main.c: Adjust bitset stats calls.
17623
17624 2002-07-01 Paul Eggert <eggert@twinsun.com>
17625
17626 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
17627 char, so that negative chars don't collide with $.
17628
17629 2002-06-30 Akim Demaille <akim@epita.fr>
17630
17631 Have the GLR tests be `warning' checked, and fix the warnings.
17632
17633 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
17634 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
17635 (yyremoveDeletes): `yyi' and `yyj' are size_t.
17636 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
17637 (yyaddDeferredAction): static.
17638 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
17639 (yyreportParseError): yyprefix is const.
17640 yytokenp is used only when verbose.
17641 (yy__GNUC__): Replace with __GNUC__.
17642 (yypdumpstack): yyi is size_t.
17643 (yypreference): Un-yy local variables and arguments, to avoid
17644 clashes with `yyr1'. Anyway, we are not in the user name space.
17645 (yytname_size): be an int, as is compared with ints.
17646 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
17647 Use them.
17648 * tests/cxx-gram.at: Use quotation to protect $1.
17649 Use AT_COMPILE to enable warnings hunts.
17650 Prototype yylex and yyerror.
17651 `Use' argc.
17652 Include `string.h', not `strings.h'.
17653 Produce and prototype stmtMerge only when used.
17654 yylex takes a location.
17655
17656 2002-06-30 Akim Demaille <akim@epita.fr>
17657
17658 We spend a lot of time in quotearg, in particular when --verbose.
17659
17660 * src/symtab.c (symbol_get): Store a quoted version of the key.
17661 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
17662 Adjust all callers.
17663
17664 2002-06-30 Akim Demaille <akim@epita.fr>
17665
17666 * src/state.h (reductions_t): Rename member `nreds' as num.
17667 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
17668 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
17669
17670 2002-06-30 Akim Demaille <akim@epita.fr>
17671
17672 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
17673 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
17674 (shifts_to): Rename as...
17675 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
17676 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
17677 (TRANSITION_IS_DISABLED, transitions_to): these.
17678
17679 2002-06-30 Akim Demaille <akim@epita.fr>
17680
17681 * src/print.c (print_shifts, print_gotos): Merge into...
17682 (print_transitions): this.
17683 (print_transitions, print_errs, print_reductions): Align the
17684 lookaheads columns.
17685 (print_core, print_transitions, print_errs, print_state,
17686 print_grammar): Output empty lines separator before, not after.
17687 (state_default_rule_compute): Rename as...
17688 (state_default_rule): this.
17689 * tests/conflicts.at (Defaulted Conflicted Reduction),
17690 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
17691 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
17692
17693 2002-06-30 Akim Demaille <akim@epita.fr>
17694
17695 Display items as we display rules.
17696
17697 * src/gram.h, src/gram.c (rule_lhs_print): New.
17698 * src/gram.c (grammar_rules_partial_print): Use it.
17699 * src/print.c (print_core): Likewise.
17700 * tests/conflicts.at (Defaulted Conflicted Reduction),
17701 (Unresolved SR Conflicts): Adjust.
17702 (Unresolved SR Conflicts): Adjust and rename as...
17703 (Resolved SR Conflicts): this, as was meant.
17704 * tests/regression.at (Web2c Report): Adjust.
17705
17706 2002-06-30 Akim Demaille <akim@epita.fr>
17707
17708 * src/print.c (state_default_rule_compute): New, extracted from...
17709 (print_reductions): here.
17710 Pessimize, but clarify the code.
17711 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
17712
17713 2002-06-30 Akim Demaille <akim@epita.fr>
17714
17715 * src/output.c (action_row): Let default_rule be always a rule
17716 number.
17717
17718 2002-06-30 Akim Demaille <akim@epita.fr>
17719
17720 * src/closure.c (print_firsts, print_fderives, closure):
17721 Use BITSET_EXECUTE.
17722 * src/lalr.c (lookaheads_print): Likewise.
17723 * src/state.c (state_rule_lookaheads_print): Likewise.
17724 * src/print_graph.c (print_core): Likewise.
17725 * src/print.c (print_reductions): Likewise.
17726 * src/output.c (action_row): Likewise.
17727 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
17728
17729 2002-06-30 Akim Demaille <akim@epita.fr>
17730
17731 * src/print_graph.c: Use report_flag.
17732
17733 2002-06-30 Akim Demaille <akim@epita.fr>
17734
17735 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
17736 to...
17737 * src/relation.h, src/relation.c (traverse, relation_digraph)
17738 (relation_print, relation_transpose): New.
17739
17740 2002-06-30 Akim Demaille <akim@epita.fr>
17741
17742 * src/state.h, src/state.c (shifts_to): New.
17743 * src/lalr.c (build_relations): Use it.
17744
17745 2002-06-30 Akim Demaille <akim@epita.fr>
17746
17747 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
17748 (item_number_of_rule_number, rule_number_of_item_number): New.
17749 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
17750 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17751 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
17752 Propagate their use.
17753 Much remains to be done, in particular wrt `shorts' from types.h.
17754
17755 2002-06-30 Akim Demaille <akim@epita.fr>
17756
17757 * src/symtab.c (symbol_new): Initialize the `printer' member.
17758
17759 2002-06-30 Akim Demaille <akim@epita.fr>
17760
17761 * src/LR0.c (save_reductions): Remove, replaced by...
17762 * src/state.h, src/state.c (state_reductions_set): New.
17763 (reductions, errs): Rename as...
17764 (reductions_t, errs_t): these.
17765 Adjust all dependencies.
17766
17767 2002-06-30 Akim Demaille <akim@epita.fr>
17768
17769 * src/LR0.c (state_list_t, state_list_append): New.
17770 (first_state, last_state): Now symbol_list_t.
17771 (this_state): Remove.
17772 (new_itemsets, append_states, save_reductions): Take a state_t as
17773 argument.
17774 (set_states, generate_states): Adjust.
17775 (save_shifts): Remove, replaced by...
17776 * src/state.h, src/state.c (state_shifts_set): New.
17777 (shifts): Rename as...
17778 (shifts_t): this.
17779 Adjust all dependencies.
17780 * src/state.h (state_t): Remove the `next' member.
17781
17782 2002-06-30 Akim Demaille <akim@epita.fr>
17783
17784 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
17785 escaped in slot 0.
17786
17787 2002-06-30 Akim Demaille <akim@epita.fr>
17788
17789 Use hash.h for the state hash table.
17790
17791 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
17792 (allocate_storage): Use state_hash_new.
17793 (free_storage): Use state_hash_free.
17794 (new_state, get_state): Adjust.
17795 * src/lalr.h, src/lalr.c (states): Move to...
17796 * src/states.h (state_t): Remove the `link' member, no longer
17797 used.
17798 * src/states.h, src/states.c: here.
17799 (state_hash_new, state_hash_free, state_hash_lookup)
17800 (state_hash_insert, states_free): New.
17801 * src/states.c (state_table, state_compare, state_hash): New.
17802 * src/output.c (output_actions): Do not free states now, since we
17803 still need to know the final_state number in `prepare', called
17804 afterwards. Do it...
17805 * src/main.c (main): here: call states_free after `output'.
17806
17807 2002-06-30 Akim Demaille <akim@epita.fr>
17808
17809 * src/state.h, src/state.c (state_new): New, extracted from...
17810 * src/LR0.c (new_state): here.
17811 * src/state.h (STATE_ALLOC): Move to...
17812 * src/state.c: here.
17813 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
17814 * src/state.h, src/state.c: here.
17815
17816 2002-06-30 Akim Demaille <akim@epita.fr>
17817
17818 * src/reader.c (gensym): Rename as...
17819 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
17820 (getsym): Rename as...
17821 (symbol_get): this.
17822
17823 2002-06-30 Akim Demaille <akim@epita.fr>
17824
17825 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
17826 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
17827 * src/output.c, src/print.c, src/print_graph.c: Propagate.
17828 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
17829
17830 2002-06-30 Akim Demaille <akim@epita.fr>
17831
17832 Make the test suite pass with warnings checked.
17833
17834 * tests/actions.at (Printers and Destructors): Improve.
17835 Avoid unsigned vs. signed issues.
17836 * tests/calc.at: Don't exercise the scanner here, do it...
17837 * tests/input.at (Torturing the Scanner): here.
17838
17839 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17840
17841 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
17842 reorganize first lines parallel to yacc.c.
17843
17844 2002-06-28 Akim Demaille <akim@epita.fr>
17845
17846 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
17847 (b4_token_enum, b4_token_defines): New, factored from...
17848 * data/lalr1.cc, data/yacc.c, glr.c: here.
17849
17850 2002-06-28 Akim Demaille <akim@epita.fr>
17851
17852 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
17853 unused variables.
17854 * src/output.c (merger_output): static.
17855
17856 2002-06-28 Akim Demaille <akim@epita.fr>
17857
17858 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
17859 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
17860 pacify GCC.
17861 * src/output.c (save_row): Initialize all the variables to pacify GCC.
17862
17863 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17864
17865 Accumulated changelog for new GLR parsing features.
17866
17867 * src/conflicts.c (count_total_conflicts): Change name to
17868 conflicts_total_count.
17869 * src/conflicts.h: Ditto.
17870 * src/output.c (token_actions): Use the new name.
17871 (output_conflicts): Change conflp => conflict_list_heads, and
17872 confl => conflict_list for better readability.
17873 * data/glr.c: Use the new names.
17874 * NEWS: Add self to GLR announcement.
17875
17876 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
17877
17878 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
17879 Akim Demaille.
17880
17881 * data/bison.glr: Change name to glr.c
17882 * data/glr.c: Renamed from bison.glr.
17883 * data/Makefile.am: Add glr.c
17884
17885 * src/getargs.c:
17886
17887 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
17888 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
17889
17890 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17891
17892 * data/bison.glr: Be sure to restore the
17893 current #line when returning to the skeleton contents after having
17894 exposed the input file's #line.
17895
17896 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17897
17898 * data/bison.glr: Bring up to date with changes to bison.simple.
17899
17900 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17901
17902 * data/bison.glr: Correct definitions that use b4_prefix.
17903 Various reformatting.
17904 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
17905 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
17906 yytokenp argument; now part of stack.
17907 (yychar): Define to behave as documented.
17908 (yyclearin): Ditto.
17909
17910 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17911
17912 * src/reader.h: Add declaration for free_merger_functions.
17913
17914 * src/reader.c (merge_functions): New variable.
17915 (get_merge_function): New function.
17916 (free_merger_functions): New function.
17917 (readgram): Check for %prec that is not followed by a symbol.
17918 Handle %dprec and %merge declarations.
17919 (packgram): Initialize dprec and merger fields in rules array.
17920
17921 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
17922 conflict_list_cnt, conflict_list_free): New variables.
17923 (table_grow): Also grow conflict_table.
17924 (prepare_rules): Output dprec and merger tables.
17925 (conflict_row): New function.
17926 (action_row): Output conflict lists for GLR parser. Don't use
17927 default reduction in conflicted states for GLR parser so that there
17928 are spaces for the conflict lists.
17929 (save_row): Also save conflict information.
17930 (token_actions): Allocate conflict list.
17931 (merger_output): New function.
17932 (pack_vector): Pack conflict table, too.
17933 (output_conflicts): New function to output yyconflp and yyconfl.
17934 (output_check): Allocate conflict_tos.
17935 (output_actions): Output conflict tables, also.
17936 (output_skeleton): Output b4_mergers definition.
17937 (prepare): Output b4_max_rhs_length definition.
17938 Use 'bison.glr' as default skeleton for GLR parsers.
17939
17940 * src/gram.c (glr_parser): New flag.
17941 (grammar_free): Call free_merger_functions.
17942
17943 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
17944 all pairs of conflicting reductions, rather than just all tokens
17945 causing conflicts. Needed to size conflict tables.
17946 (conflicts_output): Modify call to count_rr_conflicts for new
17947 interface.
17948 (conflicts_print): Ditto.
17949 (count_total_conflicts): New function.
17950
17951 * src/reader.h (merger_list): New type.
17952 (merge_functions): New variable.
17953
17954 * src/lex.h (tok_dprec, tok_merge): New token types.
17955
17956 * src/gram.h (rule_s): Add dprec and merger fields.
17957 (glr_parser): New flag.
17958
17959 * src/conflicts.h (count_total_conflicts): New function.
17960
17961 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
17962
17963 * doc/bison.texinfo (Generalized LR Parsing): New section.
17964 (GLR Parsers): New section.
17965 (Language and Grammar): Mention GLR parsing.
17966 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
17967 Correct typo ("tge" -> "the").
17968
17969 * data/bison.glr: New skeleton for GLR parsing.
17970
17971 * tests/cxx-gram.at: New tests for GLR parsing.
17972
17973 * tests/testsuite.at: Include cxx-gram.at.
17974
17975 * tests/Makefile.am: Add cxx-gram.at.
17976
17977 * src/parse-gram.y:
17978
17979 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
17980
17981 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
17982
17983 2002-06-27 Akim Demaille <akim@epita.fr>
17984
17985 * src/options.h, src/options.c: Remove.
17986 * src/getargs.c (short_options, long_options): New.
17987
17988 2002-06-27 Akim Demaille <akim@epita.fr>
17989
17990 * data/bison.simple, data/bison.c++: Rename as...
17991 * data/yacc.c, data/lalr1.cc: these.
17992 * doc/bison.texinfo (Environment Variables): Remove.
17993
17994 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
17995
17996 * src/getargs.c (report_argmatch): Initialize strtok().
17997
17998 2002-06-20 Akim Demaille <akim@epita.fr>
17999
18000 * data/bison.simple (b4_symbol_actions): New, replaces...
18001 (b4_symbol_destructor, b4_symbol_printer): these.
18002 (yysymprint): Be sure to call YYPRINT only for tokens, and using
18003 user token numbers.
18004
18005 2002-06-20 Akim Demaille <akim@epita.fr>
18006
18007 * data/bison.simple (yydestructor): Rename as...
18008 (yydestruct): this.
18009
18010 2002-06-20 Akim Demaille <akim@epita.fr>
18011
18012 * src/symtab.h, src/symtab.c (symbol_type_set)
18013 (symbol_destructor_set, symbol_precedence_set): The location is
18014 the last argument.
18015 Adjust all callers.
18016
18017 2002-06-20 Akim Demaille <akim@epita.fr>
18018
18019 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
18020 internals.
18021 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
18022 Takes a location.
18023 * src/symtab.h, src/symtab.c (symbol_class_set)
18024 (symbol_user_token_number_set): Likewise.
18025 Adjust all callers.
18026 Promote complain_at.
18027 * tests/input.at (Type Clashes): Adjust.
18028
18029 2002-06-20 Akim Demaille <akim@epita.fr>
18030
18031 * data/bison.simple (YYLEX): Fix the declaration when
18032 %pure-parser.
18033
18034 2002-06-20 Akim Demaille <akim@epita.fr>
18035
18036 * data/bison.simple (yysymprint): Don't print the token number,
18037 just its name.
18038 * tests/actions.at (Destructors): Rename as...
18039 (Printers and Destructors): this.
18040 Also exercise %printer.
18041
18042 2002-06-20 Akim Demaille <akim@epita.fr>
18043
18044 * data/bison.simple (YYDSYMPRINT): New.
18045 Use it to remove many of the #if YYDEBUG/if (yydebug).
18046
18047 2002-06-20 Akim Demaille <akim@epita.fr>
18048
18049 * src/symtab.h, src/symtab.c (symbol_t): printer and
18050 printer_location are new members.
18051 (symbol_printer_set): New.
18052 * src/parse-gram.y (PERCENT_PRINTER): New token.
18053 Handle its associated rule.
18054 * src/scan-gram.l: Adjust.
18055 (handle_destructor_at, handle_destructor_dollar): Rename as...
18056 (handle_symbol_code_at, handle_symbol_code_dollar): these.
18057 * src/output.c (symbol_printers_output): New.
18058 (output_skeleton): Call it.
18059 * data/bison.simple (yysymprint): New. Cannot be named yyprint
18060 since there are already many grammar files with a user `yyprint'.
18061 Replace the calls to YYPRINT to calls to yysymprint.
18062 * tests/calc.at: Adjust.
18063 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
18064 taking advantage of parser very internal details (stack size!).
18065
18066 2002-06-20 Akim Demaille <akim@epita.fr>
18067
18068 * src/scan-gram.l: Complete the scanner with the missing patterns
18069 to pacify Flex.
18070 Use `quote' and `symbol_tag_get' where appropriate.
18071
18072 2002-06-19 Akim Demaille <akim@epita.fr>
18073
18074 * tests/actions.at (Destructors): Augment to test locations.
18075 * data/bison.simple (yydestructor): Pass it the current location
18076 if locations are enabled.
18077 Prototype only when __STDC__ or C++.
18078 Change the argument names to move into the yy name space: there is
18079 user code here.
18080
18081 2002-06-19 Akim Demaille <akim@epita.fr>
18082
18083 * data/bison.simple (b4_pure_if): New.
18084 Use it instead of #ifdef YYPURE.
18085
18086 2002-06-19 Akim Demaille <akim@epita.fr>
18087
18088 * data/bison.simple (b4_location_if): New.
18089 Use it instead of #ifdef YYLSP_NEEDED.
18090
18091 2002-06-19 Akim Demaille <akim@epita.fr>
18092
18093 Prepare @$ in %destructor, but currently don't bind it in the
18094 skeleton, as %location use is not cleaned up yet.
18095
18096 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18097 (handle_action_at): New.
18098 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18099 a braced_code_t and a location as additional arguments.
18100 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18101 unquote one when outputting `b4_dollar_dollar'.
18102 Adjust callers.
18103 * data/bison.simple (b4_eval): Remove.
18104 (b4_symbol_destructor): Adjust.
18105 * tests/input.at (Invalid @n): Adjust.
18106
18107 2002-06-19 Zack Weinberg <zack@codesourcery.com>
18108
18109 * doc/bison.texinfo: Document ability to have multiple
18110 prologue sections.
18111
18112 2002-06-18 Akim Demaille <akim@epita.fr>
18113
18114 * src/files.c (compute_base_names): When computing the output file
18115 names from the input file name, strip the directory part.
18116
18117 2002-06-18 Akim Demaille <akim@epita.fr>
18118
18119 * data/bison.simple.new: Comment changes.
18120 Reported by Andreas Schwab.
18121
18122 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18123
18124 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18125 there are no `label `yyoverflowlab' defined but not used' warnings
18126 when yyoverflow is defined.
18127
18128 2002-06-18 Akim Demaille <akim@epita.fr>
18129
18130 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18131 new member.
18132 (symbol_destructor_set): Adjust.
18133 * src/output.c (symbol_destructors_output): Output the destructor
18134 locations.
18135 Output the symbol name.
18136 * data/bison.simple (b4_symbol_destructor): Adjust.
18137
18138 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18139 and Akim Demaille <akim@epita.fr>
18140
18141 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18142 what's left on the stack when the error recovery hits EOF.
18143 * tests/actions.at (Destructors): Complete to exercise this case.
18144
18145 2002-06-17 Akim Demaille <akim@epita.fr>
18146
18147 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18148 arguments is really empty, not only equal to `[]'.
18149 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18150 member.
18151 (symbol_destructor_set): New.
18152 * src/output.c (symbol_destructors_output): New.
18153 * src/reader.h (brace_code_t, current_braced_code): New.
18154 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18155 (handle_dollar): Rename as...
18156 (handle_action_dollar): this.
18157 (handle_destructor_dollar): New.
18158 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18159 (grammar_declaration): Use it.
18160 * data/bison.simple (yystos): Is always defined.
18161 (yydestructor): New.
18162 * tests/actions.at (Destructors): New.
18163 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18164
18165 2002-06-17 Akim Demaille <akim@epita.fr>
18166
18167 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18168 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18169 rule_length only when needed.
18170 * src/output.c (actions_output, token_definitions_output): Output
18171 the full M4 block.
18172 * src/symtab.c: Don't access directly to the symbol tag, use
18173 symbol_tag_get.
18174 * src/parse-gram.y: Use symbol_list_free.
18175
18176 2002-06-17 Akim Demaille <akim@epita.fr>
18177
18178 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18179 (symbol_list_prepend, get_type_name): Move to...
18180 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18181 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18182 Adjust all callers.
18183 (symbol_list_free): New.
18184 * src/scan-gram.l (handle_dollar): Takes a location.
18185 * tests/input.at (Invalid $n): Adjust.
18186
18187 2002-06-17 Akim Demaille <akim@epita.fr>
18188
18189 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18190 (symbol_list_prepend): New.
18191 * src/parse-gram.y (%union): `list' is a new member.
18192 (symbols.1): New, replaces...
18193 (terms_to_prec.1, nterms_to_type.1): these.
18194 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18195 Take a location as additional argument.
18196 Adjust all callers.
18197
18198 2002-06-15 Akim Demaille <akim@epita.fr>
18199
18200 * src/parse-gram.y: Move %token in the declaration section so that
18201 we don't depend upon CVS Bison.
18202
18203 2002-06-15 Akim Demaille <akim@epita.fr>
18204
18205 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18206 * src/print.c (print_core): Use it.
18207
18208 2002-06-15 Akim Demaille <akim@epita.fr>
18209
18210 * src/conflicts.c (log_resolution): Accept the rule involved in
18211 the sr conflicts instead of the lookahead number that points to
18212 that rule.
18213 (flush_reduce): Accept the current lookahead vector as argument,
18214 instead of the index in LA.
18215 (resolve_sr_conflict): Accept the current number of lookahead
18216 bitset to consider for the STATE, instead of the index in LA.
18217 (set_conflicts): Adjust.
18218 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18219
18220 2002-06-15 Akim Demaille <akim@epita.fr>
18221
18222 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18223 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18224 Adjust all dependencies.
18225 * src/lalr.c (initialize_lookaheads): Split into...
18226 (states_lookaheads_count, states_lookaheads_initialize): these.
18227 (lalr): Adjust.
18228
18229 2002-06-15 Akim Demaille <akim@epita.fr>
18230
18231 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18232 out of...
18233 (grammar_rules_print): here.
18234 * src/reduce.c (reduce_output): Use it.
18235 * tests/reduce.at (Useless Rules, Reduced Automaton)
18236 (Underivable Rules): Adjust.
18237
18238 2002-06-15 Akim Demaille <akim@epita.fr>
18239
18240 Copy BYacc's nice way to report the grammar.
18241
18242 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18243 New.
18244 Don't print the rules' location, it is confusing and useless.
18245 (rule_print): Use grammar_rhs_print.
18246 * src/print.c (print_grammar): Use grammar_rules_print.
18247
18248 2002-06-15 Akim Demaille <akim@epita.fr>
18249
18250 Complete and rationalize `useless thing' warnings.
18251
18252 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18253 (symbol_tag_print): New.
18254 Use them everywhere in place of accessing directly the tag member.
18255 * src/gram.h, src/gram.c (rule_print): New.
18256 Use it where a rule used to be printed `by hand'.
18257 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18258 (reduce_grammar_tables): Report the useless rules.
18259 (reduce_print): Useless things are a warning, not an error.
18260 Report it as such.
18261 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18262 (Reduced Automaton, Underivable Rules): Adjust.
18263 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18264 * tests/conflicts.at (Unresolved SR Conflicts)
18265 (Solved SR Conflicts): Adjust.
18266
18267 2002-06-15 Akim Demaille <akim@epita.fr>
18268
18269 Let symbols have a location.
18270
18271 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18272 (getsym): Adjust.
18273 Adjust all callers.
18274 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18275 Use location_t, not int.
18276 * src/symtab.c (symbol_check_defined): Take advantage of the
18277 location.
18278 * tests/regression.at (Invalid inputs): Adjust.
18279
18280 2002-06-15 Akim Demaille <akim@epita.fr>
18281
18282 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18283 (input): Don't try to initialize yylloc here, do it in the
18284 scanner.
18285 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18286 * src/gram.h (rule_t): Change line and action_line into location
18287 and action_location, of location_t type.
18288 Adjust all dependencies.
18289 * src/location.h, src/location.c (empty_location): New.
18290 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18291 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18292 (grammar_current_rule_symbol_append)
18293 (grammar_current_rule_action_append): Expect a location as argument.
18294 * src/reader.c (grammar_midrule_action): Adjust to attach an
18295 action's location as dummy symbol location.
18296 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18297 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18298 the line numbers.
18299
18300 2002-06-14 Akim Demaille <akim@epita.fr>
18301
18302 Grammar declarations may be found in the grammar section.
18303
18304 * src/parse-gram.y (rules_or_grammar_declaration): New.
18305 (declarations): Each declaration may end with a semicolon, not
18306 just...
18307 (grammar_declaration): `"%union"'.
18308 (grammar): Branch to rules_or_grammar_declaration.
18309
18310 2002-06-14 Akim Demaille <akim@epita.fr>
18311
18312 * src/main.c (main): Invoke scanner_free.
18313
18314 2002-06-14 Akim Demaille <akim@epita.fr>
18315
18316 * src/output.c (m4_invoke): Extracted from...
18317 (output_skeleton): here.
18318 Free tempfile.
18319
18320 2002-06-14 Akim Demaille <akim@epita.fr>
18321
18322 * src/parse-gram.y (directives, directive, gram)
18323 (grammar_directives, precedence_directives, precedence_directive):
18324 Rename as...
18325 (declarations, declaration, grammar, grammar_declaration)
18326 (precedence_declaration, precedence_declarator): these.
18327 (symbol_declaration): New.
18328
18329 2002-06-14 Akim Demaille <akim@epita.fr>
18330
18331 * src/files.c (action_obstack): Remove, unused.
18332 (output_obstack): Remove it, and all its dependencies, as it is no
18333 longer needed.
18334 * src/reader.c (epilogue_set): Build the epilogue in the
18335 muscle_obstack.
18336 * src/output.h, src/output.c (muscle_obstack): Move to...
18337 * src/muscle_tab.h, src/muscle_tab.h: here.
18338 (muscle_init): Initialize muscle_obstack.
18339 (muscle_free): New.
18340 * src/main.c (main): Call it.
18341
18342 2002-06-14 Akim Demaille <akim@epita.fr>
18343
18344 * src/location.h: New, extracted from...
18345 * src/reader.h: here.
18346 * src/Makefile.am (noinst_HEADERS): Merge into
18347 (bison_SOURCES): this.
18348 Add location.h.
18349 * src/parse-gram.y: Use location_t instead of Bison's.
18350 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18351 Use location_t instead of ints.
18352
18353 2002-06-14 Akim Demaille <akim@epita.fr>
18354
18355 * data/bison.simple, data/bison.c++: Be sure to restore the
18356 current #line when returning to the skeleton contents after having
18357 exposed the input file's #line.
18358
18359 2002-06-12 Akim Demaille <akim@epita.fr>
18360
18361 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18362 eager.
18363 * tests/actions.at (Exotic Dollars): New.
18364
18365 2002-06-12 Akim Demaille <akim@epita.fr>
18366
18367 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18368 ['"/] too eagerly.
18369 * tests/input.at (Torturing the Scanner): New.
18370
18371 2002-06-11 Akim Demaille <akim@epita.fr>
18372
18373 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18374 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18375 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18376 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18377 * src/reader.c (reader): Use it.
18378
18379 2002-06-11 Akim Demaille <akim@epita.fr>
18380
18381 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18382 Adjust all callers.
18383 (scanner_last_string_free): New.
18384
18385 2002-06-11 Akim Demaille <akim@epita.fr>
18386
18387 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18388 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18389 (last_string, YY_OBS_FREE): New.
18390 Use them when returning an ID.
18391
18392 2002-06-11 Akim Demaille <akim@epita.fr>
18393
18394 Have Bison grammars parsed by a Bison grammar.
18395
18396 * src/reader.c, src/reader.h (prologue_augment): New.
18397 * src/reader.c (copy_definition): Remove.
18398
18399 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18400 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18401 (grammar_current_rule_prec_set, grammar_current_rule_check)
18402 (grammar_current_rule_symbol_append)
18403 (grammar_current_rule_action_append): Export.
18404 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18405 (symbol_list_action_append): Remove.
18406 Hook the routines from reader.
18407 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18408 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18409
18410 * src/reader.c (read_declarations): Remove, unused.
18411
18412 * src/parse-gram.y: Handle the epilogue.
18413 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18414 (grammar_start_symbol_set): this.
18415 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18416 * src/reader.c (readgram): Remove, unused.
18417 (reader): Adjust to insert eoftoken and axiom where appropriate.
18418
18419 * src/reader.c (copy_dollar): Replace with...
18420 * src/scan-gram.h (handle_dollar): this.
18421 * src/parse-gram.y: Remove `%thong'.
18422
18423 * src/reader.c (copy_at): Replace with...
18424 * src/scan-gram.h (handle_at): this.
18425
18426 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18427 New.
18428
18429 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18430 time being.
18431
18432 * src/reader.h, src/reader.c (grammar_rule_end): New.
18433
18434 * src/parse.y (current_type, current_class): New.
18435 Implement `%nterm', `%token' support.
18436 Merge `%term' into `%token'.
18437 (string_as_id): New.
18438 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18439 type name.
18440
18441 * src/parse-gram.y: Be sure to handle properly the beginning of
18442 rules.
18443
18444 * src/parse-gram.y: Handle %type.
18445 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18446
18447 * src/parse-gram.y: More directives support.
18448 * src/options.c: No longer handle source directives.
18449
18450 * src/parse-gram.y: Fix %output.
18451
18452 * src/parse-gram.y: Handle %union.
18453 Use the prologue locations.
18454 * src/reader.c (parse_union_decl): Remove.
18455
18456 * src/reader.h, src/reader.c (epilogue_set): New.
18457 * src/parse-gram.y: Use it.
18458
18459 * data/bison.simple, data/bison.c++: b4_stype is now either not
18460 defined, then default to int, or to the contents of %union,
18461 without `union' itself.
18462 Adjust.
18463 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18464
18465 * src/output.c (actions_output): Don't output braces, as they are
18466 already handled by the scanner.
18467
18468 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18469 characters to themselves.
18470
18471 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18472 that the epilogue has a proper #line.
18473
18474 * src/parse-gram.y: Handle precedence/associativity.
18475
18476 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18477 a terminal.
18478 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18479 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18480 at all to define terminals that cannot be emitted.
18481
18482 * src/scan-gram.l: Escape M4 characters.
18483
18484 * src/scan-gram.l: Working properly with escapes in user
18485 strings/characters.
18486
18487 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18488 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18489 grammar.
18490 Use more modest sizes, as for the time being the parser does not
18491 release memory, and therefore the process swallows a huge amount
18492 of memory.
18493
18494 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18495 stricter %token grammar.
18496
18497 * src/symtab.h (associativity): Add `undef_assoc'.
18498 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18499 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18500
18501 * tests/regression.at (Invalid %directive): Remove, as it is now
18502 meaningless.
18503 (Invalid inputs): Adjust to the new error messages.
18504 (Token definitions): The new grammar doesn't allow too many
18505 eccentricities.
18506
18507 * src/lex.h, src/lex.c: Remove.
18508 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18509 (copy_character, copy_string2, copy_string, copy_identifier)
18510 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18511 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18512 (parse_action): Remove.
18513 * po/POTFILES.in: Adjust.
18514
18515 2002-06-11 Akim Demaille <akim@epita.fr>
18516
18517 * src/reader.c (parse_action): Don't store directly into the
18518 rule's action member: return the action as a string.
18519 Don't require `rule_length' as an argument: compute it.
18520 (grammar_current_rule_symbol_append)
18521 (grammar_current_rule_action_append): New, eved out from
18522 (readgram): here.
18523 Remove `action_flag', `rulelength', unused now.
18524
18525 2002-06-11 Akim Demaille <akim@epita.fr>
18526
18527 * src/reader.c (grammar_current_rule_prec_set).
18528 (grammar_current_rule_check): New, eved out from...
18529 (readgram): here.
18530 Remove `xaction', `first_rhs': useless.
18531 * tests/input.at (Type clashes): New.
18532 * tests/existing.at (GNU Cim Grammar): Adjust.
18533
18534 2002-06-11 Akim Demaille <akim@epita.fr>
18535
18536 * src/reader.c (grammar_midrule_action): New, Eved out from
18537 (readgram): here.
18538
18539 2002-06-11 Akim Demaille <akim@epita.fr>
18540
18541 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
18542 New.
18543 (readgram): Use them as replacement of inlined code, crule and
18544 crule1.
18545
18546 2002-06-11 Akim Demaille <akim@epita.fr>
18547
18548 * src/reader.c (grammar_end, grammar_symbol_append): New.
18549 (readgram): Use them.
18550 Make the use of `p' as local as possible.
18551
18552 2002-06-10 Akim Demaille <akim@epita.fr>
18553
18554 GCJ's parser requires the tokens to be defined before the prologue.
18555
18556 * data/bison.simple: Output the token definition before the user's
18557 prologue.
18558 * tests/regression.at (Braces parsing, Duplicate string)
18559 (Mixing %token styles): Check the output from bison.
18560 (Early token definitions): New.
18561
18562 2002-06-10 Akim Demaille <akim@epita.fr>
18563
18564 * src/symtab.c (symbol_user_token_number_set): Don't complain when
18565 assigning twice the same user number to a token, so that we can
18566 use it in...
18567 * src/lex.c (lex): here.
18568 Also use `symbol_class_set' instead of hand written code.
18569 * src/reader.c (parse_assoc_decl): Likewise.
18570
18571 2002-06-10 Akim Demaille <akim@epita.fr>
18572
18573 * src/symtab.c, src/symtab.c (symbol_class_set)
18574 (symbol_user_token_number_set): New.
18575 * src/reader.c (parse_token_decl): Use them.
18576 Use a switch instead of ifs.
18577 Use a single argument.
18578
18579 2002-06-10 Akim Demaille <akim@epita.fr>
18580
18581 Remove `%thong' support as it is undocumented, unused, duplicates
18582 `%token's job, and creates useless e-mail traffic with people who
18583 want to know what it is, why it is undocumented, unused, and
18584 duplicates `%token's job.
18585
18586 * src/reader.c (parse_thong_decl): Remove.
18587 * src/options.c (option_table): Remove "thong".
18588 * src/lex.h (tok_thong): Remove.
18589
18590 2002-06-10 Akim Demaille <akim@epita.fr>
18591
18592 * src/symtab.c, src/symtab.c (symbol_type_set)
18593 (symbol_precedence_set): New.
18594 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
18595 (value_components_used): Remove, unused.
18596
18597 2002-06-09 Akim Demaille <akim@epita.fr>
18598
18599 Move symbols handling code out of the reader.
18600
18601 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
18602 (axiom): Move to...
18603 * src/symtab.h, src/symtab.c: here.
18604
18605 * src/gram.c (start_symbol): Remove: use startsymbol->number.
18606 * src/reader.c (startval): Rename as...
18607 * src/symtab.h, src/symtab.c (startsymbol): this.
18608 * src/reader.c: Adjust.
18609
18610 * src/reader.c (symbol_check_defined, symbol_make_alias)
18611 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18612 (token_translations_init)
18613 Move to...
18614 * src/symtab.c: here.
18615 * src/reader.c (packsymbols): Move to...
18616 * src/symtab.h, src/symtab.c (symbols_pack): here.
18617 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
18618 argument.
18619
18620 2002-06-03 Akim Demaille <akim@epita.fr>
18621
18622 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
18623 then statements.
18624
18625 2002-06-03 Akim Demaille <akim@epita.fr>
18626
18627 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
18628 structs with non literals.
18629 * src/scan-skel.l: never-interactive.
18630 * src/conflicts.c (enum conflict_resolution_e): No trailing
18631 comma.
18632 * src/getargs.c (usage): Split long literal strings.
18633 Reported by Hans Aberg.
18634
18635 2002-05-28 Akim Demaille <akim@epita.fr>
18636
18637 * data/bison.c++: Use C++ ostreams.
18638 (cdebug_): New member.
18639
18640 2002-05-28 Akim Demaille <akim@epita.fr>
18641
18642 * src/output.c (output_skeleton): Be sure to allocate enough room
18643 for `/' _and_ for `\0' in full_skeleton.
18644
18645 2002-05-28 Akim Demaille <akim@epita.fr>
18646
18647 * data/bison.c++: Catch up with bison.simple:
18648 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18649 and Paul Eggert <eggert@twinsun.com>: `error' handing.
18650 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
18651 and popping traces.
18652
18653 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18654
18655 * src/output.c (output_skeleton): Put an explicit path in front of
18656 the skeleton file name, rather than relying on the -I directory,
18657 to partially alleviate effects of having a skeleton file lying around
18658 in the current directory.
18659
18660 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18661
18662 * src/conflicts.c (log_resolution): Correct typo:
18663 obstack_printf should be obstack_fgrow1.
18664
18665 2002-05-26 Akim Demaille <akim@epita.fr>
18666
18667 * src/state.h (state_t): `solved_conflicts' is a new member.
18668 * src/LR0.c (new_state): Set it to 0.
18669 * src/conflicts.h, src/conflicts.c (print_conflicts)
18670 (free_conflicts, solve_conflicts): Rename as...
18671 (conflicts_print, conflicts_free, conflicts_solve): these.
18672 Adjust callers.
18673 * src/conflicts.c (enum conflict_resolution_e)
18674 (solved_conflicts_obstack): New, used by...
18675 (log_resolution): this.
18676 Adjust to attach the conflict resolution to each state.
18677 Complete the description with the precedence/associativity
18678 information.
18679 (resolve_sr_conflict): Adjust.
18680 * src/print.c (print_state): Output its solved_conflicts.
18681 * tests/conflicts.at (Unresolved SR Conflicts)
18682 (Solved SR Conflicts): Exercise --report=all.
18683
18684 2002-05-26 Akim Demaille <akim@epita.fr>
18685
18686 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18687 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18688 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
18689 (token_number_t, item_number_as_token_number)
18690 (token_number_as_item_number, muscle_insert_token_number_table):
18691 Rename as...
18692 (symbol_number_t, item_number_as_symbol_number)
18693 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
18694 these, since it is more appropriate.
18695
18696 2002-05-26 Akim Demaille <akim@epita.fr>
18697
18698 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
18699 `Error:' lines.
18700 * data/bison.simple (yystos) [YYDEBUG]: New.
18701 (yyparse) [YYDEBUG]: Display the symbols which are popped during
18702 error recovery.
18703 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
18704
18705 2002-05-25 Akim Demaille <akim@epita.fr>
18706
18707 * doc/bison.texinfo (Debugging): Split into...
18708 (Tracing): this new section, its former contents, and...
18709 (Understanding): this new section.
18710 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
18711 by...
18712 (report_flag): this.
18713 Adjust all dependencies.
18714 (report_args, report_types, report_argmatch): New.
18715 (usage, getargs): Report/support -r, --report.
18716 * src/options.h
18717 (struct option_table_struct): Rename as..,
18718 (struct option_table_s): this.
18719 Rename the `set_flag' member to `flag' to match with getopt_long's
18720 struct.
18721 * src/options.c (option_table): Split verbose into an entry for
18722 %verbose, and another for --verbose.
18723 Support --report/-r, so remove -r from the obsolete --raw.
18724 * src/print.c: Attach full item sets and lookaheads reports to
18725 report_flag instead of trace_flag.
18726 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
18727
18728 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18729 and Paul Eggert <eggert@twinsun.com>
18730
18731 * data/bison.simple (yyparse): Correct error handling to conform to
18732 POSIX and yacc. Specifically, after syntax error is discovered,
18733 do not reduce further before shifting the error token.
18734 Clean up the code a bit by removing the labels yyerrdefault,
18735 yyerrhandle, yyerrpop.
18736 * NEWS: Document the above.
18737
18738 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18739
18740 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
18741 type; it isn't always big enough, since it doesn't necessarily
18742 include non-terminals.
18743 (yytranslate): Expand definition of yy_token_number_type, so that
18744 the latter can be removed.
18745 (yy_token_number_type): Remove, only one use.
18746 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
18747 don't use TokenNumberType as element type.
18748
18749 * tests/regression.at: Modify expected output to agree with change
18750 to yyr1 and yytranslate.
18751
18752 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
18753
18754 * src/reader.c (parse_action): Use copy_character instead of
18755 obstack_1grow.
18756
18757 2002-05-13 Akim Demaille <akim@epita.fr>
18758
18759 * tests/regression.at (Token definitions): Prototype yylex and
18760 yyerror.
18761
18762 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18763
18764 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
18765 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
18766 32-bit arithmetic.
18767 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
18768
18769 2002-05-07 Akim Demaille <akim@epita.fr>
18770
18771 * tests/synclines.at: Be sure to prototype yylex and yyerror to
18772 avoid GCC warnings.
18773
18774 2002-05-07 Akim Demaille <akim@epita.fr>
18775
18776 Kill GCC warnings.
18777
18778 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
18779 over the RHS of each rule.
18780 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
18781 * src/state.h (state_t): Member `nitems' is unsigned short.
18782 * src/LR0.c (get_state): Adjust.
18783 * src/reader.c (packgram): Likewise.
18784 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
18785 `Type'.
18786 (muscle_insert_int_table): Remove, unused.
18787 (prepare_rules): Remove `max'.
18788
18789 2002-05-06 Akim Demaille <akim@epita.fr>
18790
18791 * src/closure.c (print_firsts): Display of the symbol tags.
18792 (bitmatrix_print): Move to...
18793 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
18794 here.
18795 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
18796
18797 2002-05-06 Akim Demaille <akim@epita.fr>
18798
18799 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
18800 hash_do_for_each.
18801
18802 2002-05-06 Akim Demaille <akim@epita.fr>
18803
18804 * src/LR0.c (new_state, get_state): Instead of using the global
18805 `kernel_size' and `kernel_base', have two new arguments:
18806 `core_size' and `core'.
18807 Adjust callers.
18808
18809 2002-05-06 Akim Demaille <akim@epita.fr>
18810
18811 * src/reader.c (packgram): No longer end `ritem' with a 0
18812 sentinel: it is not used.
18813
18814 2002-05-05 Akim Demaille <akim@epita.fr>
18815
18816 New experimental feature: display the lookaheads in the report and
18817 graph.
18818
18819 * src/print (print_core): When --trace-flag, display the rules
18820 lookaheads.
18821 * src/print_graph.c (print_core): Likewise.
18822 Swap the arguments.
18823 Adjust caller.
18824
18825 2002-05-05 Akim Demaille <akim@epita.fr>
18826
18827 * tests/torture.at (Many lookaheads): New test.
18828
18829 2002-05-05 Akim Demaille <akim@epita.fr>
18830
18831 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
18832 (GENERATE_MUSCLE_INSERT_TABLE): this.
18833 (output_int_table, output_unsigned_int_table, output_short_table)
18834 (output_token_number_table, output_item_number_table): Replace with...
18835 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
18836 (muscle_insert_short_table, muscle_insert_token_number_table)
18837 (muscle_insert_item_number_table): these.
18838 Adjust all callers.
18839 (prepare_tokens): Don't free `translations', since...
18840 * src/reader.h, src/reader.c (grammar_free): do it.
18841 Move to...
18842 * src/gram.h, src/gram.c (grammar_free): here.
18843 * data/bison.simple, data/bison.c++: b4_token_number_max is now
18844 b4_translate_max.
18845
18846 2002-05-05 Akim Demaille <akim@epita.fr>
18847
18848 * src/output.c (output_unsigned_int_table): New.
18849 (prepare_rules): `i' is unsigned.
18850 `prhs', `rline', `r2' are unsigned int.
18851 Rename muscle `rhs_number_max' as `rhs_max'.
18852 Output muscles `prhs_max', `rline_max', and `r2_max'.
18853 Free rline and r1.
18854 * data/bison.simple, data/bison.c++: Adjust to use these muscles
18855 to compute types instead of constant types.
18856 * tests/regression.at (Web2c Actions): Adjust.
18857
18858 2002-05-04 Akim Demaille <akim@epita.fr>
18859
18860 * src/symtab.h (SALIAS, SUNDEF): Rename as...
18861 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
18862 Adjust dependencies.
18863 * src/output.c (token_definitions_output): Be sure not to output a
18864 `#define 'a'' when fed with `%token 'a' "a"'.
18865 * tests/regression.at (Token definitions): New.
18866
18867 2002-05-03 Paul Eggert <eggert@twinsun.com>
18868
18869 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
18870 for K&R C.
18871
18872 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
18873
18874 * Makefile.am (SUBDIRS): Remove intl.
18875 (EXTRA_DIST): Add config/config.rpath.
18876
18877 2002-05-03 Akim Demaille <akim@epita.fr>
18878
18879 * data/bison.simple (m4_if): Don't output empty enums.
18880 And actually, output valid enum definitions :(.
18881
18882 2002-05-03 Akim Demaille <akim@epita.fr>
18883
18884 * configure.bat: Remove, completely obsolete.
18885 * Makefile.am (EXTRA_DIST): Adjust.
18886 Don't distribute config.rpath...
18887 * config/Makefile.am (EXTRA_DIST): Do it.
18888
18889 2002-05-03 Akim Demaille <akim@epita.fr>
18890
18891 * configure.in (GETTEXT_VERSION): New.
18892 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
18893
18894 2002-05-03 Akim Demaille <akim@epita.fr>
18895
18896 * data/bison.simple (b4_token_enum): New.
18897 (b4_token_defines): Use it to output tokens both as #define and
18898 enums.
18899 Suggested by Paul Eggert.
18900 * src/output.c (token_definitions_output): Don't output spurious
18901 white spaces.
18902
18903 2002-05-03 Akim Demaille <akim@epita.fr>
18904
18905 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18906
18907 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
18908
18909 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
18910 Update the stack class, give a try to deque as the default container.
18911
18912 2002-05-02 Akim Demaille <akim@epita.fr>
18913
18914 * data/bison.simple (yyparse): Do not implement @$ = @1.
18915 (YYLLOC_DEFAULT): Adjust to do it.
18916 * doc/bison.texinfo (Location Default Action): Fix.
18917
18918 2002-05-02 Akim Demaille <akim@epita.fr>
18919
18920 * src/reader.c (parse_braces): Merge into...
18921 (parse_action): this.
18922
18923 2002-05-02 Akim Demaille <akim@epita.fr>
18924
18925 * configure.in (ALL_LINGUAS): Remove.
18926 * po/LINGUAS, hr.po: New.
18927
18928 2002-05-02 Akim Demaille <akim@epita.fr>
18929
18930 Remove the so called hairy (semantic) parsers.
18931
18932 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
18933 * src/gram.h, src/gram.c (semantic_parser): Remove.
18934 (rule_t): Remove the guard and guard_line members.
18935 * src/lex.h (token_t): remove tok_guard.
18936 * src/options.c (option_table): Remove %guard and %semantic_parser
18937 support.
18938 * src/output.c, src/output.h (guards_output): Remove.
18939 (prepare): Adjust.
18940 (token_definitions_output): Don't output the `T'
18941 tokens (???).
18942 (output_skeleton): Don't output the guards.
18943 * src/files.c, src/files.c (attrsfile): Remove.
18944 * src/reader.c (symbol_list): Remove the guard and guard_line
18945 members.
18946 Adjust dependencies.
18947 (parse_guard): Remove.
18948 * data/bison.hairy: Remove.
18949 * doc/bison.texinfo (Environment Variables): Remove occurrences of
18950 BISON_HAIRY.
18951
18952 2002-05-02 Akim Demaille <akim@epita.fr>
18953
18954 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
18955 (parse_guard): Rename the formal argument `stack_offset' as
18956 `rule_length', which is more readable.
18957 Adjust callers.
18958 (copy_at, copy_dollar): Instead of outputting the hard coded
18959 values of $$, $n and so forth, output invocation to b4_lhs_value,
18960 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
18961 Note: this patch partially drops `semantic-parser' support: it
18962 always does `rule_length - n', where semantic parsers ought to
18963 always use `-n'.
18964 * data/bison.simple, data/bison.c++ (b4_lhs_value)
18965 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
18966
18967 2002-05-02 Akim Demaille <akim@epita.fr>
18968
18969 * configure.in (AC_INIT): Bump to 1.49b.
18970 (AM_INIT_AUTOMAKE): Short invocation.
18971
18972 2002-05-02 Akim Demaille <akim@epita.fr>
18973
18974 Version 1.49a.
18975
18976 2002-05-01 Akim Demaille <akim@epita.fr>
18977
18978 * src/skeleton.h: Remove.
18979
18980 2002-05-01 Akim Demaille <akim@epita.fr>
18981
18982 * src/skeleton.h: Fix the #endif.
18983 Reported by Magnus Fromreide.
18984
18985 2002-04-26 Paul Eggert <eggert@twinsun.com>
18986
18987 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
18988 Define if we define YYSTYPE and YYLTYPE, respectively.
18989 (YYCOPY): Fix [] quoting problem in the non-GCC case.
18990
18991 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
18992
18993 * src/scan-skel.l: Postprocess quadrigraphs.
18994
18995 * src/reader.c (copy_character): New function, used to output
18996 single characters while replacing `[' and `]' with quadrigraphs, to
18997 avoid troubles with M4 quotes.
18998 (copy_comment): Output characters with copy_character.
18999 (read_additionnal_code): Likewise.
19000 (copy_string2): Likewise.
19001 (copy_definition): Likewise.
19002
19003 * tests/calc.at: Exercise M4 quoting.
19004
19005 2002-04-25 Akim Demaille <akim@epita.fr>
19006
19007 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
19008 between `!' and the command.
19009 Reported by Paul Eggert.
19010
19011 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
19012
19013 * tests/calc.at: Exercise prologue splitting.
19014
19015 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
19016 `b4_post_prologue' instead of `b4_prologue'.
19017
19018 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
19019 muscles.
19020 (output): Free pre_prologue_obstack and post_prologue_obstack.
19021 * src/files.h, src/files.c (attrs_obstack): Remove.
19022 (pre_prologue_obstack, post_prologue_obstack): New.
19023 * src/reader.c (copy_definition): Add a parameter to specify the
19024 obstack to fill, instead of using attrs_obstack unconditionally.
19025 (read_declarations): Pass pre_prologue_obstack to copy_definition if
19026 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
19027
19028 2002-04-23 Paul Eggert <eggert@twinsun.com>
19029
19030 * data/bison.simple: Remove unnecessary commentary and white
19031 space differences from 1_29-branch.
19032 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
19033
19034 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
19035 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
19036 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
19037 constructors or destructors.
19038
19039 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
19040
19041 2002-04-23 Akim Demaille <akim@epita.fr>
19042
19043 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
19044 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
19045 location with columns.
19046 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
19047 All reported by Paul Eggert.
19048
19049 2002-04-22 Akim Demaille <akim@epita.fr>
19050
19051 * src/reduce.c (dump_grammar): Move to...
19052 * src/gram.h, src/gram.c (grammar_dump): here.
19053 Be sure to separate long item numbers.
19054 Don't read the members of a rule's prec if its nil.
19055
19056 2002-04-22 Akim Demaille <akim@epita.fr>
19057
19058 * src/output.c (table_size, table_grow): New.
19059 (MAXTABLE): Remove, replace uses with table_size.
19060 (pack_vector): Instead of dying when the table is too big, grow it.
19061
19062 2002-04-22 Akim Demaille <akim@epita.fr>
19063
19064 * data/bison.simple (yyr1): Its type is that of a token number.
19065 * data/bison.c++ (r1_): Likewise.
19066 * tests/regression.at (Web2c Actions): Adjust.
19067
19068 2002-04-22 Akim Demaille <akim@epita.fr>
19069
19070 * src/reader.c (token_translations_init): 256 is now the default
19071 value for the error token, i.e., it will be assigned another
19072 number if the user assigned 256 to one of her tokens.
19073 (reader): Don't force 256 to error.
19074 * doc/bison.texinfo (Symbols): Adjust.
19075 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
19076 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
19077 etc. instead of 10, 20, 30 (which was used to `jump' over error
19078 (256) and undefined (2)).
19079
19080 2002-04-22 Akim Demaille <akim@epita.fr>
19081
19082 Propagate more token_number_t.
19083
19084 * src/gram.h (token_number_as_item_number)
19085 (item_number_as_token_number): New.
19086 * src/output.c (GENERATE_OUTPUT_TABLE): New.
19087 Use it to create output_item_number_table and
19088 output_token_number_table.
19089 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19090 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19091 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19092 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19093
19094 2002-04-22 Akim Demaille <akim@epita.fr>
19095
19096 * src/output.h, src/output.c (get_lines_number): Remove.
19097
19098 2002-04-19 Akim Demaille <akim@epita.fr>
19099
19100 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19101 as Lex/Flex'.
19102 (Debugging): More details about enabling the debugging features.
19103 (Table of Symbols): Describe $$, $n, @$, and @n.
19104 Suggested by Tim Josling.
19105
19106 2002-04-19 Akim Demaille <akim@epita.fr>
19107
19108 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19109
19110 2002-04-10 Akim Demaille <akim@epita.fr>
19111
19112 * src/system.h: Rely on HAVE_LIMITS_H.
19113 Suggested by Paul Eggert.
19114
19115 2002-04-09 Akim Demaille <akim@epita.fr>
19116
19117 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19118 full stderr, and strip it according to the bison options, instead
19119 of composing the error message from different bits.
19120 This makes it easier to check for several error messages.
19121 Adjust all the invocations.
19122 Add an invocation exercising the error token.
19123 Add an invocation demonstrating a stupid error message.
19124 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19125 Adjust the tests.
19126 Error message are for stderr, not stdout.
19127
19128 2002-04-09 Akim Demaille <akim@epita.fr>
19129
19130 * src/gram.h, src/gram.c (error_token_number): Remove, use
19131 errtoken->number.
19132 * src/reader.c (reader): Don't specify the user token number (2)
19133 for $undefined, as it uselessly prevents using it.
19134 * src/gram.h (token_number_t): Move to...
19135 * src/symtab.h: here.
19136 (state_t.number): Is a token_number_t.
19137 * src/print.c, src/reader.c: Use undeftoken->number instead of
19138 hard coded 2.
19139 (Even though this 2 is not the same as above: the number of the
19140 undeftoken remains being 2, it is its user token number which
19141 might not be 2).
19142 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19143 `user_token_number_max'.
19144 Output `undef_token_number'.
19145 * data/bison.simple, data/bison.c++: Use them.
19146 Be sure to map invalid yylex return values to
19147 `undef_token_number'. This saves us from gratuitous SEGV.
19148
19149 * tests/conflicts.at (Solved SR Conflicts)
19150 (Unresolved SR Conflicts): Adjust.
19151 * tests/regression.at (Web2c Actions): Adjust.
19152
19153 2002-04-08 Akim Demaille <akim@epita.fr>
19154
19155 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19156 Adding #line.
19157 Remove the duplicate `typedefs'.
19158 (RhsNumberType): Fix the declaration and various other typos.
19159 Use __ofile__.
19160 * data/bison.simple: Use __ofile__.
19161 * src/scan-skel.l: Handle __ofile__.
19162
19163 2002-04-08 Akim Demaille <akim@epita.fr>
19164
19165 * src/gram.h (item_number_t): New, the type of item numbers in
19166 RITEM. Note that it must be able to code symbol numbers as
19167 positive number, and the negation of rule numbers as negative
19168 numbers.
19169 Adjust all dependencies (pretty many).
19170 * src/reduce.c (rule): Remove this `short *' pointer: use
19171 item_number_t.
19172 * src/system.h (MINSHORT, MAXSHORT): Remove.
19173 Include `limits.h'.
19174 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19175 (shortcpy): Remove.
19176 (MAXTABLE): Move to...
19177 * src/output.c (MAXTABLE): here.
19178 (prepare_rules): Use output_int_table to output rhs.
19179 * data/bison.simple, data/bison.c++: Adjust.
19180 * tests/torture.at (Big triangle): Move the limit from 254 to
19181 500.
19182 * tests/regression.at (Web2c Actions): Ajust.
19183
19184 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19185 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19186 passes, but produces negative #line number, once fixed, GCC is
19187 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19188 C), it passes.
19189 * src/state.h (state_h): Code input lines on ints, not shorts.
19190
19191 2002-04-08 Akim Demaille <akim@epita.fr>
19192
19193 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19194 and then the grammar.
19195
19196 2002-04-08 Akim Demaille <akim@epita.fr>
19197
19198 * src/system.h: No longer using strndup.
19199
19200 2002-04-07 Akim Demaille <akim@epita.fr>
19201
19202 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19203 * src/output.c (output_table_data): Return the longest number.
19204 (prepare_tokens): Output `token_number_max').
19205 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19206 New.
19207 Use them to define yy_token_number_type/TokenNumberType.
19208 Use this type for yytranslate.
19209 * tests/torture.at (Big triangle): Push the limit from 124 to
19210 253.
19211 * tests/regression.at (Web2c Actions): Adjust.
19212
19213 2002-04-07 Akim Demaille <akim@epita.fr>
19214
19215 * tests/torture.at (Big triangle): New.
19216 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19217 * tests/existing.at: here.
19218
19219 2002-04-07 Akim Demaille <akim@epita.fr>
19220
19221 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19222 nritems.
19223 Adjust dependencies.
19224
19225 2002-04-07 Akim Demaille <akim@epita.fr>
19226
19227 * src/reader.c: Normalize increments to prefix form.
19228
19229 2002-04-07 Akim Demaille <akim@epita.fr>
19230
19231 * src/reader.c, symtab.c: Remove debugging code.
19232
19233 2002-04-07 Akim Demaille <akim@epita.fr>
19234
19235 Rename all the `bucket's as `symbol_t'.
19236
19237 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19238 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19239 * src/symtab.c, src/symtab.h (bucket): Rename as...
19240 (symbol_t): this.
19241 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19242 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19243 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19244 (buckets_new, buckets_free, buckets_do): Rename as...
19245 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19246 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19247 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19248 (symbols_new, symbols_free, symbols_do): these.
19249
19250 2002-04-07 Akim Demaille <akim@epita.fr>
19251
19252 Use lib/hash for the symbol table.
19253
19254 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19255 EOF.
19256 * src/lex.c (lex): Set the `number' member of new terminals.
19257 * src/reader.c (bucket_check_defined, bucket_make_alias)
19258 (bucket_check_alias_consistence, bucket_translation): New.
19259 (reader, grammar_free, readgram, token_translations_init)
19260 (packsymbols): Adjust.
19261 (reader): Number the predefined tokens.
19262 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19263 for predefined tokens.
19264 * src/symtab.h (bucket): Remove all the hash table related
19265 members.
19266 * src/symtab.c (symtab): Replace by...
19267 (bucket_table): this.
19268 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19269 (buckets_new, buckets_do): New.
19270
19271 2002-04-07 Akim Demaille <akim@epita.fr>
19272
19273 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19274 (start_symbol, max_user_token_number, semantic_parser)
19275 (error_token_number): Initialize.
19276 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19277 Initialize.
19278 (reader): Don't.
19279 (errtoken, eoftoken, undeftoken, axiom): Extern.
19280
19281 2002-04-07 Akim Demaille <akim@epita.fr>
19282
19283 * src/gram.h (rule_s): prec and precsym are now pointers
19284 to the bucket giving the priority/associativity.
19285 Member `associativity' removed: useless.
19286 * src/reduce.c, src/conflicts.c: Adjust.
19287
19288 2002-04-07 Akim Demaille <akim@epita.fr>
19289
19290 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19291 Properly escape the symbols' TAG when outputting them.
19292
19293 2002-04-07 Akim Demaille <akim@epita.fr>
19294
19295 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19296
19297 2002-04-07 Akim Demaille <akim@epita.fr>
19298
19299 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19300 (LArule): this, which is an array to rule_t*.
19301 * src/print.c, src/conflicts.c: Adjust.
19302
19303 2002-04-07 Akim Demaille <akim@epita.fr>
19304
19305 * src/gram.h (rule_t): Rename `number' as `user_number'.
19306 `number' is a new member.
19307 Adjust dependencies.
19308 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19309
19310 2002-04-07 Akim Demaille <akim@epita.fr>
19311
19312 As a result of the previous patch, it is no longer needed
19313 to reorder ritem itself.
19314
19315 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19316
19317 2002-04-07 Akim Demaille <akim@epita.fr>
19318
19319 Be sure never to walk through RITEMS, but use only data related to
19320 the rules themselves. RITEMS should be banished.
19321
19322 * src/output.c (output_token_translations): Rename as...
19323 (prepare_tokens): this.
19324 In addition to `translate', prepare the muscles `tname' and
19325 `toknum', which were handled by...
19326 (output_rule_data): this.
19327 Remove, and move the remainder of its outputs into...
19328 (prepare_rules): this new routines, which also merges content from
19329 (output_gram): this.
19330 (prepare_rules): Be sure never to walk through RITEMS.
19331 (output_stos): Rename as...
19332 (prepare_stos): this.
19333 (output): Always invoke prepare_states, after all, just don't use it
19334 in the output if you don't need it.
19335
19336 2002-04-07 Akim Demaille <akim@epita.fr>
19337
19338 * src/LR0.c (new_state): Display `nstates' as the name of the
19339 newly created state.
19340 Adjust to initialize first_state and last_state if needed.
19341 Be sure to distinguish the initial from the final state.
19342 (new_states): Create the itemset of the initial state, and use
19343 new_state.
19344 * src/closure.c (closure): Now that the initial state has its
19345 items properly set, there is no need for a special case when
19346 creating `ruleset'.
19347
19348 As a result, now the rule 0, reducing to $axiom, is visible in the
19349 outputs. Adjust the test suite.
19350
19351 * tests/conflicts.at (Solved SR Conflicts)
19352 (Unresolved SR Conflicts): Adjust.
19353 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19354 * tests/conflicts.at (S/R in initial): New.
19355
19356 2002-04-07 Akim Demaille <akim@epita.fr>
19357
19358 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19359 the RHS of the rules.
19360 * src/output.c (output_gram): Likewise.
19361
19362 2002-04-07 Akim Demaille <akim@epita.fr>
19363
19364 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19365 bucket.
19366 Adjust all dependencies.
19367 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19368 `number' of the buckets too.
19369 * src/gram.h: Include `symtab.h'.
19370 (associativity): Move to...
19371 * src/symtab.h: here.
19372 No longer include `gram.h'.
19373
19374 2002-04-07 Akim Demaille <akim@epita.fr>
19375
19376 * src/gram.h, src/gram.c (rules_rhs_length): New.
19377 (ritem_longest_rhs): Use it.
19378 * src/gram.h (rule_t): `number' is a new member.
19379 * src/reader.c (packgram): Set it.
19380 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19381 the end of `rules', and count them out of `nrules'.
19382 (reduce_output, dump_grammar): Adjust.
19383 * src/print.c (print_grammar): It is no longer needed to check for
19384 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19385 * tests/reduce.at (Reduced Automaton): New test.
19386
19387 2002-04-07 Akim Demaille <akim@epita.fr>
19388
19389 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19390 lacking `+ 1' to nrules, Bison reported as useless a token if it
19391 was used solely to set the precedence of the last rule...
19392
19393 2002-04-07 Akim Demaille <akim@epita.fr>
19394
19395 * data/bison.c++, data/bison.simple: Don't output the current file
19396 name in #line, to avoid useless diffs between two identical
19397 outputs under different names.
19398
19399 2002-04-07 Akim Demaille <akim@epita.fr>
19400
19401 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19402 Normalize loops to using `< nrules + 1', not `<= nrules'.
19403
19404 2002-04-07 Akim Demaille <akim@epita.fr>
19405
19406 * TODO: Update.
19407
19408 2002-04-07 Akim Demaille <akim@epita.fr>
19409
19410 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19411 bucket.value as bucket.number.
19412
19413 2002-04-07 Akim Demaille <akim@epita.fr>
19414
19415 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19416 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19417 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19418 RHS, instead of being an index in RITEMS.
19419
19420 2002-04-04 Paul Eggert <eggert@twinsun.com>
19421
19422 * doc/bison.texinfo: Update copyright date.
19423 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19424 (Symbols): Warn about running Bison in one character set,
19425 but compiling and/or running in an incompatible one.
19426 Warn about character code 256, too.
19427
19428 2002-04-03 Paul Eggert <eggert@twinsun.com>
19429
19430 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19431 YYERROR_VERBOSE is nonzero, not whether it is defined.
19432
19433 Merge changes from bison-1_29-branch.
19434
19435 2002-03-20 Paul Eggert <eggert@twinsun.com>
19436
19437 Merge fixes from Debian bison_1.34-1.diff.
19438
19439 * configure.in (AC_PREREQ): 2.53.
19440
19441 2002-03-20 Akim Demaille <akim@epita.fr>
19442
19443 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19444
19445 2002-03-19 Paul Eggert <eggert@twinsun.com>
19446
19447 * src/bison.simple (YYCOPY): New macro.
19448 (YYSTACK_RELOCATE): Use it.
19449 Remove Type arg; no longer needed. All callers changed.
19450 (yymemcpy): Remove; no longer needed.
19451
19452 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19453 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19454
19455 2002-03-19 Akim Demaille <akim@epita.fr>
19456
19457 Test and fix the #line outputs.
19458
19459 * tests/atlocal.at (GCC): New.
19460 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
19461 (Prologue synch line, %union synch line, Postprologue synch line)
19462 (Action synch line, Epilogue synch line): New tests.
19463 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19464 * data/bison.simple, data/bison.c++: Use it.
19465
19466 2002-03-19 Akim Demaille <akim@epita.fr>
19467
19468 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19469 (Solved SR Conflicts, %expect not enough, %expect right)
19470 (%expect too much): Move to...
19471 * tests/conflicts.at: this new file.
19472
19473 2002-03-19 Akim Demaille <akim@epita.fr>
19474
19475 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19476 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19477 that we can move to enums for instance.
19478 * src/output.c (token_definitions_output): Output a list of
19479 `token-name, token-number' instead of the #define.
19480 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19481
19482 2002-03-14 Akim Demaille <akim@epita.fr>
19483
19484 Use Gettext 0.11.1.
19485
19486 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
19487
19488 * data/bison.c++: Make the user able to add members to the generated
19489 parser by subclassing.
19490
19491 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
19492
19493 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19494 a character.
19495 Reported by Nicolas Tisserand and Nicolas Burrus.
19496
19497 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19498
19499 * src/reader.c: Warn about lacking semi-colons, do not complain.
19500
19501 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19502
19503 * data/bison.c++: Remove a debug line.
19504
19505 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19506
19507 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19508 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19509 provide a default implementation.
19510
19511 2002-03-04 Akim Demaille <akim@epita.fr>
19512
19513 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19514 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19515 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19516 * tests/semantic.at (Parsing Guards): Similarly.
19517 * src/reader.at (readgram): Complain if the last rule is not ended
19518 with a semi-colon.
19519
19520 2002-03-04 Akim Demaille <akim@epita.fr>
19521
19522 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19523 * src/closure.c: here.
19524 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19525 RTC.
19526 * src/warshall.h, src/warshall.c: Remove.
19527 * tests/sets.at (Broken Closure): Adjust.
19528
19529 2002-03-04 Akim Demaille <akim@epita.fr>
19530
19531 * src/output.c (output_skeleton): tempdir is const.
19532 bytes_read is unused.
19533
19534 2002-03-04 Akim Demaille <akim@epita.fr>
19535
19536 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19537 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19538 Update.
19539 From Michael Hayes.
19540
19541 2002-03-04 Akim Demaille <akim@epita.fr>
19542
19543 * src/closure.c (closure): `r' is unused.
19544
19545 2002-03-04 Akim Demaille <akim@epita.fr>
19546
19547 * tests/sets.at (Broken Closure): Add the ending `;'.
19548 * src/reader.at (readgram): Complain if a rule is not ended with a
19549 semi-colon.
19550
19551 2002-03-04 Akim Demaille <akim@epita.fr>
19552
19553 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
19554 (count_sr_conflicts): Use bitset_count.
19555 * src/reduce.c (inaccessable_symbols): Ditto.
19556 (bits_size): Remove.
19557 * src/warshall.h, src/warshall.c: Convert to bitsetv.
19558
19559 2002-03-04 Akim Demaille <akim@epita.fr>
19560
19561 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
19562 * src/reduce.c: Remove the `bitset_zero's following the
19563 `bitset_create's, as now it is performed by the latter.
19564
19565 2002-03-04 Akim Demaille <akim@epita.fr>
19566
19567 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
19568 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
19569 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
19570 latest sources from Michael.
19571
19572 2002-03-04 Akim Demaille <akim@epita.fr>
19573
19574 * src/output.c (output): Don't free the grammar.
19575 * src/reader.c (grammar_free): New.
19576 * src/main.c (main): Call it and don't free symtab here.
19577
19578 2002-03-04 Akim Demaille <akim@epita.fr>
19579
19580 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
19581 before returning.
19582 Reported by Benoit Perrot.
19583
19584 2002-03-04 Akim Demaille <akim@epita.fr>
19585
19586 Use bitset operations when possible, not loops over bits.
19587
19588 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
19589 bitset_or.
19590 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
19591 * src/reduce.c (useless_nonterminals): Formatting changes.
19592 * src/warshall.c (TC): Use bitset_or.
19593
19594 2002-03-04 Akim Demaille <akim@epita.fr>
19595
19596 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
19597 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
19598 Ditto.
19599
19600 2002-03-04 Akim Demaille <akim@epita.fr>
19601
19602 * src/lalr.c (F): Now a bitset*.
19603 Adjust all dependencies.
19604
19605 2002-03-04 Akim Demaille <akim@epita.fr>
19606
19607 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
19608 Adjust all dependencies.
19609
19610 2002-03-04 Akim Demaille <akim@epita.fr>
19611
19612 * src/L0.c, src/LR0.h (nstates): Be size_t.
19613 Adjust comparisons (signed vs unsigned).
19614 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
19615 bitset*.
19616 Adjust all dependencies.
19617
19618 2002-03-04 Akim Demaille <akim@epita.fr>
19619
19620 * src/closure.c (firsts): Now, also a bitset.
19621 Adjust all dependencies.
19622 (varsetsize): Remove, now unused.
19623 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
19624
19625 2002-03-04 Akim Demaille <akim@epita.fr>
19626
19627 * src/print.c: Convert to use bitset.h, not hand coded iterations
19628 over ints.
19629
19630 2002-03-04 Akim Demaille <akim@epita.fr>
19631
19632 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
19633
19634 2002-03-04 Akim Demaille <akim@epita.fr>
19635
19636 * src/closure.c (ruleset): Be a bitset.
19637 (rulesetsize): Remove.
19638
19639 2002-03-04 Akim Demaille <akim@epita.fr>
19640
19641 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19642 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
19643 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
19644 * src/closure.c (fderives): Be an array of bitsets.
19645
19646 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
19647
19648 * data/bison.c++: Merge the two generated headers. Insert a copyright
19649 notice in each output file.
19650
19651 2002-02-28 Akim Demaille <akim@epita.fr>
19652
19653 * data/bison.c++: Copy the prologue of bison.simple to fetch
19654 useful M4 definitions, such as b4_header_guard.
19655
19656 2002-02-25 Akim Demaille <akim@epita.fr>
19657
19658 * src/getargs.c (version): Give the name of the authors, and use a
19659 translator friendly scheme for the bgr
19660 copyright notice.
19661
19662 2002-02-25 Akim Demaille <akim@epita.fr>
19663
19664 * src/output.c (header_output): Remove, now handled completely via
19665 M4.
19666
19667 2002-02-25 Akim Demaille <akim@epita.fr>
19668
19669 * m4/m4.m4: New, from CVS Autoconf.
19670 * configure.in: Invoke it.
19671 * src/output.c (output_skeleton): Use its result instead of the
19672 hard coded name.
19673
19674 2002-02-25 Akim Demaille <akim@epita.fr>
19675
19676 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
19677 Fileutils 4.1.5.
19678 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
19679 * src/output.c (output_skeleton): Use mkstemp to create a real
19680 temporary file.
19681 Move the filling of `skeleton' and its muscle to...
19682 (prepare): here.
19683 (output): Move the definition of the prologue muscle to...
19684 (prepare): here.
19685 * src/system.h (DEFAULT_TMPDIR): New.
19686
19687 2002-02-14 Paul Eggert <eggert@twinsun.com>
19688
19689 Remove the support for C++ namespace cleanliness; it was
19690 causing more problems than it was curing, since it didn't work
19691 properly on some nonstandard C++ compilers. This can wait
19692 for a proper C++ parser.
19693
19694 * NEWS: Document this.
19695 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
19696 of C++, as it's treated like C now.
19697 * src/bison.simple (YYSTD): Remove.
19698 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
19699 Treat C++ just like Standard C instead of trying to support
19700 namespace cleanliness.
19701
19702 2002-02-14 Akim Demaille <akim@epita.fr>
19703
19704 * tests/regression.at (else): Adjust to Andreas' change.
19705
19706 2002-02-14 Akim Demaille <akim@epita.fr>
19707
19708 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
19709
19710 2002-02-13 Andreas Schwab <schwab@suse.de>
19711
19712 * src/output.c (output_rule_data): Don't output NULL, it might
19713 not be defined yet.
19714
19715 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
19716
19717 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
19718 (Copyright notice): Update.
19719
19720 2002-02-11 Akim Demaille <akim@epita.fr>
19721
19722 * tests/regression.at (%nonassoc and eof): Don't include
19723 nonportable headers.
19724
19725 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
19726
19727 * data/bison.c++: Correct error recovery. Make the user able to
19728 initialize the starting location.
19729
19730 2002-02-07 Akim Demaille <akim@epita.fr>
19731
19732 * tests/input.at: New.
19733
19734 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19735
19736 * data/bison.c++: Replace some direct m4 expansions by constants. Be
19737 more consistent when naming methods and variables. Put preprocessor
19738 directives around tables only needed for debugging.
19739
19740 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19741
19742 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
19743 C++ parsers.
19744 (yy::b4_name::parse): Use print_.
19745
19746 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19747
19748 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
19749
19750 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19751
19752 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
19753 C++ parsers.
19754 (yy::b4_name::parse): Build verbose error messages, and use error_.
19755
19756 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19757
19758 * data/bison.c++: Fix m4 quoting in comments.
19759
19760 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19761
19762 * data/bison.c++: Adjust the parser code. Fix some muscles that were
19763 not expanded by m4.
19764
19765 2002-02-05 Akim Demaille <akim@epita.fr>
19766
19767 * data/bison.c++: Adjust to the M4 back end.
19768 More is certainly needed.
19769
19770 2002-02-05 Akim Demaille <akim@epita.fr>
19771
19772 Give a try to M4 as a back end.
19773
19774 * lib/readpipe.c: New, from wdiff.
19775 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
19776 BISON_HAIRY.
19777 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
19778 specific values. Now it is m4 that performs the lookup.
19779 * src/parse-skel.y: Remove.
19780 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
19781 * src/output.c (actions_output, guards_output)
19782 (token_definitions_output): No longer keeps track of the output
19783 line number, hence remove the second argument.
19784 (guards_output): Check against the guard member of a rule, not the
19785 action member.
19786 Adjust callers.
19787 (output_skeleton): Don't look for the skeleton location, let m4 do
19788 that.
19789 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
19790 file will be used.
19791 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
19792 (prepare): Given that for the time being changesyntax is not
19793 usable in M4, rename the muscles using `-' to `_'.
19794 Define `defines_flag', `output_parser_name' and `output_header_name'.
19795 * src/output.h (actions_output, guards_output)
19796 (token_definitions_output): Adjust prototypes.
19797 * src/scan-skel.l: Instead of scanning the skeletons, it now
19798 processes the output of m4: `__oline__' and `#output'.
19799 * data/bison.simple: Adjust to be used by M4(sugar).
19800 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
19801 to date.
19802 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
19803 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
19804 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
19805 shamelessly stolen from CVS Autoconf.
19806
19807 2002-02-05 Akim Demaille <akim@epita.fr>
19808
19809 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
19810 * configure.in: Check for the declarations of free and malloc.
19811 * src/muscle_tab.c: Adjust.
19812
19813 2002-02-05 Akim Demaille <akim@epita.fr>
19814
19815 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
19816 which have no values.
19817
19818 2002-02-05 Akim Demaille <akim@epita.fr>
19819
19820 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
19821 * data/: here.
19822
19823 2002-01-29 Paul Eggert <eggert@twinsun.com>
19824
19825 * src/bison.simple (YYSIZE_T): Do not define merely because
19826 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
19827 On some platforms, <alloca.h> does not declare YYSTD (size_t).
19828
19829 2002-01-27 Akim Demaille <akim@epita.fr>
19830
19831 Fix `%nonassoc and eof'.
19832
19833 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
19834 which were not properly copied! Replace
19835 memcpy (res->errs, src->errs, src->nerrs);
19836 with
19837 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
19838 !!!
19839 * tests/regression.at (%nonassoc and eof): Adjust to newest
19840 Autotest: `.' is not in the PATH.
19841
19842 2002-01-27 Akim Demaille <akim@epita.fr>
19843
19844 * tests/sets.at (AT_EXTRACT_SETS): New.
19845 (Nullable): Use it.
19846 (Firsts): New.
19847
19848 2002-01-26 Akim Demaille <akim@epita.fr>
19849
19850 * tests/actions.at, tests/calc.at, tests/headers.at,
19851 * tests/torture.at: Adjust to the newest Autotest which no longer
19852 forces `.' in the PATH.
19853
19854 2002-01-25 Akim Demaille <akim@epita.fr>
19855
19856 * tests/regression.at (%nonassoc and eof): New.
19857 Suggested by Robert Anisko.
19858
19859 2002-01-24 Akim Demaille <akim@epita.fr>
19860
19861 Bison dumps core when trying to complain about broken input files.
19862 Reported by Cris van Pelt.
19863
19864 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
19865 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
19866 into...
19867 (Invalid inputs): Strengthen: exercise parse_percent_token.
19868
19869 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
19870
19871 * src/Makefile.am: Add bison.c++.
19872 * src/bison.c++: New skeleton.
19873
19874 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
19875
19876 * po/it.po: New.
19877
19878 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
19879
19880 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
19881
19882 2002-01-20 Marc Autret <marc@gnu.org>
19883
19884 * src/files.c (compute_output_file_names): Fix
19885
19886 2002-01-20 Marc Autret <marc@gnu.org>
19887
19888 * tests/output.at: New test.
19889 * src/files.c (compute_base_names): Don't map extensions when
19890 the YACC flag is set, use defaults.
19891 Reported by Evgeny Stambulchik.
19892
19893 2002-01-20 Marc Autret <marc@gnu.org>
19894
19895 * src/system.h: Need to define __attribute__ away for non-GCC
19896 compilers as well (i.e., the vendor C compiler).
19897 Suggested by Albert Chin-A-Young.
19898
19899 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
19900
19901 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
19902 canonical definition.
19903 * src/system.h: Use the canonical definition for PARAMS (avoids
19904 a conflict with the macro from lib/hash.h).
19905
19906 2002-01-11 Akim Demaille <akim@epita.fr>
19907
19908 * configure.in: Use AC_FUNC_STRNLEN.
19909 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
19910
19911 2002-01-09 Akim Demaille <akim@epita.fr>
19912
19913 * src/files.c, src/files.h (output_infix): New.
19914 (tab_extension): Remove.
19915 (compute_base_names): Compute the former, drop the latter.
19916 * src/output.c (prepare): Insert the muscles `output-infix', and
19917 `output-suffix'.
19918 * src/parse-skel.y (string, string.1): New.
19919 (section.header): Use it.
19920 (section.yacc): Remove.
19921 (prefix): Remove too.
19922 * src/scan-skel.l: Adjust.
19923 * src/bison.simple, src/bison.hairy: Adjust.
19924
19925 2002-01-09 Akim Demaille <akim@epita.fr>
19926
19927 * configure.in (WERROR_CFLAGS): Compute it.
19928 * src/Makefile.am (CFLAGS): Pass it.
19929 * tests/atlocal.in (CFLAGS): Idem.
19930 * src/files.c: Fix a few warnings.
19931 (get_extension_index): Remove, unused.
19932
19933 2002-01-08 Akim Demaille <akim@epita.fr>
19934
19935 * src/getargs.c (AS_FILE_NAME): New.
19936 (getargs): Use it to convert DOSish file names.
19937 * src/files.c (base_name): Rename as full_base_name to avoid
19938 clashes with `base_name ()'.
19939 (filename_split): New.
19940 (compute_base_names): N-th rewrite, using filename_split.
19941
19942 2002-01-08 Akim Demaille <akim@epita.fr>
19943
19944 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
19945 New, stolen from the Fileutils 4.1.
19946 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19947 * configure.in: Check for the presence of memrchr, and of its
19948 prototype.
19949
19950 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
19951
19952 * lib/hash.h (__P): Added definition for this macro.
19953 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
19954 BUILT_SOURCES, to ensure they are generated first.
19955 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
19956 %error-verbose to allow bootstrapping with bison 1.30x.
19957
19958 2002-01-06 Akim Demaille <akim@epita.fr>
19959
19960 * src/reader.c (parse_braces): Don't fetch the next char, the
19961 convention is to fetch on entry.
19962 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
19963 'switch' without a following semicolon.
19964 * tests/regression.at (braces parsing): New.
19965
19966 2002-01-06 Akim Demaille <akim@epita.fr>
19967
19968 Bison is dead wrong in its RR conflict reports.
19969
19970 * tests/torture.at (GNU Cim Grammar): New.
19971 * src/conflicts.c (count_rr_conflicts): Fix.
19972
19973 2002-01-06 Akim Demaille <akim@epita.fr>
19974
19975 Creating package.m4 from configure.ac causes too many problems.
19976
19977 * tests/Makefile.am (package.m4): Create it by hand,
19978 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
19979
19980 2002-01-06 Akim Demaille <akim@epita.fr>
19981
19982 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
19983 skeleton.h.
19984
19985 2002-01-04 Paul Eggert <eggert@twinsun.com>
19986
19987 * doc/bison.texinfo (Debugging):
19988 Remove YYSTDERR; it's no longer defined or used.
19989 Also, s/cstdio.h/cstdio/.
19990
19991 2002-01-03 Akim Demaille <akim@epita.fr>
19992
19993 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
19994
19995 2002-01-03 Akim Demaille <akim@epita.fr>
19996
19997 * src/parse-skel.y (process_skeleton): Don't bind the parser's
19998 tracing code to --trace, wait for a better --trace option, with
19999 args.
20000
20001 2002-01-03 Akim Demaille <akim@epita.fr>
20002
20003 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
20004 The ISO C++ standard is extremely clear about it: stderr is
20005 considered a macro, not a regular symbol (see table 94 `Header
20006 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
20007 Therefore std:: does not apply to it. It still does with fprintf.
20008 Also, s/cstdio.h/cstdio/.
20009
20010 2002-01-03 Akim Demaille <akim@epita.fr>
20011
20012 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
20013 for non system headers.
20014
20015 2002-01-02 Akim Demaille <akim@epita.fr>
20016
20017 Equip the skeleton chain with location tracking, runtime trace,
20018 pure parser and scanner.
20019
20020 * src/parse-skel.y: Request a pure parser, locations, and prefix
20021 renaming.
20022 (%union): Having several members with the same type does not help
20023 type mismatches, simplify.
20024 (YYPRINT, yyprint): New.
20025 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
20026 (skel_error): this.
20027 Handle locations.
20028 * src/scan-skel.l: Adjust to these changes.
20029 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
20030 (LOCATION_PRINT, skel_control_t): New.
20031
20032 2001-12-30 Akim Demaille <akim@epita.fr>
20033
20034 * src/parse-skel.y: Get rid of the shift/reduce conflict:
20035 replace `gb' with BLANKS.
20036 * src/scan-skel.l: Adjust.
20037
20038 2001-12-30 Akim Demaille <akim@epita.fr>
20039
20040 * src/system.h: We don't need nor want bcopy.
20041 Throw away MS-DOS crap: we don't need getpid.
20042 * configure.in: We don't need strndup. It was even causing
20043 problems: because Flex includes the headers *before* us,
20044 _GNU_SOURCE is not defined by config.h, and therefore strndup was
20045 not visible.
20046 * lib/xstrndup.c: New.
20047 * src/scan-skel.l: Use it.
20048 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
20049 * src/parse-skel.y: Use %directives instead of #defines.
20050
20051 2001-12-30 Akim Demaille <akim@epita.fr>
20052
20053 * src/skeleton.h: New.
20054 * src/output.c (output_parser, output_master_parser): Remove, dead
20055 code.
20056 * src/output.h (get_lines_number, actions_output, guards_output)
20057 (token_definitions_output): Prototype them.
20058 * src/parse-skel.y: Add the license notice.
20059 Include output.h and skeleton.h.
20060 (process_skeleton): Returns void, and takes a single parameter.
20061 * src/scan-skel.l: Add the license notice.
20062 Include skeleton.h.
20063 Don't use %option yylineno: it seems that then Flex imagines
20064 REJECT has been used, and therefore it won't reallocate its
20065 buffers (which makes no other sense to me than a bug). It results
20066 in warnings for `unused: yy_flex_realloc'.
20067
20068 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
20069
20070 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20071 (MUSCLE_INSERT_PREFIX): ...to there.
20072 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
20073 (MUSCLE_INSERT_PREFIX): Move from here...
20074
20075 * src/bison.hairy: Add a section directive. Put braces around muscle
20076 names. This parser skeleton is still broken, but Bison should not
20077 choke on a bad muscle 'syntax'.
20078 * src/bison.simple: Add a section directive. Put braces around muscle
20079 names.
20080
20081 * src/files.h (strsuffix, stringappend): Add declarations.
20082 (tab_extension): Add declaration.
20083 (short_base_name): Add declaration.
20084
20085 * src/files.c (strsuffix, stringappend): No longer static. These
20086 functions are used in the skeleton parser.
20087 (tab_extension): New.
20088 (compute_base_names): Use the computations done in this function
20089 to guess if the generated parsers should have '.tab' in their
20090 names.
20091 (short_base_name): No longer static.
20092
20093 * src/output.c (output_skeleton): New.
20094 (output): Disable call to output_master_parser, and give a try to
20095 a new skeleton handling system.
20096 (guards_output, actions_output): No longer static.
20097 (token_definitions_output, get_lines_number): No longer static.
20098
20099 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20100
20101 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
20102 parse-skel.y.
20103
20104 * src/parse-skel.y: New file.
20105 * src/scan-skel.l: New file.
20106
20107 2001-12-29 Akim Demaille <akim@epita.fr>
20108
20109 %name-prefix is broken.
20110
20111 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20112 Adjust all dependencies.
20113 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20114 %name-prefix.
20115
20116 Renaming yylval but not yylloc is not consistent. Now we do.
20117
20118 * src/bison.simple: Prefix yylloc if used.
20119 * doc/bison.texinfo (Decl Summary): Document that.
20120
20121 2001-12-29 Akim Demaille <akim@epita.fr>
20122
20123 * doc/bison.texinfo: Promote `%long-directive' over
20124 `%long_directive'.
20125 Remove all references to fixed-output-files, yacc is enough.
20126
20127 2001-12-29 Akim Demaille <akim@epita.fr>
20128
20129 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20130 user prologue. These are defaults.
20131 * tests/actions.at (Mid-rule actions): Make sure the user can
20132 define YYDEBUG and YYERROR_VERBOSE.
20133
20134 2001-12-29 Akim Demaille <akim@epita.fr>
20135
20136 * src/output.c (header_output): Don't forget to export YYLTYPE and
20137 yylloc.
20138 * tests/headers.at (export YYLTYPE): New, make sure it does.
20139 * tests/regression.at (%union and --defines, Invalid CPP headers):
20140 Move to...
20141 * tests/headers.at: here.
20142
20143 2001-12-29 Akim Demaille <akim@epita.fr>
20144
20145 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20146
20147 2001-12-29 Akim Demaille <akim@epita.fr>
20148
20149 * tests/actions.at (Mid-rule actions): Output on a single line
20150 instead of several.
20151
20152 2001-12-29 Akim Demaille <akim@epita.fr>
20153
20154 * doc/bison.texinfo: Formatting changes.
20155
20156 2001-12-29 Akim Demaille <akim@epita.fr>
20157
20158 Don't store the token defs in a muscle, just be ready to output it
20159 on command. Now possible via `symbols'. Fixes a memory leak.
20160
20161 * src/output.c (token_definitions_output): New.
20162 (output_parser, header_output): Use it.
20163 * src/reader.c (symbols_save): Remove.
20164
20165 2001-12-29 Akim Demaille <akim@epita.fr>
20166
20167 * src/bison.simple: Do not provide a default for YYSTYPE and
20168 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20169 default.
20170
20171 2001-12-29 Akim Demaille <akim@epita.fr>
20172
20173 Mid-rule actions are simply... ignored!
20174
20175 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20176 the empty-rule associated to the dummy symbol, not to the host
20177 rule.
20178 * tests/actions.at (Mid-rule actions): New.
20179
20180 2001-12-29 Akim Demaille <akim@epita.fr>
20181
20182 Memory leak.
20183
20184 * src/reader.c (reader): Free grammar.
20185
20186 2001-12-29 Akim Demaille <akim@epita.fr>
20187
20188 Memory leak.
20189
20190 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20191 since it allocates it for each state, although only one is needed.
20192 (allocate_storage): Do it here.
20193
20194 2001-12-29 Akim Demaille <akim@epita.fr>
20195
20196 * src/options.h, src/options.c (create_long_option_table): Rename
20197 as...
20198 (long_option_table_new): this, with a clearer prototype.
20199 (percent_table): Remove, unused,
20200 * src/getargs.c (getargs): Adjust.
20201
20202 2001-12-29 Akim Demaille <akim@epita.fr>
20203
20204 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20205 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20206 as states.
20207
20208 2001-12-29 Akim Demaille <akim@epita.fr>
20209
20210 * src/lalr.c (build_relations): Rename `states' as `states1'.
20211 Sorry, I don't understand exactly what it is, no better name...
20212
20213 2001-12-29 Akim Demaille <akim@epita.fr>
20214
20215 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20216 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20217 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20218 as rules.
20219
20220 2001-12-29 Akim Demaille <akim@epita.fr>
20221
20222 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20223 ago.
20224
20225 2001-12-29 Akim Demaille <akim@epita.fr>
20226
20227 * src/reader.c, src/reader.h (user_toknums): Remove.
20228 Adjust all users to use symbols[i]->user_token_number.
20229
20230 2001-12-29 Akim Demaille <akim@epita.fr>
20231
20232 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20233 Adjust all users to use symbols[i]->prec or ->assoc.
20234
20235 2001-12-29 Akim Demaille <akim@epita.fr>
20236
20237 * src/reader.c, src/reader.h (tags): Remove.
20238 Adjust all users to use symbols[i]->tag.
20239
20240 2001-12-29 Akim Demaille <akim@epita.fr>
20241
20242 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20243 and rule_table.
20244 * src/reader.c (packsymbols): Fill this table.
20245 Drop sprec.
20246 * src/conflicts.c (resolve_sr_conflict): Adjust.
20247 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20248 single table.
20249 Use symbols[i]->tag instead of tags[i].
20250
20251 2001-12-29 Akim Demaille <akim@epita.fr>
20252
20253 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20254 In addition, put a comment in there, to replace...
20255 * tests/regression.at (%union and C comments): Remove.
20256
20257 2001-12-29 Akim Demaille <akim@epita.fr>
20258
20259 * tests/regression.at (Web2c Actions): Blindly move the actual
20260 output as expected output. The contents *seem* right to me, but I
20261 can't pretend reading perfectly parser tables... Nonetheless, all
20262 the other tests pass correctly, the table look OK, even though the
20263 presence of `$axiom' is to be noted: AFAICS it is useless (but
20264 harmless).
20265
20266 2001-12-29 Akim Demaille <akim@epita.fr>
20267
20268 * src/reader.c (readgram): Don't add the rule 0 if there were no
20269 rules read. In other words, add it _after_ having performed
20270 grammar sanity checks.
20271 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20272
20273 2001-12-29 Akim Demaille <akim@epita.fr>
20274
20275 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20276 visible, and some states have now a different number.
20277
20278 2001-12-29 Akim Demaille <akim@epita.fr>
20279
20280 * src/reader.c (readgram): Bind the initial rule's lineno to that
20281 of the first rule.
20282 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20283 (Solved SR Conflicts): Adjust rule 0's line number.
20284
20285 2001-12-29 Akim Demaille <akim@epita.fr>
20286
20287 Fix the `GAWK Grammar' failure.
20288
20289 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20290 the reductions of the first state which was mistakenly confused
20291 with the final state because precisely final_state was initialized
20292 to 0.
20293 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20294 now noticed by Bison.
20295 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20296 have a reduction on $default.
20297
20298 2001-12-29 Akim Demaille <akim@epita.fr>
20299
20300 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20301 rule line numbers.
20302 * src/closure.c (print_closure): Likewise.
20303 * src/derives.c (print_derives): Likewise.
20304 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20305 now.
20306
20307 2001-12-29 Akim Demaille <akim@epita.fr>
20308
20309 * src/lalr.c (lookaheads_print): New.
20310 (lalr): Call it when --trace-flag.
20311 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20312 are dumped.
20313
20314 2001-12-29 Akim Demaille <akim@epita.fr>
20315
20316 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20317 when walking through ritem, even via rule->rhs.
20318 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20319 (useful_production, useless_nonterminals): Likewise.
20320 (reduce_grammar_tables): Likewise, plus update nritems.
20321 * src/nullable.c (set_nullable): Likewise.
20322 * src/lalr.c (build_relations): Likewise.
20323 * tests/sets.at (Nullable): Adjust.
20324 Fortunately, now, the $axiom is no longer nullable.
20325
20326 2001-12-29 Akim Demaille <akim@epita.fr>
20327
20328 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20329 the 0-sentinel.
20330 * src/gram.c (ritem_longest_rhs): Likewise.
20331 * src/reduce.c (nonterminals_reduce): Likewise.
20332 * src/print_graph.c (print_graph): Likewise.
20333 * src/output.c (output_rule_data): Likewise.
20334 * src/nullable.c (set_nullable): Likewise.
20335
20336 2001-12-29 Akim Demaille <akim@epita.fr>
20337
20338 * src/output.c: Comment changes.
20339
20340 2001-12-27 Paul Eggert <eggert@twinsun.com>
20341
20342 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20343 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20344 Sparc, as they were causing more porting problems than the
20345 (minor) performance improvement was worth.
20346
20347 Also, catch up with 1.31's YYSTD.
20348
20349 2001-12-27 Akim Demaille <akim@epita.fr>
20350
20351 * src/output.c (output_gram): Rely on nritems, not the
20352 0-sentinel. See below.
20353 Use -1 as separator, not 0.
20354 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20355 Rely on -1 as separator in yyrhs, instead of 0.
20356 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20357 twice `Now at end of input', therefore there are two lines less to
20358 expect.
20359
20360 2001-12-27 Akim Demaille <akim@epita.fr>
20361
20362 * tests/regression.at (Unresolved SR Conflicts):
20363 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20364 below.
20365
20366 2001-12-27 Akim Demaille <akim@epita.fr>
20367
20368 * src/LR0.c (new_state): Recognize the final state by the fact it
20369 is reached by eoftoken.
20370 (insert_start_shifting_state, insert_eof_shifting_state)
20371 (insert_accepting_state, augment_automaton): Remove, since now
20372 these states are automatically computed from the initial state.
20373 (generate_states): Adjust.
20374 * src/print.c: When reporting a rule number to the user, substract
20375 1, so that the axiom rule is rule 0, and the first user rule is 1.
20376 * src/reduce.c: Likewise.
20377 * src/print_graph.c (print_core): For the time being, just as for
20378 the report, depend upon --trace-flags to dump the full set of
20379 items.
20380 * src/reader.c (readgram): Once the grammar read, insert the rule
20381 0: `$axiom: START-SYMBOL $'.
20382 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20383 number of the states has changed (the final state is no longer
20384 necessarily the last), catch up.
20385
20386 2001-12-27 Akim Demaille <akim@epita.fr>
20387
20388 Try to make the use of the eoftoken valid. Given that its value
20389 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20390 is used instead of > 0 where appropriate, (ii), depend upon nritems
20391 instead of the 0-sentinel.
20392
20393 * src/gram.h, src/gram.c (nritems): New.
20394 Expected to be duplication of nitems, but for the time being...
20395 * src/reader.c (packgram): Assert nritems and nitems are equal.
20396 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20397 * src/closure.c (print_closure, print_fderives): Likewise.
20398 * src/gram.c (ritem_print): Likewise.
20399 * src/print.c (print_core, print_grammar): Likewise.
20400 * src/print_graph.c: Likewise.
20401
20402 2001-12-27 Akim Demaille <akim@epita.fr>
20403
20404 * src/main.c (main): If there are complains after grammar
20405 reductions, then output the report anyway if requested, then die.
20406 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20407 * src/reader.c (eoftoken): New.
20408 (parse_token_decl): If the token being defined has value `0', it
20409 is the eoftoken.
20410 (packsymbols): No longer hack `tags' to insert `$' by hand.
20411 Be sure to preserve the value of the eoftoken.
20412 (reader): Make sure eoftoken is defined.
20413 Initialize nsyms to 0: now eoftoken is created just like the others.
20414 * src/print.c (print_grammar): Don't special case the eof token.
20415 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20416 lie anyway, albeit pleasant.
20417 * tests/calc.at: Exercise error messages with eoftoken.
20418 Change the grammar so that empty input is invalid.
20419 Adjust expectations.
20420 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20421
20422 2001-12-27 Akim Demaille <akim@epita.fr>
20423
20424 * configure.in: Check the protos of strchr ans strspn.
20425 Replace strchr if needed.
20426 * src/system.h: Provide the protos of strchr, strspn and memchr if
20427 missing.
20428 * lib/strchr.c: New.
20429 * src/reader.c (symbols_save): Use strchr.
20430
20431 2001-12-27 Akim Demaille <akim@epita.fr>
20432
20433 * src/print.c, src/print_graph.c (escape): New.
20434 Use it to quote the TAGS outputs.
20435 * src/print_graph.c (print_state): Now errors are in red, and
20436 reductions in green.
20437 Prefer high to wide: output the state number on a line of its own.
20438
20439 2001-12-27 Akim Demaille <akim@epita.fr>
20440
20441 * src/state.h, src/state.c (reductions_new): New.
20442 * src/LR0.c (set_state_table): Let all the states have a
20443 `reductions', even if reduced to 0.
20444 (save_reductions): Adjust.
20445 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20446 * src/print.c (print_reductions, print_actions): Adjust.
20447 * src/output.c (action_row): Adjust.
20448
20449 2001-12-27 Akim Demaille <akim@epita.fr>
20450
20451 * src/state.h, src/state.c (errs_new, errs_dup): New.
20452 * src/LR0.c (set_state_table): Let all the states have an errs,
20453 even if reduced to 0.
20454 * src/print.c (print_errs, print_reductions): Adjust.
20455 * src/output.c (output_actions, action_row): Adjust.
20456 * src/conflicts.c (resolve_sr_conflict): Adjust.
20457
20458 2001-12-27 Akim Demaille <akim@epita.fr>
20459
20460 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20461
20462 2001-12-27 Akim Demaille <akim@epita.fr>
20463
20464 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20465 * src/print.c: here.
20466 (lookaheadset, shiftset): New, used as additional storage by
20467 print_reductions.
20468 (print_results): Adjust.
20469 (print_shifts, print_gotos, print_errs): New, extracted from...
20470 (print_actions): here.
20471 * src/print_graph.c (print_actions): Remove dead code.
20472
20473 2001-12-27 Akim Demaille <akim@epita.fr>
20474
20475 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20476 `$n' and `@n'.
20477
20478 2001-12-27 Akim Demaille <akim@epita.fr>
20479
20480 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20481 (build_relations): Adjust.
20482
20483 2001-12-27 Akim Demaille <akim@epita.fr>
20484
20485 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20486 duplication.
20487
20488 2001-12-27 Akim Demaille <akim@epita.fr>
20489
20490 * src/reader.c (packgram): Catch nitems overflows.
20491
20492 2001-12-27 Akim Demaille <akim@epita.fr>
20493
20494 * src/files.c, src/files.h (guard_obstack): Remove.
20495 * src/output.c (output): Adjust.
20496 * src/reader.c (parse_braces): New, factoring...
20497 (copy_action, copy_guard): these two which are renamed as...
20498 (parse_action, parse_guard): these.
20499 As a voluntary consequence, using braces around guards is now
20500 mandatory.
20501
20502 2001-12-27 Akim Demaille <akim@epita.fr>
20503
20504 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20505 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20506 members.
20507 (symbol_list_new): Adjust.
20508 (copy_action): action_line is the first line, not the last.
20509 (copy_guard): Just as for actions, store the `action' only, not
20510 the switch/case/break flesh.
20511 Don't parse the user action that might follow the guard, let...
20512 (readgram): do it, i.e., now, there can be an action after a
20513 guard.
20514 In other words the guard is just explicitly optional.
20515 (packgram): Adjust.
20516 * src/output.c (guards_output): New.
20517 (output_parser): Call it when needed.
20518 (output): Also free the guard and attrs obstacks.
20519 * src/files.c, src/files.h (obstack_save): Remove.
20520 (output_files): Remove.
20521 As a result, if one needs the former `.act' file, using an
20522 appropriate skeleton which requires actions and guards is now
20523 required.
20524 * src/main.c (main): Adjust.
20525 * tests/semantic.at: New.
20526 * tests/regression.at: Use `input.y' as input file name.
20527 Avoid 8+3 problems by requiring input.c when the test needs the
20528 parser.
20529
20530 2001-12-27 Akim Demaille <akim@epita.fr>
20531
20532 * src/reader.c (symbol_list_new): Be sure to initialize all the
20533 fields.
20534
20535 2001-12-27 Akim Demaille <akim@epita.fr>
20536
20537 All the hacks using a final pseudo state are now useless.
20538
20539 * src/LR0.c (set_state_table): state_table holds exactly nstates.
20540 * src/lalr.c (nLA): New.
20541 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
20542 instead of lookaheadsp from the pseudo state (nstate + 1).
20543
20544 2001-12-27 Akim Demaille <akim@epita.fr>
20545
20546 * src/output.c (action_row, token_actions): Use a state_t instead
20547 of a integer, and nlookaheads instead of the following state's
20548 lookaheadsp.
20549
20550 2001-12-27 Akim Demaille <akim@epita.fr>
20551
20552 * src/conflicts.c (log_resolution, flush_shift)
20553 (resolve_sr_conflict, set_conflicts, solve_conflicts)
20554 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
20555 (conflicts_print, print_reductions): Use a state_t instead of an
20556 integer when referring to a state.
20557 As much as possible, depend upon nlookaheads, instead of the
20558 `lookaheadsp' member of the following state (since lookaheads of
20559 successive states are successive, the difference between state n + 1
20560 and n served as the number of lookaheads for state n).
20561 * src/lalr.c (add_lookback_edge): Likewise.
20562 * src/print.c (print_core, print_actions, print_state)
20563 (print_results): Likewise.
20564 * src/print_graph.c (print_core, print_actions, print_state)
20565 (print_graph): Likewise.
20566 * src/conflicts.h: Adjust.
20567
20568 2001-12-27 Akim Demaille <akim@epita.fr>
20569
20570 * src/bison.hairy: Formatting/comment changes.
20571 ANSIfy.
20572 Remove `register' indications.
20573 Add plenty of `static'.
20574
20575 2001-12-27 Akim Demaille <akim@epita.fr>
20576
20577 * src/output.c (prepare): Drop the muscle `ntbase' which
20578 duplicates ntokens.
20579 * src/bison.simple: Formatting/comment changes.
20580 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
20581 is an undocumented synonym.
20582
20583 2001-12-22 Akim Demaille <akim@epita.fr>
20584
20585 * src/output.c (output_table_data): Change the prototype to use
20586 `int' for array ranges: some invocations do pass an int, not a
20587 short.
20588 Reported by Wayne Green.
20589
20590 2001-12-22 Akim Demaille <akim@epita.fr>
20591
20592 Some actions of web2c.y are improperly triggered.
20593 Reported by Mike Castle.
20594
20595 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
20596 * tests/regression.at (Web2c): Rename as...
20597 (Web2c Report): this.
20598 (Web2c Actions): New.
20599
20600 2001-12-22 Akim Demaille <akim@epita.fr>
20601
20602 Reductions in web2c.y are improperly reported.
20603 Reported by Mike Castle.
20604
20605 * src/conflicts.c (print_reductions): Fix.
20606 * tests/regression.at (Web2c): New.
20607
20608 2001-12-18 Akim Demaille <akim@epita.fr>
20609
20610 Some host fail on `assert (!"foo")', which expands to
20611 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
20612 Reported by Nelson Beebee.
20613
20614 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
20615 `#define it_succeeded 0' and `assert (it_succeeded)'.
20616
20617 2001-12-17 Marc Autret <autret_m@epita.fr>
20618
20619 * src/bison.simple: Don't hard code the skeleton line and filename.
20620 * src/output.c (output_parser): Rename 'line' as 'output_line'.
20621 New line counter 'skeleton_line' (skeleton-line muscle).
20622
20623 2001-12-17 Paul Eggert <eggert@twinsun.com>
20624
20625 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
20626 YYDEBUG must be defined to a nonzero value.
20627
20628 * src/bison.simple (yytname): Do not assume that the user defines
20629 YYDEBUG to a properly parenthesized expression.
20630
20631 2001-12-17 Akim Demaille <akim@epita.fr>
20632
20633 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
20634 nlookaheads is a new member.
20635 Adjust all users.
20636 * src/lalr.h (nlookaheads): Remove this orphan declaration.
20637 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
20638 state.
20639
20640 2001-12-17 Akim Demaille <akim@epita.fr>
20641
20642 * src/files.h, src/files.c (open_files, close_files): Remove.
20643 * src/main.c (main): Don't open/close files, nor invoke lex_free,
20644 let...
20645 * src/reader.c (reader): Do it.
20646
20647 2001-12-17 Akim Demaille <akim@epita.fr>
20648
20649 * src/conflicts.c (print_reductions): Formatting changes.
20650
20651 2001-12-17 Akim Demaille <akim@epita.fr>
20652
20653 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
20654 (flush_reduce): New.
20655 (resolve_sr_conflict): Adjust.
20656
20657 2001-12-17 Akim Demaille <akim@epita.fr>
20658
20659 * src/output.c (output_obstack): Be static and rename as...
20660 (format_obstack): this, to avoid any confusion with files.c's
20661 output_obstack.
20662 * src/reader.h (muscle_obstack): Move to...
20663 * src/output.h: here, since it's defined in output.c.
20664
20665 2001-12-17 Akim Demaille <akim@epita.fr>
20666
20667 * src/output.c (action_row, save_column, default_goto)
20668 (sort_actions, matching_state, pack_vector): Better variable
20669 locality.
20670
20671 2001-12-17 Akim Demaille <akim@epita.fr>
20672
20673 * src/output.c: Various formatting changes.
20674
20675 2001-12-17 Akim Demaille <akim@epita.fr>
20676
20677 * src/files.c (output_files): Free the output_obstack.
20678 * src/main.c (main): Call print and print_graph conditionally.
20679 * src/print.c (print): Work unconditionally.
20680 * src/print_graph.c (print_graph): Work unconditionally.
20681 * src/conflicts.c (log_resolution): Output only if verbose_flag.
20682
20683 2001-12-16 Marc Autret <autret_m@epita.fr>
20684
20685 * src/output.c (actions_output): Fix. When we use %no-lines,
20686 there is one less line per action.
20687
20688 2001-12-16 Marc Autret <autret_m@epita.fr>
20689
20690 * src/bison.simple: Remove a useless #line directive.
20691 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
20692 * src/output.c (get_lines_number): New.
20693 (output_parser): Adjust, now takes care about the lines of a
20694 output muscles.
20695 Fix line numbering.
20696 (actions_output): Computes the number of lines taken by actions.
20697 (output_master_parser): Insert new skeleton which is the name of
20698 the output parser file name.
20699
20700 2001-12-15 Marc Autret <autret_m@epita.fr>
20701
20702 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
20703
20704 2001-12-15 Marc Autret <autret_m@epita.fr>
20705
20706 * src/output.c (output_gram): Keep track of the hairy one.
20707
20708 2001-12-15 Akim Demaille <akim@epita.fr>
20709
20710 Make `make distcheck' work.
20711
20712 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
20713 system.h which uses libgettext.h.
20714
20715 2001-12-15 Akim Demaille <akim@epita.fr>
20716
20717 * src/nullable.c (set_nullable): Useless rules must be skipped,
20718 otherwise, since we range over their symbols, we might look at a
20719 nonterminal which no longer ``exists'', i.e., it is not counted in
20720 `nvars', hence we overflow our arrays.
20721
20722 2001-12-15 Akim Demaille <akim@epita.fr>
20723
20724 The header can also be produced directly, without any obstack!
20725 Yahoo!
20726
20727 * src/files.c, src/files.h (defines_obstack): Remove.
20728 (compute_header_macro): Global.
20729 (defines_obstack_save): Remove.
20730 * src/reader.c (parse_union_decl): No longer output to
20731 defines_obstack: its content can be found in the `stype' muscle
20732 anyway.
20733 (output_token_translations): Merge into...
20734 (symbols_output): this.
20735 Rename as...
20736 (symbols_save): this.
20737 (reader): Adjust.
20738 * src/output.c (header_output): New.
20739 (output): Call it.
20740
20741 2001-12-15 Akim Demaille <akim@epita.fr>
20742
20743 * src/reader.c (parse_union_decl): Instead of handling two obstack
20744 simultaneously, use one to define the `stype' muscle, and use the
20745 value of the latter to fill defines_obstack.
20746 (copy_comment): Remove.
20747 (copy_comment2): Work for a single obstack.
20748 Rename as...
20749 (copy_comment): this.
20750
20751 2001-12-15 Akim Demaille <akim@epita.fr>
20752
20753 * src/lex.c, src/lex.h (xgetc): No longer static.
20754 * src/reader.c (parse_union_decl): Revamp.
20755
20756 2001-12-15 Akim Demaille <akim@epita.fr>
20757
20758 Still making progress in separating Bison into (i) input, (ii)
20759 process, (iii) output: now we can directly output the parser file
20760 without using table_obstack at all.
20761
20762 * src/files.c, src/files.h (table_obstack): Bye bye.
20763 (parser_file_name): New.
20764 * src/files.c (compute_output_file_names): Compute it.
20765 * src/output.c (actions_output, output_parser)
20766 (output_master_parser): To a file instead of an obstack.
20767
20768 2001-12-15 Akim Demaille <akim@epita.fr>
20769
20770 Attach actions to rules, instead of pre-outputting them to
20771 actions_obstack.
20772
20773 * src/gram.h (rule_t): action and action_line are new members.
20774 * src/reader.c (symbol_list): Likewise.
20775 (copy_action): Save the actions within the rule.
20776 (packgram): Save them in rule_table.
20777 * src/output.c (actions_output): New.
20778 (output_parser): Use it on `%%actions'.
20779 (output_rule_data): Don't free rule_table.
20780 (output): Do it.
20781 (prepare): Don't save the `action' muscle.
20782 * src/bison.simple: s/%%action/%%actions/.
20783
20784 2001-12-15 Akim Demaille <akim@epita.fr>
20785
20786 * src/reader.c (copy_action): When --yacc, don't append a `;'
20787 to the user action: let it fail if lacking.
20788 Suggested by Arnold Robbins and Tom Tromey.
20789
20790 2001-12-14 Akim Demaille <akim@epita.fr>
20791
20792 * src/lex.c (literalchar): Simply return the char you decoded, non
20793 longer mess around with obstacks and int pointers.
20794 Adjust all callers.
20795
20796 2001-12-14 Akim Demaille <akim@epita.fr>
20797
20798 * src/lex.c (literalchar): Don't escape the special characters,
20799 just decode them, and keep them as char (before, eol was output as
20800 the 2 char string `\n' etc.).
20801 * src/output.c (output_rule_data): Use quotearg to output the
20802 token strings.
20803
20804 2001-12-13 Paul Eggert <eggert@twinsun.com>
20805
20806 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
20807 Do not infringe on the global user namespace when using C++.
20808 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
20809 All uses of `fprintf' and `stderr' changed.
20810
20811 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
20812
20813 2001-12-13 Akim Demaille <akim@epita.fr>
20814
20815 The computation of nullable is broken: it doesn't handle empty
20816 RHS's properly.
20817
20818 * tests/torture.at (GNU AWK Grammar): New.
20819 * tests/sets.at (Nullable): New.
20820 * src/nullable.c (set_nullable): Instead of blindly looping over
20821 `ritems', loop over the rules, and then over their rhs's.
20822
20823 Work around Autotest bugs.
20824
20825 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
20826 frame, because Autotest understand lines starting with a `+' as
20827 traces from the shell. Then, they are not processed properly.
20828 Admittedly an Autotest bug, but we don't have time to wait for
20829 Autotest to catch up.
20830 * tests/regression.at (Broken Closure): Adjust to the new table
20831 frames.
20832 Move to...
20833 * tests/sets.at: here.
20834
20835 2001-12-13 Akim Demaille <akim@epita.fr>
20836
20837 * src/closure.c (closure): Use nrules instead of playing tricks
20838 with BITS_PER_WORD.
20839
20840 2001-12-13 Akim Demaille <akim@epita.fr>
20841
20842 * src/print.c (print_actions): Output the handling of `$' as the
20843 traces do: shifting the token EOF. Before EOF was treated as a
20844 nonterminal.
20845 * tests/regression.at: Adjust some tests.
20846 * src/print_graph.c (print_core): Complete the set of items via
20847 closure. The next-to-final and final states are still unsatisfying,
20848 but that's to be addressed elsewhere.
20849 No longer output the rule numbers, but do output the state number.
20850 A single loop for the shifts + gotos is enough, but picked a
20851 distinct color for each.
20852 (print_graph): Initialize and finalize closure.
20853
20854 2001-12-13 Akim Demaille <akim@epita.fr>
20855
20856 * src/reader.c (readgram): Remove dead code, an strip useless
20857 braces.
20858 (get_type): Remove, unused.
20859
20860 2001-12-12 Akim Demaille <akim@epita.fr>
20861
20862 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
20863 on that of lib/error.c.
20864
20865 2001-12-12 Akim Demaille <akim@epita.fr>
20866
20867 Some hosts don't like `/' in includes.
20868
20869 * src/system.h: Include libgettext.h without qualifying the path.
20870 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
20871 $(top_srcdir).
20872
20873 2001-12-11 Marc Autret <autret_m@epita.fr>
20874
20875 * src/output.c (output_parser): Remove useless muscle.
20876
20877 2001-12-11 Marc Autret <autret_m@epita.fr>
20878
20879 * src/bison.simple: Remove #line just before %%epilogue. It
20880 is now handled in ...
20881 * src/reader.c (read_additionnal_code): Add the output of a
20882 #line for the epilogue.
20883
20884 2001-12-10 Marc Autret <autret_m@epita.fr>
20885
20886 * src/reader.c (copy_definition): Re-use CPP-outed code which
20887 replace precedent remove.
20888 * src/bison.simple: Remove #line before %%prologue because
20889 %%input-line is wrong at this time.
20890
20891 2001-12-10 Marc Autret <autret_m@epita.fr>
20892
20893 * src/reader.c (symbols_output): Clean up.
20894 * src/output.c (output_gram, output): Clean up.
20895
20896 2001-12-10 Akim Demaille <akim@epita.fr>
20897
20898 * src/lalr.c (initialize_lookaheads): New. Extracted from...
20899 * src/LR0.c (set_state_table): here.
20900 * src/lalr.c (lalr): Call it.
20901
20902 2001-12-10 Akim Demaille <akim@epita.fr>
20903
20904 * src/state.h (shifts): Remove the `number' member: shifts are
20905 attached to state, hence no longer need to be labelled with a
20906 state number.
20907
20908 2001-12-10 Akim Demaille <akim@epita.fr>
20909
20910 Now that states have a complete set of members, the linked list of
20911 shifts is useless: just fill directly the state's shifts member.
20912
20913 * src/state.h (shifts): Remove the `next' member.
20914 * src/LR0.c (first_state, last_state): Remove.
20915 Adjust the callers.
20916 (augment_automaton): Don't look for the shifts that must be added
20917 a shift on EOF: it is those of the state we looked for! But now,
20918 since shifts are attached, it is no longer needed to looking
20919 merely by its id: its number.
20920
20921 2001-12-10 Akim Demaille <akim@epita.fr>
20922
20923 * src/LR0.c (augment_automaton): Better variable locality.
20924 Remove an impossible branch: if there is a state corresponding to
20925 the start symbol being shifted, then there is shift for the start
20926 symbol from the initial state.
20927
20928 2001-12-10 Akim Demaille <akim@epita.fr>
20929
20930 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
20931 only when appropriate: when insert_start_shifting_state' is not
20932 invoked.
20933 * tests/regression.at (Rule Line Numbers): Adjust.
20934
20935 2001-12-10 Akim Demaille <akim@epita.fr>
20936
20937 * src/LR0.c (augment_automaton): Now that all states have shifts,
20938 merge the two cases addition shifts to the initial state.
20939
20940 2001-12-10 Akim Demaille <akim@epita.fr>
20941
20942 * src/lalr.c (set_state_table): Move to...
20943 * src/LR0.c: here.
20944 * src/lalr.c (lalr): Don't call it...
20945 * src/LR0.c (generate_states): do it.
20946 * src/LR0.h (first_state): Remove, only the table is used.
20947
20948 2001-12-10 Akim Demaille <akim@epita.fr>
20949
20950 * src/LR0.h (first_shift, first_reduction): Remove.
20951 * src/lalr.c: Don't use first_shift: find shifts through the
20952 states.
20953
20954 2001-12-10 Akim Demaille <akim@epita.fr>
20955
20956 * src/LR0.c: Attach shifts to states as soon as they are
20957 computed.
20958 * src/lalr.c (set_state_table): Instead of assigning shifts to
20959 state, just assert that the mapping was properly done.
20960
20961 2001-12-10 Akim Demaille <akim@epita.fr>
20962
20963 * src/LR0.c (insert_start_shift): Rename as...
20964 (insert_start_shifting_state): this.
20965 (insert_eof_shifting_state, insert_accepting_state): New.
20966 (augment_automaton): Adjust.
20967 Better locality of the variables.
20968 When looking if the start_symbol is shifted from the initial
20969 state, using `while (... symbol != start_symbol ...)' sounds
20970 better than `while (... symbol < start_symbol ...)': If fail
20971 to see how the order between symbols could be relevant!
20972
20973 2001-12-10 Akim Demaille <akim@epita.fr>
20974
20975 * src/getargs.h: Don't declare `spec_name_prefix' and
20976 `spec_file_prefix', declared by src/files.h.
20977 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
20978 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
20979 * src/output.c (prepare): Adjust.
20980 * src/reader.c (symbols_output): Likewise.
20981 * src/vmsgetargs.c: Vaguely adjust, but who cares?
20982
20983 2001-12-10 Akim Demaille <akim@epita.fr>
20984
20985 * src/muscle_tab.c (muscle_init): NULL is a better default than
20986 `"0"'.
20987
20988 2001-12-10 Akim Demaille <akim@epita.fr>
20989
20990 * src/reader.c (reader): Calling symbols_output once is enough.
20991
20992 2001-12-10 Akim Demaille <akim@epita.fr>
20993
20994 Now that states have a complete set of members, the linked list of
20995 reductions is useless: just fill directly the state's reductions
20996 member.
20997
20998 * src/state.h (struct reductions): Remove member `number' and
20999 `next'.
21000 * src/LR0.c (first_reduction, last_reduction): Remove.
21001 (save_reductions): Don't link the new reductions, store them in
21002 this_state.
21003 * src/lalr.c (set_state_table): No need to attach reductions to
21004 states, it's already done.
21005 * src/output.c (output_actions): No longer free the shifts, then
21006 the reductions, then the states: free all the states and their
21007 members.
21008
21009 2001-12-10 Akim Demaille <akim@epita.fr>
21010
21011 * src/options.c (OPTN, DRTV, BOTH): New.
21012 (option_table): Use them.
21013
21014 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
21015 the job of system.h.
21016 * src/options.c: Don't include stdio.h and xalloc.h for the same
21017 reasons.
21018
21019 2001-12-10 Akim Demaille <akim@epita.fr>
21020
21021 * src/output.c (output, prepare): Make sure the values of the
21022 muscles `action' and `prologue' are 0-terminated.
21023
21024 2001-12-10 Akim Demaille <akim@epita.fr>
21025
21026 Clean up GCC warnings.
21027
21028 * src/reader.c (copy_action): `buf' is not used.
21029 (parse_skel_decl): Be static.
21030 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
21031 * src/options.h (create_long_option_table): Have a real prototype.
21032 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
21033 (hash_delete_at): Return const void *.
21034 Adjust casts to preserve the const.
21035
21036 2001-12-10 Akim Demaille <akim@epita.fr>
21037
21038 * configure.in: Require 2.52g.
21039 M4 is not needed, but AUTOM4TE is.
21040 * m4/m4.m4: Remove.
21041 * tests/Makefile.am: Adjust.
21042
21043 2001-12-10 Akim Demaille <akim@epita.fr>
21044
21045 One structure for states is enough, even though theoretically
21046 there are LR(0) states and LALR(1) states.
21047
21048 * src/lalr.h (state_t): Remove.
21049 (state_table): Be state_t **, not state_t *.
21050 * src/state.h (core, CORE_ALLOC): Rename as...
21051 (state_t, STATE_ALLOC): this.
21052 Add the LALR(1) members: shifts, reductions, errs.
21053 * src/LR0.c (state_table): Rename as...
21054 (state_hash): this, to avoid name clashes with the global
21055 `state_table'.
21056 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
21057 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
21058
21059 2001-12-10 Akim Demaille <akim@epita.fr>
21060
21061 Bison dumps core on bash.y.
21062 Reported by Pascal Bart.
21063
21064 * src/warshall.c (bitmatrix_print): New.
21065 (TC): Use it.
21066 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
21067 j must be the outer loop.
21068 * tests/regression.at (Broken Closure): New.
21069
21070 2001-12-05 Akim Demaille <akim@epita.fr>
21071
21072 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
21073 its argument.
21074 Reported by Peter Hamorsky.
21075
21076 2001-12-05 Akim Demaille <akim@epita.fr>
21077
21078 * src/conflicts.c (err_table): Remove.
21079 (resolve_sr_conflict): Adjust.
21080 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
21081 Rename as...
21082 (state_t.reductions, state_t.shifts): this.
21083
21084 2001-12-05 Akim Demaille <akim@epita.fr>
21085
21086 * src/reduce.c (reduce_grammar_tables): No longer disable the
21087 removal of useless rules via CPP but via `if (0)', so that the
21088 compiler still check the code is valid.
21089 For instance, it should have noticed `rline' no longer exists: use
21090 the `line' member of rule_t.
21091 * src/gram.c (dummy, rline): Remove, unused.
21092
21093 2001-12-05 Akim Demaille <akim@epita.fr>
21094
21095 * src/output.c (pack_vector): Use assert, not berror.
21096 * src/main.c (berror): Remove, unused.
21097
21098 2001-12-05 Akim Demaille <akim@epita.fr>
21099
21100 New experimental feature: if --verbose --trace output all the
21101 items of a state, not only its kernel.
21102
21103 * src/print.c (print_core): If `trace_flag', then invoke closure
21104 before outputting the items of the state (print_core is no longer
21105 a correct name them).
21106 (print_results): Invoke new_closure/free_closure if needed.
21107
21108 2001-12-05 Akim Demaille <akim@epita.fr>
21109
21110 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21111 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21112 (nitemset): for consistency with the rest of the project.
21113
21114 2001-12-05 Akim Demaille <akim@epita.fr>
21115
21116 * src/closure.c (print_closure): Improve.
21117 (closure): Use it for printing input and output.
21118
21119 2001-12-05 Akim Demaille <akim@epita.fr>
21120
21121 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21122 indexed by nonterminals.
21123
21124 2001-12-05 Akim Demaille <akim@epita.fr>
21125
21126 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21127 what it was!).
21128 * src/warshall.h: Remove accidental duplication of the content.
21129
21130 2001-12-05 Akim Demaille <akim@epita.fr>
21131
21132 * src/closure.c (set_fderives): De-obfuscate.
21133
21134 2001-12-05 Akim Demaille <akim@epita.fr>
21135
21136 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21137
21138 2001-12-05 Akim Demaille <akim@epita.fr>
21139
21140 * src/closure.c (set_firsts): De-obfuscate.
21141
21142 2001-12-05 Akim Demaille <akim@epita.fr>
21143
21144 * src/output.c (action_row): De-obfuscate
21145 using the good o' techniques: arrays not pointers, variable
21146 locality, BITISSET, RESETBIT etc.
21147
21148 2001-12-05 Akim Demaille <akim@epita.fr>
21149
21150 Pessimize the code to simplify it: from now on, all the states
21151 have a valid SHIFTS, which NSHIFTS is possibly 0.
21152
21153 * src/LR0.c (shifts_new): Be global and move to..
21154 * src/state.c, src/state.h: here.
21155 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21156 * src/print_graph: Adjust.
21157
21158 2001-12-05 Akim Demaille <akim@epita.fr>
21159
21160 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21161 * src/conflicts.c: Use it.
21162 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21163 incorrectly ``simplified''.
21164
21165 2001-12-05 Akim Demaille <akim@epita.fr>
21166
21167 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21168 using the good o' techniques: arrays not pointers, variable
21169 locality, BITISSET, RESETBIT etc.
21170
21171 2001-12-05 Akim Demaille <akim@epita.fr>
21172
21173 * src/state.h (SHIFT_SYMBOL): New.
21174 * src/conflicts.c: Use it to deobfuscate.
21175
21176 2001-12-05 Akim Demaille <akim@epita.fr>
21177
21178 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21179 (print_reductions): De-obfuscate using the good o' techniques:
21180 arrays not pointers, variable locality, BITISSET.
21181
21182 2001-12-05 Akim Demaille <akim@epita.fr>
21183
21184 * src/conflicts.c (print_reductions): Arrays, not pointers.
21185 Use BITISSET.
21186
21187 2001-12-05 Akim Demaille <akim@epita.fr>
21188
21189 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21190
21191 2001-12-05 Akim Demaille <akim@epita.fr>
21192
21193 * src/conflicts.c (print_reductions): Improve variable locality.
21194
21195 2001-12-05 Akim Demaille <akim@epita.fr>
21196
21197 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21198
21199 2001-12-05 Akim Demaille <akim@epita.fr>
21200
21201 * src/conflicts.c (print_reductions): Improve variable locality.
21202
21203 2001-12-05 Akim Demaille <akim@epita.fr>
21204
21205 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21206 * src/lalr.c: Use them.
21207
21208 2001-12-05 Akim Demaille <akim@epita.fr>
21209
21210 * src/LR0.c (augment_automaton): Formatting changes.
21211 Better variable locality.
21212
21213 2001-12-05 Akim Demaille <akim@epita.fr>
21214
21215 * src/lalr.c (matrix_print): New.
21216 (transpose): Use it.
21217 Use arrays instead of pointers.
21218
21219 2001-12-05 Akim Demaille <akim@epita.fr>
21220
21221 * src/lalr.c (maxrhs): Move to...
21222 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21223 * src/lalr.c (build_relations): Adjust.
21224
21225 2001-12-05 Akim Demaille <akim@epita.fr>
21226
21227 * src/lalr.c (transpose): Free the memory allocated to the
21228 argument, as it is replaced by the results by the unique caller.
21229 (build_relations): Merely invoke transpose: it handles the memory
21230 deallocation.
21231 Improve variable locality.
21232 Avoid variables used as mere abbreviations.
21233 (compute_lookaheads): Use arrays instead of pointers.
21234
21235 2001-12-05 Akim Demaille <akim@epita.fr>
21236
21237 * src/lalr.c (initialize_F): Improve variable locality.
21238 Avoid variables used as mere abbreviations.
21239
21240 2001-12-05 Akim Demaille <akim@epita.fr>
21241
21242 * src/derives.c (print_derives): Display the ruleno.
21243 * src/lalr.c (initialize_F, transpose): Better variable locality
21244 to improve readability.
21245 Avoid variables used as mere abbreviations.
21246
21247 2001-12-05 Akim Demaille <akim@epita.fr>
21248
21249 * src/lalr.c (traverse): Use arrays instead of pointers.
21250
21251 2001-12-05 Akim Demaille <akim@epita.fr>
21252
21253 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21254 the handling of squeue.
21255 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21256
21257 2001-12-05 Akim Demaille <akim@epita.fr>
21258
21259 Because useless nonterminals are now kept alive (instead of being
21260 `destroyed'), we now sometimes examine them, and store information
21261 related to them. Hence we need to know their number, and adjust
21262 memory allocations.
21263
21264 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21265 static.
21266 * src/LR0.c (allocate_itemsets): The memory allocated to
21267 `symbol_count' was used for two different purpose: once to count
21268 the number of occurrences of each symbol, and later reassigned to
21269 `shift_symbol', containing the symbol that can be shifted from a
21270 given state.
21271 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21272 only, and...
21273 (new_itemsets): Allocate `shift_symbol' here.
21274 (allocate_itemsets): symbol_count includes useless nonterminals.
21275 Make room for them.
21276 (free_storage): Use `free', not `XFREE', for pointers that cannot
21277 be null.
21278
21279 2001-12-05 Akim Demaille <akim@epita.fr>
21280
21281 * src/nullable.c (set_nullable): Deobfuscate the handling of
21282 ritem.
21283 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21284
21285 2001-12-05 Akim Demaille <akim@epita.fr>
21286
21287 * src/gram.c, src/gram.h (ritem_print): New.
21288 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21289 (This useless function was defined only to work around VMS linkers
21290 that can't handle compilation units with variables only).
21291 * src/reduce.c (dump_grammar): Use it to trace the construction of
21292 ritem.
21293
21294 2001-12-04 Paul Eggert <eggert@twinsun.com>
21295
21296 * src/bison.simple (union yyalloc): Change member names
21297 to be the same as the stack names.
21298 (yyparse): yyptr is now union yyalloc *, not char *.
21299 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21300 and may generate better code on some machines.
21301 (yystpcpy): Use prototype if __STDC__ is defined, not just
21302 if __cplusplus is defined.
21303
21304 2001-11-30 Akim Demaille <akim@epita.fr>
21305
21306 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21307 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21308 Gettext doesn't compile cleanly, and dies with -Werror.
21309 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21310 Include WARNING_CFLAGS here.
21311 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21312 before being defined.
21313
21314 2001-11-27 Paul Eggert <eggert@twinsun.com>
21315
21316 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21317 First arg is int, not unsigned.
21318 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21319 (SIZE_MAX, UINT_MAX): New macros.
21320 (quotearg_n_options): Abort if N is negative.
21321 Avoid overflow check on hosts where size_t is 64 bits and int
21322 is 32 bits, as overflow is impossible there.
21323 Fix off-by-one typo that caused unnecessary reallocation.
21324
21325 2001-11-29 Paul Eggert <eggert@twinsun.com>
21326
21327 Name space cleanup in generated parser.
21328
21329 * doc/bison.texinfo (Bison Parser): Discuss system headers
21330 and their effect on the user name space.
21331
21332 * src/bison.simple:
21333 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21334 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21335 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21336
21337 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21338 on user names when possible.
21339
21340 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21341 Simplify test for whather <alloca.h> exists.
21342
21343 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21344
21345 (<stdio.h>): Include if YYDEBUG.
21346
21347 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21348 ! defined (yyoverflow) && ! defined (yymemcpy).
21349
21350 (yymemcpy, yyparse): Rename local variables as needed so that
21351 they all begin with 'yy'.
21352
21353 (yystrlen, yystpcpy): New functions.
21354
21355 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21356 All uses changed.
21357
21358 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21359 instead of relying on string.h functions. Use YYSTACK_ALLOC
21360 and YYSTACK_FREE instead of malloc and free.
21361
21362 2001-11-30 Akim Demaille <akim@epita.fr>
21363
21364 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21365 before their first uses.
21366 (YYBISON, YYPURE): Move to the top of the output.
21367
21368 2001-11-30 Akim Demaille <akim@epita.fr>
21369
21370 * tests/reduce.at (Useless Nonterminals): Fix.
21371
21372 2001-11-30 Akim Demaille <akim@epita.fr>
21373
21374 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21375 if body instead of `;' to pacify GCC's warnings.
21376
21377 2001-11-30 Akim Demaille <akim@epita.fr>
21378
21379 Instead of mapping the LHS of unused rules to -1, keep the LHS
21380 valid, but flag the rules as invalid.
21381
21382 * src/gram.h (rule_t): `useful' is a new member.
21383 * src/print.c (print_grammar): Adjust.
21384 * src/derives.c (set_derives): Likewise.
21385 * src/reader.c (packgram, reduce_output): Likewise.
21386 * src/reduce.c (reduce_grammar_tables): Likewise.
21387 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21388
21389 2001-11-30 Akim Demaille <akim@epita.fr>
21390
21391 * src/reduce.c (reduce_output): Formatting changes.
21392 * src/print.c (print_results, print_grammar): Likewise.
21393 * tests/regression.at (Rule Line Numbers)
21394 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21395
21396 2001-11-30 Akim Demaille <akim@epita.fr>
21397
21398 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21399 useless nonterminals, move them at the end of the symbol arrays.
21400 (reduce_output): Adjust.
21401 * tests/reduce.at (Useless Nonterminals): Adjust.
21402
21403 2001-11-30 Akim Demaille <akim@epita.fr>
21404
21405 * src/reduce.c: Various comment/formatting changes.
21406 (nonterminals_reduce): New, extracted from...
21407 (reduce_grammar_tables): here.
21408 (reduce_grammar): Call nonterminals_reduce.
21409
21410 2001-11-29 Paul Eggert <eggert@twinsun.com>
21411
21412 * src/bison.simple (YYSTACK_REALLOC): Remove.
21413 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21414 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21415 New macros.
21416 (union yyalloc): New type.
21417 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21418 an arbitrary restriction on hosts where size_t is wider than int.
21419
21420 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21421 a parser stack overflow. Allocate just one block of memory for all
21422 three stacks, instead of allocating three blocks; this typically is
21423 faster and reduces fragmentation.
21424
21425 Do not limit the number of items in the stack to a value that fits
21426 in 'int', as this is an arbitrary limit on hosts with 64-bit
21427 size_t and 32-bit int.
21428
21429 2001-11-29 Marc Autret <autret_m@epita.fr>
21430
21431 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21432 of defining YYERROR_VERBOSE.
21433 [AT_DATA]: $4 is now out of C declarations in the prologue.
21434
21435 2001-11-28 Marc Autret <autret_m@epita.fr>
21436
21437 * src/reader.c (parse_dquoted_param): New.
21438 (parse_skel_decl): Use it.
21439 * src/lex.h: Add its prototype.
21440 * src/lex.c (literalchar): Become not static.
21441
21442 2001-11-28 Marc Autret <autret_m@epita.fr>
21443
21444 * src/output.h: And put its extern declaration here.
21445 * src/output.c (error_verbose): Define here.
21446 (prepare): Echo name modification.
21447 * src/getargs.h: Clean its extern declaration.
21448 * src/getargs.c (error_verbose_flag): Remove.
21449 (getargs): Remove case 'e'.
21450 * src/options.c (option_table): 'error-verbose' is now seen as simple
21451 percent option.
21452 Include output.h.
21453
21454 * src/reader.c (read_declarations): Remove case tok_include.
21455 (parse_include_decl): Remove.
21456 * src/lex.h (token_t): Remove tok_include.
21457 * src/options.c (option_table): 'include' is now a simple command line
21458 option.
21459
21460 2001-11-28 Marc Autret <autret_m@epita.fr>
21461
21462 * src/bison.simple: Adjust muscle names.
21463 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21464 * src/output.c (prepare): s/_/-/ for the muscles names.
21465 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21466
21467 2001-11-28 Marc Autret <autret_m@epita.fr>
21468
21469 * src/bison.simple: Fix debug.
21470 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21471
21472 2001-11-28 Akim Demaille <akim@epita.fr>
21473
21474 * src/LR0.c (shifts_new): New.
21475 (save_shifts, insert_start_shift, augment_automaton): Use it.
21476
21477 2001-11-28 Akim Demaille <akim@epita.fr>
21478
21479 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21480 keep ruleno only.
21481
21482 2001-11-28 Akim Demaille <akim@epita.fr>
21483
21484 * src/closure.c (closure): Instead of looping over word in array
21485 then bits in words, loop over bits in array.
21486
21487 2001-11-28 Akim Demaille <akim@epita.fr>
21488
21489 * src/closure.c (closure): No longer optimize the special case
21490 where all the bits of `ruleset[r]' are set to 0, to make the code
21491 clearer.
21492
21493 2001-11-28 Akim Demaille <akim@epita.fr>
21494
21495 * src/closure.c (closure): `r' and `c' are new variables, used to
21496 de-obfuscate accesses to RULESET and CORE.
21497
21498 2001-11-28 Akim Demaille <akim@epita.fr>
21499
21500 * src/reduce.c (reduce_print): Use ngettext.
21501 (dump_grammar): Improve the trace accuracy.
21502
21503 2001-11-28 Akim Demaille <akim@epita.fr>
21504
21505 * src/reduce.c (dump_grammar): Don't translate trace messages.
21506
21507 2001-11-28 Akim Demaille <akim@epita.fr>
21508
21509 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21510 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21511 as all tags are free'ed afterwards.
21512 From Enrico Scholz.
21513
21514 2001-11-27 Paul Eggert <eggert@twinsun.com>
21515
21516 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21517 use alloca when we didn't want to, and vice versa.
21518
21519 2001-11-27 Marc Autret <autret_m@epita.fr>
21520
21521 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21522 initialization.
21523 * src/output.c (prepare): Remove its update.
21524
21525 2001-11-27 Marc Autret <autret_m@epita.fr>
21526
21527 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21528 Use %error-verbose.
21529
21530 2001-11-27 Marc Autret <autret_m@epita.fr>
21531
21532 * src/bison.simple: Remove YYERROR_VERBOSE using.
21533 Use %%error_verbose.
21534 (yyparse): Likewise.
21535 * src/output.c (prepare): Give its final value.
21536 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21537 * src/getargs.h: Add its extern declaration.
21538 * src/getargs.c (error_verbose_flag): New int.
21539 (getargs): Update to catch new case.
21540 * src/options.c (option_table): 'error-verbose' is a new option.
21541 (shortopts): Update.
21542
21543 2001-11-27 Akim Demaille <akim@epita.fr>
21544
21545 * src/system.h: Use intl/libgettext.h.
21546 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
21547
21548 2001-11-27 Akim Demaille <akim@epita.fr>
21549
21550 * tests/torture.at (Exploding the Stack Size with Malloc):
21551 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
21552
21553 2001-11-27 Akim Demaille <akim@epita.fr>
21554
21555 * src/files.c: Include error.h.
21556 Reported by Hans Aberg.
21557
21558 2001-11-26 Marc Autret <autret_m@epita.fr>
21559
21560 * src/reader.c (parse_include_decl): New, not yet implemented.
21561 (read_declarations): Add case tok_include.
21562 * src/getargs.h (include): Add its extern definition.
21563 * src/getargs.c (include): New const char *.
21564 (getargs): Add case '-I'.
21565 * src/options.c (option_table): Add include as command line and
21566 percent option.
21567 * src/lex.h (token_t): Add tok_include.
21568
21569 2001-11-26 Akim Demaille <akim@epita.fr>
21570
21571 * src/reader.c (readgram): Make sure rules for mid-rule actions
21572 have a lineno equal to that of their host rule.
21573 Reported by Hans Aberg.
21574 * tests/regression.at (Rule Line Numbers): New.
21575
21576 2001-11-26 Akim Demaille <akim@epita.fr>
21577
21578 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
21579 size_ts.
21580
21581 2001-11-26 Akim Demaille <akim@epita.fr>
21582
21583 * src/complain.c, src/complain.h (error): Remove, provided by
21584 lib/error.[ch].
21585
21586 2001-11-26 Akim Demaille <akim@epita.fr>
21587
21588 * src/reader.c (read_declarations): Don't abort on tok_illegal,
21589 issue an error message.
21590 * tests/regression.at (Invalid %directive): New.
21591 Reported by Hans Aberg.
21592
21593 2001-11-26 Akim Demaille <akim@epita.fr>
21594
21595 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
21596 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21597
21598 2001-11-26 Akim Demaille <akim@epita.fr>
21599
21600 * src/conflicts.c (conflicts_print): Don't complain at all when
21601 there are no reduce/reduce conflicts, and as many shift/reduce
21602 conflicts as expected.
21603 * tests/regression.at (%expect right): Adjust.
21604
21605 2001-11-23 Akim Demaille <akim@epita.fr>
21606
21607 * lib/alloca.c: Update, from fileutils.
21608
21609 2001-11-23 Akim Demaille <akim@epita.fr>
21610
21611 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
21612
21613 2001-11-23 Akim Demaille <akim@epita.fr>
21614
21615 * src/system.h: Include alloca.h.
21616 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
21617
21618 2001-11-23 Akim Demaille <akim@epita.fr>
21619
21620 * src/print_graph.c (print_actions): Remove `rule', unused.
21621 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
21622 pacify GCC's signed < unsigned warnings.
21623 * src/closure.c (itemsetsize): Likewise.
21624 * src/reader.c (symbol_list_new): Static.
21625
21626 2001-11-23 Akim Demaille <akim@epita.fr>
21627
21628 Attaching lineno to buckets is stupid, since only one copy of each
21629 symbol is kept, only the line of the first occurrence is kept too.
21630
21631 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
21632 * src/reader.c (rline_allocated): Remove, unused.
21633 (symbol_list): Have a `line' member.
21634 (symbol_list_new): New.
21635 (readgram): Use it.
21636 * src/print.c (print_grammar): Output the rule line numbers.
21637 * tests/regression.at (Solved SR Conflicts)
21638 (Unresolved SR Conflicts): Adjust.
21639 Reported by Hans Aberg.
21640
21641 2001-11-22 Marc Autret <autret_m@epita.fr>
21642
21643 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
21644
21645 2001-11-22 Marc Autret <autret_m@epita.fr>
21646
21647 * src/muscle_tab.c (muscle_init): Remove initialization of
21648 skeleton muscle.
21649 * src/output.c (output_master_parser): Do it here.
21650
21651 2001-11-20 Akim Demaille <akim@epita.fr>
21652
21653 * po/sv.po: New.
21654 * configure.in (ALL_LINGUAS): Adjust.
21655 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
21656 longer contains strings to translate.
21657
21658 2001-11-19 Akim Demaille <akim@epita.fr>
21659
21660 * src/conflicts.c (conflicts_print): Add a missing \n.
21661
21662 2001-11-19 Akim Demaille <akim@epita.fr>
21663
21664 * src/nullable.c (nullable_print): New.
21665 (set_nullable): Call it when tracing.
21666 Better locality of variables.
21667
21668 2001-11-19 Akim Demaille <akim@epita.fr>
21669
21670 * src/print.c (print_actions): Better locality of variables.
21671
21672 2001-11-19 Akim Demaille <akim@epita.fr>
21673
21674 * src/derives.c (print_derives): Fix and enrich.
21675 * src/closure.c (print_fderives): Likewise.
21676
21677 2001-11-19 Akim Demaille <akim@epita.fr>
21678
21679 * src/closure.c (itemsetend): Remove, replaced with...
21680 (itemsetsize): new.
21681
21682 2001-11-19 Akim Demaille <akim@epita.fr>
21683
21684 * src/LR0.c (kernel_end): Remove, replaced with...
21685 (kernel_size): new.
21686
21687 2001-11-19 Akim Demaille <akim@epita.fr>
21688
21689 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
21690 to clarify.
21691
21692 2001-11-19 Akim Demaille <akim@epita.fr>
21693
21694 * src/closure.c (closure): Use arrays instead of pointers to clarify.
21695
21696 2001-11-19 Akim Demaille <akim@epita.fr>
21697
21698 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
21699 trace messages.
21700 * src/LR0.c: Likewise.
21701 (allocate_itemsets): Use arrays instead of pointers to clarify.
21702
21703 2001-11-19 Akim Demaille <akim@epita.fr>
21704
21705 * src/getargs.c (statistics_flag): Replace with...
21706 (trace_flag): New.
21707 (longopts): Accept --trace instead of --statistics.
21708 * src/getargs.h, src/options.c: Adjust.
21709 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
21710 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
21711
21712 2001-11-19 Akim Demaille <akim@epita.fr>
21713
21714 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
21715 pointers to clarify the code.
21716 (save_reductions, save_shifts): Factor common parts of alternatives.
21717
21718 2001-11-19 Akim Demaille <akim@epita.fr>
21719
21720 * src/LR0.c (new_state, get_state): Complete TRACE code.
21721 * src/closure.c: Include `reader.h' to get `tags', needed by the
21722 trace code.
21723 Rename the conditional DEBUG as TRACE.
21724 Output consistently TRACEs to stderr, not stdout.
21725 * src/derives.c: Likewise.
21726 * src/reduce.c: (inaccessable_symbols): Using if is better style
21727 than goto.
21728 Use `#if TRACE' instead of `#if 0' for tracing code.
21729
21730 2001-11-19 Akim Demaille <akim@epita.fr>
21731
21732 * src/system.h (LIST_FREE, shortcpy): New.
21733 * src/LR0.c: Use them.
21734 * src/output.c (free_itemsets, free_reductions, free_shifts):
21735 Remove, replaced by LIST_FREE.
21736
21737 2001-11-19 Akim Demaille <akim@epita.fr>
21738
21739 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
21740 (REDUCTIONS_ALLOC): New.
21741 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
21742 allocation.
21743
21744 2001-11-19 Akim Demaille <akim@epita.fr>
21745
21746 * src/LR0.c (new_state): Complete trace code.
21747 * src/nullable.c (set_nullable): Don't translate traces.
21748
21749 2001-11-19 Akim Demaille <akim@epita.fr>
21750
21751 * src/print_graph.c (print_core): Better locality of variables.
21752 * src/print.c (print_core): Likewise.
21753
21754 2001-11-19 Akim Demaille <akim@epita.fr>
21755
21756 * src/vcg.c: You do the output, so you are responsible of the
21757 handling of VCG syntax, in particular: use quotearg.
21758 * src/print_graph.c: Don't.
21759 (print_actions): Don't output the actions as part of the nodes,
21760 since that's the job of the edges.
21761 (print_state): Don't output by hand: fill the node description,
21762 and ask for its output.
21763
21764 2001-11-19 Akim Demaille <akim@epita.fr>
21765
21766 * src/bison.simple (yyparse): When verbosely reporting an error,
21767 no longer put additional quotes around token names.
21768 * tests/calc.at: Adjust.
21769
21770 2001-11-19 Akim Demaille <akim@epita.fr>
21771
21772 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
21773 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
21774 * src/output.c: Adjust.
21775
21776 2001-11-19 Akim Demaille <akim@epita.fr>
21777
21778 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
21779 (rule_t): this.
21780 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
21781
21782 2001-11-19 Akim Demaille <akim@epita.fr>
21783
21784 * src/gram.h (rule_t): New.
21785 (rule_table): New.
21786 (rrhs, rlhs): Remove, part of state_t.
21787 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
21788 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
21789 * src/reader.c, src/reduce.c: Adjust.
21790
21791 2001-11-19 Akim Demaille <akim@epita.fr>
21792
21793 * src/reader.c (symbols_output): New, extracted from...
21794 (packsymbols): Here.
21795 (reader): Call it.
21796
21797 2001-11-19 Akim Demaille <akim@epita.fr>
21798
21799 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
21800 (maxrhs): this new function.
21801
21802 2001-11-19 Akim Demaille <akim@epita.fr>
21803
21804 * src/lalr.c (F): New macro to access the variable F.
21805 Adjust.
21806
21807 2001-11-19 Akim Demaille <akim@epita.fr>
21808
21809 * src/lalr.h (LA): New macro to access the variable LA.
21810 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21811 * src/lalr.c: Adjust.
21812
21813 2001-11-19 Akim Demaille <akim@epita.fr>
21814
21815 * src/lalr.c (initialize_LA): Only initialize LA. Let...
21816 (set_state_table): handle the `lookaheads' members.
21817
21818 2001-11-19 Akim Demaille <akim@epita.fr>
21819
21820 * src/lalr.h (lookaheads): Removed array, whose contents is now
21821 a member of...
21822 (state_t): this structure.
21823 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21824 Adjust.
21825
21826 2001-11-19 Akim Demaille <akim@epita.fr>
21827
21828 * src/lalr.h (consistent): Removed array, whose contents is now
21829 a member of...
21830 (state_t): this structure.
21831 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21832 Adjust.
21833
21834 2001-11-19 Akim Demaille <akim@epita.fr>
21835
21836 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
21837 contents are now members of...
21838 (state_t): this structure.
21839 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21840 Adjust.
21841
21842 2001-11-19 Akim Demaille <akim@epita.fr>
21843
21844 * src/lalr.h (state_t): New.
21845 (state_table): Be a state_t * instead of a core **.
21846 (accessing_symbol): Remove, part of state_t.
21847 * src/lalr.c: Adjust.
21848 (set_accessing_symbol): Merge into...
21849 (set_state_table): this.
21850 * src/print_graph.c, src/conflicts.c: Adjust.
21851
21852 2001-11-14 Akim Demaille <akim@epita.fr>
21853
21854 * tests/calc.at, tests/output.at, tests/regression.at,
21855 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
21856 now the tests are run in private dirs, therefore AC_CLEANUP and
21857 family can be simplified to 0-ary.
21858 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
21859 use abs. path to find config.h.
21860 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
21861 stderr, there can be way too much random noise.
21862 Instead pass -Werror to GCC and rely on the exit status.
21863 Reported by Wolfram Wagner.
21864
21865 2001-11-14 Akim Demaille <akim@epita.fr>
21866
21867 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
21868 defined only if yyoverflow is defined, to avoid `warning: unused
21869 variable `yyvs1''.
21870 Reported by The Test Suite.
21871
21872 2001-11-14 Akim Demaille <akim@epita.fr>
21873
21874 * src/print.c: Include reduce.h.
21875 Reported by Hans Aberg.
21876
21877 2001-11-14 Akim Demaille <akim@epita.fr>
21878
21879 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
21880 Revert a previous patch: these are really const.
21881 * src/conflicts.c (conflict_report): Additional useless pair of
21882 braces to pacify GCC's warnings for `if () if () {} else {}'.
21883 * src/lex.c (parse_percent_token): Replace equal_offset with
21884 arg_offset.
21885 arg is const.
21886 Be sure to strdup `arg' when used, since there is no reason for
21887 token_buffer not to change.
21888
21889 2001-11-14 Akim Demaille <akim@epita.fr>
21890
21891 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
21892 definition.
21893 * src/main.c (main): Use them.
21894 Suggested by Hans Aberg.
21895
21896 2001-11-12 Akim Demaille <akim@epita.fr>
21897
21898 * src/system.h (ngettext): Now that we use ngettext, be sure to
21899 provide a default definition when NLS are not used.
21900
21901 2001-11-12 Akim Demaille <akim@epita.fr>
21902
21903 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
21904 Use @kbd to denote user input.
21905 (Language and Grammar): ANSIfy the example.
21906 Adjust its layout for info/notinfo.
21907 (Location Tracking Calc): Output error messages to stderr.
21908 Output locations in a more GNUtically correct way.
21909 Fix a couple of Englishos.
21910 Adjust @group/@end group pairs.
21911
21912 2001-11-12 Akim Demaille <akim@epita.fr>
21913
21914 %expect was not functioning at all.
21915
21916 * src/conflicts.c (expected_conflicts): Set to -1.
21917 (conflict_report): Use ngettext.
21918 (conflicts_print): Check %expect and make its violation an error.
21919 * doc/bison.texinfo (Expect Decl): Adjust.
21920 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
21921 * tests/regression.at (%expect not enough, %expect right)
21922 (%expect too much): New.
21923
21924 2001-11-12 Akim Demaille <akim@epita.fr>
21925
21926 * tests/regression.at (Conflicts): Rename as...
21927 (Unresolved SR Conflicts): this.
21928 (Solved SR Conflicts): New.
21929
21930 2001-11-12 Akim Demaille <akim@epita.fr>
21931
21932 * src/reduce.c (print_results): Rename as...
21933 (reduce_output): This.
21934 Output to OUT, passed as argument, instead of output_obstack.
21935 (dump_grammar): Likewise.
21936 (reduce_free): New.
21937 Also free V1.
21938 (reduce_grammar): No longer call reduce_output, since...
21939 * src/print.c (print_results): do it.
21940 * src/main.c (main): Call reduce_free;
21941
21942 2001-11-12 Akim Demaille <akim@epita.fr>
21943
21944 * src/conflicts.c (print_reductions): Accept OUT as argument.
21945 Output to it, not to output_obstack.
21946 * src/print.c (print_actions): Adjust.
21947
21948 2001-11-12 Akim Demaille <akim@epita.fr>
21949
21950 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
21951 the result instead of using...
21952 (src_total, rrc_total, src_count, rrc_count): Remove.
21953 (any_conflicts): Remove.
21954 (print_conflicts): Split into...
21955 (conflicts_print, conflicts_output): New.
21956 * src/conflicts.h: Adjust.
21957 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
21958 * src/print.c (print_grammar): Issue `\n' between two rules.
21959 * tests/regression.at (Conflicts): New.
21960 Reported by Tom Lane.
21961
21962 2001-11-12 Akim Demaille <akim@epita.fr>
21963
21964 * tests/regression.at (Invalid input): Remove, duplicate with
21965 ``Invalid input: 1''.
21966
21967 2001-11-12 Akim Demaille <akim@epita.fr>
21968
21969 * tests/torture.at (AT_DATA_STACK_TORTURE)
21970 (Exploding the Stack Size with Alloca)
21971 (Exploding the Stack Size with Malloc): New.
21972
21973 2001-11-12 Akim Demaille <akim@epita.fr>
21974
21975 * src/bison.simple (YYSTACK_REALLOC): New.
21976 (yyparse) [!yyoverflow]: Use it and free the old stack.
21977 Reported by Per Allansson.
21978
21979 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
21980
21981 * src/bison.simple: Define type yystype instead of YYSTYPE, and
21982 define CPP macro, which substitute YYSTYPE by yystype.
21983 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
21984 with yyltype/YYLTYPE. This allows inclusion of the generated
21985 header within the parser if the compiler, such as GGC, accepts
21986 multiple equivalent #defines.
21987 From Akim.
21988
21989 2001-11-05 Akim Demaille <akim@epita.fr>
21990
21991 * src/reader.c (symbols_output): New, extracted from...
21992 (packsymbols): here.
21993 (reader): Adjust.
21994
21995 2001-11-05 Akim Demaille <akim@epita.fr>
21996
21997 * src/lex.c (parse_percent_token): s/quotearg/quote/.
21998
21999 2001-11-05 Akim Demaille <akim@epita.fr>
22000
22001 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
22002 pattern.
22003
22004 2001-11-05 Akim Demaille <akim@epita.fr>
22005
22006 * src/options.h (struct option_table_struct): set_flags is void*.
22007 * src/options.c (longopts): Support `--output' and `%output'.
22008 (usage): Adjust.
22009 * src/lex.h (tok_setopt): Remove, replaced with...
22010 (tok_intopt, tok_stropt): these new guys.
22011 * src/lex.c (getopt.h): Not needed.
22012 (token_buffer, unlexed_token_buffer): Not const.
22013 (percent_table): Promote `-' over `_' in directive names.
22014 Active `%name-prefix', `file-prefix', and `output'.
22015 (parse_percent_token): Accept possible arguments to directives.
22016 Promote `-' over `_' in directive names.
22017
22018 2001-11-04 Akim Demaille <akim@epita.fr>
22019
22020 * doc/bison.texinfo (Decl Summary): Split the list into
22021 `directives for grammars' and `directives for bison'.
22022 Sort'em.
22023 Add description of `%name-prefix', `file-prefix', and `output'.
22024 Promote `-' over `_' in directive names.
22025 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
22026 Simplify the description of `--name-prefix'.
22027 Promote `-' over `_' in directive names.
22028 Promote `--output' over `--output-file'.
22029 Fix the description of `--defines'.
22030 * tests/output.at: Exercise %file-prefix and %output.
22031
22032 2001-11-02 Akim Demaille <akim@epita.fr>
22033
22034 * doc/refcard.tex: Update.
22035
22036 2001-11-02 Akim Demaille <akim@epita.fr>
22037
22038 * src/symtab.h (SUNDEF): New.
22039 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
22040 stand for `uninitialized', instead of 0.
22041 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
22042 * src/lex.c (lex): Adjust.
22043
22044 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
22045 Number it 0.
22046 Let yylex return it instead of a plain 0.
22047 Reported by Dick Streefland.
22048
22049 2001-11-02 Akim Demaille <akim@epita.fr>
22050
22051 * tests/regression.at (Mixing %token styles): New test.
22052
22053 2001-11-02 Akim Demaille <akim@epita.fr>
22054
22055 * src/reader.c (parse_thong_decl): Formatting changes.
22056 (token_translations_init): New, extracted from...
22057 (packsymbols): Here.
22058 Adjust.
22059
22060 2001-11-01 Akim Demaille <akim@epita.fr>
22061
22062 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
22063 Check that `9foo.y' produces correct cpp guards.
22064 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
22065 guards.
22066 Reported by Wwp.
22067
22068 2001-11-01 Akim Demaille <akim@epita.fr>
22069
22070 * tests/regression.at (Invalid input: 2): New.
22071 * src/lex.c (unlexed_token_buffer): New.
22072 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
22073 too.
22074 Reported by Wwp.
22075
22076 2001-11-01 Akim Demaille <akim@epita.fr>
22077
22078 * tests/calc.at: Catch up with 1.30.
22079 * configure.in: Bump to 1.49a.
22080 Adjust to newer Autotest.
22081
22082 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
22083
22084 * src/conflicts.c: Move global variables rrc_total and src_total ...
22085 (print_conflicts): here.
22086 * src/output.c (output): Free global variable user_toknums.
22087 * src/lex.c (token_obstack): Become static.
22088
22089 2001-10-18 Akim Demaille <akim@epita.fr>
22090
22091 * tests/atlocal.in (GCC): Add.
22092 * tests/calc.at: s/m4_match/m4_bmatch/.
22093 s/m4_patsubst/m4_bpatsubst/.
22094 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22095 * configure.in: AC_SUBST(GCC).
22096
22097 2001-10-14 Marc Autret <autret_m@epita.fr>
22098
22099 * src/options.c (create_long_option_table): Fix.
22100
22101 2001-10-10 Akim Demaille <akim@epita.fr>
22102
22103 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22104
22105 2001-10-04 Akim Demaille <akim@epita.fr>
22106
22107 * src/reader.c (parse_union_decl): Push the caracters in
22108 union_obstack, not attrs_obstack.
22109
22110 2001-10-04 Akim Demaille <akim@epita.fr>
22111
22112 Merge in the branch 1.29.
22113
22114 * src/reader.c (packsymbols): Use a temporary obstack for
22115 `%%tokendef', since output_stack is already used elsewhere.
22116
22117 2001-10-02 Akim Demaille <akim@epita.fr>
22118
22119 Bump 1.29d.
22120
22121 2001-10-02 Akim Demaille <akim@epita.fr>
22122
22123 Version 1.29c.
22124
22125 2001-10-02 Akim Demaille <akim@epita.fr>
22126
22127 * tests/regression.at (Invalid CPP headers): New.
22128 From Alexander Belopolsky.
22129 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22130
22131 2001-10-02 Akim Demaille <akim@epita.fr>
22132
22133 * tests/regression.at (Invalid input): New.
22134 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22135 Reported by Shura.
22136
22137 2001-10-02 Akim Demaille <akim@epita.fr>
22138
22139 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22140
22141 2001-10-02 Akim Demaille <akim@epita.fr>
22142
22143 * src/output.c (output_parser): Assert `skeleton'.
22144 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22145 systems.
22146 From Shura.
22147
22148 2001-10-01 Marc Autret <autret_m@epita.fr>
22149
22150 * src/lex.h: Echo modifications.
22151 * src/lex.c (unlex): Parameter is now token_t.
22152 From Hans Aberg.
22153
22154 2001-10-01 Marc Autret <autret_m@epita.fr>
22155
22156 * src/main.c: Include lex.h.
22157 From Hans Aberg.
22158
22159 2001-09-29 Akim Demaille <akim@epita.fr>
22160
22161 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22162
22163 2001-09-28 Akim Demaille <akim@epita.fr>
22164
22165 * tests/testsuite.at: Update to newer Autotest.
22166 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22167
22168 2001-09-27 Akim Demaille <akim@epita.fr>
22169
22170 Position independent wrapper.
22171
22172 * tests/bison: Remove.
22173 * tests/bison.in: New.
22174 * configure.in: Adjust.
22175
22176 2001-09-27 Paul Eggert <eggert@twinsun.com>
22177
22178 Port quotearg fixes from tar 1.13.24.
22179
22180 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22181 tm to be declared.
22182 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22183 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22184
22185 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22186 * m4/mbrtowc.m4: New file.
22187 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22188 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22189
22190 2001-09-27 Akim Demaille <akim@epita.fr>
22191
22192 Bump to 1.29c.
22193
22194 2001-09-27 Akim Demaille <akim@epita.fr>
22195
22196 Version 1.29b.
22197
22198 2001-09-25 Akim Demaille <akim@epita.fr>
22199
22200 * src/system.h: Include `xalloc.h'.
22201 Remove it from the C files.
22202 * src/files.c (output_files): Free the obstacks.
22203 * src/lex.c (init_lex): Rename as...
22204 (lex_init): this.
22205 (lex_free): New.
22206 * src/main.c (main): Use it.
22207
22208 2001-09-24 Marc Autret <autret_m@epita.fr>
22209
22210 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22211 to output informations in fout (FILE*).
22212 (open_graph, close_graph): Likewise.
22213 (output_graph, output_edge, output_node): Likewise.
22214 * src/vcg.h: Update function prototypes.
22215 * src/print_graph.c (print_graph): Open output graph file.
22216 (print_actions): Adjust.
22217 * src/files.h: Remove extern declaration.
22218 * src/files.c: Remove graph_obstack declaration.
22219 (open_files): Remove graph_obstack initialization.
22220 (output_files): Remove graph_obstack saving.
22221
22222 2001-09-24 Marc Autret <autret_m@epita.fr>
22223
22224 * src/files.c (compute_output_file_names): Fix.
22225
22226 2001-09-24 Marc Autret <autret_m@epita.fr>,
22227 Akim Demaille <akim@epita.fr>
22228
22229 * src/reader.c (reader): Remove call to free_symtab ().
22230 * src/main.c (main): Call it here.
22231 Include symtab.h.
22232 * src/conflicts.c (initialize_conflicts): Rename as...
22233 (solve_conflicts): this.
22234 * src/print.c (print_core, print_actions, print_state)
22235 (print_grammar): Dump to a file instead a `output_obstack'.
22236 (print_results): Dump `output_obstack', and then proceed with the
22237 FILE *.
22238 * src/files.c (compute_output_file_names, close_files): New.
22239 (output_files): Adjust.
22240 * src/main.c (main): Adjust.
22241
22242 2001-09-23 Marc Autret <autret_m@epita.fr>
22243
22244 * src/files.c (compute_header_macro): Computes header macro name
22245 from spec_defines_file when given.
22246
22247 2001-09-23 Marc Autret <autret_m@epita.fr>
22248
22249 * src/files.c (output_files): Add default extensions.
22250
22251 2001-09-22 Akim Demaille <akim@epita.fr>
22252
22253 * src/conflicts.c (finalize_conflicts): Rename as...
22254 (free_conflicts): this.
22255
22256 2001-09-22 Akim Demaille <akim@epita.fr>
22257
22258 * src/gram.c (gram_free): Rename back as...
22259 (dummy): this.
22260 (output_token_translations): Free `token_translations'.
22261 * src/symtab.c (free_symtab): Free the tag field.
22262
22263 2001-09-22 Akim Demaille <akim@epita.fr>
22264
22265 Remove `translations' as it is always set to true.
22266
22267 * src/gram.h: Adjust.
22268 * src/reader.c (packsymbols, parse_token_decl): Adjust
22269 * src/print.c (print_grammar): Adjust.
22270 * src/output.c (output_token_translations): Adjust.
22271 * src/lex.c (lex): Adjust.
22272 * src/gram.c: Be sure the set pointers to NULL.
22273 (dummy): Rename as...
22274 (gram_free): this.
22275
22276 2001-09-22 Akim Demaille <akim@epita.fr>
22277
22278 * configure.in: Invoke AM_LIB_DMALLOC.
22279 * src/system.h: Use dmalloc.
22280 * src/LR0.c: Be sure to have pointers initialized to NULL.
22281 (allocate_itemsets): Allocate kernel_items only if needed.
22282
22283 2001-09-22 Akim Demaille <akim@epita.fr>
22284
22285 * configure.in: Bump to 1.29b.
22286 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22287 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22288 need xmalloc.c in calc.y.
22289 From Pascal Bart.
22290
22291 2001-09-21 Akim Demaille <akim@epita.fr>
22292
22293 Version 1.29a.
22294 * Makefile.maint, config/config.guess, config/config.sub,
22295 * config/missing: Update from masters.
22296 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22297 upon package.m4.
22298 * configure.in (ALL_LINGUAS): Add `tr'.
22299
22300 2001-09-21 Akim Demaille <akim@epita.fr>
22301
22302 * tests/Makefile.am (package.m4): Move to...
22303 ($(srcdir)/$(TESTSUITE)): here.
22304
22305 2001-09-20 Akim Demaille <akim@epita.fr>
22306
22307 * src/complain.c: No longer try to be standalone: use system.h.
22308 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22309 * src/complain.h: Likewise.
22310 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22311 Remove the unused variable `n'.
22312 From Albert Chin-A-Young.
22313
22314 2001-09-18 Marc Autret <autret_m@epita.fr>
22315
22316 * doc/bison.1: Update.
22317 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22318 descriptions.
22319 (Option Cross Key): Update.
22320 Add --graph.
22321
22322 2001-09-18 Marc Autret <autret_m@epita.fr>
22323
22324 * tests/regression.at: New test (comment in %union).
22325
22326 2001-09-18 Marc Autret <autret_m@epita.fr>
22327
22328 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22329 do that.
22330 Reported by Keith Browne.
22331
22332 2001-09-18 Marc Autret <autret_m@epita.fr>
22333
22334 * tests/output.at: Add tests for --defines and --graph.
22335
22336 2001-09-18 Marc Autret <autret_m@epita.fr>
22337
22338 * tests/output.at: Removes tests of %{header,src}_extension features.
22339
22340 2001-09-18 Akim Demaille <akim@epita.fr>
22341
22342 * tests/Makefile.am (package.m4): New.
22343 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22344 (_AT_CHECK_CALC_ERROR): Likewise.
22345 Factor the `, ' part of verbose error messages.
22346
22347 2001-09-18 Marc Autret <autret_m@epita.fr>
22348
22349 * src/getargs.c (longopts): Declare --defines and --graph as options
22350 with optional arguments.
22351 * src/files.h: Add extern declarations.
22352 * src/files.c (spec_graph_file, spec_defines_file): New.
22353 (output_files): Update.
22354 Remove CPP-outed code.
22355
22356 2001-09-18 Marc Autret <autret_m@epita.fr>
22357
22358 Turn off %{source,header}_extension feature.
22359
22360 * src/files.c (compute_exts_from_gf): Update.
22361 (compute_exts_from_src): Update.
22362 (output_files): CPP-out useless code.
22363 * src/files.h: Remove {header,source}_extension extern declarations.
22364 * src/reader.c (parse_dquoted_param): CPP-out.
22365 (parse_header_extension_decl): Remove.
22366 (parse_source_extension_decl): Remove.
22367 (read_declarations): Remove cases tok_{hdrext,srcext}.
22368 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22369 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22370
22371 2001-09-10 Akim Demaille <akim@epita.fr>
22372
22373 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22374 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22375 (AT_CHECK_OUTPUT): this.
22376 Merely check ls' exit status, its output is useless.
22377
22378 2001-09-10 Akim Demaille <akim@epita.fr>
22379
22380 * tests/calc.at: Use m4_match.
22381 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22382
22383 2001-09-10 Marc Autret <autret_m@epita.fr>,
22384 Akim Demaille <akim@epita.fr>
22385
22386 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22387 enum color_e.
22388 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22389 to `normal'.
22390 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22391 * src/lex.h: Adjust prototype.
22392 (token_t): Add `tok_undef'.
22393 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22394 (parse_percent_token): Now returns token_t.
22395 Add default statement in switch.
22396 (lex): Separate `c' as an input variable, from the token_t result
22397 part.
22398 (unlexed): Is a token_t.
22399
22400 2001-09-10 Akim Demaille <akim@epita.fr>
22401
22402 * configure.in: Bump to 1.29a.
22403
22404 2001-09-07 Akim Demaille <akim@epita.fr>
22405
22406 Version 1.29.
22407
22408 2001-08-30 Akim Demaille <akim@epita.fr>
22409
22410 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22411 * m4/atconfig.m4: Remove.
22412 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22413 * tests/bison: New.
22414 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22415 m4_if, m4_patsubst, and m4_regexp.
22416 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22417 `input' file instead of echo.
22418
22419 2001-08-29 Akim Demaille <akim@epita.fr>
22420
22421 Bump to 1.28e.
22422
22423 2001-08-29 Akim Demaille <akim@epita.fr>
22424
22425 Version 1.28d.
22426
22427 2001-08-29 Paul Eggert <eggert@twinsun.com>
22428
22429 * src/bison.simple (yyparse): Don't take the address of an
22430 item before the start of an array, as that doesn't conform to
22431 the C Standard.
22432
22433 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22434
22435 * doc/bison.texinfo (Location Tracking Calc): New node.
22436
22437 2001-08-29 Paul Eggert <eggert@twinsun.com>
22438
22439 * src/output.c (output): Do not define const, as this now
22440 causes more problems than it cures.
22441
22442 2001-08-29 Akim Demaille <akim@epita.fr>
22443
22444 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22445 the nodes.
22446 Be sure to tag the `detailmenu'.
22447
22448 2001-08-29 Akim Demaille <akim@epita.fr>
22449
22450 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22451 download in a tmp dir.
22452
22453 2001-08-28 Marc Autret <autret_m@epita.fr>
22454
22455 * config/depcomp: New file.
22456
22457 2001-08-28 Marc Autret <autret_m@epita.fr>
22458
22459 * doc/bison.1 (mandoc): Adjust.
22460 From Juan Manuel Guerrero.
22461
22462 2001-08-28 Marc Autret <autret_m@epita.fr>
22463
22464 * src/print_graph.c (print_state): Fix.
22465
22466 2001-08-27 Marc Autret <autret_m@epita.fr>
22467
22468 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22469 char * members.
22470 Echo modifications to the functions prototypes.
22471 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22472
22473 2001-08-27 Marc Autret <autret_m@epita.fr>
22474
22475 * src/vcg.c: Include `xalloc.h'.
22476 (add_colorentry): New.
22477 (add_classname): New.
22478 (add_infoname): New.
22479 * src/vcg.h: Add new prototypes.
22480
22481 2001-08-27 Akim Demaille <akim@epita.fr>
22482
22483 * Makefile.maint: Sync. again with CVS Autoconf.
22484
22485 2001-08-27 Akim Demaille <akim@epita.fr>
22486
22487 * Makefile.maint: Formatting changes.
22488 (po-update, cvs-update, update): New targets.
22489 (AMTAR): Remove.
22490
22491 2001-08-27 Akim Demaille <akim@epita.fr>
22492
22493 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22494 * Makefile.maint: Sync. with CVS Autoconf.
22495
22496 2001-08-27 Marc Autret <autret_m@epita.fr>
22497
22498 * src/vcg.h (struct infoname_s): New.
22499 (struct colorentry_s): New.
22500 (graph_s): New fields {vertical,horizontal}_order in structure.
22501 Add `infoname' field.
22502 Add `colorentry' field;
22503 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22504 (G_HORIZONTAL_ORDER): New.
22505 (G_INFONAME): New.
22506 (G_COLORENTRY): New.
22507 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22508 Add output of `infoname'.
22509 Add output of `colorentry'.
22510
22511 2001-08-27 Marc Autret <autret_m@epita.fr>
22512
22513 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22514 This one shadowed a global parameter.
22515
22516 2001-08-24 Marc Autret <autret_m@epita.fr>
22517
22518 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22519 instead of `unsigned'.
22520 (print_state): Do not call obstack_object_size () in obstack_grow ()
22521 to avoid macro variables shadowing.
22522
22523 2001-08-23 Marc Autret <autret_m@epita.fr>
22524
22525 * src/lex.c (percent_table): Typo: s/naem/name/.
22526 Add graph option.
22527 Normalize new options declarations.
22528
22529 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22530
22531 * tests/suite.at: Exercise %header_extension and %source_extension.
22532
22533 2001-08-16 Marc Autret <autret_m@epita.fr>
22534
22535 * src/reader.c (parse_dquoted_param): New.
22536 (parse_header_extension_decl): Use it.
22537 (parse_source_extension_decl): Likewise.
22538
22539 2001-08-16 Marc Autret <autret_m@epita.fr>
22540
22541 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
22542 (get_xxxx_str): Use assert () instead of complain ().
22543 Remove return invokations in default cases.
22544 (get_decision_str): Modify default behaviour. Remove second argument.
22545 Echo modifications on calls.
22546 (output_graph): Fix.
22547
22548 2001-08-16 Marc Autret <autret_m@epita.fr>
22549
22550 * src/getargs.c (usage): Update with ``-g, --graph''.
22551
22552 2001-08-16 Marc Autret <autret_m@epita.fr>
22553
22554 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
22555 (Option Cross Key): Likewise.
22556 * doc/bison.1: Update.
22557
22558 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
22559
22560 * src/output.c (output_master_parser): Don't finish action_obstack.
22561 (output_parser): Don't care about the muscle action, here.
22562 (prepare): Copy the action_obstack in the action muscle.
22563 (output): Free action_obstack.
22564
22565 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22566
22567 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
22568 will contain `%union' declaration.
22569 (parse_union_decl): Delete #line directive output.
22570 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
22571 informations about %union.
22572 (parse_union_decl): Copy the union_obstack in the muscle stype.
22573 * src/bison.simple: Add new #line directive.
22574 Add typdef %%stype YYSTYPE.
22575
22576 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22577
22578 * src/bison.simple: Add new `#line' directive.
22579
22580 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
22581
22582 * src/bison.simple: New `#line' directive.
22583 * src/output.c (output_parser): Support new dynamic muscle input_line.
22584
22585 2001-09-22 Marc Autret <autret_m@epita.fr>
22586
22587 * src/output.c (output_master_parser): New.
22588 (output_parser): Be more re-entrant.
22589
22590 2001-09-21 Marc Autret <autret_m@epita.fr>
22591
22592 * src/reader.c (copy_definition, parse_union_decl): Update and use
22593 `linef' muscle.
22594 (copy_action): Likewise.
22595 Use obstack_1grow ().
22596 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
22597
22598 2001-09-21 Marc Autret <autret_m@epita.fr>
22599
22600 * src/options.c (option_table): Adjust.
22601 * src/lex.c (parse_percent_token): Fix.
22602
22603 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22604
22605 * src/options.c (symtab.h): Include it, need by lex.h.
22606
22607 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22608
22609 * src/lex.c (parse_percent_token): Change type of variable `tx', which
22610 is now an option_table_struct*.
22611 (option_strcmp): New function option_strcmp.
22612 (parse_percent_token): Call option_strcmp.
22613 * src/getargs.c (xalloc.h, options.h): Include it.
22614 (getargs): Call create_long_option_table.
22615 (getargs): Free longopts at the end of the function.
22616 (shortopts): Move in options.c.
22617 * src/options.c (create_long_option_table): New function. Convert
22618 information from option_table to option structure.
22619 * src/reader.c (options.h): Include it.
22620
22621 * src/Makefile.am: Adjust.
22622 * src/options.c (option_table): Create from longopts and percent_table.
22623 * src/getargs.c (longopts): Delete.
22624 * src/lex.c (struct percent_table_struct): Delete.
22625 (percent_table): Delete.
22626 (options.h): Include it.
22627 * src/options.c: Create.
22628 * src/options.h: Create.
22629 Declare enum opt_access_e.
22630 Define struct option_table_struct.
22631
22632 2001-09-20 Marc Autret <autret_m@epita.fr>
22633
22634 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
22635 sections of Bison.
22636
22637 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
22638
22639 * src/bison.simple: s/%%filename/%%skeleton.
22640 * src/muscle_tab.c (getargs.h): Include it.
22641 (muscle_init): Insert new muscle skeleton.
22642
22643 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
22644
22645 * src/output.c (output_parser): Delete unused variable actions_dumped.
22646
22647 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
22648
22649 * src/output.c (output): Delete call to reader_output_yylsp.
22650 * src/reader.c (reader): Likewise.
22651 * src/reader.h: Delete declaration of reader_output_yylsp.
22652
22653 2001-09-02 Marc Autret <autret_m@epita.fr>
22654
22655 * src/reader.c: Include muscle_tab.h.
22656 (parse_union_decl): Update.
22657 (parse_macro_decl): Rename parse_muscle_decl.
22658 Update to use renamed functions and variable.
22659 (read_declarations, copy_action, read_additionnal_code, : Updated
22660 with correct variables and functions names.
22661 (packsymbols, reader): Likewise.
22662
22663 * src/reader.h (muscle_obstack): Extern declaration update.
22664
22665 * src/output.c: Include muscle_tab.h
22666 In all functions using macro_insert, change by using muscle_insert ().
22667 (macro_obstack): Rename muscle_obstack.
22668 Echo modifications in the whole file.
22669 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
22670 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
22671 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
22672
22673 * src/muscle_tab.h: Update double inclusion macros.
22674 (macro_entry_s): Rename muscle_entry_s.
22675 Update prototypes.
22676
22677 * src/muscle_tab.c: Include muscle_tab.h.
22678 Rename macro_tabble to muscle_table.
22679 (mhash1, mhash2, mcmp): Use muscle_entry.
22680 (macro_init): Rename muscle_init. Update.
22681 (macro_insert): Rename muscle_insert. Update.
22682 (macro_find): Rename muscle_find. Update.
22683
22684 * src/main.c: Include muscle_tab.h.
22685 (main): Call muscle_init ().
22686 * src/Makefile.am (bison_SOURCES): Echo modifications.
22687
22688 2001-09-02 Marc Autret <autret_m@epita.fr>
22689
22690 Now the files macro_tab.[ch] are named muscle_tab.[ch].
22691
22692 * src/muscle_tab.c, src/muscle_tab.h: Add files.
22693
22694 2001-09-02 Marc Autret <autret_m@epita.fr>
22695
22696 * src/macrotab.c, src/macrotab.h: Remove.
22697
22698 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
22699
22700 * src/reader.c (copy_guard): Use muscle to specify the `#line'
22701 filename.
22702
22703 2001-09-01 Marc Autret <autret_m@epita.fr>
22704
22705 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
22706 to an explicit value to activate the feature. We do it here.
22707
22708 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22709
22710 * src/output.c (prepare): Delete the `filename' muscule insertion.
22711 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
22712 (parse_union_decl): Likewise.
22713 * src/macrotab.c (macro_init): Initialize filename by infile.
22714
22715 2001-08-31 Marc Autret <autret_m@epita.fr>
22716
22717 * src/bison.simple (YYLSP_NEEDED): New definition.
22718 * src/output.c (prepare): Add macro insertion of `locations_flag'
22719
22720 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22721
22722 * src/output.c (prepare): Delete insertion of previous muscles,
22723 and insert the `prefix' muscles.
22724 * src/macrotab.c (macro_init): Likewise.
22725 (macro_init): Initialization prefix directive by `yy'.
22726 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
22727 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
22728 yylval, yydebug, yyerror, yynerrs and yyparse.
22729 New directive `#define' to substitute yydebug, ... with option
22730 name_prefix.
22731
22732 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22733
22734 * src/main.c (main): Standardize.
22735 * src/output.c (output_table_data, output_parser): Likewise.
22736 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
22737
22738 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
22739
22740 * src/reader.c (read_additionnal_code): Rename %%user_code to
22741 %%epilogue.
22742 * src/output.c (output): Rename %%declarations to %%prologue.
22743 * src/bison.simple: Echo modifications.
22744
22745 2001-08-31 Marc Autret <autret_m@epita.fr>
22746
22747 * src/reader.c (readgram): CleanUp.
22748 (output_token_defines): Likewise.
22749 (packsymbols): Likewise.
22750 (reader): Likewise.
22751 * src/output.c (output): CPP-out useless code.
22752
22753 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22754
22755 * src/reader.c (reader): Delete obsolete call to function
22756 output_trailers and output_headers.
22757 * src/output.h: Remove obsolete functions prototypes of output_headers
22758 and output_trailers.
22759
22760 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
22761
22762 * src/main.c: Include macrotab.h.
22763 * src/macrotab.h (macro_entry_s): Constify fields.
22764 Adjust functions prototypes.
22765 * src/macrotab.c (macro_insert): Constify key and value.
22766 (macro_find): Constify key.
22767 (macro_insert): Include 'xalloc.h'
22768 (macro_insert): Use XMALLOC.
22769 (macro_find): Constify return value.
22770 * src/output.c (output_table_data): Rename table to table_data.
22771 (output_parser): Constify macro_key, macro_value.
22772
22773 2001-08-30 Marc Autret <autret_m@epita.fr>
22774
22775 * src/reader.c (parse_skel_decl): New.
22776 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
22777 * src/lex.h (token_t): New token `tok_skel'.
22778 * src/lex.c (percent_table): Add skeleton option entry.
22779 Standardize.
22780
22781 2001-08-29 Marc Autret <autret_m@epita.fr>
22782
22783 * src/bison.simple: Add %%user_code directive at the end.
22784 * src/reader.c (read_additionnal_code): New.
22785 (reader): Use it.
22786 * src/output.c (output_program): Remove.
22787 (output): Update.
22788
22789 2001-08-28 Marc Autret <autret_m@epita.fr>
22790
22791 * src/output.c (output_actions): Clean up.
22792 (output_gram): CPP-out useless code.
22793 * src/reader.c (reader): Clean up, CPP-out useless code.
22794
22795 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
22796
22797 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
22798 directive.
22799 * src/bison.simple: Add `%%definitions'.
22800
22801 2001-08-28 Marc Autret <autret_m@epita.fr>
22802
22803 * config/depcomp: New file.
22804
22805 2001-08-27 Paul Eggert <eggert@twinsun.com>
22806
22807 * src/bison.simple (yyparse): Don't take the address of an
22808 item before the start of an array, as that doesn't conform to
22809 the C Standard.
22810
22811 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22812
22813 * src/output.c (output): Remove the initialization of the macro
22814 obstack. It was done too late here.
22815
22816 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
22817 completely wrong.
22818 (reader): Initialize the macro obstack here, since we need it to grow
22819 '%define' directives.
22820
22821 * src/reader.h: Declare the macro obstack as extern.
22822
22823 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22824
22825 * src/output.c (output_parser): Fix. Store single '%' characters in
22826 the output obstack instead of throwing them away.
22827
22828 2001-08-27 Akim Demaille <akim@epita.fr>
22829
22830 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22831
22832 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22833
22834 * lib/Makefile.am: Adjust.
22835
22836 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22837
22838 * src/bison.simple: Update and add '%%' directives.
22839
22840 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22841
22842 * src/reader.c (reader): Remove calls to 'output_headers' and
22843 'output_trailers'. Remove some C output.
22844 (readgram): Disable a piece of code that was writing a default
22845 definition for 'YYSTYPE'.
22846 (reader_output_yylsp): Remove.
22847 (packsymbols): Output token defintions to a macro.
22848 (copy_definition): Disable C output.
22849
22850 * src/reader.c (parse_macro_decl): New function used to parse macro
22851 declarations.
22852 (copy_string2): Put the body of copy_string into this new function.
22853 Add a parameter to let the caller choose whether he wants to copy the
22854 string delimiters or not.
22855 (copy_string): Be a simple call to copy_string2 with the last argument
22856 bound to true.
22857 (read_declarations): Add case for macro definition.
22858 (copy_identifier): New.
22859 (parse_macro_decl): Read macro identifiers using copy_identifier
22860 rather than lex.
22861
22862 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22863
22864 * src/output.c (prepare): Add prefixed names.
22865 (output_parser): Output semantic actions.
22866 (output_parser): Fix bug on '%%line' directives.
22867
22868 * src/output.c (output_headers): Remove. The C code printed by this
22869 function should now be in the skeletons.
22870 (output_trailers): Remove.
22871 (output): Disable call to 'reader_output_yylsp'.
22872 (output_rule_data): Do not output tables to the table obstack.
22873
22874 * src/output.c: Remove some C dedicated output.
22875 Improve the use of macro and output obstacks.
22876 (output_defines): Remove.
22877
22878 * src/output.c (output_token_translations): Associate 'translate'
22879 table with a macro. No output to the table obstack.
22880 (output_gram): Same for 'rhs' and 'prhs'.
22881 (output_stos): Same for 'stos'.
22882 (output_rule_data): Same for 'r1' and 'r2'.
22883 (token_actions): Same for 'defact'.
22884 (goto_actions): Same for 'defgoto'.
22885 (output_base): Same for 'pact' and 'pgoto'.
22886 (output_table): Same for 'table'.
22887 (output_check): Same for 'check'.
22888
22889 * src/output.c (output_table_data): New function.
22890 (output_short_table): Remove.
22891 (output_short_or_char_table): Remove.
22892
22893 * src/output.c (output_parser): Replace most of the skeleton copy code
22894 with something new. Skeletons are now processed character by character
22895 rather than line by line, and Bison looks for '%%' macros. This is the
22896 first step in making Bison's output process (a lot) more flexible.
22897 (output_parser): Use the macro table.
22898
22899 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22900
22901 * src/main.c (main): Initialize the macro table.
22902
22903 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22904
22905 * src/lex.c (percent_table): Add tok_define.
22906 * src/lex.h: Add tok_define.
22907
22908 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22909
22910 * src/macrotab.c: New file.
22911 * src/macrotab.h: New file.
22912 * src/Makefile.am: Update.
22913
22914 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22915
22916 * lib/hash.c: New file.
22917 * lib/hash.h: New file.
22918 * lib/Makefile.am: Update.
22919
22920 2001-08-15 Akim Demaille <akim@epita.fr>
22921
22922 Version 1.28c.
22923
22924 2001-08-15 Marc Autret <autret_m@epita.fr>
22925
22926 * src/reader.c (readgram): Indent output macro YYSTYPE.
22927 (packsymbols): Likewise.
22928 (output_token_defines): Likewise.
22929 * src/files.c: Standardize.
22930 (compute_header_macro): New.
22931 (defines_obstack_save): New. Use compute_header_macro.
22932 (output_files): Update. Use defines_obstack_save.
22933
22934 2001-08-15 Akim Demaille <akim@epita.fr>
22935
22936 * doc/bison.texinfo (Table of Symbols): Document
22937 YYSTACK_USE_ALLOCA.
22938
22939 2001-08-15 Akim Demaille <akim@epita.fr>
22940
22941 * missing: Update from CVS Automake.
22942 * config/config.guess, config/config.sub, config/texinfo.tex:
22943 Update from gnu.org.
22944
22945 2001-08-15 Akim Demaille <akim@epita.fr>
22946
22947 * Makefile.maint: Sync with CVS Autoconf.
22948
22949 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
22950
22951 * doc/bison.texinfo: Include GNU Free Documentation License from
22952 `fdl.texi'.
22953 * doc/fdl.texi: Add to package.
22954
22955 2001-08-14 Marc Autret <autret_m@epita.fr>
22956
22957 Turn on %{source,header}_extension features.
22958
22959 * src/lex.c (percent_table): Un-CPP out header_extension and
22960 source_extension.
22961 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
22962 (compute_exts_from_src): Remove conditions. It restores priorities
22963 between options.
22964
22965 2001-08-14 Marc Autret <autret_m@epita.fr>
22966
22967 * src/files.c (compute_base_names): Add extensions computing when
22968 `--file-prefix' used.
22969 Standardize function calls.
22970
22971 2001-08-13 Marc Autret <autret_m@epita.fr>
22972
22973 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
22974 defining it (defined but null disables alloca).
22975
22976 2001-08-13 Marc Autret <autret_m@epita.fr>
22977
22978 * src/bison.simple (_yy_memcpy): CPP reformat.
22979
22980 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
22981
22982 * tests/atconfig.in (CPPFLAGS): Fix.
22983
22984 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
22985
22986 * doc/bison.texinfo: Include GNU General Public License from
22987 `gpl.texi'.
22988 * doc/gpl.texi: Add to package.
22989
22990 2001-08-10 Marc Autret <autret_m@epita.fr>
22991
22992 * src/print_graph.h: Fix.
22993 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
22994
22995 2001-08-10 Akim Demaille <akim@epita.fr>
22996
22997 * src/system.h: Provide default declarations for stpcpy, strndup,
22998 and strnlen.
22999
23000 2001-08-10 Robert Anisko <anisko_r@epita.fr>
23001
23002 * doc/bison.texinfo (Locations): Update @$ stuff.
23003
23004 2001-08-09 Robert Anisko <anisko_r@epita.fr>
23005
23006 * src/bison.simple (YYLLOC_DEFAULT): Update.
23007 (yyparse): Adjust.
23008
23009 2001-08-08 Marc Autret <autret_m@epita.fr>
23010
23011 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
23012 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
23013 Reported by Fabrice Bauzac.
23014
23015 2001-08-08 Marc Autret <autret_m@epita.fr>
23016
23017 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
23018 * src/vcg.c (output_node): Fix.
23019 * src/vcg.h: Cleanup.
23020 * src/print_graph.c: Add comments.
23021 (node_output_size): New global variable. Simplify the formatting of
23022 the VCG graph output.
23023 (print_actions): Unused code is now used. It notifies the final state
23024 and no action states in the VCG graph. It also give the reduce actions.
23025 The `shift and goto' edges are red and the `go to state' edges are
23026 blue.
23027 Get the current node name and node_obstack by argument.
23028 (node_obstack): New variable.
23029 (print_state): Manage node_obstack.
23030 (print_core): Use node_obstack given by argument.
23031 A node is not only computed here but in print_actions also.
23032 (print_graph): CPP out useless code instead of commenting it.
23033
23034 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
23035
23036 * tests/atconfig.in (CPPFLAGS): Fix.
23037
23038 2001-08-07 Akim Demaille <akim@epita.fr>
23039
23040 * src/print_graph.c (quote): New.
23041 (print_core): Use it.
23042
23043 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
23044
23045 * src/vcg.c (complain.h): Include it.
23046 Unepitaize `return' invocations.
23047 [NDEBUG] (main): Remove.
23048 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
23049 * src/files.c (open_files): Initialize graph_obstack.
23050 * src/print_graph.c (print_actions): CPP out useless code.
23051 (print_core): Don't output the last `\n' in labels.
23052 Use `quote'.
23053 * src/files.c (output_files): Output the VCG file.
23054 * src/main.c (main): Invoke print_graph ();
23055
23056 2001-08-06 Marc Autret <autret_m@epita.fr>
23057
23058 Automaton VCG graph output.
23059 Using option ``-g'' or long option ``--graph'', you can generate
23060 a gram_filename.vcg file containing a VCG description of the LALR (1)
23061 automaton of your grammar.
23062
23063 * src/main.c: Call to print_graph() function.
23064 * src/getargs.h: Update.
23065 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
23066 (graph_flag): New flag.
23067 (longopts): Update.
23068 (getargs): Add case `g'.
23069 * src/files.c (graph_obstack): New obstack struct.
23070 (open_files): Initialize new obstack.
23071 (output_files): Saves graph_obstack if required.
23072 * src/files.h (graph_obstack): New extern declaration.
23073 * src/Makefile.am: Add new source files.
23074
23075 2001-08-06 Marc Autret <autret_m@epita.fr>
23076
23077 * src/print_graph.c, src/print_graph.h (graph): New.
23078 * src/vcg.h: New file.
23079 * src/vcg.c: New file, VCG graph handling.
23080
23081 2001-08-06 Marc Autret <autret_m@epita.fr>
23082
23083 Add of %source_extension and %header_extension which specify
23084 the source or/and the header output file extension.
23085
23086 * src/files.c (compute_base_names): Remove initialisation of
23087 src_extension and header_extension.
23088 (compute_exts_from_gf): Update.
23089 (compute_exts_from_src): Update.
23090 (output_files): Update.
23091 * src/reader.c (parse_header_extension_decl): New.
23092 (parse_source_extension_decl): New.
23093 (read_declarations): New case statements for the new tokens.
23094 * src/lex.c (percent_table): Add entries for %source_extension
23095 and %header_extension.
23096 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23097
23098 2001-08-06 Marc Autret <autret_m@epita.fr>
23099
23100 * configure.in: Bump to 1.28c.
23101 * doc/bison.texinfo: Texinfo thingies.
23102
23103 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
23104
23105 * tests/atconfig.in (CPPFLAGS): Add.
23106 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23107
23108 2001-08-03 Akim Demaille <akim@epita.fr>
23109
23110 Version 1.28b.
23111
23112 2001-08-03 Akim Demaille <akim@epita.fr>
23113
23114 * tests/Makefile.am (check-local): Ship testsuite.
23115 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23116 Include `string.h'.
23117
23118 2001-08-03 Akim Demaille <akim@epita.fr>
23119
23120 * configure.in: Try using -Wformat when compiling.
23121
23122 2001-08-03 Akim Demaille <akim@epita.fr>
23123
23124 * configure.in: Bump to 1.28b.
23125
23126 2001-08-03 Akim Demaille <akim@epita.fr>
23127
23128 * src/complain.c: Adjust strerror_r portability issues.
23129
23130 2001-08-03 Akim Demaille <akim@epita.fr>
23131
23132 Version 1.28a.
23133
23134 2001-08-03 Akim Demaille <akim@epita.fr>
23135
23136 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23137 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23138 * src/getargs.c: Include complain.h.
23139 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23140 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23141
23142 2001-08-03 Akim Demaille <akim@epita.fr>
23143
23144 * src/reader.c (readgram): Display hidden chars in error messages.
23145
23146 2001-08-03 Akim Demaille <akim@epita.fr>
23147
23148 Update to gettext 0.10.39.
23149
23150 2001-08-03 Akim Demaille <akim@epita.fr>
23151
23152 * lib/strspn.c: New.
23153
23154 2001-08-01 Marc Autret <autret_m@epita.fr>
23155
23156 * doc/bison.texinfo: Update.
23157 * doc/bison.1 (mandoc): Update.
23158 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23159 * src/files.c: Support output files extensions computing.
23160 (src_extension): New static variable.
23161 (header_extension): New static variable.
23162 (tr): New function.
23163 (get_extension_index): New function, gets the index of an extension
23164 filename in a string.
23165 (compute_exts_from_gf): New function, computes extensions from the
23166 grammar file extension.
23167 (compute_exts_from_src): New functions, computes extensions from the
23168 C source file extension, file given by ``-o'' option.
23169 (compute_base_names): Update.
23170 (output_files): Update.
23171
23172 2001-08-01 Robert Anisko <anisko_r@epita.fr>
23173
23174 * doc/bison.texi: Document @$.
23175 (Locations): New section.
23176
23177 2001-07-18 Akim Demaille <akim@epita.fr>
23178
23179 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23180 * config/prev-version.txt, config/move-if-change: New.
23181 * Makefile.am: Adjust.
23182
23183 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
23184
23185 * src/bison.simple (yyparse): Suppress warning `comparaison
23186 between signed and unsigned'.
23187
23188 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
23189
23190 * src/getargs.h (raw_flag): Remove.
23191 * src/getargs.c: Die on `-r'/`--raw'.
23192 * src/lex.c (parse_percent_token): Die on `%raw'.
23193 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23194 * tests/calc.at: Suppress test with option `--raw'.
23195
23196 2001-07-14 Akim Demaille <akim@epita.fr>
23197
23198 * config/: New.
23199 * configure.in: Require Autoconf 2.50.
23200 Update to gettext 0.10.38.
23201
23202 2001-03-16 Akim Demaille <akim@epita.fr>
23203
23204 * doc/bison.texinfo: ANSIfy the examples.
23205
23206 2001-03-16 Akim Demaille <akim@epita.fr>
23207
23208 * getargs.c (skeleton): New variable.
23209 (longopts): --skeleton is a new option.
23210 (shortopts, getargs): -S is a new option.
23211 * getargs.h: Declare skeleton.
23212 * output.c (output_parser): Use it.
23213
23214 2001-03-16 Akim Demaille <akim@epita.fr>
23215
23216 * m4/strerror_r.m4: New.
23217 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23218 * lib/error.h, lib/error.c: Update.
23219
23220 2001-03-16 Akim Demaille <akim@epita.fr>
23221
23222 * src/getargs.c (longopts): Clean up.
23223
23224 2001-02-21 Akim Demaille <akim@epita.fr>
23225
23226 * src/reader.c (gensym): `gensym_count' is your own.
23227 Use a static buf to create the symbol name, as token_buffer is no
23228 longer a buffer.
23229
23230 2001-02-08 Akim Demaille <akim@epita.fr>
23231
23232 * src/conflicts.c (conflict_report): Be sure not to append to res
23233 between two calls, which could happen if both first sprintf were
23234 skipped, but not the first cp += strlen.
23235
23236 2001-02-08 Akim Demaille <akim@epita.fr>
23237
23238 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23239 New, from fileutils 4.0.37.
23240 * configure.in: Require Autoconf 2.49c. I took some time before
23241 making this decision. This is the only way out for portability
23242 issues in Bison, it would mean way too much duplicate effort to
23243 import in Bison features implemented in 2.49c since 2.13.
23244 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23245
23246 2001-02-02 Akim Demaille <akim@epita.fr>
23247
23248 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
23249 * lib/xalloc.h, lib/xmalloc.c: Update.
23250
23251 2001-01-19 Akim Demaille <akim@epita.fr>
23252
23253 Get rid of the ad hoc handling of token_buffer in the scanner: use
23254 the obstacks.
23255
23256 * src/lex.c (token_obstack): New.
23257 (init_lex): Initialize it. No longer call...
23258 (grow_token_buffer): this. Remove it.
23259 Adjust all the places which used it to use the obstack.
23260
23261 2001-01-19 Akim Demaille <akim@epita.fr>
23262
23263 * src/lex.h: Rename all the tokens:
23264 s/\bENDFILE\b/tok_eof/g;
23265 s/\bIDENTIFIER\b/tok_identifier/g;
23266 etc.
23267 Let them be enums, not #define, to ease debugging.
23268 Adjust all the code.
23269
23270 2001-01-18 Akim Demaille <akim@epita.fr>
23271
23272 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23273 * src/lex.c (maxtoken, grow_token_buffer): Static.
23274
23275 2001-01-18 Akim Demaille <akim@epita.fr>
23276
23277 Since we now use obstacks, more % directives can be enabled.
23278
23279 * src/lex.c (percent_table): Also accept `%yacc',
23280 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23281 `%debug'.
23282 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23283 instead of returning a token.
23284 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23285 * src/reader.c (read_declarations): Adjust.
23286 * src/files.c (open_files): Don't call `compute_base_names', don't
23287 compute `attrsfile' since they depend upon data which might be
23288 *in* the input file now.
23289 (output_files): Do it here.
23290 * src/output.c (output_headers): Document the fact that this patch
23291 introduces a guaranteed SEGV for semantic parsers.
23292 * doc/bison.texinfo: Document them.
23293 * tests/suite.at: Exercise these %options.
23294
23295 2000-12-20 Akim Demaille <akim@epita.fr>
23296
23297 Also handle the output file (--verbose) with obstacks.
23298
23299 * files.c (foutput): Remove.
23300 (output_obstack): New.
23301 Adjust all dependencies.
23302 * src/conflicts.c: Return a string.
23303 * src/system.h (obstack_grow_string): Rename as...
23304 (obstack_sgrow): this. Be ready to work with non literals.
23305 (obstack_fgrow4): New.
23306
23307 2000-12-20 Akim Demaille <akim@epita.fr>
23308
23309 * src/files.c (open_files): Fix the computation of short_base_name
23310 in the case of `-o foo.tab.c'.
23311
23312 2000-12-20 Akim Demaille <akim@epita.fr>
23313
23314 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23315 (copy_dollar): Now that everything uses obstacks, get rid of the
23316 FILE * parameters.
23317
23318 2000-12-20 Akim Demaille <akim@epita.fr>
23319
23320 * src/files.c (open_files): Actually the `.output' file is based
23321 on the short_base_name, not base_name.
23322 * tests/suite.at (Checking output file names): Adjust.
23323
23324 2000-12-20 Akim Demaille <akim@epita.fr>
23325
23326 * src/bison.s1: Remove, we now use directly...
23327 * src/bison.simple: this.
23328 * src/Makefile.am: Use pkgdata instead of data.
23329
23330 2000-12-20 Akim Demaille <akim@epita.fr>
23331
23332 * src/files.c (guard_obstack): New.
23333 (open_files): Initialize it.
23334 (output_files): Dump it...
23335 * src/files.h: Export it.
23336 * src/reader.c (copy_guard): Use it.
23337
23338 2000-12-19 Akim Demaille <akim@epita.fr>
23339
23340 * src/files.c (outfile, defsfile, actfile): Removed as global
23341 vars.
23342 (open_files): Don't compute them.
23343 (output_files): Adjust.
23344 (base_name, short_base_name): Be global.
23345 Adjust dependencies.
23346
23347 2000-12-19 Akim Demaille <akim@epita.fr>
23348
23349 * src/files.c (strsuffix): New.
23350 (stringappend): Be just like strcat but allocate.
23351 (base_names): Eve out from open_files.
23352 Try to simplify the rather hairy computation of base_name and
23353 short_base_name.
23354 (open_files): Use it.
23355 * tests/suite.at (Checking output file names): New test.
23356
23357 2000-12-19 Akim Demaille <akim@epita.fr>
23358
23359 * src/system.h (obstack_grow_literal_string): Rename as...
23360 (obstack_grow_string): this.
23361 * src/output.c (output_parser): Recognize `%% actions' instead of
23362 `$'.
23363 * src/bison.s1: s/$/%% actions/.
23364 * src/bison.hairy: Likewise.
23365
23366 2000-12-19 Akim Demaille <akim@epita.fr>
23367
23368 * src/output.c (output_parser): Compute the `#line' lines when
23369 there are.
23370 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23371 Suggested by Hans Aberg.
23372
23373 2000-12-19 Akim Demaille <akim@epita.fr>
23374
23375 Let the handling of the skeleton files be local to the procedures
23376 that use it.
23377
23378 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23379 longer static.
23380 (fparser, open_extra_files): Remove.
23381 (open_files, output_files): Don't take care of fparser.
23382 * src/files.h: Adjust.
23383 * src/output.c (output_parser): Open and close the file to the
23384 skeleton.
23385 * src/reader.c (read_declarations): When %semantic_parser, open
23386 fguard.
23387
23388 2000-12-19 Akim Demaille <akim@epita.fr>
23389
23390 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23391 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23392
23393 2000-12-19 Akim Demaille <akim@epita.fr>
23394
23395 * src/files.c (open_files): Yipee! We no longer need all the code
23396 looking for `/tmp' since we have no tmp file.
23397
23398 2000-12-19 Akim Demaille <akim@epita.fr>
23399
23400 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23401 New macros.
23402 * src/files.c (open_files): Less dependency on MSDOS etc.
23403
23404 2000-12-14 Akim Demaille <akim@epita.fr>
23405
23406 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23407 Provide a default definition.
23408 Use it when executing the default @ action.
23409 * src/reader.c (reader_output_yylsp): No longer include
23410 `timestamp' and `text' in the default YYLTYPE.
23411
23412 2000-12-12 Akim Demaille <akim@epita.fr>
23413
23414 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23415 (copy_guard): Quote the file names.
23416 Reported by Laurent Mascherpa.
23417
23418 2000-12-12 Akim Demaille <akim@epita.fr>
23419
23420 * src/output.c (output_headers, output_program, output): Be sure
23421 to escape special characters when outputting filenames.
23422 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23423 (output_headers): Don't depend on them, Use ACTSTR.
23424
23425 2000-11-17 Akim Demaille <akim@epita.fr>
23426
23427 * lib/obstack.h: Formatting changes.
23428 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23429 prevents type checking.
23430 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23431 cast the value to (void *): assigning a `foo *' to a `void *'
23432 variable is valid.
23433 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23434 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23435 append characters.
23436
23437 2000-11-17 Akim Demaille <akim@epita.fr>
23438
23439 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23440 as...
23441 (suite.m4, regression.m4, calc.m4): these.
23442 * tests/atgeneral.m4: Update from CVS Autoconf.
23443
23444 2000-11-17 Akim Demaille <akim@epita.fr>
23445
23446 * tests/regression.m4 (%union and --defines): New test,
23447 demonstrating a current bug in the obstack implementation.
23448
23449 2000-11-17 Akim Demaille <akim@epita.fr>
23450
23451 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23452 macros.
23453 Use them to declare the variables which are global or local to
23454 `yyparse'.
23455
23456 2000-11-17 Akim Demaille <akim@epita.fr>
23457
23458 * acconfig.h: Remove, no longer used.
23459
23460 2000-11-07 Akim Demaille <akim@epita.fr>
23461
23462 * src: s/Copyright (C)/Copyright/g.
23463
23464 2000-11-07 Akim Demaille <akim@epita.fr>
23465
23466 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23467 defining.
23468 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23469
23470 2000-11-07 Akim Demaille <akim@epita.fr>
23471
23472 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23473 Merge in a single CPP if/else.
23474
23475 2000-11-07 Akim Demaille <akim@epita.fr>
23476
23477 * src/output.c (output): Remove useless variables.
23478 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23479 argument `data' for consistency with the prototypes.
23480 Qualify it `const'.
23481 (obstack_copy, obstack_copy0): Rename the second argument as
23482 `address' for consistency. Qualify it `const'.
23483 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23484 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23485 `const' their input argument (`data' or `address').
23486 Adjust the corresponding macros to include `const' in casts.
23487
23488 2000-11-03 Akim Demaille <akim@epita.fr>
23489
23490 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23491 s/PFILE1/BISON_HAIRY/.
23492 Adjust dependencies.
23493
23494 2000-11-03 Akim Demaille <akim@epita.fr>
23495
23496 For some reason, this was not applied.
23497
23498 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23499 `unlink': it's no longer used.
23500
23501 2000-11-03 Akim Demaille <akim@epita.fr>
23502
23503 * src/files.c (skeleton_find): New function, eved out of...
23504 (open_files, open_extra_files): here.
23505
23506 2000-11-03 Akim Demaille <akim@epita.fr>
23507
23508 Don't use `atexit'.
23509
23510 * src/files.c (obstack_save): New function.
23511 (done): Rename as...
23512 (output_files): this.
23513 Use `obstack_save'.
23514 * src/main.c (main): Don't use `atexit' to register `done', since
23515 it no longer has to remove tmp files, just call `output_files'
23516 when there are no errors.
23517
23518 2000-11-02 Akim Demaille <akim@epita.fr>
23519
23520 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23521 `unlink': it's no longer used.
23522 * src/files.h: Formatting changes.
23523
23524 2000-11-02 Akim Demaille <akim@epita.fr>
23525
23526 Remove the last uses of mktemp and unlink/delete.
23527
23528 * src/files.c (fdefines, ftable): Removed.
23529 (defines_ostack, table_obstack): New.
23530 Adjust dependencies of the former into uses of the latter.
23531 * src/output.c (output_short_or_char_table, output_short_table):
23532 Convert to using obstacks.
23533 * src/reader.c (copy_comment2): Accept one FILE * and two
23534 obstacks.
23535 (output_token_defines, reader_output_yylsp): Use obstacks.
23536 * src/system.h (obstack_fgrow3): New.
23537 * po/POTFILES.in: Adjust.
23538
23539 2000-11-01 Akim Demaille <akim@epita.fr>
23540
23541 Change each use of `fattrs' into a use of `attrs_obstack'.
23542
23543 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
23544 * src/files.c (fattrs): Remove.
23545 (attrs_obstack): New.
23546 Adjust all dependencies.
23547 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
23548
23549 2000-11-01 Akim Demaille <akim@epita.fr>
23550
23551 Introduce obstacks.
23552 Change each use of `faction' into a use of `action_obstack'.
23553
23554 * lib/obstack.h, lib/obstack.c: New files.
23555 * src/files.c (faction): Remove.
23556 (action_obstack): New.
23557 Adjust all dependencies.
23558
23559 2000-10-20 Akim Demaille <akim@epita.fr>
23560
23561 * lib/quote.h (PARAMS): New macro. Use it.
23562
23563 2000-10-16 Akim Demaille <akim@epita.fr>
23564
23565 * src/output.c (output_short_or_char_table): New function.
23566 (output_short_table, output_token_translations): Use it.
23567 (goto_actions): Use output_short_table.
23568
23569 2000-10-16 Akim Demaille <akim@epita.fr>
23570
23571 * src/symtab.c (bucket_new): New function.
23572 (getsym): Use it.
23573
23574 * src/output.c (output_short_table): New argument to display the
23575 comment associated with the table.
23576 Adjust dependencies.
23577 (output_gram): Use it.
23578 (output_rule_data): Nicer output layout for YYTNAME.
23579
23580 2000-10-16 Akim Demaille <akim@epita.fr>
23581
23582 * src/lex.c (read_typename): New function.
23583 (lex): Use it.
23584 * src/reader.c (copy_dollar): Likewise.
23585
23586 2000-10-16 Akim Demaille <akim@epita.fr>
23587
23588 * src/reader.c (copy_comment2): Expect the input stream to be on
23589 the `/' which is suspected to open a comment, instead of being
23590 called after `//' or `/*' was read.
23591 (copy_comment, copy_definition, parse_union_decl, copy_action)
23592 (copy_guard): Adjust.
23593
23594 2000-10-16 Akim Demaille <akim@epita.fr>
23595
23596 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
23597 `read_signed_integer'.
23598
23599 2000-10-16 Akim Demaille <akim@epita.fr>
23600
23601 * src/reader.c (copy_dollar): New function.
23602 (copy_guard, copy_action): Use it.
23603
23604 2000-10-16 Akim Demaille <akim@epita.fr>
23605
23606 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
23607 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
23608 New files, from Fileutils 4.0.27.
23609 * src/main.c (printable_version): Remove.
23610 * src/lex.c, src/reader.c: Use `quote'.
23611
23612 2000-10-04 Akim Demaille <akim@epita.fr>
23613
23614 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
23615
23616 2000-10-04 Akim Demaille <akim@epita.fr>
23617
23618 * doc/bison.texinfo: Various typos spotted by Neil Booth.
23619
23620 2000-10-04 Akim Demaille <akim@epita.fr>
23621
23622 When a literal string is used to define two different tokens,
23623 `bison -v' segfaults.
23624 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
23625
23626 * tests/regression.m4: New file.
23627 Include the core of the sample provided by Piotr Gackiewicz.
23628 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
23629 properly.
23630
23631 2000-10-04 Akim Demaille <akim@epita.fr>
23632
23633 * src/reader.c (parse_expect_decl): Keep `count' within the size
23634 of `buffer'.
23635 From Neil Booth.
23636
23637 2000-10-02 Paul Eggert <eggert@twinsun.com>
23638
23639 * bison.s1 (yyparse): Assign the default value
23640 unconditionally, to avoid a GCC warning and make the parser a
23641 tad smaller.
23642
23643 2000-10-02 Akim Demaille <akim@epita.fr>
23644
23645 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
23646 options.
23647
23648 2000-10-02 Akim Demaille <akim@epita.fr>
23649
23650 * src/derives.c, src/print.c, src/reduce.c: To ease the
23651 translation, move some `\n' out of the translated strings.
23652
23653 2000-10-02 Akim Demaille <akim@epita.fr>
23654
23655 The location tracking mechanism is precious for parse error
23656 messages. Nevertheless, it is enabled only when `@n' is used in
23657 the grammar, which is a different issue (you can use it in error
23658 message, but not in the grammar per se). Therefore, there should
23659 be another means to enable it.
23660
23661 * src/getargs.c (getargs): Support `--locations'.
23662 (usage): Report it.
23663 * src/getargs.h (locationsflag): Export it.
23664 * src/lex.c (percent_table): Support `%locations'.
23665 * src/reader.c (yylsp_needed): Remove this variable, now replaced
23666 with `locationsflag'.
23667 * doc/bison.texinfo: Document `--locations' and `%locations'.
23668 Sort the options.
23669 * tests/calc.m4: Test it.
23670
23671 For regularity of the names, replace each
23672 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
23673 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
23674 In addition replace each `flag' with `_flag'.
23675
23676 2000-10-02 Akim Demaille <akim@epita.fr>
23677
23678 Also test parse error messages, including with YYERROR_VERBOSE.
23679
23680 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
23681 associative).
23682 Use it to check the computations.
23683 Use it to check `nonassoc' is honored.
23684 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
23685 `--yyerror-verbose'.
23686 (_AT_CHECK_CALC): Adjust to this option.
23687 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
23688
23689 2000-10-02 Akim Demaille <akim@epita.fr>
23690
23691 Test also `--verbose', `--defines' and `--name-prefix'. Testing
23692 the latter demonstrates a flaw in the handling of non debugging
23693 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
23694 was used in order to simplify:
23695
23696 #if YYDEBUG
23697 if (yydebug)
23698 {
23699 ...
23700 }
23701 #endif
23702
23703 into
23704
23705 if (yydebug)
23706 {
23707 ...
23708 }
23709
23710 unfortunately this leads to a CPP conflict when
23711 `--name-prefix=foo' is used since it produces `#define yydebug
23712 foodebug'.
23713
23714 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
23715 (YYDPRINTF): New macro.
23716 Spread its use.
23717 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
23718 the bison options.
23719 Also test `--verbose', `--defines' and `--name-prefix'.
23720
23721 2000-10-02 Akim Demaille <akim@epita.fr>
23722
23723 Improve the readability of the produced parsers.
23724
23725 * src/bison.s1: Formatting changes.
23726 Improve the comment related to the `$' mark.
23727 (yydefault): Don't fall through to `yyresume': `goto' there.
23728 * src/output.c (output_parser): When the `$' is met, skip the end
23729 of its line.
23730 New variable, `number_of_dollar_signs', to check there's exactly
23731 one `$' in the parser skeleton.
23732
23733 2000-10-02 Akim Demaille <akim@epita.fr>
23734
23735 * lib/xstrdup.c: New file, from the fileutils.
23736 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
23737 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
23738 instead of strlen + xmalloc + strcpy.
23739 * src/symtab.c (copys): Remove, use xstrdup instead.
23740
23741 2000-10-02 Akim Demaille <akim@epita.fr>
23742
23743 * src/gram.h (associativity): New enum type which replaces the
23744 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
23745 `right_assoc', `left_assoc' and `non_assoc'.
23746 Adjust all dependencies.
23747 * src/reader.c: Formatting changes.
23748 (LTYPESTR): Don't define it, use it as a literal in
23749 `reader_output_yylsp'.
23750 * src/symtab.h (symbol_class): New enum type which replaces the
23751 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
23752 `sunknown', `stoken and `snterm'.
23753
23754 2000-10-02 Akim Demaille <akim@epita.fr>
23755
23756 * src/getargs.c (fixed_outfiles): Rename as...
23757 (yaccflag): for consistency and accuracy.
23758 Adjust dependencies.
23759
23760 2000-10-02 Akim Demaille <akim@epita.fr>
23761
23762 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
23763 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
23764 difficult and introduced a lot of core dump. It turns out that
23765 Bison used an implementation of `xmalloc' based on `calloc', and
23766 at various places it does depend upon the initialization to 0. I
23767 have not tried to isolate the pertinent places, and all the former
23768 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
23769 someone should address this issue.
23770
23771 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
23772 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
23773 files.
23774 Adjust dependencies.
23775 * src/warshall.h: New file.
23776 Propagate.
23777
23778 2000-10-02 Akim Demaille <akim@epita.fr>
23779
23780 Various anti-`extern in *.c' changes.
23781
23782 * src/system.h: Include `assert.h'.
23783
23784 2000-10-02 Akim Demaille <akim@epita.fr>
23785
23786 * src/state.h (nstates, final_state, first_state, first_shift)
23787 (first_reduction): Move their exportation from here...
23788 * src/LR0.h: to here.
23789 Adjust dependencies.
23790 * src/getargs.c (statisticsflag): New variable.
23791 Add support for `--statistics'.
23792 Adjust dependencies.
23793
23794 Remove a lot of now useless `extern' statements in most files.
23795
23796 2000-10-02 Akim Demaille <akim@epita.fr>
23797
23798 * src/LR0.h: New file.
23799 Propagate its use.
23800
23801 2000-10-02 Akim Demaille <akim@epita.fr>
23802
23803 * src/print.h: New file.
23804 Propagate its use.
23805 * src/print.c: Formatting and ordering changes.
23806 (verbose, terse): Replace with...
23807 (print_results): this new function.
23808 Adjust dependencies.
23809
23810 2000-10-02 Akim Demaille <akim@epita.fr>
23811
23812 * src/conflicts.c (conflict_report): New function.
23813 (conflict_log, verbose_conflict_log): Replace with...
23814 (print_conflicts): this function.
23815 Adjust dependencies.
23816 * src/conflicts.h: New file.
23817 Propagate its inclusion.
23818
23819 2000-10-02 Akim Demaille <akim@epita.fr>
23820
23821 * src/nullable.h: New file.
23822 Propagate its inclusion.
23823 * src/nullable.c: Formatting changes.
23824
23825 2000-10-02 Akim Demaille <akim@epita.fr>
23826
23827 * src/reduce.h: New file.
23828 Propagate its inclusion.
23829 * src/reduce.c: Topological sort and other formatting changes.
23830 (bool, TRUE, FALSE): Move their definition to...
23831 * src/system.h: here.
23832
23833 2000-10-02 Akim Demaille <akim@epita.fr>
23834
23835 * src/files.c: Formatting changes.
23836 (tryopen, tryclose, openfiles): Rename as...
23837 (xfopen, xfclose, open_files): this.
23838 (stringappend): static.
23839 * src/files.h: Complete the list of exported symbols.
23840 Propagate its use.
23841
23842 2000-10-02 Akim Demaille <akim@epita.fr>
23843
23844 * src/reader.h: New file.
23845 Propagate its use instead of tedious list of `extern' and
23846 prototypes.
23847 * src/reader.c: Formatting changes, topological sort,
23848 s/register//.
23849
23850 2000-10-02 Akim Demaille <akim@epita.fr>
23851
23852 * src/lex.h: Prototype `lex.c' exported functions.
23853 * src/reader.c: Adjust.
23854 * src/lex.c: Formatting changes.
23855 (safegetc): Rename as...
23856 (xgetc): this.
23857
23858 2000-10-02 Akim Demaille <akim@epita.fr>
23859
23860 * src/lalr.h: New file.
23861 Propagate its inclusion instead of prototypes and `extern'.
23862 * src/lalr.c: Formatting changes, topological sorting etc.
23863
23864 2000-10-02 Akim Demaille <akim@epita.fr>
23865
23866 * src/output.c (token_actions): Introduce a temporary array,
23867 YYDEFACT, that makes it possible for this function to use
23868 output_short_table.
23869
23870 2000-10-02 Akim Demaille <akim@epita.fr>
23871
23872 `user_toknums' is output as a `short[]' in `output.c', while it is
23873 defined as a `int[]' in `reader.c'. For consistency with the
23874 other output tables, `user_toknums' is now defined as a table of
23875 shorts.
23876
23877 * src/reader.c (user_toknums): Be a short table instead of an int
23878 table.
23879 Adjust dependencies.
23880
23881 Factor the short table outputs.
23882
23883 * src/output.c (output_short_table): New function.
23884 * src/output.c (output_gram, output_stos, output_rule_data)
23885 (output_base, output_table, output_check): Use it.
23886
23887 2000-10-02 Akim Demaille <akim@epita.fr>
23888
23889 * src/output.c (output): Topological sort of the functions, in
23890 order to get rid of the `static' prototypes.
23891 No longer use `register'.
23892 * src/output.h: New file.
23893 Propagate its inclusion in files explicitly prototyping functions
23894 from output.c.
23895
23896 2000-09-21 Akim Demaille <akim@epita.fr>
23897
23898 * src/atgeneral.m4: Update from Autoconf.
23899
23900 2000-09-21 Akim Demaille <akim@epita.fr>
23901
23902 * src/closure.h: New file.
23903 * src/closure.c: Formatting changes, topological sort over the
23904 functions, use of closure.h.
23905 (initialize_closure, finalize_closure): Rename as...
23906 (new_closure, free_closure): these. Adjust dependencies.
23907 * src/LR0.c: Formatting changes, topological sort, use of
23908 cloture.h.
23909 (initialize_states): Rename as...
23910 (new_states): this.
23911 * src/Makefile.am (noinst_HEADERS): Adjust.
23912
23913 2000-09-20 Akim Demaille <akim@epita.fr>
23914
23915 * src/acconfig.h: Don't protect config.h against multiple
23916 inclusion.
23917 Don't define PARAMS.
23918 * src/system.h: Define PARAMS.
23919 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
23920 purpose of config.h. system.h must not try to fix wrong
23921 definitions in config.h.
23922
23923 2000-09-20 Akim Demaille <akim@epita.fr>
23924
23925 * src/derives.h: New file.
23926 * src/main.c, src/derives.h: Use it.
23927 Formatting changes.
23928 * src/Makefile.am (noinst_HEADERS): Adjust.
23929
23930 2000-09-20 Akim Demaille <akim@epita.fr>
23931
23932 * tests/atgeneral.m4: Update from Autoconf.
23933 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
23934 (AT_CHECK_CALC): New macros.
23935 Use these macros to test bison with options `', `--raw',
23936 `--debug', `--yacc', `--yacc --debug'.
23937
23938 2000-09-19 Akim Demaille <akim@epita.fr>
23939
23940 * src/output.c: Formatting changes.
23941 * src/machine.h: Remove, leaving its contents in...
23942 * src/system.h: here.
23943 Include stdio.h.
23944 Adjust all dependencies on stdio.h and machine.h.
23945 * src/getargs.h: New file.
23946 Let all `extern' declarations about getargs.c be replaced with
23947 inclusion of `getargs.h'.
23948 * src/Makefile.am (noinst_HEADERS): Adjust.
23949
23950 * tests/calc.m4 (yyin): Be initialized in main, not on the global
23951 scope.
23952 (yyerror): Returns void, not int.
23953 * doc/bison.texinfo: Formatting changes.
23954
23955 2000-09-19 Akim Demaille <akim@epita.fr>
23956
23957 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
23958 portable.
23959
23960 2000-09-18 Akim Demaille <akim@epita.fr>
23961
23962 * configure.in: Append WARNING_CFLAGS to CFLAGS.
23963 * src/Makefile.am (INCLUDES): Don't.
23964 Be ready to fetch headers in lib/.
23965
23966 2000-09-18 Akim Demaille <akim@epita.fr>
23967
23968 * doc/bison.texinfo: Update the copyright.
23969 ANSIfy and GNUify the examples.
23970 Remove the old menu.
23971
23972 2000-09-18 Akim Demaille <akim@epita.fr>
23973
23974 First set of tests: use the `calc' example from the documentation.
23975
23976 * src/bison.s1 (yyparse): Condition the code using `yytname' which
23977 is defined only when YYDEBUG is.
23978 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
23979 * src/files.c (tryopen, tryclose): Formatting changes.
23980 Move to the top and be static.
23981 * src/reader.c (read_signed_integer): Likewise.
23982 * tests/calc.m4: New file.
23983 * Makefile.am, suite.m4: Adjust.
23984 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
23985
23986 2000-09-18 Akim Demaille <akim@epita.fr>
23987
23988 Add support for an Autotest test suite for Bison.
23989
23990 * m4/m4.m4, m4/atconfig.m4: New files.
23991 * m4/Makefile.am (EXTRA_DIST): Adjust.
23992 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
23993 files.
23994 * src/getargs.c: Display a more standard --version message.
23995 * src/reader.c (reader): Formatting changes.
23996 No longer depend upon VERSION_STRING.
23997 * configure.in: No longer use `dnl'.
23998 Set up the test suite and the new directory `tests/.
23999 (VERSION_STRING): Remove.
24000
24001 2000-04-14 Akim Demaille <akim@epita.fr>
24002
24003 * src/reader.c (copy_comment2): New function, same as former
24004 `copy_comment', but outputs into two FILE *.
24005 (copy_comment): Use it.
24006 (parse_union_decl): Use it.
24007 (get_type, parse_start_decl): Use the same `invalid' message.
24008 (parse_start_decl, parse_union_decl): Use the same `multiple'
24009 message.
24010 (parse_union_decl, copy_guard, copy_action): Use the same
24011 `unmatched' message.
24012 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
24013
24014 2000-03-31 Akim Demaille <akim@epita.fr>
24015
24016 * src/files.c (tryopen, tryclose): Move to the top.
24017 Be static.
24018
24019 2000-03-31 Akim Demaille <akim@epita.fr>
24020
24021 * src/main.c (main): Don't call `done', exit does it.
24022
24023 2000-03-31 Akim Demaille <akim@epita.fr>
24024
24025 * allocate.c: s/return (foo)/return foo/.
24026 * lalr.c: Likewise.
24027 * LR0.c: Likewise.
24028 * output.c: Likewise.
24029 * reader.c: Likewise.
24030 * symtab.c: Likewise.
24031 * vmsgetargs.c: Likewise.
24032
24033 2000-03-31 Akim Demaille <akim@epita.fr>
24034
24035 Clean up the error reporting functions.
24036
24037 * src/report.c: New file.
24038 * src/report.h: Likewise.
24039 * src/Makefile.am: Adjust.
24040 * m4/error.m4: New file.
24041 * m4/Makefile.am: Adjust.
24042 * configure.in (jm_PREREQ_ERROR): Call it.
24043 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
24044 Remove.
24045 (fatal, fatals): Remove. All callers use complain.c::fatal.
24046 (warn, warni, warns, warnss, warnss): Remove. All callers use
24047 complain.c::complain.
24048 (toomany): Remove, use fatal instead.
24049 * src/files.c (done): No argument, use complain_message_count.
24050 * src/main.c (main): Register `done' to `atexit'.
24051
24052 * src/getargs.c (usage): More `fputs', less `fprintf'.
24053
24054 2000-03-28 Akim Demaille <akim@epita.fr>
24055
24056 * lib/: New directory.
24057 * Makefile.am (SUBDIRS): Adjust.
24058 * configure.in: Adjust.
24059 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
24060 useless.
24061 * src/alloca.c: Moved to lib/.
24062 * src/getopt.c: Likewise.
24063 * src/getopt1.c: Likewise.
24064 * src/getopt.h: Likewise.
24065 * src/ansi2knr.c: Likewise.
24066 * src/ansi2knr.1: Likewise.
24067 * src/Makefile.am: Adjust.
24068 * lib/Makefile.am: New file.
24069
24070 2000-03-28 Akim Demaille <akim@epita.fr>
24071
24072 * src/getargs.c (usage): Refresh the help message.
24073
24074 2000-03-17 Akim Demaille <akim@epita.fr>
24075
24076 * src/getopt1.c: Updated from textutils 2.0e
24077 * src/getopt.c: Likewise.
24078 * src/getopt.h: Likewise.
24079
24080 2000-03-17 Akim Demaille <akim@epita.fr>
24081
24082 * src/Makefile.am (bison.simple): Fix the awk program: quote only
24083 the file name, not the whole `#line LINE FILE'.
24084
24085 2000-03-17 Akim Demaille <akim@epita.fr>
24086
24087 On syntax errors, report the token on which we choked.
24088
24089 * src/bison.s1 (yyparse): In the label yyerrlab, when
24090 YYERROR_VERBOSE, add yychar in msg.
24091
24092 2000-03-17 Akim Demaille <akim@epita.fr>
24093
24094 * src/reader.c (copy_at): New function.
24095 (copy_guard): Use it.
24096 (copy_action): Use it.
24097
24098 2000-03-17 Akim Demaille <akim@epita.fr>
24099
24100 Be kind to translators, save some useless translations.
24101
24102 * src/main.c (banner): New function.
24103 (fatal_banner): Use it.
24104 (warn_banner): Use it.
24105
24106 2000-03-17 Akim Demaille <akim@epita.fr>
24107
24108 * src/reader.c (copy_definition): Use copy_string and
24109 copy_comment. Removed now unused `match', `ended',
24110 `cplus_comment'.
24111 (copy_comment, copy_string): Moved, to be visible from
24112 copy_definition.
24113
24114 2000-03-17 Akim Demaille <akim@epita.fr>
24115
24116 * src/reader.c (copy_string): Declare `static inline'. No
24117 problems with inline, since it is checked by configure.
24118 (copy_comment): Likewise.
24119
24120 2000-03-17 Akim Demaille <akim@epita.fr>
24121
24122 * src/reader.c (packsymbols): Formatting changes.
24123
24124 2000-03-17 Akim Demaille <akim@epita.fr>
24125
24126 * src/reader.c (copy_comment): New function, factored out from:
24127 (copy_action): Use it. Removed now unused `match', `ended',
24128 `cplus_comment'.
24129 (copy_guard): Likewise.
24130
24131 2000-03-17 Akim Demaille <akim@epita.fr>
24132
24133 * src/reader.c (copy_string): New function, factored out from:
24134 (copy_action): Use it.
24135 (copy_guard): Likewise.
24136
24137 2000-03-17 Akim Demaille <akim@epita.fr>
24138
24139 Change the handling of @s so that they behave exactly like $s.
24140 There is now a pseudo variable @$ (readble and writable), location
24141 of the lhs of the rule (by default ranging from the location of
24142 the first symbol of the rhs, to the location of the last symbol,
24143 or, if the rhs is empty, YYLLOC).
24144
24145 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24146 yyval.
24147 (yyparse): When providing a default semantic action, provide a
24148 default location action.
24149 (after the $): No longer change `*YYLSP', just stack YYLOC the
24150 same way you stack YYVAL.
24151 * src/reader.c (read_declarations): Use warns.
24152 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24153 (copy_action, case '@'): Likewise.
24154 Use a standard error message, to save useless work from
24155 translators.
24156
24157 2000-03-17 Akim Demaille <akim@epita.fr>
24158
24159 * src/bison.s1: Formatting and cosmetics changes.
24160 * src/reader.c: Likewise.
24161 Update the Copyright notice.
24162
24163 2000-03-17 Akim Demaille <akim@epita.fr>
24164
24165 * src/bison.s1 (#line): All set to `#line' only, since the
24166 Makefile now handles them.
24167
24168 2000-03-16 Akim Demaille <akim@epita.fr>
24169
24170 * src/output.c (output_rule_data): Output the documentation of
24171 some of the tables.
24172 (Copyright notice): Update.
24173 Formatting changes.
24174
24175 2000-03-16 Akim Demaille <akim@epita.fr>
24176
24177 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24178 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24179 One `#if YYDEBUG' remains, since it uses variables which are
24180 defined only if `YYDEBUG != 0'.
24181
24182 2000-03-16 Akim Demaille <akim@epita.fr>
24183
24184 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24185 and related variables so that the similarities are highlighted.
24186
24187 2000-03-16 Akim Demaille <akim@epita.fr>
24188
24189 * src/bison.s1: Properly indent CPP directives.
24190
24191 2000-03-16 Akim Demaille <akim@epita.fr>
24192
24193 * src/bison.s1: Properly indent the `alloca' CPP section.
24194
24195 2000-03-16 Akim Demaille <akim@epita.fr>
24196
24197 Do not hard code values of directories in `configure.in'.
24198 Update the `configure' tool chain.
24199
24200 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24201 src/makefile.am.
24202 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24203 (AC_OUTPUT): Add m4/Makefile.
24204 Bump to bison 1.28a, 1.29 has never been released.
24205 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24206 handled via src/Makefile.am.
24207 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24208 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24209 autoheader.
24210 * Makefile.am (SUBDIRS): Add m4.
24211 (ACLOCAL_AM_FLAGS): New variable.
24212 (AUTOMAKE_OPTIONS): Add check-news.
24213 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24214 the proper line number and file name.
24215 (DEFS): Propagate the location of bison library files and of the
24216 locale files.
24217 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24218 builddir.
24219 * acinclude.m4: Remove, replaced by the directory m4.
24220 * m4/Makefile.am (EXTRA_DIST): New variable.
24221 * m4/gettext.m4: New file, from the fileutils.
24222 * m4/lcmessage.m4: Likewise
24223 * m4/progtest.m4: Likewise.
24224 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24225
24226 2000-03-10 Akim Demaille <akim@epita.fr>
24227
24228 * src/closure.c:
24229 Formatting changes of various comments.
24230 Respect the GNU coding standards at various places.
24231 Don't use `_()' when no translation is needed.
24232
24233 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24234
24235 * src/files.c:
24236 OS/2 honors TMPDIR environment variable.
24237
24238 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24239
24240 * doc/bison.texinfo: Tweaked spelling and grammar.
24241 Updated ISBN.
24242 Removed reference to price of printed copy.
24243 Mention BISON_SIMPLE and BISON_HAIRY.
24244
24245 1999-12-13 Jesse Thilo <jthilo@gnu.org>
24246
24247 * configure.in, NEWS:
24248 Bison 1.29 released.
24249
24250 1999-10-27 Jesse Thilo <jthilo@gnu.org>
24251
24252 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24253 Added reference card.
24254
24255 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24256
24257 * po/ru.po: Added Russian translation.
24258
24259 1999-07-26 Jesse Thilo <jthilo@gnu.org>
24260
24261 * configure.in: Added Russian translation.
24262
24263 1999-07-06 Jesse Thilo <jthilo@gnu.org>
24264
24265 * configure.in, NEWS, README:
24266 Released version 1.28.
24267
24268 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24269
24270 * src/system.h:
24271 Squashed redefinition warning on some systems.
24272
24273 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24274 Have configure build version string instead of relying on ANSI string
24275 concatentation.
24276
24277 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24278
24279 * po/POTFILES.in: Got rid of version.c.
24280
24281 1999-06-14 Jesse Thilo <jthilo@gnu.org>
24282
24283 * acconfig.h, configure.in:
24284 Have configure build version string instead of relying on ANSI string
24285 concatentation.
24286
24287 1999-06-08 Jesse Thilo <jthilo@gnu.org>
24288
24289 * doc/bison.1:
24290 Dropped mention of `+' for long-named options.
24291
24292 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24293
24294 * src/files.c: Added <unistd.h> for unlink().
24295
24296 * src/Makefile.am, src/system.h:
24297 I18n fixes.
24298
24299 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24300
24301 * README: Added a FAQ list.
24302
24303 * configure.in, acconfig.h:
24304 I18n fixes.
24305
24306 1999-05-30 Jesse Thilo <jthilo@gnu.org>
24307
24308 * doc/FAQ, doc/Makefile.am:
24309 Added a FAQ list.
24310
24311 1999-05-19 Jesse Thilo <jthilo@gnu.org>
24312
24313 * src/alloc.h, src/symtab.h, src/version.c:
24314 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24315
24316 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24317
24318 * src/.cvsignore, src/Makefile.am:
24319 Reorganized: sources in `src', documentation in `doc'.
24320
24321 * src/lex.c (literalchar):
24322 fixed the code for escaping double quotes (thanks
24323 Jonathan Czisny.)
24324
24325 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24326
24327 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24328 Adjusted paths to reflect directory reorganization.
24329
24330 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24331
24332 * doc/.cvsignore, doc/Makefile.am:
24333 Reorganized: sources in `src', documentation in `doc'.
24334
24335 1999-04-18 Jesse Thilo <jthilo@gnu.org>
24336
24337 * configure.in:
24338 Updated AC_INIT file to reflect directory reorganization.
24339
24340 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24341 Reorganized: sources in `src', documentation in `doc'.
24342
24343 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24344
24345 * src/allocate.c:
24346 Don't declare calloc() and realloc() if not necessary.
24347
24348 1999-04-13 Jesse Thilo <jthilo@gnu.org>
24349
24350 * configure.in, acconfig.h, acinclude.m4:
24351 Don't declare calloc() and realloc() if not necessary.
24352
24353 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24354
24355 * po/.cvsignore: Added i18n support.
24356
24357 1999-03-23 Jesse Thilo <jthilo@gnu.org>
24358
24359 * acconfig.h, configure.in, Makefile.am:
24360 Added i18n support.
24361
24362 1999-03-22 Jesse Thilo <jthilo@gnu.org>
24363
24364 * src/bison.s1: Fixed #line numbers.
24365
24366 1999-03-15 Jesse Thilo <jthilo@gnu.org>
24367
24368 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24369 Added PO files from Translation Project.
24370
24371 1999-03-03 Jesse Thilo <jthilo@gnu.org>
24372
24373 * Makefile.am:
24374 Added support for non-ANSI compilers (ansi2knr).
24375
24376 1999-02-16 Jesse Thilo <jthilo@gnu.org>
24377
24378 * configure.in: Bumped version number to 1.27.
24379
24380 * Makefile.am:
24381 Added `bison.simple' to list of files removed by `make distclean'.
24382
24383 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24384
24385 * src/files.c, src/files.h:
24386 Defined locations of parser files in config.h instead of Makefile.
24387
24388 1999-02-12 Jesse Thilo <jthilo@gnu.org>
24389
24390 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24391 Defined locations of parser files in config.h instead of Makefile.
24392
24393 1999-02-09 Jesse Thilo <jthilo@gnu.org>
24394
24395 * Makefile.am:
24396 Removed inappropriate use of $< macro.
24397
24398 1999-02-05 Jesse Thilo <jthilo@gnu.org>
24399
24400 * po/Makefile.in.in, po/POTFILES.in:
24401 Add `po' directory skeleton.
24402
24403 1999-01-27 Jesse Thilo <jthilo@gnu.org>
24404
24405 * README: Document help-bison list.
24406
24407 * configure.in: Add check for mkstemp().
24408
24409 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24410
24411 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24412 Hush a few compiler warnings.
24413
24414 * src/files.c:
24415 Add tryclose(), which verifies that fclose was successful.
24416 Hush a couple of compiler warnings.
24417
24418 1999-01-20 Jesse Thilo <jthilo@gnu.org>
24419
24420 * Makefile.am, OChangeLog:
24421 ChangeLog is now automatically generated. Include the old version as
24422 OChangeLog.
24423
24424 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24425
24426 * 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:
24427 Update FSF address.
24428
24429 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24430
24431 * doc/bison.texinfo: Fix formatting glitch.
24432
24433 * doc/bison.texinfo: Update FSF address.
24434
24435 1999-01-14 Jesse Thilo <jthilo@gnu.org>
24436
24437 * acconfig.h: Update FSF address.
24438
24439 1999-01-08 Jesse Thilo <jthilo@gnu.org>
24440
24441 * src/system.h:
24442 Don't define PACKAGE here, since config.h defines it.
24443
24444 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24445
24446 * src/reader.c: Update copyright date.
24447
24448 * src/main.c:
24449 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24450 favor of output directly to stderr (avoids buffer overruns).
24451
24452 * src/reader.c: Some checks for premature EOF.
24453
24454 * 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:
24455 Use prototypes if the compiler understands them.
24456
24457 * src/files.c: Honor TMPDIR on Unix hosts.
24458 Use prototypes if the compiler understands them.
24459
24460 * src/reader.c:
24461 Fix a couple of buffer overrun bugs.
24462 Use prototypes if the compiler understands them.
24463
24464 * src/system.h: Include unistd.h and ctype.h.
24465 Use #ifdef instead of #if for NLS symbols.
24466
24467 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24468
24469 * doc/bison.texinfo:
24470 Delete comment "consider using @set for edition number, etc..." since
24471 we now are doing so.
24472
24473 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24474
24475 * configure.in:
24476 Use prototypes if the compiler understands them.
24477
24478 * NEWS: Document 1.26 highlights.
24479
24480 * Makefile.am: Require Automake 1.3 or later.
24481
24482 * acconfig.h:
24483 Use prototypes if the compiler understands them.
24484
24485 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24486
24487 * src/version.c:
24488 Use VERSION symbol from automake for version number.
24489
24490 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24491
24492 * acconfig.h, configure.in, version.cin:
24493 Use VERSION symbol from automake for version number.
24494
24495 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24496
24497 * Makefile.am:
24498 Distribute original version of simple parser (bison.s1), not built
24499 version (bison.simple).
24500
24501 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24502
24503 * doc/bison.texinfo: Add info dir entry.
24504
24505 * doc/bison.texinfo:
24506 Let automake put version number into documentation.
24507
24508 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24509
24510 * src/bison.cld, src/build.com, src/vmshlp.mar:
24511 Add non-RCS files from /gd/gnu/bison.
24512
24513 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24514
24515 * doc/bison.1:
24516 Document the BISON_HAIRY and BISON_SIMPLE variables.
24517
24518 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24519
24520 * src/version.c: Build version.c automatically.
24521
24522 * src/reader.c:
24523 Fix token numbering (used to start at 258, not 257).
24524
24525 * src/system.h: Include config.h.
24526
24527 * src/getargs.c: Update bug report address.
24528
24529 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24530 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24531
24532 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24533
24534 * Makefile.am:
24535 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24536
24537 * configure.in, version.cin:
24538 Build version.c automatically.
24539
24540 * AUTHORS: Add AUTHORS file.
24541
24542 * README: Update bug report address.
24543
24544 * bison.simple:
24545 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24546
24547 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
24548 Add automake stuff.
24549
24550 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24551
24552 * doc/bison.texinfo: Clean up some formatting.
24553
24554 1998-05-05 Richard Stallman <rms@gnu.org>
24555
24556 * doc/bison.texinfo:
24557 Explain better why to make a pure parser.
24558
24559 1998-01-05 Richard Stallman <rms@gnu.org>
24560
24561 * src/files.c (openfiles):
24562 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
24563 find a temporary directory, if possible. Do not unlink files while
24564 they are open.
24565
24566 1997-08-25 Richard Stallman <rms@gnu.org>
24567
24568 * src/reader.c (stack_offset;):
24569 Change some warni to warns.
24570
24571 * src/lex.c (literalchar): Use warns, not warni.
24572
24573 1997-06-28 Richard Stallman <rms@gnu.org>
24574
24575 * src/bison.s1: Add a Bison version comment.
24576
24577 * src/main.c (fatal, warn, berror):
24578 Use program_name.
24579
24580 1997-06-28 Richard Stallman <rms@gnu.org>
24581
24582 * Makefile.in (bison_version): New variable.
24583 (dist): Use that variable.
24584 (bison.s1): Substitute the Bison version into bison.simple.
24585
24586 * bison.simple: Add a Bison version comment.
24587
24588 1997-06-18 Richard Stallman <rms@gnu.org>
24589
24590 * src/main.c (fatal, warn, berror):
24591 Make error messages standard.
24592 (toomany): Improve error message text.
24593
24594 * 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:
24595 new.h renamed to alloc.h.
24596
24597 1997-06-18 Richard Stallman <rms@gnu.org>
24598
24599 * Makefile.in: new.h renamed to alloc.h.
24600
24601 1997-05-24 Richard Stallman <rms@gnu.org>
24602
24603 * src/lex.c (literalchar):
24604 Fix the code for escaping \, " and '.
24605
24606 (lex): Avoid trouble when there are many chars
24607 to discard in a char literal with just several chars in it.
24608
24609 1997-05-17 Richard Stallman <rms@gnu.org>
24610
24611 * src/bison.s1:
24612 Use malloc, if using alloca is troublesome.
24613 (YYSTACK_USE_ALLOCA): New flag macro.
24614 Define it for some systems and compilers.
24615 (YYSTACK_ALLOC): New macro.
24616 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24617 If it was malloc'd, free it.
24618
24619 1997-05-17 Richard Stallman <rms@gnu.org>
24620
24621 * bison.simple:
24622 Use malloc, if using alloca is troublesome.
24623 (YYSTACK_USE_ALLOCA): New flag macro.
24624 Define it for some systems and compilers.
24625 (YYSTACK_ALLOC): New macro.
24626 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24627 If it was malloc'd, free it.
24628
24629 1997-04-23 Richard Stallman <rms@gnu.org>
24630
24631 * src/bison.s1:
24632 (alloca) [__hpux]: Always define as __builtin_alloca.
24633
24634 1997-04-23 Richard Stallman <rms@gnu.org>
24635
24636 * bison.simple:
24637 (alloca) [__hpux]: Always define as __builtin_alloca.
24638
24639 1997-04-22 Richard Stallman <rms@gnu.org>
24640
24641 * src/bison.s1:
24642 [__hpux]: Include alloca.h (right for HPUX 10)
24643 instead of declaring alloca (right for HPUX 9).
24644
24645 * src/bison.s1 (__yy_memcpy):
24646 Declare arg `count' as unsigned int.
24647 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24648
24649 1997-04-22 Richard Stallman <rms@gnu.org>
24650
24651 * bison.simple:
24652 [__hpux]: Include alloca.h (right for HPUX 10)
24653 instead of declaring alloca (right for HPUX 9).
24654
24655 * bison.simple (__yy_memcpy):
24656 Declare arg `count' as unsigned int.
24657 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24658
24659 1997-01-03 Richard Stallman <rms@gnu.org>
24660
24661 * src/allocate.c: [__STDC__ or _MSC_VER]:
24662 Declare calloc and realloc to return void *.
24663
24664 1997-01-02 Richard Stallman <rms@gnu.org>
24665
24666 * src/system.h:
24667 [_MSC_VER]: Include stdlib.h and process.h.
24668 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
24669
24670 * src/main.c (main): Return FAILURE as a value.
24671 (printable_version): Declare arg as int, not char.
24672
24673 1997-01-02 Richard Stallman <rms@gnu.org>
24674
24675 * Makefile.in (dist):
24676 Explicitly check for symlinks, and copy them.
24677
24678 1996-12-19 Richard Stallman <rms@gnu.org>
24679
24680 * src/files.c:
24681 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
24682
24683 1996-12-18 Paul Eggert <eggert@gnu.org>
24684
24685 * src/bison.s1 (yyparse):
24686 If __GNUC__ and YYPARSE_PARAM are both defined,
24687 declare yyparse to have a void * argument.
24688
24689 1996-12-18 Paul Eggert <eggert@gnu.org>
24690
24691 * bison.simple (yyparse):
24692 If __GNUC__ and YYPARSE_PARAM are both defined,
24693 declare yyparse to have a void * argument.
24694
24695 1996-12-17 Richard Stallman <rms@gnu.org>
24696
24697 * src/reduce.c (nbits): Add some casts.
24698
24699 1996-08-12 Richard Stallman <rms@gnu.org>
24700
24701 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
24702
24703 1996-08-12 Richard Stallman <rms@gnu.org>
24704
24705 * bison.simple: Test _MSDOS as well as _MSDOS_.
24706
24707 1996-07-31 Richard Stallman <rms@gnu.org>
24708
24709 * src/bison.s1:
24710 [__sun && __i386]: Include alloca.h.
24711
24712 1996-07-31 Richard Stallman <rms@gnu.org>
24713
24714 * bison.simple:
24715 [__sun && __i386]: Include alloca.h.
24716
24717 1996-07-30 Richard Stallman <rms@gnu.org>
24718
24719 * src/bison.s1: Comment change.
24720
24721 * src/bison.s1: Test _MSDOS_, not MSDOS.
24722
24723 1996-07-30 Richard Stallman <rms@gnu.org>
24724
24725 * bison.simple: Comment change.
24726
24727 * bison.simple: Test _MSDOS_, not MSDOS.
24728
24729 1996-06-01 Richard Stallman <rms@gnu.org>
24730
24731 * 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:
24732 Insert `_' macro around many string constants.
24733
24734 * src/main.c:
24735 Insert `_' macro around many string constants.
24736
24737 (main): Call setlocale, bindtextdomain and textdomain.
24738
24739 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
24740 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
24741 [ENABLE_NLS]: Include libintl.h.
24742 [ENABLE_NLS] (gettext): Define.
24743 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
24744 (N_, PACKAGE, LOCALEDIR): New macros.
24745
24746 1996-06-01 Richard Stallman <rms@gnu.org>
24747
24748 * POTFILES.in: New file.
24749
24750 * Makefile.in (allocate.o):
24751 Define target explicitly.
24752
24753 * Makefile.in (CFLAGS): Set to @CFLAGS@.
24754 (LDFLAGS): Set to @LDFLAGS@.
24755 (configure): Run autoconf only if preceding `cd' succeeds.
24756 (bison.s1): Redirect output to temporary file then move the
24757 temporary to the target, rather than redirecting directly to bison.s1.
24758 (clean): Remove config.status and config.log.
24759 (distclean): Don't remove config.status here.
24760
24761 1996-05-12 Richard Stallman <rms@gnu.org>
24762
24763 * src/bison.s1:
24764 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24765
24766 1996-05-12 Richard Stallman <rms@gnu.org>
24767
24768 * bison.simple:
24769 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24770
24771 1996-05-11 Richard Stallman <rms@gnu.org>
24772
24773 * src/bison.s1 (__yy_memcpy):
24774 Really reorder the args, as was supposedly done on Feb 14 1995.
24775 (yyparse): Calls changed accordingly.
24776
24777 1996-05-11 Richard Stallman <rms@gnu.org>
24778
24779 * Makefile.in (dist): Don't use $(srcdir).
24780
24781 * bison.simple (__yy_memcpy):
24782 Really reorder the args, as was supposedly done on Feb 14 1995.
24783 (yyparse): Calls changed accordingly.
24784
24785 1996-01-27 Richard Stallman <rms@gnu.org>
24786
24787 * src/output.c (output_rule_data):
24788 Test YYERROR_VERBOSE in the conditional
24789 around the definition of ttyname.
24790
24791 1995-12-29 Richard Stallman <rms@gnu.org>
24792
24793 * src/bison.s1:
24794 Fix line numbers in #line commands.
24795
24796 1995-12-29 Richard Stallman <rms@gnu.org>
24797
24798 * bison.simple:
24799 Fix line numbers in #line commands.
24800
24801 1995-12-27 Richard Stallman <rms@gnu.org>
24802
24803 * src/bison.s1 (YYPARSE_PARAM_DECL):
24804 In C++, make it always null.
24805 (YYPARSE_PARAM_ARG): New macro.
24806 (yyparse): Use YYPARSE_PARAM_ARG.
24807
24808 1995-12-27 Richard Stallman <rms@gnu.org>
24809
24810 * bison.simple (YYPARSE_PARAM_DECL):
24811 In C++, make it always null.
24812 (YYPARSE_PARAM_ARG): New macro.
24813 (yyparse): Use YYPARSE_PARAM_ARG.
24814
24815 1995-11-29 Richard Stallman <rms@gnu.org>
24816
24817 * doc/bison.texinfo:
24818 Describe literal string tokens, %raw, %no_lines, %token_table.
24819
24820 1995-11-29 Daniel Hagerty <hag@gnu.org>
24821
24822 * doc/bison.texinfo: Fixed update date
24823
24824 1995-10-16 Richard Stallman <rms@gnu.org>
24825
24826 * src/version.c: Version 1.25.
24827
24828 1995-10-16 Richard Stallman <rms@gnu.org>
24829
24830 * NEWS: *** empty log message ***
24831
24832 1995-10-16 Richard Stallman <rms@gnu.org>
24833
24834 * doc/bison.1, doc/bison.rnh:
24835 Add new options.
24836
24837 1995-10-15 Richard Stallman <rms@gnu.org>
24838
24839 * src/vmsgetargs.c, src/getargs.c:
24840 Added -n, -k, and -raw switches.
24841 (noparserflag, toknumflag, rawtoknumflag): New variables.
24842
24843 * src/symtab.h (SALIAS):
24844 New #define for adding aliases to %token.
24845 (struct bucket): Added `alias' field.
24846
24847 * src/reduce.c (reduce_grammar):
24848 Revise error message.
24849 (print_notices): Remove final `.' from error message.
24850
24851 * src/reader.c (reader_output_yylsp):
24852 New function.
24853 (readgram): Use `#if 0' around code that accepted %command
24854 inside grammar rules: The documentation doesn't allow it,
24855 and it will fail since the %command processors scan for the next %.
24856 (parse_token_decl): Extended the %token
24857 declaration to allow a multi-character symbol as an alias.
24858 (parse_thong_decl): New function.
24859 (read_declarations): Added %thong declarations.
24860 (read_declarations): Handle NOOP to deal with allowing
24861 % declarations as another means to specify the flags.
24862 (readgram): Allow %prec prior to semantics embedded in a rule.
24863 (skip_to_char, read_declarations, copy_definition)
24864 (parse_token_decl, parse_start_decl, parse_type_decl)
24865 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
24866 (get_type_name, copy_guard, copy_action, readgram)
24867 (get_type, packsymbols): Revised most error messages.
24868 Changed `fatal' to `warnxxx' to avoid aborting for error.
24869 Revised and use multiple warnxxx functions to avoid using VARARGS1.
24870 (read_declarations): Improve the error message for
24871 an invalid character. Do not abort.
24872 (read_declarations, copy_guard, copy_action): Use
24873 printable_version to avoid unprintable characters in printed output.
24874 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
24875 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
24876 Allow the type of a non-terminal can be given
24877 more than once, as long as all specifications give the same type.
24878
24879 * src/output.c:
24880 (output_headers, output_trailers, output, output_gram)
24881 (output_rule_data): Implement noparserflag variable.
24882 Implement toknumflag variable.
24883 (output): Call reader_output_yylsp to output LTYPESTR.
24884
24885 * src/main.c (main):
24886 If reader sees an error, don't process the grammar.
24887 (fatals): Updated to not use VARARGS1.
24888 (printable_version, int_to_string, warn, warni, warns, warnss)
24889 (warnsss): New error reporting functions. Avoid abort for error.
24890
24891 * src/lex.h:
24892 Added THONG and NOOP for alias processing.
24893 Added SETOPT for the new code that allows setting options with %flags.
24894
24895 * src/lex.c:
24896 Include getopt.h. Add some extern decls.
24897 (safegetc): New function to deal with EOF gracefully.
24898 (literalchar); new function to deal with reading \ escapes.
24899 (lex): Use literalchar.
24900 (lex): Implemented "..." tokens.
24901 (literalchar, lex, parse_percent_token): Made tokenbuffer
24902 always contain the token. This includes growing the token
24903 buffer while reading an integer.
24904 (parse_percent_token): Replaced if-else statement with percent_table.
24905 (parse_percent_token): Added % declarations as another
24906 way to specify the flags -n, -l, and -r. Also added hooks for
24907 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
24908 major changes to files.c.
24909 (lex) Retain in the incoming stream a character following
24910 an incorrect '/'.
24911 (skip_white_space, lex): Revised most error messages
24912 and changed fatal to warn to avoid aborting.
24913 (percent_table): Added %thong declarations.
24914
24915 * src/gram.h: Comment changes.
24916
24917 * src/files.c (openfiles, open_extra_files, done):
24918 Add faction flag
24919 and actfile file. Handle noparserflag. Both for -n switch.
24920
24921 * src/conflicts.c (resolve_sr_conflict):
24922 Remove use of alloca.
24923
24924 1995-06-01 Jim Meyering <meyering@gnu.org>
24925
24926 * doc/bison.texinfo: *** empty log message ***
24927
24928 1995-05-06 Richard Stallman <rms@gnu.org>
24929
24930 * src/bison.s1: Comment change.
24931
24932 1995-05-06 Richard Stallman <rms@gnu.org>
24933
24934 * bison.simple: Comment change.
24935
24936 1995-05-03 Richard Stallman <rms@gnu.org>
24937
24938 * src/version.c: Version now 1.24.
24939
24940 * src/bison.s1: Change distribution terms.
24941
24942 * src/version.c: Version now 1.23.
24943
24944 1995-05-03 Richard Stallman <rms@gnu.org>
24945
24946 * doc/bison.texinfo:
24947 Rewrite "Conditions for Using Bison".
24948 Update version to 1.24.
24949
24950 1995-05-03 Richard Stallman <rms@gnu.org>
24951
24952 * bison.simple: Change distribution terms.
24953
24954 1995-02-23 Richard Stallman <rms@gnu.org>
24955
24956 * src/files.c: Test __VMS_POSIX as well as VMS.
24957
24958 1995-02-14 Jim Meyering <meyering@gnu.org>
24959
24960 * src/bison.s1 (__yy_memcpy):
24961 Renamed from __yy_bcopy to avoid
24962 confusion. Reverse FROM and TO arguments to be consistent with
24963 those of memcpy.
24964
24965 1995-02-14 Jim Meyering <meyering@gnu.org>
24966
24967 * bison.simple (__yy_memcpy):
24968 Renamed from __yy_bcopy to avoid
24969 confusion. Reverse FROM and TO arguments to be consistent with
24970 those of memcpy.
24971
24972 1994-11-10 David J. MacKenzie <djm@gnu.org>
24973
24974 * NEWS: reformat
24975
24976 * NEWS: New file.
24977
24978 * Makefile.in (DISTFILES): Include NEWS.
24979
24980 * Makefile.in (DISTFILES):
24981 Include install-sh, not install.sh.
24982
24983 * configure.in: Update to Autoconf v2 macro names.
24984
24985 1994-10-05 David J. MacKenzie <djm@gnu.org>
24986
24987 * Makefile.in: fix typo
24988
24989 * Makefile.in (prefix, exec_prefix):
24990 Let configure set them.
24991
24992 1994-09-28 David J. MacKenzie <djm@gnu.org>
24993
24994 * Makefile.in: Set datadir to $(prefix)/share.
24995
24996 1994-09-15 Richard Stallman <rms@gnu.org>
24997
24998 * src/bison.s1:
24999 Update copyright notice and GPL version.
25000
25001 1994-09-15 Richard Stallman <rms@gnu.org>
25002
25003 * bison.simple:
25004 Update copyright notice and GPL version.
25005
25006 1994-07-12 Richard Stallman <rms@gnu.org>
25007
25008 * src/reduce.c, src/reader.c:
25009 entered into RCS
25010
25011 1994-05-05 David J. MacKenzie <djm@gnu.org>
25012
25013 * Makefile.in: entered into RCS
25014
25015 1994-03-26 Richard Stallman <rms@gnu.org>
25016
25017 * src/bison.s1: entered into RCS
25018
25019 1994-03-26 Richard Stallman <rms@gnu.org>
25020
25021 * bison.simple: entered into RCS
25022
25023 1994-03-25 Richard Stallman <rms@gnu.org>
25024
25025 * src/main.c: entered into RCS
25026
25027 1994-03-24 Richard Stallman <rms@gnu.org>
25028
25029 * src/conflicts.c: entered into RCS
25030
25031 1994-01-02 Richard Stallman <rms@gnu.org>
25032
25033 * Makefile.in: *** empty log message ***
25034
25035 1993-11-21 Richard Stallman <rms@gnu.org>
25036
25037 * src/bison.s1: *** empty log message ***
25038
25039 1993-11-21 Richard Stallman <rms@gnu.org>
25040
25041 * doc/bison.texinfo: entered into RCS
25042
25043 * doc/bison.texinfo: *** empty log message ***
25044
25045 1993-11-21 Richard Stallman <rms@gnu.org>
25046
25047 * bison.simple: *** empty log message ***
25048
25049 1993-10-25 David J. MacKenzie <djm@gnu.org>
25050
25051 * doc/bison.texinfo: *** empty log message ***
25052
25053 1993-10-19 Richard Stallman <rms@gnu.org>
25054
25055 * src/bison.s1: *** empty log message ***
25056
25057 1993-10-19 Richard Stallman <rms@gnu.org>
25058
25059 * bison.simple: *** empty log message ***
25060
25061 1993-10-14 Richard Stallman <rms@gnu.org>
25062
25063 * src/bison.s1: *** empty log message ***
25064
25065 1993-10-14 Richard Stallman <rms@gnu.org>
25066
25067 * bison.simple: *** empty log message ***
25068
25069 1993-09-14 David J. MacKenzie <djm@gnu.org>
25070
25071 * doc/bison.texinfo: *** empty log message ***
25072
25073 1993-09-13 Noah Friedman <friedman@gnu.org>
25074
25075 * Makefile.in: *** empty log message ***
25076
25077 1993-09-10 Richard Stallman <rms@gnu.org>
25078
25079 * src/conflicts.c: *** empty log message ***
25080
25081 * src/system.h: entered into RCS
25082
25083 1993-09-10 Richard Stallman <rms@gnu.org>
25084
25085 * doc/bison.1: entered into RCS
25086
25087 1993-09-06 Noah Friedman <friedman@gnu.org>
25088
25089 * src/version.c: entered into RCS
25090
25091 1993-09-06 Noah Friedman <friedman@gnu.org>
25092
25093 * Makefile.in: *** empty log message ***
25094
25095 1993-07-30 David J. MacKenzie <djm@gnu.org>
25096
25097 * Makefile.in: *** empty log message ***
25098
25099 1993-07-24 Richard Stallman <rms@gnu.org>
25100
25101 * src/bison.s1: *** empty log message ***
25102
25103 1993-07-24 Richard Stallman <rms@gnu.org>
25104
25105 * bison.simple: *** empty log message ***
25106
25107 1993-07-08 David J. MacKenzie <djm@gnu.org>
25108
25109 * Makefile.in: *** empty log message ***
25110
25111 1993-07-04 Richard Stallman <rms@gnu.org>
25112
25113 * src/bison.s1: *** empty log message ***
25114
25115 1993-07-04 Richard Stallman <rms@gnu.org>
25116
25117 * bison.simple: *** empty log message ***
25118
25119 1993-06-26 David J. MacKenzie <djm@gnu.org>
25120
25121 * src/getargs.c: entered into RCS
25122
25123 1993-06-26 David J. MacKenzie <djm@gnu.org>
25124
25125 * doc/bison.texinfo: *** empty log message ***
25126
25127 * doc/bison.1: New file.
25128
25129 1993-06-25 Richard Stallman <rms@gnu.org>
25130
25131 * src/getargs.c: New file.
25132
25133 1993-06-16 Richard Stallman <rms@gnu.org>
25134
25135 * src/bison.s1: *** empty log message ***
25136
25137 1993-06-16 Richard Stallman <rms@gnu.org>
25138
25139 * bison.simple: *** empty log message ***
25140
25141 1993-06-03 Richard Stallman <rms@gnu.org>
25142
25143 * src/bison.s1: New file.
25144
25145 1993-06-03 Richard Stallman <rms@gnu.org>
25146
25147 * doc/bison.texinfo: *** empty log message ***
25148
25149 1993-06-03 Richard Stallman <rms@gnu.org>
25150
25151 * bison.simple: New file.
25152
25153 1993-05-19 Richard Stallman <rms@gnu.org>
25154
25155 * doc/bison.texinfo: New file.
25156
25157 1993-05-07 Noah Friedman <friedman@gnu.org>
25158
25159 * Makefile.in: *** empty log message ***
25160
25161 1993-04-28 Noah Friedman <friedman@gnu.org>
25162
25163 * src/reader.c: *** empty log message ***
25164
25165 1993-04-23 Noah Friedman <friedman@gnu.org>
25166
25167 * src/alloc.h: entered into RCS
25168
25169 1993-04-20 David J. MacKenzie <djm@gnu.org>
25170
25171 * src/version.c: *** empty log message ***
25172
25173 * src/files.c, src/allocate.c:
25174 entered into RCS
25175
25176 * src/reader.c: *** empty log message ***
25177
25178 * src/lex.c: entered into RCS
25179
25180 * src/conflicts.c: New file.
25181
25182 * src/symtab.c: entered into RCS
25183
25184 * src/alloc.h: New file.
25185
25186 * src/LR0.c: entered into RCS
25187
25188 1993-04-18 Noah Friedman <friedman@gnu.org>
25189
25190 * src/reader.c: New file.
25191
25192 * src/version.c: *** empty log message ***
25193
25194 1993-04-18 Noah Friedman <friedman@gnu.org>
25195
25196 * Makefile.in: *** empty log message ***
25197
25198 1993-04-17 Noah Friedman <friedman@gnu.org>
25199
25200 * Makefile.in: *** empty log message ***
25201
25202 1993-04-15 Richard Stallman <rms@gnu.org>
25203
25204 * src/main.c, src/files.c:
25205 New file.
25206
25207 1993-04-15 Noah Friedman <friedman@gnu.org>
25208
25209 * configure.in: entered into RCS
25210
25211 * configure.in: *** empty log message ***
25212
25213 * configure.in: New file.
25214
25215 1993-04-14 Richard Stallman <rms@gnu.org>
25216
25217 * Makefile.in: New file.
25218
25219 1993-04-13 Richard Stallman <rms@gnu.org>
25220
25221 * src/version.c: New file.
25222
25223 1993-03-25 Richard Stallman <rms@gnu.org>
25224
25225 * src/output.c: entered into RCS
25226
25227 1992-09-25 Richard Stallman <rms@gnu.org>
25228
25229 * configure.bat: entered into RCS
25230
25231 1992-06-22 Richard Stallman <rms@gnu.org>
25232
25233 * src/vmsgetargs.c: entered into RCS
25234
25235 1992-06-22 Richard Stallman <rms@gnu.org>
25236
25237 * doc/bison.rnh: entered into RCS
25238
25239 1992-04-20 David J. MacKenzie <djm@gnu.org>
25240
25241 * README: entered into RCS
25242
25243 1992-01-22 Richard Stallman <rms@gnu.org>
25244
25245 * src/machine.h: entered into RCS
25246
25247 1991-12-21 Richard Stallman <rms@gnu.org>
25248
25249 * src/lalr.c, src/closure.c:
25250 entered into RCS
25251
25252 1991-12-20 Richard Stallman <rms@gnu.org>
25253
25254 * src/state.h: entered into RCS
25255
25256 1991-12-18 Richard Stallman <rms@gnu.org>
25257
25258 * src/print.c, src/nullable.c, src/derives.c:
25259 entered into RCS
25260
25261 1991-11-03 David J. MacKenzie <djm@gnu.org>
25262
25263 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25264 entered into RCS
25265
25266 1988-09-09 Richard Stallman <rms@gnu.org>
25267
25268 * src/bison.hairy: entered into RCS
25269
25270 1987-12-16 Richard Stallman <rms@gnu.org>
25271
25272 * REFERENCES: entered into RCS
25273
25274
25275 -----
25276
25277 Copyright (C) 1987-1988, 1991-2010 Free Software Foundation,
25278 Inc.
25279
25280 Copying and distribution of this file, with or without
25281 modification, are permitted provided the copyright notice and this
25282 notice are preserved.