]> git.saurik.com Git - bison.git/blob - ChangeLog
* data/bison.m4: Update comments for rename to muscle-tab.h.
[bison.git] / ChangeLog
1 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
2
3 * data/bison.m4: Update comments for rename to muscle-tab.h.
4
5 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
6
7 Rename muscle_tab.* to muscle-tab.* for consistency with master.
8 * src/Makefile.am (bison_SOURCES): Update.
9 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
10 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
11 src/tables.c: Update include.
12 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
13 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
14 include.
15
16 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
17
18 Minor code cleanup.
19 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
20 replace all uses with UNIQSTR_CONCAT.
21 * src/uniqstr.c (uniqstr_vsprintf): New function.
22 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
23 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
24 macros.
25
26 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
27
28 Minor code cleanup.
29 * src/parse-gram.y: Clean up sorting of declarations.
30 Use types to simplify %printer declarations where possible.
31 Provide %printer for BRACKETED_ID and symbol.prec.
32 * src/symtab.c: Whitespace change.
33
34 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
35
36 tests: skip tests of file names that platform does not support.
37 Reported by Michael Raskin at
38 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
39 * THANKS (Michael Raskin): Add.
40 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
41 to fail at least for file names containing ":" or "\".
42
43 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
44
45 yysyntax_error: avoid duplicate lookahead collection.
46 Except when memory reallocation is required, this change
47 eliminates the need to invoke yysyntax_error twice and thus to
48 repeat the collection of lookaheads. It also prepares for
49 future extensions that will make those repetitions more
50 expensive and that will require additional memory management in
51 yysyntax_error. Finally, it fixes an obscure bug already
52 exercised in the test suite.
53 * data/yacc.c (yysyntax_error): Add arguments for message
54 buffer variables stored in the parser. Instead of size, return
55 status similar to yyparse status but indicating success of
56 message creation. Other than the actual reallocation of the
57 message buffer, import and clean up memory management code
58 from...
59 (yyparse, yypush_parse): ... here.
60 * tests/regression.at (%error-verbose overflow): No longer an
61 expected failure.
62
63 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
64
65 yysyntax_error: test memory management more.
66 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
67 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
68 New test group.
69 (%error-verbose overflow): New test group that reveals an
70 obscure bug. Expected fail for now.
71
72 2008-12-11 Akim Demaille <demaille@gostai.com>
73
74 Pass the token type to yysyntax_error.
75 * data/yacc.c (yysyntax_error): Take the transated token instead
76 of the raw number.
77 Adjust callers.
78
79 2008-12-11 Akim Demaille <demaille@gostai.com>
80
81 Simplify the i18n of the error messages.
82 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
83 of building dynamically the format string.
84
85 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
86
87 Remove dead code.
88 * src/symtab.c (symbol_pack): Here because every symbol's number
89 is always defined by this time.
90
91 2009-10-03 Alex Rozenman <rozenman@gmail.com>
92
93 Add additional space after periods in NEWS.
94 * NEWS (2.5): here.
95
96 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
97
98 Use the correct conversion specifier for size_t.
99 Reported by Jim Meyering.
100 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
101 because Sbitset__Index is size_t.
102 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
103
104 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
105
106 tests: don't abuse AT_BISON_CHECK.
107 * tests/regression.at (parse-gram.y: LALR = IELR): Move
108 additional shell commands outside of AT_BISON_CHECK.
109
110 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
111
112 tests: check that parse-gram.y's IELR and LALR are identical.
113 * tests/atlocal.in (abs_top_srcdir): New shell variable.
114 * tests/regression.at (parse-gram.y: LALR = IELR): New test
115 group.
116
117 2009-09-16 Akim Demaille <demaille@gostai.com>
118
119 doc: comment changes.
120 * doc/bison.texinfo: Comment changes.
121
122 2009-09-16 Akim Demaille <demaille@gostai.com>
123
124 doc: spell checking.
125 * doc/bison.texinfo: here.
126
127 2009-09-19 Alex Rozenman <rozenman@gmail.com>
128
129 Keep sub-messages aligned. Fix strings for translation.
130 * src/location.h (location_print): Add return value.
131 * src/location.c (location_print): Return number of printed
132 characters.
133 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
134 new functions.
135 * src/complain.cpp (indent_ptr): New static variable.
136 (error_message, complain_at_indent, warn_at_indent): Implement
137 the alignment mechanism.
138 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
139 for translations. Use new alignment mechanism.
140 * tests/named-ref.at: Adjust test-cases.
141 * NEWS (2.5): Add an announcement about named references.
142
143 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
144
145 tests: clean up push.at test group titles.
146 * tests/push.at: Remove "Push Parsing: " from test group titles
147 because these are already under the banner "Push Parsing Tests".
148
149 2009-09-12 Alex Rozenman <rozenman@gmail.com>
150
151 Provide an additional sub-message for clarity.
152 Add "symbol not found in production" error message when
153 an "invalid reference" is detected in named references
154 resolution.
155 * src/scan-code.l: Update "invalid reference" case.
156 * tests/named-ref.at: Adjust test-cases.
157
158 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
159
160 Clean up yacc.c a little.
161 * data/yacc.c: Clean up M4 for readability, and make output
162 whitespace more consistent. For the main parse function
163 comment, instead of saying "yyparse or yypush_parse", say either
164 "yyparse" or "yypush_parse" depending on which it actually is.
165
166 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
167
168 Complain about unused %define variables and %code qualifiers.
169 * NEWS (2.5): Document.
170 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
171 * doc/bison.texinfo (Decl Summary): Document complaint, and
172 improve %define documentation a little otherwise.
173 * tests/input.at (Reject unused %code qualifiers): Update.
174 (%define errors): Update.
175 (%define, --define, --force-define): Update.
176 (%define backward compatibility): Update.
177 (Unused %define api.pure): Update.
178 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
179
180 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
181
182 Use aver not assert.
183 * src/output.c: Don't include assert.h.
184 (output_skeleton): Use aver not assert.
185 * src/system.h (aver): In documentation of why, add links to
186 Paul Eggert's explanations in the mailing lists.
187
188 2009-09-05 Alex Rozenman <rozenman@gmail.com>
189
190 Use "Unresolved reference" error message when no symbols were found
191 in a symbolic reference resolution. Remove .expr and -expr from
192 the shown reference when the reference is unresolved.
193 * src/scan-code.l: Change the error message, adjust location columns,
194 rename variable "exact_mode" to "explicit_bracketing".
195 * tests/named-ref.at: Adjust existing tests and add a new one.
196
197 2009-09-03 Akim Demaille <demaille@gostai.com>
198
199 * NEWS (2.4.2): Add "Internationalization" item.
200
201 2009-09-03 Akim Demaille <demaille@gostai.com>
202
203 bootstrap: fix/improve find_tool.
204 * bootstrap (find_tool): Improve error messages.
205 Fix typo about find_tool_names.
206
207 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
208
209 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
210 See
211 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
212 * src/scan-code.h (code_props_rule_action_init): Rename
213 named_ref arg to name so it doesn't shadow named_ref type. This
214 makes it consistent with the function definition in scan-code.l
215 anyway.
216
217 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
218
219 %define: accept unquoted values.
220 * NEWS (2.5): Group all %define changes together, and document
221 this one. Remove quotes in IELR and canonical LR entry.
222 * doc/bison.texinfo: Remove quotes in most examples throughout.
223 (Decl Summary): Update %define documentation.
224 (Table of Symbols): Likewise.
225 * src/ielr.c (LrType): Update documentation.
226 * src/parse-gram.y (content.opt): Add production for ID.
227 * tests/calc.at: Remove quotes in most tests.
228 * tests/existing.at: Likewise.
229 * tests/input.at: Likewise.
230 * tests/local.at: Likewise.
231 * tests/push.at: Likewise.
232 * tests/reduce.at: Likewise.
233 * tests/torture.at: Likewise.
234
235 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
236
237 %define lr.type: make values lowercase IDs.
238 That is, "LALR" => "lalr", "IELR" => "ielr", and
239 "canonical LR" => "canonical-lr".
240 * NEWS (2.5): Update documentation.
241 * doc/bison.texinfo (Decl Summary): Likewise.
242 * src/ielr.c (ielr): Use new values.
243 * src/ielr.h (ielr): Update documentation.
244 * src/reader.c (prepare_percent_define_front_end_variables): Use
245 and validate new values.
246 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
247 grammars.
248 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
249
250 2009-08-27 Eric Blake <ebb9@byu.net>
251
252 scan-gram: avoid portability trap with ctype usage.
253 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
254 Avoid compiler warning.
255
256 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
257
258 tests: use perl for printing special sequences to files.
259 And skip tests if perl is not available. This is better than
260 playing tricks with shell portability. Suggested by Akim
261 Demaille.
262 * tests/input.at (Bad character literals): Use it here for
263 omitting final newlines.
264 (Bad escapes in literals): Use it here for special characters.
265
266 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
267
268 tests: show a use of %define lr.default-reductions "consistent"
269 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
270 prevents the omission of expected tokens for %error-verbose.
271
272 2009-08-26 Akim Demaille <demaille@gostai.com>
273
274 tests: portability fix.
275 * tests/input.at (Bad escapes in literals): Don't expect "echo
276 '\0'" to output \ then 0.
277
278 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
279
280 Actually handle the yytable zero value correctly this time.
281 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
282 mention zero values in the YYTABLE comments.
283 * data/glr.c (yytable_value_is_error): Don't check for zero
284 value.
285 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
286 * data/yacc.c (yytable_value_is_error): Likewise.
287 * data/lalr1.java (yy_table_value_is_error_): Likewise.
288 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
289 * src/tables.h: In header comments, explain why it's useless to
290 check for a zero value in yytable.
291
292 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
293
294 More fixes related to last two patches.
295 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
296 defined.
297 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
298 yytable comments: zero indicates syntax error not default
299 action.
300 * data/glr.c (yyis_pact_ninf): Rename to...
301 (yypact_value_is_default): ... this.
302 (yyisDefaultedState): Update for rename.
303 (yyis_table_ninf): Rename to...
304 (yytable_value_is_error): ... this, and check for value zero
305 besides just YYTABLE_NINF.
306 (yygetLRActions): Check for default value from yypact. It
307 appears that this check is always performed before this function
308 is invoked, and so adding the check here is probably redundant.
309 However, the code may evolve after this subtlety is forgotten.
310 Also, update for rename to yytable_value_is_error. Because that
311 macro now checks for zero, a different but equivalent branch of
312 the if-then-else here is evaluated.
313 (yyreportSyntaxError): Update for rename to
314 yytable_value_is_error. The zero condition was mishandled
315 before.
316 (yyrecoverSyntaxError): Update for renames. No behavioral
317 changes.
318 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
319 New function.
320 (yy_table_value_is_error_): New function.
321 (parse): Use new functions where possible. No behavioral
322 changes.
323 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
324 The zero condition was mishandled before.
325 * data/yacc.c (yyis_pact_ninf): Rename to...
326 (yypact_value_is_default): ... this.
327 (yyis_table_ninf): Rename to...
328 (yytable_value_is_error): ... this, and check for value zero
329 besides just YYTABLE_NINF.
330 (yysyntax_error): Update for rename to yytable_value_is_error.
331 The zero condition was mishandled before.
332 (yyparse): Update for renames. No behavioral changes.
333 * src/tables.h: Improve comments about yypact, yytable, etc.
334 more. Most importantly, say yytable value of zero means syntax
335 error not default action.
336
337 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
338
339 Fix %error-verbose for conflicts resolved by %nonassoc.
340 * NEWS (2.5): Document.
341 * data/glr.c (yyreportSyntaxError): Fix this by checking
342 yyis_table_ninf.
343 * data/yacc.c (yysyntax_error): Likewise.
344 * data/lalr1.cc (yysyntax_error_): Fix this by checking
345 yytable_ninf_.
346 * data/lalr1.java (yysyntax_error): Likewise.
347 * tests/conflicts.at (%nonassoc and eof): Update expected output
348 and remove FIXME.
349
350 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
351
352 Some code and documentation improvements.
353 * data/c.m4 (b4_table_value_equals): New macro to capture
354 some repeated code.
355 * data/glr.c (yyis_pact_ninf): Use it here.
356 (yyis_table_ninf): Likewise.
357 (yyreportSyntaxError): Improve internal comments.
358 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
359 Use it everywhere possible.
360 (yyis_table_ninf): Likewise.
361 (yysyntax_error): Improve internal comments.
362 * data/lalr1.cc (yysyntax_error_): Likewise.
363 * data/lalr1.java (yysyntax_error): Likewise.
364 * src/tables.h: Improve comments about yypact, yytable, etc.
365
366 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
367
368 Use locale when quoting.
369 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
370 quote rather than implementing quoting here.
371
372 2009-08-20 Eric Blake <ebb9@byu.net>
373
374 Make previous patch more robust.
375 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
376 argmatch.h.
377 (output_skeleton): Use it.
378 Suggested by Akim Demaille.
379
380 Import latest m4/m4.m4.
381 * submodules/autoconf: Update to autoconf 2.64.
382 * configure.ac (M4_GNU_OPTION): New define.
383 * src/output.c (output_skeleton): Use it to resolve FIXME.
384 * NEWS: Mention this.
385
386 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
387
388 Fix complaints about escape sequences.
389 Discussed starting at
390 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
391 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
392 For a \0 and similar escape sequences meaning the null
393 character, report an invalid escape sequence instead of an
394 invalid null character because the latter does not actually
395 appear in the user's input.
396 In all escape sequence complaints, don't escape the initial
397 backslash, and don't quote when the sequence appears at the end
398 of the complaint line unless there's whitespace that quotearg
399 won't escape.
400 Consistently say "invalid" not "unrecognized".
401 Consistently prefer "empty character literal" over "extra
402 characters in character literal" warning for invalid escape
403 sequences; that is, consistently discard those sequences.
404 * tests/input.at (Bad escapes in literals): New.
405
406 2009-08-19 Akim Demaille <demaille@gostai.com>
407
408 doc: fixes.
409 * doc/bison.texinfo: Fix minor Texinfo errors.
410
411 2009-08-19 Akim Demaille <demaille@gostai.com>
412
413 doc: %initial-action to initialize yylloc.
414 Reported by Bill Allombert.
415 * doc/bison.texinfo: Set fill-column to 76.
416 (Location Type): Document the use of %initial-action to initialize
417 yylloc.
418
419 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
420
421 maint: update for gnulib's recent update-copyright changes
422 * gnulib: Update.
423 * .x-update-copyright (COPYING): Add as it's no longer implied
424 when .x-update-copyright is present.
425 * cfg.mk (update-copyright-local): Remove, now ignored.
426 (update-copyright): Declare update-b4-copyright as a dependency.
427
428 2009-08-17 Akim Demaille <demaille@gostai.com>
429
430 build: require gettext 0.17.
431
432 Suggested by Bruno Haible.
433 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
434 * configure.ac: require gettext 0.17 to ensure compatibility with
435 gnulib.
436
437 2009-08-17 Akim Demaille <demaille@gostai.com>
438
439 build: lower gettext requirements.
440
441 Bison was uselessly requiring the formatstring macros from
442 gettext, which resulted in mo files not being installed on systems
443 that perfectly supported Bison mo files. Lower the requirement.
444 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
445
446 * configure.ac: Require need-ngettext instead of
447 need-formatstring-macros.
448 Reported by Martin Jabocs.
449 Suggested by Bruno Haible.
450 * INSTALL: Restructure.
451 (Internationalization): New.
452
453 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
454
455 maint: fix use of copyright year intervals.
456 * gnulib: Update.
457 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
458 as now recommended in gnulib/NEWS.
459 * build-aux/update-b4-copyright: Fix.
460 * cfg.mk (update-copyright-env): Configure update-copyright.
461
462 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
463
464 Make it easier to write deterministic tests.
465 Continues Akim's work from his 2009-06-10 commits.
466 * src/reader.c (check_and_convert_grammar): Don't add any
467 symbols after the first symbols_do invocation.
468 * src/symtab.c (symbols_sorted): New static global.
469 (user_token_number_redeclaration): Update comments.
470 (symbol_from_uniqstr): If a new symbol is being created, assert
471 that symbols_sorted hasn't been allocated yet.
472 (symbols_free): Free symbols_sorted.
473 (symbols_cmp, symbols_cmp_qsort): New functions.
474 (symbols_do): Sort symbol_table into symbols_sorted on first
475 invocation.
476 * tests/input.at (Numbered tokens): Recombine tests now that the
477 output should be deterministic across multiple numbers.
478
479 2009-08-12 Akim Demaille <demaille@gostai.com>
480
481 distcheck: fix.
482
483 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
484
485 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
486
487 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
488
489 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
490
491 Miscellaneous code readability improvements.
492
493 * src/reader.c (reader): Move %define front-end variable
494 defaults and checking into...
495 (prepare_percent_define_front_end_variables): ... this new
496 function.
497
498 * src/scan-gram.l (INITIAL): For consistency with string
499 literals, don't store open quote on character literal. It's
500 discarded before returning anyway.
501 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
502 Make length test more readable, and make the character stored
503 for an empty literal more obvious while consistent with the
504 previous behavior.
505
506 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
507 USER_NUMBER_HAS_STRING_ALIAS throughout.
508 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
509 that is repeated in symtab.h. Improve argument names to make it
510 clear which side of the symbol-string alias pair is which.
511 (symbol_check_alias_consistency): Improve local variable names
512 for the same purpose.
513 * src/symtab.h (struct symbol): Make comments about aliases
514 clearer.
515 (symbol_make_alias): Improve comments and argument name.
516 * src/output.c (token_definitions_output): Update for rename to
517 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
518
519 2009-08-08 Alex Rozenman <rozenman@gmail.com>
520
521 Convert "misleading reference" messages to warnings.
522 * src/scan-code.l: New function 'show_sub_messages', more
523 factoring.
524 * tests/named-ref.at: Adjust tests.
525
526 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
527
528 maint: run "make update-copyright"
529
530 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
531
532 maint: make update-b4-copyright easier to use
533 * build-aux/update-b4-copyright: In warnings, report line
534 numbers rather than character positions.
535 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
536 that update-copyright runs it.
537 * gnulib: Update.
538
539 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
540
541 maint: clean up update-b4-copyright code
542 * build-aux/update-b4-copyright: Do not accept 2-digit
543 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
544 Don't accept a `[' in a b4_copyright argument.
545 Format code more consistently.
546 Don't assume b4*copyright never occurs.
547
548 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
549
550 maint: automate b4_copyright updates.
551 * Makefile.am (update-b4-copyright): New target rule.
552 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
553 * build-aux/update-b4-copyright: New.
554 * data/yacc.c: Remove stray characters around b4_copyright
555 invocations.
556
557 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
558
559 maint: automate annual package-wide copyright-year update.
560 * .x-update-copyright: New.
561 * Makefile.am (EXTRA_DIST): Remove maint.mk.
562 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
563 update-copyright. Remove gnumakefile, which is implied by
564 maintainer-makefile.
565 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
566 * gnulib: Update.
567 * maint.mk: Remove, now copied from gnulib.
568 * examples/extexi: Add missing "(C)" in copyright statement so
569 update-copyright can recognize it.
570 * src/LR0.h: Likewise.
571 * src/print.h: Likewise.
572 * src/print_graph.h: Likewise.
573 * src/gram.c: Add missing comma in copyright statement.
574 * src/gram.h: Likewise.
575
576 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
577
578 Fix "make distcheck".
579 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
580 of just calc.stamp.
581
582 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
583
584 Pacify "gcc -Wunused" for the input function from Flex.
585 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
586 and later.
587 * src/scan-code.l: Add "%option noinput", which I cannot find in
588 the Flex manual, but which Flex has supported since at least as
589 far back as 2.5.4. However, if any of our developers still use
590 Flex 2.5.4, they'll need to stop configuring with
591 --enable-gcc-warnings because "%option noinput" didn't work
592 correctly until Flex 2.5.6.
593 * src/scan-gram.l: Likewise.
594 * src/scan-skel.l: Likewise.
595
596 2009-07-31 Alex Rozenman <rozenman@gmail.com>
597
598 Fix --enable-gcc-warnings problems.
599 * src/reader.c: Adjust variable names.
600 * src/scan-code.l: Fix prototypes and adjust names.
601 * src/named-ref.c: Remove redundant "if".
602
603 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
604
605 Fix a --enable-gcc-warnings problem.
606 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
607 variable.
608
609 2009-07-24 Alex Rozenman <rozenman@gmail.com>
610
611 Fix some memory leaks.
612 * src/named-ref.c: Add a pointer check (named_ref_free).
613 * src/scan-code.l: New function (variant_table_free). Called in
614 code_scanner_free.
615 * src/symlist.c: Call to named_ref_free (symbol_list_free).
616
617 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
618
619 Warn about character literals not of length one.
620 * NEWS (2.5): Document.
621 * src/scan-gram.l (INITIAL): Remove comment that we don't check
622 the length.
623 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
624 * tests/input.at (Bad character literals): New test group.
625
626 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
627
628 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
629
630 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
631
632 Some M4 cleanup in the testsuite.
633 Suggested by Eric Blake at
634 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
635 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
636 complicate the code by distinguishing between a missing value
637 and an empty string value for an optional argument. This fix is
638 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
639 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
640 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
641 arguments are not needed because of the following changes.
642 Fix stale comments.
643 Bison developers should use GNU M4 and should not use
644 POSIXLY_CORRECT when building the test suite, so do not
645 complicate the code by avoiding $10 and above.
646 Do not quote an empty string value for an optional argument, and
647 do not distinguish between a missing value and an empty string
648 value.
649
650 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
651
652 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
653
654 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
655
656 Revert unnecessary column realignment in --help output.
657 Reported by Akim Demaille at
658 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
659 * src/getargs.c (usage): Here.
660
661 2009-07-04 Alex Rozenman <rozenman@gmail.com>
662
663 Alphabetical order in src/Makefile.am.
664 * src/Makefile.am: Adjust.
665
666 2009-07-04 Alex Rozenman <rozenman@gmail.com>
667
668 Style changes and factoring.
669 * src/named-ref.h: Add comments.
670 * src/parse-gram.y: Readability and style changes.
671 * src/reader.c: Factoring: assign_named_ref function.
672 * src/scan-code.l: Factoring and style changes. Rename
673 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
674 Use "unsigned" type for variant index. Improve readablity.
675 * src/scan-gram.l: Change error messages and add comments.
676 * src/symlist.h: symbol_list_null: New function decl.
677 * src/symlist.c: symbol_list_null: Implement here.
678 * tests/named-refs.at: Adjust for new error messages.
679
680 2009-06-29 Eric Blake <ebb9@byu.net>
681
682 scan-code: avoid compiler warnings
683 * src/scan-code.l (parse_named_ref): Use correct specifiers.
684
685 2009-06-29 Akim Demaille <demaille@gostai.com>
686
687 build: avoid concurrent extraction of calc++.
688 * examples/calc++/Makefile.am (calc.stamp): New.
689 Depend on it to create the sources of calc++ so that concurrent
690 builds don't launch several "extexi" in parallel.
691 Not only this is inefficient, this also builds incorrect sources
692 with several extractions mixed together.
693
694 2009-06-27 Alex Rozenman <rozenman@gmail.com>
695
696 Implement support for named symbol references.
697 * src/parse-gram.y: Add new syntax (named_ref.opt).
698 * src/reader.c: Store named refs in symbol lists.
699 * src/reader.h: New argument for symbol_append and
700 action_append functions.
701 * src/scan-code.h: Add new field (named_ref) into
702 code_props data structure. Keeps named ref of midrule
703 actions.
704 * src/scan-code.l: Support for named refs in semantic
705 action code. New function 'parse_named_ref'.
706 * src/scan-gram.l: Support bracketed id.
707 * src/symlist.c: Store named refs in symbol lists.
708 * src/symlist.h: New field in symbol list: named_ref.
709 * src/named-ref.h: New file, a struct for named_ref.
710 * src/named-ref.cp: New file, named_ref_new function.
711 * src/local.mk: Add two new files.
712 * tests/testsuite.at: Include new test group:
713 * tests/named-refs.at: this new file.
714
715 2009-06-25 Akim Demaille <demaille@gostai.com>
716
717 hash: check insertion for memory exhaustion.
718 * src/uniqstr.c (uniqstr_new): New.
719
720 2009-06-11 Akim Demaille <demaille@gostai.com>
721
722 style changes.
723 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
724 * src/print-xml.c: Style changes.
725 * tests/conflicts.at: Comment changes.
726
727 2009-06-11 Akim Demaille <demaille@gostai.com>
728
729 xml: beware of user strings used to give a %prec to rules.
730 * tests/conflicts.at (%prec with user strings): New.
731 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
732 XML output.
733
734 2009-06-11 Akim Demaille <demaille@gostai.com>
735
736 hash: check insertion for memory exhaustion.
737 * src/muscle-tab.c (muscle_insert, muscle_grow)
738 * src/state.c (state_hash_insert): Check the return value of
739 hash_insert.
740
741 2009-06-10 Akim Demaille <demaille@gostai.com>
742
743 deterministic test suite.
744 Some consistency checks on symbols are performed after all the
745 symbols were read, by an iteration over the symbol table. This
746 traversal is nondeterministic, which can be a problem for test
747 cases.
748 Avoid this.
749 Addresses another form of nondeterminism reported by Joel E. Denny.
750 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
751
752 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
753 test in two.
754 Use different file names for the three tests to make the
755 maintenance easier.
756
757 2009-06-10 Akim Demaille <demaille@gostai.com>
758
759 deterministic user-token-number redeclaration errors.
760 Address nondeterminism reported by Joel E. Denny.
761 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
762
763 * src/uniqstr.h: Comment changes.
764 * src/location.h (boundary_cmp, location_cmp): New.
765 * src/symtab.c (user_token_number_redeclaration): New.
766 (symbol_translation): Use it.
767 * tests/input.at (Numbered tokens): Adjust the expected output.
768
769 2009-05-25 Akim Demaille <demaille@gostai.com>
770
771 gnulib: update.
772 * gnulib: Update to latest.
773 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
774 * m4/.gitignore: Regen.
775 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
776 Call xalloc_die on hash_insert failures.
777 Requested by the new __warn_unused_result__ attribute of
778 hash_insert.
779
780 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
781
782 Convert multiple variable definition warnings to complaints.
783 * NEWS (2.5): Add a new entry for that change.
784 * doc/bison.texinfo (Decl Summary): Update %define entry.
785 (Bison Options): Update -D/--define/-F/--force-define entry.
786 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
787 * src/muscle_tab.h (muscle_percent_define_insert): Update
788 comments.
789 * tests/input.at (`%define errors'): Update.
790 (`%define, --define, --force-define'): Update.
791
792 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
793
794 -F/--force-define and relative %define/-D/--define priorities.
795 * NEWS (2.5): Add documentation to -D/--define entry.
796 * build-aux/cross-options.pl: Hard-code association of
797 --force-define with %define.
798 * doc/bison.texinfo (Decl Summary): In %define entry,
799 cross-reference command-line options.
800 (Bison Options): Add documentation to -D/--define entry.
801 (Option Cross Key): Widen column for --force-define row.
802 * src/getargs.c (usage): Document -F/--force-define. Realign
803 options in output.
804 (short_options, long_options, getargs): Parse -F/--force-define,
805 and update muscle_percent_define_insert invocation.
806 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
807 (muscle_percent_define_insert): Add argument with that type.
808 * src/muscle_tab.c (muscle_percent_define_insert): Implement
809 -F/--force-define behavior and priorities.
810 * src/parse-gram.y (prologue_declaration): Update
811 muscle_percent_define_insert invocations.
812 * tests/input.at (`%define, --define'): Rename to...
813 (`%define, --define, --force-define'): ... this and extend.
814
815 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
816
817 Update some comments to make sense for -D.
818 * data/bison.m4 (b4_check_user_names): In header comments, say
819 "user occurrence" instead of "grammar occurrence".
820 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
821 (muscle_percent_code_grow): Likewise just for consistency.
822
823 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
824
825 * data/c++.m4: Update copyright year.
826
827 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
828
829 * data/c++.m4 (b4_namespace_close): Simplify slightly.
830
831 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
832
833 Handle a trailing `:' in a user-supplied C++ namespace better.
834 * data/c++.m4 (b4_namespace_close): Don't let it be printed
835 among the closing braces here. This fix might make the
836 generated code easier to debug, but otherwise it should be
837 insignificant because a trailing `:' is a C++ error already.
838
839 2009-05-19 Akim Demaille <demaille@gostai.com>
840
841 remove useless variable.
842 * src/getargs.c (skeleton_arg): Remove now useless variable.
843 Should help the compiler see that this printf-like call is sane.
844
845 2009-05-11 Akim Demaille <demaille@gostai.com>
846
847 doc: use C++ headers.
848 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
849 headers.
850
851 2009-05-05 Akim Demaille <demaille@gostai.com>
852
853 fix hexadecimal token number support.
854 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
855
856 2009-05-05 Akim Demaille <demaille@gostai.com>
857
858 tests: check token numbers.
859 * tests/input.at (Numbered tokens): New.
860
861 2009-05-04 Akim Demaille <demaille@gostai.com>
862
863 bison: catch bad symbol names.
864 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
865 * tests/input.at: Adjust.
866
867 2009-05-04 Akim Demaille <demaille@gostai.com>
868
869 space changes.
870 * src/scan-gram.l: Untabify to be robust to zealous editors.
871
872 2009-05-04 Akim Demaille <demaille@gostai.com>
873
874 identifiers: dashes are letters.
875 Dashes can now start identifiers (symbols and directives).
876
877 * src/scan-gram.l ({letter}): Add dash.
878 ({id}): Remove it.
879 * tests/input.at (Symbols): Adjust.
880 Remove stray comment.
881 * tests/regression.at (Invalid inputs): Adjust error message.
882 * doc/bison.texinfo (Symbols): Update.
883
884 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
885
886 Declare %code to be a permanent feature.
887 * NEWS (2.4.2): Here.
888 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
889 experimental.
890 (Decl Summary): Likewise.
891
892 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
893
894 Convert underscores to dashes in some %define variable names.
895 For now, just api.push-pull and lr.keep-unreachable-states.
896 Maintain old names for backward compatibility.
897 * NEWS (2.5): Document.
898 * data/c.m4 (b4_identification): Update comment.
899 * data/yacc.c: Update access.
900 * doc/bison.texinfo: Update.
901 * etc/bench.pl.in (bench_grammar): Update use.
902 * src/files.c (tr): Move to...
903 * src/getargs.c, src/getargs.h (tr): ... here because I can't
904 think of a better place to expose it. My logic is that, for all
905 uses of tr so far, command-line arguments can be involved, and
906 getargs.h is already included.
907 * src/main.c (main): Update access.
908 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
909 variable names to new variable names before assigning value.
910 * src/reader.c (reader): Update setting default.
911 * tests/calc.at: Update uses.
912 * tests/conflicts.at (Unreachable States After Conflict
913 Resolution): Update use.
914 * tests/input.at (%define enum variables): Update use.
915 (%define backward compatibility): New test group.
916 * tests/push.at: Update uses.
917 * tests/reduce.at: Update uses.
918 * tests/torture.at: Update uses.
919
920 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
921
922 Set all front-end %define defaults in one place.
923 * src/main.c (main): Move lr.keep_unreachable_states default...
924 * src/reader.c (reader): ... to here.
925
926 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
927
928 Rename lr.default_reductions to lr.default-reductions.
929 * NEWS (2.5): Here.
930 * doc/bison.texinfo: Here.
931 * src/lalr.c (initialize_LA): Here.
932 * src/print.c (print_reductions): Here.
933 * src/reader.c (reader): Here.
934 * src/tables.c (action_row): Here.
935 * tests/input.at (%define enum variables): Here.
936 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
937
938 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
939
940 Pacify ./configure --enable-gcc-warnings.
941 * tests/input.at (Symbols): Prototype yyerror and yylex.
942
943 2009-04-21 Akim Demaille <demaille@gostai.com>
944
945 tests: check the use of dashes and periods in symbols.
946 * tests/input.at (Symbol): New test group.
947
948 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
949
950 Document how `%define "var" "value"' is not M4-friendly.
951 * src/parse-gram.y (variable): In comments here.
952
953 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
954
955 Add copyright updates missed during previous cherry pick.
956 * src/output.c: Here.
957 * src/parse-gram.y: Here.
958 * src/scan-gram.l: Here.
959
960 2009-04-20 Akim Demaille <demaille@gostai.com>
961
962 variables: accept dashes.
963 * src/scan-gram.l ({id}): Also accept dashes after the initial
964 letter.
965 ({directive}): Use {id}.
966 * src/parse-gram.y: Comment and formatting changes.
967 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
968 symbols.
969 * src/complain.h, src/complain.c (yacc_at): New.
970 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
971 symbol names.
972 * src/output.c (token_definitions_output): Do not #define token
973 names with dashes.
974
975 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
976
977 Clean up recent patches a little.
978 Reported by Akim Demaille.
979 * doc/bison.texinfo (Understanding): Fix typos.
980 * src/print.c (print_reductions): Don't use negated variable.
981
982 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
983
984 List accepted values for a %define enum variable with an invalid value.
985 Suggested by Akim Demaille at
986 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
987 * data/bison.m4 (_b4_percent_define_check_values): Implement.
988 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
989 * tests/input.at (%define lr.default_reductions invalid values): Merge
990 into...
991 (%define enum variables): ... here, and update output.
992
993 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
994
995 Rename "default rule" to "default reduction".
996 This includes changing variable names in code, changing
997 comments, and renaming %define lr.default_rules to %define
998 lr.default_reductions.
999 * NEWS (2.5): Update IELR documentation.
1000 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
1001 Adjust YYDEFACT and yydefact_ documentation.
1002 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1003 and lr.type documentation. Make some other wording
1004 improvements.
1005 (Glossary): Adjust cross-references and Default Reduction
1006 definition.
1007 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1008 Remove a confusing comment pointed out by Akim Demaille.
1009 (initialize_LA): Adjust code.
1010 * src/print-xml.c (print_reductions): Adjust code.
1011 * src/print.c (print_reductions): Adjust code.
1012 * src/reader.c (reader): Adjust code.
1013 * src/tables.c (action_row): Adjust code.
1014 (token_actions): Adjust code.
1015 * src/tables.h: Adjust YYDEFACT documentation.
1016 * tests/input.at (%define lr.default_rules invalid values):
1017 Rename test group to...
1018 (%define lr.default_reductions invalid values): ... this, and
1019 update grammar file and expected output.
1020 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1021 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1022
1023 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1024
1025 Document %define lr.type and lr.default_rules.
1026 * NEWS (2.5): Add an entry.
1027 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1028 besides just LALR(1) and GLR(1).
1029 * doc/bison.texinfo (Introduction): Likewise.
1030 (Language and Grammar): Bison is no longer limited to LALR(1)
1031 restrictions.
1032 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1033 when trying to distinguish from GLR. Talk about LR(1) grammars
1034 rather than LALR(1) grammars.
1035 (Decl Summary): In %define api.push_pull entry, say it applies
1036 to deterministic parsers in C rather than LALR(1) parsers in C.
1037 Add lr.default_rules entry.
1038 Add lr.type entry.
1039 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1040 restrictions.
1041 (Generalized LR Parsing): Same changes as for the previous GLR
1042 section.
1043 (Memory Management): Say deterministic rather than LALR(1).
1044 (Understanding): Correct some bison output.
1045 Index discussion of "accepting state".
1046 Say deterministic rather than LALR(1).
1047 (Bison Options): In --yacc entry, say deterministic rather than
1048 LALR(1).
1049 In --report, --graph, and --xml entries, just don't mention
1050 LALR(1).
1051 (C++ Parsers): Say deterministic rather than LALR(1).
1052 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1053 (Glossary): Add Accepting State, Consistent State, Default Rule,
1054 and IELR(1) definitions.
1055 In Generalized LR (GLR) definition, make same changes as in
1056 previous GLR sections.
1057 In LALR(1) definition, say Bison uses LALR(1) by default rather
1058 than implying Bison is limited to LALR(1).
1059 (LocalWords): Add IELR.
1060
1061 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1062
1063 Finish implementing %define lr.type.
1064 Its value can be "LALR", "IELR", or "canonical LR".
1065 * lib/timevar.def (TV_IELR_PHASE1): New var.
1066 (TV_IELR_PHASE2): New var.
1067 (TV_IELR_PHASE3): New var.
1068 (TV_IELR_PHASE4): New var.
1069 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1070 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1071 Sbitset.h, ielr.h, and ielr.c.
1072 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1073 trace_types): Add trace_ielr.
1074 * src/lalr.h, src/lalr.c (ngotos): Export it.
1075 (F): Rename to...
1076 (goto_follows): ... this, update all uses, and export it.
1077 (set_goto_map): Export it.
1078 (map_goto): Export it.
1079 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1080 handled in ielr.
1081 (initialize_LA): Export it. Move lookback allocation to...
1082 (lalr): ... here because, for canonical LR, initialize_LA must
1083 be invoked but lookback and much of the rest of LALR isn't
1084 needed.
1085 * main.c (main): Instead of lalr, invoke ielr, which invokes
1086 lalr.
1087 * src/reader.c (reader): Default lr.type to "LALR".
1088 Default lr.default_rules to "accepting" if lr.type is "canonical
1089 LR". Leave the default as "all" otherwise.
1090 Check for a valid lr.type value.
1091 * src/state.h, src/state.c (struct state_list): Add state_list
1092 member.
1093 (state_new): Initialize state_list member to NULL.
1094 (state_new_isocore): New function, exported.
1095 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1096 exercises all values of lr.type.
1097 (GNU AWK Grammar): Rename test group to...
1098 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1099 AT_TEST_EXISTING_GRAMMAR.
1100 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1101 (GNU pic Grammar): Rename test group to...
1102 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1103 AT_TEST_EXISTING_GRAMMAR.
1104 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1105 all values of lr.type.
1106 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1107 (Lane Split): Likewise.
1108 (Complex Lane Split): Likewise.
1109 (Split During Added Lookahead Propagation): Likewise.
1110
1111 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1112
1113 Add new files for IELR and canonical LR implementation.
1114 * src/AnnotationList.c: New.
1115 * src/AnnotationList.h: New.
1116 * src/InadequacyList.c: New.
1117 * src/InadequacyList.h: New.
1118 * src/Sbitset.c: New.
1119 * src/Sbitset.h: New.
1120 * src/ielr.c: New.
1121 * src/ielr.h: New.
1122
1123 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1124
1125 Implement %define lr.default_rules.
1126 Its value describes the states that are permitted to contain
1127 default rules: "all", "consistent", or "accepting".
1128 * src/reader.c (reader): Default lr.default_rules to "all".
1129 Check for a valid lr.default_rules value.
1130 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1131 is "accepting", then only mark the accepting state as
1132 consistent.
1133 (initialize_LA): Tell state_lookahead_tokens_count whether
1134 lr.default_rules is "accepting".
1135 * src/tables.c (action_row): If lr.default_rules is not "all",
1136 then disable default rules in inconsistent states.
1137 * src/print.c (print_reductions): Use this opportunity to
1138 perform some assertions about whether lr.default_rules was
1139 obeyed correctly.
1140 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1141 helps with checking the parser tables for a grammar.
1142 * tests/input.at (%define lr.default_rules invalid values): New
1143 test group.
1144 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1145 AT_TEST_TABLES_AND_PARSE.
1146 (`no %define lr.default_rules'): New test group generated by
1147 AT_TEST_LR_DEFAULT_RULES.
1148 (`%define lr.default_rules "all"'): Likewise.
1149 (`%define lr.default_rules "consistent"'): Likewise.
1150 (`%define lr.default_rules "accepting"'): Likewise.
1151
1152 2009-04-20 Akim Demaille <demaille@gostai.com>
1153
1154 Consistently refer to Yacc, not YACC.
1155 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1156
1157 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1158
1159 Pacify make maintainer-check-posix.
1160 * tests/input.at (%define, --define): Move bison command-line
1161 options before grammar file name.
1162
1163 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1164
1165 Document semicolon warnings.
1166 * NEWS (2.5): Here.
1167
1168 2008-12-08 Akim Demaille <demaille@gostai.com>
1169
1170 Fix portability issue in the test suite.
1171 * tests/local.at (AT_MATCHES_CHECK): New.
1172 Based on Perl instead of Sed. Sed has too many portability
1173 pitfalls, not ever Sed is GNU Sed.
1174 * tests/actions.at (Fix user actions without a trailing semicolon):
1175 Use it.
1176
1177 2008-12-07 Di-an Jan <dianj@freeshell.org>
1178
1179 Implement the FIXME that ends an user action with a semicolon
1180 if it seems necessary.
1181 * src/scan-code.l (flex rules section): Flag cpp directive from
1182 any `#' to the first unescaped end-of-line. Semicolon is not
1183 needed after `;', `{', '}', or cpp directives and is needed after
1184 any other token (whitespaces and comments have no effect).
1185 * tests/actions.at (Fix user actions without a trailing semicolon):
1186 New test.
1187 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1188 to make user actions complete statements.
1189 Adjust column numbers in error messages.
1190 * tests/regression.at (Fix user actions without a trailing semicolon):
1191 Remove. Covered by new test.
1192
1193 2009-04-14 Akim Demaille <demaille@gostai.com>
1194
1195 doc: minor fixes.
1196 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1197 (Table of Symbols): Remove duplicate entry for %debug.
1198
1199 2009-04-10 Eric Blake <ebb9@byu.net>
1200
1201 submodules: update to latest
1202 * submodules/autoconf: Use latest upstream Autoconf.
1203
1204 2009-04-06 Eric Blake <ebb9@byu.net>
1205
1206 Work around autoconf 2.63b bug in testsuite.
1207 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1208 autoconf bug related to # in test.
1209
1210 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1211
1212 * NEWS (2.5): Describe new -D/--define feature.
1213
1214 2008-11-10 Akim Demaille <demaille@gostai.com>
1215
1216 --trace=muscles
1217 * src/getargs.h, src/getargs.c (trace_muscle): New.
1218 (trace_types, trace_args): Support it.
1219 * src/output.c (output_skeleton): Use it.
1220
1221 2008-11-10 Akim Demaille <demaille@gostai.com>
1222
1223 muscles_output.
1224 * src/output.c (muscles_output): New, extracted from...
1225 (output_skeleton): here.
1226 Adjust.
1227
1228 2008-11-21 Akim Demaille <demaille@gostai.com>
1229
1230 Display the changes in cross-options.texi.
1231 * build-aux/cross-options.pl ($sep): New, to separate items.
1232 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
1233 the changes.
1234
1235 2008-11-20 Di-an Jan <dianj@freeshell.org>
1236
1237 Improves options in the manual.
1238 * doc/bison.texinfo (-g, -x): Add space before argument.
1239 (Option Cross Key): Implement FIXME: listing directives also.
1240 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1241 (Short Option): Special case -d. Put arguments inside @option.
1242 (Bison Directive): Add column, automatically extracted from
1243 src/scan-gram.l (actual name passed as the first argument)
1244 with special case for %define.
1245 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
1246 to build-aux/cross-options.pl.
1247 * src/getargs.c (usage): Document limitations of cross-options.pl.
1248 * src/scan-gram.l: Likewise.
1249
1250 2009-02-25 Akim Demaille <demaille@gostai.com>
1251
1252 Copyright years.
1253 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1254
1255 2008-12-08 Akim Demaille <demaille@gostai.com>
1256
1257 Install autoconf as a submodule to get m4sugar.
1258 * .gitmodules: Add submodules/autoconf.
1259 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1260 submodules/autoconf.
1261
1262 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1263
1264 Simplify last patch slightly.
1265 * src/getargs.c (getargs): Here.
1266
1267 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1268
1269 Fix last warning from --enable-gcc-warnings.
1270 * src/getargs.c (getargs): Don't assign const address to non-const
1271 pointer.
1272
1273 2008-11-17 Di-an Jan <dianj@freeshell.org>
1274
1275 Handle --enable-gcc-warnings.
1276 * src/getargs.c (command_line_location): Set parameters to void.
1277
1278 2008-11-11 Akim Demaille <demaille@gostai.com>
1279
1280 AT_FULL_COMPILE.
1281 * tests/actions.at, tests/regression.at: Use it.
1282
1283 2008-11-07 Akim Demaille <demaille@gostai.com>
1284
1285 Pass command line location to skeleton_arg and language_argmatch.
1286 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1287 The location argument is now mandatory.
1288 Adjust all dependencies.
1289 (getargs): Use command_line_location.
1290
1291 2008-11-07 Akim Demaille <demaille@gostai.com>
1292
1293 -D, --define.
1294 * src/getargs.c (usage): Document -D.
1295 Fix help string for --locations.
1296 (command_line_location): New.
1297 (short_options, long_options, getargs): Support -D, --define.
1298 (getargs): Move -d support at the right place.
1299 * doc/bison.texinfo (Bison Options): Update.
1300 * tests/input.at (%define, --define): New.
1301
1302 2008-11-07 Akim Demaille <demaille@gostai.com>
1303
1304 Initialize the muscle table before parsing the command line.
1305 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1306 (getargs): Define file_name.
1307 * src/main.c (main): Initialize muscle_tab before calling
1308 getargs.
1309 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1310 its value is not available yet.
1311
1312 2008-11-09 Akim Demaille <demaille@gostai.com>
1313
1314 Require the generation of parse-gram.output.
1315 * src/Makefile.am (YACC): Pass --report=all.
1316
1317 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1318
1319 * NEWS (2.5): New stub.
1320
1321 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1322
1323 Fix options documentation.
1324 * build-aux/cross-options.pl: As in --help output, write optional
1325 arguments as [=ARG] not =[ARG].
1326 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1327
1328 2008-11-07 Akim Demaille <demaille@gostai.com>
1329
1330 Fix --help.
1331 * src/getargs.c (usage): Fix help string for -W.
1332
1333 2008-11-07 Akim Demaille <demaille@gostai.com>
1334
1335 Handle more general types of option arguments.
1336 * build-aux/cross-options.pl: The argument ends at the first
1337 space, not the first non-symbol character.
1338 Use @var for each word appearing the argument description.
1339
1340 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1341
1342 Remove spurious initial empty lines.
1343 * data/location.cc: End the @output lines with an @.
1344
1345 2008-11-04 Akim Demaille <demaille@gostai.com>
1346
1347 Remove spurious initial empty lines.
1348 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1349 * data/yacc.c: End the @output lines with an @.
1350
1351 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1352
1353 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1354 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1355 requirements for a correct m4 are stricter.
1356 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
1357 * configure.ac: Update to use AC_PROG_GNU_M4.
1358 Reported by Eric Blake.
1359
1360 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1361
1362 Help with updating web manual.
1363 * HACKING: Incorporate instructions from gnulib/doc/README.
1364 * bootstrap.conf (gnulib_modules): Add gendocs.
1365
1366 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1367
1368 Fix strange %define locations for default values.
1369 Reported by Akim Demaille at
1370 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1371 and discussed again starting at
1372 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1373 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1374 because location information is bogus.
1375 Use angle brackets to delimit fake file name because square brackets
1376 look like underexpanded m4. Choose a better fake file name.
1377 Use negative line numbers.
1378 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1379 * src/location.c (location_print): If line for a boundary is negative,
1380 only print that boundary's file name.
1381 * src/location.h: Document that.
1382 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1383 defaults): Update output.
1384
1385 2008-11-07 Akim Demaille <demaille@gostai.com>
1386
1387 Locations without columns for command line arguments.
1388 * src/location.c (location_print): Don't display negative columns.
1389 * src/location.h: Document this.
1390
1391 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1392
1393 Add reminder about uploading public key to keys.gnupg.net.
1394 * HACKING (Release Procedure): Here.
1395
1396 2009-03-31 Akim Demaille <demaille@gostai.com>
1397
1398 bootstrap: --help to stdout.
1399 * bootstrap (usage): Don't send --help to stderr.
1400 Use a here doc instead of a long string.
1401
1402 2009-03-31 Akim Demaille <demaille@gostai.com>
1403
1404 bootstrap: README-hacking no longer exists
1405 * bootstrap (checkout_only_file): Set to HACKING.
1406
1407 2009-03-26 Akim Demaille <demaille@gostai.com>
1408
1409 doc: merge HACKING and README-hacking.
1410 Two files is confusing.
1411 Reported by Alexandre Duret-Lutz.
1412
1413 * README-hacking: Merge into...
1414 * HACKING (Working from the repository): here.
1415
1416 2009-03-26 Akim Demaille <demaille@gostai.com>
1417
1418 doc: update README-hacking.
1419 * README-hacking: We now use git and git submodules.
1420 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1421
1422 2009-03-26 Akim Demaille <demaille@gostai.com>
1423
1424 lalr1.cc: avoid GCC 4.3 warnings.
1425 GCC 4.3 now warns about "a || b && c" and asks for explicit
1426 parentheses.
1427 Reported by Alexandre Duret-Lutz.
1428 * data/location.cc: Update copyright years.
1429 (Position::operator==): Use parens to make precedence explicit.
1430 Compare lines and columns first, as they are more likely to be
1431 different, and they are faster to compare.
1432
1433 2009-03-26 Akim Demaille <demaille@gostai.com>
1434
1435 gnulib: update.
1436 * gnulib: Update to latest.
1437 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
1438 use +=.
1439
1440 2009-01-08 Akim Demaille <demaille@gostai.com>
1441
1442 Fix grep portability issues.
1443 Grep on Solaris does not support -q.
1444 Reported by Summum Bonum.
1445
1446 * NEWS: Add a stub for 2.4.2.
1447 * THANKS: Add Summum Bonum.
1448 * tests/atlocal.in (EGREP): New.
1449 (CC, CXX, XSLTPROC): Make it possible to override them via
1450 envvars.
1451 * tests/java.at: Use $EGREP instead of egrep.
1452 Use AT_CHECK's ignore instead of grep's -q.
1453
1454 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1455
1456 Version 2.4.1.
1457 * NEWS: Set version and date.
1458 * lib/Makefile.am: Update copyright year.
1459 * tests/atlocal.in: Update copyright year.
1460
1461 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1462
1463 Semicolon feature removal is not about future language support.
1464 * NEWS: The semicolon feature is no longer active for newer languages,
1465 so don't claim that it causes trouble for them.
1466
1467 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1468
1469 * gnulib: Update submodule to HEAD.
1470
1471 2008-12-09 Akim Demaille <demaille@gostai.com>
1472
1473 Update data/README.
1474 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1475
1476 2008-12-05 Eric Blake <ebb9@byu.net>
1477
1478 Build testsuite with newer autoconf.
1479 * tests/output.at (m4_expand): Don't override in newer autoconf,
1480 where the underlying implementation changed.
1481 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1482 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1483 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1484 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1485 since some of them contain unbalanced ')'.
1486
1487 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1488
1489 * NEWS: Clarify a little.
1490
1491 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1492
1493 * NEWS: Update for recent changes.
1494
1495 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1496
1497 Fix unexpanded macros in GLR defines file.
1498 Reported by Csaba Raduly at
1499 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1500 * THANKS (Csaba Raduly): Add.
1501 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1502 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1503 lexer in a separate module that includes the defines file.
1504 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
1505 source.
1506 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1507 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1508 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1509 (AT_DATA_SOURCE_PROLOGUE): New.
1510 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1511 (AT_DATA_SOURCE): New.
1512 (AT_FULL_COMPILE): New, copied from master branch and extended to
1513 support an additional source file.
1514
1515 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1516
1517 Don't let maintainer-*-check targets force a version update.
1518 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1519 handled.
1520
1521 2008-11-17 Di-an Jan <dianj@freeshell.org>
1522
1523 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1524 Align menus. Adjust word wrapping. Use node names for menu names.
1525 (Examples): Don't abbreviate node names.
1526 (LocalWords): Remove abbreviations.
1527 (Copying): Make description a sentence.
1528 (Java Action Features): Remove period to match the rest of menu.
1529
1530 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1531
1532 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1533 * configure.ac: Adjust usage.
1534 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1535 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1536 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1537
1538 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1539
1540 Don't add a semicolon to actions for %skeleton or %language.
1541 It breaks Java test cases as reported by Akim Demaille.
1542 * src/scan-code.l: Implement.
1543
1544 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1545
1546 Clean up %skeleton and %language priority implementation.
1547 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1548 remove static qualifier because others will soon need to see it.
1549 (language_prio): Likewise.
1550 (getargs): Use command_line_prio rather than 0.
1551 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1552 enum fields.
1553 (skeleton_prio): Extern it.
1554 (language_prio): Extern it.
1555 * src/parse-gram.y: Use grammar_prio rather than 1.
1556
1557 2008-11-04 Akim Demaille <demaille@gostai.com>
1558
1559 * NEWS: Mention the trailing semicolon in action.
1560
1561 2008-11-04 Akim Demaille <demaille@gostai.com>
1562
1563 Reformat NEWS.
1564 * NEWS: Use more outline-mode markup.
1565 Suggested by Jim Meyering.
1566
1567 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1568
1569 Fix user actions without a trailing semicolon.
1570 Reported by Sergei Steshenko at
1571 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1572 * THANKS (Sergei Steshenko): Add.
1573 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1574 * tests/regression.at (Fix user actions without a trailing semicolon):
1575 New test case.
1576
1577 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1578
1579 Initiate further development.
1580 * NEWS: Create an empty section for new entries.
1581 * gnulib: Update submodule to HEAD.
1582
1583 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1584
1585 * NEWS: Version 2.4.
1586
1587 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1588
1589 Prepare for next release.
1590 * NEWS: Briefly mention changes since 2.3b.
1591 * README: Say GNU m4 1.4.6, which we've been requiring in release
1592 announcements already, not 1.4.3, which breaks the build.
1593
1594 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1595
1596 Say %language is experimental.
1597 We're thinking of extending it's effect on output file naming. See the
1598 thread at
1599 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1600 * NEWS: Say it's experimental.
1601 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1602 recommend it over %skeleton for now.
1603 (Bison Options): Likewise.
1604 (C++ Bison Interface): Use %skeleton not %language.
1605 (Calc++ Parser): Use %skeleton not %language.
1606 * src/getargs.c (usage): Say it's experimental.
1607
1608 2008-11-01 Di-an Jan <dianj@freeshell.org>
1609 Paolo Bonzini <bonzini@gnu.org>
1610
1611 Support all Java parser class modifiers.
1612 * data/java.m4 (b4_percent_define_get3): New.
1613 (b4_final_if, b4_strictfp_if): New.
1614 * data/lalr1.java (final, strictfp, extends, implements): Support.
1615 * doc/bison.texinfo (final, strictfp, extends, implements): Add
1616 documentation.
1617 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
1618 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
1619 (AT_CHECK_JAVA_GREP): New.
1620 (Java parser class modifiers): New test.
1621 (Java parser class extends and implements): New test.
1622
1623 Model exception propagation better with throws and lex_throws.
1624 * data/java.m4 (b4_list2): New.
1625 (throws): Change default.
1626 * data/lalr1.java (yyaction): Add throws.
1627 (parse): Add lex_throws in addition to throws.
1628 * doc/bison.texinfo (throws, lex_throws): Add documentation.
1629 * tests/java.at (Java throws specifications): New test.
1630
1631 Improve documentation for Java parsers.
1632 * doc/bison.texinfo (Java Parsers): Add subsections.
1633 Don't quote first argument of %define.
1634 (Java Bison Interface): Document output files. Move documentation
1635 of parser class and merge into Java Parser Interface. Document
1636 features that error out. Document directives with no effect.
1637 Move note about Javadoc higher.
1638 (Java Semantic Values): Explicitly mention stype.
1639 Document that generic types cannot be used.
1640 (Java Location Values): Use @deftypeivar. Document constructors.
1641 Correct return value for toString.
1642 (Java Parser Interface): List undocumented constants/fields.
1643 Move documentation of fields added by %parse-param closer to list
1644 of members. Document that token names are added as fields.
1645 Document constructors accurately. Remove error method.
1646 (Java Scanner Interface): Move note on %pure-parser to Java Bison
1647 Interface. Describe %code lexer and yylex accutately.
1648 Remove documentation that does not match the code.
1649 (Java Action Features): New.
1650 (Java Differences): Add reference. Add item on semantic values.
1651 Add note about @{ ... @}. Clarify %% epilogue placement.
1652 (Java Declarations Summary): New.
1653
1654 Fix Java skeleton.
1655 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
1656 (b4_remove_comma): Quote test argument.
1657 (b4_identification): Remove "bison" field.
1658 * tests/java.at (Java parser class and package names): New test.
1659 (Java %parse-param and %lex-param): New test.
1660 (Java stype, position_class and location_class): New test.
1661
1662 2008-10-31 Di-an Jan <dianj@freeshell.org>
1663
1664 * data/lalr1.jave: Update copyright years.
1665 (YYParser): Correct name of "generated from" file in Javadoc:
1666 use b4_file_name instead of @ofile@.
1667 (Location constructor): Correct Javadoc parameter name.
1668 (yylloc): Add missing opening m4 quote after b4_location_if.
1669 This removes a stray [ in the Javadoc of Lexer.getStartPos.
1670 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
1671 (YYParser constructor): Correct Javadoc parameter name.
1672
1673 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
1674
1675 Always put auxiliary code files in the same dir as other output files.
1676 * src/files.c (compute_file_name_parts): When the user specifies
1677 --output but not --file-prefix, extract the directory prefix from the
1678 file prefix not from the grammar file name. This affects the location
1679 of files like location.hh generated by the C++ skeleton. The includes
1680 in the other output files require this fix.
1681 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
1682 for expected output files.
1683 (Output files): Add a test for the above.
1684
1685 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
1686
1687 * gnulib: Update submodule to HEAD.
1688
1689 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1690
1691 Update copyright year.
1692 * src/files.c: Here.
1693
1694 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
1695
1696 Don't overwrite the input file.
1697 * src/files.c (output_file_name_check): Fatal error if using input file
1698 for output.
1699 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
1700 argument.
1701 (Conflicting output files): Add test.
1702
1703 2008-10-28 Akim Demaille <demaille@gostai.com>
1704
1705 Space changes.
1706 * data/lalr1.cc: Formatting changes.
1707
1708 2008-10-28 Akim Demaille <demaille@gostai.com>
1709
1710 Don't define debugging functions when !YYDEBUG.
1711 * data/lalr1.cc (debug_stream, set_debug_stream)
1712 (debug_level_type, debug_level, set_debug_level): Don't
1713 declare them when YYDEBUG is not defined.
1714 The implementation are already YYDEBUG-aware.
1715
1716 2008-10-28 Akim Demaille <demaille@gostai.com>
1717
1718 Prefer "continue" for empty loop bodies.
1719 * etc/bench.pl.in: Use "continue" instead of {}.
1720
1721 2008-10-28 Akim Demaille <demaille@gostai.com>
1722
1723 Space and comments changes.
1724 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
1725 * data/c.m4, data/lalr1.cc: Space changes.
1726
1727 2008-10-28 Akim Demaille <demaille@gostai.com>
1728
1729 Make gnulib a submodule.
1730 * gnulib: New.
1731 * .gitmodules (gnulib): New.
1732
1733 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1734
1735 Fix yyerror_range for user-defined location type in C++. Reported by
1736 Georg Sauthoff at
1737 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
1738 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
1739 * THANKS (Georg Sauthoff): Add.
1740
1741 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1742
1743 Update several administrative files mainly to facilitate releasing.
1744 * HACKING (Administrivia): Make the git-merge-changelog notes more
1745 helpful.
1746 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
1747 (Release Procedure): Update for git and add numerous details that were
1748 previously missing.
1749 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
1750 * maint.mk (announcement): Don't list bison as a bootstrap tool so
1751 that announcements don't claim we bootstrapped with whatever bison
1752 happened to be in PATH. Add flex as a bootstrap tool.
1753 * Makefile.maint: Remove, previously replaced by maint.mk.
1754 * Makefile.cfg: Remove, and migrate settings to...
1755 * cfg.mk: ... here for the sake of `make announcement'.
1756 * bootstrap.conf (gnulib_modules): Add announce-gen.
1757 * README: Say GNU Bison instead of just Bison. Suggested by Karl
1758 Berry.
1759
1760 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
1761
1762 Small but important bugfixes for the Java skeleton.
1763 * data/lalr1.java (yyerror): Change Location to b4_location_type.
1764 (yy_symbol_print): Call toString on yyvaluep.
1765
1766 2008-08-29 Akim Demaille <demaille@gostai.com>
1767
1768 Clarify UPDATED use.
1769 * doc/bison.texinfo: It refers to the last edition of this file,
1770 not to the release date of Bison.
1771 Reported by Joel E. Denny.
1772
1773 2008-08-29 Akim Demaille <demaille@gostai.com>
1774
1775 * README: Update FAQ pointer.
1776 Reported by Joel E. Denny.
1777
1778 2008-08-27 Eric Blake <ebb9@byu.net>
1779
1780 Resync m4sugar from autoconf.
1781 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
1782 (m4_init): Adjust to latest m4.git changes.
1783 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
1784 effects.
1785 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
1786 (_m4_list_cmp): Reduce side effects.
1787
1788 2008-08-27 Akim Demaille <demaille@gostai.com>
1789
1790 Check yyerrok in calc.at.
1791 * tests/calc.at (calc.y): Use yyerrok on "( error )".
1792 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
1793 expected.
1794
1795 2008-08-27 Akim Demaille <demaille@gostai.com>
1796
1797 Support yyerrok in lalr1.cc.
1798 YYBACKUP is still to import back into lalr1.cc.
1799 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
1800
1801 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1802
1803 For maintainer-check*, don't recompile for a $(VERSION) update.
1804 * cfg.mk: New file.
1805 (_is-dist-target): Override the one in GNUmakefile.
1806 * Makefile.am (EXTRA_DIST): Add cfg.mk.
1807
1808 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1809
1810 Update for recent change to gnulib.
1811 * src/parse-gram.y: Don't include strverscmp.h. It comes from
1812 string.h now.
1813
1814 2008-08-15 Eric Blake <ebb9@byu.net>
1815
1816 Remaining m4sugar merge from autoconf.
1817 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
1818 * data/m4sugar/foreach.m4: New file, copied from autoconf.
1819 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
1820 * src/output.c (output_skeleton): Tell m4 how to find it.
1821
1822 Partial m4sugar merge from autoconf: m4_map.
1823 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
1824 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
1825 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
1826 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
1827 for empty list.
1828 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
1829 Likewise.
1830 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
1831 declares it.
1832
1833 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
1834
1835 Keep .version and PACKAGE_VERSION in sync.
1836 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
1837 dependency, and add comments justifying this in more detail. Discussed
1838 starting at
1839 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
1840
1841 2008-08-06 Eric Blake <ebb9@byu.net>
1842
1843 Partial m4sugar merge from autoconf: m4_shiftn.
1844 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
1845 (m4_shift2, m4_shift3): New macros.
1846 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
1847 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
1848 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
1849 * data/java.m4 (b4_remove_comma): Likewise.
1850
1851 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
1852 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
1853 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
1854 (m4_init): Consolidate wrapped text into single m4_wrap.
1855 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
1856 in wrapped text.
1857
1858 2008-08-05 Eric Blake <ebb9@byu.net>
1859
1860 Partial m4sugar merge from autoconf: builtins, version.m4.
1861 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
1862 (m4_prepend): Remove, as it is unused and inherently quadratic,
1863 whereas m4_append is linear in newer m4.
1864 (m4_mkstemp): New builtin.
1865 (m4_symbols): Make rename conditional.
1866 (m4_version_prereq): Ensure fatal error if used in bison, which
1867 intentionally lacks version.m4.
1868
1869 Fix comments in m4sugar.
1870 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
1871
1872 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1873
1874 Update for recent .gitignore fix in Gnulib.
1875 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
1876 anchored .gitignore entries.
1877
1878 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1879
1880 Set gnu or gnits strictness.
1881 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
1882 development and gnits strictness for releases. Based on Eric Blake's
1883 suggestion at
1884 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
1885
1886 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
1887
1888 * NEWS: Clarify documentation of %language.
1889
1890 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
1891
1892 Support usage of git-merge-changelog.
1893 * .gitattributes: New.
1894 * HACKING: Document usage of git-merge-changelog.
1895 * bootstrap: Install git-merge-changelog entries in .git/config
1896 if appropriate.
1897
1898 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1899
1900 Remove remaining dependence on CVS Id keyword.
1901 * ChangeLog: For the sake of people still using CVS, don't use dollars
1902 when mentioning Id.
1903 * data/xslt/bison.xsl: Remove Id from header comments, where it was
1904 unusual anyway.
1905 * data/xslt/xml2dot.xsl: Likewise.
1906 * data/xslt/xml2text.xsl: Likewise.
1907 * data/xslt/xml2xhtml.xsl: Likewise.
1908 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
1909 * doc/Makefile.am (neutralize): Remove, no longer needed.
1910 (.x.1): Don't use neutralize.
1911 (edit): Don't substitute for ID.
1912 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
1913
1914 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1915
1916 Fix dependence on computed configure variables.
1917 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
1918 $(top_srcdir)/configure.ac so that changes to computed variables, such
1919 as PACKAGE_VERSION, are seen.
1920 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
1921
1922 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
1923
1924 Update copyright dates for recent changes.
1925 * Makefile.am: Here.
1926 * src/Makefile.am: Here.
1927 * src/reduce.c: Here.
1928 * tests/reduce.at: Here.
1929
1930 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
1931
1932 Use git-version-gen for version names between releases.
1933 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
1934 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
1935 * .prev-version: New.
1936 * .version.in: Remove.
1937 * ChangeLog: Remove the Id previously used for capturing the CVS
1938 revision.
1939 * GNUmakefile: Remove, now copied from Gnulib.
1940 * Makefile.am: Add code suggested by comments in
1941 build-aux/git-version-gen.
1942 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
1943 .prev-version, and .version.
1944 * NEWS (2.3b+): Rename to...
1945 (?.?): ... this because we're dropping the "+" version naming scheme,
1946 but, in general, we still can't be sure of our next release name.
1947 * bootstrap: Add a quick hack to remove from .gitignore the
1948 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
1949 entry. This should really be fixed in gnulib instead.
1950 * bootstrap.conf (gnulib_modules): Add gnumakefile.
1951 * configure.ac (AC_INIT): Set version name by invoking
1952 build-aux/git-version-gen.
1953 (AC_CONFIG_FILES): Remove .version, now generated by
1954 build-aux/git-version-gen.
1955 * maint.mk: New, copied from coreutils.
1956 * doc/.cvsignore (bison.1): Add.
1957 * doc/.gitignore (/bison.1): Add.
1958 * doc/bison.1: Remove, generated.
1959 * src/.cvsignore (revision.c): Remove.
1960 * src/.gitignore (/revision.c): Remove.
1961 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
1962 (BUILT_SOURCES): Remove revision.c.
1963 (revision.c): Remove.
1964 * src/getargs.c (version): Don't print revision after the VERSION.
1965 * src/revision.h: Remove.
1966
1967 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1968
1969 Fix untranslatable composition of sentences. Reported by Goran
1970 Uddeborg at
1971 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
1972 * THANKS (Goran Uddeborg): Add.
1973 * src/reduce.c (reduce_print): Report the number of nonterminals and
1974 rules useless in the grammar in separate sentences.
1975 * tests/reduce.at (Useless Rules): Update output.
1976 (Reduced Automaton): Likewise.
1977 (Underivable Rules): Likewise.
1978 (Empty Language): Likewise.
1979
1980 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1981
1982 Fix some .gitignore and .cvsignore problems.
1983 * bootstrap (insert_sorted_if_absent): Replace all uses with...
1984 (insert_vc_ignore): ... this new function, which prepends `/' to all
1985 .gitignore entries before passing them to insert_sorted_if_absent.
1986 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
1987 .cvsignore files are maintained even though Bison developers run
1988 bootstrap while using Git.
1989 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
1990 unneeded by Bison.
1991 (gnulib): Add.
1992 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
1993 unneeded. Reported by Eric Blake.
1994 * lib/.gitignore (/*~): Add.
1995 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
1996 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
1997 Blake.
1998 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
1999
2000 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2001
2002 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2003 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2004 * bootstrap.conf (gnulib_modules): Add unsetenv.
2005 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2006 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2007 (/setenv.m4): Add.
2008 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2009 the first argument because it may become position-dependent, and unset
2010 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2011 Add comments explaining these issues in more detail.
2012
2013 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2014
2015 Add .gitignore everywhere based on .cvsignore.
2016 * .gitignore: New.
2017 * build-aux/.gitignore: New.
2018 * data/.gitignore: New.
2019 * doc/.gitignore: New.
2020 * etc/.gitignore: New.
2021 * examples/.gitignore: New.
2022 * examples/calc++/.gitignore: New.
2023 * lib/.gitignore: New.
2024 * m4/.gitignore: New.
2025 * po/.gitignore: New.
2026 * runtime-po/.gitignore: New.
2027 * src/.gitignore: New.
2028 * tests/.gitignore: New.
2029
2030 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2031
2032 * NEWS (2.3b+): New section, empty for now.
2033 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2034
2035 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2036
2037 * NEWS (2.3b): Update release date since there has been a delay in
2038 getting the announcements and tarballs out.
2039
2040 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2041
2042 * NEWS: Version 2.3b.
2043 * configure.ac (AC_INIT): Likewise.
2044 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2045
2046 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2047
2048 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2049 been doing it for years.
2050 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2051 (Release Procedure): Add FIXME about make alpha being unmaintained.
2052
2053 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2054
2055 * data/yacc.c: Reformat m4 a little for readability.
2056 * src/lalr.c (build_relations): Correct comment.
2057
2058 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2059
2060 DJGPP specific issue.
2061 * djgpp/config.sed: Fixes required to run configure scripts generated
2062 by autoconf 2.62.
2063
2064 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2065
2066 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2067 coordinator@translationproject.org.
2068
2069 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2070
2071 * THANKS: Add Eric Blake.
2072
2073 2008-04-23 Eric Blake <ebb9@byu.net>
2074
2075 Revert prior patch, by working around autoconf regression.
2076 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2077 ("Output file name: ("): Uncomment test.
2078 ("Output file name: )"): Likewise.
2079 Based on an idea from Noah Misch.
2080
2081 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2082
2083 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2084 2.61. Reported by Juan Manuel Guerrero at
2085 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2086 * tests/output.at ("Output file name: ("): Comment out test case for
2087 now.
2088 ("Output file name: )"): Likewise.
2089
2090 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2091
2092 * GNUmakefile: Update git-version-gen invocation so make dist
2093 succeeds.
2094
2095 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2096
2097 Update to the current gnulib CVS repository, and fix trigraph handling
2098 in Bison.
2099 * bootstrap: Update gnulib CVS repository URL.
2100 (symlink_to_dir): Encapsulate the code that guarantees the destination
2101 directory exists into...
2102 (check_dst_dir): ... this new function, and...
2103 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2104 fail when copying files into lib/uniwidth/.
2105 * src/output.c (prepare_symbols): When writing yytname muscles, where
2106 symbol names will be encoded in C-string literals, tell quotearg to
2107 escape trigraphs. This used to be the default in gnulib.
2108 * tests/regression.at (Token definitions): Because of the change in
2109 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2110 escapes trigraphs in symbol names. Thus, yytname no longer has
2111 trigraphs unnecessarily doubly escaped. Update test case output.
2112 Extend test case to be sure Bison's own error messages will no longer
2113 have trigraphs in symbol names unnecessarily escaped once.
2114
2115 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2116
2117 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2118 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2119 * .cvsignore: Add .version.
2120 * .version.in: New.
2121 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2122 * configure.ac (AC_CONFIG_FILES): Add .version.
2123 * build-aux/.cvsignore: Add git-version-gen.
2124
2125 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2126
2127 * NEWS (2.3a+): Mention that -g now takes an argument.
2128 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2129 consistency. Update the -g and -x entries now that they take
2130 arguments. Use brackets to indicate optional arguments.
2131 * src/getargs.c (usage): Explain the relationship between arguments of
2132 long and short options more completely. Document --defines and -d
2133 separately since the former takes an argument but, for POSIX Yacc, the
2134 latter does not.
2135 (short_options): Let -W take an optional argument like --warnings.
2136 (getargs): Sort cases.
2137
2138 2008-02-28 Akim Demaille <demaille@gostai.com>
2139
2140 * doc/bison.texinfo: Fix a few typos.
2141
2142 2008-02-28 Akim Demaille <akim@epita.fr>
2143
2144 * doc/bison.texinfo (Bison Options): Document -W.
2145 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2146
2147 2008-02-28 Akim Demaille <akim@epita.fr>
2148
2149 * src/getargs.c (short_options): Split and sort for readability.
2150 -g and -x take optional arguments, just like their long options.
2151 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2152 understand.
2153 Fix the handling of $opt which resulted in all the argument to be
2154 considered as optional.
2155
2156 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2157
2158 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2159 say its interface is experimental.
2160 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2161 Java.
2162 (Bison Options): In the -L and --language entry, mention Java.
2163 (Java Bison Interface): Say the interface is experimental.
2164 * src/getargs.c (usage): Mention -L and --language.
2165
2166 * NEWS (2.3a+): Say the push parsing interface is experimental.
2167 * doc/bison.texinfo (Push Decl): Likewise.
2168 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2169 (Push Parser Function): Likewise.
2170 (Pull Parser Function): Likewise.
2171 (Parser Create Function): Likewise.
2172 (Parser Delete Function): Likewise.
2173 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2174 yypull_parse, and yypush_parse entries.
2175
2176 * NEWS (2.3a+): Mention XML support, and say the schema is
2177 experimental.
2178 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2179 * src/getargs.c (usage): Say the XML schema is experimental.
2180
2181 * NEWS (2.3a+): Say option instead of flag.
2182
2183 2008-02-21 Wojciech Polak <polak@gnu.org>
2184
2185 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2186 text.
2187
2188 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2189
2190 Fix impure push parser compile error reported by Bob Rossi at
2191 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2192 * data/yacc.c: Clean up whitespace in the output a little.
2193 (yypstate_allocated): Define for impure push parsers regardless of
2194 whether the pull interface is also requested.
2195 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2196 check impure push parsers without the pull interface.
2197
2198 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2199 yyerror takes arguments specified by %parse-param while yypstate_new
2200 does not.
2201 * doc/bison.texinfo (Parser Create Function): Document that
2202 yypstate_new returns 0 for multiple impure parser instances.
2203 * tests/push.at (Push Parsing: Multiple impure instances): Update
2204 expected stderr output.
2205
2206 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2207
2208 * runtime-po/POTFILES.in (push.c): Remove.
2209
2210 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2211
2212 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2213 * data/push.c: Rename to...
2214 * data/yacc.c: ... this, overwriting it.
2215 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2216 `%push-pull-parser' -> `%define api.push_pull "both"'.
2217 Remove old yacc.c tests, and update push.c tests to yacc.c.
2218
2219 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2220
2221 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2222 `"%code top" blocks' instead of `%code "top" blocks'.
2223 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2224 Clean up whitespace in the output a little.
2225
2226 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2227
2228 Fix documentation problems reported by Tim Josling at
2229 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2230 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2231 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2232 integers. Explain the effect of literal string aliases on error
2233 messages. Copy token 0 documentation from the C++ skeleton
2234 documentation.
2235
2236 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2237
2238 Accept a token number in a %left, %right, or %nonassoc for POSIX
2239 conformance. Reported by Tim Josling at
2240 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2241 * NEWS (2.3a+): Mention.
2242 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2243 and code numbers are treated by precedence declarations.
2244 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2245 of symbols.1.
2246 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2247 of symbol.
2248 (symbol.prec): New, just like symbol but allows INT.
2249 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2250 longer holds.
2251 * tests/regression.at (Token number in precedence declaration): New
2252 test case.
2253
2254 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2255
2256 DJGPP specific issues.
2257 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2258 be changed. Copyright timestamp adjusted.
2259 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2260 be changed. Copyright timestamp adjusted.
2261 * djgpp/config.site: Copyright timestamp adjusted.
2262 * djgpp/config_h.sed: Copyright timestamp adjusted.
2263 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2264 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2265 filename translation list.
2266 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2267 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2268 files shall be created. Before trying to use the temp dir where the
2269 environment variable points to check that the dir really exists. If
2270 not default to the cwd as temp dir. Copyright timestamp adjusted.
2271 * djgpp/subpipe.h: Copyright timestamp adjusted.
2272 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2273
2274 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2275
2276 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2277
2278 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2279
2280 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2281 Problem reported by Claudio Saavedra in
2282 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2283
2284 2008-01-05 Wojciech Polak <polak@gnu.org>
2285
2286 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2287 document's title with the input grammar file name.
2288
2289 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2290
2291 Automate regression testing of the XML/XSLT implementation. Discussed
2292 starting at
2293 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2294 * configure.ac (XSLTPROC): New substitution.
2295 * Makefile.am (maintainer-xml-check): New phony target invoking...
2296 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2297 invoking make maintainer-check with BISON_TEST_XML=1.
2298 * tests/atlocal.in (XSLTPROC): New.
2299 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2300 not to report reachable memory when Bison is expected to have a
2301 non-zero exit status and (2) to compare XML/XSLT output with --graph
2302 and --report=all output for every working grammar when
2303 BISON_TEST_XML=1.
2304 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2305 (AT_BISON_CHECK_XML): New.
2306 (AT_QUELL_VALGRIND): New.
2307 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2308 (AT_CHECK): ... don't redefine this since this was the old way to
2309 quell Valgrind.
2310 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2311 AT_BISON_CHECK invocations.
2312 * tests/c++.at: Likewise.
2313 * tests/calc.at: Likewise.
2314 * tests/conflicts.at: Likewise.
2315 * tests/cxx-type.at: Likewise.
2316 * tests/existing.at: Likewise.
2317 * tests/glr-regression.at: Likewise.
2318 * tests/headers.at: Likewise.
2319 * tests/input.at: Likewise.
2320 * tests/java.at: Likewise.
2321 * tests/output.at: Likewise.
2322 * tests/push.at: Likewise.
2323 * tests/reduce.at: Likewise.
2324 * tests/regression.at: Likewise.
2325 * tests/sets.at: Likewise.
2326 * tests/skeletons.at: Likewise.
2327 * tests/synclines.at: Likewise.
2328 * tests/torture.at: Likewise.
2329 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2330 tends to hang xsltproc.
2331 (Big horizontal): Likewise.
2332
2333 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2334
2335 In XML output, remove redundant class attribute on symbol element.
2336 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2337 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2338 look up a symbol to determine whether it's a nonterminal or terminal.
2339 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2340 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2341
2342 Add prec/assoc information to XML output.
2343 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2344 %prec, add a percent_prec attribute.
2345 * src/print-xml.c (print_grammar): For each terminal that has a
2346 precedence or associativity, add a prec or assoc attribute.
2347 (xml_indent): New.
2348 (xml_puts): Use xml_indent.
2349 (xml_printf): Use xml_indent.
2350 * src/print-xml.h (xml_indent): Prototype.
2351
2352 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2353 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2354
2355 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2356
2357 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2358 (bison:ruleByNumber): ... this for clarity.
2359 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2360 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2361 (xsl:template match="reduction"): Update.
2362 (xsl:template match="item"): Update.
2363 (xsl:template match="reduction"): Update.
2364
2365 In the XML output, don't print the list of rules where symbols appear.
2366 Compute it in XSLT instead. Discussed at
2367 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2368 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2369 (bison:ruleByRhs): New.
2370 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2371 bison:ruleByRhs.
2372 (xsl:template match="terminal/rule"): Remove.
2373 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2374 bison:ruleByRhs.
2375 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2376 Remove.
2377 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2378 bison:ruleByRhs and mode="number-link" for rule template.
2379 (xsl:template match="terminal/rule"): Remove.
2380 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2381 bison:ruleByRhs and mode="number-link" for rule template.
2382 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2383 Rewrite as...
2384 (xsl:template match="rule" mode="number-link"): ... this.
2385 * src/print-xml.c (print_grammar): Don't print the list of rules.
2386
2387 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2388
2389 Don't let --report affect XML output; always print all information.
2390 Discussed at
2391 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2392 * src/conflicts.c (log_resolution): Implement.
2393 * src/print-xml.c (print_core): Implement.
2394 (print_state): Implement.
2395 (print_xml): Implement.
2396
2397 * NEWS (2.3a+): Fix quotes.
2398 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2399 don't let %verbose clear the list specified by --report.
2400
2401 2007-11-26 Akim Demaille <akim@epita.fr>
2402
2403 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2404
2405 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2406
2407 In the XML output, list useless and unused symbols and rules with the
2408 useful ones and add a "usefulness" attribute. Discussed starting at
2409 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2410 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2411 (grammar_rules_print_xml): Print all rules instead of just those
2412 useful in the grammar, and add a "usefulness" attribute.
2413 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2414 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2415 (print_grammar): Print all nonterminals instead of just useful ones,
2416 and add a "usefulness" attribute to nonterminals and terminals.
2417 (print_xml): Don't print a separate "reductions" or
2418 "rules-useless-in-parser" element.
2419 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2420 (reduce_xml): Remove.
2421 (reduce_token_unused_in_grammar): New.
2422 (reduce_nonterminal_useless_in_grammar): New.
2423 * src/reduce.h (reduce_xml): Remove prototype.
2424 (reduce_token_unused_in_grammar): Add prototype.
2425 (reduce_nonterminal_useless_in_grammar): Add prototype.
2426 * data/xslt/xml2text.xsl: Update for XML changes.
2427 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2428 * tests/reduce.at (Useless Terminals): Update output.
2429 (Useless Rules): Update output.
2430 (Reduced Automaton): Update output.
2431
2432 Say "Terminals unused in grammar" instead of "Unused terminals".
2433 * NEWS (2.3a+): Update.
2434 * doc/bison.texinfo (Understanding): Update example output.
2435 * src/reduce.c (reduce_output): Implement.
2436 * data/xslt/xml2text.xsl: Implement.
2437 * data/xslt/xml2xhtml.xsl: Implement.
2438
2439 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2440
2441 Accept --report-file=FILE to override the default `.output' filename.
2442 * NEWS (2.3a+): Mention.
2443 * doc/bison.texinfo (Bison Options): Add an entry.
2444 * src/files.c (compute_output_file_names): Don't override
2445 spec_verbose_file if already set.
2446 * src/getargs.c (usage): Document --report-file.
2447 (REPORT_FILE_OPTION): New anonymous enum member.
2448 (long_options): Add entry for it.
2449 (getargs): Add case for it setting spec_verbose_file.
2450
2451 * build-aux/cross-options.pl: Don't record a short option just because
2452 there's an arg.
2453 * doc/.cvsignore: Add yacc.1.
2454
2455 2007-11-14 Akim Demaille <akim@epita.fr>
2456
2457 * doc/yacc.1.in: New.
2458 * configure.ac, doc/Makefile.am: Adjust.
2459 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2460 config.h symbol.
2461 Use AC_SUBST for assignments too.
2462 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2463
2464 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2465
2466 * src/gram.c: Remove comments that duplicate comments in gram.h.
2467
2468 When reporting useless rules and nonterminals, say "useless in grammar"
2469 instead of "useless", and say "useless in parser" instead of "never
2470 reduced". Discussed starting at
2471 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2472 * NEWS (2.3a+): Mention this change.
2473 * data/xslt/xml2text.xsl: Update output text and expected input XML
2474 element names to match changes below.
2475 * data/xslt/xml2xhtml.xsl: Likewise.
2476 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2477 Contents: "Rules useless in parser due to conflicts".
2478 * doc/bison.texinfo (Decl Summary): Reword a little.
2479 (Understanding): Update example output for changes below.
2480 * src/gram.c: (rule_useful_p): Rename to...
2481 (rule_useful_in_grammar_p): ... this.
2482 (rule_useless_p): Rename to...
2483 (rule_useless_in_grammar_p): ... this.
2484 (rule_never_reduced_p): Rename to...
2485 (rule_useless_in_parser_p): ... this.
2486 (grammar_rules_print): Update for renames.
2487 (grammar_rules_print_xml): Update for renames.
2488 (grammar_rules_never_reduced_report): Rename to...
2489 (grammar_rules_useless_report): ... this since it is used for either
2490 kind of useless rule.
2491 * src/gram.h: Reword comments and update function names in prototypes.
2492 * src/main.c (main): Say "rule useless in parser due to conflicts".
2493 * src/print-xml.c (print_rules_never_reduced): Rename to...
2494 (print_rules_useless_in_parser): ... this, and rename output XML
2495 element "rules-never-reduced" to "rules-useless-in-parser".
2496 (print_xml): Update for rename.
2497 * src/print.c (print_results): Say "Rules useless in parser due to
2498 conflicts".
2499 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2500 (nonterminals_reduce): Say "nonterminal useless in grammar".
2501 (reduce_output): Say "Nonterminals useless in grammar".
2502 Say "Rules useless in grammar".
2503 (reduce_xml): Rename output XML element "useless" to
2504 "useless-in-grammar".
2505 (reduce_print): Don't report the count of grammatically useless rules
2506 as "rules never reduced" just because %yacc is specified.
2507 In the correct report of this count, say nonterminal(s) and rule(s)
2508 "useless in grammar".
2509 * tests/conflicts.at (S/R in initial): Update expected output.
2510 (Defaulted Conflicted Reduction): Likewise.
2511 (Unreachable States After Conflict Resolution): Likewise.
2512 * tests/existing.at (GNU pic Grammar): Likewise.
2513 * tests/reduce.at (Useless Nonterminals): Likewise.
2514 (Useless Rules): Likewise.
2515 (Reduced Automaton): Likewise.
2516 (Underivable Rules): Likewise.
2517 (Empty Language): Likewise.
2518
2519 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2520
2521 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2522 here document and before the EOF so that BSD's implementation of Bourne
2523 shell doesn't parse the delimiter as part of the here document.
2524 * doc/.cvsignore: Add cross-options.texi.
2525 * src/getargs.c (usage): Add a blank line after the warning categories.
2526
2527 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
2528
2529 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2530
2531 2007-11-05 Akim Demaille <akim@epita.fr>
2532
2533 Remove Id: from bison.1.
2534 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2535 (perl -0777 -pi -e 's/\.PP\nId): New.
2536 (.x.1): Use it to ignore the version control revision.
2537
2538 2007-11-05 Akim Demaille <demaille@gostai.com>
2539
2540 * build-aux/Makefile.am: Ship cross-options.pl.
2541 * doc/Makefile.am: Always refer to cross-options.texi with
2542 $(srcdir).
2543 (MAINTAINERCLEANFILES): Add it.
2544
2545 2007-11-04 Akim Demaille <demaille@gostai.com>
2546
2547 Generate the long/short option cross-table.
2548 * build-aux/cross-options.pl: New.
2549 * doc/Makefile.am (cross-options.texi): New.
2550 * doc/bison.texinfo: Use it.
2551
2552 2007-11-04 Akim Demaille <demaille@gostai.com>
2553
2554 Generate bison.1 using help2man.
2555 * doc/common.x, doc/bison.x: New.
2556 * doc/Makefile.am (bison.1, .x.1): New.
2557 The code is taken from autoconf-2.61/man/Makefile.am.
2558 * configure.ac: Look for help2man.
2559
2560 2007-11-04 Akim Demaille <demaille@gostai.com>
2561
2562 Complete --help.
2563 * src/getargs.c (usage): Document -W, make it clear that -d,
2564 -g and -x have optional arguments.
2565
2566 2007-11-04 Akim Demaille <demaille@gostai.com>
2567
2568 Find sha1sum when named gsha1sum.
2569 * bootstrap (find_tool): New.
2570 ($SHA1SUM): New.
2571
2572 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2573
2574 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2575 at
2576 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2577 * NEWS (2.3a+): Mention.
2578 * data/bison.m4 (b4_pure_if): Don't define it here.
2579 * data/c.m4 (b4_identification): Depend on individual skeletons to
2580 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2581 values of the %define variables api.pure or api.push_pull. Define
2582 YYPURE, YYPUSH, and YYPULL accordingly.
2583 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2584 glr.cc has already defined b4_pure_flag.
2585 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2586 Remove YYPUSH and YYPULL since they're back in b4_identification again.
2587 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
2588 * doc/bison.texinfo (Pure Decl): Update.
2589 (Push Decl): Update.
2590 (Decl Summary): Add api.pure to %define entry.
2591 In %pure-parser entry, say it's deprecated and reference %define.
2592 (Pure Calling): Update.
2593 (Error Reporting): Update.
2594 (C++ Scanner Interface): Update.
2595 (How Can I Reset the Parser): Update.
2596 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2597 reference %define.
2598 * src/getargs.c (pure_parser): Remove global variable.
2599 * src/getargs.h (pure_parser): Remove extern.
2600 * src/output.c (prepare): Don't define pure_flag muscle.
2601 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2602 wrapper around `%define api.pure'.
2603 * tests/calc.at (Simple LALR Calculator): Update.
2604 (Simple GLR Calculator): Update.
2605 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
2606 Update.
2607 (GLR: Resolve ambiguity, pure, locations): Update.
2608 (GLR: Merge conflicting parses, pure, no locations): Update.
2609 (GLR: Merge conflicting parses, pure, locations): Update.
2610 * tests/glr-regression.at (Uninitialized location when reporting
2611 ambiguity): Update
2612 * tests/input.at (Unused %define api.pure): New test case.
2613 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
2614 AT_PURE_IF and AT_PURE_AND_LOC_IF.
2615 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2616
2617 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2618
2619 %define push_pull -> %define api.push_pull. Discussed starting at
2620 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
2621 * data/push.c: Expect the new name.
2622 * data/yacc.c: Likewise.
2623 * doc/bison.texinfo (Push Decl): Update.
2624 (Decl Summary): Update %define entry.
2625 (Push Parser Function): Update.
2626 (Pull Parser Function): Update.
2627 (Parser Create Function): Update.
2628 (Parser Delete Function): Update.
2629 * tests/calc.at (Simple LALR Calculator): Update.
2630 * tests/input.at (%define enum variables): Update.
2631 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2632 (Push Parsing: Multiple impure instances): Update.
2633 (Push Parsing: Unsupported Skeletons): Update.
2634 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
2635 (Exploding the Stack Size with Malloc): Update.
2636
2637 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
2638 other entries some.
2639
2640 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
2641
2642 For the XML output's terminal element, rename @number to @token-number,
2643 and add @symbol-number. In the nonterminal element, rename @number to
2644 @symbol-number. Discussed starting at
2645 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
2646 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
2647 renames.
2648 (xsl:template match="nonterminal"): Likewise.
2649 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
2650 (xsl:template match="nonterminal"): Likewise.
2651 * src/print-xml.c (print_grammar): Implement.
2652
2653 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2654
2655 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
2656 2007-10-11 change, the child elements here are items not rules.
2657 (xsl:template match="item"): New.
2658 (xsl:template match="rule"): Update for new reduced itemset.
2659 (xsl:template match="point"): Remove.
2660 (xsl:template match="empty"): For consistency with --graph, don't
2661 output "/* empty */".
2662 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
2663 line-wrap, don't pass a negative value as first-line-length since this
2664 won't work with the following changes.
2665 (xsl:template name="line-wrap"): Simplify slightly.
2666 (xsl:template name="ws-search"): Eliminate recursion.
2667 * src/print_graph.c (print_core): Don't print a reduction's lookahead
2668 set next to an item whose dot is not at the end of the RHS even if it
2669 happens to be associated with the same rule.
2670
2671 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2672
2673 Add %define lr.keep_unreachable_states.
2674 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
2675 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
2676 * src/main.c (main): Implement it.
2677 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2678 Extend to test it, and fix a typo.
2679
2680 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2681
2682 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
2683 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
2684 the example .output text.
2685 * tests/regression.at (Extra lookahead sets in report): Improve wording
2686 of comments.
2687
2688 2007-10-17 Wojciech Polak <polak@gnu.org>
2689
2690 * src/print-xml.c (print_grammar): Renamed
2691 <terminal> and <nonterminal> attributes:
2692 "type" to "number" and "symbol" to "name".
2693 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
2694 Use new attribute names.
2695 (xsl:template match="nonterminal"): Likewise.
2696 * data/xslt/xml2xhtml.xsl: Likewise.
2697
2698 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
2699
2700 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
2701 (Option Cross Key): Likewise.
2702
2703 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
2704 next to an item whose dot is not at the end of the RHS even if it
2705 happens to be associated with the same rule.
2706 * src/print.c (print_core): Likewise.
2707 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
2708 (Resolved SR Conflicts): Update output.
2709 * tests/regression.at (Extra lookahead sets in report): New test case.
2710
2711 2007-10-11 Wojciech Polak <polak@gnu.org>
2712
2713 * src/print-xml.c (print_core): Remove item set
2714 redundancy.
2715 * data/xslt/bison.xsl (bison:ruleNumber): New key.
2716 Improve processing time. Suggested by Joel E. Denny.
2717 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
2718 Write xsl:param "required" attribute as comment.
2719 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
2720 (xsl:template match="rule"): Support new reduced itemset.
2721 (xsl:template match="point"): Remove.
2722 * data/xslt/xml2xhtml.xsl: Likewise.
2723
2724 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2725
2726 * src/getargs.c (version): Update copyright year.
2727
2728 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2729
2730 Make xml2dot.xsl and --graph produce the same output.
2731 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
2732 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
2733 escaped later.
2734 (xsl:template name="output-node"): Use the new escape template instead
2735 of the string-replace template directly.
2736 (xsl:template name="output-edge"): Likewise.
2737 (xsl:template name="escape"): New, escapes backslashes and newlines in
2738 addition to quotation marks.
2739 * src/graphviz.c (start_graph, output_node, output_edge): Add
2740 whitespace to output for legibility.
2741
2742 Make xml2text.xsl and --report produce the same output, and remove the
2743 XML "conflicts" element since a conflict summary is easily extracted
2744 from the automaton.
2745 * data/xslt/bison.xsl: New.
2746 (xsl:template match="state" mode="bison:count-conflicts): New.
2747 * data/xslt/xml2text.xsl: Import bison.xsl.
2748 (xsl:template match="bison-xml-report"): Instead of styling the
2749 "conflicts" element, style the "automaton" element with mode
2750 "conflicts". Unlike the former, the latter lists S/R and R/R
2751 conflicts for a state on the same line.
2752 (xsl:template match="conflicts"): Remove.
2753 (xsl:template match="conflict"): Remove.
2754 (xsl:template match="terminal"): Line-wrap the list of rules in which
2755 the terminal is used.
2756 (xsl:template match="nonterminal"): Likewise for nonterminals.
2757 (xsl:template match="automaton" mode="conflicts"): New.
2758 (xsl:template match="state" mode="conflicts"): New.
2759 (xsl:template name="line-wrap"): New.
2760 (xsl:template name="ws-search"): New.
2761 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
2762 (xsl:template match="bison-xml-report"): Instead of styling the
2763 "conflicts" element, style the "automaton" element with mode
2764 "conflicts."
2765 (xsl:template match="conflicts"): Remove.
2766 (xsl:template match="conflict"): Remove.
2767 (xsl:template match="automaton" mode="conflicts"): New.
2768 (xsl:template match="state" mode="conflicts): New.
2769 * src/conflicts.c (conflicts_output_xml): Remove.
2770 * src/conflicts.h (conflicts_output_xml): Remove prototype.
2771 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
2772 * src/print.c (print_grammar): Consistently wrap at the 66th column so
2773 the corresponding XSLT is easier. Also, never wrap between a word and
2774 the comma that follows it.
2775
2776 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2777
2778 Improve C++ namespace support. Discussed starting at
2779 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
2780 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
2781 b4_namespace_close): New macros that interpret the %define variable
2782 "namespace" so its value can contain "::" to indicate nested
2783 namespaces.
2784 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
2785 the above macros.
2786 * data/lalr1.cc (b4_namespace): Likewise.
2787 * data/location.cc (b4_namespace): Likewise.
2788 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
2789 inside a new table in the general %define entry. Document `%define
2790 namespace' there as well. Point the %name-prefix entry to it since it
2791 explains it more completely in the case of C++.
2792 (C++ Bison Interface): Mention `%define namespace' instead of
2793 %name-prefix.
2794 (Table of Symbols): Remove the `%define push_pull' entry. The %define
2795 entry suffices.
2796 * tests/c++.at (Relative namespace references): New test case.
2797 (Absolute namespace references): New test case.
2798 (Syntactically invalid namespace references): New test case.
2799 * tests/input.at (C++ namespace reference errors): New test case.
2800
2801 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2802
2803 Add syncline support and location accessor to internal %define
2804 interfaces.
2805 * data/bison.m4 (b4_percent_define_get_loc): New.
2806 (b4_percent_define_get_syncline): New.
2807 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
2808 (b4_percent_define_default): Record defining location as line 1 rather
2809 than 0 for the sake of synchronizing #line's, and define
2810 b4_percent_define_syncline(VARIABLE).
2811 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
2812 * src/muscle_tab.c (muscle_syncline_grow): New.
2813 (muscle_code_grow): Use muscle_syncline_grow.
2814 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
2815 define b4_percent_define_syncline(VARIABLE).
2816 (muscle_percent_define_get_loc): New.
2817 (muscle_percent_define_get_syncline): New.
2818 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
2819 remove some unused variables.
2820 (muscle_percent_define_default): Record defining location as line 1
2821 rather than 0 for the sake of synchronizing #line's, and define
2822 b4_percent_define_syncline(VARIABLE).
2823 (muscle_percent_define_check_values): Use
2824 muscle_percent_define_get_loc.
2825 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
2826 (muscle_percent_define_get_syncline): Prototype.
2827 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2828 defaults): Update output for location change.
2829 (Complaining during macro argument expansion): Extend to test
2830 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
2831
2832 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
2833
2834 Fix some error-reporting macro bugs.
2835 * data/bison.m4 (b4_cat): New.
2836 (b4_error, b4_error_at): Use b4_cat to send error directives directly
2837 to stdout so they don't become arguments to other macros. Update
2838 comments and add examples.
2839 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
2840 add examples.
2841 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
2842 after printing the error directive so that M4 doesn't report subsequent
2843 problems that are induced by this problem.
2844 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
2845 instead of just in them. Recognize @\n in both places. Both expand to
2846 the empty string. Needed by b4_cat.
2847 * tests/skeletons.at (Complaining during macro argument expansion):
2848 New test case.
2849 (Fatal errors make M4 exit immediately): New test case.
2850
2851 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
2852
2853 Implement --print-datadir.
2854 * src/getargs.c (usage): Mention.
2855 (PRINT_DATADIR_OPTION): New anonymous enum member.
2856 (long_options): Add entry for it.
2857 (getargs): Add case for it calling compute_pkgdatadir.
2858 * src/output.c (output_skeleton): Encapsulate data directory
2859 computation from here...
2860 (prepare): ... and from here...
2861 (compute_pkgdatadir): ... into this new function.
2862 * src/output.h (compute_pkgdatadir): Prototype.
2863
2864 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
2865
2866 * src/print-xml.c (escape_bufs): New static global variable
2867 replacing...
2868 (xml_escape_n): ... the static local variable buf here.
2869 (print_xml): Free memory for escape_bufs.
2870 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
2871
2872 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
2873
2874 Replace `%push-parser' and `%push-pull-parser' with
2875 `%define push_pull "push"' and `%define push_pull "both"'.
2876 `%define push_pull "pull"' is the default.
2877 * doc/bison.texinfo (Push Decl, Push Parser Function,
2878 Pull Parser Function, Parser Create Function, Parser Delete Function):
2879 Update declarations.
2880 (Decl Summary, Table of Symbols): Replace %push-parser and
2881 %push-pull-parser entries with a %define push_pull entry.
2882 * data/bison.m4 (b4_percent_define_check_values): New macro.
2883 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
2884 definitions...
2885 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
2886 definitions...
2887 * data/push.c: ... to here and compute them from the value of the
2888 %define variable push_pull.
2889 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
2890 parsing requests here...
2891 * data/yacc.c: ... hack this to switch to push.c any time
2892 b4_use_push_pull_flag or the %define variable push_pull is set. This
2893 will go away when we mv push.c yacc.c.
2894 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
2895 push parsing is not supported since unused %define variables are
2896 reported anyway.
2897 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
2898 * src/muscle_tab.h (muscle_percent_define_check_values): Update
2899 comments for consistency with b4_percent_define_check_values.
2900 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
2901 muscles.
2902 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
2903 Remove.
2904 (prologue_declaration): Remove %push-parser and %push-pull-parser
2905 rules.
2906 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
2907 * tests/calc.at: Update declarations.
2908 * tests/input.at (%define enum variables): New test case.
2909 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
2910 declaration.
2911 (Push Parsing: Multiple impure instances): Update declaration.
2912 (Push Parsing: Unsupported Skeletons): New test case.
2913 * tests/torture.at (Exploding the Stack Size with Alloca): Update
2914 declaration.
2915 (Exploding the Stack Size with Malloc): Update declaration.
2916
2917 2007-09-24 Wojciech Polak <polak@gnu.org>
2918
2919 Add XSLT transformations.
2920
2921 * data/xslt/xml2dot.xsl: Transform XML into DOT.
2922 * data/xslt/xml2text.xsl: Transform XML into plain text.
2923 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
2924 * data/Makefile.am (xsltdir): New variable.
2925 (dist_xslt_DATA): Add xslt/*.xsl files.
2926
2927 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
2928
2929 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
2930 Problem reported by Wojciech Polak.
2931 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
2932 (xml_printf): Undo change I made on 21 September; that is,
2933 indent 2 spaces, not 1.
2934
2935 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
2936
2937 Pacify ./configure --enable-gcc-warnings.
2938 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
2939 `char const *' instead of `char *'.
2940 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
2941 local variable `sep'.
2942
2943 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2944
2945 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
2946 elsewhere.
2947 * src/print-xml.c: Prefer "const" after types; that's more consistent.
2948 (xml_printf): Indent just 1 space for level.
2949 (e_char, xlate_char): Remove.
2950 (xml_escape_string): Rewrite to avoid undefined behavior (used
2951 storage that was freed from the stack).
2952 (xml_escape_n): Don't bother checking for subscript error.
2953
2954 2007-09-21 Wojciech Polak <polak@gnu.org>
2955
2956 Add Bison XML Automaton Report.
2957
2958 Add support for an -x option to generate an XML report.
2959 It is not documented yet.
2960 * src/print-xml.c: New file.
2961 * src/print-xml.h: Likewise.
2962 * lib/timevar.def (TV_XML): New var.
2963 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
2964 * src/conflicts.c: Include print-xml.h.
2965 (solved_conflicts_xml_obstack): New var.
2966 (log_resolution, conflicts_solve, conflicts_free):
2967 Add support for XML report.
2968 (conflicts_output_val): New function.
2969 * src/conflicts.h (conflicts_output_val): New decl.
2970 * src/files.c (spec_xml_file): New var.
2971 (compute_output_file_names, output_file_names_free): Add XML support.
2972 * src/files.h (spec_xml_file): New decl.
2973 * src/getargs.c (xml_flag): New var.
2974 (usage, short_options, long_options, getargs): Add XML support.
2975 * src/getargs.h (xml_flag): New decl.
2976 * src/gram.c: Include print-xml.h.
2977 (rule_lhs_print_xml, rule_rhs_print_xml):
2978 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
2979 New functions.
2980 * src/gram.h: Declare external ones.
2981 * src/main.c: Include print-xml.h.
2982 (main): Add XML support.
2983 * src/reduce.c: Include print-xml.h.
2984 (reduce_xml): New function.
2985 * src/reduce.h: Declare it.
2986 * src/state.c: Include print-xml.h.
2987 (state_new): Add XML support.
2988 (state_rule_lookahead_tokens_print_xml): New function.
2989 * src/state.h: Declare it.
2990 (struct state): New member solved_conflicts_xml.
2991 * src/symtab.c (symbol_class_get_string): New function.
2992 * src/symtab.h: Declare it.
2993
2994 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2995
2996 * GNUmakefile: Switch to coreutils's version.
2997 * bootstrap: Likewise.
2998 * Makefile.cfg: Adjust to new GNUmakefile.
2999 * README-hacking: Likewise.
3000
3001 Import from gnulib:
3002
3003 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3004 Bruno Haible <bruno@clisp.org>
3005
3006 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3007 and is a script that invokes bison. Tighten the code. Add comments.
3008
3009 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3010
3011 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3012 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3013 * doc/bison.texinfo (Decl Summary): Fix.
3014 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3015 * tests/input.at (Boolean %define variables): Update output.
3016 * tests/skeletons.at (%define boolean variables: invalid skeleton
3017 defaults): Rename to...
3018 (%define Boolean variables: invalid skeleton defaults): ... this and
3019 update output.
3020
3021 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3022
3023 In impure push mode, don't allow more than one yypstate to be allocated
3024 since multiple impure parsers would corrupt yynerrs.
3025 * data/push.c (yypstate_allocated): New static global variable
3026 initialized to 0.
3027 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3028 exhaustion if yypstate_allocated is 1, but still return 2.
3029 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3030 already 1. Otherwise, set it to 1.
3031 (yypstate_delete): Set it to 0.
3032 * tests/push.at (Push Parsing: Multiple impure instances): New test
3033 case.
3034
3035 2007-08-17 Bob Rossi <bob@brasko.net>
3036
3037 * doc/bison.texinfo (Push Decl): Document the push parser.
3038 (Table of Symbols): Ditto.
3039 (Pure Decl): Ditto.
3040 (Decl Summary): Ditto.
3041 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3042 Parser Create Function, Parser Delete Function):
3043 Add new push parser symbols.
3044 (Table of Symbols): Document push-parser, push-pull-parser,
3045 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3046
3047 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3048
3049 Update to GPLv3.
3050 * doc/gpl-3.0.texi: New file.
3051 * doc/gpl.texi: Remove.
3052 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3053 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3054 * README-hacking, TODO, bootstrap, bootstrap.conf:
3055 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3056 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3057 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3058 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3059 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3060 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3061 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3062 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3063 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3064 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3065 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3066 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3067 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3068 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3069 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3070 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3071 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3072 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3073 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3074 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3075 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3076 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3077 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3078 * src/complain.c, src/complain.h, src/conflicts.c:
3079 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3080 * src/files.h, src/flex-scanner.h, src/getargs.c:
3081 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3082 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3083 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3084 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3085 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3086 * src/print.c, src/print.h, src/print_graph.c:
3087 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3088 * src/reduce.h, src/relation.c, src/relation.h:
3089 * src/revision.h, src/scan-code.h, src/scan-code.l:
3090 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3091 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3092 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3093 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3094 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3095 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3096 * tests/existing.at, tests/glr-regression.at:
3097 * tests/headers.at, tests/input.at, tests/java.at:
3098 * tests/local.at, tests/output.at, tests/push.at:
3099 * tests/reduce.at, tests/regression.at, tests/sets.at:
3100 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3101 * tests/torture.at:
3102 Update to GPLv3.
3103
3104 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3105
3106 Get rid of broken %no-parser, -n, and --no-parser implementation and
3107 documentation.
3108 * TODO: Don't mention them.
3109 * doc/bison.1: Likewise.
3110 * doc/bison.texinfo (Decl Summary): Likewise.
3111 (Bison Options): Likewise.
3112 (Option Cross Key): Likewise.
3113 * src/getargs.c (no_parser_flag): Remove global variable.
3114 (usage): Don't print description of -n and --no-parser.
3115 (long_options): Remove --no-parser entry here.
3116 (getargs): Remove -n case in the switch here.
3117 * src/getargs.h (no_parser_flag): Remove extern.
3118 * tests/regression.at (Web2c Actions): Remove comment that mentions
3119 --no-parser.
3120
3121 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3122
3123 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3124 name user variables starting with `yy'. Just pass NULL instead of a
3125 dummy local &yylval to yypush_parse.
3126 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3127 starting with `yy'.
3128
3129 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3130
3131 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3132 true since it's then always used regardless of whether yyoverflow is
3133 defined. Reported by Christian Burger at
3134 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3135 * THANKS: Add Christian Burger.
3136
3137 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3138 node names: say "Decl Summary" not "Bison Declaration Summary".
3139
3140 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3141
3142 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3143 determine whether this function has already complained about an invalid
3144 value for a %define boolean variable, don't check whether Bison has
3145 ever examined the value. As written, the check was a tautology.
3146 Instead, record and check for this complaint using a separate muscle.
3147
3148 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3149
3150 Fix push parsing memory leak reported by Brandon Lucia at
3151 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3152 * THANKS: Add Brandon Lucia.
3153 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3154 but the parse never completed and thus freed it.
3155 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3156 * tests/testsuite.at: Include push.at.
3157 * test/push.at: New.
3158 (Push Parsing: Memory Leak for Early Deletion): New test case.
3159
3160 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3161
3162 Improve handling of multiple S/R conflicts in the same state and of S/R
3163 conflicts involving multiple reductions.
3164 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3165 set for a state here or Bison will abort if it is reassigned on a
3166 later conflicted reduction in the same state.
3167 Similarly, don't finalize and assign the solved conflicts report here
3168 or it will be lost if it is reassigned on a later conflicted reduction
3169 in the same state.
3170 (set_conflicts): Instead, assign them both here after all S/R conflicts
3171 in the state have been fully examined.
3172 * src/print.c (shift_set): Rename to...
3173 (no_reduce_set): ... this.
3174 (print_reductions): Update for rename, and add %nonassoc error action
3175 tokens to no_reduce_set so that, when printing the first remaining
3176 reduction on an error action token, the reduction is enclosed in
3177 brackets.
3178 (print_results): Update for rename.
3179 * tests/conflicts.at (Solved conflicts report for multiple reductions
3180 in a state): New test case.
3181 (%nonassoc error actions for multiple reductions in a state): New test
3182 case.
3183
3184 * src/main.c (main): Don't depend on C99 features.
3185
3186 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3187
3188 * build-aux/.cvsignore: Add compile.
3189 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3190 uniwidth.
3191
3192 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3193
3194 * bootstrap (slurp): Create target directories that don't exist.
3195 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3196
3197 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3198
3199 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3200 than item number.
3201 * closure.c (closure): Likewise.
3202 * state.h (reductions): Comment sorting of rules.
3203 (state): Comment sorting of items.
3204
3205 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3206
3207 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3208 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3209 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3210 definition in order to avoid Gnulib headers since we don't use config.h
3211 here.
3212 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3213 rather than AT_DATA so that config.h is included.
3214
3215 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3216
3217 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3218 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3219 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3220 and so that YYFPRINTF is guaranteed to be defined here.
3221
3222 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3223
3224 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3225 with...
3226 (muscle_percent_define_check_values): ... this more helpful function.
3227 Again, it's not used yet, but it will be.
3228 * src/muscle_tab.h: Likewise.
3229
3230 Improve some comments in parser table construction.
3231 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3232 (generate_states): Don't mention ruleset, which is internal to closure.
3233 * src/closure.c (closure): Explain sorting of core and itemset, which
3234 is required for this function to behave correctly.
3235 * src/closure.h (closure): Mention sorting.
3236
3237 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3238
3239 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3240 move the check for disabled transitions to an aver since conflict
3241 resolution hasn't happened yet.
3242
3243 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3244 labels a state as inconsistent just because it has error transitions.
3245 The original form of this check appeared in revision 1.1 of lalr.c,
3246 which was committed on 1991-12-21. Now (at least), changing the
3247 consistency label on such a state appears to have no useful effect in
3248 any of the places it is examined, which I enumerate below. The key
3249 point to understanding each item in this enumeration is that a state
3250 with an error transition is labelled consistent in the first place only
3251 if it has no rules, so the check cannot matter for states that have
3252 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3253 to try to identify its conflicts, and a state must have *rules* to have
3254 conflicts. (2) Labelling a state as inconsistent will affect how
3255 action_row sets the default *rule* for the state. (3) Labelling a
3256 state as inconsistent will cause build_relations to add lookback edges
3257 to *rules* in that state.
3258 * src/state.h (struct state): Word the comment for member consistent
3259 more carefully.
3260
3261 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3262
3263 Don't depend on C99 features.
3264 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3265 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3266 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3267 * src/state.c (state_mark_reachable_states): Fix for-loop.
3268 (state_remove_unreachable_states): Fix for-loop.
3269
3270 Don't widen struct state with member reachable just to temporarily
3271 record reachability. Instead, use a local bitset.
3272 * src/state.h (struct state): Remove member.
3273 * src/state.c (state_new): Don't initialize it.
3274 (state_mark_reachable_states): Rename to...
3275 (state_record_reachable_states): ... this, and use bitset.
3276 (state_remove_unreachable_states): Use bitset.
3277
3278 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3279
3280 * src/Makefile.am (yacc): Quote target action commands properly so
3281 that the yacc script isn't corrupt. Reported by Hans Aberg at
3282 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3283
3284 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3285 the case of pure parsers. Reported by Frans Englich at
3286 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3287 * THANKS: Add Frans Englich.
3288
3289 * NEWS (2.3a+): In the %code entry, reference section `Bison
3290 Declaration Summary' from the manual now since the %code summary has
3291 moved there.
3292 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3293 in the rules section must be terminated by semicolons.
3294
3295 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3296
3297 Extend the front-end API for %define variables to more completely
3298 mirror the back-end. This will be useful in the future.
3299 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3300 Update comments to mention the new front-end counterparts of these
3301 macros.
3302 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3303 for muscle_string_decode and muscle_location_decode.
3304 (muscle_string_decode): New static function.
3305 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3306 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3307 functions.
3308 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3309 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3310 implementation more closely.
3311 (muscle_percent_define_invalid_value): New function.
3312 * src/muscle_tab.h (muscle_percent_define_get,
3313 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3314 Prototype.
3315
3316 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3317
3318 * NEWS (2.3a+): Mention yesterday's state-removal change.
3319 (2.3a): Remove the %language entry, which was added after 2.3a.
3320 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3321 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3322 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3323 tests/existing.at: Update copyright date.
3324
3325 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3326
3327 If conflict resolution makes states unreachable, remove those states,
3328 report rules that are then unused, and don't report conflicts in those
3329 states.
3330 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3331 New global function.
3332 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3333 function.
3334 * src/main.c (main): After conflict resolution, remove the unreachable
3335 states and update all data structures that reference states by number.
3336 * src/state.c (state_new): Initialize each state's reachable member to
3337 false.
3338 (state_mark_reachable_states): New static function.
3339 (state_remove_unreachable_states): New global function.
3340 * src/state.h (struct state): Add member bool reachable.
3341 (state_remove_unreachable_states): Prototype.
3342 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3343 New test case.
3344 * tests/existing.at (GNU pic Grammar): Update test case output now that
3345 an unused rule is discovered.
3346
3347 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3348
3349 Minor code cleanup in parser table construction.
3350 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3351 (new_itemsets, save_reductions): Update for rename to nitemset.
3352 * src/closure.c (nritemset): Rename to...
3353 (nitemset): ... this since the "r" appears to meaningless and isn't
3354 used in the comments.
3355 (closure): Update for rename.
3356 * src/closure.h (nritemset): Update extern to...
3357 (nitemset): ... this.
3358 * src/lalr.c (LA): Fix a typo in comments.
3359 * src/print.c (print_core): Update for rename to nitemset.
3360 * src/print_graph.c (print_graph): Likewise.
3361 * src/state.h: Fix some typos in header comments.
3362
3363 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3364
3365 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3366 still sticks to ASCII. Sorry!
3367
3368 * README-hacking: New file, taken mostly from coreutils, with changes
3369 for Bison. Contains much of the contents of:
3370 * README-cvs: Remove.
3371 * bootstrap: Sync from gnulib.
3372 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3373 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3374
3375 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3376
3377 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3378 Setzer.
3379 (Java Differences): Fix some typos.
3380 * THANKS: Add Sebastian Setzer.
3381
3382 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
3383
3384 * data/java.m4 (b4_single_class_if): Remove.
3385 (b4_abstract_if): Look at "%define abstract".
3386 (b4_lexer_if): New.
3387 (b4_union_name): Rename...
3388 (b4_yystype): ... to this. Map to "%define stype".
3389 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3390 b4_maybe_throws): Fix quoting.
3391 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3392 * data/lalr1.java (Lexer interface): Always define.
3393 (Lexer interface within parser class): Remove.
3394 (YYLexer class): New, used when "%code lexer" is present.
3395 (constructor): When "%code lexer" is used, pass %lex-param
3396 to the lexer constructor.
3397 (yylex, yyparse): Remove %lex-param from method invocations
3398 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3399
3400 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3401 abstract". Rename "%define union_name" to "%define stype".
3402 Rename method names according to previous patch.
3403 (Java Scanner Interface): Describe "%code lexer" instead of
3404 "%pure-parser" and "%define single_class".
3405 (Java Differences): Mention "%code lexer".
3406
3407 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3408 Include scanner here, using macros from tests/local.at.
3409 (AT_DATA_CALC_Y): Remove final argument.
3410 (_AT_CHECK_JAVA_CALC): Likewise.
3411 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3412 of %locations and %error-verbose.
3413 (main): Test with and without %lex-param.
3414 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3415 (AT_BISON_OPTION_POPDEFS): Pop it.
3416
3417 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3418
3419 DJGPP spefic issue. Inhibit the use of disallowed characters for
3420 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3421 and concern testsuite case 46.
3422 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3423 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3424 * djgpp/config.bat: Inhibit the use of disallowed characters.
3425
3426 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3427
3428 Miscellaneous %define and %code cleanup.
3429 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3430 values are interpreted.
3431 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3432 documentation a little more.
3433 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3434 muscle_percent_define_insert, muscle_percent_code_grow): New
3435 functions/macros.
3436 * src/muscle_tab.h (muscle_percent_define_insert,
3437 muscle_percent_code_grow): Prototype.
3438 * src/parse-gram.y (prologue_declaration): Use
3439 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3440 %define and %code directives.
3441
3442 Make it easy to share %define boolean variables between the front-end
3443 and back-end. Though not used yet, this will be useful in the future.
3444 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3445 Bison uses of names rather than just skeleton uses of names.
3446 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3447 b4_percent_define_skeleton_variables(VARIABLE) to
3448 b4_percent_define_bison_variables(VARIABLE).
3449 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3450 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3451 b4_percent_code_bison_qualifiers(QUALIFIER).
3452 (b4_check_user_names_wrap): Update for renames.
3453 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3454 muscle_percent_define_default): New functions mimicking
3455 b4_percent_define_flag_if and b4_percent_define_default.
3456
3457 For %define variables, report locations for invalid values and
3458 redefinitions.
3459 * data/bison.m4 (b4_percent_define_flag_if): Read
3460 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3461 value for VARIABLE.
3462 (b4_percent_define_default): Save a special location in
3463 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3464 must later be reported as invalid.
3465 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3466 functions.
3467 (muscle_percent_define_insert): Record the location of VARIABLE in
3468 muscle percent_define_loc(VARIABLE), and use it to report the previous
3469 location for a redefinition.
3470 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3471 (muscle_percent_define_default): Update like b4_percent_define_default.
3472 (muscle_grow_user_name_list): Rename to...
3473 (muscle_user_name_list_grow): ... this for consistency and use
3474 muscle_location_grow.
3475 * src/muscle_tab.h (muscle_location_grow): Prototype.
3476 * tests/input.at (%define errors): Update expected output.
3477 * tests/skeletons.at (%define boolean variables: invalid skeleton
3478 defaults): New test case.
3479
3480 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3481
3482 * src/print.c (lookahead_set, state_default_rule): Remove.
3483 (print_reductions): Replace state_default_rule invocation with
3484 equivalent use of yydefact, which was computed in token_actions in
3485 tables.c.
3486 (print_results): Don't allocate lookahead_set.
3487
3488 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
3489
3490 * data/lalr1.java: Prefix all private members with yy.
3491
3492 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3493
3494 Use YYFPRINTF instead of fprintf where appropriate. Reported by
3495 Sebastien Fricker at
3496 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
3497 * THANKS: Add Sebastien Fricker.
3498 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3499 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3500 accept a variable number of arguments.
3501
3502 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3503
3504 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3505
3506 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3507
3508 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3509 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3510 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3511
3512 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3513
3514 Undo my 2007-02-07 change, switching back to the c-strcase module
3515 introduced in the 2007-02-03 change. Bruno Haible reported that
3516 the 2007-02-07 change would be dangerous in Turkish if we add a
3517 language whose name contains "i", since "i" is not lowercase "I"
3518 in Turkish.
3519 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3520 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3521 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3522 * m4/.cvsignore: Remove strcase.m4.
3523 * src/getargs.c: Revert 2007-02-07 change, as follows.
3524 Include c-strcase.h.
3525 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3526
3527 2007-02-11 Bruno Haible <bruno@clisp.org>
3528
3529 Enable the Java related testsuite tests when the only Java compiler
3530 found is a gcj < 4.3. Discussed at
3531 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3532 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3533
3534 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3535
3536 * data/Makefile.am: Update copyright date.
3537 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3538 yypstate_new returns NULL.
3539 (yypstate_new): Return NULL if malloc does.
3540 * src/reader.c (packgram): Move translation of rule actions from the
3541 beginning of packgram to...
3542 (check_and_convert_grammar): ... here right before packgram is invoked
3543 so it's easier to write more complete comments, and remove redundant
3544 code.
3545
3546 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3547
3548 As in semantic actions, make @$ in %initial-action, %destructor, and
3549 %printer imply %locations.
3550 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3551 scanning @$.
3552 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3553 (@$ in %initial-action implies %locations,
3554 @$ in %destructor implies %locations,
3555 @$ in %printer implies %locations): ... these new test cases.
3556
3557 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3558
3559 Undo most of the 2007-02-03 change, switching to the strcase module
3560 now that gnulib strcase has been fixed.
3561 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3562 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3563 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3564 * m4/.cvsignore: Add strcase.m4.
3565 * src/getargs.c: Revert 2007-02-03 change, as follows.
3566 Don't include c-strcase.h.
3567 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3568 strcasecmp has "unspecified behavior" outside the POSIX locale,
3569 but it works fine in practice if at least one argument is ASCII,
3570 as is the case in Bison.
3571
3572 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
3573
3574 * tests/java.at: Skip tests if only one of javac/java is present.
3575 Reported by Joel E. Denny.
3576 * tests/atlocal.in: Adjust copyright years.
3577
3578 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3579
3580 * data/lalr1.java (Stack): Work around old verifiers that disallow
3581 access to the private fields of an inner class, from the outer class.
3582 We can make Stack's fields public because user code doesn't have access
3583 to the instance of Stack used by parse(). Reported by Paul Eggert.
3584
3585 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3586
3587 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3588 the right spot for these files?
3589 * bootstrap.conf (gnulib_modules): Add c-strcase.
3590 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3591 c-strncasecmp.c.
3592 * src/getargs.c: Include c-strcase.h.
3593 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3594 to avoid unspecified behavior.
3595
3596 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3597
3598 * doc/bison.texinfo (Decl Summary): Correct typo.
3599
3600 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
3601
3602 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3603 Complain if the value does not match empty, "true" or "false".
3604 * data/c++.m4: Adjust default definitions of %define variables.
3605 * data/java.m4: Adjust default definitions of %define variables.
3606 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
3607 to above behavior.
3608 * tests/input.at (Boolean %define variables): Test new behavior.
3609
3610 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
3611
3612 * NEWS: Mention java.
3613 * TODO: Remove things that are done.
3614 * bootstrap.conf: Add javacomp-script and javaexec-script.
3615 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
3616
3617 * data/Makefile.am: Add new files.
3618 * data/java-skel.m4: New.
3619 * data/java.m4: New.
3620 * data/lalr1.java: New.
3621
3622 * doc/bison.texinfo: Put "A Complete C++ Example" under
3623 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
3624 under Other Languages.
3625
3626 * src/getargs.c (valid_languages): Add Java.
3627 * src/getargs.h (struct bison_language): Update size of string fields.
3628
3629 * tests/Makefile.am: Add java.at.
3630 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
3631 * tests/java.at: New.
3632 * tests/testsuite.at: Include it.
3633
3634 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
3635
3636 Clean up.
3637 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
3638 at_directive_argv arguments so these no longer have to be global
3639 variables. Also, update the implementation for the following changes.
3640 (fail_for_at_directive_too_many_args,
3641 fail_for_at_directive_too_few_args): Add at_directive_name argument.
3642 (at_directive_name): Remove as at_directive_argv[0] will be used for
3643 this now.
3644 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
3645 for the directive name.
3646 (at_directive_argc, at_directive_argv): Make these local within
3647 skel_lex instead of global.
3648 (INITIAL): Update directive start action for above changes.
3649 (SC_AT_DIRECTIVE_ARG): Rename to...
3650 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
3651 (SC_AT_DIRECTIVE_SKIP_WS): Update.
3652 (scan_skel): Move yylex_destroy to...
3653 (skel_scanner_free): ... here.
3654 * tests/skeletons.at (installed skeleton file name): Rename to...
3655 (installed skeleton file names): ... this.
3656
3657 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
3658
3659 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3660 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
3661 Summary" not "Directives".
3662 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
3663 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
3664 since the former is now the more complete one.
3665 (Prologue Alternatives): Likewise and do the same for %defines.
3666 (Table of Symbols): Add summary of %code, add summary of %define, and
3667 move full %code documentation to...
3668 (Decl Summary): ... here for consistency with other entries in these
3669 sections.
3670 Move %define entry in order to keep this list alphabetized.
3671 Reword %define entry a little to put less emphasis on the skeleton
3672 concept, which most users shouldn't have to think about.
3673
3674 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3675
3676 Adjust to recent gnulib changes.
3677 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
3678 Add string.h, string_.h, unistd_.h, wchar_.h.
3679 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
3680 * src/system.h: Don't include <stpcpy.h>; this is now done by
3681 <string.h>.
3682
3683 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
3684
3685 Simplify implementation of unqualified %code, implement macros for
3686 uniform treatment of boolean %define flags. Document %define.
3687 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
3688 b4_percent_code_ifdef): New.
3689 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
3690 * data/c++.m4: Define default value for global_tokens_and_yystype.
3691 * data/glr.cc: Likewise.
3692 * data/location.cc: Use b4_percent_define_flag_if.
3693
3694 * doc/bison.texinfo (Decl Summary): Document %define.
3695
3696 * src/parse-gram.y (Unqualified %code): Change muscle name to
3697 b4_percent_code().
3698 (content.opt): Default to empty.
3699
3700 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3701
3702 Implement support for relative and absolute skeleton file names.
3703 Discussed starting at
3704 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
3705 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
3706 (Bison Options): Document in --skeleton entry.
3707 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
3708 full_skeleton can't necessarily hold all of pkgdatadir.
3709 If the specified skeleton file name contains a `/', don't prepend
3710 pkgdatadir.
3711 * src/parse-gram.y (prologue_declaration): If the specified skeleton
3712 file name contains a `/', prepend the grammar file directory.
3713 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
3714 * skeletons.at: New file.
3715 (relative skeleton file names): New test case.
3716 (installed skeleton file names): New test case.
3717 * tests/testsuite.at: Include skeletons.at.
3718
3719 * bootstrap: Update copyright to 2007.
3720
3721 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
3722
3723 * bootstrap: Remove occurrences of .#bootmp from the files.
3724
3725 2007-01-17 Akim Demaille <akim@epita.fr>
3726
3727 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
3728 nonterminals.
3729 Use per-type %printer.
3730
3731 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3732
3733 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
3734 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3735 djgpp/config.site, src/files.c, src/files.h, src/main.c,
3736 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
3737 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
3738 tests/glr-regression.at, tests/input.at, tests/local.at,
3739 tests/output.at, tests/torture.at: Update copyright to 2007.
3740
3741 2007-01-16 Akim Demaille <akim@epita.fr>
3742
3743 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
3744 error code.
3745 (Calc++ Scanner): Exit with failure if we can't open the input
3746 file.
3747 Accept "-" standing for stdin.
3748 (Calc++ Top Level): Print the result only if the parsing was
3749 successful.
3750
3751 2007-01-16 Akim Demaille <akim@epita.fr>
3752
3753 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
3754
3755 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
3756 and Joel E. Denny <jdenny@ces.clemson.edu>
3757
3758 Clean up %define and %code implementation in M4 some. Most
3759 importantly, rename all related macros to be in the b4_percent_define
3760 and b4_percent_code namespaces. Also, complete support for `.' in
3761 %define variable names and %code qualifiers.
3762 * data/bison.m4 (b4_check_user_names): Check for special
3763 "SKELETON-NAMESPACE(name)" macros instead of using two nested
3764 m4_foreach loops.
3765 (b4_get_percent_define, b4_get_percent_code): Rename to...
3766 (b4_percent_define_get, b4_percent_code_get): ... these.
3767 Extend documentation with examples.
3768 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
3769 b4_percent_define_skeleton_variables and
3770 b4_percent_code_skeleton_qualifiers.
3771 Expect any value for the %define variable `foo' to be stored in the
3772 macro named `b4_percent_define(foo)'; expect any %code blocks for the
3773 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
3774 expect any unqualified %code blocks to be stored in a macro named
3775 `b4_percent_code_unqualified'.
3776 Use m4_indir so that %define variable names and %code qualifiers can
3777 contain `.', which is allowed by the grammar parser.
3778 (b4_percent_define_default): New macro to set a default value for a
3779 %define variable.
3780 (m4_wrap): Update wrapped code, and fix some underquoting.
3781 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
3782 Expect grammar uses of %define variables and %code qualifiers to be
3783 defined in b4_percent_define_user_variables and
3784 b4_percent_code_user_qualifiers.
3785 * data/c++.m4: Use b4_percent_define_default rather than
3786 m4_define_default. Fix some underquoting. Skeleton usage of %define
3787 variable define_location_comparison now implies skeleton usage of
3788 %define variable filename_type.
3789 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3790 data/push.c, data/yacc.c: Update macro names.
3791 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
3792 muscle names.
3793
3794 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3795
3796 DJGPP specific issues.
3797
3798 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
3799 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
3800
3801 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3802
3803 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
3804 run parsers in all tests so that Valgrind is invoked during
3805 maintainer-check-valgrind.
3806 (Duplicate representation of merged trees): Free all semantic values.
3807 (Duplicated user destructor for lookahead): Likewise.
3808
3809 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3810
3811 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
3812 command-line prefix.
3813 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
3814 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
3815 miss Valgrind messages.
3816 (Exploding the Stack Size with Malloc): Likewise.
3817
3818 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3819
3820 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
3821 locals. Reported by Juan Manuel Guerrero at
3822 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
3823 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
3824 Fix some indentation also.
3825 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
3826 explaining this issue.
3827
3828 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
3829 and Joel E. Denny <jdenny@ces.clemson.edu>
3830
3831 Simplify union and prologue handling, and escape union and lex/parse
3832 params with digraphs.
3833 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
3834 values to the empty string since these are no longer guaranteed
3835 initialized by the front-end.
3836 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
3837 braces around b4_user_stype since this is no longer done by the
3838 front-end.
3839 * src/files.c, src/files.h (pre_prologue_obstack,
3840 post_prologue_obstack): Remove.
3841 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
3842 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
3843 with digraphs. This fixes lex params and parse params.
3844 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
3845 * src/output.c (prepare): Remove muscle insertion of the prologues.
3846 (output): Remove freeing of pre_prologue_obstack and
3847 post_prologue_obstack.
3848 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
3849 than prologue_augment for prologue parsing so you don't need prologue
3850 obstacks.
3851 (grammar_declaration): For %union RHS, use `braceless' instead of
3852 "{...}" so that braces are already stripped and code is escaped with
3853 digraphs.
3854 * src/reader.c (prologue_augment): Remove.
3855 (reader): Remove initialization of pre_prologue_obstack and
3856 post_prologue_obstack.
3857 * src/reader.h (prologue_augment): Remove.
3858
3859 * data/c.m4: Remove stray parenthesis.
3860
3861 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3862
3863 Remove quotes from variables names in %define directives and from
3864 qualifiers in %code directives, and restrict the characters that are
3865 allowed in them to M4-friendly ones. For %define, continue to support
3866 the quoted form as a deprecated feature. Discussed starting at
3867 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
3868 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
3869 %code.
3870 * doc/bison.texinfo (Prologue Alternatives): Update.
3871 (Decl Summary): In %defines entry, update mention of `%code requires'
3872 and `%code provides'.
3873 (C++ Location Values): Update %define uses.
3874 (Calc++ Parser Interface): Likewise.
3875 (Calc++ Parser): Likewise, and update `%code requires' uses.
3876 (Table of Symbols): Update %code documentation.
3877 * src/parse-gram.y (prologue_declaration): For %define variables, use
3878 `variable' instead of `STRING'.
3879 (grammar_declaration): For %code qualifiers, use `ID' instead of
3880 `STRING'.
3881 (variable): New nonterminal that takes an `ID' or a `STRING'.
3882 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
3883 and %define uses.
3884 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
3885 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
3886 (%define errors): Update %define uses.
3887
3888 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3889
3890 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
3891 instead of muscle_insert for %define values so that M4-special
3892 characters are replaced with digraphs.
3893 * tests/input.at (%define errors): Extend to check weird values.
3894
3895 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3896
3897 Instead of having skeletons declare all valid %define variables and
3898 %code qualifiers, provide macros that retrieve the associated values
3899 and build these lists automatically. Thus Bison will now warn when a
3900 variable or qualifier is not used by the skeleton in the current
3901 invocation regardless of whether it might sometimes be used by that
3902 skeleton in other invocations. Also, move all %define value macros to
3903 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
3904 form, which is replaced by %code.
3905 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
3906 (b4_check_user_names): ... this, and change the series of valid name
3907 arguments to a single list argument for names used in the skeleton
3908 similar to the existing list argument for names used in the grammar.
3909 Warn instead of complaining.
3910 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
3911 values and %code code, to format %code code properly, and to build
3912 lists of all %define variables and %code qualifiers used in the
3913 skeleton: b4_skeleton_percent_define_variables and
3914 b4_skeleton_percent_code_qualifiers.
3915 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
3916 Remove, and...
3917 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
3918 the skeleton names lists can finish building first. In place of
3919 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
3920 expect the lists b4_user_percent_define_variables and
3921 b4_user_percent_code_qualifiers.
3922 * data/c++.m4: Where setting default values for b4_parser_class_name,
3923 b4_location_type, b4_filename_type, b4_namespace, and
3924 b4_define_location_comparison, update their names to the
3925 b4_percent_define_ namespace.
3926 * data/glr.c: Don't use b4_check_percent_define_variables and
3927 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3928 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
3929 (b4_parser_class_name, b4_namespace): Define these using
3930 b4_get_percent_define for parser_class_name and namespace.
3931 * data/location.cc: Use b4_get_percent_define.
3932 * data/push.c: Don't use b4_check_percent_define_variables and
3933 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3934 * data/yacc.c: Likewise, and don't call m4_exit in
3935 b4_use_push_for_pull_if or m4_wrap code will never execute.
3936 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
3937 Rename to...
3938 (muscle_grow_user_name_list): ... this for consistency with the
3939 terminology used in bison.m4.
3940 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
3941 %define variable names, and rename muscle used_percent_define_variables
3942 to user_percent_define_variables.
3943 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
3944 user_percent_code_qualifiers.
3945 (content): Remove.
3946 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
3947 {CODE} form is no longer accepted.
3948 * tests/input.at (Reject bad %code qualifiers): Rename to...
3949 (Reject unused %code qualifiers): ... this, and update test output.
3950 (%define error): Update test output.
3951
3952 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
3953
3954 Check for unrecognized %define variables similar to checking for
3955 unrecognized %code qualifiers. Check for redefined %define variables.
3956 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
3957 generalizes...
3958 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
3959 (b4_check_percent_define_variables): New, also wraps it.
3960 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
3961 variables using b4_check_percent_define_variables.
3962 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
3963 all those exercised in the test suite and all those listed in the
3964 `Default values' section of c++.m4. Are there others?
3965 * data/push.c, data/yacc.c: Declare no valid %define variables.
3966 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
3967 similar to muscle_find, but it works even when the muscle stores a
3968 const value.
3969 (muscle_grow_used_name_list): New function for constructing the used
3970 name list muscles that b4_check_for_unrecognized_names requires.
3971 * src/parse-gram.y (prologue_declaration): Warn if a variable is
3972 %define'd more than once. Define the b4_used_percent_define_variables
3973 muscle with muscle_grow_used_name_list.
3974 (grammar_declaration): Abbreviate %code code with
3975 muscle_grow_used_name_list.
3976 * tests/input.at (%define errors): New.
3977
3978 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3979
3980 Provide warn_at, complain_at, and fatal_at function callbacks to the
3981 skeletons, and use this for %code qualifier complaints.
3982 * data/bison.m4 (b4_error_at): New, invoked by...
3983 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
3984 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
3985 @fatal_at(...@) directives.
3986 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
3987 qualifiers in b4_used_percent_code_qualifiers and to use
3988 b4_complain_at.
3989 * src/location.c, src/location.h (boundary_set_from_string): New global
3990 function.
3991 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
3992 function.
3993 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
3994 to b4_used_percent_code_qualifiers.
3995 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
3996 function.
3997 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
3998 (lineno): Rename to...
3999 (out_lineno): ... this so I don't misunderstand it again.
4000 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4001 here; these newlines are in the input but not the output file.
4002 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4003 (at_directive_perform): ... this new static function, and add handling
4004 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4005 directives.
4006 * tests/input.at (Reject bad %code qualifiers): Update test output with
4007 locations and extend.
4008
4009 * tests/output.at (Output file name: [, Output file name: ]): Remove
4010 bogus comment about these tests failing.
4011
4012 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4013
4014 Clean up b4_check_percent_code_qualifiers a little.
4015 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4016 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4017 documentation and add examples.
4018 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4019 qualifiers here.
4020
4021 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4022
4023 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4024 unreliable -- especially when they're hidden inside another macro.
4025 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4026 data/c.m4: Remove m4_divert(-1).
4027 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4028 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4029 m4_divert_push(0) and m4_divert_pop(0).
4030 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4031 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4032 pushed and popped by m4sugar, should be first on the stack.
4033
4034 Provide warn, complain, and fatal function callbacks to the skeletons.
4035 This provides more flexibility than m4_fatal, improves the error
4036 message format, and captures messages for translation. Discussed
4037 starting at
4038 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4039 * data/bison.m4 (b4_error): New, invoked by...
4040 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4041 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4042 directives. Because these M4 macros might be called when the current
4043 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4044 the previous removal of uses of m4_divert, which caused trouble.
4045 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4046 m4_fatal to report unrecognized %code qualifiers.
4047 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4048 push parser requests.
4049 * data/glr.c: Use b4_complain instead of m4_fatal to report
4050 non-deterministic push parser requests.
4051 Update @output usage to @output(...@) form.
4052 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4053 report missing %defines. Update @output usage to @output(...@) form.
4054 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4055 @output(...@) form.
4056 * src/main.c (main): Invoke skel_scanner_free.
4057 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4058 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4059 obstack_for_string from flex-scanner.h.
4060 (YY_DECL): Use to declare skel_lex static.
4061 (decode_at_digraphs): Remove; now handled in the new
4062 SC_AT_DIRECTIVE_ARG start condition.
4063 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4064 functions.
4065 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4066 at_directive_argv): New static globals.
4067 (INITIAL): Use fail_for_invalid_at.
4068 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4069 recognize the start of a generalized `@directive(...@)' form and
4070 start...
4071 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4072 directive args (using the new obstack_for_string), to decode the
4073 contained @ diagraphs, and to perform the directive. It recognizes
4074 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4075 @output(...@).
4076 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4077 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4078 `@,'.
4079 (scan_skel): Initialize obstack_for_string on the first call.
4080 (skel_scanner_free): New function to free obstack_for_string.
4081 * tests/input.at (Reject bad %code qualifiers): Update test output.
4082
4083 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4084
4085 Consolidate the 4 prologue alternative directives (%code, %requires,
4086 %provides, and %code-top) into a single %code directive with an
4087 optional qualifier field. Discussed at
4088 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4089 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4090 alternatives.
4091 * doc/bison.texinfo (Prologue Alternatives): Update.
4092 (Decl Summary): Update to %code "requires" and %code "provides".
4093 (Calc++ Parser): Update to %code "requires".
4094 (Table of Symbols): Remove entries for %requires, %provides, and
4095 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4096 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4097 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4098 which are skeleton-specific.
4099 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4100 declare what %code qualifiers it supports and to complain if any other
4101 qualifiers were used in the grammar.
4102 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4103 and b4_user_code([b4_percent_code_provides]) in place of
4104 b4_user_requires and b4_user_provides.
4105 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4106 Add b4_user_code([b4_percent_code_top]) and
4107 b4_user_code([b4_percent_code]).
4108 Invoke b4_check_percent_code_qualifiers.
4109 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4110 PERCENT_REQUIRES): Remove.
4111 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4112 %requires. Rewrite the %code RHS as the unqualified form defining the
4113 muscle b4_percent_code. Add another RHS for the qualified %code form,
4114 which defines muscles of the form b4_percent_code_QUALIFIER and the
4115 b4_used_percent_code_qualifiers muscle.
4116 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4117 PERCENT_REQUIRES): Remove.
4118 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4119 %code "requires" and %code "provides".
4120 * tests/input.at (Reject bad %code qualifiers): New.
4121
4122 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4123
4124 Use the new code_props interface for destructors and printers.
4125 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4126 printer_location members, and change the type of the destructor and
4127 printer members to code_props.
4128 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4129 symbol_printer_get, semantic_type_destructor_set,
4130 semantic_type_printer_set, default_tagged_destructor_set,
4131 default_tagless_destructor_set, default_tagged_printer_set,
4132 default_tagless_printer_set): Use code_props in arguments and return
4133 types in place of char const * and location.
4134 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4135 since the locations are now contained in the return of
4136 symbol_destructor_get and symbol_printer_get.
4137 * src/output.c (symbol_destructors_output, symbol_printers_output):
4138 Replace with...
4139 (symbol_code_props_output): ... this to eliminate duplicate code.
4140 (output_skeleton): Update to use symbol_code_props_output.
4141 * src/reader.c (symbol_should_be_used): Update use of
4142 symbol_destructor_get.
4143 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4144 Update uses of the various _destructor_set and _printer_set functions.
4145 * src/symtab.c: (default_tagged_destructor_location,
4146 default_tagless_destructor_location, default_tagged_printer_location,
4147 default_tagless_printer_location): Remove since we...
4148 (default_tagged_destructor, default_tagless_destructor,
4149 default_tagged_printer, default_tagless_printer): ... change the type
4150 of these to code_props.
4151 (symbol_new, semantic_type_new, symbol_destructor_set,
4152 semantic_type_destructor_set, symbol_destructor_get,
4153 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4154 symbol_check_alias_consistency, default_tagged_destructor_set,
4155 default_tagless_destructor_set, default_tagged_printer_set,
4156 default_tagless_printer_set): Update.
4157 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4158 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4159 code_props members.
4160 (symbol_print): Use SYMBOL_CODE_PRINT.
4161
4162 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4163
4164 Use the new code_props interface for rule actions.
4165 * src/symlist.h (symbol_list): Replace action, action_location, and
4166 used members with a code_props action_props member.
4167 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4168 grammar_midrule_action, grammar_current_rule_merge_set,
4169 grammar_current_rule_symbol_append, packgram): Update.
4170 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4171 * src/scan-code.l (handle_action_dollar): Update.
4172 (translate_rule_action): Remove, no longer used.
4173 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4174
4175 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4176
4177 Use the new code_props interface in parse-gram.y.
4178 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4179 Update all uses of translate_* functions to use the new code_props
4180 interface and to use gram_scanner_last_string_free and
4181 code_scanner_last_string_free where possible.
4182 (grammar_declaration): symbol_list_destructor_set and
4183 symbol_list_printer_set now perform the translation, so don't do it
4184 here. Use gram_scanner_last_string_free where possible.
4185 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4186 translate_code): Remove, no longer used.
4187 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4188 symbol_list_printer_set): Perform code translation here rather than
4189 depending on the caller to do so.
4190
4191 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4192 * src/scan-gram.h (gram_last_string): Remove declaration.
4193 * src/scan-gram.l (last_string): Declare it static.
4194
4195 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4196
4197 Encapsulate code properties and related functionality for the various
4198 destructors, printers, and actions into a code_props structure and
4199 interface. This patch merely implements code_props in scan-code.h and
4200 scan-code.l. Future patches will rewrite other modules to use it.
4201 Discussed starting at
4202 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4203 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4204 consistently initialize const structs that have an empty location
4205 field.
4206 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4207 to ensure consistency.
4208 * src/scan-code.h (code_props): New structure.
4209 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4210 function, macro, and const global variable for initializing a
4211 code_props with no code.
4212 (code_props_plain_init, code_props_symbol_action_init,
4213 code_props_rule_action_init, code_props_translate_code): The rest of
4214 the new code_props functional interface. Among other things, the init
4215 functions set the code_props kind field so that
4216 code_props_translate_code will know whether to behave like
4217 translate_symbol_action, translate_rule_action, or translate_code.
4218 These old translate functions must remain until all other modules are
4219 updated to use the new code_props interface.
4220 (code_scanner_last_string_free): New function similar to
4221 gram_scanner_last_string_free.
4222 (code_scanner_free): Add documentation.
4223 * src/scan-code.l: Implement the new interface.
4224 (code_lex): Make it static, add a code_props* argument, and remove the
4225 rule argument.
4226 (last_string): New static global similar to the one in scan-gram.l.
4227 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4228 instead of rule.
4229 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4230 code_props since Bison may one day use this information for destructors
4231 and printers.
4232 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4233 (handle_action_dollar): Use symbol_list_n_get and set used flag
4234 directly since symbol_list_n_used_set is removed.
4235 (translate_action): Add a code_props* argument and remove the rule,
4236 action, and location arguments. Pass the code_props* on to code_lex.
4237 (translate_rule_action, translate_symbol_action, translate_code):
4238 Rewrite as wrappers around the new code_props interface.
4239 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4240 it would eventually need to break the encapsulation of code_props.
4241
4242 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4243
4244 * etc/.cvsignore: New.
4245
4246 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4247
4248 Add maintainer-push-check to run maintainer-check using push parsing in
4249 place of pull parsing where available.
4250 * Makefile.am (maintainer-push-check): New.
4251 * data/bison.m4 (b4_use_push_for_pull_if): New.
4252 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4253 appropriately based on their existing values.
4254 (yypush_parse): Don't print push-parser-specific diagnostics if push
4255 parsing is being used in place of pull parsing.
4256 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4257 push.c.
4258 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4259 variable, and insert b4_use_push_for_pull_flag into muscles.
4260 * tests/Makefile.am (maintainer-push-check): New.
4261
4262 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4263
4264 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4265 (whether successful or failed) so that yypush_parse can be invoked
4266 again to start a new parse using the same yypstate.
4267 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4268 check multiple yypull_parse invocations on the same yypstate. For pull
4269 mode, extend to check multiple yyparse invocations.
4270 (Exploding the Stack Size with Alloca): Extend to try with
4271 %push-pull-parser.
4272 (Exploding the Stack Size with Malloc): Likewise.
4273
4274 * tests/calc.at (Simple LALR Calculator): Don't specify
4275 %skeleton "push.c" since %push-pull-parser implies that now.
4276 * tests/headers.at (export YYLTYPE): Don't check for the push
4277 declarations. Otherwise, this test case can't be used to see if push
4278 mode can truly emulate pull mode.
4279 * tests/input.at (Torturing the Scanner): Likewise.
4280 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4281 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4282 AT_YACC_IF, which now includes the case of push mode since %skeleton
4283 need not be used for push mode. This will be more intuitive once
4284 push.c is renamed to yacc.c.
4285
4286 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4287
4288 For push mode, convert yyparse from a macro to a function, invoke yylex
4289 instead of passing a yylexp argument to yypull_parse, and don't
4290 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4291 Discussed starting at
4292 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4293 * data/bison.m4 (b4_pull_if): New.
4294 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4295 * data/push.c: Improve M4 quoting a little.
4296 (b4_generate_macro_args, b4_parenthesize): Remove.
4297 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4298 any time a pull parser is requested.
4299 Don't #define this as a wrapper around yypull_parse. Instead, when
4300 both push and pull are requested, make it a function that does that
4301 same thing.
4302 (yypull_parse): If there's a b4_prefix, #define this to
4303 b4_prefix[pull_parse] when both push and pull are requested.
4304 Don't define this as a function unless both push and pull are
4305 requested.
4306 Remove the yylexp argument and hard-code yylex invocation instead.
4307 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4308 %push-parser.
4309 * src/getargs.c (pull_parser): New global initialized to true.
4310 * getargs.h (pull_parser): extern it.
4311 * src/output.c (prepare): Insert pull_flag muscle.
4312 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4313 (prologue_declaration): Set both push_parser and pull_parser = true for
4314 %push-pull-parser. Set push_parser = true and pull_parser = false for
4315 %push-parser.
4316 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4317 %push-parser since there's no backward-compatibility concern here.
4318 Scan %push-pull-parser.
4319 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4320 instead of %push-parser.
4321 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4322 prototype it in the module that calls yyparse.
4323 * tests/input.at (Torturing the Scanner): Likewise.
4324 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4325
4326 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4327
4328 Update etc/bench.pl. Optimize push mode a little (the yyn change
4329 deserves most of the credit).
4330 * Makefile.am (SUBDIRS): Add etc subdirectory.
4331 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4332 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4333 yytoken, yyval, and yyloc declarations to...
4334 (yyparse or yypush_parse): ... here to improve performance. For
4335 yypush_parse invocations after the first, be sure to assign yyn its old
4336 value again.
4337 (yypstate_new): Don't bother initializing the yyresult field since the
4338 initial value isn't used.
4339 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4340 remove the #define that, in push mode, set it to yyps->NAME.
4341 * etc/Makefile.am: New.
4342 * etc/bench.pl: Remove and build it instead from...
4343 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4344 "tests/bison" from the build directory by default rather than just
4345 invoking "bison" from $PATH.
4346 (calc_grammar): Update push parser code: don't declare yylval globally,
4347 don't define yyparse_wrapper, and don't #define yyparse.
4348 (bench_grammar): Update to check all working combinations of yacc.c,
4349 push.c, impure, pure, pull, and push.
4350
4351 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4352
4353 For push mode, add pull wrappers around yypush_parse.
4354 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4355 (yypull_parse): New function wrapping yypush_parse.
4356 (yyparse): New #define wrapping yypull_parse.
4357 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4358 is declared.
4359 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4360 prototype yylex in the module that calls yyparse, and don't prototype
4361 yyparse there. Otherwise, the yyparse expansion won't compile.
4362 * tests/input.at (Torturing the Scanner): Likewise.
4363
4364 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4365
4366 Enable push parsers to operate in impure mode. Thus, %push-parser no
4367 longer implies %pure-parser. The point of this change is to move
4368 towards being able to test the push parser code by running the entire
4369 test suite as if %push-parser had been declared.
4370 * data/push.c (yypush_parse): For impure mode, remove the
4371 yypushed_char, yypushed_val, and yypushed_loc arguments.
4372 Instead, declare these as local variables initialized to the global
4373 yychar, yylval, and yylloc.
4374 For the first yypush_parse invocation only, restore the initial values
4375 of these global variables when it's time to read a token since they
4376 have been overwritten.
4377 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4378 %push-parser.
4379 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4380 %pure-parser along with %push-parser since this test case was designed
4381 for pure push parsers.
4382 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4383 (AT_YACC_OR_PUSH_IF): New.
4384 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4385 add a note that it's still wrong for some cases (as it has been for a
4386 while).
4387 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4388 %push-parser no longer implies %pure-parser.
4389
4390 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4391
4392 Remove some unnecessary differences between the pull parser code and
4393 the push parser code. This patch enables yynerrs in push mode.
4394 * data/push.c: Reformat M4 a little.
4395 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4396 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4397 because push mode is on. Instead, if pure mode is on, move yynerrs
4398 to...
4399 (b4_declare_parser_state_variables): ... here.
4400 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4401 to yyps->NAME so it can be used in yypush_parse.
4402 (yypush_parse): Don't omit uses of yynerrs in push mode.
4403
4404 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4405
4406 Fix bug such that the first pushed token's value and location are
4407 sometimes overwritten (sometimes by %initial-action) before being used.
4408 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4409 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4410 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4411 more closely mimic the pull parser logic.
4412 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4413 time to read a token, which is after any initialization of yylval and
4414 yylloc.
4415 (gottoken): Rename label to...
4416 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4417 user namespace.
4418
4419 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4420
4421 Rearrange initialization of the parser state variables so that the
4422 skeleton doesn't have to have a copy for pull mode and another for push
4423 mode. This patch also fixes at least a bug such that yylloc was not
4424 initialized (with b4_location_initial_line and
4425 b4_location_initial_column) upon calling yypush_parse. However, that
4426 initialization now overwrites the first token's location;
4427 %initial-action assigning @$ already did the same thing, and both bugs
4428 will be fixed in a later patch.
4429 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4430 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4431 yyss, yyvs, yyls, and yystacksize.
4432 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4433 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4434 yylsp.
4435 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4436 yyps->NAME so it can be used in yypush_parse.
4437 (yyparse or yypush_parse): For yypush_parse, don't print the
4438 "Starting parse" diagnostic for invocations after the first.
4439 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4440 yypush_parse, only do it for the first invocation.
4441 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4442 initialization to occur in yypush_parse but only on the first
4443 invocation.
4444
4445 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4446
4447 * data/push.c: Add CPP guards around push parser declarations in both
4448 the header and the code file.
4449 In the code file, move the push parser declarations to the same place
4450 they appear in the header file.
4451 Clean up the M4 some, especially the inconsistent underquoting in
4452 some b4_c_function_def and b4_c_function_decl uses.
4453
4454 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4455
4456 Encapsulate the push parser state variables into an M4 macro so the
4457 push skeleton doesn't have to list them again for pull mode's yyparse.
4458 For push mode, remove yypush_parse's local equivalents of these
4459 variables to eliminate unnecessary copying between the two sets at
4460 run-time. This patch also fixes at least a bug related to multiple
4461 %initial-action invocations in push mode.
4462 * data/push.c (b4_declare_parser_variables): Rename to...
4463 (b4_declare_scanner_communication_variables): ... this for clarity and
4464 update both uses.
4465 (b4_declare_yyparse_variables): Remove and move its contents to the one
4466 spot where it was invoked.
4467 (b4_declare_parser_state_variables): New macro containing the parser
4468 state variables required by push mode.
4469 (struct yypstate): Replace all fields but yynew with
4470 b4_declare_parser_state_variables.
4471 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4472 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4473 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4474 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4475 parser state variable declarations with
4476 b4_declare_parser_state_variables.
4477 Don't initialize parser state variables when calling yypush_parse since
4478 yypstate_new already does that.
4479 Invoke the user's initial action only upon the first yypush_parse
4480 invocation.
4481 Remove all code that copies between the local parser state variables
4482 and the yypstate.
4483
4484 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4485
4486 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4487 prevent a name collision in a future patch where these names will
4488 sometimes be #define'd.
4489 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4490 since it no longer has the same name as the existing argument.
4491 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4492
4493 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
4494 and Joel E. Denny <jdenny@ces.clemson.edu>
4495
4496 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4497 that the argument is case-insensitive, and there's no `=' here.
4498 For the %skeleton entry, mention that %language is better.
4499 (Bison Options): Likewise for --language and --skeleton. Move the
4500 --skeleton entry so that the `Tuning the parser' section is sorted
4501 alphabetically on long options.
4502 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4503 %language directive in detail here; cross-reference the %language
4504 documentation instead.
4505 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4506 `%require "2.3b"' so that the example is always up-to-date.
4507 (Table of Symbols): Add entries for %language and %skeleton.
4508 * examples/extexi (normalize): Instead of replacing every %require
4509 argument with the current Bison version, just substitute for
4510 `@value{VERSION}'. This guarantees that we're testing what actually
4511 appears in the documentation.
4512 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4513 rather than `@VERSION@'.
4514
4515 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4516
4517 * NEWS: Reword the %language news a bit, and put it earlier.
4518
4519 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4520 Rewrite to simplify the logic.
4521 (language_argmatch): Likewise.
4522 (program_name): We now own this var.
4523 * src/getargs.h (struct bison_language): Use char[] rather than
4524 const char *.
4525
4526 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4527 Java is supported.
4528 * src/complain.c (program_name): Remove decl; no longer needed.
4529 * src/main.c (program_name): Remove; now belongs to getargs.
4530
4531 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
4532
4533 * NEWS: Document %language.
4534
4535 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4536
4537 * data/c-skel.m4, data/c++-skel.m4: New files.
4538 * data/glr.c: Complain on push parsers.
4539
4540 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4541 over %skeleton.
4542 (Decl Summary): Document %language and %skeleton.
4543 (Command line): Document -L.
4544
4545 * examples/extexi: Rewrite %require directive.
4546 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4547
4548 * src/files.c (compute_exts_from_gc): Look in language structure
4549 for .y extension.
4550 (compute_file_name_parts): Check whether .tab should be added.
4551 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4552 (language, skeleton_arg, language_argmatch): New.
4553 (long_options): Add --language.
4554 (getargs): Use skeleton_arg, add -L/--language.
4555 * src/getargs.h: Include location.h.
4556 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4557 * src/output.c (prepare): Pick default skeleton from struct language.
4558 Don't dispatch C skeletons here.
4559 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4560 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4561 * src/scan-gram.l ("%language"): New rule.
4562
4563 * tests/calc.at: Test %skeleton and %language.
4564 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4565 (AT_GLR_IF): Look for %skeleton "glr.cc".
4566 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4567 (AT_YACC_IF): Reject %language.
4568
4569 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4570
4571 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4572 since it wasn't used; only the typedef name 'semantic_type' is needed.
4573 Also, omit trailing white space.
4574
4575 * bootstrap: Sync from coreutils.
4576 (gnulib_extra_files): Add build-aux/announce.gen.
4577 (slurp): Adjust .gitignore files like .cvsignore files.
4578 * build-aux/announce-gen: Remove from CVS, since bootstrap
4579 now creates this.
4580
4581 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4582
4583 Make %push-parser imply %pure-parser. This fixes several bugs; see
4584 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4585 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4586 pure_parser = true.
4587 * data/push.c: Don't bother testing b4_push_if when deciding whether
4588 to expand b4_declare_parser_variables globally.
4589 (yypush_parse): Likewise in here.
4590
4591 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4592 (yy_reduce_print): Reformat M4 for readability.
4593
4594 2006-12-15 Bob Rossi <bob@brasko.net>
4595 and Joel Denny <jdenny@ces.clemson.edu>
4596
4597 * data/push.c (yypstate): Add typedef, and update all uses of
4598 struct yypstate to just yypstate.
4599 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4600
4601 2006-12-14 Bob Rossi <bob@brasko.net>
4602
4603 * data/push.c (yypush_parse): Declare prototype regardless of
4604 %locations option.
4605
4606 2006-12-14 Bob Rossi <bob@brasko.net>
4607
4608 * data/push.c (yyparse): Remove the prototype and the #define when in
4609 push-parser mode.
4610
4611 2006-12-13 Bob Rossi <bob@brasko.net>
4612
4613 * data/push.c (yypstate_init): Rename to...
4614 (yypstate_new): ... this and use b4_c_function_def.
4615 (yypstate_delete): New.
4616 (yypush_parse): Change parameters yynval and yynlloc to be const.
4617 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
4618 yypstate_delete functions.
4619
4620 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
4621
4622 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
4623 strange test case titles. Reported by Bob Rossi.
4624
4625 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
4626
4627 * TODO: Add pointer to Sylvain Schmitz's work on static detection
4628 of potential ambiguities in GLR grammers.
4629
4630 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
4631
4632 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
4633 `bison ', use m4_index instead of m4_substr since chopping up a string
4634 containing M4-special characters causes problems here.
4635
4636 Fix a couple of bugs related to special characters in user-specified
4637 file names, and make it easier for skeletons to compute output file
4638 names with the same file name prefix as Bison-computed output file
4639 names.
4640 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
4641 b4_parser_file_name and b4_spec_defines_file instead of
4642 @output_parser_name@ and @output_header_name@, which are now redundant.
4643 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
4644 b4_parser_file_name, b4_spec_defines_file, and the new
4645 @basename(FILENAME@) instead of @output_parser_name@ and
4646 @output_header_name@, which inappropriately escaped the file names as
4647 C string literals.
4648 * src/files.c (all_but_ext): Remove static qualifier.
4649 (compute_output_file_names): Move `free (all_but_ext)' to...
4650 (output_file_names_free): ... here since all_but_ext is needed later.
4651 * src/files.h (all_but_ext): Extern.
4652 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
4653 exactly what MUSCLE_INSERT_STRING used to do.
4654 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
4655 characters are escaped properly.
4656 * src/output.c (prepare): Define muscle file_name_all_but_ext as
4657 all_but_ext.
4658 For pkgdatadir muscle, maintain previous functionality by using
4659 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
4660 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
4661 digraphs would never be expanded. Hopefully no one has M4-special
4662 characters in his Bison installation path.
4663 * src/scan-skel.l: Don't parse @output_header_name@ and
4664 @output_parser_name@ anymore since they're now redundant.
4665 In @output, use decode_at_digraphs.
4666 Parse a new @basename command that invokes last_component.
4667 (decode_at_digraphs): New.
4668 (BASE_QPUTS): Remove unused.
4669 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
4670 (Output file name): New tests.
4671
4672 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
4673
4674 Warn about output files that are generated by the skeletons and that
4675 conflict with other output files.
4676 * data/glr.c: Don't generate the header file here when glr.cc does.
4677 * src/files.c (file_names, file_names_count): New static globals.
4678 (compute_output_file_names): Invoke output_file_name_check for files
4679 not generated by the skeletons and remove existing checks.
4680 (output_file_name_check): New function that warns about conflicting
4681 output file names.
4682 (output_file_names_free): Free file_names.
4683 * src/files.h (output_file_name_check): Declare.
4684 * src/scan-skel.l: Invoke output_file_name_check for files generated by
4685 the skeletons.
4686 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
4687 (Conflicting output files): New tests.
4688
4689 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4690
4691 * doc/bison.texinfo: Fix a couple of typos.
4692
4693 2006-12-08 Bob Rossi <bob@brasko.net>
4694
4695 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
4696 Rename to...
4697 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
4698 update all uses.
4699 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
4700 (yypush_parse): Rename yypvars argument to yyps and remove redundant
4701 local pv.
4702 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
4703 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
4704
4705 2006-12-07 Bob Rossi <bob@brasko.net>
4706 and Joel Denny <jdenny@ces.clemson.edu>
4707
4708 * data/push.c (yypvarsinit): Change return type from void* to struct
4709 yypvars*. No longer cast to void* on return.
4710 (struct yypvars): Remove yylen since it need not be remembered between
4711 yypushparse invocations.
4712 (yypushparse): Don't copy between yylen and pv->yylen.
4713
4714 2006-12-05 Bob Rossi <bob@brasko.net>
4715
4716 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
4717 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
4718 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
4719 (struct yypvars): Remove b4_declare_parser_variables.
4720 (yypvarsinit): Remove init code for removed variables.
4721 (global scope): Do not declare b4_declare_parser_variables if
4722 push or pure mode.
4723 (yypushparse): Add b4_declare_parser_variables.
4724 Init new local variables, and remove init code for removed
4725 yypvars variables.
4726 (yyparse): Delete.
4727 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
4728 and yyparse for other modes.
4729 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
4730 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
4731 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
4732 (AT_PURE_LEX_IF): True if pure or push parser.
4733
4734 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
4735
4736 Document Yacc prologue alternatives and default %destructor's and
4737 %printer's as experimental. Don't mention Java yet. Discussed at
4738 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
4739 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
4740 (2.3a): Annotate this entry to say the old forms of these features were
4741 also experimental.
4742 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
4743 Table of Symbols): Say they're experimental. Comment out any mention
4744 of Java (we'll want this back eventually).
4745
4746 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4747
4748 Support a file name argument to %defines. Deprecate `=' in
4749 %file-prefix, %name-prefix, and %output. Discussed at
4750 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
4751 * NEWS (2.3a+): Mention.
4752 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
4753 form of %defines, and remove `=' from entries for %file-prefix,
4754 %name-prefix, and %output.
4755 * src/parse-gram.y (prologue_declaration): Implement.
4756 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
4757 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
4758 all but one occurrence of %name-prefix.
4759 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
4760 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
4761 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
4762 occurrence of each of %file-prefix and %output. Add check for %defines
4763 with argument.
4764 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
4765 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
4766 Remove the `=' from %output.
4767
4768 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
4769
4770 Don't escape $ in test case titles since Autoconf 2.61 now does that
4771 correctly.
4772 * tests/actions.at (Default %printer and %destructor are not for error
4773 or $undefined): Here.
4774 (Default %printer and %destructor are not for $accept): Here.
4775 * tests/input.at (Invalid $n and @n): Here.
4776
4777 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
4778
4779 Rename <!> to <>. Discussed starting at
4780 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
4781 * NEWS (2.3a+): Update.
4782 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
4783 Update.
4784 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
4785 * src/scan-gram.l (INITIAL): Implement.
4786 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
4787 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
4788 comment.
4789 * tests/actions.at (Default tagless %printer and %destructor,
4790 Default tagged and per-type %printer and %destructor,
4791 Default %printer and %destructor are not for error or $undefined,
4792 Default %printer and %destructor are not for $accept,
4793 Default %printer and %destructor for mid-rule values): Update.
4794 * tests/input.at (Default %printer and %destructor redeclared,
4795 Unused values with default %destructor): Update.
4796
4797 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4798
4799 Don't let %prec take a nonterminal.
4800 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
4801 token.
4802 * tests/input.at (%prec takes a token): New test checking that %prec
4803 won't take a nonterminal.
4804
4805 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4806
4807 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
4808 it was double-quoted.
4809 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
4810 grammar is maintained with Bison's highest standards.
4811 * src/getargs.c: Fix some typos in Doxygen comments.
4812
4813 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4814
4815 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
4816 later. Reported by Paul Eggert in
4817 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
4818 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
4819 * src/scan-code.l (translate_action): Don't bother invoking
4820 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
4821 (code_scanner_free): Instead of invoking
4822 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
4823 which frees more.
4824 * src/scan-gram.l (gram_scanner_free): Likewise.
4825 * src/scan-skel.l (scan_skel): Likewise.
4826
4827 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4828
4829 * src/files.c (tr): Change return type to void.
4830 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
4831 has been called previously for the same key.
4832 (muscle_find): Return storage instead of value so that
4833 --enable-gcc-warnings doesn't produce warnings that the return discards
4834 const. aver that the value and storage are the same since storage
4835 could potentially be NULL when value is not.
4836 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
4837 same as 0.
4838
4839 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4840
4841 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
4842 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
4843 us a slightly cleaner distribution, and also works.
4844 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
4845 gnulib changes.
4846
4847 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
4848 and Paul Eggert <eggert@cs.ucla.edu>
4849
4850 Don't let Bison leak memory except when it complains.
4851 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
4852 (spec_defines_file, dir_prefix): Now char *, not const char *,
4853 since they are freed.
4854 * src/files.c: Likewise.
4855 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
4856 Likewise.
4857 (tr): Now operates in-place. All uses changed.
4858 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
4859 values.
4860 (compute_file_name_parts, compute_output_file_names): Don't store
4861 read-only data in variables that will be freed.
4862 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
4863 src_extension, and header_extension.
4864 (output_file_names_free): New public function to free
4865 spec_verbose_file, spec_graph_file, spec_defines_file,
4866 parser_file_name, and dir_prefix.
4867 * src/getargs.c (getargs): Don't store read-only data in variables that
4868 will be freed.
4869 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
4870 (which previously existed but was unused), and quotearg_free.
4871 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
4872 * src/muscle_tab.c: Likewise.
4873 (muscle_entry): Make the value char const *,
4874 and add a new storage member that is char * and can be freed.
4875 (muscle_entry_free): New private function.
4876 (muscle_init): Use it instead of free.
4877 (muscle_insert, muscle_grow): Update and use new storage member.
4878 (muscle_code_grow): Free the string passed to muscle_grow
4879 since it's not needed anymore.
4880 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
4881 add a new `char *code' member.
4882 ("{...}"): Declare semantic type as code.
4883 * src/scan-code.h (translate_rule_action):
4884 (translate_symbol_action, translate_code, translate_action): Return
4885 `char const *' rather than `char *' since external code should not free
4886 these strings.
4887 * src/scan-code.l: Likewise.
4888 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
4889 which is "{...}" in the parser.
4890 * tests/Makefile.am (maintainer-check-valgrind): Set
4891 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
4892 Valgrind.
4893 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
4894 complain.
4895 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
4896 expecting a non-zero exit status sets --leak-check=summary and
4897 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
4898 this case, and we don't want to hear about it.
4899
4900 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4901
4902 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
4903 instead of from the template, to simplify configuration a bit.
4904 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
4905 and m4/wint_t.m4, as they are needed with the latest gnulib.
4906
4907 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4908
4909 Disable unset/unused mid-rule value warnings by default, and recognize
4910 --warnings=midrule-values to enable them. Discussed starting at
4911 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
4912 * NEWS (2.3a+): Mention.
4913 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
4914 warnings): Add entry for midrule-values subargument.
4915 * src/reader.c (symbol_should_be_used): Don't return true just because
4916 the value is a set/used mid-rule value unless
4917 --warnings=midrule-values was specified.
4918 * tests/input.at (Unused values, Unused values before symbol
4919 declarations): Run tests with and without --warnings=midrule-values.
4920
4921 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
4922 than LIST_FREE directly.
4923
4924 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4925
4926 Finish implementing --warnings=error, which should not be implied by
4927 --warnings=all (or by its synonyms -W and --warnings without
4928 subarguments).
4929 * src/complain.c (set_warning_issued): New function to report that
4930 warnings are being treated as errors and to record an error if so.
4931 Invoke...
4932 (warn_at, warn): ... here.
4933 * src/getargs.c (warnings_args, warnings_types): Reorder so that
4934 "error - warnings are errors" does not appear above "all - all of the
4935 above".
4936 (getargs): For -W and --warnings without subarguments, don't let
4937 FLAGS_ARGMATCH set warnings_error in warnings_flag.
4938 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
4939
4940 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4941
4942 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
4943 empty subargument list. For example: `bison --warnings= parser.y'.
4944
4945 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4946
4947 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
4948 the parser header file so that gcc doesn't warn.
4949
4950 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4951
4952 Split the default %destructor/%printer into two kinds: <*> and <!>.
4953 Discussed starting at
4954 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
4955 * NEWS (2.3a+): Mention.
4956 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
4957 previous change today related to mid-rules.
4958 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
4959 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
4960 (TYPE_TAG_ANY): Add as <*>.
4961 (TYPE_TAG_NONE): Add as <!>.
4962 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
4963 for <*> and <!>.
4964 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
4965 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
4966 * src/symlist.c (symbol_list_default_new): Split into tagged and
4967 tagless versions.
4968 (symbol_list_destructor_set, symbol_list_printer_set): Split
4969 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
4970 SYMLIST_DEFAULT_TAGLESS.
4971 * src/symlist.h: Update symbol_list_default*_new prototypes.
4972 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
4973 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
4974 * src/symtab.c (default_destructor, default_destructor_location,
4975 default_printer, default_printer_location): Split each into tagged and
4976 tagless versions.
4977 (symbol_destructor_get, symbol_destructor_location_get,
4978 symbol_printer_get, symbol_printer_location_get): Implement tagged
4979 default and tagless default cases.
4980 (default_destructor_set, default_printer_set): Split each into tagged
4981 and tagless versions.
4982 * src/symtab.h: Update prototypes.
4983 * tests/actions.at (Default %printer and %destructor): Rename to...
4984 (Default tagless %printer and %destructor): ... this, and extend.
4985 (Per-type %printer and %destructor): Rename to...
4986 (Default tagged and per-type %printer and %destructor): ... this, and
4987 extend.
4988 (Default %printer and %destructor for user-defined end token): Extend.
4989 (Default %printer and %destructor are not for error or $undefined):
4990 Update.
4991 (Default %printer and %destructor are not for $accept): Update.
4992 (Default %printer and %destructor for mid-rule values): Extend.
4993 * tests/input.at (Default %printer and %destructor redeclared): Extend.
4994 (Unused values with default %destructor): Extend.
4995
4996 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4997
4998 Don't apply the default %destructor/%printer to an unreferenced midrule
4999 value. Mentioned at
5000 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5001 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5002 like $@n instead of just @n so that the default %destructor/%printer
5003 logic doesn't see them as user-defined symbols.
5004 (symbol_is_dummy): Check for both forms of the name.
5005 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5006 name for which the midrule value is referenced in any action.
5007 * tests/actions.at (Default %printer and %destructor for mid-rule
5008 values): New test.
5009 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5010 for change to dummy symbol names.
5011
5012 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5013
5014 Warn about unset midrule $$ if the corresponding $n is used.
5015 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5016 $n usage.
5017 (packgram): Before invoking grammar_rule_check on any rule, make sure
5018 all actions have already been scanned in order to set `used' flags.
5019 Otherwise, checking that a midrule's $$ is set will not always work
5020 properly because the midrule check must forward-reference the midrule's
5021 parent rule.
5022 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5023 warning.
5024
5025 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5026
5027 More improvements to the documentation of the prologue alternatives:
5028 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5029 Bison manual.
5030 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5031 some text to clarify the relative importance of the new directives and
5032 to show how these directives may be viewed as code labels.
5033
5034 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5035
5036 Similar to the recently removed %before-header, add %code-top as the
5037 alternative to the pre-prologue. Mentioned at
5038 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5039 Also, let the prologue alternatives appear in the grammar section.
5040 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5041 (prologue_declaration): Move the existing prologue alternatives to...
5042 (grammar_declaration): ... here and add %code-top.
5043 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5044
5045 Clean up and extend documentation for the prologue alternatives.
5046 * NEWS (2.3a+): Describe prologue alternatives.
5047 * doc/bison.texinfo (Prologue): Move discussion of prologue
5048 alternatives to...
5049 (Prologue Alternatives): ... this new section, and extend it to discuss
5050 all 4 directives in detail.
5051 (Table of Symbols): Clean up discussion of prologue alternatives and
5052 add %code-top.
5053
5054 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5055
5056 DJGPP specific issues.
5057
5058 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5059 config.bat accordingly.
5060 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5061 * djgpp/config.site: Likewise.
5062
5063 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5064
5065 Replace %*-header with %provides, %requires, %code. See discussion at
5066 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5067
5068 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5069 (b4_user_start_header): Remove.
5070 * data/glr.c: Use new macros instead of b4_*start_header
5071 and b4_*end_header.
5072 * data/glr.cc: Likewise.
5073 * data/lalr1.cc: Likewise.
5074 * data/push.c: Likewise.
5075 * data/yacc.c: Likewise.
5076
5077 * doc/bison.texinfo: Remove %before-header, rename
5078 %{start,end,after}-header to %requires, %provides, %code.
5079
5080 * src/parse-gram.y: Likewise (also rename token names accordingly).
5081 * src/scan-gram.l: Likewise.
5082 * tests/actions.at: Likewise.
5083
5084 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5085
5086 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5087 Problem reported by Joel E. Denny.
5088
5089 2006-10-14 Jim Meyering <jim@meyering.net>
5090
5091 (Sync from coreutils.)
5092 Work also when the working directory (with e.g. coreutils sources)
5093 is version controlled with git, rather than CVS.
5094 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5095 rather than CVS.
5096 In messages and comments, say e.g., "checked-out sources",
5097 rather than "CVS sources".
5098 (version_controlled_file): New function. Work for git as well as
5099 for CVS. Don't use grep's -q option.
5100 (slurp): Call it here, in place of CVS-specific code.
5101
5102 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5103
5104 Fix testsuite for ./configure --enable-gcc-warnings:
5105 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5106 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5107 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5108 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5109 * test/regression.at (Diagnostic that expects two alternatives):
5110 Likewise.
5111
5112 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5113
5114 * bootstrap.conf (gnulib_modules): Add config-h.
5115 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5116 worry about HAVE_CONFIG_H.
5117 * lib/abitset.c: Likewise.
5118 * lib/bitset.c: Likewise.
5119 * lib/bitset_stats.c: Likewise.
5120 * lib/bitsetv-print.c: Likewise.
5121 * lib/bitsetv.c: Likewise.
5122 * lib/ebitset.c: Likewise.
5123 * lib/get-errno.c: Likewise.
5124 * lib/lbitset.c: Likewise.
5125 * lib/subpipe.c: Likewise.
5126 * lib/timevar.c: Likewise.
5127 * lib/vbitset.c: Likewise.
5128 * lib/bitset.c: Include "bitset.h" first, to test interface.
5129 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5130 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5131 * lib/bitsetv.c: Include "bitsetv.h" first.
5132 * lib/get-errno.c: Include "get-errno.h" first.
5133 * m4/.cvsignore: Add config-h.m4.
5134 * tests/actions.at (Default %printer and %destructor for ...):
5135 Adjust expected line numbers in output to reflect removal of #if
5136 HAVE_CONFIG_H lines.
5137 * tests/glr-regression.at (Missed %merge type warnings when ...):
5138 Likewise.
5139 * tests/regression.at (Braced code in declaration in rules section):
5140 Likewise.
5141 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5142 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5143 Include <config.h> unconditionally.
5144
5145 * bootstrap: Sync from coreutils, as follows:
5146
5147 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5148
5149 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5150 variable was sometimes used without being initialized. This
5151 messed up the installation of the INSTALL file in some cases.
5152
5153 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5154
5155 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5156 --copy. Inspired by a suggestion from Bruno Haible.
5157
5158 2006-10-03 Jim Meyering <jim@meyering.net>
5159
5160 * bootstrap: Undo last change to this file, since now gnulib-tool
5161 sticks with the automake default in generating dependencies.
5162
5163 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5164
5165 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5166 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5167
5168 * doc/bison.1: Add copyright notice.
5169
5170 * data/glr.c: Don't include <stdarg.h>; not used.
5171
5172 * NEWS: The -g and --graph options now output graphs in Graphviz
5173 DOT format, not VCG format.
5174 * doc/bison.1: Likewise.
5175 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5176 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5177 of this change in
5178 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5179 * TODO: Remove Graphviz entry.
5180 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5181 remove vcg.c, vcg.h, vcg_defaults.h.
5182 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5183 * src/graphviz.c, src/graphviz.h: New files.
5184 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5185 * src/files.h: Make comment more generic.
5186 * src/main.c (main): Likewise.
5187 * src/print_graph.h: Likewise.
5188 * src/getargs.c (usage): Make usage description more generic.
5189 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5190 (static_graph, fgraph): Remove. All uses changed to pass
5191 arguments instead of sharing a static var.
5192 (print_core, print_actions, print_state, print_graph):
5193 Output graphviz format rather than VCG format.
5194 * tests/.cvsignore: Remove *.vcg; add *.dot.
5195 * tests/output.at: Expect *.dot files, not *.vcg files.
5196
5197 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5198 accommodates the 2006-10-08 change.
5199
5200 2006-10-11 Bob Rossi <bob@brasko.net>
5201
5202 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5203 (b4_yyssa, b4_yyerror_range): New macros.
5204 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5205 (yypvarsinit): Remove init of removed fields.
5206 (yypushparse): Remove use of removed fields; use new macros instead.
5207
5208 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5209
5210 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5211 in a push parser. Reindent slightly to match yacc.c better.
5212
5213 2006-10-11 Bob Rossi <bob@brasko.net>
5214
5215 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5216 yymsg_alloc fields.
5217 (yypvarsinit, yypushparse): Remove init of removed fields.
5218 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5219
5220 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5221
5222 * THANKS: Add Paolo Bonzini and Bob Rossi.
5223
5224 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5225
5226 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5227 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5228 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5229 b4_define_user_cde and uses): Remove.
5230 (b4_comment, b4_prefix, b4_sync_start): New.
5231 * data/bison.m4: New file, with most of the content removed from c.m4.
5232 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5233 * src/output.c (output_skeleton): Pass bison.m4.
5234 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5235 only if specified.
5236
5237 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5238
5239 Fix test failure reported by Tom Lane in
5240 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5241 and try to make such failures easier to catch in the future.
5242 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5243 that's now the caller's responsibility.
5244 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5245 Set yychar = YYEOF if it's negative.
5246 * tests/actions.at (yylex): Abort if asked to read past EOF.
5247 * tests/conflicts.at (yylex): Likewise.
5248 * tests/cxx-type.at (yylex): Likewise.
5249 * tests/glr-regression.at (yylex): Likewise.
5250 * tests/input.at (yylex): Likewise.
5251 * tests/regression.at (yylex): Likewise.
5252 * tests/torture.at (yylex): Likewise.
5253
5254 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5255
5256 Fix problems with translating English-language diagnostics.
5257 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5258 respect to bison-runtime pot generation. The YY_ stuff
5259 wasn't being captured.
5260 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5261 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5262 * runtime-po/POTFILES.in: Add data/push.c.
5263
5264 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5265
5266 Merge bootstrap changes from coreutils.
5267
5268 2006-09-28 Jim Meyering <jim@meyering.net>
5269
5270 Automatically generated dependencies are important even
5271 when all of the sources in a directory come from gnulib.
5272 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5273 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5274
5275 2006-09-23 Jim Meyering <jim@meyering.net>
5276
5277 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5278
5279 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5280
5281 * bootstrap: Add support for --force.
5282 (usage): New function. Describe usage less tersely.
5283 (CVS_only_file): New var.
5284
5285 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5286
5287 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5288 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5289 Adjust white space and comments to match GNU style better.
5290
5291 2006-09-20 Bob Rossi <bob@brasko.net>
5292
5293 * data/push.c (yyresult_get): Remove function.
5294 (YYPUSH_MORE): Add #define.
5295 (yypushparse): Modify return value.
5296
5297 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5298
5299 * stamp-h.in: Remove; no longer needed.
5300 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5301 Remove config.h, config.hin, intl (no longer created).
5302 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5303 stamp-h1.
5304
5305 Sync bootstrap from coreutils, as follows:
5306
5307 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5308
5309 * bootstrap (symlink_to_gnulib): New function.
5310 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5311 to copies-of-gnulib.
5312 (cp_mark_as_generated, slurp, gnulib_files):
5313 Avoid making a copy if it's the same as the old version.
5314 (gnulib_files): Add support for this variable (used by Bison).
5315
5316 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5317
5318 * src/getargs.c (usage): Rework to use conventions similar to
5319 coreutils, to make translation a bit easier and the code a bit
5320 smaller. Problem reported by Tim Van Holder.
5321
5322 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5323
5324 Use some of gnulib's new modules, taken from coreutils.
5325
5326 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5327 * bootstrap.conf: New file.
5328 (gnulib_modules): Add configmake, inttypes, unistd.
5329 (XGETTEXT_OPTIONS): Add complain, complain_at,
5330 fatal, fatal_at, warn, warn_at, unexpected_end.
5331 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5332 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5333 (gl_EARLY): Add.
5334 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5335 (gl_INIT): Add
5336 (GNULIB_AUTOCONF_SNIPPET): Remove.
5337 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5338 the pickiest.
5339 * lib/.cvsignore: Add inttypes_.h.
5340 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5341 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5342 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5343 no-longer-necessary initializations.
5344 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5345 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5346 use the unistd module.
5347 * src/system.h: Likewise.
5348 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5349 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5350 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5351 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5352 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5353 * src/system.h: Include inttypes.h unconditionally, now that we
5354 use the inttypes module. Don't bother to include stdint.h, since
5355 inttypes.h now does that for us.
5356 (LOCALEDIR): Remove, now that we use the configmake module.
5357 * src/getargs.c: Include configmake.h.
5358 * src/main.c: Likewise.
5359 * src/output.c: Likewise.
5360 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5361 not from $abs_top_builddir, since config.h moved.
5362
5363
5364 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5365 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5366
5367 * src/parse-gram.y (symbol_declaration): Don't put statements
5368 before declarations; it's not portable to C89.
5369 * src/scan-code.l (handle_action_at): Likewise.
5370
5371 * src/scan-code.l: Always initialize braces_level; the old code
5372 left it uninitialized and therefore had undefined behavior.
5373
5374 Don't attempt to redefine 'assert', since it runs afoul of
5375 systems where standard headers (mistakenly) include <assert.h>.
5376 Instead, define and use our own alternative, called 'aver'.
5377 * src/reader.c: Don't include assert.h, since we no longer
5378 use assert.
5379 * src/scan-code.l: Likewise.
5380 * src/system.h (assert): Remove, replacing with....
5381 (aver): New function, taking a bool arg. All uses changed.
5382 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5383 not merely an integer.
5384
5385 2006-09-15 Bob Rossi <bob@brasko.net>
5386
5387 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5388 * data/c.m4 (YYPUSH): New.
5389 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5390 * src/getargs.c (push_parser): New var.
5391 * src/getargs.h (push_parser): New declaration.
5392 * src/output.c (prepare): Add macro insertion of `push_flag'.
5393 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5394 (prologue_declaration): Parse %push-parser.
5395 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5396 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5397 list of removed lines from the traces observed.
5398 (AT_CHECK_CALC_LALR): Added push parser tests.
5399
5400 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5401
5402 * NEWS: Version 2.3a.
5403 * configure.ac (AC_INIT): Likewise.
5404
5405 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5406 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5407 due to header ordering dependencies. I don't know why the #define
5408 was there.
5409
5410 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5411 runtime cost when YYDEBUG is not defined, and so that some tests
5412 that used to fail now work. Problem and initial suggestion by
5413 Paolo Bonzini.
5414 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5415 * data/glr.cc (b4_parser_class_name):
5416 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5417 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5418 (yydebug_) [YYDEBUG]: New member.
5419 (yycdebug_): Now defined only if YYDEBUG.
5420 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5421 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5422 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5423 if YYYDEBUG.
5424 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5425 Define only if YYDEBUG.
5426 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5427 set_debug_level.
5428 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5429 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5430 AT_CHECK_CALC_GLR_CC that are working now.
5431
5432 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5433
5434 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5435 We don't need them in glr.cc, and glr.c defines them.
5436 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5437 assumes that defining it to anything is the same as defining
5438 it to 1. Problem reported by Paolo Bonzini.
5439
5440 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5441
5442 * data/c.m4 (b4_null, b4_case): Define.
5443 * src/output.c (prepare_symbols): Use b4_null.
5444 (user_actions_output): Use b4_case.
5445
5446 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5447
5448 * data/glr.c (b4_shared_declarations): Put start-header first,
5449 before any #includes that we generate, so that feature-test
5450 macros work. Problem reported by Michael Deutschmann in
5451 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5452 * data/lalr1.cc: Likewise.
5453 * doc/bison.texinfo (Prologue): Document that feature-test macros
5454 should be defined before any Bison declarations.
5455 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5456 that depend on location.hh after, not before, Bison decls, since
5457 we now include location.hh after the first user prologue.
5458
5459 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5460 Sander Brandenburg in
5461 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5462 Also, fix minor white space and comment issues.
5463 (Prologue): Mention that it's better to define feature-test macros
5464 before Bison declarations. Problem reported by Michael Deutschmann.
5465
5466 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5467 by Jim Meyering.
5468 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5469 This adjusts to recent gnulib changes.
5470
5471 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5472
5473 Finish implementation of per-type %destructor/%printer. Discussed
5474 starting at
5475 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5476 and
5477 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5478 * NEWS (2.3+): Add a description of this feature to the default
5479 %destructor/%printer description.
5480 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5481 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5482 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5483 list node contains a semantic type.
5484 * src/symtab.c, src/symtab.h: Extend with a table that associates
5485 semantic types with their %destructor's and %printer's.
5486 (semantic_type_from_uniqstr, semantic_type_get,
5487 semantic_type_destructor_set, semantic_type_printer_set): New functions
5488 composing the public interface of that table.
5489 (symbol_destructor_get, symbol_destructor_location_get,
5490 symbol_printer_get, symbol_printer_location_get): If there's no
5491 per-symbol %destructor/%printer, look up the per-type before trying
5492 the default.
5493 * tests/actions.at (Per-type %printer and %destructor): New test case.
5494 * tests/input.at (Default %printer and %destructor redeclared):
5495 Extend to check that multiple occurrences of %symbol-default in a
5496 single %destructor/%printer declaration is an error.
5497 (Per-type %printer and %destructor redeclared, Unused values with
5498 per-type %destructor): New test cases.
5499
5500 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5501
5502 Require default %destructor/%printer to be declared using
5503 %symbol-default instead of an empty symbol list, and start working on
5504 new per-type %destructor/%printer. Discussed at
5505 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5506 * NEWS (2.3+): Add %symbol-default to example.
5507 * bison.texinfo (Freeing Discarded Symbols): Likewise.
5508 (Table of Symbols): Add entry for %symbol-default.
5509 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5510 (generic_symlist, generic_symlist_item): New nonterminals for creating
5511 a list in which each item is a symbol, semantic type, or
5512 %symbol-default.
5513 (grammar_declaration): Use generic_symlist in %destructor and %printer
5514 declarations instead of symbols.1 or an empty list.
5515 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5516 for changes to symbol_list.
5517 * src/reader.c: Update for changes to symbol_list.
5518 * src/scan-code.l: Likewise.
5519 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5520 * src/symlist.c, src/symlist.h: Extend such that a list node may
5521 represent a semantic type or a %symbol-default in addition to just an
5522 ordinary symbol. Add switched functions for setting %destructor's and
5523 %printer's.
5524 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5525 %destructor/%printer declarations.
5526
5527 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5528
5529 Whether the default %destructor/%printer applies to a particular symbol
5530 isn't a question of whether the user *declares* that symbol (in %token,
5531 for example). It's a question of whether the user by any means
5532 *defines* the symbol at all (by simply using a char token, for
5533 example). $end is defined by Bison whereas any other token with token
5534 number 0 is defined by the user. The error token is always defined by
5535 Bison regardless of whether the user declares it with %token, but we
5536 may one day let the user define error as a nonterminal instead.
5537 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5538 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5539 the meaning of "user-defined".
5540 * tests/actions.at (Default %printer and %destructor for user-declared
5541 end token): Rename to...
5542 (Default %printer and %destructor for user-defined end token): ...
5543 this.
5544
5545 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5546 computation of whether to apply the default, don't maintain a list of
5547 every Bison-defined symbol. Instead, just check for a first character
5548 of '$', which a user symbol cannot have, and check for the error token.
5549
5550 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5551
5552 Don't apply the default %destructor or %printer to the error token,
5553 $undefined, or $accept. This change fits the general rule that the
5554 default %destructor and %printer are only for user-declared symbols,
5555 and it solves several difficulties that are described in the new test
5556 cases listed below.
5557 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5558 * tests/actions.at (Default %printer and %destructor are not for error
5559 or $undefined, Default %printer and %destructor are not for $accept):
5560 New test cases.
5561
5562 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5563
5564 Allow %start after the first rule.
5565 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5566 when parsing the first rule.
5567 (check_and_convert_grammar): Search for it here after all grammar
5568 declarations have been parsed. Skip midrules, which have dummy LHS
5569 nonterminals.
5570 * src/symtab.c (symbol_is_dummy): New function.
5571 * src/symtab.h (symbol_is_dummy): Declare it.
5572 * tests/input.at (%start after first rule): New test.
5573
5574 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5575
5576 Redo some of the previous commit: add back the ability to use
5577 non-aliased/undeclared string literals since it might be useful to
5578 those declaring %token-table.
5579 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5580 commit: don't worry about complaints from symbols_pack.
5581 * src/symtab.c (symbol_new, symbol_class_set,
5582 symbol_check_alias_consistency): Undo changes in previous commit: count
5583 each string literal as a new symbol and token, assign it a symbol
5584 number, and don't complain about non-aliased string literals.
5585 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5586 and token counts but does still set aliased tokens to the same number,
5587 symbol_pack_processor now leaves empty slots in the symbols array.
5588 Remove those slots.
5589 * tests/regression.at (Undeclared string literal): Remove test case
5590 added in previous commit since non-aliased string literals are allowed
5591 again.
5592 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5593 remove unnecessary string literal declarations.
5594 * tests/sets.at (Firsts): Likewise.
5595
5596 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5597
5598 Don't allow an undeclared string literal, but allow a string literal to
5599 be used before its declaration.
5600 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
5601 symbols_pack complained.
5602 * src/symtab.c (symbol_new): Don't count a string literal as a new
5603 symbol.
5604 (symbol_class_set): Don't count a string literal as a new token, and
5605 don't assign it a symbol number since symbol_make_alias does that.
5606 (symbol_make_alias): It's not necessary to decrement the symbol and
5607 token counts anymore. Don't assume that an alias declaration occurs
5608 before any uses of the identifier or string, and thus don't assert that
5609 one of them has the highest symbol number so far.
5610 (symbol_check_alias_consistency): Complain if there's a string literal
5611 that wasn't declared as an alias.
5612 (symbols_pack): Bail if symbol_check_alias_consistency failed since
5613 symbol_pack asserts that every token has been assigned a symbol number
5614 although undeclared string literals have not.
5615 * tests/regression.at (String alias declared after use, Undeclared
5616 string literal): New test cases.
5617 (Characters Escapes, Web2c Actions): Declare string literals as
5618 aliases.
5619 * tests/sets.at (Firsts): Likewise.
5620
5621 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
5622
5623 In the grammar scanner, STRING_FINISH unclosed constructs and return
5624 them to the parser in order to improve error messages.
5625 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
5626 SC_BRACED_CODE, SC_PROLOGUE): Implement.
5627 * tests/input.at (Unclosed constructs): New test case.
5628 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
5629 seen.
5630
5631 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
5632 unused global.
5633
5634 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
5635
5636 Handle string aliases for character tokens correctly.
5637 * src/symtab.c (symbol_user_token_number_set): If the token has an
5638 alias, check and set its alias's user token number instead of its own,
5639 which is set to indicate the alias. Previously, every occurrence of
5640 the character token in the grammar overwrote that alias indicator with
5641 the character code.
5642 * tests/input.at (String aliases for character tokens): New test.
5643
5644 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
5645
5646 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
5647
5648 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5649
5650 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
5651 to prevent failures when building on older platforms.
5652 Check for autopoint failure.
5653 Set XGETTEXT_OPTIONS to values that check for C format strings,
5654 so that translators are warned about them (this also helps
5655 prevent core dumps).
5656
5657 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
5658 function, since it simplifies our code a bit.
5659
5660 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
5661 rather than -W, so we don't get bogus warnings about sign comparisons.
5662 Add -Wpointer-arith, since that warning is useful (it reports code
5663 that does not conform to C89 and that some compilers reject).
5664 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
5665 since it's no longer needed.
5666
5667 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
5668
5669 Clean up scanners a bit.
5670 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5671 definitions so gcc won't warn when obstack_for_string is unused.
5672 * src/scan-code.l: config.h and system.h are already #include'd by
5673 scan-code-c.c, so get rid of them here.
5674 * src/scan-gram.l: Likewise.
5675 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
5676 definitions rather than duplicating the rest of it.
5677 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
5678
5679 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
5680
5681 Suppress signed/unsigned comparison warnings for yycheck.
5682 * data/c.m4 (b4_safest_int_type): New macro.
5683 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
5684 a signed int type, cast it to b4_safest_int_type first.
5685 * data/yacc.c: Likewise.
5686 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
5687 also overwritten.
5688
5689 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
5690
5691 * doc/bison.texinfo: Fix some typos.
5692
5693 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
5694
5695 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
5696 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
5697
5698 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
5699 the latest gnulib does this a different way.
5700 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
5701 translation was patched, so stop omitting it.
5702
5703 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5704
5705 Enable declaration of default %printer/%destructor. Make the parser
5706 use these for all user-declared grammar symbols for which the user does
5707 not declare a specific %printer/%destructor. Thus, the parser uses it
5708 for token 0 if the user declares it but not if Bison generates it as
5709 $end. Discussed starting at
5710 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
5711 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
5712 and
5713 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
5714 * NEWS (2.3+): Mention.
5715 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
5716 declare a %destructor for a mid-rule's semantic value. It's just
5717 impossible to declare one specific to it.
5718 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
5719 code. Describe default %destructor form.
5720 * src/parse-gram.y (grammar_declaration): Parse default
5721 %printer/%destructor declarations.
5722 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
5723 and symbol_destructor_location_get rather than accessing the destructor
5724 and destructor_location members of struct symbol.
5725 (symbol_printers_output): Likewise but for %printer's.
5726 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
5727 again.
5728 * src/symtab.c (default_destructor, default_destructor_location,
5729 default_printer, default_printer_location): New static global
5730 variables to record the default %destructor and %printer.
5731 (symbol_destructor_get, symbol_destructor_location_get,
5732 symbol_printer_get, symbol_printer_location_get): New functions to
5733 compute the appropriate %destructor and %printer for a symbol.
5734 (default_destructor_set, default_printer_set): New functions to set the
5735 default %destructor and %printer.
5736 * src/symtab.h: Prototype all those new functions.
5737 * tests/actions.at (Default %printer and %destructor): New test to
5738 check that the right %printer and %destructor are called, that they're
5739 not called for $end, and that $$ and @$ work correctly.
5740 (Default %printer and %destructor for user-declared end token): New
5741 test to check that the default %printer and %destructor are called for
5742 a user-declared end token.
5743 * tests/input.at (Default %printer and %destructor redeclared, Unused
5744 values with default %destructor): New tests to check related grammar
5745 warnings and errors.
5746
5747 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5748
5749 Clean up handling of %destructor for the end token (token 0).
5750 Discussed starting at
5751 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
5752 and
5753 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
5754
5755 Make the skeletons consistent in how they pop the end token and invoke
5756 its %destructor.
5757 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
5758 state, which has token number 0, since this would invoke the
5759 %destructor for the end token.
5760 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
5761 until after shifting the end token, or else it won't be popped.
5762 * data/yacc.c (yyparse): Likewise.
5763
5764 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
5765 it's the end token. Upon termination, destroy an unshifted lookahead
5766 even when it's the end token.
5767 * data/lalr1.cc (yy::parser::parse): Likewise.
5768 * data/yacc.c (yyparse): Likewise.
5769
5770 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
5771 value warnings for the end token when the user gives the end token a
5772 %destructor.
5773
5774 * tests/actions.at (Printers and Destructors): Test all the above.
5775
5776 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
5777
5778 Update to latest gnulib and gettext versions.
5779 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
5780 Add fopen-safer.
5781 (gnulib_files): Add m4/warning.m4. Don't worry about files
5782 overwritten by autopoint.
5783 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
5784 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
5785 rejects them.
5786 Don't use autoreconf; instead, invoke autopoint etc. by hand,
5787 so that we can remove the intl files at a better time.
5788 (intl_files_to_remove): Remove aclocal.m4, since it gets
5789 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
5790 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
5791 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5792 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
5793 Remove datarootdir hack; no longer needed.
5794 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
5795 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
5796 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
5797 strdup.h.
5798 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
5799 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
5800
5801 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
5802
5803 * bootstrap: Adjust to today's change to gnulib-tool by invoking
5804 it with --assume-autoconf='latest-stable'.
5805
5806 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
5807
5808 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
5809 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
5810 YYSTYPE' and `{'.
5811 * src/muscle_tab.h (muscle_grow): Replace the header comments with
5812 those from muscle_tab.c since the old ones are misleading.
5813
5814 2006-07-13 Akim Demaille <akim@epita.fr>
5815
5816 Support %define "KEY" {VALUE}.
5817 * src/scan-code.h, src/scan-code.l (translate_action)
5818 (translate_rule_action, translate_symbol_action, translate_code):
5819 Return char *, not const char *.
5820 * src/parse-gram.y (declaration): Rename as...
5821 (prologue_declaration): this.
5822 (string_content): Remove this nonterminal, use STRING.
5823 (braceless, content, content.opt): New nonterminal.
5824 Use them.
5825 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
5826 as value.
5827 * src/scan-gram.l (getargs.h): Don't include it.
5828
5829 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
5830
5831 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
5832 rather than a for-loop that declares a local bool variable. This
5833 should work around a compatibility problem with a Cray x1e C++
5834 compiler reported by Hung Nguyen in
5835 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
5836 The for-loop was introduced in the 2004-11-17 change but I don't
5837 know why it was needed.
5838
5839 2006-07-12 Akim Demaille <akim@epita.fr>
5840
5841 * data/c.m4: Comment changes.
5842
5843 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
5844
5845 * src/complain.c (error_message, ERROR_MESSAGE): New.
5846 To factor...
5847 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
5848 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
5849
5850 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5851
5852 * NEWS: Instead of %union, you can define and use your own union type
5853 YYSTYPE if your grammar contains at least one <type> tag.
5854 Your YYSTYPE need not be a macro; it can be a typedef.
5855 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
5856 (Union Decl, Decl Summary): Document this.
5857 * data/glr.c (YYSTYPE): Implement this.
5858 * data/glr.cc (YYSTYPE): Likewise.
5859 * data/lalr1.cc (YYSTYPE): Likewise.
5860 * data/yacc.c (YYSTYPE): Likewise.
5861 * src/output.c (prepare): Output tag_seen_flag.
5862 * src/parse-gram.y (declaration, grammar_declaration):
5863 Use 'union_seen' rather than 'typed' to determine whether
5864 %union has been seen, since grammars can now be typed without
5865 %union.
5866 (symbol_declaration, type.opt, symbol_def):
5867 Keep track of whether a tag has been seen.
5868 * src/reader.c (union_seen, tag_seen): New vars.
5869 (typed): remove.
5870 * src/reader.h (union_seen, tag_seen, typed): Likewise.
5871 * src/scan-code.l (untyped_var_seen): New variable.
5872 (handle_action_dollar): Adjust to above changes.
5873 (handle_action_dollar, handle_action_at):
5874 Improve overflow checking for outlandish numbers.
5875 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
5876 avoid new diagnostics generated by above changes.
5877 * tests/regression.at (YYSTYPE typedef): Add test to check
5878 for type tags without %union.
5879
5880 * src/symlist.c (symbol_list_length): Return int, not unsigned
5881 int, since callers expect int. This may need to get revisited
5882 once we have proper integer overflow checking.
5883
5884 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
5885 object is now static.
5886
5887 * src/getargs.c (flags_argmatch): Return void, not int,
5888 to pacify ./configure --enable-gcc-warnings.
5889
5890 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
5891 since last_string is already defined to FLEX_PREFIX (last_string).
5892
5893 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
5894
5895 Implement --warnings/-W.
5896 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
5897 replaced by...
5898 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
5899 Adjust callers.
5900 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
5901 (warnings_args, warnings_types): New.
5902 (getargs, short_options, long_options): Accept -W/--warnings.
5903 Sort the options by alphabetical order, upper case letter right
5904 before its lower case.
5905
5906 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5907
5908 Change %merge result type clash warnings to errors. Discussed at
5909 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
5910 * src/reader.c (record_merge_function_type): Use complain_at.
5911 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5912 declared later): Update test case results.
5913
5914 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
5915
5916 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
5917 to be in alphabetical order.
5918 (trace_args): Spelling fixes.
5919
5920 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5921
5922 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
5923 so they don't collide with user-defined macros.
5924 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
5925 this was never guaranteed, and now that we're using gnulib stdint,
5926 which defines int_fast16_t to long int, the problem is exposed.
5927
5928 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
5929
5930 * data/c.m4 (b4_basename): Simplify a bit, since we don't
5931 need the full POSIX semantics (and weren't implementing them
5932 anyway).
5933
5934 Adjust to Autoconf 2.60 and today's gnulib.
5935 * bootstrap (gnulib_modules): Add stdint.
5936 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
5937 no longer copies it.
5938 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
5939 since stdint needs the former and wcwidth (which is now required
5940 by mbswidth) needs the latter.
5941 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
5942 work around a compatibility glitch between gettext 0.14.6 and
5943 Autoconf 2.60.
5944 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
5945 Do not check for uintptr_t, since new stdint module does the right
5946 thing.
5947 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
5948 Add stdint.h, stdint_.h, wcwidth.h.
5949 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
5950 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
5951 stdint.m4, wchar_t.m4, wcwidth.m4.
5952 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
5953 usual order for ../lib/*.h files.
5954 (file_name_split): Use last_component, not base_name, to adjust
5955 to gnulib changes.
5956 * src/parse-gram.h: Include <strverscmp.h> in the usual order
5957 for ../lib/*.h files.
5958 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
5959 Define unconditionally, since we now assume the stdint module.
5960 * src/scan-skel.l: Include <dirname.h>.
5961 (BASE_QPUTS): Use last_component, not base_name.
5962 * src/system.h: Include <unlocked-io.h> in the usual order
5963 for ../lib/*.h files. Include <stdint.h> unconditionally,
5964 since we now use the stdint module.
5965 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
5966 HAVE_UINTPTR_T, since we now use the stdint module.
5967 (base_name): Remove decl, since files now include <dirname.h>
5968 to get the decl.
5969
5970 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
5971
5972 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
5973 New, default to 1.
5974 * data/yacc.c, data/glr.c, data/location.cc: Use them.
5975 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
5976 default.
5977 * tests/calc.at: Adjust.
5978
5979 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
5980
5981 * data/c.m4 (b4_basename): New.
5982 (b4_syncline): Also output the location of its invocation (from
5983 the skeleton).
5984 (b4_user_action, b4_define_user_action, b4_user_actions)
5985 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
5986 (b4_user_stype): New.
5987 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
5988
5989 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5990
5991 In the grammar file, the first column is 1 not 0 on the first line as
5992 on every other line.
5993 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
5994 * tests/input.at (Torturing the Scanner): Update output.
5995
5996 * src/scan-gram.l (scanner_cursor): Declare it static.
5997
5998 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5999
6000 In warnings, say "previous declaration" rather than "first
6001 declaration".
6002 * src/symtab.c (redeclaration): Do that here.
6003 * src/reader.c (record_merge_function_type): In the case of a result
6004 type clash, report the previous declaration rather than the very first
6005 one in the grammar file.
6006 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6007 declared later): Add a third declaration to check this behavior.
6008 * tests/input.at (Incompatible Aliases): Update output.
6009
6010 2006-06-27 Akim Demaille <akim@epita.fr>
6011
6012 * doc/Doxyfile.in: New.
6013 * doc/Makefile.am: Use it.
6014 * src/lalr.h, src/symtab.h: Initial doxygenation.
6015
6016 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6017
6018 Don't miss %merge result type warnings just because the LHS types are
6019 declared after the %merge. This continues the effort of the previous
6020 patch.
6021 * src/reader.c (get_merge_function): Don't set the merger type yet.
6022 (record_merge_function_type): New function for setting the merger type
6023 and checking for clashes.
6024 (grammar_current_rule_merge_set): Set the location of the %merge for
6025 the current rule.
6026 (packgram): Invoke record_merge_function_type for each rule now that
6027 all symbol type declarations have been parsed.
6028 * src/reader.h (merger_list.type_declaration_location): New member
6029 storing the location of the first %merge from which the type for this
6030 merging function was derived.
6031 * src/symlist.h (symbol_list.merger_declaration_location): New member
6032 storing the location of a rule's %merge, if any.
6033 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6034 declared later): New test to catch the error fixed by the above patch.
6035
6036 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6037
6038 Get action warnings (grammar_rule_check) right even when symbol
6039 declarations appear after the rules. Discussed at
6040 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6041 and
6042 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6043 Don't mistake the type of $$ in a midrule to be that of its parent
6044 rule's $$.
6045 * src/reader.c (grammar_current_rule_end): Don't invoke
6046 grammar_rule_check yet since not all symbol declarations may have been
6047 parsed yet.
6048 (grammar_midrule_action): Likewise.
6049 Don't record whether the midrule's $$ has been used yet since actions
6050 haven't been translated yet.
6051 Record the midrule's parent rule and its RHS index within the parent
6052 rule.
6053 (grammar_current_rule_action_append): Don't translate the action yet
6054 since not all symbol declarations may have been parsed yet and, thus,
6055 warnings about types for $$, $n, @$, and @n can't be reported yet.
6056 (packgram): Translate the action and invoke grammar_rule_check now that
6057 all symbol declarations have been parsed.
6058 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6059 after parsing the entire grammar file, the symbol list here in the case
6060 of a midrule is actually the midrule's empty RHS, so reference its
6061 parent rule's RHS where necessary.
6062 On the other hand, now that you can already know it's a midrule, you
6063 aren't forced to think $$ has the same type as its parent rule's $$.
6064 (handle_action_at): In the case of a midrule, reference the parent rule
6065 where necessary.
6066 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6067 members.
6068 (symbol_list_length): Now that this is invoked after all rules have
6069 been parsed, a NULL symbol (rather than a NULL symbol list node)
6070 terminates a rule. symbol_list_print already does this correctly.
6071 * src/symlist.h (symbol_list.midrule_parent_rule,
6072 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6073 remember their relationships with their parents.
6074 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6075 fixed by the above patch.
6076 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6077 implementing...
6078 (Unused values): ... this old test case and...
6079 (Unused values before symbol declarations): ... this new test case.
6080 This one is the same as `Unused values' except that all symbol
6081 declarations appear after the rules in order to catch the rest of the
6082 errors fixed by the above patch.
6083
6084 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6085
6086 More cleanup.
6087 * src/reader.c (current_rule): Declare it static since it's no longer
6088 used outside this file.
6089 (grammar_current_rule_action_append): Remove redundant arguments from
6090 translate_rule_action invocation.
6091 * src/reader.h (current_rule): Remove this unused extern.
6092 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6093 * src/scan-code.l (translate_rule_action): Likewise.
6094
6095 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6096
6097 Clean up yesterday's patch.
6098 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6099 to...
6100 * src/reader.c (grammar_current_rule_action_append): ... here for
6101 consistency with grammar_current_rule_symbol_append.
6102 * tests/regression.at (Braced code in declaration in rules section):
6103 Make yyerror and yylex static as usual.
6104
6105 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6106
6107 Fix bug that mistakes braced code in a declaration in the rules section
6108 to be a rule action. Mentioned at
6109 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6110 * src/scan-gram.l: Move midrule action detection from the start of the
6111 scanning of any braced code to...
6112 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6113 action. For readability, use $2 and @2 rather than the equivalent
6114 global variables.
6115 * tests/regression.at (Braced code in declaration in rules section):
6116 New test to catch the error fixed by the above patch.
6117
6118 Work on code readability some.
6119 * src/scan-code.l (current_rule): Get rid of this misleading and
6120 redundant declaration: it's actually extern'ed in reader.h.
6121 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6122 translate_action): Add a rule argument and use it instead of the global
6123 current_rule.
6124 (translate_rule_action): This already receives current_rule through an
6125 argument, so pass it on to translate_action instead of assigning
6126 current_rule to current_rule.
6127 (translate_symbol_action, translate_code): Pass rule = NULL to
6128 translate_action.
6129
6130 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6131
6132 Rename %before-definitions to %start-header and %after-definitions to
6133 %end-header. Don't use these declarations to separate pre-prologue
6134 blocks from post-prologue blocks. Add new order-independent
6135 declarations %before-header and %after-header as alternatives to the
6136 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6137 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6138 * NEWS (2.3+): Update for these changes.
6139 * data/glr.c (b4_before_definitions): Update to...
6140 (b4_start_header): ... this.
6141 (b4_after_definitions): Update to...
6142 (b4_end_header): ... this.
6143 * data/glr.cc: Likewise.
6144 * data/lalr1.cc: Likewise.
6145 * data/yacc.c: Likewise.
6146 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6147 prologue blocks with %*-header declarations.
6148 (Calc++ Parser): Likewise.
6149 (Decl Summary): Update names.
6150 (Table of Symbols): Update description.
6151 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6152 (PERCENT_END_HEADER): ... this.
6153 (PERCENT_BEFORE_DEFINITIONS): Update to...
6154 (PERCENT_START_HEADER): ... this.
6155 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6156 (declaration): Update token names and m4 macro names.
6157 When parsing %end-header and %start-header, invoke translate_code
6158 before muscle_code_grow, and no longer set global booleans to remember
6159 whether these declarations have been seen.
6160 Parse new %after-header and %before-header.
6161 * src/reader.c (before_definitions, after_definitions): Remove.
6162 (prologue_augment): Accept a new bool argument to specify whether to
6163 augment the pre-prologue or post-prologue.
6164 * src/reader.h (before_definitions, after_definitions): Remove these
6165 extern's.
6166 (prologue_augment): Add new bool argument.
6167 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6168 (PERCENT_END_HEADER): ... this.
6169 (PERCENT_BEFORE_DEFINITIONS): Update to...
6170 (PERCENT_START_HEADER): ... this.
6171 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6172 * tests/actions.at (Printers and Destructors): Update names.
6173
6174 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6175
6176 Add comparison operators for C++ location classes. Discussed at
6177 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6178 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6179 declaration indicating whether filename_type has an operator==. If
6180 filename_type is `std::string', it defaults to `1', `0' otherwise.
6181 * data/location.cc: Iff b4_define_location_comparison is `1', add
6182 operator== and operator!= for class position and for class location.
6183
6184 Some minor fixes.
6185 * src/scan-action.l: Remove unused file.
6186 * src/symtab.c (symbol_printer_set): Use printer_location not
6187 destructor_location.
6188 * src/symtab.h (struct symbol): Replace incorrect source comment for
6189 printer members.
6190 * tests/input.at (Incompatible Aliases): Update output with correct
6191 printer location.
6192
6193 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6194
6195 Don't put the pre-prologue in the header file. For the yacc.c code
6196 file and the glr.c header and code files, move the pre-prologue before
6197 the token definitions. Add new %before-definitions and
6198 %after-definitions to declare code that will go in both the header file
6199 and code file. Discussed at
6200 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6201 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6202 and
6203 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6204 * NEWS (2.3+): Describe these changes.
6205 * data/glr.c (b4_pre_prologue): Move from within to before...
6206 (b4_shared_declarations): ... this.
6207 Add new b4_before_definitions before b4_token_enums.
6208 Add new b4_after_definitions at the end.
6209 * data/glr.cc (b4_pre_prologue): Replace with...
6210 (b4_before_definitions): ... this in the header file.
6211 (b4_after_definitions): New near the end of the header file.
6212 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6213 code file right before including the header file.
6214 (b4_before_definitions): New in the previous position of
6215 b4_pre_prologue in the header file.
6216 (b4_after_definitions): New near the end of the header file.
6217 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6218 (b4_token_enums_defines): In the code file, move to right before
6219 YYSTYPE for consistency with the header file.
6220 (b4_before_definitions): New right before b4_token_enums_defines in
6221 both the header and code file.
6222 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6223 header and code file.
6224 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6225 of prologues for %union dependencies.
6226 (Decl Summary): In %defines description, mention the effect of
6227 %before-definitions and %after-definitions on the header file.
6228 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6229 than in the pre-prologue so that make check succeeds.
6230 (Table of Symbols): Add entries for %before-definitions and
6231 %after-definitions.
6232 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6233 %before-definitions.
6234 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6235 (declaration): Parse those declarations and append to
6236 b4_before_definitions and b4_after_definitions, respectively.
6237 * src/reader.c (before_definitions, after_definitions): New bools to
6238 track whether those declarations have been seen.
6239 (prologue_augment): Add to the post-prologue if %union,
6240 %before-definitions, or %after-definitions has been seen.
6241 * src/reader.h (before_definitions, after_definitions): New extern's.
6242 * src/scan-gram.l: Scan the new declarations.
6243 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6244 prologue block in a %before-definitions or a %after-definitions based
6245 on whether the %union is declared.
6246 * tests/regression.at (Early token definitions with --yacc, Early token
6247 definitions without --yacc): Move tests for token definitions into the
6248 post-prologue since token names are no longer defined in the
6249 pre-prologue.
6250
6251 2006-06-20 Akim Demaille <akim@epita.fr>
6252
6253 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6254 (symbol_get): Use it.
6255 * src/parse-gram.y: Use it.
6256
6257 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6258
6259 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6260 build succeeds when configured with --enable-gcc-warnings.
6261
6262 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6263
6264 * src/parse-gram.y (char_name): New function.
6265 (CHAR, STRING, string_content): For %printer, properly escape.
6266 (ID): Prefer fputs to fprintf.
6267 (id): Reindent to be consistent with other rules.
6268 Properly quote char.
6269
6270 The Translation Project changed its way of publishing translations
6271 to maintainers. I haven't received any responses to my request
6272 for supporting the old way, or for documenting the new way. I
6273 have modified 'bootstrap' to use screen scraping
6274 (in this case, HTML scraping). This is unreliable and inelegant,
6275 but I don't see any better way. Yuck.
6276 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6277 (get_translations): New function, which uses HTML scraping to
6278 deduce locations of latest translations.
6279 Use this function to grab both bison and bison-runtime .po files.
6280 Don't bother priming the pump for the runtime-po domain any more,
6281 as it's now translated better than bison is.
6282
6283 2006-06-19 Akim Demaille <akim@epita.fr>
6284
6285 * src/scan-gram.l: No longer "parse" things after `%union' until
6286 `{'. Rather, return a single "%union" token.
6287 No longer make symbols: return strings, and leave the conversion
6288 to symbols to the parser.
6289 (SC_PRE_CODE, token_type): Remove.
6290 * src/parse-gram.y (%union): New field `character'.
6291 Sort tokens.
6292 (CHAR): New token.
6293 (ID, ID_COLON): Now that the scanner no longer makes them
6294 identifiers, adjust all uses to invoke symbol_get.
6295 (id_colon): New, wraps the conversion from string to symbol.
6296 (%union): Accept a possible union_name.
6297 (symbol): Now can be a char.
6298 * data/c.m4 (b4_union_name): Leave a default value.
6299 * data/glr.c, data/yacc.c: Use it.
6300
6301 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6302
6303 For associating token numbers with token names for "yacc.c", don't use
6304 #define statements unless `--yacc' is specified; always use enum
6305 yytokentype. Most important discussions start at:
6306 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6307 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6308 and
6309 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6310 * NEWS (2.3+): Mention.
6311 * data/c.m4 (b4_yacc_if): New.
6312 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6313 token #define's.
6314 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6315 on token name definitions.
6316 * src/getargs.c (usage): Capitalize `Yacc' in English.
6317 * src/output.c (prepare): Define b4_yacc_flag.
6318 * tests/regression.at (Early token definitions): Test that tokens names
6319 are defined before the pre-prologue not just before the post-prologue.
6320 Remove this test case and copy to...
6321 (Early token definitions with --yacc): ... this to test #define's.
6322 (Early token definitions without --yacc): ... and this to test enums.
6323
6324 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6325
6326 * NEWS: Reword the post-2.3 change to not be so optimistic about
6327 removing the old "look-ahead" spelling.
6328 Update previous look-ahead/lookahead change reports.
6329 * REFERENCES: look-ahead -> lookahead (since that's
6330 what he actually wrote).
6331 * doc/refcard.tex: look ahead -> lookahead,
6332 look-ahead -> lookahead
6333
6334 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6335
6336 For consistency, use `lookahead' instead of `look-ahead' or
6337 `look_ahead'. Discussed starting at
6338 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6339 and then at
6340 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6341 * NEWS: For the next release, note the change to `--report'.
6342 * TODO, doc/bison.1: Update English.
6343 * doc/bison.texinfo: Update English.
6344 (Understanding Your Parser, Bison Options): Document as
6345 `--report=lookahead' rather than `--report=look-ahead'.
6346 * src/conflicts.c: Update English in comments.
6347 (lookahead_set): Rename from look_ahead_set.
6348 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6349 (resolve_sr_conflict): Rename local look_ahead_tokens to
6350 lookahead_tokens, and update other uses.
6351 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6352 count_rr_conflicts, conflicts_free): Update uses.
6353 * src/getargs.c (report_args): Move "lookahead" before alternate
6354 spellings.
6355 (report_types): Update uses.
6356 (usage): For `--report' usage description, state `lookahead' spelling
6357 rather than `look-ahead'.
6358 * src/getargs.h (report.report_lookahead_tokens): Rename from
6359 report_look_ahead_tokens.
6360 * src/lalr.c: Update English in comments.
6361 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6362 (state_lookahead_tokens_count): Rename from
6363 state_look_ahead_tokens_count.
6364 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6365 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6366 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6367 Update other uses.
6368 Update English in output.
6369 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6370 * src/print.c: Update English in comments.
6371 (lookahead_set): Rename from look_ahead_set.
6372 (print_reduction): Rename argument lookahead_token from
6373 look_ahead_token.
6374 (print_core, state_default_rule, print_reductions, print_results):
6375 Update uses.
6376 * src/print_graph.c: Update English in comments.
6377 (print_core): Update uses.
6378 * src/state.c: Update English in comments.
6379 (reductions_new): Update uses.
6380 (state_rule_lookahead_tokens_print): Rename from
6381 state_rule_look_ahead_tokens_print, and update other uses.
6382 * src/state.h: Update English in comments.
6383 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6384 (state_rule_lookahead_tokens_print): Rename from
6385 state_rule_look_ahead_tokens_print.
6386 * src/tables.c: Update English in comments.
6387 (conflict_row, action_row): Update uses.
6388 * tests/glr-regression.at
6389 (Incorrect lookahead during deterministic GLR,
6390 Incorrect lookahead during nondeterministic GLR): Rename
6391 print_look_ahead to print_lookahead.
6392 * tests/torture.at: Update English in comments.
6393 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6394 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6395 (Many lookahead tokens): Update uses.
6396 * data/glr.c: Update English in comments.
6397 * lalr1.cc: Likewise.
6398 * yacc.c: Likewise.
6399 * src/conflicts.h: Likewise.
6400 * src/lalr.h: Likewise.
6401 * src/main.c: Likewise.
6402 * src/output.c: Likewise.
6403 * src/parse-gram.c: Likewise.
6404 * src/tables.h: Likewise.
6405 * tests/calc.at: Likewise.
6406
6407 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6408
6409 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6410
6411 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6412
6413 * TODO: Add request from Nelson H. F. Beebe to be able to install
6414 Bison without installing the yacc script.
6415
6416 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6417
6418 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6419 and yytext if they're already #define'd.
6420 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6421 * src/scan-code-c.c: ... here.
6422 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6423 <config.h>.
6424
6425 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6426
6427 Get Bison to build again when configured with --enable-gcc-warnings.
6428 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6429 missing #include's.
6430 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6431 loc argument as it shadows a global.
6432 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6433 invocation.
6434
6435 * src/.cvsignore: Add scan-code.c.
6436
6437 2006-06-07 Akim Demaille <akim@epita.fr>
6438
6439 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6440 to...
6441 * src/scan-code.l: here.
6442 * tests/input.at (Torturing the Scanner): Fix another location
6443 error.
6444
6445 2006-06-07 Akim Demaille <akim@epita.fr>
6446
6447 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6448
6449 2006-06-06 Akim Demaille <akim@epita.fr>
6450
6451 Extract the parsing of user actions from the grammar scanner.
6452 As a consequence, the relation between the grammar scanner and
6453 parser is much simpler. We can also split "composite tokens" back
6454 into simple tokens.
6455 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6456 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6457 rename as...
6458 * src/location.h, src/location.c (add_column_width)
6459 (location_compute): these.
6460 Fix the column count: the initial column is 0.
6461 (location_print): Be robust to ending column being 0.
6462 * src/location.h (boundary_set): New.
6463 * src/main.c: Adjust to scanner_free being renamed as
6464 gram_scanner_free.
6465 * src/output.c: Include scan-code.h.
6466 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6467 Use boundary_set.
6468 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6469 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6470 which is now, again, a separate token.
6471 Adjust all dependencies.
6472 Whereever actions with $ and @ are used, use translate_code.
6473 (action): Remove this nonterminal which is now useless.
6474 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6475 (grammar_current_rule_action_append): Use translate_code.
6476 (packgram): Bound check ruleno, itemno, and rule_length.
6477 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6478 (last_string, last_braced_code_loc, max_left_semantic_context)
6479 (scanner_initialize, scanner_free, scanner_last_string_free)
6480 (gram_out, gram_lineno, YY_DECL_): Move to...
6481 * src/scan-gram.h: this new file.
6482 (YY_DECL): Rename as...
6483 (GRAM_DECL): this.
6484 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6485 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6486 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6487 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6488 Move these declarations, and...
6489 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6490 these to...
6491 * src/flex-scanner.h: this new file.
6492 * src/scan-gram.l (rule_length, rule_length_overflow)
6493 (increment_rule_length): Remove.
6494 (last_braced_code_loc): Rename as...
6495 (gram_last_braced_code_loc): this.
6496 Adjust to the changes of the parser.
6497 Move all the handling of $ and @ into...
6498 * src/scan-code.l: here.
6499 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6500 (handle_action_dollar, handle_action_at): Move to...
6501 * src/scan-code.l: here.
6502 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6503 scan-code.h, scan-code-c.c, scan-gram.h.
6504 (EXTRA_bison_SOURCES): Add scan-code.l.
6505 (BUILT_SOURCES): Add scan-code.c.
6506 (yacc): Be robust to white spaces.
6507
6508 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6509 * tests/regression.at: Adjust the column numbers.
6510 * tests/regression.at: Adjust the error message.
6511
6512 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6513
6514 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6515 Use Akim's wording from
6516 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6517
6518 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6519
6520 Between Bison releases, manually append `+' to the previous Bison
6521 release number, and use that as a signal to automatically print the
6522 ChangeLog's CVS Id keyword from --version. Discussed starting at
6523 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6524 * ChangeLog: Add Id header.
6525 * configure.ac (AC_INIT): Append `+' to `2.3'.
6526 * src/.cvsignore: Add revision.c.
6527 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6528 (BUILT_SOURCES): Add revision.c.
6529 (revision.c): New target rule. This file defines a new global variable
6530 named revision. It initializes it with either the Id from ChangeLog
6531 or, if VERSION doesn't contain `+', with the empty string.
6532 * src/getargs.c (version): Print the value of revision.
6533 * src/revision.h: Extern revision.
6534
6535 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6536
6537 * NEWS: Version 2.3.
6538 * configure.ac (AC_INIT): Likewise.
6539
6540 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6541
6542 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6543 with no arguments, not as an object-like macro. This is for
6544 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6545 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6546 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6547 Document this.
6548
6549 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6550
6551 * src/getargs.c (usage): Back out yesterday's modification of the
6552 --help output so that we don't have to wait for translation before
6553 releasing 2.3.
6554
6555 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6556
6557 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6558 Problem reported by Akim Demaille.
6559
6560 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6561
6562 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6563
6564 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6565
6566 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6567 generated source code. Problem reported by Frans Englich in
6568 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6569
6570 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6571
6572 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6573 shell, not within 'make', so that 'make' by an ordinary builder
6574 (using GNU make) does not worry about configuring gzip. This also
6575 works around a bug reported independently by Keith Thompson and by
6576 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6577 stderr rather than stdout, messing up the build logs.
6578
6579 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6580
6581 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6582 to make sure that YYID will never be unused. This fixes a 'make
6583 maintainer-check' failure caused by the recent changes to the 'Trivial
6584 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6585 not used.
6586 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6587
6588 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6589
6590 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6591 state before an empty RHS is always resolved here. Only the location
6592 of that state is guaranteed to be resolved, and that's enough. This
6593 fixes the remaining bug reported by Derek M. Jones in
6594 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6595 * tests/glr-regression.at (Uninitialized location when reporting
6596 ambiguity): Test the above case.
6597 Also, the embedded comments in this test case claim it checks the case
6598 of an empty RHS that has inherited the initial location. However, the
6599 corresponding LHS was already resolved, so yyresolveLocations didn't
6600 actually have reason to modify it. Fix this by forcing
6601 nondeterministic operation at the beginning of the parse.
6602
6603 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
6604
6605 * data/c.m4 (b4_yy_symbol_print_generate):
6606 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
6607 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
6608 of the bugs reported today by Derek M Jones in
6609 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6610 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
6611 defined to be a type name without parens or brackets.
6612 (Location Type): Similarly for YYLTYPE.
6613 * tests/regression.at (Trivial grammars): Put in a test for this
6614 bug that will be caught by 'make maintainer-check' (though not,
6615 alas, by 'make check' unless your compiler is picky).
6616
6617 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
6618
6619 * NEWS: Version 2.2.
6620 * configure.ac (AC_INIT): Likewise.
6621
6622 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
6623
6624 * data/glr.c (yyreportTree): Make room in yystates for the state
6625 preceding the RHS. This fixes the segmentation fault reported by Derek
6626 M. Jones in
6627 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
6628 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
6629 to the user. Reported for yyreportTree by Derek M. Jones later in the
6630 same thread.
6631 * THANKS: Add Derek M. Jones.
6632 Update my email address.
6633 Fix typo in Steve Murphy's name.
6634
6635 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
6636
6637 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
6638 checking against YYLAST that caused the parser to miss a potential
6639 alternative in its diagnostic.
6640 Problem reported by Maria Jose Moron Fernandez in
6641 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
6642 * data/lalr1.cc (yysyntax_error_): Likewise.
6643 * data/yacc.c (yysyntax_error): Likewise.
6644 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
6645 tokens, in case we run into an older C compiler.
6646 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
6647 Use them to check for the off-by-one error fixed above.
6648
6649 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
6650 YYSIZE_T, not size_t.
6651 * tests/regression.at (Trivial grammars): New test, to catch
6652 the error fixed by the above patch.
6653
6654 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6655
6656 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
6657 scheme.
6658 Reported by Steve Murphy.
6659
6660 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6661
6662 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
6663 * data/glr.cc: b4_location_flag is now b4_locations_flag.
6664
6665 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6666
6667 Implement --trace=m4.
6668 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
6669 * src/output.c (output_skeleton): When set, pass -dV to m4.
6670
6671 Factor the handling of flags in m4.
6672 * src/output.c (prepare): Rename the muscle names debug, defines,
6673 error_verbose to debug_flag, defines_flag, error_verbose_flag.
6674 * data/c.m4: Adjust.
6675 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
6676 Use b4_define_flag_if to define other b4_FLAG_if macros.
6677 (b4_location_if): As a consequence, rename as...
6678 (b4_locations_if): this, for consistency.
6679 Adjust all the skeletons.
6680
6681 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6682
6683 * etc/bench.pm: Shorten bench names.
6684
6685 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6686
6687 * src/output.h, src/output.c (error_verbose): Move to...
6688 * src/getargs.h, src/getargs.c: here.
6689 Sort the flags.
6690 Adjust dependencies.
6691
6692 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
6693
6694 * data/c.m4 (b4_copyright): Put the special exception for Bison
6695 skeletons here, so we don't have to put it in each skeleton. All
6696 uses changed. Suggested by Akim Demaille. Also, wrap the
6697 copyright notice, in case it is longer than 80 columns. Replace
6698 comma by newline after title.
6699
6700 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
6701
6702 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
6703 incompatibility, not a bug. Mention that it wasn't fixed as of
6704 flex 2.5.33.
6705
6706 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6707
6708 * examples/extexi: Enforce the precedence of concatenation over
6709 >>.
6710 Reported by Tommy Nordgren.
6711
6712 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6713
6714 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
6715 with the member "token".
6716 Reported by Martin Nylin.
6717
6718 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
6719
6720 * data/glr.c: Switch to Bison 2.2 special-exception language in
6721 the copyright notice. Use more-regular format for titles and
6722 copyright notices.
6723 * data/glr.cc: Likewise.
6724 * data/location.cc: Likewise.
6725 * data/yacc.cc: Likewise.
6726 * doc/bison.texinfo (Conditions): Document this.
6727 * NEWS: likewise. Upgrade version to 2.2.
6728
6729 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
6730
6731 * data/glr.cc: Remove dead code.
6732
6733 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
6734
6735 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
6736 that variable and the line breaks the bootstrap. Problem reported
6737 by Juan M. Guerrero.
6738
6739 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6740
6741 * doc/bison.texinfo (Multiple start-symbols): New.
6742
6743 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6744
6745 * etc/README, etc/bench.pl: New.
6746
6747 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
6748
6749 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
6750 rule.
6751 Reported by Mickael Labau.
6752 * tests/input.at (Torturing the Scanner): Test it.
6753
6754 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
6755
6756 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
6757 Problem reported by Bob Rossi.
6758
6759 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
6760
6761 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
6762 and didn't really work.
6763 For the index, use @ifnotinfo, not @iftex.
6764 Minor cleanups of spacing and terminology.
6765
6766 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6767
6768 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
6769 of AT_NAME_PREFIX when %name-prefix is not used.
6770
6771 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6772
6773 Apply --prefix to C++ skeletons too: they change the namespace.
6774 The test suite already exercize these cases.
6775 * data/c++.m4 (b4_namespace): New.
6776 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
6777 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
6778 * data/yacc.c, data/glr.c: Remove a useless `[]'.
6779 * doc/bison.texinfo: Document it.
6780 (Option Cross Key): Use @multitable in all formats. It looks
6781 nicer, even in TeX outputs.
6782 (Rules): Use the same code whatever the output type is.
6783 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
6784 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
6785 * tests/calc.at: Use it, instead of hard coding `yy'.
6786
6787 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6788
6789 * TODO: Remove dead items.
6790
6791 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6792
6793 * doc/FAQ: Remove, merged into...
6794 * doc/bison.texinfo (FAQ): this.
6795 * doc/Makefile.am (EXTRA_DIST): Adjust.
6796
6797 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6798
6799 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
6800 even if empty.
6801 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
6802 * doc/bison.texinfo (Calc++ Scanner): Use it.
6803
6804 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
6805
6806 Fix two nits reported by twlevo, plus one more that I discovered.
6807
6808 * src/assoc.h (assoc_to_string): Give a name to the arg, as
6809 this is the usual Bison style.
6810 * src/location.h (location_print): Likewise.
6811
6812 * src/reader.h (token_name): Likewise.
6813
6814 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
6815
6816 Fix some nits reported by twlevo.
6817 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
6818 and "POSIX". Use more-modern syntax for URLs. Mention C++
6819 and ask for Java. Don't hardwire OS version numbers. Add
6820 copyright notice.
6821 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
6822 * src/conflicts.c (solved_conflicts_obstack): Now static.
6823
6824 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6825
6826 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
6827 page. Say "you can use it" not "you may use it" as on the web page;
6828 we're describing capabilities not granting permission.
6829
6830 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
6831
6832 * data/glr.c (yyresolveLocations): Rename local variables to avoid
6833 shadowing warnings. Use usual patter for iterating through RHS.
6834 * tests/glr-regression.at
6835 (Uninitialized location when reporting ambiguity):
6836 Modify yylex so that it uses its argument, rather than trying
6837 to rely on ARGSUSED (which doesn't work for gcc with warnings).
6838 const char -> char const.
6839
6840 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
6841 Don't use tabs inside commands; it messes up 'ps'.
6842 Problem reported by twlevo.
6843
6844 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
6845
6846 * tests/glr-regression.at (Uninitialized location when reporting
6847 ambiguity): New test case.
6848 * data/glr.c (yyresolveLocations): New function, which uses
6849 YYLLOC_DEFAULT.
6850 (yyresolveValue): Invoke yyresolveLocations before reporting an
6851 ambiguity.
6852 * doc/bison.texinfo (Default Action for Locations): Note
6853 YYLLOC_DEFAULT's usage for ambiguity locations.
6854 (GLR Semantic Actions): Cross-reference those notes.
6855
6856 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
6857
6858 * tests/glr-regression.at (Leaked semantic values when reporting
6859 ambiguity): Remove unnecessary union and type declarations.
6860 (Leaked lookahead after nondeterministic parse syntax error): New test
6861 case.
6862 * data/glr.c (yyparse): Check for zero stacks remaining before
6863 attempting to shift the lookahead so that you don't lose it.
6864
6865 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6866
6867 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
6868 * tests/glr-regression.at (Leaked semantic values when reporting
6869 ambiguity): New test case.
6870 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
6871 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
6872 now unnecessary yystackp parameter.
6873 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
6874 destructors can be called.
6875
6876 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
6877 in existing testcases.
6878
6879 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6880
6881 Don't leak semantic values for parent RHS when a user action cuts the
6882 parser, and clean up related code a bit.
6883 * tests/glr-regression.at (Leaked merged semantic value if user action
6884 cuts parse): Rename to...
6885 (Leaked semantic values if user action cuts parse): ... this. Add check
6886 for leaked parent RHS values.
6887 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
6888 between an unresolved state (non-empty chain of semantic options) and
6889 an incomplete one (signaled by an empty chain).
6890 (yyresolveStates): Document the interface. Move all manipulation of a
6891 successfully or unsuccessfully resolved yyGLRState to...
6892 (yyresolveValue): ... here so that yyresolveValue always leaves a
6893 yyGLRState with consistent data and thus is easier to understand.
6894 Remove the yyvalp and yylocp parameters since they are always just
6895 taken from the yys parameter. When reporting a discarded merged value
6896 in debugging output, note that it is incompletely merged. Document the
6897 interface.
6898 (yyresolveAction): If resolving any of the RHS states fails, destroy
6899 them all rather than leaking them. Thus, as long as user actions are
6900 written to clean up the RHS correctly, yyresolveAction always cleans up
6901 the RHS of a semantic option. Document the interface.
6902
6903 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
6904
6905 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
6906 led to a segmentation fault in GNU Pascal. Problem reported
6907 by Waldek Hebisch.
6908
6909 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
6910
6911 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
6912 mid-rule action inside a nonterminal symbol in order to declare a
6913 destructor for its semantic value.
6914
6915 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
6916
6917 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
6918 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
6919 __cplusplus && ! defined _STDLIB_H && !
6920 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
6921 defined free))]: Include <stdlib.h> rather than rolling our own
6922 declarations of malloc and free, to avoid problems with
6923 incompatible declarations (using 'throw') C++'s stdlib.h. This
6924 should fix Debian bug 340012
6925 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
6926 reported by Guillaume Melquiond.
6927
6928 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6929
6930 * NEWS: Clarify symbols versus types in unused-value warnings.
6931
6932 * configure.ac (AC_INIT): Bump version number.
6933
6934 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6935
6936 * NEWS: Version 2.1a.
6937 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
6938 since C99 requires this.
6939
6940 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
6941
6942 * m4/c-working.m4: New file.
6943 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
6944
6945 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
6946
6947 * Makefile.maint: Merge from coreutils.
6948
6949 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
6950
6951 More portability fixes for problems summarized by Nelson H. F. Beebe.
6952
6953 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
6954 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
6955 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
6956 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
6957 messes up because C++ code is compiled in 32-bit mode but linked
6958 in 64-bit mode.
6959
6960 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
6961
6962 More portability fixes for problems summarized by Nelson H. F. Beebe.
6963
6964 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
6965 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
6966
6967 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
6968 nodist_PROGRAMS, since we don't need to actually compile the
6969 example if we're just doing a plain 'make'. This avoids bothering
6970 the installer unnecessarily about problems due to weird C++
6971 compilers.
6972
6973 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
6974
6975 More portability fixes for problems summarized by Nelson H. F. Beebe.
6976
6977 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
6978 than #include "...", and compile with -I'.'. The old method was
6979 not portable, according to Posix and the C standard, and it does
6980 not work with Sun C 5.7, where previous #line directives affect
6981 the working directory used in later #include "..." directives.
6982
6983 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6984
6985 Various DJGGP specific issues in /djgpp
6986
6987 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
6988
6989 More portability fixes for problems summarized by Nelson H. F. Beebe.
6990
6991 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
6992 '#include <map>' works and that you can apply ++ to iterators.
6993
6994 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
6995
6996 Work around portability problems summarized by Nelson H. F. Beebe in
6997 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
6998
6999 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7000 that '#include <string>' works.
7001
7002 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7003 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7004 "warning: sorry: semantics of inline function static data `const
7005 unsigned char translate_table[262]' are wrong (you'll wind up with
7006 multiple copies)".
7007
7008 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7009 or, xor to not_, and_, or_, and xor_, respectively. This works
7010 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7011 random system header somewhere that includes the equivalent of
7012 <iso646.h>.
7013
7014 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7015 -E" works; it apparently doesn't work with PathScale EKO Compiler
7016 Suite Version 2.0.
7017
7018 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7019
7020 During deterministic GLR operation, user actions should be able to
7021 influence the parse by changing yychar. To make this easier to fix and
7022 to make glr.c easier to evolve in general, don't maintain yytoken in
7023 parallel with yychar; just compute yytoken when needed.
7024 * tests/glr-regression.at (Incorrect lookahead during deterministic
7025 GLR): Check that setting yychar in a user action has the intended
7026 effect.
7027 * data/glr.c (yyGLRStack): Remove yytokenp member.
7028 (yyclearin): Don't set *yytokenp.
7029 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7030 yychar rather than *yytokenp to determine the current lookahead.
7031 Compute yytoken locally when needed.
7032 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7033 point to.
7034
7035 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7036 after `--report' documentation.
7037
7038 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7039
7040 * src/parse-gram.y (grammar_declaration): Location of printer
7041 symbol is @1, not list->location. Bug reported by twlevo.
7042 * tests/input.at (Incompatible Aliases): Adjust to above change.
7043
7044 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7045
7046 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7047 all the test at once. This makes the output easier to read in the
7048 normal case.
7049
7050 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7051 got from <http://bro-ids.org/download.html>. The bug is that
7052 when two actions appeared in succession, the second one was
7053 scanned before the first one was added to the grammar rule
7054 as a midrule action. Bison then output the incorrect warning
7055 "parse.y:905.17-906.36: warning: unused value: $3".
7056 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7057 associated with a value.
7058 (rhs): Don't invoke grammar_current_rule_action_append.
7059 (action): Invoke it here instead.
7060 * src/reader.c (grammar_midrule_action): Now extern.
7061 (grammar_current_rule_action_append): Don't invoke
7062 grammar_midrule_action; that is now the scanner's job.
7063 * src/reader.h (last_string, last_braced_code_loc):
7064 (grammar_midrule_action): New decls.
7065 * src/scan-gram.l (last_string): Now extern, sigh.
7066 (last_braced_code_loc): New extern variable.
7067 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7068 rule already has an action.
7069 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7070 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7071 Add some tests to check that the above changes fixed the bug.
7072
7073 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7074
7075 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7076 All used changed. Check whether the symbol has a destructor,
7077 not whether it is typed.
7078 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7079 that the values are still reported as unused. All line numbers
7080 adjusted.
7081
7082 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7083
7084 Work around a bug in bro 0.8, which underparenthesizes its
7085 definition of YYLLOC_DEFAULT.
7086 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7087 their arguments.
7088 * data/lalr1.cc: Likewise.
7089 * data/yacc.cc: Likewise.
7090
7091 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7092
7093 Work around a bug in Pike 7.0, and give the Pike folks a
7094 better way to override the usual int widths.
7095 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7096 user can override the types.
7097 (short): #undef, to work around a bug in Pike 7.0.
7098 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7099 (union yyalloc.yyss): Use yytype_int16 rather than short.
7100 All uses changed.
7101 (yysigned_char): Remove.
7102 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7103 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7104 * tests/regression.at (Web2c Actions): Adjust to above changes.
7105
7106 * src/reader.c (check_and_convert_grammar): New function.
7107 (reader): Close the input file even if something went wrong during
7108 parsing. Minor file descriptor leak reported by twlevo.
7109
7110 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7111 to pacify gcc -Wswitch-default.
7112 * src/scan-gram.l (adjust_location): Use a default: break; case
7113 to pacify gcc -Wswitch-default.
7114 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7115 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7116 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7117 Move these decls to scan-skel.l, since they don't need to be
7118 visible elsewhere.
7119 * src/scan-skel.l: Accept the above decls.
7120 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7121 is used.
7122
7123 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7124
7125 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7126 since we don't want to insist on a version number at the start
7127 of the changelog every time.
7128 * Makefile.maint: Sync from coreutils a bit better.
7129 (sc_trailing_blank): Renamed from sc_trailing_space.
7130 All uses changed.
7131 (sc_no_if_have_config_h, sc_require_config_h):
7132 (sc_prohibit_assert_without_use): New rules.
7133 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7134 (sc_dd_max_sym_length): Fix leading spaces in rule.
7135 (sc_system_h_headers): Prefix with @.
7136 (sc_useless_cpp_parens, m4-check): Output line numbers.
7137 (changelog-check): Allow version only in head.
7138 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7139 satisfy new Makefile.maint rule.
7140 * data/glr.c: Likewise.
7141 * data/glr.cc: Likewise.
7142 * data/lalr1.cc: Likewise.
7143 * data/yacc.c: Likewise.
7144 * lib/ebitsetv.c: Likewise.
7145 * lib/lbitset.c: Likewise.
7146 * lib/subpipe.c: Likewise.
7147 * lib/timevar.c: Likewise.
7148 * src/system.h: Likewise.
7149 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7150 * djgpp/Makefile.maint: Add copyright notice.
7151 * djgpp/README.in: Likewise.
7152 * djgpp/config.bat: Likewise.
7153 * djgpp/config.site: Likewise.
7154 * djgpp/config_h.sed: Likewise.
7155 * djgpp/djunpack.bat: Likewise.
7156 * djgpp/config.sed: Fix copyright notice to match standard format.
7157 * djgpp/subpipe.h: Likewise.
7158 * lib/bitsetv-print.c: Likewise.
7159 * lib/bitsetv.c: Likewise.
7160 * lib/subpipe.h: Likewise.
7161 * lib/timevar.c: Likewise.
7162 * lib/timevar.h: Likewise.
7163 * djgpp/subpipe.c: Use standard recipe for config.h.
7164 * lib/abitset.c: Likewise.
7165 * lib/bitset.c: Likewise.
7166 * lib/bitset_stats.c: Likewise.
7167 * lib/bitsetv-print.c: Likewise.
7168 * lib/bitsetv.c: Likewise.
7169 * lib/ebitsetv.c: Likewise.
7170 * lib/get-errno.c: Likewise.
7171 * lib/lbitset.c: Likewise.
7172 * lib/subpipe.c: Likewise.
7173 * lib/timevar.c: Likewise.
7174 * lib/vbitset.c: Likewise.
7175 * tests/local.at: Likewise.
7176 * src/scan-gram.l: Don't include verify.h, since system.h does
7177 that for us.
7178 * .x-sc_require_config_h: New file.
7179 * .x-sc_unmarked_diagnostics: New file.
7180
7181 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7182
7183 Be a bit more systematic about using 'abort'.
7184 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7185 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7186 Put 'default: abort ();' before some other case, to satisfy older
7187 pedantic compilers.
7188 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7189 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7190 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7191 * src/conflicts.c (resolve_sr_conflict): Likewise.
7192 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7193 (get_decision_str, get_orientation_str, get_node_alignment_str):
7194 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7195 (get_linestyle_str, get_arrowstyle_str): Likewise.
7196 * src/conflicts.c (resolve_sr_conflict):
7197 Use a default case rather than one for the one remaining enum
7198 value, to catch invalid enum values as well.
7199 * src/lalr.c (set_goto_map, map_goto):
7200 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7201 * src/nullable.c (nullable_compute, token_definitions_output):
7202 Likewise.
7203 * src/reader.c (packgram, reader): Likewise.
7204 * src/state.c (transitions_to, state_new, state_reduction_find):
7205 Likewise.
7206 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7207 (symbol_pack): Likewise.
7208 * src/tables.c (conflict_row, pack_vector): Likewise.
7209 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7210 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7211 * src/system.h: Don't include <assert.h>.
7212 (assert): New macro.
7213
7214 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7215 (Destructor Decl, Parser Function, Pure Calling):
7216 Describe rules for braces inside C code more carefully.
7217
7218 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7219
7220 Fix some porting glitches found by Nelson H. F. Beebe.
7221 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7222 compilers that don't understand that abort () does not return.
7223 * src/state.c (transitions_to): Likewise.
7224 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7225 that '#include <cstdlib>' works.
7226 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7227 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7228 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7229 for the benefit of some pre-C99 compilers.
7230
7231 * bootstrap: Undo changes to gnulib files that autoreconf made.
7232
7233 Minor fixups to get 'make maintainer-check' to work.
7234 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7235 with the new verify.h implementation.
7236 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7237 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7238 * data/yacc.c (YYUSE): Likewise.
7239 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7240 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7241 * src/parse-gram.y (declaration): Don't pass a string constant
7242 to a function that expects char *, since GCC might complain
7243 about the constant value.
7244 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7245 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7246 before #defining them.
7247 * tests/glr-regression.at
7248 (Incorrectly initialized location for empty right-hand side in GLR):
7249 In yyerror, use the msg arg.
7250 (Corrupted semantic options if user action cuts parse):
7251 (Incorrect lookahead during deterministic GLR):
7252 (Incorrect lookahead during nondeterministic GLR):
7253 Don't name a local var 'index'; it shadows string.h's 'index'.
7254
7255 2006-01-19 Akim Demaille <akim@epita.fr>
7256
7257 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7258 location, not just parts of it.
7259
7260 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7261
7262 * NEWS: Document the fact that multiple %unions are now allowed.
7263 * doc/bison.texinfo (Union Decl): Likewise.
7264 * TODO: This feature is now implemented, so remove it from
7265 the wishlist.
7266
7267 * Makefile.maint: Merge with coreutils Makefile.maint.
7268 (CVS_LIST): Use build-aux version if available.
7269 (VERSION_REGEXP): New macro.
7270 (syntax-check-rules): Add sc_no_if_have_config_h,
7271 sc_prohibit_assert_without_use, sc_require_config_h,
7272 sc_useless_cpp_parens.
7273 (sc_obsolete_symbols): Check for O_NDELAY.
7274 (sc_dd_max_sym_length): Track coreutils.
7275 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7276 (sc_useless_cpp_parens): New rule.
7277 (news-date-check): Look for version or today's date.
7278 (changelog-check): Don't require version number near head.
7279 (copyright-check): Use current year instead of hardwiring 2005.
7280 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7281 (announcement): Add --gpg-key-ID.
7282
7283 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7284 with "file system".
7285
7286 Avoid undefined behavior that addressed just before the start of an
7287 array. Problem reported by twlevo.
7288 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7289 * src/lalr.c (build_relations): Rely on new sentinel.
7290 * src/gram.c (gram_free): Adjust to new sentinel.
7291
7292 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7293
7294 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7295 yylookaheadNeeds. All uses updated.
7296 (yysplitStack): Rename local yynewLookaheadStatuses to
7297 yynewLookaheadNeeds.
7298 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7299 GLR): In comments, change `lookahead status' to `lookahead need'.
7300
7301 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7302
7303 * data/glr.c (yysplitStack): A little stylistic rewrite.
7304
7305 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7306
7307 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7308
7309 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7310
7311 * doc/bison.texinfo: Fix some typos.
7312 (GLR Semantic Actions): New subsection discussing special
7313 considerations because GLR semantic actions might be deferred.
7314 (Actions): Mention look-ahead usage of yylval.
7315 (Actions and Locations): Mention look-ahead usage of yylloc.
7316 (Special Features for Use in Actions): Add YYEOF entry and mention it
7317 in the yychar entry.
7318 In the yychar entry, remove mention of the local yychar case (pure
7319 parser) since this is irrelevant information when writing semantic
7320 actions and since it's already discussed in `Table of Symbols' where
7321 yychar is otherwise described as an external variable.
7322 In the yychar entry, don't call it the `current' look-ahead since it
7323 isn't when semantic actions are deferred.
7324 In the yychar and yyclearin entries, add note about deferred semantic
7325 actions.
7326 Add yylloc and yylval entries discussing look-ahead usage.
7327 (Look-Ahead Tokens): When discussing yychar, don't call it the
7328 `current' look-ahead, and do mention yylval and yylloc.
7329 (Error Recovery): Cross-reference `Action Features' when mentioning
7330 yyclearin.
7331 (Table of Symbols): In the yychar entry, don't call it the `current'
7332 look-ahead.
7333 In the yylloc and yylval entries, mention look-ahead usage.
7334
7335 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7336
7337 * tests/glr-regression.at: Update copyright year to 2006.
7338
7339 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7340
7341 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7342 use during nondeterministic operation to track which stacks have
7343 actually needed the current lookahead.
7344 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7345 Allocate, deallocate, resize, and otherwise shuffle space for
7346 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7347 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7348 appropriately during nondeterministic operation.
7349 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7350 members to store the current lookahead to be used by the deferred
7351 user action.
7352 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7353 from which the RHS is taken. Set the lookahead members of the new
7354 yySemanticOption according to the lookahead status for stack yyk.
7355 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7356 yyaddDeferredAction.
7357 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7358 members of yySemanticOption before invoking yyuserAction, and then set
7359 them back to their current values afterward.
7360 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7361 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7362 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7363 titles for consistency.
7364 (Leaked merged semantic value if user action cuts parse): In order to
7365 suppress lint warnings, use arguments in merge function, and assign
7366 char value < 128 in main.
7367 (Incorrect lookahead during deterministic GLR): New test case.
7368 (Incorrect lookahead during nondeterministic GLR): New test case.
7369
7370 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7371
7372 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
7373 !yyvaluep as signal that no semantic value is available to print.
7374 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7375 to print a semantic value.
7376
7377 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7378
7379 * tests/glr-regression.at: For consistency with my newer test cases,
7380 don't thank myself.
7381
7382 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7383
7384 * data/glr.c (yyresolveValue): When merging semantic options, if at
7385 least one user action succeeds but a later one cuts the parse, then
7386 destroy the semantic value before returning rather than leaking it.
7387 (yyresolveStates): If a user action cuts the parse and thus
7388 yyresolveValue fails, ignore the (unset) semantic value rather than
7389 corrupting the yyGLRState, and empty the semantic options list since
7390 the user actions should have called all necessary destructors.
7391 Simplify code with YYCHK.
7392 * tests/glr-regression.at (Corrupted semantic options if user action
7393 cuts parse): New test case.
7394 (Undesirable destructors if user action cuts parse): New test case.
7395 Before applying any of this patch, this test case never actually failed
7396 for me... but only because the corrupted semantic options usually
7397 masked this bug.
7398 (Leaked merged semantic value if user action cuts parse): New test
7399 case.
7400
7401 2006-01-05 Akim Demaille <akim@epita.fr>
7402
7403 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7404
7405 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7406
7407 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7408 _MSC_VER. Problem reported by Cenzato Marco.
7409 (b4_c_function_def): Use it.
7410 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7411 b4_c_modern.
7412 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7413 than rolling our own.
7414
7415 2006-01-04 Akim Demaille <akim@epita.fr>
7416
7417 Also warn about non-used mid-rule values.
7418 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7419 member.
7420 (symbol_list_new): Adjust.
7421 * src/reader.c (symbol_typed_p): New.
7422 (grammar_rule_check): Use it.
7423 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7424 Check its rule.
7425 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7426 Use it.
7427 * tests/actions.at (Exotic Dollars): Adjust.
7428
7429 2006-01-04 Akim Demaille <akim@epita.fr>
7430
7431 * src/reader.c (grammar_midrule_action): If $$ is set in a
7432 mid-rule, move the `used' bit to its lhs.
7433 * tests/input.at (Unused values): New.
7434 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7435
7436 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7437
7438 * doc/bison.texinfo (Bison Options): Say more accurately what
7439 --yacc does.
7440 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7441 about declarations in the grammar when in Yacc mode, as POSIX does
7442 not require a diagnostic when the grammar uses extensions.
7443
7444 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7445
7446 Warn about dubious constructions like "%token T T".
7447 Reported by twlevo.
7448 * src/symtab.h (struct symbol.declared): New member.
7449 * src/symtab.c (symbol_new): Initialize it to false.
7450 (symbol_class_set): New arg DECLARING, specifying whether
7451 this is a declaration that we want to warn about, if there
7452 is more than one of them. All uses changed.
7453
7454 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7455 Allow multiple %union directives, whose contents concatenate.
7456 * src/parse-gram.y (grammar_declaration): Likewise.
7457 Use muscle_code_grow, so that we don't need stype_line any more.
7458 All uses changed.
7459
7460 * src/muscle_tab.c (muscle_grow): Fix comment.
7461
7462 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7463 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7464 Update copyright year to 2006.
7465
7466 2006-01-03 Akim Demaille <akim@epita.fr>
7467
7468 Have glr.cc pass (some of) the calc.at tests.
7469 * data/glr.cc (b4_parse_param_orig): New.
7470 (b4_parse_param): Improve its definition, and bound it more
7471 clearly in the skeleton.
7472 (b4_epilogue): Append, instead of prepending, in order to keep
7473 #line consistency.
7474 Simplify the generation of auxiliary functions: locations and
7475 purity are mandated.
7476 (b4_global_tokens_and_yystype): Honor it.
7477 * data/location.cc (c++.m4): Don't include it.
7478 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7479 and AT_SKEL_CC_IF.
7480 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7481 AT_LALR1_CC_IF.
7482 Be sure to initialize the first position's filename.
7483 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7484 mandated anyway.
7485 (AT_CHECK_CALC_GLR_CC): New.
7486 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7487
7488 2006-01-02 Akim Demaille <akim@epita.fr>
7489
7490 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7491 c.m4.
7492 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
7493 * data/glr.cc: Do not include stack.hh.
7494
7495 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7496
7497 * data/glr.c: Reformat whitespace with tabs.
7498 (b4_lpure_formals): Remove this unused m4 macro.
7499 * tests/cxx-type.at: Reformat whitespace with tabs.
7500 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7501 since it's a member. Rename type to isNterm for clarity.
7502
7503 2005-12-29 Akim <akim@sulaco.local>
7504
7505 Let glr.cc catch up with symbol_value_print.
7506 * data/glr.cc (b4_yysymprint_generate): Replace by...
7507 (b4_yy_symbol_print_generate): this.
7508 (yy_symbol_print, yy_symbol_value_print): Declare them.
7509
7510 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7511
7512 * src/location.h (boundary): Note that a line or column equal
7513 to INT_MAX indicates an overflow.
7514 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7515 (rule_length_overflow, increment_rule_length, add_column_width):
7516 New functions.
7517 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7518 (<SC_BRACED_CODE>"}"):
7519 Use increment_rule_length rather than incrementing it by hand.
7520 (adjust_location, handle_syncline): Diagnose overflow.
7521 (handle_action_dollar, handle_action_at):
7522 Fix bug with monstrosities like $-2147483648.
7523 Remove now-unnecessary checks.
7524 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7525 (convert_ucn_to_byte): Verify assumptions.
7526 (handle_syncline): New arg LOC. All callers changed.
7527 Don't store through a value derived from char const * pointer.
7528
7529 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7530 GCC warnings.
7531
7532 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7533
7534 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7535 Remove unnecessary forward static decls.
7536
7537 2005-12-27 Akim Demaille <akim@epita.fr>
7538
7539 * src/reader.c (grammar_current_rule_check): Also check that $$
7540 is used.
7541 Take the rule to check as argument, hence rename as...
7542 (grammar_rule_check): this.
7543 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7544 Rename as...
7545 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7546 (grammar_midrule_action, grammar_symbol_append): Now static.
7547 * tests/torture.at (input): Don't rely on the default action
7548 being always performed.
7549 * tests/calc.at: "Set" $$ even when the action is "cut" with
7550 YYERROR or other.
7551 * tests/actions.at (Exotic Dollars): Instead of using unused
7552 values, check that the warning is issued.
7553
7554 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7555
7556 * NEWS: Improve wording for unused-value warnings.
7557
7558 2005-12-22 Akim Demaille <akim@epita.fr>
7559
7560 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7561 (b4_yysymprint_generate): Rename as...
7562 (b4_yy_symbol_print_generate): this.
7563 Generate yy_symbol_print instead of yysymprint.
7564 Generate also yy_symbol_value_print, and use it.
7565
7566 2005-12-22 Akim Demaille <akim@epita.fr>
7567
7568 * NEWS: Warn about unused values.
7569 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7570 a `used' member.
7571 (symbol_list_n_get, symbol_list_n_used_set): New.
7572 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7573 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7574 * src/reader.c (grammar_current_rule_check): Check that values are
7575 used.
7576 * src/symtab.c (symbol_print): Accept 0.
7577 * tests/existing.at: Remove the type information.
7578 Empty the actions.
7579 Remove useless actions (beware of mid-rule actions: perl -000
7580 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7581 * tests/actions.at (Exotic Dollars): Use unused values.
7582 * tests/calc.at: Likewise.
7583 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7584 Likewise.
7585
7586 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7587 rule_useful_p.
7588
7589 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7590
7591 Undo 2005-12-01 tentative license wording change. The wording is
7592 still being reviewed by the lawyers, and we don't want to wait for
7593 them before publishing a test release. For now, revert to the
7594 previous wording.
7595 * NEWS: Undo 2005-12-01 change.
7596 * data/glr.c: Revert to previous license wording.
7597 * data/glr.cc: Likewise.
7598 * data/lalr1.cc: Likewise.
7599 * data/location.cc: Likewise.
7600 * data/yacc.c: Likewise.
7601
7602 * NEWS: Reword %destructor vs YYABORT etc.
7603 * data/glr.c: Use American spacing, for consistency.
7604 * data/glr.cc: Likewise.
7605 * data/lalr1.cc: Likewise.
7606 * data/yacc.c: Likewise.
7607 * data/yacc.c: Reformat comments slightly.
7608 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
7609 for consistency. Fix some spelling errors and reword recently-included
7610 text slightly.
7611 * tests/cxx-type.at: Cast results of malloc, for C++.
7612
7613 2005-12-21 Joel E. Denny <address@hidden>
7614
7615 * tests/cxx-type.at: Construct a tree, count the parents of shared
7616 nodes, and free each node once and only once. Previously, the memory
7617 for semantic values was leaked instead.
7618
7619 2005-12-21 Joel E. Denny <address@hidden>
7620
7621 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
7622 (yylval, yylloc): If pure, #define to yystackp->yyval and
7623 yystackp->yyloc similar to yychar and yynerrs.
7624 (yyparse): If pure, remove local yylval and yylloc. Add local
7625 yystackp to accommodate pure definitions of yylval and yylloc.
7626 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
7627 yylvalp and yyllocp to &yylval and &yylloc.
7628 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
7629 namespace. Previously, nerrs and char were missing, but lval and lloc
7630 weren't necessary.
7631 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
7632 yylvalp and yyllocp parameters since, if pure, these are now always
7633 accessible through yystackp. If not pure, they are still accessible
7634 globally.
7635 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
7636 `if (YYID (N))' to pacify lint.
7637
7638 2005-12-21 Akim Demaille <akim@epita.fr>
7639
7640 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
7641 destroy the RHS symbols of a rule.
7642 * data/yacc.c (yylen): Initialize to 0.
7643 Keep its value to the number of items to possibly shift.
7644 In particular, a regular successful parse that ends on YYFINAL by
7645 a (internal) YYACCEPT must not have yylen != 0.
7646 (yyerrorlab, yyreturn): Pop the RHS.
7647 Reorder a bit to emphasize the `shifting' bits of code.
7648 (YYPOPSTACK): Now accept a number of items to pop.
7649 * data/lalr1.cc: Likewise.
7650 * data/glr.c: Formatting changes.
7651 Use goto instead of fall through.
7652 * doc/bison.texinfo (Destructor Decl): Complete.
7653
7654 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7655
7656 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7657 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
7658 * djgpp/config.bat: Replace every occurence of the file name
7659 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7660 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7661 * djgpp/config.sed: Replace every occurence of the file name
7662 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7663 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7664 * djgpp/djunpack.bat: DJGPP specific file.
7665 * djgpp/fnchange.lst: DJGPP specific file.
7666 * djgpp/README.in: Add new information about how to unpack the bison
7667 source on MSDOS and other systems which have 8.3 file name restrictions
7668 using djunpack.bat and fnchange.lst.
7669
7670 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7671
7672 * bootstrap (build_cvs_prefix): Remove; unused.
7673 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
7674 when getting gnulib.
7675
7676 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
7677
7678 * data/glr.c: Reorder typedef declarations for structs to match order
7679 of struct declarations.
7680 Rename yystack everywhere to yystackp except in yyparse where it's not
7681 a pointer.
7682 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
7683 consistency.
7684 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
7685 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
7686 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
7687 lint.
7688
7689 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
7690
7691 * tests/sets.at (Accept): Fix typos in regular expression used to
7692 sed out the final state number.
7693
7694 Work around portability problem on Solaris 10: flex-generated
7695 files include <stdio.h> before <config.h>, which messes up
7696 because the latter defines __EXTENSIONS__. Address the problem
7697 by creating two new little files that include <config.h> first,
7698 then include the flex-generated files. Rewrite everyone else
7699 to include <config.h> first, as well.
7700 * lib/timevar.c: Always include "config.h".
7701 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
7702 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
7703 (EXTRA_bison_SOURCES): New macro.
7704 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
7705 * src/system.h: Don't include config.h.
7706 * src/LR0.c: Include <config.h> first.
7707 * src/assoc.c: Likewise.
7708 * src/closure.c: Likewise.
7709 * src/complain.c: Likewise.
7710 * src/conflicts.c: Likewise.
7711 * src/derives.c: Likewise.
7712 * src/files.c: Likewise.
7713 * src/getargs.c: Likewise.
7714 * src/gram.c: Likewise.
7715 * src/lalr.c: Likewise.
7716 * src/location.c: Likewise.
7717 * src/main.c: Likewise.
7718 * src/muscle_tab.c: Likewise.
7719 * src/nullable.c: Likewise.
7720 * src/output.c: Likewise.
7721 * src/parse-gram.y: Likewise.
7722 * src/print.c: Likewise.
7723 * src/print_graph.c: Likewise.
7724 * src/reader.c: Likewise.
7725 * src/reduce.c: Likewise.
7726 * src/relation.c: Likewise.
7727 * src/state.c: Likewise.
7728 * src/symlist.c: Likewise.
7729 * src/symtab.c: Likewise.
7730 * src/tables.c: Likewise.
7731 * src/uniqstr.c: Likewise.
7732 * src/vcg.c: Likewise.
7733
7734 * src/parse-gram.y: Fix minor problems uncovered by lint.
7735 (current_lhs, current_lhs_location): Now static.
7736 (current_assoc): Remove unused variable.
7737
7738 Cleanups so that Bison-generated parsers have less lint.
7739 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
7740 Prepend /*ARGSUSED*/, for lint's sake.
7741 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
7742 definition if 'lint' is defined.
7743 (YYID): New macro (or function, if lint).
7744 All uses of /*CONSTCOND*/0 replaced by YYID(0).
7745 * data/yacc.c: Likewise.
7746 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
7747 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
7748 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
7749 is C++ only.
7750 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
7751 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
7752 Use YYID(0) rather than 0, for lint.
7753 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
7754 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
7755
7756 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
7757
7758 * tests/glr-regression.at
7759 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7760 Close memory leak reported by twlevo.
7761
7762 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
7763
7764 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
7765 all stacks.
7766 (yyparse): Iterate another stack in order to call user destructors.
7767 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7768 New test case.
7769 (Duplicated user destructor for lookahead): This test now is expected
7770 to succeed.
7771
7772 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
7773
7774 * NEWS: Document the following change.
7775 * data/yacc.c: Say "parser skeleton" rather than "file", since
7776 it's no longer just a file.
7777 * data/glr.c: Grant a special exception for C GLR parsers, that
7778 reads like the already-existing exception for C LALR(1) parsers.
7779 * data/glr.cc: Likewise.
7780 * data/lalr1.cc: Likewise.
7781 * data/location.cc: Likewise.
7782 * data/yacc.c: Reword the "written by" statement to clarify that
7783 it was the parser skeleton, not the entire output file.
7784 * data/glr.c: Written by Paul Hilfinger.
7785 * data/glr.cc: Written by Akim Demaille.
7786 * data/lalr1.cc: Likewise.
7787
7788 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
7789
7790 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
7791 Fix typos in previous change that broke 'make check'.
7792 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
7793 supported in C.
7794 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
7795 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
7796 We can revert this once things settle down.
7797
7798 * src/conflicts.c (conflicts_print): Don't print file name twice
7799 when %expect fails because there were no conflicts.
7800 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
7801 change.
7802 * tests/conflicts.at (%expect not enough, %expect too much):
7803 (%expect with reduce conflicts): Adjust to new behavior.
7804
7805 2005-11-18 Akim Demaille <akim@epita.fr>
7806
7807 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
7808 errors.
7809 * NEWS: Document this.
7810 * doc/bison.texinfo (Expect Decl): Likewise.
7811
7812 2005-11-16 Akim Demaille <akim@epita.fr>
7813
7814 Generalize the display of semantic values and locations in traces.
7815 * data/glr.c (yy_reduce_print): Fix indices (again).
7816 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
7817 literal integers.
7818 * data/lalr1.cc (yyreduce_print): Rename as...
7819 (yy_reduce_print): this.
7820 Display values and locations.
7821 * data/yacc.c (yy_reduce_print): Likewise.
7822 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
7823 (yysymprint): Move higher to be visible from yy_reduce_print).
7824 (yyparse): Adjust.
7825 * tests/calc.at: Adjust the expected length of the traces.
7826
7827 2005-11-14 Akim Demaille <akim@epita.fr>
7828
7829 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
7830 from 1 to N, while values and location start at 0.
7831 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
7832
7833 2005-11-14 Akim Demaille <akim@epita.fr>
7834
7835 * data/glr.c (yy_reduce_print): Fix the $ number.
7836
7837 2005-11-14 Akim Demaille <akim@epita.fr>
7838
7839 "Use" parse parameters.
7840 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
7841 * data/glr.c, data/glr.cc: Use them.
7842 * data/glr.c (YYUSE): Have a C++ definition that supports
7843 non-pointer types.
7844
7845 2005-11-14 Akim Demaille <akim@epita.fr>
7846
7847 * data/glr.c (yyexpandGLRStack): Declare only if defined.
7848
7849 2005-11-14 Akim Demaille <akim@epita.fr>
7850
7851 * data/glr.cc: New.
7852 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
7853
7854 2005-11-12 Akim Demaille <akim@epita.fr>
7855
7856 Let position and location be PODs.
7857 * data/location.cc (position::initialize, location::initialize): New.
7858 (position::position, location::location): Define only if
7859 b4_location_constructors is defined.
7860 * data/lalr1.cc (b4_location_constructors): Define it for backward
7861 compatibility.
7862 * doc/bison.texinfo (Initial Action Decl): Use initialize.
7863
7864 2005-11-12 Akim Demaille <akim@epita.fr>
7865
7866 * data/lalr1.cc: Move the body of the ctor and dtor into the
7867 parser file (instead of the header).
7868 Wrap the implementations in a "namespace yy".
7869
7870 2005-11-12 Akim Demaille <akim@epita.fr>
7871
7872 Have glr.c include its header file when created.
7873 * data/glr.c (b4_shared_declarations): New.
7874 Output them verbatim in the parser if !%defines, otherwise
7875 output then in the header file, and include it instead.
7876
7877 2005-11-11 Akim Demaille <akim@epita.fr>
7878
7879 * data/glr.c: Comment changes.
7880
7881 2005-11-11 Akim Demaille <akim@epita.fr>
7882
7883 When yydebug, report semantic and location values for reductions.
7884 * data/glr.c (yy_reduce_print): Report the semantic values and the
7885 locations.
7886 (YY_REDUCE_PRINT): Adjust.
7887 (yyglrReduce): Use them.
7888 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
7889 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
7890 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
7891 traces.
7892
7893 2005-11-10 Akim Demaille <akim@epita.fr>
7894
7895 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
7896 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
7897 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
7898
7899 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
7900
7901 * m4/cxx.m4, examples/Makefile.am: Don't build
7902 examples/calc++ if no C++ compiler is available. (trivial change)
7903
7904 2005-11-09 Akim Demaille <akim@epita.fr>
7905
7906 * src/scan-skel.l: Use a couple of asserts.
7907
7908 2005-11-03 Akim Demaille <akim@epita.fr>
7909
7910 In some (weird) cases, the final state number is incorrect.
7911 Reported by Alexandre Duret-Lutz.
7912 * src/LR0.c (state_list_append): Remove the computation of
7913 final_state.
7914 (save_reductions): Do it here.
7915 (get_state): Alpha conversion.
7916 (generate_states): Use a for loop.
7917 * src/gram.h (item_number_is_rule_number)
7918 (item_number_is_symbol_number): New.
7919 * src/state.c: Use assert.
7920 * src/system.h: Include assert.h.
7921 * tests/sets.at (Accept): New.
7922
7923 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7924
7925 * data/glr.c (yyfill): Adjust comment.
7926 (yyresolveAction): Initialize default location properly
7927 for empty right-hand sides.
7928 (yydoAction): Ditto.
7929 Add comment explaining apparently dead code.
7930 * tests/glr-regression.at
7931 (Incorrectly initialized location for empty right-hand side in GLR):
7932 New test.
7933
7934 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
7935
7936 * bootstrap (cleanup_gnulib): New function. Use it to clean up
7937 gnulib when interrupted. This fixes some race conditions and
7938 works around some portability problems (one noted by Paul
7939 Hilfinger).
7940
7941 2005-10-22 Akim <akim@epita.fr>
7942
7943 * Makefile.cfg: Adjust to config -> build-aux.
7944 Reported by twledo.
7945
7946 2005-10-21 Akim Demaille <akim@epita.fr>
7947
7948 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
7949 the %parse-params.
7950 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
7951 * data/yacc.c (b4_Pure_if): Rename as...
7952 (b4_yacc_pure_if): this.
7953 (YY_SYMBOL_PRINT, yyparse): Adjust.
7954 * doc/bison.texinfo: Formatting changes.
7955
7956 2005-10-21 Akim Demaille <akim@epita.fr>
7957
7958 Finish the transition config -> build-aux.
7959 * configure.ac, Makefile.am: Use build-aux.
7960 * config/prev-version, config/announce-gen, config/Makefile.am:
7961 Move to...
7962 * build-aux/prev-version, build-aux/announce-gen,
7963 * build-aux/Makefile.am: here.
7964
7965 2005-10-14 Akim Demaille <akim@epita.fr>
7966
7967 * examples/calc++/test: Use set -x only when VERBOSE.
7968
7969 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
7970
7971 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
7972 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
7973
7974 2005-10-13 Akim Demaille <akim@epita.fr>
7975
7976 * src/scan-skel.l: Output the base name parts of the parser and
7977 header file names.
7978 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7979 additional checks.
7980 Use this to exercise C++ outputs in subdirs.
7981 Reported by Oleg Smolsky.
7982
7983 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
7984
7985 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
7986 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
7987 Problem reported by John P. Hartmann.
7988 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
7989 already defined it.
7990
7991 2005-10-12 Akim Demaille <akim@epita.fr>
7992
7993 * src/parse-gram.y (version_check): Exit 63 to please missing
7994 (stands for "version mismatch).
7995 * tests/input.at, doc/bison.texinfo: Adjust.
7996
7997 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
7998
7999 Work around portability problems with Visual Age C compiler
8000 (xlc and xlC_r) reported by John P. Hartmann.
8001 * data/location.cc (initial_column, initial_line): Remove.
8002 All uses replaced by 0 and 1.
8003 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8004 that xlc complains about.
8005 * src/scan-skel.l (skel_wrap): Likewise.
8006 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8007 as __STDC__.
8008 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8009 __STDC_VERSION__. Use it everywhere instead of looking at
8010 __STDC__ and __cplusplus.
8011
8012 2005-10-10 Akim Demaille <akim@epita.fr>
8013
8014 * examples/calc++/test: Be quiet unless VERBOSE.
8015
8016 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8017
8018 * data/c.m4 (yydestruct, yysymprint):
8019 Use YYUSE instead of casting to void.
8020 * data/glr.c (YYUSE): New macro.
8021 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8022 Use it instead of rolling our own.
8023 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8024 (YYCHK1):
8025 Use /*CONSTCOND*/ to suppress lint warnings.
8026 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8027 (YY_STACK_PRINT): Use 'false' not '0'.
8028 (YYUSE): New macro.
8029 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8030 * data/yacc.c (YYUSE): New macro.
8031 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8032 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8033 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8034
8035
8036 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8037 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8038
8039 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8040
8041 Undo the parts of the unlocked-I/O change that substituted
8042 putc or puts for printf. This might hurt performance a bit,
8043 but some people prefer the printf style.
8044 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8045 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8046 All uses replaced by YYFPRINTF and YYDPRINTF.
8047 * data/yacc.c: Likewise.
8048 * lib/bitset.c (bitset_print): Likewise.
8049 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8050 putc and puts.
8051 * lib/lbitset.c (debug_lbitset): Likewise.
8052 * src/closure.c (print_firsts, print_fderives): Likewise.
8053 * src/gram.c (grammar_dump): Likewise.
8054 * src/lalr.c (look_ahead_tokens_print): Likewise.
8055 * src/output.c (escaped_output): Likewise.
8056 (user_actions_output): Break apart two printfs.
8057 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8058 * src/reduce.c (reduce_print): Likewise.
8059 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8060 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8061
8062 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8063 Use assignments rather than casts-to-void to suppress
8064 unused-variable warnings. This pacifies 'lint'.
8065 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8066 unused-variable warnings.
8067
8068 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8069
8070 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8071
8072 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8073
8074 Use unlocked I/O for a minor performance improvement on hosts like
8075 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8076 is to use the gnlib unlocked-io module, and to prefer putc and
8077 puts to printf when either will work (since the latter doesn't
8078 come in an unlocked flavor).
8079 * bootstrap (gnulib_modules): Add unlocked-io.
8080 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8081 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8082 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8083 and similarly for puts and putc and printf.
8084 * data/yacc.c: Likewise.
8085 * lib/bitset.c (bitset_print): Likewise.
8086 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8087 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8088 to printf.
8089 * lib/lbitset.c (debug_lbitset): Likewise.
8090 * src/closure.c (print_firsts, print_fderives): Likewise.
8091 * src/gram.c (grammar_dump): Likewise.
8092 * src/lalr.c (look_ahead_tokens_print): Likewise.
8093 * src/output.c (escaped_output): Likewise.
8094 (user_actions_output): Coalesce two printfs.
8095 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8096 * src/reduce.c (reduce_print): Likewise.
8097 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8098 * src/system.h: Include unlocked-io.h rather than stdio.h.
8099
8100 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8101 this confuses xgettext.
8102
8103 2005-10-02 Akim Demaille <akim@epita.fr>
8104
8105 * bootstrap (gnulib_modules): Add strverscmp.
8106 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8107 * m4/.cvsignore: Add strverscmp.m4.
8108 * src/parse-gram.y (%require): New token, new rule.
8109 (version_check): New.
8110 * src/scan-gram.l (%require): Adjust.
8111 * tests/input.at (AT_REQUIRE): New.
8112 Use it.
8113 * doc/bison.texinfo (Require Decl): New.
8114 (Calc++ Parser): Use %require.
8115
8116 2005-10-02 Akim Demaille <akim@epita.fr>
8117
8118 * data/location.cc: New.
8119
8120 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8121 Akim Demaille <akim@epita.fr>
8122
8123 Make sure -odir/foo.cc creates dir/location.hh etc.
8124 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8125 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8126 (spec_defines_file): Now const.
8127 (dir_prefix): New.
8128 (short_base_name): Remove.
8129 * src/files.c: Adjust.
8130 (dirname.h): Include.
8131 (base_name): Don't prototype it.
8132 (finput): Remove, duplicates gram_in.
8133 (full_base_name, short_base_name): Replace by...
8134 (all_but_ext, all_but_tab_ext): these.
8135 (compute_base_names): Rename as...
8136 (compute_file_name_parts): this.
8137 Update to compute the new variables, including dir_prefix.
8138 Adjust dependencies.
8139 * src/output.c (prepare): Output them.
8140 * src/reader.c: Adjust to use gram_in, not finput.
8141 * src/scan-skel.l (@dir_prefix@): New.
8142
8143 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8144
8145 * lib/subpipe.c: New function end_of_output_subpipe() added
8146 to allow support for non-posix systems. This is a no-op function
8147 for posix systems.
8148
8149 * lib/subpipe.h: New function end_of_output_subpipe() added
8150 to allow support for non-posix systems. This is a no-op function
8151 for posix systems.
8152
8153 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8154 handle the lack of pipe/fork functionality on non-posix systems.
8155
8156 * djgpp/Makefile.maint: DJGPP specific file.
8157
8158 * djgpp/README.in: DJGPP specific file.
8159
8160 * djgpp/config.bat: DJGPP specific configuration file.
8161
8162 * djgpp/config.sed: DJGPP specific configuration file.
8163
8164 * djgpp/config.site: DJGPP specific configuration file.
8165
8166 * djgpp/config_h.sed: DJGPP specific configuration file.
8167
8168 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8169
8170 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8171
8172 2005-10-02 Akim Demaille <akim@epita.fr>
8173
8174 * data/location.cc: New, extract from...
8175 * data/lalr1.cc: here.
8176 (location.hh): Include it after the user prologue, in case the
8177 filename type is defined by the user.
8178 Forward declation location and position before the pre-prologue.
8179 (yyresult_): Rename as...
8180 (yyresult): this, it's a local variable, not an attribute.
8181 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8182
8183 2005-10-01 Akim Demaille <akim@epita.fr>
8184
8185 * examples/extexi: Restore the #line generation.
8186
8187 2005-09-30 Akim Demaille <akim@epita.fr>,
8188 Alexandre Duret-Lutz <adl@gnu.org>
8189
8190 Move the token type and YYSTYPE in the parser class.
8191 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8192 (parser::token): New, from the moved free definition of tokens.
8193 (parser::semantic_value): Now a full definition instead of an
8194 indirection to YYSTYPE.
8195 (b4_post_prologue): No longer included in the header file, but
8196 in the implementation file.
8197 * doc/bison.texi (C+ Language Interface): Update.
8198 * src/parse-gram.y: Support unary %define.
8199 * tests/actions.at: Define global_tokens_and_yystype for backward
8200 compatibility until we update the tests.
8201 * tests/calc.at: Idem.
8202 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8203 to simplify the code.
8204
8205 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8206
8207 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8208 Ah, the good old days! Problem reported by Peter Klein.
8209 * bootstrap (gnulib_modules): Add strerror, strtoul.
8210 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8211 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8212
8213 2005-09-29 Akim Demaille <akim@epita.fr>
8214
8215 * data/c.m4 (b4_error_verbose_if): New.
8216 * data/lalr1.cc: Use it.
8217 (YYERROR_VERBOSE_IF): Remove.
8218 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8219 parser members, replaced by...
8220 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8221 local variables.
8222 (yysyntax_error_): Takes the state number as argument.
8223 (yyreduce_print_): Use the argument yyrule, not the former
8224 attribute yyn_.
8225
8226 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8227
8228 * bootstrap (gnulib_modules): Add verify.
8229 * lib/.cvsignore: Add verify.h.
8230 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8231 * src/system.h (verify): Remove.
8232 Include verify.h instead.
8233 * src/tables.c (tables_generate): Use new API for 'verify'.
8234
8235 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8236
8237 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8238 local variables whose names begin with 'yy'.
8239 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8240 Trivial changes from Joel E. Denny.
8241
8242 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8243 it itself.
8244 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8245 don't use alloca any more.
8246
8247 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8248 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8249 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8250 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8251 to match yacc.c, to test more hosts.
8252
8253 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8254
8255 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8256 doesn't affect behavior.
8257 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8258 Solaris, AIX, MSC.
8259 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8260 This works a bit better with glibc, if user code has already included
8261 stdlib.h.
8262 * doc/bison.texinfo (Bison Parser): Document that users can't
8263 arbitrarily use malloc and free for other purposes. Document
8264 that <alloca.h> and <malloc.h> might be included.
8265 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8266 user must declare alloca.
8267
8268 * HACKING (release): Forwarn the Translation Project about
8269 stable releses.
8270
8271 2005-09-20 Akim Demaille <akim@epita.fr>
8272
8273 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8274
8275 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8276
8277 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8278 (YYSTACK_ALLOC_MAXIMUM): Use it.
8279 (yysyntax_error): New function.
8280 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8281 multiple syntax errors are reported, and alloca is being used.
8282 Instead, reallocate buffers twice as big each time, so that
8283 we waste at most half the allocated memory. Start with a small
8284 (128-byte) buffer that will suffice in most cases anyway.
8285 Use yysyntax_error to do most of the work.
8286
8287 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8288 yynerrs is the number of errors reported, not the number of
8289 errors encountered.
8290
8291 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8292 Mark it as expected to fail.
8293 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8294 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8295 Don't start user-code symbols with "yy", to avoid name space problems.
8296
8297 2005-09-19 Akim Demaille <akim@epita.fr>
8298
8299 Remove the traits, failed experiment.
8300 It never proved useful, and anyway because of the current
8301 definition, it was not possible to have several specialization of
8302 this traits, making it useless.
8303 * data/lalr1.cc (yy:traits): Remove.
8304 Inline its definitions in the parser class.
8305
8306 2005-09-19 Akim Demaille <akim@epita.fr>
8307
8308 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8309 least Mac OSX with a /usr/local install of gettext.
8310
8311 2005-09-19 Akim Demaille <akim@epita.fr>
8312
8313 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8314 and yytoken for similarity with the other skeletons.
8315
8316 2005-09-19 Akim Demaille <akim@epita.fr>
8317
8318 * NEWS, configure.ac: update version number to 2.1a.
8319
8320 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8321
8322 * NEWS: Version 2.1.
8323
8324 * NEWS: Remove notice of yytname change, since it was never in an
8325 official release.
8326 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8327 diagnostic.
8328 * src/output.c (prepare): Likewise.
8329 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8330 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8331 is not defined. This is an awful hack, but it's enough for now.
8332 All callers changed.
8333 * tests/glr-regression-at (make_value): Args are const pointers now,
8334 to avoid GCC warning.
8335 (Duplicated user destructor for lookahead): New test. Currently
8336 skipped. It fails on my host but I'm not sure it'll always fail.
8337
8338 2005-09-16 Akim Demaille <akim@epita.fr>
8339
8340 * src/symtab.h (struct symbol): Declare the printer and destructor
8341 as const, to avoid accidental calls to free.
8342 (symbol_destructor_set, symbol_printer_set): Adjust.
8343 * src/symtab.c: Adjust.
8344
8345 2005-09-16 Akim Demaille <akim@epita.fr>
8346
8347 * data/c.m4 (b4_token_enums): New.
8348 (b4_token_defines): Rename as...
8349 (b4_token_enums_defines): this.
8350 (b4_token_defines): New, output only the #defines.
8351 * data/yacc.c, data/glr.c: Adjust.
8352 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8353 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8354 as default values.
8355
8356 2005-09-16 Akim Demaille <akim@epita.fr>
8357
8358 * data/lalr1.cc (yylex_): Remove, inline its code.
8359 (yyreport_syntax_error_): Remove, replaced by...
8360 (yysyntax_error_): this which returns a string and leaves to the
8361 caller the call to the users' error function.
8362 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8363 Move from members of the parser object...
8364 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8365 to local variables of the parse function.
8366
8367 2005-09-16 Akim Demaille <akim@epita.fr>
8368
8369 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8370 since it's in Bison's name space.
8371
8372 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8373
8374 * data/glr.c (yyresolveValue): Add default case to pacify
8375 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8376
8377 * NEWS: Document when yyparse started to return 2.
8378 * doc/bison.texinfo (Parser Function): Document when yyparse
8379 returns 2.
8380
8381 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8382 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8383 changed.
8384 (class position): file_name -> filename (reverting). All uses changed.
8385
8386 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8387
8388 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8389 do anything if $@ exists. This reverts part of the 2005-07-07
8390 patch.
8391
8392 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8393
8394 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8395 contains obsolete information and isn't worth distributing as a
8396 separate file anyway.
8397 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8398 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8399 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8400 (yyparse): Abort if user code uses longjmp to throw an unexpected
8401 value.
8402
8403 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8404
8405 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8406 Suggested by twlevo@xs4all.nl.
8407
8408 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8409 This avoids a diagnostic from gcc -Wswitch-enum.
8410 Problem reported by twlevo@xs4all.nl.
8411
8412 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8413 standards. Use "file name" or "file" or "name", depending on
8414 the context.
8415 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8416 not to hack/foo.tab.c.
8417 (Calc++ Top Level): 2nd arg of main is not const.
8418 * data/glr.c: b4_filename -> b4_file_name.
8419 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8420 All uses changed.
8421 (class position): filename -> file_name. All uses changed.
8422 * data/yacc.c: b4_filename -> b4_file_name.
8423 * lib/bitset.h: filename -> file_name in local vars.
8424 * lib/bitset_stats.c: Likewise.
8425 * src/files.c: Likewise.
8426 * src/scan-skel.l ("@output ".*\n): Likewise.
8427 * src/files.c (file_name_split): Renamed from filename_split.
8428 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
8429
8430 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8431
8432 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8433 to accommodate latest gnulib.
8434
8435 * tests/glr-regression.at (Duplicate representation of merged trees):
8436 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8437
8438 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8439 needed.
8440
8441 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8442
8443 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8444 All uses changed. Invoke user destructor after an error during a
8445 split parse (trivial change from Joel E. Denny).
8446
8447 * tests/glr-regression.at
8448 (User destructor after an error during a split parse): New test case.
8449 Problem reported by Joel E. Denny in:
8450 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8451
8452 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8453
8454 * README-cvs: Give URLs for recommended tools.
8455 Mention Gzip version problem, and bootstrapping issues.
8456 Remove troubleshooting section, as it's somewhat obsolete.
8457
8458 * bootstrap (no_cache): New var, to accommodate different wget
8459 variants. Use it instead of '-C off'. Problem reported by
8460 twlevo@xs4all.nl.
8461
8462 * data/glr.c (yydestroyStackItem): New function.
8463 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8464 debugging information. Problem reported by Joel E. Denny.
8465
8466 2005-08-25 Akim Demaille <akim@epita.fr>
8467
8468 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8469
8470 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8471
8472 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8473 Don't invoke destructor on unresolved entries.
8474 * tests/glr-regression.at
8475 (User destructor for unresolved GLR semantic value): New test case.
8476 Problem reported by Joel E. Denny in:
8477 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8478
8479 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8480
8481 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8482 Add strnlen.c.
8483 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8484 lib-prefix.m4, po.m4.
8485
8486 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8487 in yydestruct diagnostic, since it might not be an error.
8488 Problem reported by Joel Denny near end of
8489 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8490 * data/lalr1.cc (yyerturn): Likewise.
8491 * data/yacc.c (yyreturn): Likewise.
8492 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8493
8494 * src/files.c: Remove obsolete FIXME comment.
8495
8496 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8497 with the other templates, and to fix bogus run-on messages such
8498 as the one reported at the end of
8499 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8500 All callers changed to avoid the newline.
8501 (yyprocessOneStack): Output two lines rather than one, to accommodate
8502 the above change. This changes the debug output format slightly.
8503
8504 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8505 reported by Joel E. Denny in
8506 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8507 (trivial change).
8508 * tests/glr-regression.at (Duplicate representation of merged trees):
8509 New test, from Joel E. Denny in:
8510 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8511 * THANKS: Add Joel E. Denny.
8512
8513 * configure.ac (AC_INIT): Bump to 2.0c.
8514
8515 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8516
8517 * NEWS: Version 2.0b.
8518
8519 * Makefile.am (SUBDIRS): Put examples before tests, so that
8520 "make check" doesn't finish with "All 1 tests passed".
8521
8522 * tests/regression.at (Token definitions): Don't rely on
8523 AT_PARSER_CHECK for data that contains backslashes. It currently
8524 uses 'echo', and 'echo' isn't portable if its argument contains
8525 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8526 that the byte '\0xff' is not printable in the C locale; it is,
8527 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8528 not printable, so use '\0x81' to test.
8529
8530 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8531 version of GCC, since the macro is used with non-GCC compilers.
8532
8533 Fix core dump reported by Pablo De Napoli in
8534 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8535 * tests/regression.at (Invalid inputs with {}): New test.
8536 * src/parse-gram.y (token_name): Translate type before using
8537 it as an index.
8538
8539 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8540 the user's name space. All uses changed to __attribute__
8541 ((__unused__)).
8542 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8543 Add __attribute__ ((__noreturn__)).
8544
8545 * etc/clcommit: Remove. We weren't using it, and it failed
8546 "make maintainer-distcheck".
8547 * Makefile.maint: Merge from coreutils.
8548 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8549 (syntax-check-rules): Change list of rules as described below.
8550 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8551 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8552 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8553 (sc_trailing_space): New rules.
8554 (sc_xalloc_h_in_src): Remove.
8555 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8556 (sc_space_tab, sc_error_exit_success, sc_changelog):
8557 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8558 (makefile-check, po-check, author_mark_check):
8559 (makefile_path_separator_check, copyright-check):
8560 Use grep -n, to make it easier to find violations.
8561 Use CVS_LIST and CVS_LIST_EXCEPT.
8562 (header_regexp, h_re): Remove.
8563 (dd_c): New macro.
8564 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8565 (my-distcheck): Use more-modern GCC flags.
8566 (signatures, %.asc): Remove.
8567 (rel-files, announcement): Remove signatures.
8568 Restore old updating code, even though we don't use it, so
8569 that we're the same as coreutils.
8570 (alpha, beta, major): Depend on news-date-check.
8571 Make the upload commands.
8572
8573 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8574 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8575 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8576 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8577 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8578 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8579 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8580 * tests/sets.at: Likewise.
8581
8582 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8583 we comment out the Autoconf version number.
8584 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8585 it's error-prone and "make maintainer-distcheck" rejects it.
8586
8587 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8588 Indent calls to "error" to pacify "make maintainer-distcheck",
8589 when the calls are not intended to be translated.
8590 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8591
8592 * src/Makefile.am (DEFS): Use +=, to pacify
8593 "make maintainer-distcheck".
8594 (bison_SOURCES): Add scan-skel.h.
8595 (sc_tight_scope): New rule, from coreutils.
8596
8597 * src/files.c (src_extension, header_extension):
8598 Now static, not extern.
8599 * src/getargs.c (short_options): Likewise.
8600 * src/muscle_tab.c (muscle_table): Likewise.
8601 * src/parse-gram.y (current_class, current_type, current_prec):
8602 Likewise.
8603 * src/reader.c (grammar_end, previous_rule_end): Likewise.
8604 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
8605 * src/main.c (main): Cast bindtextdomain and textdomain calls to
8606 void, to avoid warning when NLS is disabled.
8607 * src/output.c: Include scan-skel.h.
8608 (scan_skel): Remove decl, since scan-skel.h does this.
8609 (output_skeleton):
8610 Indent calls to "error" to pacify "make maintainer-distcheck".
8611 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
8612 * src/reader.h (gram_end, gram_lineno): New decls to pacify
8613 "make maintainer-distcheck".
8614 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
8615 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
8616 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
8617 (skel_lex_destroy, scan_skel): Move these decls to...
8618 * src/scan-skel.h: New file.
8619 * src/uniqstr.c (uniqstr_assert):
8620 Indent calls to "error" to pacify "make maintainer-distcheck".
8621
8622 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
8623 not @VAR@.
8624
8625 * tests/torture.at: Revamp to avoid misuse of atoi that
8626 "make maintainer-distcheck" complained about.
8627
8628 * examples/extexi (message): Don't print a message more than once,
8629 and omit line-number decoration that makes Emacs compile think
8630 that informative messages are worth worrying about.
8631
8632 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
8633
8634 * configure.ac: Update version number.
8635
8636 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
8637 accidentally.
8638 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
8639 autogenerated by the maintainer.
8640 * examples/calc++/.cvsignore: Add *.yy.
8641
8642 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
8643 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8644 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8645
8646 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
8647
8648 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
8649 from maintainer-distcheck about casting the argument of 'free'.
8650
8651 * NEWS: Mention recent yytname changes.
8652 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
8653
8654 * bootstrap: For translations that have not yet been upgraded to
8655 the new runtime-po domain, prime the pump by extracting the
8656 relevant strings from the obsolete translations. This code can be
8657 removed once the bison-runtime domain has been translated by each
8658 team.
8659
8660 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
8661 now that token names are already quoted.
8662
8663 Fix problem reported by Anthony Heading.
8664 * data/glr.c (YYTOKEN_TABLE): New macro.
8665 (yytname): Define if YYTOKEN_TABLE.
8666 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
8667 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
8668 (YYERROR_VERBOSE): Define the same way the other skeletons do.
8669 * src/output.c (prepare_symbols): Output token_table_flag.
8670
8671 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
8672
8673 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
8674 again if the first call fails.
8675
8676 * data/glr.c (yytnamerr): New function.
8677 (yyreportSyntaxError): Use it to dequote most string literals.
8678 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
8679 with other skeletons. All uses changed.
8680 (yytnameerr_): New function.
8681 (yyreport_syntax_error): Use it to dequote most string literals.
8682 * data/yacc.c (yytnamerr): New function.
8683 (yyerrlab): Use it to decode most string literals.
8684 * doc/bison.texinfo (Decl Summary, Calling Convention):
8685 Clarify quoting convention of yytname.
8686 * src/output.c (prepare_symbols): Quote all names. This undoes
8687 the 2005-04-17 change, which is now accomplished (mostly) via
8688 changes in the parsers as described above.
8689 * tests/regression.at (Token definitions, Web2c Actions):
8690 Undo most 2005-04-17 change here, too.
8691
8692 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
8693
8694 Fix more problems reported by twlevo@xs4all.nl.
8695 * tests/cxx-type.at: Don't pipe output of ./types through sed to
8696 remove trailing spaces. This loses the exit status of ./types,
8697 and isn't needed since ./types shouldn't be emitting trailing
8698 spaces.
8699 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
8700 as the stack isn't valid in that case.
8701
8702 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8703 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8704 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8705 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
8706 is used.
8707 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
8708 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8709 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8710 Likewise.
8711
8712 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
8713 overly-picky compilers that reject 'char *foo = "bar";'.
8714
8715 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
8716 to FILE * parameter, not to stderr. This fixes a typo introduced
8717 in the 2005-07-12 change.
8718
8719 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
8720 warnings from GCC 4.
8721
8722 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
8723 (yyglrShiftDefer, yysplitStack):
8724 Remove unused parameters b4_pure_formals. All uses changed.
8725 (yyglrShift): Remove unused parameters b4_user_formals.
8726 All uses changed.
8727 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
8728
8729 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
8730
8731 Destructor cleanups and regularization among the three skeletons.
8732 * NEWS: Document the behavior changes.
8733 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
8734 stack before failing, as the cleanup code will do it for us now.
8735 * data/lalr1.cc (yyerrlab): Likewise.
8736 * data/glr.c (yyparse): Pop everything off the stack before
8737 freeing it, so that destructors get called properly.
8738 * data/lalr1.cc (yyreturn): Likewise.
8739 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
8740 This is more consistent.
8741 * doc/bison.texinfo (Destructor Decl): Mention more reasons
8742 why destructors might be called. 1.875 -> 2.1.
8743 (Destructor Decl, Decl Summary, Table of Symbols):
8744 Some English-language cleanups for %destructor.
8745 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8746 Add output line for destructor of start symbol.
8747 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
8748 because of that same extra output line.
8749
8750 * NEWS: Document minor wording changes in diagnostics of
8751 Bison-generated parsers.
8752 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
8753 Remove unused formals. All uses changed.
8754 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
8755 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
8756 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
8757 Rename yyoverflowab to yyexhaustedlab.
8758 When memory exhaustion occurs during syntax-error reporting,
8759 report it separately rather than in a single diagnostic; this
8760 eases translation.
8761 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
8762 (Memory Exhausted): Renamed from Parser Stack Overflow.
8763 Revamp wording slightly to prefer "memory exhaustion".
8764 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
8765
8766 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
8767
8768 Add i18n support to the GLR skeleton. Partially fix the C++
8769 skeleton; a C++ expert needs to finish this. Remove debugging
8770 msgids; there's little point to having them translated, since they
8771 can be understood only by someone who can read the
8772 (English-language) source code.
8773
8774 Generate runtime-po/bison-runtime.pot automatically, so that we
8775 don't have to worry about garbage getting in that file. We'll
8776 make sure after the next official release that old msgids don't
8777 get lost. See
8778 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
8779
8780 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
8781 Now auto-generated.
8782 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
8783 Fix typos in explanations of the runtime file.
8784 * bootstrap: Change gettext keyword from YYI18N to YY_.
8785 Use standard Makefile.in.in in runtime-po, since we'll arrange
8786 for backward-compatible bison-runtime.po files in a different way.
8787 * data/glr.c (YY_): New macro, from yacc.c.
8788 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
8789 Translate messages intended for users.
8790 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
8791 the wording in the other skeletons. We don't know that the memory
8792 is virtual.
8793 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
8794 Use same method that yacc.c uses.
8795 Don't translate debugging messages.
8796 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
8797 it doesn't work (yet), and requires C++ expertise to fix.
8798 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
8799 Move defn to a more logical place, to be consistent with other
8800 skeletons.
8801 Don't translate debugging messages.
8802 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
8803 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
8804 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
8805 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
8806
8807 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
8808 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
8809 void, not int.
8810 * tests/glr-regression.at (Badly Collapsed GLR States):
8811 Likewise.
8812 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8813 yylex should return 0 at EOF rather than aborting.
8814
8815 Improve tests for stack overflow in GLR parser.
8816 Problem reported by twlevo@xs4all.nl.
8817 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
8818 All uses removed.
8819 (yyStackOverflow): Just longjmp, but with value 2 so that caller
8820 can handle the problem.
8821 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
8822 (yyparse): New local variable yyresult to record the result.
8823 Use result of setjmp to set it, rather than storing itinto
8824 struct.
8825 (yyDone): Remove label.
8826 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
8827 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
8828 if YYABORT is used).
8829 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
8830 yyparse status; put status > 1 into diagnostic.
8831 Check that status==2 works.
8832 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
8833 Use exit status 3 for failure to open (which shouldn't happen).
8834
8835 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
8836
8837 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
8838 1 on syntax error; just let yyparse do its thing.
8839 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
8840 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
8841 (Exploding the Stack Size with Alloca):
8842 (Exploding the Stack Size with Malloc):
8843 Expect exit status 2, not 1, since the parser is supposed to blow
8844 its stack. Problem reported by twlevo@xs4all.nl.
8845
8846 * data/glr.c (yyparse): Don't assume that the initial calls
8847 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
8848 Print a stack-overflow message and fail instead.
8849 Initialize the line-number information before creating the stack,
8850 so that the stack-overflow message can report line zero safely.
8851
8852 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
8853
8854 Fix problems reported by twlevo@xs4all.nl.
8855 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
8856 (yyuserMerge): Provide a default case if b4_mergers is empty.
8857 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
8858 * tests/glr-regression.at
8859 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8860 Add casts to pacify C++ compilers.
8861 * tests/glr-regression.at (Improper merging of GLR delayed action
8862 sets): Declare yylex before using it.
8863 * tests/Makefile.am (maintainer-check-g++): Fix a stray
8864 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
8865 test for valgrind; valgrind is independent of g++.
8866 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
8867 for compatibility with POSIX 1003.1-2001 (if running coreutils).
8868 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
8869 Use a destructor, so that we can expand the stack. Change
8870 YYSTYPE to char * so that we can free it. Cast result of malloc.
8871
8872 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8873
8874 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
8875 a valgrind failure. Problem reported by twlevo@xs4all.nl.
8876
8877 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
8878
8879 * PACKAGING: New file, suggested by Bruno Haible and taken from
8880 similar wording in gettext's PACKAGING file.
8881 * NEWS: Mention PACKAGING.
8882 * Makefile.am (EXTRA_DIST): Add PACKAGING.
8883
8884 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
8885
8886 * NEWS: Document recent i18n improvements.
8887 * bootstrap: Get runtime translations into runtime-po.
8888 Create runtime-po files automatically, if possible.
8889 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
8890 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
8891 does not infringe on the user's name space.
8892 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
8893 * doc/bison.texinfo (Internationalization): Revamp the English
8894 and Texinfo syntax a bit, to try to make it clearer.
8895 (Bison Options, Option Cross Key): Mention --print-localedir.
8896 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
8897 YYENABLE_NLS. Quote a bit more.
8898 * runtime-po/.cvsignore: New file.
8899 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
8900 * runtime-po/Rules-quot: Remove; now created by bootstrap.
8901 * runtime-po/quot.sed: Likewise.
8902 * runtime-po/boldquot.sed: Likewise.
8903 * runtime-po/en@quot.header: Likewise.
8904 * runtime-po/en@boldquot.header: Likewise.
8905 * runtime-po/insert-header.sin: Likewise.
8906 * runtime-po/remove-potcdate.sin: Likewise.
8907 * runtime-po/Makevars: Likewise.
8908 * runtime-po/LINGUAS: Likewise.
8909 * runtime-po/de.po: Likewise; we will rely on the translation project
8910 to maintain this, so "bootstrap" should get it.
8911 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
8912 its value.
8913 * src/main.c (main): Bind the bison-runtime domain, too.
8914
8915 2005-07-12 Bruno Haible <bruno@clisp.org>
8916
8917 * data/yacc.c: Include <libintl.h> when NLS is enabled.
8918 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
8919 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
8920 * runtime-po: New directory.
8921 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
8922 $(DOMAIN).pot-update rule, so that old messages are never dropped.
8923 * runtime-po/Rules-quot: New file, copied from po/.
8924 * runtime-po/quot.sed: Likewise.
8925 * runtime-po/boldquot.sed: Likewise.
8926 * runtime-po/en@quot.header: Likewise.
8927 * runtime-po/en@boldquot.header: Likewise.
8928 * runtime-po/insert-header.sin: Likewise.
8929 * runtime-po/remove-potcdate.sin: Likewise.
8930 * runtime-po/Makevars: New file.
8931 * runtime-po/POTFILES.in: New file.
8932 * runtime-po/LINGUAS: New file.
8933 * runtime-po/bison-runtime.pot: New file.
8934 * runtime-po/de.po: New file.
8935 * m4/bison.m4: New file.
8936 * Makefile.am (SUBDIRS): Add runtime-po.
8937 (aclocaldir, aclocal_DATA): New variables.
8938 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
8939 Define aclocaldir.
8940 * src/getargs.c (usage): Document --print-localedir option.
8941 (PRINT_LOCALEDIR_OPTION): New enum item.
8942 (long_options): Add --print-localedir option.
8943 (getargs): Handle --print-localedir option.
8944 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
8945 (Internationalization): New section.
8946
8947 2005-07-12 Akim Demaille <akim@epita.fr>
8948
8949 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
8950 for consistency with the rest of the code.
8951 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
8952 Add separators.
8953
8954 2005-07-12 Akim Demaille <akim@epita.fr>
8955
8956 * src/parse-gram.y: Use %printer instead of YYPRINT.
8957
8958 2005-07-12 Akim Demaille <akim@epita.fr>
8959
8960 * src/symtab.h, src/symtab.c (symbol_print): New.
8961 * src/symlist.h, src/symlist.c (symbol_list_print): New.
8962 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
8963
8964 2005-07-12 Akim Demaille <akim@epita.fr>
8965
8966 * data/glr.c (b4_syncline): Fix (swap) the definitions of
8967 b4_at_dollar and b4_dollar_dollar.
8968
8969 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
8970
8971 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
8972 and Pennello's paper.
8973
8974 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
8975
8976 * data/yacc.c (yyparse): Undo previous patch. Instead,
8977 set yylsp[0] and yyvsp[0] only if the initial action
8978 sets yylloc and yylval, respectively.
8979
8980 * data/yacc.c (yyparse): In the initial action, set
8981 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
8982 This avoids the use of undefined variables if the initial
8983 action does not set yylloc and/or yylval.
8984
8985 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
8986
8987 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
8988 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
8989 Remove from CVS. These files are automatically generated.
8990 * examples/extexi: Clarify that this file is now part of Bison,
8991 not GNU M4, and that it works with any POSIX-compatible Awk.
8992 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
8993 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
8994 so that we also get calc++-parser.yy. Geneate it.
8995 Use $(AWK), not gawk, since any conforming Awk will do.
8996 Put comment before action, since older 'make' can't handle comment
8997 in action.
8998 $(BUILT_SOURCES): List all built sources, not just some of them.
8999 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9000 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9001 $($(calc_sources_generated)): Remove unnecessary test for existence
9002 of target. (This had a shell syntax error anyway; a stray "x".)
9003 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9004 calc++-parser.yy.
9005 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9006
9007 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9008 implied by the other modules.
9009
9010 2005-07-06 Akim Demaille <akim@epita.fr>
9011
9012 Bind examples/calc++ to the package.
9013 * examples/calc++/Makefile: Remove, replaced by...
9014 * examples/calc++/Makefile.am: ... this new file.
9015 * examples/calc++/test: Remove input.
9016 * examples/calc++/compile: Remove.
9017 * examples/Makefile.am: New.
9018 * configure.ac, Makefile.am: Adjust.
9019 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9020
9021 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9022
9023 * data/glr.c (yyFail): Drastically simplify; since the format argument
9024 never had any % directives, we can simply pass it to yyerror.
9025 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9026 be modified later, as that is the usual style in glr.c.
9027 Problems reported by Paul Hilfinger.
9028
9029 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9030 and size overflow errors.
9031 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9032 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9033 (YYSIZEMAX): New macro.
9034 (yystpcpy): New function, taken from yacc.c.
9035 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9036 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9037 so that we don't have to maintain their signatures.
9038 (yyFail): Check for buffer overflow, by using vsnprintf rather
9039 than vsprintf. Allocate a bigger buffer if possible.
9040 Report an error if buffer allocation fails.
9041 (yyStackOverflow): New function.
9042 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9043 the initialization was successful. It might fail if storage was
9044 exhausted.
9045 (yyexpandGLRStack): Add more checks for storage allocation failure.
9046 Use yyStackOverflow to report failures.
9047 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9048 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9049 Don't assume stack number fits in int.
9050 (yysplitStack): Check for storage allocation failure.
9051 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9052 can print diagnostics on storage allocation failure. All callers
9053 changed.
9054 (yyresolveValue): Use yybool for boolean.
9055 (yyreportSyntaxError): Check for size-calculation overflow.
9056 This code is taken from yacc.c.
9057 (yyparse): Check for storage allocation errors when allocating
9058 the initial stack.
9059
9060 2005-07-05 Akim Demaille <akim@epita.fr>
9061
9062 Extract calc++ from the documentation.
9063 * doc/bison.texinfo (Calc++): Add the extraction marks.
9064 * examples/extexi: New, from the aborted GNU Programming 2E.
9065 Separate the different paragraph of a file with empty lines.
9066 * examples/Makefile: Use it to extract the whole calc++ example.
9067
9068 2005-06-24 Akim Demaille <akim@epita.fr>
9069
9070 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9071 class typedefs.
9072
9073 2005-06-22 Akim Demaille <akim@epita.fr>
9074
9075 * doc/bison.texinfo (C++ Language Interface): First stab.
9076 (C++ Parsers): Remove.
9077
9078 2005-06-22 Akim Demaille <akim@epita.fr>
9079
9080 * data/lalr1.cc (yylex_): Honor %lex-param.
9081
9082 2005-06-22 Akim Demaille <akim@epita.fr>
9083
9084 Start a set of simple examples.
9085 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9086 * examples/calc++/calc++-driver.hh,
9087 * examples/calc++/calc++-parser.yy,
9088 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9089 * examples/calc++/compile, examples/calc++/test: New.
9090
9091 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9092
9093 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9094 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9095 which stems from the 2005-05-27 patch.
9096
9097 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9098
9099 * data/glr.c: Modify treatment of unused parameters to permit use
9100 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9101
9102 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9103
9104 Fix infringement on user name space reported by Janos Zoltan Szabo.
9105 * data/yacc.c (yyparse): strlen -> yystrlen.
9106
9107 2005-05-30 Akim Demaille <akim@epita.fr>
9108
9109 * data/lalr1.cc (_): New.
9110 Translate the various messages.
9111
9112 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9113
9114 Fix infringement on user name space reported by Bruno Haible.
9115 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9116 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9117 the user's name space.
9118 (alloca): Include <stdlib.h> to get it, if it's not built in.
9119 (YYMALLOC, YYFREE): Define only if needed.
9120 (malloc, free): Declare, but only if needed, as this infringes on
9121 the user name space.
9122
9123 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9124
9125 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9126 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9127 with %d format.
9128 * lib/ebitset.c (min, max): Undef before defining.
9129 * lib/vbitset.c (min, max): Likewise.
9130 * lib/subpipe.c (create_subpipe): Save local variables in case
9131 vfork clobbers them.
9132
9133 2005-05-24 Bruno Haible <bruno@clisp.org>
9134
9135 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9136 error message syntax used by gcc-4.0.
9137
9138 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9139
9140 * README: Mention m4 1.4.3. Remove obsolete advice about
9141 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9142
9143 * bootstrap: Remove workaround for problem I encountered with
9144 gettext 0.14.1; it seems to be fixed now.
9145
9146 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9147
9148 * NEWS: Version 2.0a.
9149
9150 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9151 the previous change.
9152
9153 Various maintainer cleanups.
9154 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9155 conftest*, for benefit of CVS commands run at the same time as
9156 "configure". Add build-aux, since "bootstrap" now creates it and
9157 its subfiles.
9158 * Makefile.cfg (move_if_change): Remove.
9159 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9160 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9161 (po_repo, do-po-update, po-update, wget_files, get-targets):
9162 (config.guess-url_prefix, config.sub-url_prefix):
9163 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9164 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9165 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9166 Remove.
9167 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9168 this is now the recommended name.
9169 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9170 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9171 ylwrap. These files now go into build-aux.
9172 * config/move-if-change: Remove.
9173 * config/prev-version.txt: Bump from 1.75 to 2.0.
9174
9175 * bootstrap: Add stdio-safer, unistd-safer modules.
9176 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9177 we don't need it).
9178 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9179 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9180 * lib/subpipe.c: Include "unistd-safer.h".
9181 (create_subpipe): Make sure all the newly-created
9182 file descriptors are > 2, so that diagnostics don't
9183 get sent down them (which might cause Bison to hang, in theory).
9184 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9185 * src/files.c (xfopen): Use fopen_safer, not fopen.
9186
9187 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9188 yesterday's yacc.c fix.
9189
9190 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9191
9192 * data/glr.c, data/lalr1.cc: Update copyright date.
9193
9194 Fix a destructor bug reported by Wolfgang Spraul in
9195 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9196 * data/yacc.c (yyabortlab): Don't call destructor, and
9197 don't set yychar to EMPTY.
9198 (yyoverflowlab): Don't call destructor.
9199 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9200 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9201 since we no longer output the message "discarding lookahead token
9202 end of input ()".
9203
9204 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9205
9206 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9207 fix a small glitch in debugging output.
9208 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9209 after YY_SYMBOL_PRINT where needed.
9210
9211 (struct yyGLRState): Add some comments.
9212 (struct yySemanticOption): Add some comments.
9213 (union yyGLRStackItem): Add comment.
9214
9215 (yymergeOptionSets): Correct this to properly perform the union,
9216 avoiding infinite reported by Michael Rosien.
9217 Update comment.
9218
9219 * tests/glr-regression.at: Add test for GLR merging error reported
9220 by M. Rosien.
9221
9222 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9223
9224 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9225 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9226 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9227 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9228 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9229 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9230 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9231 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9232 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9233 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9234 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9235 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9236 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9237 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9238 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9239 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9240 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9241 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9242 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9243 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9244 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9245 src/output.h, src/parse-gram.c, src/parse-gram.h,
9246 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9247 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9248 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9249 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9250 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9251 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9252 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9253 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9254 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9255 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9256 tests/reduce.at, tests/regression.at, tests/sets.at,
9257 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9258 Update FSF postal mail address.
9259
9260 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9261
9262 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9263 Problem reported by Ralf Menzel.
9264
9265 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9266
9267 * tests/actions.at: Test that stack overflow invokes destructors.
9268 From Marcus Holland-Moritz.
9269 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9270 from here....
9271 (yyreturn): to here. That way, destructors are called properly
9272 even if the stack overflows, or the user calls YYACCEPT or
9273 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9274 (yyoverflowlab): Destroy the lookahead.
9275
9276 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9277
9278 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9279
9280 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9281
9282 * NEWS: Bison-generated C parsers no longer quote literal strings
9283 associated with tokens.
9284 * src/output.c (prepare_symbols): Don't escape strings,
9285 since users don't want to see C escapes.
9286 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9287 in diagnostics.
9288 * tests/input.at (Torturing the Scanner): Likewise.
9289 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9290
9291 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9292
9293 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9294 the data size is known to be too small and we can't increase it.
9295 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9296
9297 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9298
9299 * src/parse-gram.y: Include quotearg.h.
9300 (string_as_id): Quote $1 before using it as a key, since the
9301 lexer no longer quotes it for us.
9302 (string_content): Don't strip quotes, since lexer no longer
9303 quotes it for us.
9304 * src/scan-gram.l: Include quotearg.h.
9305 ("\""): Omit quote.
9306 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9307 a key, since the rest of the lexer doesn't quote it.
9308 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9309 * tests/regression.at (Token definitions): Check for backslashes
9310 in token strings.
9311
9312 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9313 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9314 (yyparse): Revamp code to generate long syntax error message, to
9315 make it easier to translate, and to avoid problems with arithmetic
9316 overflow. Change "virtual memory" to "memory" in diagnostic, since
9317 we don't know whether the memory is virtual.
9318
9319 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9320
9321 * NEWS: Bison-generated C parsers now use the _ macro to
9322 translate strings.
9323 * data/yacc.c (_) [!defined _]: New macro.
9324 All English strings wrapped inside this macro.
9325 * doc/bison.texinfo (Bison Parser): Document _.
9326 * po/POTFILES.in: Include src/parse-gram.c, since it now
9327 includes translateable strings that parse-gram.y doesn't.
9328
9329 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9330
9331 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9332 reverting the 2004-10-11 change to this function.
9333 (symbol_check_alias_consistency): Don't call symbol_type_set
9334 if the type name is already correct.
9335 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9336
9337 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9338
9339 * tests/regression.at (Token definitions): Don't use a token named
9340 c, as that generates a "#define c ..." that runs afoul of buggy
9341 stdlib.h that uses the identifier c as a member of struct
9342 drand48_data. Problem reported by Horst Wente.
9343
9344 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9345
9346 * bootstrap: Change translation URL from
9347 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9348 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9349 redirection glitches. Problem reported by twlevo@xs4all.nl.
9350
9351 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9352
9353 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9354 after operands; POSIX says this isn't portable for the c99 command.
9355
9356 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9357
9358 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9359 immediately if a data overrun has occurred; this may help us track
9360 down what may be a spurious failure on MacOS.
9361
9362 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9363
9364 Respond to problems reported by twlevo@xs4all.nl.
9365
9366 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9367
9368 * src/vcg.h: Comment fix.
9369 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9370 (G_CMAX): Change to -1 instead of INT_MAX.
9371
9372 * data/yacc.c (yyparse): Omit spaces before #line.
9373
9374 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9375
9376 * src/tables.c (state_number_to_vector_number): Put it inside an
9377 "#if 0", since it's not currently used. Problem reported by
9378 Roland McGrath.
9379
9380 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9381
9382 * src/output.c (escaped_output): Renamed from
9383 escaped_file_name_output, since we now use it for symbol tags as
9384 well. All uses changed.
9385 (symbol_destructors_output, symbol_printers_output):
9386 Escape symbol tags too.
9387 Problem reported by Matyas Forstner in
9388 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9389
9390 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9391 not needed.
9392 * src/output.c (user_actions_output, token_definitions_output,
9393 symbol_destructors_output, symbol_printers_output): Likewise.
9394 * src/reader.c (prologue_augment): Likewise.
9395 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9396
9397 * src/vcg.c (output_edge): Don't quote linestyle arg.
9398 Problem reported by twlevo@xs4all.nl.
9399
9400 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9401
9402 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9403 example, reported by Derek M Jones. Also, make the example even
9404 more outrageous, to better illustrate how bad the problem is.
9405
9406 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9407
9408 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9409 putsym. Typo reported by Sebastian Piping.
9410
9411 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9412
9413 * doc/bison.texinfo (Language and Grammar): some -> same
9414 (Epilogue): int he -> in the
9415 Typos reported by Sebastian Piping via Justin Pence.
9416
9417 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9418
9419 * tests/glr-regression.at (Improper handling of embedded actions
9420 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9421 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9422 with dollar signs in test names.
9423 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9424 for a similar reason.
9425
9426 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9427
9428 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9429 wants to redefine G_VIEW.
9430
9431 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9432
9433 * src/vcg.c (get_view_str): Remove case for normal_view.
9434 Problem reported by twlevo@xs4all.nl.
9435
9436 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9437
9438 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9439 Problem reported by twlevo@xs4all.nl.
9440
9441 * doc/bison.texinfo: Change @dircategory from "GNU programming
9442 tools" to "Software development". Requested by Richard Stallman
9443 via Karl Berry.
9444
9445 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9446
9447 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9448 Problem reported by twlevo@xs4all.nl.
9449
9450 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9451
9452 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9453 keyword; it's not needed with modern compilers, and it doesn't
9454 affect correctness with older compilers. Suggested by
9455 twlevo@xs4all.nl.
9456
9457 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9458
9459 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9460 gcc -Wswitch-default.
9461 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9462 * data/yacc.c (yyparse): Likewise.
9463
9464 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9465
9466 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9467 already. Let config.h define any nonstandard values.
9468
9469 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9470
9471 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9472 for the benefit of slower hosts. Problem reported by
9473 Nelson H. F. Beebe.
9474
9475 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9476
9477 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9478 being defined and not used.
9479 * data/lalr1.cc (yyparse): Likewise.
9480 Use "if (false)" rather than "if (0)".
9481
9482 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9483
9484 * TODO: Mention that we should allow NUL bytes in tokens.
9485
9486 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9487
9488 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9489 Problem reported by Hans Aberg.
9490
9491 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9492
9493 * src/getargs.c (version): Happy new year; update overall
9494 program copyright date from 2004 to 2005.
9495
9496 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9497 Problem reported by Hans Aberg.
9498 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9499 (Output file names.): Add a test for the case when standard output
9500 is closed.
9501
9502 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9503
9504 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9505 to fix an oversight in the Bison 2.0 manual.
9506
9507 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9508
9509 * NEWS: Version 2.0. Reformat the existing news items since
9510 1.875, so that related items are grouped together.
9511 * configure.ac (AC_INIT): Bump version to 2.0.
9512 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9513
9514 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9515 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9516 otherwise, we're not testing alloca. Unfortunately there's no
9517 simple way to consult HAVE_ALLOCA here.
9518
9519 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9520 for yymsg, too.
9521
9522 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9523 hand. This avoids a warning about comparing int to size_t when
9524 GCC warnings are enabled.
9525
9526 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9527
9528 * NEWS: Bison-generated parsers no longer default to using the
9529 alloca function (when available) to extend the parser stack, due
9530 to widespread problems in unchecked stack-overflow detection.
9531 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9532 responsibility to set it to a positive value. This lets the user
9533 specify a value that is not a preprocessor constant.
9534 * data/yacc.c (YYMAXDEPTH): Likewise.
9535 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9536 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9537 to be a compile-time constant. However, explain the constraints on it.
9538 Also, explain the constraints on YYINITDEPTH.
9539 (Table of Symbols): Explain that alloca is no longer the default.
9540 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9541 to 1.
9542
9543 * doc/bison.texinfo (Location Default Action): Mention that n must
9544 be zero when k is zero. Suggested by Frank Heckenbach.
9545
9546 2004-12-22 Akim Demaille <akim@epita.fr>
9547
9548 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9549 (parser::state_type, parser::semantic_type, parser::location_type):
9550 Private, not public.
9551 (parser::parse): Return ints, not bool.
9552 Returning a bool introduces a problem: 0 corresponds to false, and
9553 it seems weird to return false on success. Returning true changes
9554 the conventions for yyparse.
9555 Alternatively we could return void and send an exception.
9556 There is no clear consensus (yet?).
9557 (state_stack, semantic_stack, location_stack): Rename as...
9558 (state_stack_type, semantic_stack_type, location_stack_type): these.
9559 Private, not public.
9560 * tests/c++.at: New.
9561 * tests/testsuite.at, tests/Makefile.am: Adjust.
9562
9563 2004-12-21 Akim Demaille <akim@epita.fr>
9564
9565 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9566
9567 2004-12-21 Akim Demaille <akim@epita.fr>
9568
9569 Don't impose std::string for filenames.
9570
9571 * data/lalr1.cc (b4_filename_type): New.
9572 (position::filename): Use it.
9573 (parser.hh): Move the inclusion of stack.hh and location.hh below
9574 the user code, so that needed headers for the filename type can be
9575 included first.
9576 Forward declare them before the user code.
9577 * tests/Makefile.am (check-local, installcheck-local): Pass
9578 TESTSUITEFLAGS to the TESTSUITE.
9579
9580 2004-12-20 Akim Demaille <akim@epita.fr>
9581
9582 Use more STL like names: my_class instead of MyClass.
9583
9584 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9585 (SemanticStack, SemanticType, StateStack, StateType)
9586 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9587 (Parser::value): Rename as...
9588 (location_stack, location_type, rhs_number_type, semantic_stack)
9589 (semantic_type, state_stack, state_type, token_number_type, stack)
9590 (slice, traits, parser::yylloc, parser::yylval): these.
9591
9592 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9593
9594 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9595
9596 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9597 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9598
9599 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9600
9601 Remove uses of 'short int' and 'unsigned short int'. This raises
9602 some arbitrary limits. It uses more memory but nowadays that's
9603 not much of an issue.
9604
9605 This change does not affect the generated parsers; that's a different
9606 task, as some users will want to conserve memory there.
9607
9608 Ideally we should use size_t to represent all object counts, and
9609 something like ptrdiff_t to represent signed differences of object
9610 counts; but that will require more code-cleanup than I have the
9611 time to do right now.
9612
9613 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
9614 Use size_t, not int or short int, to count objects.
9615 * src/closure.c (nritemset, closure): Likewise.
9616 * src/closure.h (nritemset, closure): Likewise.
9617 * src/nullable.c (nullable_compute): Likewise.
9618 * src/print.c (print_core): Likewise.
9619 * src/print_graph.c (print_core): Likewise.
9620 * src/state.c (state_compare, state_hash): Likewise.
9621 * src/state.h (struct state): Likewise.
9622 * src/tables.c (default_goto, goto_actions): Likewise.
9623
9624 * src/gram.h (rule_number, rule): Use int, not short int.
9625 * src/output.c (prepare_rules): Likewise.
9626 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
9627 errs, reductions): Likewise.
9628 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
9629 Likewise.
9630 * src/tables.c (vector_number, tally, action_number,
9631 ACTION_NUMBER_MINIMUM): Likewise.
9632 * src/output.c (muscle_insert_short_int_table): Remove.
9633
9634 2004-12-17 Akim Demaille <akim@epita.fr>
9635
9636 * data/lalr1.cc: Extensive Doxygenation.
9637 (error_): Rename as...
9638 (error): this, since it is visible to the user.
9639 Adjust callers.
9640 (Parser::message): Now an automatic variable from...
9641 (Parser::yyreport_syntax_error_): here.
9642 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
9643 Parser::error.
9644 * tests/input.at: Escape $.
9645
9646 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
9647
9648 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
9649 Parenthesize rhs to avoid obscure problems with mistakes like
9650 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
9651 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9652 b4_rhs_location): Likewise.
9653 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9654 b4_rhs_location): Likewise.
9655
9656 2004-12-16 Akim Demaille <akim@epita.fr>
9657
9658 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
9659 yacc.c: be sure to stay within yycheck_.
9660 * tests/actions.at: Re-enable C++ tests.
9661
9662 2004-12-16 Akim Demaille <akim@epita.fr>
9663
9664 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
9665 real.
9666
9667 2004-12-16 Akim Demaille <akim@epita.fr>
9668
9669 Use #define to handle the %name-prefix.
9670
9671 * data/glr.c, data/yacc.c: Comment changes.
9672 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
9673 so that one can refer to yylex in the parser file, and have it
9674 renamed, as is the case with other skeletons.
9675
9676 2004-12-16 Akim Demaille <akim@epita.fr>
9677
9678 Move lalr1.cc internals into yy*.
9679
9680 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
9681 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
9682 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
9683 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
9684 (empty_, final_, terror_, errcode_, ntokens_)
9685 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
9686 (looka_, ilooka_, error_range_, nerrs_):
9687 Rename as...
9688 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
9689 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
9690 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
9691 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
9692 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
9693 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
9694 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
9695 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
9696 these.
9697
9698 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
9699
9700 Fix some problems reported by twlevo at xs4all.
9701 * src/symtab.c (symbol_new): Report an error if the input grammar
9702 contains too many symbols. This is better than calling abort() later.
9703 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
9704 (struct node, struct graph):
9705 Rename member expand to stretch. All uses changed.
9706 (struct graph): Remove member layoutalgorithm. All uses removed.
9707 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
9708 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
9709 All uses changed.
9710 (N_STRETCH): Rename from N_EXPAND. All uses changed.
9711
9712 2004-12-15 Akim Demaille <akim@epita.fr>
9713
9714 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
9715 Add more Doxygen comments.
9716 (symprint_, stack_print_, reduce_print_, destruct_, pop)
9717 (report_syntax_error_, translate_): Rename as...
9718 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
9719 (yypop_, yyreport_syntax_error_, yytranslate_): this.
9720
9721 2004-12-15 Akim Demaille <akim@epita.fr>
9722
9723 * data/lalr1.cc (lex_): Rename as...
9724 (yylex_): this.
9725 Move the trace here.
9726 Take the %name-prefix into account.
9727 Reported by Alexandre Duret-Lutz.
9728
9729 2004-12-15 Akim Demaille <akim@epita.fr>
9730
9731 Simplify the C++ parser constructor.
9732
9733 * data/lalr1.cc (debug_): Rename as...
9734 (yydebug_): so that the parser's internals are always in the yy*
9735 pseudo namespace.
9736 Adjust uses.
9737 (b4_parse_param_decl): Remove the leading comma as it is now only
9738 called as unique argument list.
9739 (Parser::Parser): Remove the constructor accepting a location and
9740 an initial debugging level.
9741 Remove from the other ctor the argument for the debugging level.
9742 (debug_level_type, debug_level, set_debug_level): New.
9743
9744 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
9745 constructor calls.
9746
9747 2004-12-15 Akim Demaille <akim@epita.fr>
9748
9749 Remove b4_root related material: failure experiment
9750 (which goal was to allow to derive from a class).
9751
9752 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
9753 definitions and uses.
9754
9755 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
9756
9757 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
9758 not 2, since it's not portable to subtract 1 from the start of an
9759 array. The new item 0 is never set or used. All uses changed.
9760
9761 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
9762 the default definition of YYLLOC_DEFAULT. Problem reported
9763 by Frank Heckenbach.
9764
9765 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
9766
9767 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
9768 the normal case and one for the error case. Just use the
9769 first one uniformly. Problem reported by Frank Heckenbach.
9770 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
9771 use exactly the same macro in both places.
9772 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
9773 so that the normal-case YYRHSLOC works for the error case too.
9774 All uses changed.
9775 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
9776 (YYLLOC_DEFAULT): Use the same macro as glr.c.
9777 * doc/bison.texinfo (Location Default Action): Don't claim that
9778 we have an array of locations. Use the same macro for both glr
9779 and lalr parsers. Mention YYRHSLOC. Mention what happens when
9780 the index is 0.
9781
9782 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9783
9784 * HACKING: Update email addresses to send announcements to.
9785
9786 * configure.ac (AC_INIT): Bump version to 1.875f.
9787
9788 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9789
9790 * NEWS: Version 1.875e.
9791 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
9792
9793 * src/scan-skel.l: Include "complain.h", for "fatal".
9794
9795 * src/relation.h (relation_print, relation_digraph):
9796 Relation sizes are of type relation_node, not size_t (this is
9797 merely a doc fix, since the two types are equivalent).
9798 (relation_transpose): Relation sizes are of type relation_node,
9799 not int.
9800 * src/relation.c: Likewise.
9801 (top, infinity): Now of type relation_node, not int.
9802 (traverse, relation_transpose): Use relation_node, not int.
9803
9804 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
9805 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
9806 (yyparse): Remove unused local introduced in 2004-10-25 patch.
9807
9808 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
9809 specifying whether the test should be skipped. Use it tp
9810 specify that the [%defines %skeleton "lalr1.cc"] tests currently
9811 fail on some hosts, and should be skipped.
9812
9813 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
9814
9815 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
9816 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
9817 unless otherwise specified below.
9818
9819 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
9820 to allocate kernel_base, kernel_items, kernel_size, since
9821 they needn't be initialized to 0.
9822 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
9823 * src/closure.c (new_closure): Likewise, for itemset.
9824 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
9825 * src/lalr.c (set_goto_map): Likewise, for temp_map.
9826 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
9827 (build_relations): Likewise for edge, states1, includes.
9828 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
9829 * src/reader.c (packgram): Likewise, for ritem, rules.
9830 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
9831 * src/relation.c (relation_digraph): Likewise for VERTICES.
9832 (relation_transpose): Likewise for new_R, end_R.
9833 * src/symtab.c (symbols_token_translations_init): Likewise for
9834 token_translations.
9835 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
9836 (token_actions): Likewise for yydefact, actrow, conflrow,
9837 conflict_list.
9838 (save_column): Likewise for froms[symno], tos[symno].
9839 (goto_actions): Likewise for state_count.
9840 (pack_table): Likewise for base, pos, check.
9841 (tables_generate): Likewise for width.
9842
9843 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
9844 for initial core. Just have a separate core, so we needn't worry
9845 about whether kernel_size and kernel_base are initialized.
9846
9847 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
9848 kernel_size, kernel_items): Remove unnecessary initialization.
9849 * src/conflicts.c (conflicts): Likewise.
9850 * src/derives.c (derives): Likewise.
9851 * src/muscle_tablc (muscle_insert): Likewise.
9852 * src/relation.c (relation_digraph): Likewise.
9853 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
9854 conflrow, conflict_table, conflict_list, table, check):
9855 Likewise.
9856
9857 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
9858 This is because all callers pass unsigned int.
9859 * src/closure.h (new_closure): Likewise.
9860
9861 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
9862 (build_relations): Initialize includes[i] in all cases.
9863 * src/reader.c (packgram): Always initialize rules[ruleno].prec
9864 and rules[ruleno].precsym. Initialize members in order.
9865 * src/relation.c (relation_transpose): Always initialize new_R[i]
9866 and end_R[i].
9867 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
9868
9869 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
9870 conflict_list[0] was always 0, but now it isn't initialized.
9871
9872 * src/table.c (table_grow): When conflict_table grew, the grown
9873 area wasn't cleared. Fix this.
9874
9875 * lib/.cvsignore: Add strdup.c, strdup.h.
9876 * m4/.cvsignore: Add strdup.m4.
9877
9878 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
9879
9880 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
9881 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
9882 GOTO_NUMBER_MAXIMUM, since we occasionally compute
9883 ngotos + 1 without checking for overflow.
9884 (build_relations): Use END_NODE, not -1, to denote end of edges.
9885 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
9886 build_relations): Use goto_number, not int, for goto numbers.
9887 * src/tables.c (save_column, default_goto): Likewise.
9888
9889 2004-11-23 Akim Demaille <akim@epita.fr>
9890
9891 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
9892 of #defining from yystype.
9893 Don't typedef yystype, C++ does not need it.
9894 This lets it possible to forward declare it as union.
9895
9896 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
9897
9898 * bootstrap (gnulib_modules): Add extensions.
9899 Problem reported by Jim Meyering.
9900
9901 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
9902
9903 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
9904 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
9905 src/system.h, src/tables.c: XFREE -> free, to accommodate
9906 recent change to gnulib xalloc.h.
9907 Problem reported by Jim Meyering.
9908
9909 2004-11-17 Akim Demaille <akim@epita.fr>
9910
9911 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
9912
9913 2004-11-17 Akim Demaille <akim@epita.fr>,
9914 Alexandre Duret-Lutz <adl@gnu.org>
9915
9916 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
9917 changes.
9918 (YYCDEBUG): Adjust.
9919 Use it instead of cdebug_.
9920 (Parser::debug_stream, Parser::set_debug_stream): New.
9921 (Parser::symprint_): Define cdebug_ for temporary backward
9922 compatibility.
9923 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
9924 debug_stream ().
9925
9926 2004-11-17 Akim Demaille <akim@epita.fr>
9927
9928 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
9929 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
9930 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
9931 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9932
9933 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
9934
9935 * data/glr.c (yyloc_default): Remove; not used.
9936 Problem reported by Frank Heckenbach.
9937
9938 2004-10-25 Akim Demaille <akim@epita.fr>
9939
9940 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
9941 Introduce another definition to address simple location arrays.
9942 (yyGLRStack): New member: yyerror_range.
9943 (yyrecoverSyntaxError, yyparse): Update it.
9944 (yyrecoverSyntaxError): Use it when shifting the error token to
9945 have an accurate range, equivalent to the one computed by both
9946 yacc.c and lalr1.cc.
9947 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
9948 that column numbers start at column 0, as per GNU Coding
9949 Standards, the others tests, and the doc.
9950 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
9951 Adjust to the above change (first column is 0).
9952 And adjust the location of the "<error>", now covering the whole
9953 line.
9954
9955 2004-10-22 Akim Demaille <akim@epita.fr>
9956 and Paul Eggert <eggert@cs.ucla.edu>
9957
9958 Remove some arbitrary limits on goto numbers and relations.
9959 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
9960 initial values, since they're never used.
9961 (set_goto_map): ngotos is now unsigned, so test for overflow
9962 by seeing whether it wraps around to zero.
9963 * src/lalr.h (goto_number): Now size_t, not short int.
9964 (GOTO_NUMBER_MAXIMUM): Remove.
9965 * src/relation.c (relation_print, traverse, relation_transpose):
9966 Check for END_NODE rather than looking at sign.
9967 * src/relation.h (END_NODE): New macro.
9968 (relation_node): Now size_t, not short int.
9969
9970 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
9971
9972 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
9973 keyword, not an identifier. Problem reported by Baron Schwartz in
9974 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
9975
9976 2004-10-11 Akim Demaille <akim@epita.fr>
9977
9978 * src/symtab.c (symbol_check_alias_consistency): Also check
9979 type names, destructors, and printers.
9980 Reported by Alexandre Duret-Lutz.
9981 Recode the handling of associativity and precedence in terms
9982 of symbol_precedence_set.
9983 Accept no redeclaration at all, not even equal to the previous
9984 value.
9985 (redeclaration): New.
9986 Use it to factor redeclaration complaints.
9987 (symbol_make_alias): Don't set the type of the alias, let
9988 symbol_check_alias_consistency do it as for other features.
9989 * src/symtab.h (symbol): Add new member prec_location, and
9990 type_location.
9991 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
9992 * tests/input.at (Incompatible Aliases): New.
9993
9994 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
9995
9996 .cvsignore fixes to accommodate gnulib changes,
9997 and the practice of naming build directories "_build".
9998 * .cvsignore: Add "_*". Sort.
9999 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10000 * m4/.cvsignore: Add "*_gl.m4".
10001
10002 2004-10-06 Akim Demaille <akim@epita.fr>
10003
10004 * src/parse-gram.y (add_param): Fix the truncation of trailing
10005 spaces.
10006
10007 2004-10-05 Akim Demaille <akim@epita.fr>
10008
10009 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10010 whether the reducion was empty or not. This leaves room to
10011 improve the use of YYLLOC_DEFAULT in such a case.
10012 lalr1.cc is still experimental, so changing this is acceptable.
10013 And finally, there are probably not many users who changed the
10014 handling of locations in GLR, so changing is admissible too.
10015
10016 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10017 empty reduction, set @$ to an empty location ending the previously
10018 stacked symbol.
10019 Adjust uses to make sure the code is triggered on empty
10020 reductions.
10021 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10022 expected output: empty reductions have empty locations.
10023
10024 2004-09-29 Akim Demaille <akim@epita.fr>
10025
10026 * data/lalr1.cc: Move towards a more standard C++ coding style
10027 for templates: Class < T > -> Class<T>.
10028
10029 2004-09-29 Akim Demaille <akim@epita.fr>
10030
10031 * data/lalr1.cc: Reinstall the former ctor, for sake of
10032 compatibility, but warn it will be removed.
10033 Move towards a more standard C++ coding style (i.e., type *var ->
10034 type* var).
10035
10036 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10037
10038 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10039 since it's less likely to work if NULs are involved in the future.
10040
10041 2004-09-27 Akim Demaille <akim@epita.fr>
10042
10043 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10044
10045 2004-09-27 Akim Demaille <akim@epita.fr>
10046
10047 * data/lalr1.cc (b4_parse_param_decl_1): New.
10048 (b4_parse_param_decl): Use it to have different names between attribute
10049 and argument names.
10050 (b4_cc_constructor_call): Likewise.
10051
10052 2004-09-24 Akim Demaille <akim@epita.fr>
10053
10054 * src/parse-gram.y (add_param): Strip the leading and trailing
10055 blanks from a formal argument declaration.
10056 (YY_LOCATION_PRINT): New.
10057
10058 2004-09-24 Akim Demaille <akim@epita.fr>
10059
10060 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10061 after the location.
10062
10063 2004-09-24 Akim Demaille <akim@epita.fr>
10064
10065 * doc/bison.texinfo (Table of Symbols): Sort.
10066
10067 2004-09-21 Akim Demaille <akim@epita.fr>
10068
10069 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10070 the useless parentheses.
10071 Suggested by Paul Eggert.
10072
10073 2004-09-20 Akim Demaille <akim@epita.fr>
10074
10075 Let the initial-action act on the look-ahead, and use it for the
10076 "initial push" (corresponding to an hypothetical beginning-of-file).
10077 And let lalr1.cc honor %initial-action.
10078
10079 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10080 example.
10081 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10082 (Parser::Parser): Remove the ctor that used to initialize it.
10083 (Parser::parse): Like in the other skeletons, issue the "starting
10084 parse" message before any action.
10085 Honor %initial-action.
10086 Initialize the stacks with the lookahead.
10087 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10088 look-ahead.
10089 Push them in the stacks.
10090 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10091
10092 2004-09-20 Akim Demaille <akim@epita.fr>
10093
10094 * doc/bison.texinfo (Initial Action Decl): New.
10095
10096 2004-09-20 Akim Demaille <akim@epita.fr>
10097
10098 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10099 clearer criterion to define it.
10100 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10101 When reducing on an empty RHS, use the latest stacked location as
10102 location.
10103 yylloc is not always available.
10104 * data/glr.c: Likewise.
10105 Also, honor initial-actions.
10106
10107 2004-09-20 Akim Demaille <akim@epita.fr>
10108
10109 * data/yacc.c (YY_LOCATION_PRINT): New.
10110 Define when we know YYLTYPE's structure, i.e., when the default
10111 YYLLOC_DEFAULT is used.
10112 * data/c.m4 (b4_yysymprint_generate): Use it.
10113 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10114 value of the result.
10115 (error_start_): Replace with...
10116 (error_range_): this location array.
10117 This allows to replace code relying on the implementation of
10118 locations by portable code.
10119 * data/yacc.c (yylerrsp): Replace with...
10120 (yyerror_range): this.
10121 Every time a token is popped, update yyerror_range[0], to have an
10122 accurate location for the error token.
10123 * data/glr.c (YY_LOCATION_PRINT): New.
10124 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10125 deference a pointer.
10126 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10127 report the location in %printers.
10128
10129 * src/scan-skel.l: Instead of abort, report error messages to ease
10130 understanding skeleton scanning failures.
10131
10132 2004-09-16 Akim Demaille <akim@epita.fr>
10133
10134 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10135 (iterator, const_iterator): these, to be more in the C++ spirit.
10136 Also, return reverse iterators so that when displaying the stack
10137 we display its bottom first.
10138 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10139 from yacc.c.
10140 We should probably use vector here though.
10141
10142 2004-09-16 Akim Demaille <akim@epita.fr>
10143
10144 Have more complete shift traces.
10145
10146 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10147 to report Shifts instead of ad hoc YYDPRINTF invocations,
10148 including for the error token.
10149 * data/lalr1.cc (symprint_): Output the location.
10150 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10151 output the location within the %printer.
10152 Activate GLR tests, at least to make sure they compile properly.
10153 They still don't pass though.
10154 * tests/calc.at: Adjust expect verbose output, since now "Entering
10155 state..." is on a different line than the "Shifting" message.
10156
10157 2004-09-08 Akim Demaille <akim@epita.fr>
10158
10159 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10160 Bison directive from the Bison file to the invocation of this
10161 macro, so that these directives are passed to
10162 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10163 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10164 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10165 the extra Bison directives instead of the whole series.
10166 Change the grammar so that there are recoverable errors, and
10167 unrecoverable errors. Now we can have the parser give up before
10168 consuming the whole input. As a result we now can observe that
10169 the lookahead is freed when needed.
10170 Change the parser source to parse argv[1] instead of a hard coded
10171 string.
10172 Simplify yylex, and give a value and location to EOF.
10173 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10174 passed directives already coded in the file.
10175 Add some tests to check the location of "error".
10176 For some tests, the C++ parser is correct, and not yacc.c.
10177 For other tests, they provide different, but unsatisfying, values,
10178 so keep the C++ value so that at least one parser is "correct"
10179 according to the test suite.
10180 (Actions after errors): Remove, this is subsumed by the
10181 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10182
10183 2004-09-06 Akim Demaille <akim@epita.fr>
10184
10185 * data/lalr1.cc: Adjust the indentation of the labels.
10186 (Parser::pop): New.
10187 Use it.
10188
10189 2004-09-06 Akim Demaille <akim@epita.fr>
10190
10191 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10192 argument, an informative message.
10193 Call YY_SYMBOL_PRINT.
10194 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10195 * data/lalr1.cc (destruct_): Likewise.
10196 In addition, no longer depend on b4_yysymprint_generate and
10197 b4_yydestruct_generate to generate these functions, do it "by
10198 hand".
10199
10200 2004-09-03 Akim Demaille <akim@epita.fr>
10201
10202 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10203 invoked, yydestruct the lookahead.
10204 * tests/calc.at (Calculator $1): Update the expected lengths of
10205 traces: there is an added line for the discarded lookahead.
10206 * doc/bison.texinfo (Destructor Decl): Some rewording.
10207 Define "discarded" symbols.
10208
10209 2004-09-02 Akim Demaille <akim@epita.fr>
10210
10211 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10212
10213 2004-09-02 Akim Demaille <akim@epita.fr>
10214
10215 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10216 (YYDSYMPRINTF): Rename as...
10217 (YY_SYMBOL_PRINT): this.
10218 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10219 two.
10220 Use it instead of direct symprint_ calls.
10221 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10222 one.
10223
10224 2004-09-02 Akim Demaille <akim@epita.fr>
10225
10226 * data/lalr1.cc (b4_yysymprint_generate): New.
10227 (symprint_): New member function, defined when YYDEBUG.
10228 Use it consistently instead of token/nterm debugging output by
10229 hand.
10230 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10231 %printer calls to use cdebug_ when using lalr1.cc.
10232
10233 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10234
10235 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10236 with #ifdef YYDEBUG.
10237
10238 2004-08-26 Akim Demaille <akim@epita.fr>
10239
10240 * doc/bison.texinfo (Implementing Loops): Rename as...
10241 (Implementing Gotos/Loops): this.
10242
10243 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10244
10245 Adjust to latest gnulib.
10246 * bootstrap (gnulib_modules): Add xalloc-die.
10247 Set LC_ALL=C so that file names sort consistently.
10248 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10249 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10250 uintmax_t.m4, ulonglong.m4.
10251 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10252 po.m4 since we are now using _gl.m4 instead.
10253
10254 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10255
10256 * src/scan-action.l: Remove. Scanning of semantic actions is
10257 handled in scan-gram.l.
10258
10259 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10260
10261 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10262
10263 * src/location.h (struct): The file member is a uniqstr.
10264 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10265
10266 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10267
10268 Fix bug with non-%union parsers that have printers or destructors,
10269 which led to a Bison core dump. Reported by Peter Fales in
10270 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
10271
10272 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10273 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10274 not to our own type.
10275 * src/output.c (symbol_destructors_output, symbol_printers_output):
10276 Don't assume %union.
10277 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10278 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10279 UNION-FLAG. All callers changed.
10280 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10281 Use type char, not unsigned int, when declaring an array of char;
10282 this lets us remove a cast.
10283 (Printers and Destructors): Add non-%union test cases.
10284
10285 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10286
10287 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10288 GLR writeups. E.g., avoid frenchspacing and the future tense,
10289 change "lookahead" to "look-ahead", and change "wrt" to "with
10290 respect to".
10291
10292 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10293
10294 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10295 New sections, split off from the GLR Parsers section. Put the new
10296 Simple GLR Parser near the start of the GLR section, for clarity.
10297 Rewrite connective text.
10298
10299 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
10300
10301 * doc/bison.texinfo (Simple GLR Parsers): New section.
10302
10303 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10304
10305 * NEWS, TODO, doc/bison.texinfo:
10306 Use "look-ahead" instead of "lookahead", to be consistent.
10307 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10308 while we're fixing "look-ahead".
10309 * src/conflicts.c (shift_set): Renamed from shiftset.
10310 (look_ahead_set): Renamed from lookaheadset.
10311 * src/print.c: Likewise.
10312 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10313 name for "lookahead".
10314 (report_types, usage): Likewise.
10315 * src/getargs.h (report_look_ahead_tokens): Renamed from
10316 report_lookaheads.
10317 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10318 compute_lookaheads.
10319 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10320 (look_ahead_tokens_print): Renamed from lookaheads_print.
10321 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10322 state_rule_lookaheads_print.
10323 * src/state.h: Likewise.
10324 (reductions.look_ahead_tokens): Renamed from lookaheads.
10325 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10326 AT_DATA_LOOKAHEADS_GRAMMAR.
10327
10328 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10329
10330 * README: Update location of patched M4 distribution.
10331
10332 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10333
10334 Don't assume the C++ compiler takes the same arguments as the C compiler
10335 (trivial change).
10336 * configure.ac (O0CXXFLAGS): New var.
10337 * tests/atlocal.in (CXXFLAGS): Use it.
10338
10339 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10340
10341 Fix some "make check" problems with C++ reported by
10342 Albert Chin-A-Young for Tru64 C++ in this thread:
10343 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10344
10345 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10346 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10347 Output to a .cc file for C++, not to a .c file.
10348 * tests/calc.at (AT_CHECK_CALC): Likewise.
10349 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10350 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10351
10352 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10353
10354 * tests/calc.at, tests/actions.at: Workaround for SGI
10355 C++ compiler. (trivial change)
10356
10357 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10358
10359 Spent a few hours checking out which prerequisite versions the
10360 current sources actually require. I went all the way back to
10361 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10362 a seemingly endless set of combinations of versions more recent
10363 than that. The bottom line is that the current sources require
10364 fairly recent versions of the build tools, and it'll be some work
10365 to change this.
10366 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10367 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10368 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10369 Add comments explaining why those particular versions are
10370 currently needed.
10371
10372 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10373 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
10374 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
10375
10376 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10377 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10378
10379 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10380
10381 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10382 0.11.5. Suggested by Bruno Haible.
10383 * bootstrap: Remove gettext version checking.
10384
10385 * doc/bison.texinfo (Decl Summary): Also mention that %union
10386 can depend on prerequisite types. Problem reported by Tim
10387 Van Holder.
10388
10389 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10390
10391 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10392 * README-alpha: Don't tell people not to package this.
10393
10394 * bootstrap: Don't assume $(...) works; use `...` instead.
10395 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10396 gettext better.
10397
10398 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10399 put into the -d output file, and mention what to do if YYSTYPE is
10400 defined as a macro.
10401
10402 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10403
10404 Undo change made earlier today: it caused autopoint to not bring
10405 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10406 autopoint's.
10407
10408 * bootstrap: Check that gettext version matches what's in
10409 configure.ac. Warn users to ignore robots.txt ERROR 404.
10410 * bootstrap: Undo today's earlier change (logged below).
10411 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
10412
10413 The gettext version checking is causing more trouble than it's
10414 curing; remove it. Problem reported by Paul Hilfinger.
10415
10416 * bootstrap: Issue a warning that one can expect a message
10417 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10418 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10419
10420 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10421
10422 Ensure that the C++ compiler used for testing actually works on a
10423 simple test program; if not, skip the C++-related tests. Problem
10424 reported by Vin Shelton in:
10425 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
10426
10427 * m4/cxx.m4: New file.
10428 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10429 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10430 * tests/local.at (AT_COMPILE_CXX): Use it.
10431
10432 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10433
10434 * data/glr.c (yylloc): Output this macro even if locations are not
10435 being generated, as the GLR parser needs it even in that case.
10436 Problem reported by Troy A. Johnson
10437 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10438
10439 * configure.ac (AC_INIT): Update to 1.875e.
10440
10441 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10442
10443 * NEWS: Version 1.875d.
10444 * configure.ac (AC_INIT): Likewise.
10445 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10446
10447 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10448 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10449 lalr1.cc runs afoul of the first, and the last two are no longer
10450 supported by GCC 3.4.0.
10451 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10452 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10453
10454 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10455
10456 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10457 unsigned int, for compatibility with latest gnulib hash module.
10458 * src/state.c (state_hash, state_hasher): Likewise.
10459 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10460 * src/uniqstr.c (hash_uniqstr): Likewise.
10461
10462 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10463
10464 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10465
10466 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10467 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10468 character and string literals.
10469 (unexpected_end): New function.
10470 (unexpected_eof): Use it.
10471 (unexpected_newline): New function.
10472 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10473 actions.
10474
10475 * NEWS: Document %expect-rr.
10476
10477 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10478 Fix typo by replacing $1 with $option.
10479 Remove more 'intl'-related files.
10480 Don't DEFUN AM_INTL_SUBDIR twice.
10481
10482 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10483 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10484 strtoul.c.
10485 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10486 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10487 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10488 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10489 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10490 * src/.cvsignore: Add *.output.
10491
10492 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10493 gets copied to the output file.
10494
10495 2004-04-28 Paul Eggert <eggert@twinsun.com>
10496
10497 Get files from the gnulib and po repositories, instead of relying
10498 on them being in our CVS. Upgrade to latest versions of gnulib
10499 and Automake.
10500
10501 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10502 * bootstrap: Bootstrap from gnulib and po repositories.
10503 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10504 * README-cvs: Document these changes. Remove version numbers from
10505 mentions of build tools, since they change so often. Mention Flex.
10506
10507 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10508 (gl_USE_SYSTEM_EXTENSIONS): Add.
10509 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10510 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
10511 does this for us.
10512 (AC_ISC_POSIX): Remove; we no longer support this
10513 ancient OS, as it gets in the way of latest Autoconf & gnulib.
10514 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10515 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10516 Do not check for C89 headers, except for locale.h which is used
10517 by the Yacc library and must port to K&R hosts.
10518 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10519 Do not check for C89 functions, except for setlocale which is
10520 used by the Yacc library.
10521 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10522 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10523 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10524 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10525 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10526 AM_GNU_GETTEXT): Remove; now done by:
10527 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10528 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10529 for us.
10530
10531 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10532 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10533 Define to empty, as gnulib.mk will do the rest for us.
10534 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10535 for us.
10536 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10537 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10538
10539 * src/files.c: Include gnulib's xstrndup.h.
10540
10541 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10542 (REALLOC): Use xnrealloc, for likewise.
10543 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10544 (strnlen, memrchr): Remove decls; functions no longer used.
10545 Include <stpcpy.h>.
10546
10547 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10548 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10549 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10550 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10551 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10552 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10553 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10554 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10555 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10556 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10557 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10558 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10559 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10560 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10561 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10562 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10563 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10564 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10565 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10566 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10567 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10568 Remove, as these files are now generated automatically
10569 by bootstrap or automake.
10570
10571 * po/ChangeLog: Remove: all but one entry was a duplicate
10572 of this file, and I moved that 2000-11-02 entry here.
10573
10574 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10575 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10576 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10577 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10578 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10579 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10580 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10581 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10582 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10583 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10584 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10585 xstrndup.h.
10586 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10587 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10588 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10589 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10590 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10591 * src/.cvsignore: Remove *_.c.
10592
10593
10594 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10595 support it. (The latest stable gzip doesn't.)
10596
10597 2004-04-27 Paul Eggert <eggert@twinsun.com>
10598
10599 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10600 case, as stos_ is now used by destructors due to the 2004-02-09
10601 change.
10602
10603 Remove more K&R C support.
10604 * lib/libiberty.y (PARAMS): Remove. All uses removed.
10605 * lib/subpipe.c (errno): Remove decl.
10606 Include <stdlib.h> unconditionally.
10607 (EXIT_FAILURE): Remove macro.
10608 * src/complain.c (vfprintf, strerror): Remove.
10609 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
10610 unconditionally.
10611 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
10612 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
10613 (strchr, strspn, memchr): Remove decls.
10614 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
10615 unconditionally. Do not declare perror.
10616 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
10617 unconditionally.
10618
10619 * src/complain.c (_): Remove useless defn, as system.h defines this.
10620
10621 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
10622 with latest obstack.h.
10623 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
10624 to procedure types, as obstack.h now does that for us.
10625 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
10626
10627 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
10628 so that this include file can stand alone.
10629 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
10630 does this now. Include subpipe.h first after config.h, to
10631 test whether it can stand alone.
10632
10633 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
10634 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
10635 unused declaration.
10636
10637 * tests/synclines.at (%union synch line): Put a dummy member in
10638 the union, because empty unions aren't allowed in C. Caught
10639 by GCC 3.4.0.
10640
10641 2004-04-13 Jim Meyering <jim@meyering.net>
10642
10643 * src/conflicts.c (conflicts_print): Correct format string typo:
10644 use `%%' to produce literal `%'. (trivial change)
10645
10646 2004-03-30 Paul Eggert <eggert@twinsun.com>
10647
10648 * src/getargs.c (version): Update copyright year to 2004.
10649
10650 * data/c.m4 (b4_int_type): Use 'short int' rather than
10651 'short', and similarly for 'long', 'unsigned', etc.
10652 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
10653 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
10654 yy_yypstack, yydumpstack): Likewise.
10655 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
10656 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
10657 Likewise.
10658 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
10659 yy_stack_print, yyparse): Likewise.
10660 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
10661 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
10662 * lib/bitset.c (bitset_print): Likewise.
10663 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
10664 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10665 * lib/bitsetv.c (bitsetv_dump): Likewise.
10666 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
10667 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
10668 Likewise.
10669 * src/LR0.c (allocate_itemsets): Likewise.
10670 * src/gram.h (rule_number, rule): Likewise.
10671 * src/lalr.h (goto_number): Likewise.
10672 * src/nullable.c (nullable_compute): Likewise.
10673 * src/output.c (prepare_rules): Likewise.
10674 * src/relation.c (relation_print, relation_digraph): Likewise.
10675 * src/relation.h (relation_node): Likewise.
10676 * src/state.h (state_number, transitions, errs, reductions,
10677 struct state): Likewise.
10678 * src/symtab.h (symbol_number, struct symbol): Likewise.
10679 * src/tables.c (vector_number, tally, action_number,
10680 default_goto, goto_actions): Likewise.
10681 * tests/existing.at (GNU Cim Grammar): Likewise.
10682 * tests/regression.at (Web2c Actions): Likewise.
10683
10684 * src/output.c (muscle_insert_short_int_table): Renamed from
10685 muscle_insert_short_table. All uses changed.
10686
10687 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10688
10689 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
10690 (declaration): Replace expected_conflicts with expected_sr_conflicts.
10691 Add %expect-rr rule.
10692
10693 * src/scan-gram.l: Recognize %expect-rr.
10694
10695 * src/conflicts.h (expected_sr_conflicts): Rename from
10696 expected_conflicts.
10697 (expected_rr_conflicts): Declare.
10698
10699 * src/conflicts.c (expected_sr_conflicts): Rename from
10700 expected_conflicts.
10701 (expected_rr_conflicts): Define.
10702 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
10703 for GLR parsers.
10704 Use expected_sr_conflicts in place of expected_conflicts.
10705 Warn if expected_rr_conflicts used in non-GLR parser.
10706
10707 * doc/bison.texinfo: Add documentation for %expect-rr.
10708
10709 2004-03-08 Paul Eggert <eggert@gnu.org>
10710
10711 Add support for hex token numbers. Suggested by Odd Arild Olsen in
10712 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
10713
10714 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
10715 in lalr1.cc.
10716 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
10717 * src/scan-gram.l (scan_integer): New function.
10718 ({int}): Use it.
10719 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
10720 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
10721 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
10722 Say "long int", not "long", for uniformity with GNU style.
10723
10724 2004-02-25 Paul Eggert <eggert@twinsun.com>
10725
10726 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
10727 compilers. This fixes a problem with Intel's C++ compiler being
10728 chatty, reported by Guido Trentalancia in
10729 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
10730
10731 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
10732
10733 Support %destructor and merge error locations in lalr1.cc.
10734
10735 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
10736 (Parser::stos_): Define unconditionally.
10737 (Parser::destruct_): New method. Generate its body with
10738 b4_yydestruct_generate.
10739 (Parser::error_start_): New attribute.
10740 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
10741 token which are discarded.
10742 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
10743 error_start_ when erroneous token are discarded.
10744 (Parser::parse) <yyerrlab1>: Compute the location of the error
10745 token so that it covers all the discarded tokens.
10746 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
10747 it can be called with `%skeleton "lalr1.cc"', and do that.
10748
10749 2004-02-02 Paul Eggert <eggert@twinsun.com>
10750
10751 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
10752 $(top_srcdir)/lib and ../lib. This fixes a bug reported
10753 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
10754 There's no need to mention top_builddir since Automake does that
10755 for us.
10756 (INCLUDES): Remove, as Automake says it's obsolescent.
10757 Contents migrated into AM_CPPFLAGS as described above.
10758 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
10759
10760 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10761
10762 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
10763 (yyreportSyntaxError): Handle case where lookahead token is
10764 YYEMPTY.
10765
10766 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10767
10768 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
10769 resulting parsers are compilable with C++.
10770
10771 2003-12-23 Paul Eggert <eggert@twinsun.com>
10772
10773 * config/depcomp, config/install-sh: Sync with Automake 1.8.
10774 * src/output.c (output_skeleton): Rename local var.
10775 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
10776 Bison tokens, as this runs afoul of the 2003-10-07 change that
10777 disallowed NUL bytes in character constants or string literals.
10778
10779 * tests/local.at: Require Autoconf 2.59's Autotest.
10780 * tests/testsuite.at: Don't include local.at, since we now assume
10781 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
10782 including it.
10783 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
10784 multiple inclusion warnings.
10785
10786 2003-12-02 Akim Demaille <akim@epita.fr>
10787
10788 * doc/bison.texinfo (How Can I Reset the Parser): More about start
10789 conditions.
10790 From Bruno Haible.
10791
10792 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
10793
10794 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
10795
10796 2003-10-07 Paul Eggert <eggert@twinsun.com>
10797
10798 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
10799 if testsuite doesn't exist.
10800
10801 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
10802 literals, unfortunately.
10803 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
10804 Complain about NUL bytes in character constants or string literals.
10805
10806 2003-10-05 Paul Eggert <eggert@twinsun.com>
10807
10808 * NEWS: Don't document %no-default-prec, as it's still
10809 too experimental.
10810 * doc/bison.texinfo: Document %no-default-prec only if
10811 the defaultprec flag is set. Normally it's not.
10812
10813 2003-10-04 Paul Eggert <eggert@twinsun.com>
10814
10815 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
10816 non-modifiable lvalue, instead of a modifiable one.
10817 * doc/bison.texinfo (Actions): Document that $$ can
10818 be assigned to. Do not claim that $$ and $N are
10819 array element references: user code should not rely on this.
10820
10821 2003-10-01 Paul Eggert <eggert@twinsun.com>
10822
10823 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
10824 (grammar_declaration): Use it.
10825 * src/scan-gram.l: New token %no-default-prec.
10826 * tests/conflicts.at: Revamp tests to use %no-default-prec.
10827 * NEWS, doc/bison.texinfo: Document the above.
10828
10829 2003-10-01 Akim Demaille <akim@epita.fr>
10830
10831 VCG no longer supports long_straight_phase.
10832
10833 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
10834 * src/print_graph.c (print_graph): Adjust.
10835
10836 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
10837 and Paul Eggert <eggert@twinsun.com>
10838
10839 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
10840 Table of Symbols): Document %default-prec.
10841 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
10842 (grammar_declaration): Set default_prec on %default-prec.
10843 * src/scan-gram.l (%default-prec): New token.
10844 * src/reader.h (default_prec): New flag.
10845 * src/reader.c: Likewise.
10846 (packgram): Handle it.
10847 * tests/conflicts.at (%default-prec without %prec,
10848 %default-prec with %prec, %default-prec 1): New tests.
10849
10850 2003-09-30 Paul Eggert <eggert@twinsun.com>
10851
10852 * tests/testsuite.at: Include local.at, not input.at, fixing
10853 a typo in the 2003-08-25 patch.
10854
10855 2003-08-27 Akim Demaille <akim@epita.fr>
10856
10857 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
10858 GCC warnings.
10859
10860 2003-08-26 Akim Demaille <akim@epita.fr>
10861
10862 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
10863 "<\#" to avoid magic from Gnus when posting parts of this script.
10864
10865 2003-08-26 Akim Demaille <akim@epita.fr>
10866
10867 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
10868 (Parser::parse): here.
10869 Adjust: nerrs and errstatus is now replaced by...
10870 (Parser::nerrs_, Parser::errstatus_): New.
10871
10872 2003-08-25 Akim Demaille <akim@epita.fr>
10873
10874 * config/announce-gen, Makefile.cfg: New.
10875 * Makefile.am: Adjust.
10876 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
10877 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
10878
10879 2003-08-25 Akim Demaille <akim@epita.fr>
10880
10881 When reducing initial empty rules, Bison parser read an initial
10882 location that is not defined. This results in garbage, and that
10883 affects Bison's own parser. Therefore we need (i) to extend Bison
10884 to support a means to initialize this location, and (ii) to use
10885 this CVS Bison to fix CVS Bison's parser.
10886
10887 * src/reader.h, reader.c (epilogue_augment): Remove, replace
10888 with...
10889 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
10890 * src/parse-gram.y: Adjust.
10891 (%initial-action): New.
10892 (%error-verbose): Since we require CVS Bison, there is no reason
10893 not to use it.
10894 * src/scan-gram.l: Adjust.
10895 * src/Makefile.am (YACC): New, to make sure we use our own parser.
10896 * data/yacc.c (yyparse): Use b4_initial_action.
10897
10898 2003-08-25 Akim Demaille <akim@epita.fr>
10899
10900 * doc/bison.texinfo: Don't promote stdout for error messages.
10901
10902 2003-08-25 Akim Demaille <akim@epita.fr>
10903
10904 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
10905 From Alexandre Duret-Lutz.
10906
10907 2003-08-25 Akim Demaille <akim@epita.fr>
10908
10909 Version 1.875c.
10910
10911 2003-08-25 Akim Demaille <akim@epita.fr>
10912
10913 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
10914 Use them.
10915
10916 2003-08-25 Akim Demaille <akim@epita.fr>
10917
10918 * data/lalr1.cc (Parser::reduce_print_): New.
10919 Use it.
10920
10921 2003-08-25 Akim Demaille <akim@epita.fr>
10922
10923 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
10924 error recovery loops. This patch is based on
10925 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
10926 Also, augment the similarity between lalr1.cc and yacc.c.
10927 Note: the locations of error recovery rules are not correct yet.
10928
10929 * data/lalr1.cc: Comment changes to augment the similarity between
10930 lalr1.cc and yacc.c.
10931 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
10932 (yyerrlab1): Remove, but where it used to be (now the bottom part of
10933 yyerrlab), when hitting EOF, pop the whole stack here instead of
10934 merely falling thru the default error handling mechanism.
10935 (yyerrorlab): New label, with the old contents of YYERROR,
10936 plus the following change: pop the stack of rhs corresponding
10937 to the production that invoked YYERROR. That is how Yacc
10938 behaves (required by POSIX).
10939 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
10940 fail.
10941
10942 2003-08-25 Akim Demaille <akim@epita.fr>
10943
10944 Tune local.at so that people can "autom4te -l autotest calc.at -o
10945 calc" for instance, to extract a sub test suite.
10946
10947 * tests/testsuite.at: Move the initialization, Autotest version
10948 requirement, and AT_TESTED invocation into...
10949 * tests/local.at: here.
10950 * tests/testsuite.at: Include it for compatibility with Autoconf
10951 2.57.
10952 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
10953 be ignore.
10954
10955 2003-08-04 Paul Eggert <eggert@twinsun.com>
10956
10957 Rework code slightly to avoid gcc -Wtraditional warnings.
10958 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
10959 The returned value is now stored in *YY0. All callers changed.
10960 * src/output.c (merge_output): Adjust to the above change.
10961
10962 2003-07-26 Paul Eggert <eggert@twinsun.com>
10963
10964 * data/glr.c (YYASSERT): New macro.
10965 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
10966 yyresolveStates, yyprocessOneStack):
10967 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
10968 Derived from a suggestion by Frank Heckenbach.
10969
10970 2003-07-25 Paul Eggert <eggert@twinsun.com>
10971
10972 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
10973 for portability to K&R C (after ansi2knr, presumably). See
10974 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
10975 by Frank Heckenbach, though I have omitted the structure-initialization
10976 part of his glr-knr.diff patch since I recall that the Portable
10977 C Compiler didn't require that change.
10978
10979 Let the user specify how to allocate and free memory.
10980 Derived from a suggestion by Frank Heckenbach in
10981 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
10982 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
10983 All uses of free, malloc, realloc changed to use these macros,
10984 and unnecessary casts removed.
10985 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
10986
10987 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
10988
10989 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
10990 use s.empty() rather than s == "" to test for empty string; see
10991 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
10992 (trivial change)
10993
10994 2003-06-25 Akim Demaille <akim@epita.fr>
10995
10996 * config/depcomp, config/install-sh: Update from masters.
10997
10998 2003-06-20 Paul Eggert <eggert@twinsun.com>
10999
11000 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11001 and return properly parenthesized result.
11002 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11003 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11004 Remove unnecessary parentheses from uses.
11005 * doc/bison.texinfo (Location Default Action): Describe the
11006 conventions for parentheses.
11007
11008 2003-06-19 Paul Eggert <eggert@twinsun.com>
11009
11010 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11011 yyreportTree): Do not assume that size_t is the same width as int,
11012 when printing sizes. Print sizes using an unsigned format.
11013 Problem reported by Frank Heckenbach in
11014 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11015
11016 Port to Forte Developer 7 C compiler.
11017 * data/glr.c (struct YYLTYPE): If locations are not being used,
11018 declare a single dummy member, as empty structs do not conform
11019 to the C standard.
11020 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11021 the Forte Developer 7 C compiler complains that end-of-loop
11022 code is not reached.
11023
11024 2003-06-17 Paul Eggert <eggert@twinsun.com>
11025
11026 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11027 avoid warnings from picky compilers about redefinition of PARAMS.
11028
11029 2003-06-17 Paul Eggert <eggert@twinsun.com>
11030
11031 Version 1.875b.
11032
11033 * NEWS: Document 1.875b.
11034
11035 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11036 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11037 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11038 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11039 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11040 per recent gettext manual's suggestion.
11041 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11042 Use prototypes, not old-style definitions.
11043 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11044 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11045 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11046 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11047 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11048 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11049 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11050 vbitset_or_and_cmp, vbitset_copy): Likewise.
11051
11052 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11053 Do not include <stdlib.h>.
11054 (PARAMS): Define unconditionally for C89.
11055 (ATTRIBUTE_NORETURN): Remove.
11056 (ATTRIBUTE_UNUSED): Define unconditionally.
11057
11058 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11059 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11060 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11061 * lib/vbitset.c, lib/vbitset.h: New files.
11062 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11063 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11064 from libbitset.
11065
11066 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11067 `How Can I Reset @code{yyparse}', since texinfo does not allow
11068 arbitrary @ in node names.
11069
11070 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11071 shouldn't be needed according to the gettext 0.12.1 documentation
11072 but which seem to be needed anyway: codeset.m4 glibc21.m4
11073 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11074 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11075 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11076
11077 * lib/.cvsignore: Add stdbool.h.
11078 * m4/.cvsignore: Add nls.m4, po.m4.
11079
11080 Upgrade to CVS gnulib.
11081 * stdbool_.h: File renamed from stdbool.h.in.
11082 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11083 AC_HEADER_STDBOOL.
11084 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11085 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11086 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11087 (MOSTLYCLEANFILES): New var.
11088 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11089 (stdbool.h): New rule.
11090 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11091 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11092 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11093 m4/quote.m4: Upgrade to today's gnulib.
11094
11095 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11096 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11097 the tests right now.
11098 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11099 yyerror are declared before use; C99 requires this.
11100
11101 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11102
11103 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11104 first.
11105 (yyrecoverSyntaxError): Correct the logic for setting and testing
11106 yyerrState.
11107 Correct comment on handling EOF.
11108 Allow states with only a default reduction, rather than failing
11109 (I can't quite reconstruct why these were not allowed before).
11110
11111 Fixes to avoid problem that $-N rules in GLR parsers can cause
11112 buffer overruns, corrupting state.
11113
11114 * src/output.c (prepare_rules): Output max_left_semantic_context
11115 definition.
11116 * src/reader.h (max_left_semantic_context): New variable declaration.
11117 * src/scan-gram.l (max_left_semantic_context): Define.
11118 (handle_action_dollar): Update max_left_semantic_context.
11119 * data/glr.c (YYMAXLEFT): New definition.
11120 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11121 (yyresolveAction): Ditto.
11122
11123 Fixes to problems with location handling in GLR parsers reported by
11124 Frank Heckenbach (2003/06/05).
11125
11126 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11127 (YYRHSLOC): Add parentheses, and define only if locations used.
11128 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11129 locations not used.
11130 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11131 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11132
11133 * tests/cxx-type.at: Exercise location information; update tests
11134 to differentiate output with and without locations.
11135 Remove forward declarations of yylex and yyerror---caused errors
11136 because default YYLTYPE not yet defined.
11137 Change semantic actions to compute strings, rather than printing
11138 them directly (to test proper passing of semantics values). Change
11139 output to prefix notation and update test data and expected results.
11140 (yylex): Track locations.
11141 (stmtMerge): Return value rather than printing, and include arguments
11142 in value.
11143
11144 2003-06-03 Paul Eggert <eggert@twinsun.com>
11145
11146 Avoid warnings generated by GCC 2.95.4 when Bison is
11147 configured with --enable-gcc-warnings.
11148 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11149 yy::]b4_parser_class_name[::translate_,
11150 yy::Stack::operator[] (unsigned),
11151 yy::Stack::operator[] (unsigned) const,
11152 yy::Slice::operator[] (unsigned),
11153 yy::Slice::operator[] (unsigned) const):
11154 Rename local vars to avoid warnings.
11155 * tests/glr-regression.at (Improper handling of embedded actions
11156 and $-N in GLR parsers): Remove unused local variable from yylex.
11157 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11158 (void) as arg when not pure, since we now assume C89 when building
11159 Bison. Pacify GCC by using parameter.
11160
11161 2003-06-02 Paul Eggert <eggert@twinsun.com>
11162
11163 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11164 yy::Location::lines, yy::Location::columns): Rename arguments
11165 to avoid shadowing; this removes a warning generated by GCC 3.3.
11166
11167 2003-06-01 Paul Eggert <eggert@twinsun.com>
11168
11169 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11170 to g++, as GCC 3.3 complains if you do it.
11171 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11172 everything that WARNING_CFLAGS has, except omit warnings
11173 not suitable for C++.
11174 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11175 * tests/atlocal.in (CXXFLAGS): New var.
11176 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11177
11178 Fix a GLR parser bug I reported in February; see
11179 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11180 The problem was that GLR parsers did not conform to the C standard,
11181 because actions like { $1 = $2 + $3; } expanded to expressions
11182 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11183 to a local variable. The C standard says that expressions
11184 like (var = f ()) + (var = f ()) have undefined behavior.
11185 Another problem was that GCC sometimes issues warnings that
11186 yyfill and its parameters are unused.
11187
11188 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11189 as possibly unused.
11190 (yyfill): New function.
11191 (YYFILL): Use it.
11192 (yyuserAction): Change type of yynormal to bool, so that it matches
11193 the new yyfill signature. Mark it as possibly unused.
11194
11195
11196 Follow up on a bug I reported in February, where a Bison-generated
11197 parser can loop. Provide a test case and a fix for yacc.c. I
11198 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11199 The original bug report is in:
11200 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11201
11202 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11203 macro's size was becoming unwieldy.
11204 (yyerrlab): Do not discard an empty lookahead symbol, as this
11205 might destroy garbage.
11206 (yyerrorlab): New label, with the old contents of YYERROR,
11207 plus the following change: pop the stack of rhs corresponding
11208 to the production that invoked YYERROR. That is how Yacc
11209 behaves, and POSIX requires this behavior.
11210 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11211 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11212 Define 'alarm' to do nothing if unistd.h is not available.
11213 Add a new rule "exp: '-' error;" to test the above change to
11214 data/yacc.c. Use 'alarm' to abort any test taking longer than
11215 10 seconds, as it's probably looping.
11216 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11217 Also, the new yacc.c generates two fewer diagnostics for an
11218 existing test.
11219
11220 2003-05-24 Paul Eggert <eggert@twinsun.com>
11221
11222 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11223 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11224 This fixes a problem reported by John Bowman when the Compaq/HP
11225 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11226 -ansi -Wall -gall).
11227 * data/yacc.c (union yyalloc): Likewise.
11228 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11229
11230 Switch from 'int' to 'bool' where that makes sense.
11231
11232 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11233 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11234 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11235 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11236 Return or accept bool, not int. All callers changed.
11237 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11238 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11239 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11240 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11241 bitset_or_and_cmp_): Likewise.
11242 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11243 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11244 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11245 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11246 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11247 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11248 bitset_stats_or_and_cmp): Likewise.
11249 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11250 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11251 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11252 ebitset_xor_cmp): Likewise.
11253 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11254 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11255 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11256 lbitset_xor_cmp): Likewise.
11257 * lib/bbitset.h: Include <stdbool.h>.
11258 (struct bitset_vtable): The following members now return bool, not
11259 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11260 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11261 or_and_cmp).
11262 * src/conflicts.c (count_rr_conflicts): Likewise.
11263 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11264 All uses changed.
11265 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11266 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11267 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11268 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11269 graph_flag): Likewise.
11270 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11271 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11272 graph_flag): Likewise.
11273 * src/output.c (error_verbose): Likewise.
11274 * src/output.h (error_verbose): Likewise.
11275 * src/reader.c (start_flag, typed): Likewise.
11276 * src/reader.h (typed): Likewise.
11277 * src/getargs.c (LOCATIONS_OPTION): New constant.
11278 (long_options, getargs): Use it.
11279 * src/lalr.c (build_relations): Use bool, not int.
11280 * src/nullable.c (nullable_compute): Likewise.
11281 * src/print.c (print_reductions): Likewise.
11282 * src/tables.c (action_row, pack_vector): Likewise.
11283 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11284 * src/output.c (prepare): Use it.
11285 * src/output.c (token_definitions_output,
11286 symbol_destructors_output, symbol_destructors_output): Use string,
11287 not boolean integer, to keep track of whether to output separator.
11288 * src/print_graph.c (print_core): Likewise.
11289 * src/state.c (state_rule_lookaheads_print): Likewise.
11290
11291 * config/install-sh: Sync from automake 1.7.5.
11292
11293 2003-05-14 Paul Eggert <eggert@twinsun.com>
11294
11295 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11296 semicolon after a grammar declaration, in the interest of possible
11297 future changes to the Bison input language.
11298 Do not allow a stray semicolon at the start of the grammar.
11299 (rhses.1): Allow one or more semicolons after any rule, including
11300 just before "|" as required by POSIX.
11301 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11302 grammar.
11303
11304 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11305
11306 %parse-param support for lalr1.cc.
11307
11308 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11309 b4_cc_constructor_calls, b4_cc_constructor_call,
11310 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11311 definitions.
11312 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11313 parse-param arguments.
11314 (yy::b4_parser_class_name): Declare instance variables to
11315 hold parse-param arguments.
11316 * tests/calc.at: s/value/semantic_value/ because value clashes
11317 with a member of yy::b4_parser_class_name. Adjust C++ code
11318 to handle %parse-param. Enable %parse-param test in C++.
11319
11320 2003-05-12 Paul Eggert <eggert@twinsun.com>
11321
11322 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11323 English a bit. Fix fclose typo. Change "const char" to "char
11324 const", and use ANSI C rather than K&R for "main". Suggest
11325 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11326 and suggest yy_switch_to_buffer.
11327
11328 2003-05-05 Paul Eggert <eggert@twinsun.com>
11329
11330 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11331 C89. This avoids a diagnostic on compilers that define __STDC__
11332 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
11333 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11334
11335 2003-05-03 Paul Eggert <eggert@twinsun.com>
11336
11337 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11338 Do not overrun array bounds.
11339 This should fix a bug reported today by Olatunji Oluwabukunmi in
11340 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
11341
11342 2003-04-29 Akim Demaille <akim@epita.fr>
11343
11344 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11345 * src/getargs.c, src/getargs.h: here, as bool, not int.
11346 (nondeterministic_parser): New.
11347 * src/parse-gram.y, src/scan-gram.l: Support
11348 %nondeterministic-parser.
11349 * src/output.c (prepare): Use nondeterministic_parser instead
11350 of glr_parser where appropriate.
11351 * src/tables.c (conflict_row, action_row, save_row)
11352 (token_actions, token_actions, pack_vector): Ditto.
11353
11354 2003-04-29 Akim Demaille <akim@epita.fr>
11355
11356 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11357
11358 2003-04-29 Akim Demaille <akim@epita.fr>
11359
11360 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11361 with %pure-parser and %locations to exercise the patch from Yakov
11362 Markovitch below.
11363
11364 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11365
11366 * data/yacc.c: (b4_lex_param): Corrected for the case where
11367 %lex-param is provided and %pure-parser isn't.
11368
11369 2003-04-27 Paul Eggert <eggert@twinsun.com>
11370
11371 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
11372 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
11373 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11374 if it is not defined.
11375 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11376
11377 2003-04-26 Paul Eggert <eggert@twinsun.com>
11378
11379 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11380 Declare to be of type suitable for the ninf value itself, not of
11381 type suitable for the corresponding table, since the latter might
11382 be unsigned but the ninf value might be negative. This fixes a
11383 bug reported by Alexandre Duret-Lutz in
11384 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
11385
11386 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11387 invokes it. We shouldn't invoke it twice because it will attempt
11388 to put error.o in the archive twice. This fixes a glitch reported
11389 by Martin Mokrejs in
11390 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11391
11392 2003-04-21 Paul Eggert <eggert@twinsun.com>
11393
11394 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11395 to gnulib.
11396
11397 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11398
11399 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11400 Fix obvious typo that results in uncompilable GLR parsers
11401 when both %pure-parser and %locations are used. (trivial change)
11402
11403 2003-04-17 Paul Eggert <eggert@twinsun.com>
11404
11405 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11406 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11407 Do not insert the expected token via unput, as this runs afoul
11408 of a POSIX-compatibility bug in flex 2.5.31.
11409 All uses changed to BEGIN the parent state,
11410 since we no longer insert the expected token via unput.
11411 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11412 that is no longer emitted after the above change.
11413
11414 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11415 the first one. This change is from Paul Hilfinger, and it fixes
11416 regression reported by Werner Lemberg in
11417 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
11418
11419 (resolve_sr_conflict): Don't invoke state_errs_set
11420 unless one or more tokens have been explicitly made errors.
11421 Otherwise, the above change causes Bison to abort.
11422
11423 * tests/existing.at (GNU pic Grammar): New test case, taken from
11424 Lemberg's email.
11425
11426 2003-03-31 Akim Demaille <akim@epita.fr>
11427
11428 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11429
11430 2003-03-31 Akim Demaille <akim@epita.fr>
11431
11432 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11433 output.
11434
11435 2003-03-31 Akim Demaille <akim@epita.fr>
11436
11437 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11438 From Paul Hilfinger.
11439
11440 2003-03-29 Akim Demaille <akim@epita.fr>
11441
11442 * m4/error.m4: Do not put under dynamic conditions some code which
11443 expansion is under static control.
11444
11445 2003-03-29 Akim Demaille <akim@epita.fr>
11446
11447 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11448
11449 2003-03-29 Akim Demaille <akim@epita.fr>
11450
11451 * doc/bison.texinfo (Strings are Destroyed): New.
11452
11453 2003-03-13 Paul Eggert <eggert@twinsun.com>
11454
11455 * .cvsignore: Add configure.lineno.
11456 * src/.cvsignore: Add yacc.
11457 * tests/.cvsignore: Add testsuite.log.
11458 * doc/fdl.texi: Sync with latest FSF version.
11459
11460 2003-03-12 Paul Eggert <eggert@twinsun.com>
11461
11462 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11463 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11464 cursor, instead of leaving it undefined. This fixes a bug
11465 reported by Tim Van Holder in
11466 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11467 * tests/input.at (Torturing the Scanner): Test the scanner on
11468 an empty input file, which was Tim Van Holder's test case.
11469
11470 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11471 <sys/resource.h> can be included, include sys/time.h and
11472 sys/times.h first, if available. This works around the SunOS
11473 4.1.4 porting bug reported by Bruce Becker in
11474 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
11475
11476 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11477 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11478 AC_HEADER_SYS_WAIT.
11479
11480 Merge changes from gnulib. This was prompted because the CVS
11481 snapshot didn't build on Solaris 7 due to strnlen problems.
11482
11483 These changes need to be merged back into gnulib:
11484 * lib/hash.c: Include <stdbool.h> unconditionally.
11485 * m4/onceonly.m4 (m4_quote): New macro.
11486 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11487 Quote AC_FOREACH variable-expansions properly.
11488 The 2003-01-03 obstack.h change also needs merging.
11489 {end of changes requiring merging}
11490
11491 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11492 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11493 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11494 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11495 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11496 New files, imported from gnulib.
11497 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11498 above.
11499
11500 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11501 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11502 gnulib sources.
11503
11504 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11505 Add.
11506 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11507 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11508 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11509 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11510 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11511 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11512 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11513 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11514 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11515 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11516 (jm_PREREQ_ARGMATCH): Remove.
11517 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11518 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11519
11520 * src/system.h: Include <stdbool.h> unconditionally.
11521
11522 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11523 assuming at least C89 in the bitset code for some time now.
11524
11525 2003-03-03 Akim Demaille <akim@epita.fr>
11526
11527 * ro.po: New.
11528
11529 2003-03-02 Akim Demaille <akim@epita.fr>
11530
11531 * doc/bison.texinfo (Table of Symbols): Reactivate the
11532 documentation for %lex-param, and %parse-param.
11533
11534 2003-03-02 Akim Demaille <akim@epita.fr>
11535
11536 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11537 generate verbose error messages.
11538 Use the number of tokens as an upper bound in yytname, as it
11539 cannot be a non terminal.
11540
11541 2003-03-02 Akim Demaille <akim@epita.fr>
11542
11543 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11544 message.
11545
11546 2003-03-02 Akim Demaille <akim@epita.fr>
11547
11548 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11549 Use them to exercise yycheck overrun.
11550 Based on Andrew Suffield's grammar.
11551
11552 2003-03-02 Akim Demaille <akim@epita.fr>
11553
11554 Create tests/local.at for Bison generic testing macros.
11555
11556 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11557 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11558 This new file.
11559 * tests/calc.at (AT_CHECK_CALC): Adjust.
11560 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11561 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11562 * tests/local.at: here.
11563 (AT_COMPILE_CXX): Tags the tests using it as c++.
11564 Ignore the test if CXX is not functional.
11565
11566 2003-03-01 Paul Eggert <eggert@twinsun.com>
11567
11568 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11569 not loc->end, since loc->end might contain garbage and this leads
11570 to undefined behavior on some platforms.
11571 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11572 depend on *loc, so that the reader doesn't give the the false
11573 impression that *loc is initialized.
11574 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11575 does not survive the return.
11576
11577 2003-03-01 Akim Demaille <akim@epita.fr>
11578
11579 * src/scan-gram.l (code_start): Always initialize it when entering
11580 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11581 yylex invocation. An alternative would be making it static, but
11582 then it starts with the second %%'s beginning, instead of its end.
11583
11584 2003-02-28 Paul Eggert <eggert@twinsun.com>
11585
11586 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11587 around a UnixWare 7.1.1 porting bug reported by John Hughes in
11588 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
11589
11590 2003-02-26 Paul Eggert <eggert@twinsun.com>
11591
11592 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11593 Remove Sequent/Pyramid discussion (nobody uses them any more).
11594 Merge VMS and MS-DOS discussion; these ports may well be dead
11595 but let's keep mentioning them for now. Put <> around email
11596 addresses. Add copyright notice.
11597
11598 2003-02-24 Paul Eggert <eggert@twinsun.com>
11599
11600 * data/glr.c (yy_reduce_print): yylineno -> yylno,
11601 to avoid collision with flex use of yylineno.
11602 Problem reported by Bruce Lilly in
11603 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
11604 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11605 * data/yacc.c (yy_reduce_print): Likewise.
11606
11607 * config/depcomp: Sync with Automake 1.7.3.
11608
11609 2003-02-21 Akim Demaille <akim@epita.fr>
11610
11611 * data/lalr1.cc: Use temporary variables instead of casts to
11612 change integer types.
11613 Suggested by Paul Eggert.
11614
11615 2003-02-21 Akim Demaille <akim@epita.fr>
11616
11617 * doc/bison.texinfo: Use "location" consistently to refer to @n,
11618 to avoid confusions with lalr1.cc's notion of Position.
11619 Suggested by Paul Eggert.
11620
11621 2003-02-20 Akim Demaille <akim@epita.fr>
11622
11623 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
11624 before initial_columns.
11625 (location.hh): Use consistent variable names when defining the
11626 operator<<.
11627 Use "last" so that we subtract from Positions, not from unsigned.
11628
11629 2003-02-20 Akim Demaille <akim@epita.fr>
11630
11631 * data/lalr1.cc (position.hh): New subfile, including the extended
11632 and Doxygen'ed documentation of class Position.
11633 (location.hh): Use it.
11634 Document a` la Doxygen.
11635 With the help of Benoit Perrot.
11636
11637 2003-02-20 Akim Demaille <akim@epita.fr>
11638
11639 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
11640 AT_YACC_IF.
11641 Redefine AT_YYERROR_SEES_LOC_IF using it.
11642 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
11643 not defined.
11644 Don't use the location in yy::Parser::error_ and
11645 yy::Parser::print_ when not %locations.
11646 Activate more lalr1.cc tests.
11647
11648 2003-02-19 Akim Demaille <akim@epita.fr>
11649
11650 * data/lalr1.cc: When displaying a line number, be sure to make it
11651 an int.
11652
11653 2003-02-19 Akim Demaille <akim@epita.fr>
11654
11655 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
11656 Remove, useless.
11657 (YYABORT, YYACCEPT, YYERROR): New.
11658 * tests/calc.at: Renable the lalr1.cc test.
11659
11660 2003-02-19 Akim Demaille <akim@epita.fr>
11661
11662 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
11663 error recovery, mixing with/without pops and discarding of the
11664 lookahead.
11665 Exercise YYERROR.
11666 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
11667
11668 2003-02-17 Paul Eggert <eggert@twinsun.com>
11669
11670 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
11671 * tests/testsuite.at (AT_COMPILE): Use them.
11672 This fixes the testsuite problem reported by Robert Lentz in
11673 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
11674
11675 2003-02-12 Paul Eggert <eggert@twinsun.com>
11676
11677 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
11678 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
11679 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
11680 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
11681 Check for malloc failure, for consistency with yacc.c.
11682 (yytname_size): Remove, for consistency with yacc.c.
11683
11684 The bug still remains in data/lalr1.cc, as I didn't have time
11685 to fix it there.
11686
11687 2003-02-06 Akim Demaille <akim@epita.fr>
11688
11689 * configure.ac (GXX): Rename as...
11690 (CXX): this, to keep the original Autoconf semantics.
11691 Require 2.57.
11692 * data/lalr1.cc: Fix b4_copyright invocations.
11693 If YYDEBUG is not defined, don't depend upon name_ being defined.
11694 (location.hh): Include string and iostream.
11695 (Position::filename): New member.
11696 (Position::Position ()): New.
11697 (operator<< (Position)): New.
11698 (operator- (Position, int)): New.
11699 (Location::first, Location::last): Rename as...
11700 (Location::begin, Location::end): these, to mock the conventional
11701 iterator names.
11702 (operator<< (Location)): New.
11703 * tests/atlocal.in (CXX): New.
11704 * tests/testsuite.at (AT_COMPILE_CXX): New.
11705 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
11706 locations in a more synthetic way.
11707 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
11708 lalr1.cc is used.
11709 Adjust the C locations to match those from Emacs: first column is
11710 column 0.
11711 Change all the expected results.
11712 Conform to the GCS: simplify the locations when applicable.
11713 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
11714 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
11715 these CPP macros with the m4 macros new defined by...
11716 (AT_CHECK_PUSHDEFS): this, i.e.:
11717 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
11718 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
11719 New macros.
11720 (AT_CHECK_POPDEFS): Undefine them.
11721 (AT_CHECK_CALC_LALR1_CC): New.
11722 Use it for the first lalr1.cc test.
11723
11724 2003-02-04 Akim Demaille <akim@epita.fr>
11725
11726 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
11727 Location as is defined.
11728
11729 2003-02-04 Akim Demaille <akim@epita.fr>
11730
11731 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
11732 name_ being defined.
11733
11734 2003-02-03 Paul Eggert <eggert@twinsun.com>
11735
11736 * src/gram.h (start_symbol): Remove unused decl.
11737
11738 Use more-consistent naming conventions for local vars.
11739
11740 * src/derives.c (derives_compute): Change type of local var from
11741 int to rule_number.
11742 * src/gram.c (grammar_rules_partial_print): Likewise.
11743 * src/print.c (print_core): Likewise.
11744 * src/reduce.c (reduce_grammar_tables): Likewise.
11745
11746 * src/gram.c (grammar_dump): Change name of item_number *
11747 local var from r to rp.
11748 * src/nullable.c (nullable_compute): Likewise.
11749
11750 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
11751
11752 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
11753 for symbol or symbol_number var.
11754 * src/reader.c (grammar_start_symbol_set): Likewise.
11755 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
11756 Likewise.
11757 * src/state.c (transitions_to): Likewise.
11758 * src/state.h: Likewise.
11759 * src/tables.c (symbol_number_to_vector_number): Likewise.
11760
11761 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
11762 char * var.
11763
11764 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
11765 var.
11766
11767 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
11768 var.
11769
11770 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
11771 Use str, not s, for char * var. Use ch, not c, for character var.
11772 Use size for size var.
11773
11774 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
11775 char * var.
11776 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
11777 uniqstr var.
11778 * src/uniqstr.h: Likewise.
11779
11780 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11781 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11782 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
11783 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
11784 param to have same name as that of enum, so that we don't use
11785 "s" to stand for a non-state.
11786
11787 2003-02-02 Akim Demaille <akim@epita.fr>
11788
11789 * src/scan-skel.l: Scan more than one inert character per yylex
11790 invocation.
11791
11792 2003-02-01 Paul Eggert <eggert@twinsun.com>
11793
11794 Version 1.875a.
11795
11796 * po/LINGUAS: Add ms.
11797
11798 2003-01-30 Akim Demaille <akim@epita.fr>
11799
11800 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
11801
11802 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11803
11804 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
11805 of $1.
11806
11807 Changes in response to error report by S. Eken: GLR mode does not
11808 handle negative $ indices or $ indices in embedded rules correctly.
11809 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
11810
11811 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
11812 (b4_rhs_location): Ditto.
11813 (yyfill): New function to copy from stack tree into array
11814 incrementally.
11815 (yyuserAction): Modify to allow incremental move of semantic values
11816 to rhs array when in GLR mode.
11817 Define YYFILL to use in user-defined actions to fill semantic array
11818 as needed.
11819 Remove dummy use of yystack, as there is now a guaranteed use.
11820 (yydoAction): Modify to allow incremental move of semantic values
11821 to rhs array when in GLR mode.
11822 (yyresolveAction): Ditto.
11823 (yyglrShiftDefer): Update comment.
11824 (yyresolveStates): Use X == NULL for pointers, not !X.
11825 (yyglrReduce): Ditto.
11826 (yydoAction): Ditto
11827
11828 * tests/glr-regr1.at: Rename to ...
11829 * tests/glr-regression.at: Add new regression test for the problems
11830 described above (adapted from S. Eken).
11831 Update copyright notice.
11832 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
11833 * tests/Makefile.am: Ditto.
11834
11835 2003-01-28 Paul Eggert <eggert@twinsun.com>
11836
11837 * data/lalr1.cc: Do not use @output_header_name@ unless
11838 b4_defines_flag is set. This fixes two bugs reported by
11839 Tim Van Holder in
11840 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
11841 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
11842
11843 2003-01-21 Paul Eggert <eggert@twinsun.com>
11844
11845 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
11846 we don't need to worry about yyerrlab1 being reported as an
11847 "unused label" by non-GCC C compilers. The downside is that if
11848 locations are used then a couple of statements are duplicated each
11849 time YYERROR is invoked, but the upside is that the warnings
11850 should vanish.
11851 (yyerrlab1): Move code to YERROR.
11852 (yyerrlab2): Remove. Change uses back to yyerrlab1.
11853 This reverts some of the 2002-12-27 change.
11854
11855 2003-01-17 Paul Eggert <eggert@twinsun.com>
11856
11857 * src/output.c (symbol_printers_output): Fix typo that led
11858 to core dump. Problem reported by Antonio Rus in
11859 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
11860
11861 2003-01-13 Akim Demaille <akim@epita.fr>,
11862 Quoc Peyrot <chojin@lrde.epita.fr>,
11863 Robert Anisko <anisko_r@lrde.epita.fr>
11864
11865 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
11866 when the stacks contain one element, as the loop would otherwise
11867 free the last state, and then use the top state (the one we just
11868 popped). This means that the initial elements will not be freed
11869 explicitly, as is the case in yacc.c; it is not a problem, as
11870 these elements have fake values.
11871
11872 2003-01-11 Paul Eggert <eggert@twinsun.com>
11873
11874 * NEWS: %expect-violations are now just warnings, reverting
11875 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
11876 bootstrapping problem reported by Matthias Klose; see
11877 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
11878 * src/conflicts.c (conflicts_print): Likewise.
11879 * tests/conflicts.at (%expect not enough, %expect too much,
11880 %expect with reduce conflicts): Likewise.
11881 * doc/bison.texinfo (Expect Decl): Document this. Also mention
11882 that the warning is enabled if the number of conflicts changes
11883 (not necessarily increases).
11884
11885 * src/getargs.c (version): Update copyright year.
11886
11887 2003-01-09 Akim Demaille <akim@epita.fr>
11888
11889 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
11890
11891 2003-01-08 Paul Eggert <eggert@twinsun.com>
11892
11893 * Makefile.maint (WGETFLAGS):
11894 New macro, containing "-C off" to disable proxy caches.
11895 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
11896 (rel-check): Use $(WGET) instead of wget.
11897
11898 2003-01-06 Paul Eggert <eggert@twinsun.com>
11899
11900 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
11901 the GLR paper of Scott, Johnstone and Hussain.
11902
11903 2003-01-04 Paul Eggert <eggert@twinsun.com>
11904
11905 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
11906 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
11907 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
11908 (EXTRA_LIBRARIES): New var, for liby.a.
11909 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
11910 (EXTRA_SCRIPTS): New var, for yacc.
11911
11912 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
11913 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
11914 Problem reported by Nelson H. F. Beebe.
11915
11916 2003-01-03 Paul Eggert <eggert@twinsun.com>
11917
11918 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
11919 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
11920 when compiling Bison 1.875's `bitset bset = obstack_alloc
11921 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
11922
11923 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
11924 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
11925 grow to a huge size with typical invocation.
11926
11927 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
11928 Use the pattern recommended by Autoconf 2.57, except also protect
11929 against double-definition.
11930 * src/system.h: Likewise.
11931 Portability issues reported by Nelson H. F. Beebe.
11932
11933 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
11934 All uses changed. Provide a definition in both C and C++.
11935 (yytrue, yyfalse): Define even if defined (__cplusplus).
11936
11937 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
11938 Reported by Nelson H. F. Beebe.
11939
11940 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
11941
11942 2003-01-02 Paul Eggert <eggert@twinsun.com>
11943
11944 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
11945 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
11946 Bug reported by Nelson H. F. Beebe.
11947
11948 2003-01-01 Paul Eggert <eggert@twinsun.com>
11949
11950 * Version 1.875.
11951
11952 2002-12-30 Paul Eggert <eggert@twinsun.com>
11953
11954 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
11955 Moved here from...
11956 (<INITIAL>","): Here. This causes stray "," to be treated
11957 more uniformly.
11958
11959 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
11960 last brace in braced code when not in Yacc mode, for compatibility
11961 with Bison 1.35. This resurrects the 2001-12-15 patch to
11962 src/reader.c.
11963
11964 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
11965 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
11966
11967 2002-12-28 Paul Eggert <eggert@twinsun.com>
11968
11969 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
11970 that of SYM's type. This fixes Debian bug 168069, reported by
11971 Thomas Olsson.
11972
11973 2002-12-28 Paul Eggert <eggert@twinsun.com>
11974
11975 Version 1.75f.
11976
11977 Switch back to the Yacc style of conflict reports, undoing some
11978 of the 2002-07-30 change.
11979 * doc/bison.texinfo (Understanding): Use Yacc style for
11980 conflict reports. Also, use new way of locating rules.
11981 * src/conflicts.c (conflict_report):
11982 Renamed from conflict_report_yacc, removing the old
11983 'conflict_report'. Translate the entire conflict report at once,
11984 so that we don't assume that "," has the same interpretation in
11985 all languages.
11986 (conflicts_output): Use Yacc-style conflict report for each state,
11987 instead of our more-complicated style.
11988 (conflicts_print): Use Yacc-style conflict report, except print
11989 the input file name when not emulating Yacc.
11990 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
11991 Conflicted Reduction, %expect not enough, %expect too much,
11992 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
11993 * tests/existing.at (GNU Cim Grammar): Likewise.
11994 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
11995
11996 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
11997 fatal): Don't invoke fflush; it's not needed and it might even be
11998 harmful for stdout, as stdout might not be open.
11999 * src/reduce.c (reduce_print): Likewise.
12000
12001 2002-12-27 Paul Eggert <eggert@twinsun.com>
12002
12003 Fix a bug where error locations were not being recorded correctly.
12004 This problem was originally reported by Paul Hilfinger in
12005 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12006
12007 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12008 top of the location stack's error locations.
12009 (yyerrlab): Set it. When discarding a token, push its location
12010 onto yylerrsp so that we don't lose track of the error's end.
12011 (yyerrlab1): Now is only the target of YYERROR, so that we can
12012 properly record the location of the action that failed. For GCC
12013 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12014 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12015 (yyerrlab2): New label, which yyerrlab now falls through to.
12016 Compute the error's location by applying YYLLOC_DEFAULT to
12017 the locations of all the symbols that went into the error.
12018 * doc/bison.texinfo (Location Default Action): Mention that
12019 YYLLOC_DEFAULT is also invoked for syntax errors.
12020 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12021 Error locations include the locations of all the tokens that were
12022 discarded, not just the last token.
12023
12024 2002-12-26 Paul Eggert <eggert@twinsun.com>
12025
12026 * src/files.c: Include quote.h.
12027 (compute_output_file_names): Warn if we detect conflicting
12028 outputs to the same file. This should catch the misunderstanding
12029 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12030
12031 * src/conflicts.c (conflicts_print): If the user specifies
12032 "%expect N", report an error if there are any reduce/reduce
12033 conflicts. This is what the manual says should happen.
12034 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12035 * tests/conflicts.at (%expect with reduce conflicts): New test.
12036
12037 Don't use m4_include on relative file names, as it doesn't work as
12038 desired if there happens to be a file with that name under ".".
12039
12040 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12041 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12042 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12043 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12044 * src/output.c (output_skeleton): Use full path names when
12045 specifying a file to include; don't rely on include path, as
12046 it's unreliable when the working file contains a file with
12047 that name.
12048
12049 2002-12-25 Paul Eggert <eggert@twinsun.com>
12050
12051 Remove obsolete references to bison.simple and bison.hairy.
12052 Problem mentioned by Aubin Mahe in
12053 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12054 * data/glr.c: Comment fix.
12055 * doc/bison.1: Remove references. Also, mention "yacc".
12056
12057 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12058 with -g option.
12059
12060 * src/parse-gram.y (declaration): Use enum "report_states" rather
12061 than its numeric value 1.
12062
12063 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12064 opening a new one. This fixes Debian bug 165349, reported by
12065 Bruce Stephens.
12066
12067 2002-12-24 Paul Eggert <eggert@twinsun.com>
12068
12069 Version 1.75e.
12070
12071 * Makefile.maint (cvs-update): Don't assume that the shell
12072 supports $(...), as Solaris sh doesn't.
12073
12074 * src/parse-gram.y (lloc_default): Remove test for empty
12075 nonterminals at the end, since it didn't change the result.
12076
12077 2002-12-24 Paul Eggert <eggert@twinsun.com>
12078
12079 If the user does not define YYSTYPE as a macro, Bison now declares it
12080 using typedef instead of defining it as a macro. POSIX requires this.
12081 For consistency, YYLTYPE is also declared instead of defined.
12082
12083 %union directives can now have a tag before the `{', e.g., the
12084 directive `%union foo {...}' now generates the C code
12085 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12086 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12087 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12088 instead of `yyltype'.
12089
12090 `yystype' and `yyltype' are now obsolescent macros instead of being
12091 typedefs or tags; they are no longer documented and will be
12092 withdrawn in a future release.
12093
12094 * data/glr.c (b4_location_type): Remove.
12095 (YYSTYPE): Renamed from yystype.
12096 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12097 (struct YYLTYPE): Renamed from struct yyltype.
12098 (YYLTYPE): Renamed from yyltype.
12099 (yyltype, yystype): New (and obsolescent) macros,
12100 for backward compatibility.
12101 * data/yacc.c: Likewise.
12102
12103 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12104 does not specify a union tag. This is for compatibility with
12105 Solaris 9 yacc.
12106
12107 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12108 const *, since it is now modified by stripping surrounding { }.
12109 (current_braced_code): Remove.
12110 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12111 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12112 trailing " {...}". Now of type <chars>.
12113 (grammar_declaration): Adjust to bundled tokens.
12114 (code_content): Remove; stripping is now done by add_param.
12115 (print_token_value): Print contents of bundled tokens.
12116 (token_name): New function.
12117
12118 * src/reader.h (braced_code, current_braced_code): Remove.
12119 (token_name): New decl.
12120
12121 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12122 token_type, not braced_code code_kind. All uses changed.
12123 (SC_PRE_CODE): New state, for scanning after a keyword that
12124 has (or usually has) an immediately-following braced code.
12125 (token_type): New local var, to keep track of which token type
12126 to return when scanning braced code.
12127 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12128 <INITIAL>"%parse-param", <INITIAL>"%printer",
12129 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12130 instead of returning a token type immediately.
12131 (<INITIAL>"{"): Set token type.
12132 (<SC_BRACED_CODE>"}"): Use it.
12133 (handle_action_dollar, handle_action_at): Now returns bool
12134 indicating success. Fail if ! current_rule; this prevents a core dump.
12135 (handle_symbol_code_dollar, handle_symbol_code_at):
12136 Remove; merge body into caller.
12137 (handle_dollar, handle_at): Complain in invalid contexts.
12138
12139 * NEWS, doc/bison.texinfo: Document the above.
12140 * NEWS: Fix years and program names in copyright notice.
12141
12142 2002-12-17 Paul Eggert <eggert@twinsun.com>
12143
12144 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12145 Reporting, Table of Symbols): Omit mentions of %lex-param and
12146 %parse-param from the documentation for now.
12147
12148 2002-12-15 Paul Eggert <eggert@twinsun.com>
12149
12150 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12151 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12152 lookahead symbol, and which sets yychar in parser actions) and it
12153 disagreed with the Bison documentation. Bug
12154 reported by Andrew Walrond.
12155
12156 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12157 as the caller now does that.
12158 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12159 (YYEMPTY): Parenthesize right hand side, since others use it.
12160 (yyparse): Don't assume that our generated code is the only code
12161 that sets yychar.
12162
12163 2002-12-13 Paul Eggert <eggert@twinsun.com>
12164
12165 Version 1.75d.
12166
12167 POSIX requires a "yacc" command.
12168 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12169 (MOSTLYCLEANFILES): Add yacc.
12170 (yacc): New rule.
12171 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12172 as an alias for bison y.
12173
12174 * po/LINGUAS: Add da.
12175
12176 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12177 problem with latest <getopt.h>.
12178 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12179
12180 * doc/fdl.texi: Upgrade to 1.2.
12181 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12182 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12183 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12184 gnulib.
12185 * config/install-sh: Sync with autotools.
12186
12187 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12188 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12189 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12190 locations are requested.
12191 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12192 locations are requested.
12193
12194 2002-12-12 Paul Eggert <eggert@twinsun.com>
12195
12196 Remove unportable casts and storage allocation tricks.
12197 While we're at it, remove almost all casts, since they
12198 usually aren't needed and are a sign of trouble.
12199
12200 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12201
12202 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12203 the pointer DSET returned by malloc; this isn't portable.
12204 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12205 Similarly for DERIVES.
12206 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12207 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12208 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12209
12210 * src/derives.c (derives_compute): Do not bother invoking
12211 int_of_rule_number, since rule numbers are integers.
12212
12213 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12214 rather than XMALLOC (char, N).
12215
12216 * src/files.c (filename_split): Rewrite to avoid cast.
12217
12218 * src/gram.h (symbol_number_as_item_number,
12219 item_number_as_symbol_number, rule_number_as_item_number,
12220 item_number_as_rule_number):
12221 Now inline functions rather than macros, to avoid casts.
12222 * src/state.h (state_number_as_int): Likewise.
12223 * src/tables.c (state_number_to_vector_number,
12224 symbol_number_to_vector_number): Likewise.
12225
12226 * src/gram.h (int_of_rule_number): Remove; no longer used.
12227
12228 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12229 since the resulting storage is always stored into.
12230
12231 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12232 where it's needed.
12233
12234 * src/muscle_tab.c (muscle_m4_output):
12235 Now inline. Return bool, not int.
12236 * src/state.c (state_compare): Likewise.
12237 * src/symtab.c (symbol_check_defined,
12238 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12239 hash_compare_symbol, hash_symbol):
12240 Likewise.
12241 * src/uniqstr.c (uniqstr_print): Likewise.
12242 * src/muscle_tab.c (muscle_m4_output_processor):
12243 New function, to avoid casts.
12244 * src/state.c (state_comparator, stage_hasher): Likewise.
12245 * src/symtab.c (symbol_check_defined_processor,
12246 symbol_check_alias_consistency_processor, symbol_pack_processor,
12247 symbol_translation_processor, hash_symbol_comparator,
12248 hash_symbol_hasher): Likewise.
12249 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12250 * src/muscle_tab.c (muscles_m4_output):
12251 Use new functions instead of casting old functions unportably.
12252 * src/state.c (state_hash_new): Likewise.
12253 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12254 symbols_token_translations_init):
12255 Likewise.
12256 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12257
12258 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12259 var instead of casting to long, to avoid casts.
12260 (prepare_states): Use MALLOC rather than alloca, so that we don't
12261 have to worry about alloca.
12262 * src/state.c (state_hash_lookup): Likewise.
12263
12264 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12265 local var instead of casting to unsigned char, to avoid casts.
12266
12267 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12268 STATE_ALLOC): Remove.
12269 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12270 rather than calloc, and use offsetof to avoid allocating slightly
12271 too much storage.
12272 (state_new): Initialize all members.
12273
12274 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12275
12276 * src/symtab.c (symbol_free): Remove; unused.
12277 (symbol_get): Remove cast in lhs of assignment.
12278 (symbols_do): Now static. Accept generic arguments, not
12279 hashing-related ones.
12280
12281 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12282 (symbol_processor): Remove.
12283 (symbols_do): Remove decl; now static.
12284
12285 * src/system.h (alloca): Remove; decl no longer needed.
12286 (<stddef.h>): Include, for offsetof.
12287 (<inttypes.>, <stdint.h>): Include if available.
12288 (uintptr_t): New type, if system lacks it.
12289 (CALLOC, MALLOC, REALLOC): New macros.
12290 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12291 new macros.
12292
12293 * src/tables.c (table_size): Now int, to pacify GCC.
12294 (table_grow, table_ninf_remap): Use signed table size.
12295 (save_row): Don't bother initializing locals when not needed.
12296 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12297 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12298
12299 * src/vcg.h: Correct misspellings.
12300
12301 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12302
12303
12304 * src/getargs.c (getargs): Don't assume EOF == -1.
12305
12306 2002-12-09 Paul Eggert <eggert@twinsun.com>
12307
12308 Change identifier spellings to avoid collisions with names
12309 that are reserved by POSIX.
12310
12311 Don't use names ending in _t, since POSIX reserves them.
12312 For consistency, remove _e and _s endings -- they're weren't
12313 needed to remove ambiguity. All uses changed.
12314 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12315 turn was just renamed from struniq_t.
12316 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12317 which in turn was just renamed from struniq_processor_t.
12318 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12319 in turn was renamed from hash_compare_struniq_t.
12320 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12321 (state_list): Renamed from state_list_t.
12322 * src/assoc.h (assoc): Renamed from assoc_t.
12323 * src/conflicts.c (enum conflict_resolution): Renamed from
12324 enum conflict_resolution_e.
12325 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12326 (rule_list): Renamed from rule_list_t.
12327 * src/getargs.h (enum trace): Renamed from enum trace_e.
12328 (enum report): Renamed from enum report_e.
12329 * src/gram.h (item_number): Renamed from item_number_t.
12330 (rule_number): Renamed from rule_number_t.
12331 (struct rule_s): Remove the "rule_s" part; not used.
12332 (rule): Renamed from rule_t.
12333 (rule_filter): Renamed from rule_filter_t.
12334 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12335 (goto_list): Renamed from goto_list_t.
12336 * src/lalr.h (goto_number): Renamed from goto_number_t.
12337 * src/location.h (location): Renamed from location_t.
12338 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12339 and moved here from:
12340 * src/muscle_tab.h (muscle_entry_t): here.
12341 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12342 (rule_list): Renamed from rule_list_t.
12343 * src/print_graph.c (static_graph): Renamed from graph.
12344 * src/reader.h (braced_code): Renamed from braced_code_t.
12345 Remove brace_code_e tag.
12346 * src/relation.h (relation_node): Renamed from relation_node_t.
12347 (relation_nodes): Renamed from relation_nodes_t.
12348 (relation): Renamed from relation_t.
12349 * src/state.h (state_number): Renamed from state_number_t.
12350 (struct state): Renamed from struct state_s.
12351 (state): Renamed from state_t.
12352 (transitions): Renamed from transitions_t. Unused (and
12353 misspelled) transtion_s tag removed.
12354 (errs): Renamed from errs_t. Unused errs_s tag removed.
12355 (reductions): Renamed from reductions_t. Unused tag
12356 reductions_s removed.
12357 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12358 (struct symbol_list): Renamed from struct symbol_list_s.
12359 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12360 (struct symbol): Renamed from struct symbol_s.
12361 (symbol): Renamed from symbol_t.
12362 * src/tables.c (vector_number): Renamed from vector_number_t.
12363 (action_number): Renamed from action_t.
12364 * src/tables.h (base_number): Renamed from base_t.
12365 * src/vcg.h (enum color): Renamed from enum color_e.
12366 (enum textmode): Renamed from enum textmode_e.
12367 (enum shape): Renamed from enum shape_e.
12368 (struct colorentry): Renamed from struct colorentry_s.
12369 (struct classname): Renamed from struct classname_s.
12370 (struct infoname): Renamed from struct infoname_s.
12371 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12372 (enum decision): Renamed from enum decision_e.
12373 (enum orientation): Renamed from enum orientation_e.
12374 (enum alignment): Renamed from enum alignment_e.
12375 (enum arrow_mode): Renamed from enum arrow_mode_e.
12376 (enum crossing_type): Renamed from enum crossing_type_e.
12377 (enum view): Renamed from enum view_e.
12378 (struct node): Renamed from struct node_s.
12379 (node): Renamed from node_t.
12380 (enum linestyle): Renamed from enum linestyle_e.
12381 (enum arrowstyle): Renamed from enum arrowstyle_e.
12382 (struct edge): Renamed from struct edge.
12383 (edge): Renamed from edge_t.
12384 (struct graph): Renamed from struct graph_s.
12385 (graph): Renamed from graph_t.
12386 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12387 Rename value_t -> value.
12388 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12389 value_t_as_yystype -> value_as_yystype.
12390
12391 Don't include <errno.h> in the mainstream code, since it
12392 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12393 * lib/get-errno.c, lib/get-errno.h: New files.
12394 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12395 get-errno.c.
12396 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12397 * src/output.c (output_skeleton): Likewise.
12398 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12399 instead of errno.
12400 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12401 Likewise.
12402 (handle_action_dollar, handle_action_at): Likewise.
12403 * src/system.h: Do not include <errno.h>.
12404 (TAB_EXT): Renamed from EXT_TAB.
12405 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12406
12407 Avoid str[a-z]*, since <string.h> reserves that name space.
12408 Change all instances of "struniq" in names to "uniqstr", and
12409 likewise for "STRUNIQ" and "UNIQSTR".
12410 * src/uniqstr.c: Renamed from src/struniq.c.
12411 * src/uniqstr.h: Renamed from src/struniq.h.
12412 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12413 * src/files.c (strsuffix): Remove; unused.
12414 (concat2): Renamed from stringappend. Now static.
12415 * src/files.h (strsuffix, stringappend): Remove; unused.
12416 * src/parse-gram.y (<chars>): Renamed from <string>.
12417 (<uniqstr>): Renamed from <struniq>.
12418 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12419 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12420 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12421 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12422 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12423 (N_EXPAND): Renamed from N_STRETCH.
12424
12425 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12426 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12427 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12428 Remove; unused.
12429 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12430 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12431 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12432 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12433 (BASE_MAXIMUM): Renamed from BASE_MAX.
12434 (BASE_MINIMUM): Renamed from BASE_MIN.
12435 (ACTION_MAX): Remove; unused.
12436 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12437 Unnecessary casts removed from above defines.
12438
12439
12440 Fix misspelling in names.
12441 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12442 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12443 G_NODE_ALIGNEMENT.
12444
12445
12446 * lib/timevar.c (timevar_report): Renamed from time_report,
12447 for consistency with other names.
12448 * lib/timevar.h (timevar_report): New decl.
12449 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12450
12451
12452 Sort include-file uses.
12453
12454 Reorder all include files under src to be in the order "system.h".
12455 then the ../lib include files in angle brackets (alphabetized),
12456 then the . include files in double-quotes (alphabetized). Fix
12457 dependency breakages encountered in this process, as follows:
12458 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12459 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12460 * src/state.h: Include "symtab.h".
12461
12462 2002-12-08 Paul Eggert <eggert@twinsun.com>
12463
12464 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12465 since this causes problems when __file__ contains character
12466 sequences like "@" that are treated specially by src/scan-skel.l.
12467 Instead, just use the file's basename. This fixes the bug
12468 reported by Martin Mokrejs in
12469 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12470
12471 2002-12-06 Paul Eggert <eggert@twinsun.com>
12472
12473 Add support for rules that do not have trailing semicolons, as
12474 POSIX requires. Improve the quality of locations in Bison
12475 diagnostics.
12476
12477 * src/location.c: Include <quotearg.h>.
12478 (empty_location): Now const.
12479 (location_print): New function. Follow the recommendation of the
12480 GNU Coding Standards for locations that span file boundaries.
12481 * src/location.h: Do not include <quotearg.h>; no longer needed.
12482 (boundary): New type.
12483 (location_t): Use it. This allows locations to span file boundaries.
12484 All member uses changed: file -> start.file or end.file (as needed),
12485 first_line -> start.line, first_column -> start.column,
12486 last_line -> end.line, last_column -> end.column.
12487 (equal_boundaries): New function.
12488 (LOCATION_RESET, LOCATION_STEP): Remove.
12489 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12490 (empty_location): Now const.
12491 (location_print): New decl.
12492 * src/parse-gram.y (lloc_default): New function, which handles
12493 empty locations more accurately.
12494 (YYLLOC_DEFAULT): Use it.
12495 (%token COLON): Remove.
12496 (%token ID_COLON): New token.
12497 (rules): Use it.
12498 (declarations, rules): Remove trailing semicolon.
12499 (declaration, rules_or_grammar_declaration):
12500 Allow empty (";") declaration.
12501 (symbol_def): Remove empty actions; no longer needed.
12502 (rules_or_grammar_declaration): Remove trailing semicolon.
12503 (semi_colon.opt): Remove.
12504 * src/reader.h: Include location.h.
12505 (scanner_cursor): New decl.
12506 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12507 rolling our own.
12508 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12509 of *loc.
12510 (STEP): Remove. No longer needed, now that adjust_location does
12511 the work. All uses removed.
12512 (scanner_cursor): New var.
12513 (adjust_location): Renamed from extend_location. It now sets
12514 *loc and adjusts the scanner cursor. All uses changed.
12515 Don't bother testing for CR.
12516 (handle_syncline): Remove location arg; now updates scanner cursor.
12517 All callers changed.
12518 (unexpected_end_of_file): Now accepts start boundary of token or
12519 comment, not location. All callers changed. Update scanner cursor,
12520 not the location.
12521 (SC_AFTER_IDENTIFIER): New state.
12522 (context_state): Renamed from c_context. All uses changed.
12523 (id_loc, code_start, token_start): New local vars.
12524 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12525 processing of Yacc white space and equivalents here.
12526 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12527 instead of returning ID immediately, since we need to search for
12528 a subsequent colon.
12529 (<INITIAL>"'", "\""): Save token_start.
12530 (<INITIAL>"%{", "{", "%%"): Save code_start.
12531 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12532 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12533 BEGIN context_state at end, not INITIAL.
12534 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12535 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12536 Return correct token start.
12537 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12538 the start of a character, string or multiline comment is found.
12539 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12540 Reduction): Adjust reported locations to match the more-precise
12541 results now expected.
12542 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12543 * tests/reduce.at (Useless Rules, Reduced Automaton,
12544 Underivable Rules): Likewise.
12545 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12546 or "|"' now that so many other tokens are allowed by the new grammar.
12547
12548 * src/complain.h (current_file): Remove duplicate decl;
12549 current_file is now owned by files.h.
12550 * src/complain.c, src/scan-gram.l: Include files.h.
12551
12552 2002-12-06 Paul Eggert <eggert@twinsun.com>
12553
12554 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12555 promotes to int; it might be unsigned int.
12556 * data/yacc.c (yy_reduce_print): Likewise.
12557
12558 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12559 be #defined in the prologue, not in the Bison declarations.
12560 This fixes Debian Bug 102878, reported by Shaul Karl.
12561
12562 2002-12-02 Paul Eggert <eggert@twinsun.com>
12563
12564 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12565 * lib/strtoul.c: New file, from gnulib.
12566 This fixes a porting bug reported by Peter Klein in
12567 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
12568
12569 2002-11-30 Paul Eggert <eggert@twinsun.com>
12570
12571 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12572 and put only a forward declaration in the prologue. This is for
12573 consistency with the other scanner helper functions.
12574
12575 Type clashes now generate warnings, not errors, since it
12576 appears that POSIX may allow some grammars with type clashes.
12577 * src/reader.c (grammar_current_rule_check): Warn about
12578 type clashes instead of complaining.
12579 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12580
12581 Add Yacc library, since POSIX requires it.
12582 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12583 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12584 * lib/main.c, lib/yyerror.c: New files.
12585
12586 gram_error can be static; it need not be extern.
12587 * src/reader.h (gram_error): Remove decl.
12588 * src/parse-gram.y (gram_error): Now static. Add static decl.
12589 (print_token_value): Omit parameter names from forward decl,
12590 for consistency.
12591
12592 2002-11-29 Paul Eggert <eggert@twinsun.com>
12593
12594 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12595 be declared before being used. E.g., one should typically
12596 declare them in the prologue. Use GNU coding style in examples.
12597 Put "const" consistently after the type it modifies. Mention
12598 that C99 supports "inline". Mention that yyerror traditionally
12599 returns "int".
12600
12601 %parse-param and %lex-param now take just one argument, the
12602 declaration; the argument name is deduced from the declaration.
12603
12604 * doc/bison.texinfo (Parser Function, Pure Calling, Error
12605 Reporting, Table of Symbols): Document this.
12606 * src/parse-gram.y (add_param): New function.
12607 (COMMA): Remove.
12608 (declaration): Implement new rule for %parse-param and %lex-param.
12609 * src/scan-gram.l: "," now elicits a warning, rather than being
12610 a token; this is more compatible with byacc.
12611 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
12612
12613 2002-11-27 Paul Eggert <eggert@twinsun.com>
12614
12615 Rename identifiers to avoid real and potential collisions.
12616
12617 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
12618 to avoid collision with lex macro described by Bruce Lilly in
12619 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12620 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12621 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
12622 * src/parse-gram.y (print_token_value): Renamed from yyprint.
12623 All uses changed.
12624 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
12625 The name "yycontrol" violates the name space rules, and this stuff
12626 wasn't being used anyway.
12627 (input): Remove action; this stuff wasn't being used.
12628 (gram_error): Rename local variable yylloc -> loc.
12629 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
12630 (YY_DECL): Don't use "yy" at start of local variables.
12631 All uses changed, e.g., yylloc -> loc.
12632 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
12633 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
12634 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
12635 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
12636
12637 * src/parse-gram.y (gram_error): loc is now const *.
12638 * src/reader.h (gram_error): Likewise.
12639
12640 2002-11-24 Paul Eggert <eggert@twinsun.com>
12641
12642 Version 1.75c.
12643
12644 * tests/actions.at (Actions after errors): Use an output format
12645 more similar to that of the Printers and Destructors test.
12646 Test the position of the ';' token too.
12647 (Printers and Destructors): Likewise.
12648 (Printers and Destructors: %glr-parser): Remove for now, to avoid
12649 unnecessarily alarming people when the test fails.
12650
12651 * data/yacc.c (yyerrlab1): Move this label down, so that the
12652 parser does not discard the lookahead token if the user code
12653 invokes YYERROR. This change is required for POSIX conformance.
12654
12655 * lib/error.c: Sync with gnulib.
12656
12657 2002-11-22 Paul Eggert <eggert@twinsun.com>
12658
12659 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
12660 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
12661 * lib/xmalloc.c: Likewise.
12662
12663 2002-11-20 Paul Eggert <eggert@twinsun.com>
12664
12665 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
12666
12667 2002-11-20 Paul Eggert <eggert@twinsun.com>
12668
12669 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
12670 should use `if (! x) abort ();' rather than `assert (x);', and
12671 anyway it's one less thing to worry about configuring.
12672
12673 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
12674 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
12675 and replace all instances of assert with abort.
12676 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12677 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
12678
12679 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
12680 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
12681 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
12682 hash_find_entry, hash_rehash, hash_insert): Likewise.
12683 * src/conflicts.c (resolve_sr_conflict): Likewise.
12684 * src/lalr.c (set_goto_map, map_goto): Likewise.
12685 * src/nullable.c (nullable_compute): Likewise.
12686 * src/output.c (prepare_rules, token_definitions_output): Likewise.
12687 * src/reader.c (packgram, reader): Likewise.
12688 * src/state.c (state_new, state_free, state_transitions_set,
12689 state_reduction_find): Likewise.
12690 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
12691 symbol_pack): Likewise.
12692 * src/tables.c (conflict_row, pack_vector): Likewise.
12693 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12694 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12695 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
12696 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
12697
12698 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
12699 (ARGMATCH_CONSTRAINT): New macro.
12700 (ARGMATCH_ASSERT): Use it.
12701
12702 * src/system.h (verify): New macro.
12703 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
12704 rather than assert.
12705 * src/tables.c (tables_generate): Likewise.
12706
12707 * src/struniq.c (struniq_assert): Now returns void, and aborts
12708 if the assertion is false.
12709 (struniq_assert_p): Remove.
12710 * src/struniq.h: Likewise.
12711
12712 2002-11-18 Paul Eggert <eggert@twinsun.com>
12713
12714 * data/glr.c (yygetLRActions): Replace `yyindex' with
12715 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
12716 This fixes the regression with Sun ONE Studio 7 cc that I reported in
12717 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
12718
12719 2002-11-18 Akim Demaille <akim@epita.fr>
12720
12721 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
12722 space.
12723 From Tim Van Holder.
12724
12725 2002-11-17 Paul Eggert <eggert@twinsun.com>
12726
12727 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
12728 to "SyntaxError" for consistency with my 2002-11-15 change.
12729
12730 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
12731 not define to {}, since this breaks the common use of `YYDPRINTF
12732 ((...));' if a single statement is desired (e.g. before `else').
12733 Work around GCC warnings by surrounding corresponding calls with
12734 {} if needed.
12735 (yyhasResolvedValue): Remove unused function.
12736 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
12737 loop body.
12738 (yyreportSyntaxError): Renamed from yyreportParseError.
12739 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
12740 All uses changed.
12741 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
12742 extern when possible. Remove unused initializations.
12743
12744 2002-11-16 Akim Demaille <akim@epita.fr>
12745
12746 Augment the similarity between GLR and LALR traces.
12747
12748 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
12749 (YY_REDUCE_PRINT): New.
12750 (yyparse): Use them.
12751 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
12752 YYDPRINT here.
12753 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
12754 state reached after the reduction/recovery, since...
12755 (yyparse, yyprocessOneStack): Report the state we are entering in.
12756
12757 2002-11-16 Akim Demaille <akim@epita.fr>
12758
12759 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
12760 Add support for --trace=skeleton.
12761 * src/scan-skel.l: %option debug.
12762 Scan strings of non-@ or \n instead of character by character.
12763 (scan_skel): Handle trace_skeleton.
12764 (QPUTS): New.
12765 (@output_parser_name@, @output_header_name@): ``Restore'' their
12766 support (used to be M4 macros).
12767 * data/yacc.c: Quote larger chunks, a la glr.c.
12768 * data/lalr1.cc: Likewise.
12769 The header guards are no longer available, so use some other
12770 string than `YYLSP_NEEDED'.
12771
12772 2002-11-16 Akim Demaille <akim@epita.fr>
12773
12774 Make the ``Printers and Destructors'' test more verbose, taking
12775 `yacc.c''s behavior as (possibly wrong) reference.
12776
12777 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
12778 instead of fprint on stdout.
12779 Set and report the last_line of the symbols.
12780 Consistently display values and locations.
12781
12782 2002-11-16 Paul Eggert <eggert@twinsun.com>
12783
12784 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
12785
12786 2002-11-15 Paul Eggert <eggert@twinsun.com>
12787
12788 * tests/actions.at (Actions after errors): New test case.
12789
12790 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
12791 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
12792 tests/action.at, tests/calc.at, tests/conflicts.at,
12793 tests/cxx-type.at, tests/regression.at:
12794 "parse error" -> "syntax error" for POSIX compatibility.
12795 "parsing stack overflow..." -> "parser stack overflow" so
12796 that code matches Bison documentation.
12797
12798 2002-11-15 Akim Demaille <akim@epita.fr>
12799
12800 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
12801 take two BRACED_CODE, not two string_content.
12802 Free the scanner's obstack when we are done.
12803 (code_content): New.
12804 * tests/calc.at: Adjust.
12805 * doc/bison.texinfo: Adjust.
12806 Also, make sure to include the `,' for these declarations.
12807
12808 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
12809
12810 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
12811 definition; avoids potential autoreconf problems.
12812
12813 2002-11-15 Akim Demaille <akim@epita.fr>
12814
12815 Always check the value returned by yyparse.
12816
12817 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
12818 returned by yyparse.
12819 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
12820 Adjust calls.
12821 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
12822 returned by yyparse.
12823
12824 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12825
12826 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
12827 on input.at test.
12828
12829 2002-11-14 Paul Eggert <eggert@twinsun.com>
12830
12831 * src/output.c (output_skeleton): Call xfopen instead of
12832 duplicating xfopen's body.
12833
12834 Fix bugs reported by Nelson H. F. Beebe in
12835 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
12836
12837 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
12838 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
12839 Group compiler. Instead, use "$CC -E bar.c". Include the .h
12840 file twice in the grammar, as an extra check.
12841
12842 * tests/input.at (Torturing the Scanner): Surround the
12843 backslash-newline tests with "#if 0", to make it less likely that
12844 we'll run into compiler bugs. Bring back solitary \ inside
12845 comment, but add a closing comment to work around HP C bug. Don't
12846 test backslash-newline in C character constant.
12847
12848 2002-11-14 Akim Demaille <akim@epita.fr>
12849
12850 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
12851 status of the compiler.
12852 Calling `exit 1' is no longer needed.
12853 Reported by Nelson H. F. Beebe.
12854
12855 2002-11-14 Akim Demaille <akim@epita.fr>
12856
12857 * tests/atlocal.in (CPPFLAGS): We have config.h.
12858 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
12859 New.
12860 * tests/actions.at, tests/calc.at, tests/conflicts.at,
12861 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
12862 * tests/regression.at, tests/torture.at: Use them for all the
12863 grammars that are to be compiled.
12864 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
12865 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
12866 * doc/bison.texinfo (GLR Parsers): Document `inline'.
12867
12868 2002-11-14 Akim Demaille <akim@epita.fr>
12869
12870 * doc/bison.texinfo: Various formatting changes (alignments in
12871 samples, additional @group/@end group, GCS in samples.
12872 Use @deffn instead of simple @table to define the directives,
12873 macros, variables etc.
12874
12875 2002-11-13 Paul Eggert <eggert@twinsun.com>
12876
12877 Fix some bugs reported by Albert Chin-A-Young in
12878 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
12879
12880 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
12881 -o c"; the HP C compiler chatters during compilation.
12882 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
12883 * tests/headers.at (export YYLTYPE): Likewise.
12884
12885 * tests/input.at (Torturing the Scanner): Remove lines containing
12886 solitary backslashes, as they tickle a bug in the HP C compiler.
12887
12888 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
12889 comments, since they're not portable. Use GNU coding style.
12890
12891 2002-11-13 Akim Demaille <akim@epita.fr>
12892
12893 * data/yacc.c: Leave bigger chunks of quoted text.
12894 (YYDSYMPRINTF): New.
12895 Use it to report symbol activities.
12896 * data/glr.c (YYDSYMPRINTF): New.
12897 Use it.
12898
12899 2002-11-12 Paul Eggert <eggert@twinsun.com>
12900
12901 Version 1.75b.
12902
12903 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
12904 (yyglrReduce): Return yyok, not 0.
12905 This should avoid the enumerated-type warnings reported
12906 by Nelson H. F. Beebe in
12907 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
12908
12909 * lib/bbitset.h (BITSET_INLINE): Remove.
12910 * lib/bitset.h [! BITSET_INLINE]: Remove.
12911 (bitset_set, bitset_reset, bitset_test): Rename local vars
12912 to avoid shadowing warnings by GCC.
12913
12914 * data/glr.c (inline): Remove #define. It's the user's
12915 responsibility to #define it away, just like 'const'.
12916 This fixes one of the bugs reported by Nelson H. F. Beebe in
12917 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
12918
12919 * Makefile.maint (po-check): Scan .l and .y files instead of the
12920 .c and the .h files that they generate. This fixes the bug
12921 reported by Tim Van Holder in:
12922 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
12923 Look for N_ as well as for _. Try to avoid matching #define for
12924 N_ and _.
12925 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
12926 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
12927 * src/scan-gram.l: Revamp regular expressions so that " and '
12928 do not confuse xgettext.
12929
12930 * src/struniq.h (struniq_new): Do not declare the return type
12931 to be 'const'; this violates the C standard.
12932 * src/struniq.c (struniq_new): Likewise.
12933
12934 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
12935
12936 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
12937 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
12938 linker.
12939
12940 2002-11-12 Akim Demaille <akim@epita.fr>
12941
12942 * Makefile.maint: Sync with Autoconf:
12943 (local_updates): New.
12944
12945 2002-11-12 Akim Demaille <akim@epita.fr>
12946
12947 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
12948
12949 2002-11-12 Akim Demaille <akim@epita.fr>
12950
12951 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
12952 locations.
12953
12954 2002-11-12 Akim Demaille <akim@epita.fr>
12955
12956 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
12957 not yyvalue.
12958
12959 2002-11-12 Akim Demaille <akim@epita.fr>
12960
12961 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
12962 Use it to test the GLR parser.
12963
12964 2002-11-12 Akim Demaille <akim@epita.fr>
12965
12966 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
12967 defines it.
12968 * data/glr.c (yystos): New.
12969 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
12970 (YYDSYMPRINT): New.
12971 (yyval): Don't define it, it is handled via M4.
12972 (yyrecoverParseError): Free verbosely the discarded symbols.
12973 * data/yacc.c (yysymprint): Remove, rather...
12974 (b4_yysymprint_generate): invoke.
12975 * data/c.m4 (b4_yysymprint_generate): New.
12976 Accept pointers as arguments, as opposed to the version from
12977 yacc.c.
12978 (b4_yydestruct_generate): Likewise.
12979 * tests/cations.at (Printers and Destructors): Use Bison directives
12980 instead of CPP macros.
12981 Don't rely on internal details.
12982
12983 2002-11-12 Akim Demaille <akim@epita.fr>
12984
12985 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
12986 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
12987 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
12988 it against YYEMPTY and so forth), work on yytoken (i.e., set
12989 it to YYEMPTY etc.).
12990 (yydestruct): Replace with a b4_yydestruct_generate invocation.
12991 (b4_symbol_actions): Remove.
12992 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
12993 for 0, end-of-input.
12994
12995 2002-11-12 Akim Demaille <akim@epita.fr>
12996
12997 * doc/bison.texinfo (Destructor Decl): New.
12998
12999 2002-11-12 Akim Demaille <akim@epita.fr>
13000
13001 * src/tables.c (tables_generate): Use free for pointers that
13002 cannot be NULL, not XFREE.
13003 (pack_vector): Use assert, not fatal, for bound violations.
13004 * src/state.c (state_new): Likewise.
13005 * src/reader.c (reader): Likewise.
13006 * src/lalr.c (set_goto_map): Likewise.
13007 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13008 the file name.
13009
13010 2002-11-12 Akim Demaille <akim@epita.fr>
13011
13012 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13013 Restore.
13014 * src/scan-gram.l (last_string): Is global to the file, not to
13015 yylex.
13016 * src/parse-gram.y (input): Don't append the epilogue here,
13017 (epilogue.opt): do it here, and free the scanner's obstack.
13018 * src/reader.c (epilogue_set): Rename as...
13019 (epilogue_augment): this.
13020 * data/c.m4 (b4_epilogue): Defaults to empty.
13021
13022 2002-11-12 Akim Demaille <akim@epita.fr>
13023
13024 * src/getargs.c (long_options): Remove duplicates.
13025 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13026 Remove.
13027 * doc/bison.rnh: Remove.
13028 * doc/bison.texinfo (VMS Invocation): Remove.
13029
13030 2002-11-12 Akim Demaille <akim@epita.fr>
13031
13032 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13033 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13034
13035 Use struniq for symbols.
13036
13037 * src/symtab.h (symbol_t): The tag member is a struniq.
13038 (symbol_type_set): Adjust.
13039 * src/symtab.c (symbol_new): Takes a struniq.
13040 (symbol_free): Don't free the tag member.
13041 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13042 (hash_compare_symbol, hash_symbol): these.
13043 Use the fact that tags as struniqs.
13044 (symbol_get): Use struniq_new.
13045 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13046 Returns a strniq.
13047 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13048 and type members are struniqs.
13049 * src/reader.c (get_merge_function)
13050 (grammar_current_rule_merge_set): Adjust.
13051 (TYPE, current_type): Are struniq.
13052
13053 Use struniq for file names.
13054
13055 * src/files.h, src/files.c (infile): Split into...
13056 (grammar_file, current_file): these.
13057 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13058 * src/reduce.c (reduce_print): Likewise.
13059 * src/getargs.c (getargs): Likewise.
13060 * src/complain.h, src/complain.c: Likewise.
13061 * src/main.c (main): Call struniqs_new early enough to use it for
13062 file names.
13063 Don't free the input file name.
13064
13065 2002-11-12 Akim Demaille <akim@epita.fr>
13066
13067 * src/symtab.c (symbol_free): Remove dead deactivated code:
13068 type_name are properly removed.
13069 Don't use XFREE to free items that cannot be NULL.
13070 * src/struniq.h, src/struniq.c: New.
13071 * src/main.c (main): Initialize/free struniqs.
13072 * src/parse-gram.y (%union): Add astruniq member.
13073 (yyprint): Adjust.
13074 * src/scan-gram.l (<{tag}>): Return a struniq.
13075 Free the obstack bit that used to store it.
13076 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13077
13078 2002-11-11 Paul Eggert <eggert@twinsun.com>
13079
13080 Revamp to fix many (but not all) of the C- and M4-related quoting
13081 problems. Among other things, this fixes the Bison bug reported
13082 by Jan Hubicka when processing the Bash grammar; see:
13083 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13084
13085 Use new @ escapes consistently. Represent brackets with @{ and @}
13086 rather than @<:@ and @:>@, since this works a bit better with dumb
13087 editors like vi. Represent @ with @@, since @ is now consistently
13088 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13089 __ofile__, to avoid unexpected expansions. Similarly, use @output
13090 rather than #output.
13091
13092 * data/c.m4 (b4_copyright): Omit file name from comment, since
13093 the file name could contain "*/".
13094 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13095 be quoted. All uses changed.
13096
13097 * data/glr.c: Use new @ escapes consistently.
13098 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13099 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13100 Remove, since they couldn't handle arbitrary characters in file
13101 names.
13102 * data/lalr1.cc: Likewise.
13103 * data/yacc.c: Likewise.
13104
13105 * src/files.c (output_infix): Remove; all uses removed.
13106 * src/files.h: Likewise.
13107
13108 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13109 mishandled funny characters in file names, and anyway it isn't
13110 needed any more.
13111 * data/yacc.c: Likewise.
13112 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13113
13114 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13115 * data/yacc.c: Likewise.
13116
13117 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13118 strings now.
13119 (muscle_init): Quote filename as a C string.
13120 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13121 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13122 * src/output.c (escaped_file_name_output): New function.
13123 (prepare_symbols): Quote tokens for M4.
13124 (prepare): Don't insert output_infix, output_prefix,
13125 output_parser_name, output_header_name; this is now down by scan-skel.
13126 Insert skeleton as a C string.
13127
13128 * src/output.c (user_actions_output, symbol_destructors_output,
13129 symbol_printers_output): Quote filenames for C and M4.
13130 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13131
13132 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13133 escapes other than \\ and \'; this simplifies the code.
13134 (<SC_STRING>): Likewise, for \\ and \".
13135 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13136 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13137 Use new escapes @{ and @} for [ and ].
13138
13139 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13140 them with auto vars.
13141 Switch to new escape scheme, where @ is the escape character uniformly.
13142 Abort if a stray escape character is found. Avoid unbounded input
13143 buffer when parsing non-escaped text.
13144
13145 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13146 __oline__, #output, $@, and @{ do not have unintended meanings.
13147
13148 2002-11-09 Paul Eggert <eggert@twinsun.com>
13149
13150 Fix the test failure due to GCC warnings described in
13151 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13152 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13153 evaluate to 0 if it's impossible for NINF to be in the respective
13154 table.
13155 (yygetLRActions, yyrecoverParseError): Use them.
13156
13157 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13158 counted in the token inserted at end of file. Now takes
13159 location_t *, not location_t, so that the location can be
13160 adjusted. All uses changed.
13161
13162 * tests/regression.at (Invalid inputs): Adjust wording in
13163 diagnostic to match the new behavior.
13164
13165 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13166 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13167 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13168 abort ();'. This reduces the runtime of the "Many lookaheads"
13169 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13170 GCC 3.2.
13171
13172 2002-11-07 Paul Eggert <eggert@twinsun.com>
13173
13174 * src/parse-gram.y (CHARACTER): Remove unused token.
13175 All uses removed.
13176
13177 * src/scan-gram.l: Remove stack option. We no longer use the
13178 stack, since the stack was never deeper than 1; instead, use the
13179 new auto var c_context to record the stacked value.
13180
13181 Remove nounput option. At an unexpected end of file, we now unput
13182 the minimal input necessary to end cleanly; this simplifies the
13183 code.
13184
13185 Avoid unbounded token sizes where this is easy.
13186
13187 (unexpected_end_of_file): New function.
13188 Use it to systematize the error message on unexpected EOF.
13189 (last-string): Now auto, not static.
13190 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13191 (scanner_last_string_free): Remove; not used.
13192 (percent_percent_count): Move decl to just before use.
13193 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13194 not the (never otherwised-used) CHARACTER.
13195
13196 2002-11-07 Akim Demaille <akim@epita.fr>
13197
13198 Let yyerror always receive the msg as last argument, so that
13199 yyerror can be variadic.
13200
13201 * data/yacc.c (b4_yyerror_args): New.
13202 Use it when calling yyerror.
13203 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13204 Use it when calling yyerror.
13205 * doc/bison.texinfo (Error Reporting): Adjust.
13206 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13207 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13208
13209 2002-11-06 Akim Demaille <akim@epita.fr>
13210
13211 #line should have quoted strings.
13212 Ideally, this should be done by m4_quotearg.
13213
13214 * src/scan-skel.l: Include quotearg.h.
13215 Quote __ofile__.
13216 * src/output.c (symbol_printers_output)
13217 (symbol_destructors_output): Quote the file name.
13218
13219 2002-11-06 Akim Demaille <akim@epita.fr>
13220
13221 * tests/regression.at (Invalid inputs): Adjust to the recent
13222 messages.
13223
13224 2002-11-06 Akim Demaille <akim@epita.fr>
13225
13226 Restore --no-lines.
13227 Reported by Jim Kent.
13228
13229 * data/c.m4 (b4_syncline): New.
13230 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13231 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13232 * src/output.c (user_actions_output): Likewise.
13233 (prepare): Define 'b4_synclines_flag'.
13234 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13235
13236 2002-11-06 Akim Demaille <akim@epita.fr>
13237
13238 * src/main.c (main): Free `infile'.
13239 * src/scan-gram.l (handle_syncline): New.
13240 Recognize `#line'.
13241 * src/output.c (user_actions_output, symbol_destructors_output)
13242 (symbol_printers_output): Use the location's file name, not
13243 infile.
13244 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13245
13246 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13247
13248 * src/tables.c (matching_state): Don't allow states to match if
13249 either has GLR conflict entries.
13250
13251 2002-11-05 Paul Eggert <eggert@twinsun.com>
13252
13253 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13254 "integer out of range" rather than "invalid value".
13255 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13256 accordingly.
13257
13258 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13259 Also, remove one static variable in the scanner.
13260
13261 * src/scan-gram.l (braces_level): Now auto, not static.
13262 Initialize to zero if the compiler is being picky.
13263 (INITIAL): Clear braces_level instead of incrementing it.
13264 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13265 as POSIX 1003.1-2001 requires.
13266 * src/system.h (IF_LINT): New macro, taken from coreutils.
13267 * configure.ac: Define "lint" if --enable-gcc-warnings.
13268
13269 2002-11-05 Akim Demaille <akim@epita.fr>
13270
13271 * src/scan-gram.l: When it starts with `%', complain about the
13272 whole directive, not just that `invalid character: %'.
13273
13274 2002-11-04 Akim Demaille <akim@epita.fr>
13275
13276 * Makefile.maint: Update from Autoconf.
13277 (update, cvs-update, po-update, do-po-update): New.
13278
13279 2002-11-04 Akim Demaille <akim@epita.fr>
13280
13281 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13282 and yyerror.
13283 Have yyerror `use' its arguments.
13284 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13285 returns true when location & yacc & pure & parse-param.
13286 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13287
13288 2002-11-04 Akim Demaille <akim@epita.fr>
13289
13290 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13291 clashes.
13292 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13293 font-lock-mode.
13294 Use complain_at.
13295 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13296 slot 0.
13297
13298 2002-11-03 Paul Eggert <eggert@twinsun.com>
13299
13300 * src/reader.c (get_merge_function, grammar_current_rule_check):
13301 Use consistent diagnostics for reporting type name clashes.
13302 Quote the types with <>, for consistency with Yacc.
13303 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13304
13305 2002-11-03 Akim Demaille <akim@epita.fr>
13306
13307 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13308 New.
13309 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13310 (b4_parse_param): Remove.
13311 Use b4_identification.
13312 Propagate b4_pure_args where needed to pass them to yyerror.
13313 * data/glr.m4 (b4_parse_param): Remove.
13314 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13315 (b4_lpure_formals): New.
13316 Use b4_identification.
13317 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13318 b4_user_formals and b4_user_args.
13319 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13320 (yyreportAmbiguity): When using a pure parser, also need
13321 the location, and the parse-params.
13322 Adjust callers.
13323 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13324 When using a pure parser, also need the parse-params.
13325 Adjust callers.
13326 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13327 (%pure-parser + %parse-param) LALR and GLR parsers.
13328 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13329 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13330 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13331 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13332 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13333 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13334 * doc/bison.texinfo: Untabify the whole file.
13335 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13336 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13337 (Error Reporting): Adjust to these new directives.
13338 Document %error-verbose, deprecate YYERROR_VERBOSE.
13339
13340 2002-11-03 Akim Demaille <akim@epita.fr>
13341
13342 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13343 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13344 command line options.
13345 * tests/cxx-type.at: Formatting changes.
13346
13347 2002-11-03 Paul Eggert <eggert@twinsun.com>
13348
13349 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13350 to count columns correctly, and to check for invalid inputs.
13351
13352 Use mbsnwidth to count columns correctly. Account for tabs, too.
13353 Include mbswidth.h.
13354 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13355 (extend_location): New function.
13356 (YY_LINES): Remove.
13357
13358 Handle CRLF in C code rather than in Lex code.
13359 (YY_INPUT): New macro.
13360 (no_cr_read): New function.
13361
13362 Scan UCNs, even though we don't fully handle them yet.
13363 (convert_ucn_to_byte): New function.
13364
13365 Handle backslash-newline correctly in C code.
13366 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13367 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13368 all uses changed.
13369 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13370 Use {splice} wherever C allows backslash-newline.
13371 YY_STEP after space, newline, vertical-tab.
13372 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
13373
13374 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13375
13376 ({int}, handle_action_dollar, handle_action_at): Check for integer
13377 overflow.
13378
13379 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13380
13381 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13382 as well as \000. Check for UCHAR_MAX, not 255.
13383 Allow \x with an arbitrary positive number of digits, as in C.
13384 Check for overflow here.
13385 Allow \? and UCNs, for compatibility with C.
13386
13387 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13388 with quote slot used by complain_at.
13389
13390 * tests/input.at: Add tests for backslash-newline, m4 quotes
13391 in symbols, long literals, and funny escapes in strings.
13392
13393 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13394 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13395 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13396 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13397 * m4/mbswidth.m4: New file, from GNU coreutils.
13398
13399 * doc/bison.texinfo (Grammar Outline): Document // comments.
13400 (Symbols): Document that trigraphs have no special meaning in Bison,
13401 nor is backslash-newline allowed.
13402 (Actions): Document that trigraphs have no special meaning.
13403
13404 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13405 no longer used.
13406
13407 2002-11-02 Paul Eggert <eggert@twinsun.com>
13408
13409 * src/reader.c: Don't include quote.h; not needed.
13410 (get_merge_function): Reword warning to be consistent with
13411 type clash diagnostic in grammar_current_rule_check.
13412
13413 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13414 bug in trigraph handling.
13415
13416 * src/output.c (prepare_symbols): When printing token names,
13417 escape "[" as "@<:@" and likewise for "]".
13418
13419 * src/system.h (errno): Remove declaration, as we are now
13420 assuming C89 or better, and C89 guarantees errno.
13421
13422 2002-10-30 Paul Eggert <eggert@twinsun.com>
13423
13424 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13425 Check for close failures.
13426 * src/files.h (xfclose): Return void, not int, since it always
13427 returned zero.
13428 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13429 indicates one.
13430 * src/output.c (output_skeleton): Use xfclose rather than fclose
13431 and ferror. xfclose now checks ferror.
13432
13433 * data/glr.c (YYLEFTMOST_STATE): Remove.
13434 (yyreportTree): Use a stack-based leftmost state. This avoids
13435 our continuing battles with bogus warnings about initializers.
13436
13437 2002-10-30 Akim Demaille <akim@epita.fr>
13438
13439 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13440 #if.
13441
13442 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13443
13444 * tests/glr-regr1.at: New test for reported regressions.
13445 * tests/testsuite.at: Add glr-regr1.at test.
13446 * tests/Makefile.am: Add glr-regr1.at test.
13447
13448 2002-10-24 Paul Eggert <eggert@twinsun.com>
13449
13450 Version 1.75a.
13451
13452 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13453 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13454 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13455 Don't assume strdup exists; POSIX says its an XSI extension.
13456 Check for buffer overflow on input.
13457
13458 2002-10-24 Akim Demaille <akim@epita.fr>
13459
13460 * src/output.c (output_skeleton): Don't disable M4sugar comments
13461 too soon: it results in comments being expanded.
13462 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13463 first output.
13464
13465 2002-10-24 Akim Demaille <akim@epita.fr>
13466
13467 * data/yacc.c (m4_int_type): New.
13468 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13469 char' as only yacc.c wants K&R portability.
13470 * data/glr.c (yysigned_char): Remove.
13471 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13472 Reported by Quoc Peyrot.
13473
13474 2002-10-23 Paul Eggert <eggert@twinsun.com>
13475
13476 * src/main.c (main): With --trace=time, report times even if a
13477 non-fatal error occurs. Formerly, the times were reported in some
13478 such cases but not in others.
13479 * src/reader.c (reader): Just return if a complaint has been issued,
13480 instead of exiting, so that 'main' can report times.
13481
13482 2002-10-22 Akim Demaille <akim@epita.fr>
13483
13484 * src/system.h: Include sys/types.
13485 Reported by Bert Deknuydt.
13486
13487 2002-10-23 Paul Eggert <eggert@twinsun.com>
13488
13489 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13490 Suggested by Art Haas.
13491
13492 2002-10-22 Paul Eggert <eggert@twinsun.com>
13493
13494 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13495 decl; not needed any more.
13496 * src/main.c (main): Use return to exit, undoing yesterday's change.
13497 The last OS that we could find where this wouldn't work is
13498 SunOS 3.5, and that's too old to worry about now.
13499
13500 * data/glr.c (struct yyltype): Define members even when not
13501 doing locations. This is more consistent with yacc.c, and it
13502 works around the following bug reports:
13503 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13504 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
13505
13506 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13507 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13508 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13509
13510 2002-10-22 Akim Demaille <akim@epita.fr>
13511
13512 * data/README: New.
13513
13514 2002-10-21 Paul Eggert <eggert@twinsun.com>
13515
13516 Be consistent about 'bool'; the old code used an enum in one
13517 module and an int in another, and this violates the C standard.
13518 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13519 * configure.ac (AC_HEADER_STDBOOL): Add.
13520 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13521 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13522 * src/symtab.c (hash_compare_symbol_t): Likewise.
13523 * src/system.h (bool, false, true): Use a definition consistent
13524 with ../lib/hash.c. All uses changed.
13525
13526 * src/complain.c (warning_issued): Renamed from warn_message_count,
13527 so that we needn't worry about integer overflow (!).
13528 Now of type bool. All uses changed.
13529 (complaint_issued): Renamed from complain_message_count; likewise.
13530
13531 * src/main.c (main): Use exit to exit with failure.
13532
13533 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13534 rather than 1 and 0.
13535 * src/main.c (main): Likewise.
13536 * src/getargs.c (getargs): Likewise.
13537 * src/reader.c (reader): Likewise.
13538
13539 * src/getarg.c (getargs): Remove duplicate code for
13540 "Try `bison --help'".
13541
13542 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13543 What was that "2" for?
13544
13545 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13546 * src/getargs.c (usage): Likewise.
13547
13548 * src/getargs.c (getargs): When there are too few operands, report
13549 the last one. When there are too many, report the first extra
13550 one. This is how diffutils does it.
13551
13552 2002-10-20 Paul Eggert <eggert@twinsun.com>
13553
13554 Remove K&R vestiges.
13555 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13556 * src/complain.c (VA_START): Remove. Assume prototypes.
13557 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13558 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13559 fatal): Assume prototypes.
13560 * src/complain.h: Assume prototypes.
13561 * src/system.h (PARAMS): Remove.
13562 Include <limits.h> unconditionally, since it's guaranteeed even
13563 for a freestanding C89 compiler.
13564 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13565 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
13566
13567 2002-10-20 Akim Demaille <akim@epita.fr>
13568
13569 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13570 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13571 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13572 (yyresolveStates, yyresolveAction, yyresolveStack)
13573 (yyprocessOneStack): Use them.
13574 (yy_reduce_print): New.
13575 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13576
13577 2002-10-20 Akim Demaille <akim@epita.fr>
13578
13579 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13580 arguments and output `void'.
13581 (b4_c_function): Rename as...
13582 (b4_c_function_def): this.
13583 (b4_c_function_decl, b4_c_ansi_function_def)
13584 (b4_c_ansi_function_decl): New.
13585 Change the interpretation of the arguments: before `int, foo', now
13586 `int foo, foo'.
13587 * data/yacc.c (yyparse): Prototype and define thanks to these.
13588 Adjust b4_c_function_def uses.
13589 * data/glr.c (yyparse): Likewise, but ANSI only.
13590
13591 2002-10-20 Akim Demaille <akim@epita.fr>
13592
13593 * src/output.c (prepare): Move the definition of `tokens_number',
13594 `nterms_number', `undef_token_number', `user_token_number_max'
13595 to...
13596 (prepare_tokens): Here.
13597 (prepare_tokens): Rename as...
13598 (prepare_symbols): this.
13599 (prepare): Move the definition of `rules_number' to...
13600 (prepare_rules): here.
13601 (prepare): Move the definition of `last', `final_state_number',
13602 `states_number' to...
13603 (prepare_states): here.
13604 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
13605
13606 2002-10-20 Akim Demaille <akim@epita.fr>
13607
13608 * src/tables.h, src/tables.c, src/output.c: Comment changes.
13609
13610 2002-10-20 Akim Demaille <akim@epita.fr>
13611
13612 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
13613 * data/c.m4: here.
13614
13615 2002-10-20 Akim Demaille <akim@epita.fr>
13616
13617 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
13618 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
13619 `pair'.
13620 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
13621 `name' to...
13622 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
13623 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
13624 These.
13625
13626 2002-10-19 Paul Eggert <eggert@twinsun.com>
13627
13628 Do not create a temporary file, as that involves security and
13629 cleanup headaches. Instead, use a pair of pipes.
13630 Derived from a suggestion by Florian Krohm.
13631 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
13632 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
13633 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
13634 (BISON_PREREQ_SUBPIPE): Add.
13635 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
13636 Add subpipe.h, subpipe.c.
13637 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
13638 * po/POTFILES.in: Add lib/subpipe.c.
13639 * src/output.c: Include "subpipe.h".
13640 (m4_invoke): Remove decl.
13641 (scan_skel): New decl.
13642 (output_skeleton): Use pipe rather than temporary file for m4 input.
13643 Check that m4sugar.m4 is readable, to avoid deadlock.
13644 Check for pipe I/O error.
13645 * src/scan-skel.l (readpipe): Remove decl.
13646 (scan_skel): New function, to be used in place of m4_invoke.
13647 Read from stream rather than file.
13648
13649 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
13650 float, as this generates a warning on Solaris 8 + GCC 3.2 with
13651 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
13652 this generates a more-accurate value anyway.
13653
13654 * lib/timevar.c (timervar_accumulate): Rename locals to
13655 avoid confusion with similarly-named more-global.
13656 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
13657
13658 * src/output.c (prepare): Use xstrdup to convert char const *
13659 to char *, to avoid GCC warning.
13660
13661 2002-10-19 Akim Demaille <akim@epita.fr>
13662
13663 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
13664 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
13665 Use them to have `calc.y' ready for %pure-parser.
13666 * data/yacc.c (YYLEX): Pass a yylex return type to
13667 b4_c_function_call.
13668
13669 2002-10-19 Akim Demaille <akim@epita.fr>
13670
13671 Prototype support of %lex-param and %parse-param.
13672
13673 * src/parse-gram.y: Add the definition of the %lex-param and
13674 %parse-param tokens, plus their rules.
13675 Drop the `_' version of %glr-parser.
13676 Add the "," token.
13677 * src/scan-gram.l (INITIAL): Scan them.
13678 * src/muscle_tab.c: Comment changes.
13679 (muscle_insert, muscle_find): Rename `pair' as `probe'.
13680 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
13681 (muscle_entry_s): The `value' member is no longer const.
13682 Adjust all dependencies.
13683 * src/muscle_tab.c (muscle_init): Adjust: use
13684 MUSCLE_INSERT_STRING.
13685 Initialize the obstack earlier.
13686 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
13687 (muscle_pair_list_grow): New.
13688 * data/c.m4 (b4_c_function_call, b4_c_args): New.
13689 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
13690 * tests/calc.at: Use %locations, not --locations.
13691 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
13692
13693 2002-10-19 Akim Demaille <akim@epita.fr>
13694
13695 * src/getargs.c (usage): Take status as argument and exit
13696 accordingly.
13697 Report the traditional `Try ... --help' message when status != 0.
13698 (usage, version): Don't take a FILE * as arg, it is pointless.
13699 (getargs): When there is an incorrect number of arguments, make it
13700 an error, and report it GNUlically thanks to `usage ()'.
13701
13702 2002-10-18 Paul Eggert <eggert@twinsun.com>
13703
13704 * data/glr.c (yyreportParseError): Don't assume that sprintf
13705 yields the length of the printed string, as this is not true
13706 on SunOS 4.1.4. Reported by Peter Klein.
13707
13708 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
13709 * tests/conflicts.at (%nonassoc and eof): Likewise.
13710 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
13711
13712 2002-10-17 Akim Demaille <akim@epita.fr>
13713
13714 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
13715 * src/getargs.c (trace_types, trace_args): Adjust.
13716 * src/reader.c (grammar_current_rule_prec_set)
13717 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
13718 Standardize error messages.
13719 And s/@prec/%prec/!
13720 (reader): Use trace_flag to enable scanner/parser debugging,
13721 instead of an adhoc scheme.
13722 * src/scan-gram.l: Remove trailing debugging code.
13723
13724 2002-10-16 Paul Eggert <eggert@twinsun.com>
13725
13726 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
13727 MUSCLE_TAB_H.
13728
13729 * NEWS: Officially drop support for building Bison with K&R C,
13730 since it didn't work anyway and it's not worth worrying about.
13731 * Makefile.maint (wget_files): Remove ansi2knr.c.
13732 (ansi2knr.c-url_prefix): Remove.
13733 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
13734 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13735 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13736
13737 2002-10-15 Paul Eggert <eggert@twinsun.com>
13738
13739 Stop using the "enum_" trick for K&R-style function definitions;
13740 it confused me, and I was the author! Instead, assume that people
13741 who want to use K&R C compilers (when using these modules in GCC,
13742 perhaps?) will run ansi2knr.
13743
13744 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
13745 All uses of "enum_" changed to "enum ".
13746 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13747 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13748
13749 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
13750 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
13751 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
13752 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
13753 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
13754 abitset_not, abitset_ones, abitset_or, abitset_or_and,
13755 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
13756 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
13757 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
13758 Use function prototypes; this removes the need for declaring
13759 static functions simply to provide their prototypes.
13760 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
13761 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
13762 bitset_count_, bitset_create, bitset_dump, bitset_first,
13763 bitset_free, bitset_init, bitset_last, bitset_next,
13764 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
13765 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
13766 bitset_print, bitset_release_memory, bitset_toggle_,
13767 bitset_type_choose, bitset_type_get, bitset_type_name_get,
13768 debug_bitset): Likewise.
13769 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
13770 * lib/bitset_stats.c (bitset_log_histogram_print,
13771 bitset_percent_histogram_print, bitset_stats_and,
13772 bitset_stats_and_cmp, bitset_stats_and_or,
13773 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
13774 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
13775 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
13776 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
13777 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
13778 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
13779 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
13780 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
13781 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
13782 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
13783 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
13784 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
13785 bitset_stats_zero): Likewise.
13786 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13787 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13788 bitsetv_dump, debug_bitsetv): Likewise.
13789 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
13790 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
13791 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
13792 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
13793 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
13794 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
13795 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
13796 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
13797 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
13798 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
13799 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
13800 Likewise.
13801 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
13802 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
13803 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
13804 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
13805 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
13806 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
13807 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
13808 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
13809 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
13810 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
13811 lbitset_xor_cmp, lbitset_zero): Likewise.
13812
13813 2002-10-14 Akim Demaille <akim@epita.fr>
13814
13815 Version 1.75.
13816
13817 2002-10-14 Akim Demaille <akim@epita.fr>
13818
13819 * tests/Makefile.am (maintainer-check-posix): New.
13820
13821 2002-10-14 Akim Demaille <akim@epita.fr>
13822
13823 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
13824 member.
13825
13826 2002-10-14 Akim Demaille <akim@epita.fr>
13827
13828 * src/tables.c (table_ninf_remap): base -> tab.
13829 Reported by Matt Rosing.
13830
13831 2002-10-14 Paul Eggert <eggert@twinsun.com>
13832
13833 * tests/action.at, tests/calc.at, tests/conflicts.at,
13834 tests/cxx-type.at, tests/headers.at, tests/input.at,
13835 tests/regression.at, tests/synclines.at, tests/torture.at:
13836 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
13837 so that the tests still work even if POSIXLY_CORRECT is set.
13838 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
13839
13840 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
13841 for portability to K&R hosts. Fix typo: signed char is guaranteed
13842 only to 127, not to 128.
13843 * data/glr.c (yysigned_char): New type.
13844 * data/yacc.c (yysigned_char): Likewise.
13845 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
13846
13847 2002-10-13 Paul Eggert <eggert@twinsun.com>
13848
13849 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
13850 true due to limited range of data type" warning from GCC.
13851
13852 * data/c.m4 (b4_token_defines): Protect against double-inclusion
13853 by wrapping enum yytokentype's definition inside #ifndef
13854 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
13855
13856 2002-10-13 Akim Demaille <akim@epita.fr>
13857
13858 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
13859 Un yy- yyrhs to avoid the name clash with the global YYRHS.
13860
13861 2002-10-13 Akim Demaille <akim@epita.fr>
13862
13863 * Makefile.maint: Update from Autoconf 2.54.
13864 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
13865
13866 2002-10-13 Akim Demaille <akim@epita.fr>
13867
13868 * src/print.c (print_state): Separate the list of solved conflicts
13869 from the other items.
13870 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
13871
13872 2002-10-13 Akim Demaille <akim@epita.fr>
13873
13874 Let nondeterministic skeletons be usable with deterministic
13875 tables.
13876
13877 With the patch, GAWK compiled by GCC without -O2 passes its test
13878 suite using a GLR parser driven by LALR tables. It fails with -O2
13879 because `struct stat' gives two different answers on my machine:
13880 88 (definition of an auto var) and later 96 (memset on this var).
13881 Hence the stack is badly corrumpted. The headers inclusion is to
13882 blame: if I move the awk.h inclusion before GLR's system header
13883 inclusion, the two struct stat have the same size.
13884
13885 * src/tables.c (pack_table): Always create conflict_table.
13886 (token_actions): Always create conflict_list.
13887 * data/glr.c (YYFLAG): Remove, unused.
13888
13889 2002-10-13 Akim Demaille <akim@epita.fr>
13890
13891 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
13892 (O0FLAGS): New.
13893 (VALGRIND, GXX): New.
13894 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
13895 * tests/bison.in: Run $PREBISON a pre-command.
13896 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
13897 (maintainer-check-g++): New.
13898 * Makefile.am (maintainer-check): New.
13899
13900 2002-10-13 Akim Demaille <akim@epita.fr>
13901
13902 * data/glr.c: Formatting changes.
13903 Tweak some trace messages to match yacc.c's.
13904
13905 2002-10-13 Akim Demaille <akim@epita.fr>
13906
13907 GLR parsers sometimes raise parse errors instead of performing the
13908 default reduction.
13909 Reported by Charles-Henry de Boysson.
13910
13911 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
13912 check the length of the traces when %glr.
13913 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
13914 GLR's traces.
13915 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
13916 Test GLR parsers.
13917 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
13918 (yyltype): Remove the yy prefix from the member names.
13919 (yytable): Complete its comment.
13920 (yygetLRActions): Map error action number from YYTABLE from
13921 YYTABLE_NINF to 0.
13922 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
13923 (which was a bug: it should have been YYTABEL_NINF, and yet it was
13924 not satisfying as we could compare an YYACTION computed from
13925 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
13926 only value for error actions.
13927 (yyreportParseError): In verbose parse error messages, don't issue
13928 `error' in the list of expected tokens.
13929 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
13930 next action to perform to match glr.c's decoding.
13931 (yytable): Complete its comment.
13932
13933 2002-10-13 Paul Eggert <eggert@twinsun.com>
13934
13935 Fix problem reported by Henrik Grubbstroem in
13936 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
13937 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
13938 because the Bison parser reads the second action before reducing
13939 the first one.
13940 * src/scan-gram.l (rule_length): New static var.
13941 Use it to keep track of the rule length in the scanner, since
13942 we can't expect the parser to be in lock-step sync with the scanner.
13943 (handle_action_dollar, handle_action_at): Use this var.
13944 * tests/actions.at (Exotic Dollars): Test for the problem.
13945
13946 2002-10-12 Paul Eggert <eggert@twinsun.com>
13947
13948 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
13949 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
13950 Include <sys/time.h> when checking for clock_t and struct tms.
13951 Use same include order as source.
13952 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
13953 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
13954
13955 * lib/timevar.c: Update copyright date and clarify comments.
13956 (get_time) [IN_GCC]: Keep the GCC version for reference.
13957
13958 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
13959 GCC version as of today, then merge Bison's changes.
13960 Change "GCC" to "Bison" in copyright notice. timevar.def's
13961 author is Akim, so change that too.
13962
13963 * src/reader.c (grammar_current_rule_check):
13964 Don't worry about the default action if $$ is untyped.
13965 Prevents bogus warnings reported by Jim Gifford in
13966 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
13967
13968 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
13969 * data/glr.c, data/lalr1.cc, data/yacc.c:
13970 Output token definitions before the first part of user declarations.
13971 Fixes compatibility problem reported by Jim Gifford for kbd in
13972 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
13973
13974 2002-10-11 Paul Eggert <eggert@twinsun.com>
13975
13976 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
13977 (yyparse): here. This undoes some of the 2002-07-25 change.
13978 Compatibility problem reported by Ralf S. Engelschall with
13979 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
13980
13981 2002-10-11 Akim Demaille <akim@epita.fr>
13982
13983 * tests/regression.at Characters Escapes): New.
13984 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
13985 characters.
13986 Reported by Jan Nieuwenhuizen.
13987
13988 2002-10-11 Akim Demaille <akim@epita.fr>
13989
13990 * po/id.po: New.
13991
13992 2002-10-10 Paul Eggert <eggert@twinsun.com>
13993
13994 Portability fixes for bitsets; this also avoids several GCC
13995 warnings.
13996
13997 * lib/abitset.c: Include <stddef.h>, for offsetof.
13998 * lib/lbitset.c: Likewise.
13999
14000 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14001 properly for vectors of objects. Do not assume that adding a
14002 header size to a multiple of a word size yields a value that is
14003 properly aligned for the whole union.
14004 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14005
14006 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14007 unique names for structures.
14008 * lib/ebitset.c (ebitset_bytes): Likewise.
14009 * lib/lbitset.c (lbitset_bytes): Likewise.
14010
14011 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14012 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14013 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14014 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14015 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14016 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14017 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14018 to improve the type-checking that GCC can do.
14019 * lib/bitset.c (bitset_op4_cmp): Likewise.
14020 * lib/bitset_stats.c (bitset_stats_count,
14021 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14022 bitset_stats_copy, bitset_stats_disjoint_p,
14023 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14024 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14025 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14026 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14027 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14028 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14029 bitset_stats_or_and_cmp): Likewise.
14030 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14031 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14032 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14033 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14034
14035 * lib/abitset.h: Include bitset.h, not bbitset.h.
14036 * lib/ebitset.h: Likewise.
14037 * lib/lbitset.h: Likewise.
14038
14039 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14040 All instances of parameters of type enum bitset_opts are now of
14041 type enum_bitset_opts, to conform to the C Standard, and similarly
14042 for enum_bitset_type.
14043 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14044 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14045
14046 Do not use "struct bitset_struct" to mean different things in
14047 different modules. Not only is this confusing, it violates
14048 the C Standard, which requires that structure types in different
14049 modules must be compatible if one is to be passed to the other.
14050 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14051 All instances of "struct bitset_struct *" replaced with "bitset".
14052 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14053 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14054 struct lbitset_struct, struct bitset_stats_struct): New types.
14055 All uses of struct bitset_struct changed to union bitset_union,
14056 etc.
14057 * lib/abitset.c (struct abitset_struct, abitset,
14058 struct bitset_struct): Remove.
14059 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14060 struct bitset_struct): Remove.
14061 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14062 bitset_struct): Remove.
14063 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14064 Likewise.
14065
14066 Do not call a function of type T using a call that assumes the
14067 function is of a different type U. Standard C requires that a
14068 function must be called with a type that is compatible with its
14069 definition.
14070 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14071 New decls.
14072 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14073 New functions.
14074 * lib/ebitset.c (PFV): Remove.
14075 * lib/lbitset.c (PFV): Likewise.
14076 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14077 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14078 decls.
14079 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14080 (ebitset_vtable): Use them.
14081 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14082 lbitset_xor): New functions.
14083 (lbitset_vtable): Use them.
14084
14085 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14086 Declare.
14087
14088 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14089 GCC warning.
14090 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14091 Use offsetof, for simplicity.
14092
14093 2002-10-06 Paul Eggert <eggert@twinsun.com>
14094
14095 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14096 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14097 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14098 which was inadvertently undone by the 2002-09-30 patch.
14099 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14100 the same width as int.
14101
14102 2002-10-04 Paul Eggert <eggert@twinsun.com>
14103
14104 Version 1.50.
14105
14106 * configure.ac (AC_INIT), NEWS: Increment version number.
14107
14108 * doc/bison.texinfo: Minor spelling, grammar, and white space
14109 fixes.
14110 (Symbols): Mention that any negative value returned from yylex
14111 signifies end-of-input. Warn about negative chars. Mention
14112 the portable Standard C character set.
14113
14114 The GNU coding standard says CFLAGS and YFLAGS are reserved
14115 for the installer to set.
14116 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14117 * src/Makefile.am (AM_CFLAGS): Likewise.
14118 (AM_YFLAGS): Renamed from YFLAGS.
14119
14120 Fix some MAX and MIN problems.
14121 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14122 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14123 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14124 * src/reader.c (reader): Use it.
14125
14126 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14127 POSIX 1003.1-2001 has removed fgrep.
14128
14129 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14130
14131 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14132 interpreted as signed.
14133 * lib/ebitset.c (ebitset_list): Fix bug.
14134
14135 2002-10-01 Paul Eggert <eggert@twinsun.com>
14136
14137 More fixes for 64-bit hosts and large bitsets.
14138
14139 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14140 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14141 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14142 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14143 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14144 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14145 bitset_count_): Likewise.
14146 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14147 bitset_first, bitset_last): Likewise.
14148 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14149 bitset_stats_list_reverse, bitset_stats_size,
14150 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14151 Likewise.
14152 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14153 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14154 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14155 bitsetv_reflexive_transitive_closure): Likewise.
14156 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14157 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14158 Likewise.
14159 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14160 Likewise.
14161
14162 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14163 Use size_t, not unsigned int, to count bytes.
14164 * lib/abitset.h (abitset_bytes): Likewise.
14165 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14166 Likewise.
14167 * lib/bitset.h (bitset_bytes): Likewise.
14168 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14169 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14170 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14171 * lib/ebitset.c (ebitset_bytes): Likewise.
14172 * lib/ebitset.h (ebitset_bytes): Likewise.
14173 * lib/lbitset.c (lbitset_bytes): Likewise.
14174 * lib/lbitset.h (lbitset_bytes): Likewise.
14175
14176 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14177 abitset_subset_p, abitset_disjoint_p, abitset_and,
14178 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14179 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14180 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14181 abitset_or_and, abitset_or_and_cmp):
14182 Use bitset_windex instead of unsigned int.
14183 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14184 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14185 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14186 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14187 Likewise.
14188 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14189
14190 * lib/bitset.c (bitset_print):
14191 Use proper printf formats for widths of integer types.
14192 * lib/bitset_stats.c (bitset_percent_histogram_print,
14193 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14194 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14195 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14196 * lib/lbitset.c (lbitset_bytes): Likewise.
14197
14198 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14199 BITSET_SIZE_MAX): New macros.
14200 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14201 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14202 to BITSET_WINDEX_MAX.
14203
14204 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14205 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14206 since we now return the bitset_bindex type (not int).
14207
14208 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14209 when computing sizes.
14210 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14211
14212 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14213 and avoid cast to unsigned.
14214
14215 2002-09-30 Akim Demaille <akim@epita.fr>
14216
14217 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14218 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14219 Updates from Michael Hayes.
14220
14221 2002-09-30 Art Haas <ahaas@neosoft.com>
14222
14223 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14224 invocations.
14225 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14226 defined.
14227
14228 2002-09-27 Akim Demaille <akim@epita.fr>
14229
14230 Version 1.49c.
14231
14232 2002-09-27 Akim Demaille <akim@epita.fr>
14233
14234 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14235 (Because of AC_LIBSOURCE).
14236
14237 2002-09-27 Akim Demaille <akim@epita.fr>
14238
14239 Playing with Autoscan.
14240
14241 * configure.ac: Remove the old LIBOBJ tweaks.
14242 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14243 * lib/strrchr.c: New.
14244 * lib/strtol.c: New, from the Coreutils 4.5.1.
14245
14246 2002-09-27 Akim Demaille <akim@epita.fr>
14247
14248 Playing with Autoscan.
14249
14250 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14251 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14252 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14253 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14254 Coreutils 4.5.1.
14255
14256 2002-09-24 Akim Demaille <akim@epita.fr>
14257
14258 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14259 (Frequently Asked Questions, Parser Stack Overflow): New.
14260
14261 2002-09-13 Akim Demaille <akim@epita.fr>
14262
14263 Playing with autoscan.
14264
14265 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14266 * src/files.c (skeleton_find): Remove, unused.
14267 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14268 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14269
14270 2002-09-13 Akim Demaille <akim@epita.fr>
14271
14272 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14273 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14274
14275 2002-09-13 Akim Demaille <akim@epita.fr>
14276
14277 * configure.ac: Require 2.54.
14278 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14279 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14280 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14281 Remove, provided by Autoconf macros.
14282
14283 2002-09-12 Akim Demaille <akim@epita.fr>
14284
14285 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14286
14287 2002-09-12 Akim Demaille <akim@epita.fr>
14288
14289 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14290 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14291 Reported by Martin Mokrejs.
14292
14293 2002-09-10 Akim Demaille <akim@epita.fr>
14294
14295 * src/parse-gram.y: Associate a human readable string to each
14296 token type.
14297 * tests/regression.at (Invalid inputs): Adjust.
14298
14299 2002-09-10 Gary V. Vaughan <gary@gnu.org>
14300
14301 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14302 with an Autoconf-2.5x style configure.ac.
14303
14304 2002-09-06 Paul Eggert <eggert@twinsun.com>
14305
14306 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14307 exception applies only to yacc.c. This is a modification of a
14308 patch originally suggested by Akim Demaille.
14309
14310 2002-09-06 Akim Demaille <akim@epita.fr>
14311
14312 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14313 here to...
14314 * data/yacc.c: here.
14315
14316 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14317 LocationType.
14318 (b4_ltype): Default to yy::Location from location.hh.
14319
14320 2002-09-04 Jim Meyering <jim@meyering.net>
14321
14322 * data/yacc.c: Guard the declaration of yytoknum also with
14323 `#ifdef YYPRINT', so it is declared only when used.
14324
14325 2002-09-04 Akim Demaille <akim@epita.fr>
14326
14327 * configure.in: Rename as...
14328 * configure.ac: this.
14329 Bump to 1.49c.
14330
14331 2002-09-04 Akim Demaille <akim@epita.fr>
14332
14333 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14334 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14335 translate maintainer only messages.
14336
14337 2002-08-12 Paul Eggert <eggert@twinsun.com>
14338
14339 Version 1.49b.
14340
14341 * Makefile.am (SUBDIRS): Remove intl.
14342 (DISTCLEANFILES): Remove.
14343 * NEWS: Mention that GNU M4 is now required. Clarify what is
14344 meant by "larger grammars". Mention the pt_BR translation.
14345 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14346 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14347 Bump version from 0.11.2 to 0.11.5.
14348 (BISON_PREREQ_STAGE): Remove.
14349 (AM_GNU_GETTEXT): Use external gettext.
14350 (AC_OUTPUT): Remove intl/Makefile.
14351
14352 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14353
14354 * data/glr.c: Include string.h, for strlen.
14355 (yyreportParseError): Use size_t for yysize.
14356 (yy_yypstack): No longer nested inside yypstates, as nested
14357 functions are not portable. Do not assume size_t is the
14358 same width as int.
14359 (yypstates): Do not assume that ptrdiff_t is the same width
14360 as int, and similarly for yyposn and YYINDEX.
14361
14362 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14363
14364 * lib/Makefile.am (INCLUDES): Do not include from the intl
14365 directory, which has been removed.
14366 * src/Makefile.am (INCLUDES): Likewise.
14367
14368 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14369 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14370 New vars.
14371
14372 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14373 * tests/Makefile.am (EXTRA_DIST): Likewise.
14374
14375 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14376 Do not assume that bitset_windex is the same width as unsigned.
14377
14378 * lib/abitset.c (abitset_unused_clear): Do not assume that
14379 bitset_word is the same width as int.
14380 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14381 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14382 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14383 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14384 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14385
14386 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14387 portability to one's complement hosts!).
14388 * lib/ebitset.c (ebitset_op1): Likewise.
14389 * lib/lbitset.c (lbitset_op1): Likewise.
14390
14391 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14392 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14393 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14394 Sync with fileutils.
14395 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14396 lib/gettext.h: Sync with diffutils.
14397
14398 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14399 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14400
14401 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14402 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14403 check for void *.
14404
14405 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14406 size_t; the old version tried to do this but casted improperly.
14407 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14408 (bitset_test): Now returns int, not unsigned long.
14409
14410 * lib/bitset_stats.c: Include "gettext.h".
14411 (_): New macro.
14412 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14413 name locals "index", as it generates unnecessary warnings on some
14414 hosts that have an "index" function.
14415
14416 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14417 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14418 they need translation.
14419 * src/LR0.c (state_list_append, new_itemsets, get_state,
14420 append_states, generate_states): Likewise.
14421 * src/assoc.c (assoc_to_string): Likewise.
14422 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14423 * src/gram.c (grammar_dump): Likewise.
14424 * src/injections.c (injections_compute): Likewise.
14425 * src/lalr.c (lookaheads_print): Likewise.
14426 * src/relation.c (relation_transpose): Likewise.
14427 * src/scan-gram.l: Likewise.
14428 * src/tables.c (table_grow, pack_vector): Likewise.
14429
14430 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14431 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14432 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14433 * m4/mbstate_t.m4: Sync with fileutils.
14434 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14435
14436 * po/LINGUAS: Add pt_BR.
14437 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14438 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14439 lib/timevar.c.
14440 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14441 manual recommends.
14442 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14443
14444 * src/complain.c (strerror_r): Remove decl; not needed.
14445 (strerror): Use same pattern as ../lib/error.c.
14446
14447 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14448
14449 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14450
14451 * src/main.c (main): Cast result of bindtextdomain and textdomain
14452 to void, to avoid a GCC warning when --disable-nls is in effect.
14453
14454 * src/scan-gram.l: Use strings rather than escapes when possible,
14455 to minimize the number of warnings from xgettext.
14456 (handle_action_dollar, handle_action_at): Don't use isdigit,
14457 as it mishandles negative chars and it may not work as expected
14458 outside the C locale.
14459
14460 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14461 this is a GCC extension and is not portable to other compilers.
14462
14463 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14464 Do not include <ctype.h>; no longer needed.
14465 Do not include <malloc.h>; no longer needed (and generates
14466 warnings on OpenBSD 3.0).
14467
14468 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14469 it's not portable.
14470
14471 * tests/regression.at: Do not use 'cc -c input.c -o input';
14472 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14473
14474 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14475 exit status as failure, not just exit status 1. Sun C exits
14476 with status 2 sometimes.
14477
14478 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14479 Use it for the two large tests.
14480
14481 2002-08-02 Akim Demaille <akim@epita.fr>
14482
14483 * src/conflicts.c (conflicts_output): Don't output rules never
14484 reduced here, since anyway that computation doesn't work.
14485 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14486 (rule_useless_p, rule_never_reduced_p): New.
14487 (grammar_rules_partial_print): Use a filter instead of a range.
14488 Display the title only if needed.
14489 (grammar_rules_print): Adjust.
14490 (grammar_rules_never_reduced_report): New.
14491 * src/tables.c (action_row): Move the computation of rules never
14492 reduced to...
14493 (token_actions): here.
14494 * src/main.c (main): Make the parser before making the report, so
14495 that rules never reduced are computed.
14496 Call grammar_rules_never_reduced_report.
14497 * src/print.c (print_results): Report rules never reduced.
14498 * tests/conflicts.at, tests/reduce.at: Adjust.
14499
14500 2002-08-01 Akim Demaille <akim@epita.fr>
14501
14502 Instead of attaching lookaheads and duplicating the rules being
14503 reduced by a state, attach the lookaheads to the reductions.
14504
14505 * src/state.h (state_t): Remove the `lookaheads',
14506 `lookaheads_rule' member.
14507 (reductions_t): Add a `lookaheads' member.
14508 Use a regular array for the `rules'.
14509 * src/state.c (reductions_new): Initialize the lookaheads member
14510 to 0.
14511 (state_rule_lookaheads_print): Adjust.
14512 * src/state.h, src/state.c (state_reductions_find): New.
14513 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14514 (count_rr_conflicts): Adjust.
14515 * src/lalr.c (LArule): Remove.
14516 (add_lookback_edge): Adjust.
14517 (state_lookaheads_count): New.
14518 (states_lookaheads_initialize): Merge into...
14519 (initialize_LA): this.
14520 (lalr_free): Adjust.
14521 * src/main.c (main): Don't free nullable and derives too early: it
14522 is used by --verbose.
14523 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14524
14525 2002-08-01 Akim Demaille <akim@epita.fr>
14526
14527 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14528 `rule_number_t**'.
14529 (set_derives, free_derives): Rename as...
14530 (derives_compute, derives_free): this.
14531 Adjust all dependencies.
14532 * src/nullable.c (set_nullable, free_nullable): Rename as...
14533 (nullable_compute, nullable_free): these.
14534 (rule_list_t): Store rule_t *, not rule_number_t.
14535 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14536 pointers, instead of their numbers.
14537 * src/main.c (main): Call nullable_free, and derives_free earlier,
14538 as they were lo longer used.
14539
14540 2002-08-01 Akim Demaille <akim@epita.fr>
14541
14542 * lib/timevar.c (get_time): Include children time.
14543 * src/lalr.h (LA, LArule): Don't export them: used with the
14544 state_t.
14545 * src/lalr.c (LA, LArule): Static.
14546 * src/lalr.h, src/lalr.c (lalr_free): New.
14547 * src/main.c (main): Call it.
14548 * src/tables.c (pack_vector): Check whether loc is >= to the
14549 table_size, not >.
14550 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14551 (tables_generate): do it, since that's also it which allocates
14552 them.
14553 Don't free LA and LArule, main does.
14554
14555 2002-07-31 Akim Demaille <akim@epita.fr>
14556
14557 Separate parser tables computation and output.
14558
14559 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14560 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14561 (yydefgoto, yydefact, high): Move to...
14562 * src/tables.h, src/tables.c: here.
14563 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14564 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14565 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14566 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14567 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14568 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14569 (action_row, save_row, token_actions, save_column, default_goto)
14570 (goto_actions, sort_actions, matching_state, pack_vector)
14571 (table_ninf_remap, pack_table, prepare_actions): Move to...
14572 * src/tables.c: here.
14573 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14574 * src/output.c (token_actions, output_base, output_conflicts)
14575 (output_check): Merge into...
14576 (prepare_actions): this.
14577 (actions_output): Rename as...
14578 (user_actions_output): this.
14579 * src/main.c (main): Call tables_generate and tables_free.
14580
14581 2002-07-31 Akim Demaille <akim@epita.fr>
14582
14583 Steal GCC's --time-report support.
14584
14585 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14586 stolen/adjusted from GCC.
14587 * m4/stage.m4: Remove time related checks.
14588 * m4/timevar.m4: New.
14589 * configure.in: Adjust.
14590 * src/system.h: Adjust to using timevar.h.
14591 * src/getargs.h, src/getargs.c: Support trace_time for
14592 --trace=time.
14593 * src/main.c (stage): Remove.
14594 (main): Replace `stage' invocations with timevar calls.
14595 * src/output.c: Insert pertinent timevar calls.
14596
14597 2002-07-31 Akim Demaille <akim@epita.fr>
14598
14599 Let --trace have arguments.
14600
14601 * src/getargs.h (enum trace_e): New.
14602 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
14603 (long_options, short_options): --trace/-T takes an optional
14604 argument.
14605 Change all the uses of trace_flag to reflect the new flags.
14606 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
14607
14608 Strengthen `stage' portability.
14609
14610 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
14611 * configure.in: Use it.
14612 Don't check for malloc.h and sys/times.h.
14613 * src/system.h: Include them when appropriate.
14614 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
14615 times and struct tms are available.
14616
14617 2002-07-30 Akim Demaille <akim@epita.fr>
14618
14619 In verbose parse error message, don't report `error' as an
14620 expected token.
14621 * tests/actions.at (Printers and Destructors): Adjust.
14622 * tests/calc.at (Calculator $1): Adjust.
14623 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
14624 error message, do not report the parser accepts the error token in
14625 that state.
14626
14627 2002-07-30 Akim Demaille <akim@epita.fr>
14628
14629 Normalize conflict related messages.
14630
14631 * src/complain.h, src/complain.c (warn, complain): New.
14632 * src/conflicts.c (conflicts_print): Use them.
14633 (conflict_report_yacc): New, extracted from...
14634 (conflicts_print): here.
14635 * tests/conflicts.at, tests/existing.at: Adjust.
14636
14637 2002-07-30 Akim Demaille <akim@epita.fr>
14638
14639 Report rules which are never reduced by the parser: those hidden
14640 by conflicts.
14641
14642 * src/LR0.c (save_reductions): Don't make the final state too
14643 different: save its reduction (accept) instead of having a state
14644 without any action (no shift or goto, no reduce).
14645 Note: the final state is now a ``regular'' state, i.e., the
14646 parsers now contain `reduce 0' as default reduction.
14647 Nevertheless, since they decide to `accept' when yystate =
14648 final_state, they still will not reduce rule 0.
14649 * src/print.c (print_actions, print_reduction): Adjust.
14650 * src/output.c (action_row): Track reduced rules.
14651 (token_actions): Report rules never reduced.
14652 * tests/conflicts.at, tests/regression.at: Adjust.
14653
14654 2002-07-30 Akim Demaille <akim@epita.fr>
14655
14656 `stage' was accidently included in a previous patch.
14657 Initiate its autoconfiscation.
14658
14659 * configure.in: Look for malloc.h and sys/times.h.
14660 * src/main.c (stage): Adjust.
14661 Report only when trace_flag.
14662
14663 2002-07-29 Akim Demaille <akim@epita.fr>
14664
14665 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
14666 state_number_t.
14667 (errs_t): symbol_t*, not symbol_number_t.
14668 (reductions_t): rule_t*, not rule_number_t.
14669 (FOR_EACH_SHIFT): New.
14670 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
14671 * src/print.c, src/print_graph.c: Adjust.
14672
14673 2002-07-29 Akim Demaille <akim@epita.fr>
14674
14675 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
14676
14677 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
14678 (endtoken, accept): these.
14679 * src/reader.c (reader): Set endtoken's default tag to "$end".
14680 Set undeftoken's tag to "$undefined" instead of "$undefined.".
14681 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
14682 Adjust.
14683
14684 2002-07-29 Akim Demaille <akim@epita.fr>
14685
14686 * src/reduce.c (reduce_grammar): When the language is empty,
14687 complain about the start symbol, not the axiom.
14688 Use its location.
14689 * tests/reduce.at (Empty Language): New.
14690
14691 2002-07-26 Akim Demaille <akim@epita.fr>
14692
14693 * src/reader.h, src/reader.c (gram_error): ... can't get
14694 yycontrol without making too strong assumptions on the parser
14695 itself.
14696 * src/output.c (prepare_tokens): Use the real 0th value of
14697 token_translations instead of `0'.
14698 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
14699 visible here.
14700 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
14701 for the time being: %locations ought to provide it to yyerror.
14702
14703 2002-07-25 Akim Demaille <akim@epita.fr>
14704
14705 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
14706 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
14707 * tests/regression.at (Web2c Actions): Adjust.
14708
14709 2002-07-25 Akim Demaille <akim@epita.fr>
14710
14711 Stop storing rules from 1 to nrules + 1.
14712
14713 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
14714 * src/nullable.c, src/output.c, src/print.c, src/reader.c
14715 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
14716 Iterate from 0 to nrules.
14717 Use rule_number_as_item_number and item_number_as_rule_number.
14718 Adjust to `derive' now containing possibly 0.
14719 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
14720 Handle the `- 1' part in rule numbers from/to item numbers.
14721 * src/conflicts.c (log_resolution): Fix the message which reversed
14722 shift and reduce.
14723 * src/output.c (action_row): Initialize default_rule to -1.
14724 (token_actions): Adjust.
14725 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
14726 expected output.
14727 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
14728
14729 2002-07-25 Akim Demaille <akim@epita.fr>
14730
14731 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
14732 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
14733 (b4_c_knr_arg_decl): New.
14734 * data/yacc.c: Use it to define yysymprint, yydestruct, and
14735 yyreport_parse_error.
14736
14737 2002-07-25 Akim Demaille <akim@epita.fr>
14738
14739 * data/yacc.c (yyreport_parse_error): New, extracted from...
14740 (yyparse): here.
14741 (yydestruct, yysymprint): Move above yyparse.
14742 Be K&R compliant.
14743
14744 2002-07-25 Akim Demaille <akim@epita.fr>
14745
14746 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
14747 replace...
14748 (b4_sint_type, b4_uint_type): these.
14749 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
14750 * tests/regression.at (Web2c Actions): Adjust.
14751
14752 2002-07-25 Akim Demaille <akim@epita.fr>
14753
14754 * src/gram.h (TIEM_NUMBER_MAX): New.
14755 (item_number_of_rule_number, rule_number_of_item_number): Rename
14756 as...
14757 (rule_number_as_item_number, item_number_as_rule_number): these.
14758 Adjust dependencies.
14759 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14760 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14761 (symbol_number_to_vector_number): New.
14762 (order): Of vector_number_t* type.
14763 (base_t, BASE_MAX, BASE_MIN): New.
14764 (froms, tos, width, pos, check): Of base_t type.
14765 (action_number_t, ACTION_MIN, ACTION_MAX): New.
14766 (actrow): Of action_number_t type.
14767 (conflrow): Of unsigned int type.
14768 (table_ninf, base_ninf): New.
14769 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
14770 (muscle_insert_int_table, muscle_insert_base_table)
14771 (muscle_insert_rule_number_table): New.
14772 (prepare_tokens): Output `toknum' as int_table.
14773 (action_row): Returns a rule_number_t.
14774 Use ACTION_MIN, not SHRT_MIN.
14775 (token_actions): yydefact is rule_number_t*.
14776 (table_ninf_remap): New.
14777 (pack_table): Use it for `base' and `table'.
14778 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
14779 replaced with...
14780 (YYPACT_NINF, YYTABLE_NINF): these.
14781 (yypact, yytable): Compute their types instead of hard-coded
14782 `short'.
14783 * tests/regression.at (Web2c Actions): Adjust.
14784
14785 2002-07-19 Akim Demaille <akim@epita.fr>
14786
14787 * src/scan-gram.l (id): Can start with an underscore.
14788
14789 2002-07-16 Akim Demaille <akim@epita.fr>
14790
14791 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
14792 Adjust all former `associativity' dependencies.
14793 * src/symtab.c (symbol_new): Default associativity is `undef', not
14794 `right'.
14795 (symbol_check_alias_consistence): Adjust.
14796
14797 2002-07-09 Akim Demaille <akim@epita.fr>
14798
14799 * doc/bison.texinfo: Properly set the ``header'' part.
14800 Use @dircategory ``GNU programming tools'' as per Texinfo's
14801 documentation.
14802 Use @copying.
14803
14804 2002-07-09 Akim Demaille <akim@epita.fr>
14805
14806 * lib/quotearg.h: Protect against multiple inclusions.
14807 * src/location.h (location_t): Add a `file' member.
14808 (LOCATION_RESET, LOCATION_PRINT): Adjust.
14809 * src/complain.c (warn_at, complain_at, fatal_at): Drop
14810 `error_one_per_line' support.
14811
14812 2002-07-09 Akim Demaille <akim@epita.fr>
14813
14814 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
14815 * src/reader.c (lineno): Remove.
14816 Adjust all dependencies.
14817 (get_merge_function): Take a location and use complain_at.
14818 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
14819 * tests/regression.at (Invalid inputs, Mixing %token styles):
14820 Adjust.
14821
14822 2002-07-09 Akim Demaille <akim@epita.fr>
14823
14824 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
14825 recovery rule, and forbid extensions when --yacc.
14826 (gram_error): Use complain_at.
14827 * src/reader.c (reader): Exit if there were parse errors.
14828
14829 2002-07-09 Akim Demaille <akim@epita.fr>
14830
14831 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
14832 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
14833 Reported by R Blake <blakers@mac.com>.
14834
14835 2002-07-09 Akim Demaille <akim@epita.fr>
14836
14837 * data/yacc.c: Output the copyright notive in the header.
14838
14839 2002-07-03 Akim Demaille <akim@epita.fr>
14840
14841 * src/output.c (froms, tos): Are state_number_t.
14842 (save_column): sp, sp1, and sp2 are state_number_t.
14843 (prepare): Rename `final' as `final_state_number', `nnts' as
14844 `nterms_number', `nrules' as `rules_number', `nstates' as
14845 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
14846 unused.
14847 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
14848 * data/lalr1.cc (nsym_): Remove, unused.
14849
14850 2002-07-03 Akim Demaille <akim@epita.fr>
14851
14852 * src/lalr.h, src/lalr.c (goto_number_t): New.
14853 * src/lalr.c (goto_list_t): New.
14854 Propagate them.
14855 * src/nullable.c (rule_list_t): New.
14856 Propagate.
14857 * src/types.h: Remove.
14858
14859 2002-07-03 Akim Demaille <akim@epita.fr>
14860
14861 * src/closure.c (print_fderives): Use rule_rhs_print.
14862 * src/derives.c (print_derives): Use rule_rhs_print.
14863 (rule_list_t): New, replaces `shorts'.
14864 (set_derives): Add comments.
14865 * tests/sets.at (Nullable, Firsts): Adjust.
14866
14867 2002-07-03 Akim Demaille <akim@epita.fr>
14868
14869 * src/output.c (prepare_actions): Free `tally' and `width'.
14870 (prepare_actions): Allocate and free `order'.
14871 * src/symtab.c (symbols_free): Free `symbols'.
14872 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
14873 * src/output.c (m4_invoke): Move to...
14874 * src/scan-skel.l: here.
14875 (<<EOF>>): Close yyout, and free its name.
14876
14877 2002-07-03 Akim Demaille <akim@epita.fr>
14878
14879 Fix some memory leaks, and fix a bug: state 0 was examined twice.
14880
14881 * src/LR0.c (new_state): Merge into...
14882 (state_list_append): this.
14883 (new_states): Merge into...
14884 (generate_states): here.
14885 (set_states): Don't ensure a proper `errs' state member here, do it...
14886 * src/conflicts.c (conflicts_solve): here.
14887 * src/state.h, src/state.c: Comment changes.
14888 (state_t): Rename member `shifts' as `transitions'.
14889 Adjust all dependencies.
14890 (errs_new): For consistency, also take the values as argument.
14891 (errs_dup): Remove.
14892 (state_errs_set): New.
14893 (state_reductions_set, state_transitions_set): Assert that no
14894 previous value was assigned.
14895 (state_free): New.
14896 (states_free): Use it.
14897 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
14898 temporary storage: use `errs' and `nerrs' as elsewhere.
14899 (set_conflicts): Allocate and free this `errs'.
14900
14901 2002-07-02 Akim Demaille <akim@epita.fr>
14902
14903 * lib/libiberty.h: New.
14904 * lib: Update the bitset implementation from upstream.
14905 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
14906 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
14907 * src/main.c: Adjust bitset stats calls.
14908
14909 2002-07-01 Paul Eggert <eggert@twinsun.com>
14910
14911 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
14912 char, so that negative chars don't collide with $.
14913
14914 2002-06-30 Akim Demaille <akim@epita.fr>
14915
14916 Have the GLR tests be `warning' checked, and fix the warnings.
14917
14918 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
14919 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
14920 (yyremoveDeletes): `yyi' and `yyj' are size_t.
14921 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
14922 (yyaddDeferredAction): static.
14923 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
14924 (yyreportParseError): yyprefix is const.
14925 yytokenp is used only when verbose.
14926 (yy__GNUC__): Replace with __GNUC__.
14927 (yypdumpstack): yyi is size_t.
14928 (yypreference): Un-yy local variables and arguments, to avoid
14929 clashes with `yyr1'. Anyway, we are not in the user name space.
14930 (yytname_size): be an int, as is compared with ints.
14931 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
14932 Use them.
14933 * tests/cxx-gram.at: Use quotation to protect $1.
14934 Use AT_COMPILE to enable warnings hunts.
14935 Prototype yylex and yyerror.
14936 `Use' argc.
14937 Include `string.h', not `strings.h'.
14938 Produce and prototype stmtMerge only when used.
14939 yylex takes a location.
14940
14941 2002-06-30 Akim Demaille <akim@epita.fr>
14942
14943 We spend a lot of time in quotearg, in particular when --verbose.
14944
14945 * src/symtab.c (symbol_get): Store a quoted version of the key.
14946 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
14947 Adjust all callers.
14948
14949 2002-06-30 Akim Demaille <akim@epita.fr>
14950
14951 * src/state.h (reductions_t): Rename member `nreds' as num.
14952 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
14953 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
14954
14955 2002-06-30 Akim Demaille <akim@epita.fr>
14956
14957 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
14958 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
14959 (shifts_to): Rename as...
14960 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
14961 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
14962 (TRANSITION_IS_DISABLED, transitions_to): these.
14963
14964 2002-06-30 Akim Demaille <akim@epita.fr>
14965
14966 * src/print.c (print_shifts, print_gotos): Merge into...
14967 (print_transitions): this.
14968 (print_transitions, print_errs, print_reductions): Align the
14969 lookaheads columns.
14970 (print_core, print_transitions, print_errs, print_state,
14971 print_grammar): Output empty lines separator before, not after.
14972 (state_default_rule_compute): Rename as...
14973 (state_default_rule): this.
14974 * tests/conflicts.at (Defaulted Conflicted Reduction),
14975 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
14976 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
14977
14978 2002-06-30 Akim Demaille <akim@epita.fr>
14979
14980 Display items as we display rules.
14981
14982 * src/gram.h, src/gram.c (rule_lhs_print): New.
14983 * src/gram.c (grammar_rules_partial_print): Use it.
14984 * src/print.c (print_core): Likewise.
14985 * tests/conflicts.at (Defaulted Conflicted Reduction),
14986 (Unresolved SR Conflicts): Adjust.
14987 (Unresolved SR Conflicts): Adjust and rename as...
14988 (Resolved SR Conflicts): this, as was meant.
14989 * tests/regression.at (Web2c Report): Adjust.
14990
14991 2002-06-30 Akim Demaille <akim@epita.fr>
14992
14993 * src/print.c (state_default_rule_compute): New, extracted from...
14994 (print_reductions): here.
14995 Pessimize, but clarify the code.
14996 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
14997
14998 2002-06-30 Akim Demaille <akim@epita.fr>
14999
15000 * src/output.c (action_row): Let default_rule be always a rule
15001 number.
15002
15003 2002-06-30 Akim Demaille <akim@epita.fr>
15004
15005 * src/closure.c (print_firsts, print_fderives, closure):
15006 Use BITSET_EXECUTE.
15007 * src/lalr.c (lookaheads_print): Likewise.
15008 * src/state.c (state_rule_lookaheads_print): Likewise.
15009 * src/print_graph.c (print_core): Likewise.
15010 * src/print.c (print_reductions): Likewise.
15011 * src/output.c (action_row): Likewise.
15012 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15013
15014 2002-06-30 Akim Demaille <akim@epita.fr>
15015
15016 * src/print_graph.c: Use report_flag.
15017
15018 2002-06-30 Akim Demaille <akim@epita.fr>
15019
15020 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15021 to...
15022 * src/relation.h, src/relation.c (traverse, relation_digraph)
15023 (relation_print, relation_transpose): New.
15024
15025 2002-06-30 Akim Demaille <akim@epita.fr>
15026
15027 * src/state.h, src/state.c (shifts_to): New.
15028 * src/lalr.c (build_relations): Use it.
15029
15030 2002-06-30 Akim Demaille <akim@epita.fr>
15031
15032 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15033 (item_number_of_rule_number, rule_number_of_item_number): New.
15034 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15035 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15036 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15037 Propagate their use.
15038 Much remains to be done, in particular wrt `shorts' from types.h.
15039
15040 2002-06-30 Akim Demaille <akim@epita.fr>
15041
15042 * src/symtab.c (symbol_new): Initialize the `printer' member.
15043
15044 2002-06-30 Akim Demaille <akim@epita.fr>
15045
15046 * src/LR0.c (save_reductions): Remove, replaced by...
15047 * src/state.h, src/state.c (state_reductions_set): New.
15048 (reductions, errs): Rename as...
15049 (reductions_t, errs_t): these.
15050 Adjust all dependencies.
15051
15052 2002-06-30 Akim Demaille <akim@epita.fr>
15053
15054 * src/LR0.c (state_list_t, state_list_append): New.
15055 (first_state, last_state): Now symbol_list_t.
15056 (this_state): Remove.
15057 (new_itemsets, append_states, save_reductions): Take a state_t as
15058 argument.
15059 (set_states, generate_states): Adjust.
15060 (save_shifts): Remove, replaced by...
15061 * src/state.h, src/state.c (state_shifts_set): New.
15062 (shifts): Rename as...
15063 (shifts_t): this.
15064 Adjust all dependencies.
15065 * src/state.h (state_t): Remove the `next' member.
15066
15067 2002-06-30 Akim Demaille <akim@epita.fr>
15068
15069 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15070 escaped in slot 0.
15071
15072 2002-06-30 Akim Demaille <akim@epita.fr>
15073
15074 Use hash.h for the state hash table.
15075
15076 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15077 (allocate_storage): Use state_hash_new.
15078 (free_storage): Use state_hash_free.
15079 (new_state, get_state): Adjust.
15080 * src/lalr.h, src/lalr.c (states): Move to...
15081 * src/states.h (state_t): Remove the `link' member, no longer
15082 used.
15083 * src/states.h, src/states.c: here.
15084 (state_hash_new, state_hash_free, state_hash_lookup)
15085 (state_hash_insert, states_free): New.
15086 * src/states.c (state_table, state_compare, state_hash): New.
15087 * src/output.c (output_actions): Do not free states now, since we
15088 still need to know the final_state number in `prepare', called
15089 afterwards. Do it...
15090 * src/main.c (main): here: call states_free after `output'.
15091
15092 2002-06-30 Akim Demaille <akim@epita.fr>
15093
15094 * src/state.h, src/state.c (state_new): New, extracted from...
15095 * src/LR0.c (new_state): here.
15096 * src/state.h (STATE_ALLOC): Move to...
15097 * src/state.c: here.
15098 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15099 * src/state.h, src/state.c: here.
15100
15101 2002-06-30 Akim Demaille <akim@epita.fr>
15102
15103 * src/reader.c (gensym): Rename as...
15104 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15105 (getsym): Rename as...
15106 (symbol_get): this.
15107
15108 2002-06-30 Akim Demaille <akim@epita.fr>
15109
15110 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15111 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15112 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15113 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15114
15115 2002-06-30 Akim Demaille <akim@epita.fr>
15116
15117 Make the test suite pass with warnings checked.
15118
15119 * tests/actions.at (Printers and Destructors): Improve.
15120 Avoid unsigned vs. signed issues.
15121 * tests/calc.at: Don't exercise the scanner here, do it...
15122 * tests/input.at (Torturing the Scanner): here.
15123
15124 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15125
15126 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15127 reorganize first lines parallel to yacc.c.
15128
15129 2002-06-28 Akim Demaille <akim@epita.fr>
15130
15131 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15132 (b4_token_enum, b4_token_defines): New, factored from...
15133 * data/lalr1.cc, data/yacc.c, glr.c: here.
15134
15135 2002-06-28 Akim Demaille <akim@epita.fr>
15136
15137 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15138 unused variables.
15139 * src/output.c (merger_output): static.
15140
15141 2002-06-28 Akim Demaille <akim@epita.fr>
15142
15143 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15144 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15145 pacify GCC.
15146 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15147
15148 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15149
15150 Accumulated changelog for new GLR parsing features.
15151
15152 * src/conflicts.c (count_total_conflicts): Change name to
15153 conflicts_total_count.
15154 * src/conflicts.h: Ditto.
15155 * src/output.c (token_actions): Use the new name.
15156 (output_conflicts): Change conflp => conflict_list_heads, and
15157 confl => conflict_list for better readability.
15158 * data/glr.c: Use the new names.
15159 * NEWS: Add self to GLR announcement.
15160
15161 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15162
15163 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15164 Akim Demaille.
15165
15166 * data/bison.glr: Change name to glr.c
15167 * data/glr.c: Renamed from bison.glr.
15168 * data/Makefile.am: Add glr.c
15169
15170 * src/getargs.c:
15171
15172 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15173 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15174
15175 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15176
15177 * data/bison.glr: Be sure to restore the
15178 current #line when returning to the skeleton contents after having
15179 exposed the input file's #line.
15180
15181 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15182
15183 * data/bison.glr: Bring up to date with changes to bison.simple.
15184
15185 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15186
15187 * data/bison.glr: Correct definitions that use b4_prefix.
15188 Various reformatting.
15189 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15190 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15191 yytokenp argument; now part of stack.
15192 (yychar): Define to behave as documented.
15193 (yyclearin): Ditto.
15194
15195 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15196
15197 * src/reader.h: Add declaration for free_merger_functions.
15198
15199 * src/reader.c (merge_functions): New variable.
15200 (get_merge_function): New function.
15201 (free_merger_functions): New function.
15202 (readgram): Check for %prec that is not followed by a symbol.
15203 Handle %dprec and %merge declarations.
15204 (packgram): Initialize dprec and merger fields in rules array.
15205
15206 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15207 conflict_list_cnt, conflict_list_free): New variables.
15208 (table_grow): Also grow conflict_table.
15209 (prepare_rules): Output dprec and merger tables.
15210 (conflict_row): New function.
15211 (action_row): Output conflict lists for GLR parser. Don't use
15212 default reduction in conflicted states for GLR parser so that there
15213 are spaces for the conflict lists.
15214 (save_row): Also save conflict information.
15215 (token_actions): Allocate conflict list.
15216 (merger_output): New function.
15217 (pack_vector): Pack conflict table, too.
15218 (output_conflicts): New function to output yyconflp and yyconfl.
15219 (output_check): Allocate conflict_tos.
15220 (output_actions): Output conflict tables, also.
15221 (output_skeleton): Output b4_mergers definition.
15222 (prepare): Output b4_max_rhs_length definition.
15223 Use 'bison.glr' as default skeleton for GLR parsers.
15224
15225 * src/gram.c (glr_parser): New flag.
15226 (grammar_free): Call free_merger_functions.
15227
15228 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15229 all pairs of conflicting reductions, rather than just all tokens
15230 causing conflicts. Needed to size conflict tables.
15231 (conflicts_output): Modify call to count_rr_conflicts for new
15232 interface.
15233 (conflicts_print): Ditto.
15234 (count_total_conflicts): New function.
15235
15236 * src/reader.h (merger_list): New type.
15237 (merge_functions): New variable.
15238
15239 * src/lex.h (tok_dprec, tok_merge): New token types.
15240
15241 * src/gram.h (rule_s): Add dprec and merger fields.
15242 (glr_parser): New flag.
15243
15244 * src/conflicts.h (count_total_conflicts): New function.
15245
15246 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15247
15248 * doc/bison.texinfo (Generalized LR Parsing): New section.
15249 (GLR Parsers): New section.
15250 (Language and Grammar): Mention GLR parsing.
15251 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15252 Correct typo ("tge" -> "the").
15253
15254 * data/bison.glr: New skeleton for GLR parsing.
15255
15256 * tests/cxx-gram.at: New tests for GLR parsing.
15257
15258 * tests/testsuite.at: Include cxx-gram.at.
15259
15260 * tests/Makefile.am: Add cxx-gram.at.
15261
15262 * src/parse-gram.y:
15263
15264 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15265
15266 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
15267
15268 2002-06-27 Akim Demaille <akim@epita.fr>
15269
15270 * src/options.h, src/options.c: Remove.
15271 * src/getargs.c (short_options, long_options): New.
15272
15273 2002-06-27 Akim Demaille <akim@epita.fr>
15274
15275 * data/bison.simple, data/bison.c++: Rename as...
15276 * data/yacc.c, data/lalr1.cc: these.
15277 * doc/bison.texinfo (Environment Variables): Remove.
15278
15279 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15280
15281 * src/getargs.c (report_argmatch): Initialize strtok().
15282
15283 2002-06-20 Akim Demaille <akim@epita.fr>
15284
15285 * data/bison.simple (b4_symbol_actions): New, replaces...
15286 (b4_symbol_destructor, b4_symbol_printer): these.
15287 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15288 user token numbers.
15289
15290 2002-06-20 Akim Demaille <akim@epita.fr>
15291
15292 * data/bison.simple (yydestructor): Rename as...
15293 (yydestruct): this.
15294
15295 2002-06-20 Akim Demaille <akim@epita.fr>
15296
15297 * src/symtab.h, src/symtab.c (symbol_type_set)
15298 (symbol_destructor_set, symbol_precedence_set): The location is
15299 the last argument.
15300 Adjust all callers.
15301
15302 2002-06-20 Akim Demaille <akim@epita.fr>
15303
15304 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15305 internals.
15306 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15307 Takes a location.
15308 * src/symtab.h, src/symtab.c (symbol_class_set)
15309 (symbol_user_token_number_set): Likewise.
15310 Adjust all callers.
15311 Promote complain_at.
15312 * tests/input.at (Type Clashes): Adjust.
15313
15314 2002-06-20 Akim Demaille <akim@epita.fr>
15315
15316 * data/bison.simple (YYLEX): Fix the declaration when
15317 %pure-parser.
15318
15319 2002-06-20 Akim Demaille <akim@epita.fr>
15320
15321 * data/bison.simple (yysymprint): Don't print the token number,
15322 just its name.
15323 * tests/actions.at (Destructors): Rename as...
15324 (Printers and Destructors): this.
15325 Also exercise %printer.
15326
15327 2002-06-20 Akim Demaille <akim@epita.fr>
15328
15329 * data/bison.simple (YYDSYMPRINT): New.
15330 Use it to remove many of the #if YYDEBUG/if (yydebug).
15331
15332 2002-06-20 Akim Demaille <akim@epita.fr>
15333
15334 * src/symtab.h, src/symtab.c (symbol_t): printer and
15335 printer_location are new members.
15336 (symbol_printer_set): New.
15337 * src/parse-gram.y (PERCENT_PRINTER): New token.
15338 Handle its associated rule.
15339 * src/scan-gram.l: Adjust.
15340 (handle_destructor_at, handle_destructor_dollar): Rename as...
15341 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15342 * src/output.c (symbol_printers_output): New.
15343 (output_skeleton): Call it.
15344 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15345 since there are already many grammar files with a user `yyprint'.
15346 Replace the calls to YYPRINT to calls to yysymprint.
15347 * tests/calc.at: Adjust.
15348 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15349 taking advantage of parser very internal details (stack size!).
15350
15351 2002-06-20 Akim Demaille <akim@epita.fr>
15352
15353 * src/scan-gram.l: Complete the scanner with the missing patterns
15354 to pacify Flex.
15355 Use `quote' and `symbol_tag_get' where appropriate.
15356
15357 2002-06-19 Akim Demaille <akim@epita.fr>
15358
15359 * tests/actions.at (Destructors): Augment to test locations.
15360 * data/bison.simple (yydestructor): Pass it the current location
15361 if locations are enabled.
15362 Prototype only when __STDC__ or C++.
15363 Change the argument names to move into the yy name space: there is
15364 user code here.
15365
15366 2002-06-19 Akim Demaille <akim@epita.fr>
15367
15368 * data/bison.simple (b4_pure_if): New.
15369 Use it instead of #ifdef YYPURE.
15370
15371 2002-06-19 Akim Demaille <akim@epita.fr>
15372
15373 * data/bison.simple (b4_location_if): New.
15374 Use it instead of #ifdef YYLSP_NEEDED.
15375
15376 2002-06-19 Akim Demaille <akim@epita.fr>
15377
15378 Prepare @$ in %destructor, but currently don't bind it in the
15379 skeleton, as %location use is not cleaned up yet.
15380
15381 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15382 (handle_action_at): New.
15383 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15384 a braced_code_t and a location as additional arguments.
15385 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15386 unquote one when outputting `b4_dollar_dollar'.
15387 Adjust callers.
15388 * data/bison.simple (b4_eval): Remove.
15389 (b4_symbol_destructor): Adjust.
15390 * tests/input.at (Invalid @n): Adjust.
15391
15392 2002-06-19 Zack Weinberg <zack@codesourcery.com>
15393
15394 * doc/bison.texinfo: Document ability to have multiple
15395 prologue sections.
15396
15397 2002-06-18 Akim Demaille <akim@epita.fr>
15398
15399 * src/files.c (compute_base_names): When computing the output file
15400 names from the input file name, strip the directory part.
15401
15402 2002-06-18 Akim Demaille <akim@epita.fr>
15403
15404 * data/bison.simple.new: Comment changes.
15405 Reported by Andreas Schwab.
15406
15407 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15408
15409 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15410 there are no `label `yyoverflowlab' defined but not used' warnings
15411 when yyoverflow is defined.
15412
15413 2002-06-18 Akim Demaille <akim@epita.fr>
15414
15415 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15416 new member.
15417 (symbol_destructor_set): Adjust.
15418 * src/output.c (symbol_destructors_output): Output the destructor
15419 locations.
15420 Output the symbol name.
15421 * data/bison.simple (b4_symbol_destructor): Adjust.
15422
15423 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15424 and Akim Demaille <akim@epita.fr>
15425
15426 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15427 what's left on the stack when the error recovery hits EOF.
15428 * tests/actions.at (Destructors): Complete to exercise this case.
15429
15430 2002-06-17 Akim Demaille <akim@epita.fr>
15431
15432 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15433 arguments is really empty, not only equal to `[]'.
15434 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15435 member.
15436 (symbol_destructor_set): New.
15437 * src/output.c (symbol_destructors_output): New.
15438 * src/reader.h (brace_code_t, current_braced_code): New.
15439 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15440 (handle_dollar): Rename as...
15441 (handle_action_dollar): this.
15442 (handle_destructor_dollar): New.
15443 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15444 (grammar_declaration): Use it.
15445 * data/bison.simple (yystos): Is always defined.
15446 (yydestructor): New.
15447 * tests/actions.at (Destructors): New.
15448 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15449
15450 2002-06-17 Akim Demaille <akim@epita.fr>
15451
15452 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15453 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15454 rule_length only when needed.
15455 * src/output.c (actions_output, token_definitions_output): Output
15456 the full M4 block.
15457 * src/symtab.c: Don't access directly to the symbol tag, use
15458 symbol_tag_get.
15459 * src/parse-gram.y: Use symbol_list_free.
15460
15461 2002-06-17 Akim Demaille <akim@epita.fr>
15462
15463 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15464 (symbol_list_prepend, get_type_name): Move to...
15465 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15466 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15467 Adjust all callers.
15468 (symbol_list_free): New.
15469 * src/scan-gram.l (handle_dollar): Takes a location.
15470 * tests/input.at (Invalid $n): Adjust.
15471
15472 2002-06-17 Akim Demaille <akim@epita.fr>
15473
15474 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15475 (symbol_list_prepend): New.
15476 * src/parse-gram.y (%union): `list' is a new member.
15477 (symbols.1): New, replaces...
15478 (terms_to_prec.1, nterms_to_type.1): these.
15479 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15480 Take a location as additional argument.
15481 Adjust all callers.
15482
15483 2002-06-15 Akim Demaille <akim@epita.fr>
15484
15485 * src/parse-gram.y: Move %token in the declaration section so that
15486 we don't depend upon CVS Bison.
15487
15488 2002-06-15 Akim Demaille <akim@epita.fr>
15489
15490 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15491 * src/print.c (print_core): Use it.
15492
15493 2002-06-15 Akim Demaille <akim@epita.fr>
15494
15495 * src/conflicts.c (log_resolution): Accept the rule involved in
15496 the sr conflicts instead of the lookahead number that points to
15497 that rule.
15498 (flush_reduce): Accept the current lookahead vector as argument,
15499 instead of the index in LA.
15500 (resolve_sr_conflict): Accept the current number of lookahead
15501 bitset to consider for the STATE, instead of the index in LA.
15502 (set_conflicts): Adjust.
15503 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15504
15505 2002-06-15 Akim Demaille <akim@epita.fr>
15506
15507 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15508 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15509 Adjust all dependencies.
15510 * src/lalr.c (initialize_lookaheads): Split into...
15511 (states_lookaheads_count, states_lookaheads_initialize): these.
15512 (lalr): Adjust.
15513
15514 2002-06-15 Akim Demaille <akim@epita.fr>
15515
15516 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15517 out of...
15518 (grammar_rules_print): here.
15519 * src/reduce.c (reduce_output): Use it.
15520 * tests/reduce.at (Useless Rules, Reduced Automaton)
15521 (Underivable Rules): Adjust.
15522
15523 2002-06-15 Akim Demaille <akim@epita.fr>
15524
15525 Copy BYacc's nice way to report the grammar.
15526
15527 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15528 New.
15529 Don't print the rules' location, it is confusing and useless.
15530 (rule_print): Use grammar_rhs_print.
15531 * src/print.c (print_grammar): Use grammar_rules_print.
15532
15533 2002-06-15 Akim Demaille <akim@epita.fr>
15534
15535 Complete and rationalize `useless thing' warnings.
15536
15537 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15538 (symbol_tag_print): New.
15539 Use them everywhere in place of accessing directly the tag member.
15540 * src/gram.h, src/gram.c (rule_print): New.
15541 Use it where a rule used to be printed `by hand'.
15542 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15543 (reduce_grammar_tables): Report the useless rules.
15544 (reduce_print): Useless things are a warning, not an error.
15545 Report it as such.
15546 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15547 (Reduced Automaton, Underivable Rules): Adjust.
15548 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15549 * tests/conflicts.at (Unresolved SR Conflicts)
15550 (Solved SR Conflicts): Adjust.
15551
15552 2002-06-15 Akim Demaille <akim@epita.fr>
15553
15554 Let symbols have a location.
15555
15556 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15557 (getsym): Adjust.
15558 Adjust all callers.
15559 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15560 Use location_t, not int.
15561 * src/symtab.c (symbol_check_defined): Take advantage of the
15562 location.
15563 * tests/regression.at (Invalid inputs): Adjust.
15564
15565 2002-06-15 Akim Demaille <akim@epita.fr>
15566
15567 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15568 (input): Don't try to initialize yylloc here, do it in the
15569 scanner.
15570 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15571 * src/gram.h (rule_t): Change line and action_line into location
15572 and action_location, of location_t type.
15573 Adjust all dependencies.
15574 * src/location.h, src/location.c (empty_location): New.
15575 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15576 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15577 (grammar_current_rule_symbol_append)
15578 (grammar_current_rule_action_append): Expect a location as argument.
15579 * src/reader.c (grammar_midrule_action): Adjust to attach an
15580 action's location as dummy symbol location.
15581 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15582 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15583 the line numbers.
15584
15585 2002-06-14 Akim Demaille <akim@epita.fr>
15586
15587 Grammar declarations may be found in the grammar section.
15588
15589 * src/parse-gram.y (rules_or_grammar_declaration): New.
15590 (declarations): Each declaration may end with a semicolon, not
15591 just...
15592 (grammar_declaration): `"%union"'.
15593 (grammar): Branch to rules_or_grammar_declaration.
15594
15595 2002-06-14 Akim Demaille <akim@epita.fr>
15596
15597 * src/main.c (main): Invoke scanner_free.
15598
15599 2002-06-14 Akim Demaille <akim@epita.fr>
15600
15601 * src/output.c (m4_invoke): Extracted from...
15602 (output_skeleton): here.
15603 Free tempfile.
15604
15605 2002-06-14 Akim Demaille <akim@epita.fr>
15606
15607 * src/parse-gram.y (directives, directive, gram)
15608 (grammar_directives, precedence_directives, precedence_directive):
15609 Rename as...
15610 (declarations, declaration, grammar, grammar_declaration)
15611 (precedence_declaration, precedence_declarator): these.
15612 (symbol_declaration): New.
15613
15614 2002-06-14 Akim Demaille <akim@epita.fr>
15615
15616 * src/files.c (action_obstack): Remove, unused.
15617 (output_obstack): Remove it, and all its dependencies, as it is no
15618 longer needed.
15619 * src/reader.c (epilogue_set): Build the epilogue in the
15620 muscle_obstack.
15621 * src/output.h, src/output.c (muscle_obstack): Move to...
15622 * src/muscle_tab.h, src/muscle_tab.h: here.
15623 (muscle_init): Initialize muscle_obstack.
15624 (muscle_free): New.
15625 * src/main.c (main): Call it.
15626
15627 2002-06-14 Akim Demaille <akim@epita.fr>
15628
15629 * src/location.h: New, extracted from...
15630 * src/reader.h: here.
15631 * src/Makefile.am (noinst_HEADERS): Merge into
15632 (bison_SOURCES): this.
15633 Add location.h.
15634 * src/parse-gram.y: Use location_t instead of Bison's.
15635 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
15636 Use location_t instead of ints.
15637
15638 2002-06-14 Akim Demaille <akim@epita.fr>
15639
15640 * data/bison.simple, data/bison.c++: Be sure to restore the
15641 current #line when returning to the skeleton contents after having
15642 exposed the input file's #line.
15643
15644 2002-06-12 Akim Demaille <akim@epita.fr>
15645
15646 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
15647 eager.
15648 * tests/actions.at (Exotic Dollars): New.
15649
15650 2002-06-12 Akim Demaille <akim@epita.fr>
15651
15652 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
15653 ['"/] too eagerly.
15654 * tests/input.at (Torturing the Scanner): New.
15655
15656 2002-06-11 Akim Demaille <akim@epita.fr>
15657
15658 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
15659 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
15660 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
15661 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
15662 * src/reader.c (reader): Use it.
15663
15664 2002-06-11 Akim Demaille <akim@epita.fr>
15665
15666 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
15667 Adjust all callers.
15668 (scanner_last_string_free): New.
15669
15670 2002-06-11 Akim Demaille <akim@epita.fr>
15671
15672 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
15673 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
15674 (last_string, YY_OBS_FREE): New.
15675 Use them when returning an ID.
15676
15677 2002-06-11 Akim Demaille <akim@epita.fr>
15678
15679 Have Bison grammars parsed by a Bison grammar.
15680
15681 * src/reader.c, src/reader.h (prologue_augment): New.
15682 * src/reader.c (copy_definition): Remove.
15683
15684 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
15685 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
15686 (grammar_current_rule_prec_set, grammar_current_rule_check)
15687 (grammar_current_rule_symbol_append)
15688 (grammar_current_rule_action_append): Export.
15689 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
15690 (symbol_list_action_append): Remove.
15691 Hook the routines from reader.
15692 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
15693 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
15694
15695 * src/reader.c (read_declarations): Remove, unused.
15696
15697 * src/parse-gram.y: Handle the epilogue.
15698 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
15699 (grammar_start_symbol_set): this.
15700 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
15701 * src/reader.c (readgram): Remove, unused.
15702 (reader): Adjust to insert eoftoken and axiom where appropriate.
15703
15704 * src/reader.c (copy_dollar): Replace with...
15705 * src/scan-gram.h (handle_dollar): this.
15706 * src/parse-gram.y: Remove `%thong'.
15707
15708 * src/reader.c (copy_at): Replace with...
15709 * src/scan-gram.h (handle_at): this.
15710
15711 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
15712 New.
15713
15714 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
15715 time being.
15716
15717 * src/reader.h, src/reader.c (grammar_rule_end): New.
15718
15719 * src/parse.y (current_type, current_class): New.
15720 Implement `%nterm', `%token' support.
15721 Merge `%term' into `%token'.
15722 (string_as_id): New.
15723 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
15724 type name.
15725
15726 * src/parse-gram.y: Be sure to handle properly the beginning of
15727 rules.
15728
15729 * src/parse-gram.y: Handle %type.
15730 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
15731
15732 * src/parse-gram.y: More directives support.
15733 * src/options.c: No longer handle source directives.
15734
15735 * src/parse-gram.y: Fix %output.
15736
15737 * src/parse-gram.y: Handle %union.
15738 Use the prologue locations.
15739 * src/reader.c (parse_union_decl): Remove.
15740
15741 * src/reader.h, src/reader.c (epilogue_set): New.
15742 * src/parse-gram.y: Use it.
15743
15744 * data/bison.simple, data/bison.c++: b4_stype is now either not
15745 defined, then default to int, or to the contents of %union,
15746 without `union' itself.
15747 Adjust.
15748 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
15749
15750 * src/output.c (actions_output): Don't output braces, as they are
15751 already handled by the scanner.
15752
15753 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
15754 characters to themselves.
15755
15756 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
15757 that the epilogue has a proper #line.
15758
15759 * src/parse-gram.y: Handle precedence/associativity.
15760
15761 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
15762 a terminal.
15763 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
15764 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
15765 at all to define terminals that cannot be emitted.
15766
15767 * src/scan-gram.l: Escape M4 characters.
15768
15769 * src/scan-gram.l: Working properly with escapes in user
15770 strings/characters.
15771
15772 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
15773 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
15774 grammar.
15775 Use more modest sizes, as for the time being the parser does not
15776 release memory, and therefore the process swallows a huge amount
15777 of memory.
15778
15779 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
15780 stricter %token grammar.
15781
15782 * src/symtab.h (associativity): Add `undef_assoc'.
15783 (symbol_precedence_set): Do nothing when passed an undef_assoc.
15784 * src/symtab.c (symbol_check_alias_consistence): Adjust.
15785
15786 * tests/regression.at (Invalid %directive): Remove, as it is now
15787 meaningless.
15788 (Invalid inputs): Adjust to the new error messages.
15789 (Token definitions): The new grammar doesn't allow too many
15790 eccentricities.
15791
15792 * src/lex.h, src/lex.c: Remove.
15793 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
15794 (copy_character, copy_string2, copy_string, copy_identifier)
15795 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
15796 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
15797 (parse_action): Remove.
15798 * po/POTFILES.in: Adjust.
15799
15800 2002-06-11 Akim Demaille <akim@epita.fr>
15801
15802 * src/reader.c (parse_action): Don't store directly into the
15803 rule's action member: return the action as a string.
15804 Don't require `rule_length' as an argument: compute it.
15805 (grammar_current_rule_symbol_append)
15806 (grammar_current_rule_action_append): New, eved out from
15807 (readgram): here.
15808 Remove `action_flag', `rulelength', unused now.
15809
15810 2002-06-11 Akim Demaille <akim@epita.fr>
15811
15812 * src/reader.c (grammar_current_rule_prec_set).
15813 (grammar_current_rule_check): New, eved out from...
15814 (readgram): here.
15815 Remove `xaction', `first_rhs': useless.
15816 * tests/input.at (Type clashes): New.
15817 * tests/existing.at (GNU Cim Grammar): Adjust.
15818
15819 2002-06-11 Akim Demaille <akim@epita.fr>
15820
15821 * src/reader.c (grammar_midrule_action): New, Eved out from
15822 (readgram): here.
15823
15824 2002-06-11 Akim Demaille <akim@epita.fr>
15825
15826 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
15827 New.
15828 (readgram): Use them as replacement of inlined code, crule and
15829 crule1.
15830
15831 2002-06-11 Akim Demaille <akim@epita.fr>
15832
15833 * src/reader.c (grammar_end, grammar_symbol_append): New.
15834 (readgram): Use them.
15835 Make the use of `p' as local as possible.
15836
15837 2002-06-10 Akim Demaille <akim@epita.fr>
15838
15839 GCJ's parser requires the tokens to be defined before the prologue.
15840
15841 * data/bison.simple: Output the token definition before the user's
15842 prologue.
15843 * tests/regression.at (Braces parsing, Duplicate string)
15844 (Mixing %token styles): Check the output from bison.
15845 (Early token definitions): New.
15846
15847 2002-06-10 Akim Demaille <akim@epita.fr>
15848
15849 * src/symtab.c (symbol_user_token_number_set): Don't complain when
15850 assigning twice the same user number to a token, so that we can
15851 use it in...
15852 * src/lex.c (lex): here.
15853 Also use `symbol_class_set' instead of hand written code.
15854 * src/reader.c (parse_assoc_decl): Likewise.
15855
15856 2002-06-10 Akim Demaille <akim@epita.fr>
15857
15858 * src/symtab.c, src/symtab.c (symbol_class_set)
15859 (symbol_user_token_number_set): New.
15860 * src/reader.c (parse_token_decl): Use them.
15861 Use a switch instead of ifs.
15862 Use a single argument.
15863
15864 2002-06-10 Akim Demaille <akim@epita.fr>
15865
15866 Remove `%thong' support as it is undocumented, unused, duplicates
15867 `%token's job, and creates useless e-mail traffic with people who
15868 want to know what it is, why it is undocumented, unused, and
15869 duplicates `%token's job.
15870
15871 * src/reader.c (parse_thong_decl): Remove.
15872 * src/options.c (option_table): Remove "thong".
15873 * src/lex.h (tok_thong): Remove.
15874
15875 2002-06-10 Akim Demaille <akim@epita.fr>
15876
15877 * src/symtab.c, src/symtab.c (symbol_type_set)
15878 (symbol_precedence_set): New.
15879 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
15880 (value_components_used): Remove, unused.
15881
15882 2002-06-09 Akim Demaille <akim@epita.fr>
15883
15884 Move symbols handling code out of the reader.
15885
15886 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
15887 (axiom): Move to...
15888 * src/symtab.h, src/symtab.c: here.
15889
15890 * src/gram.c (start_symbol): Remove: use startsymbol->number.
15891 * src/reader.c (startval): Rename as...
15892 * src/symtab.h, src/symtab.c (startsymbol): this.
15893 * src/reader.c: Adjust.
15894
15895 * src/reader.c (symbol_check_defined, symbol_make_alias)
15896 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15897 (token_translations_init)
15898 Move to...
15899 * src/symtab.c: here.
15900 * src/reader.c (packsymbols): Move to...
15901 * src/symtab.h, src/symtab.c (symbols_pack): here.
15902 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
15903 argument.
15904
15905 2002-06-03 Akim Demaille <akim@epita.fr>
15906
15907 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
15908 then statements.
15909
15910 2002-06-03 Akim Demaille <akim@epita.fr>
15911
15912 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
15913 structs with non literals.
15914 * src/scan-skel.l: never-interactive.
15915 * src/conflicts.c (enum conflict_resolution_e): No trailing
15916 comma.
15917 * src/getargs.c (usage): Split long literal strings.
15918 Reported by Hans Aberg.
15919
15920 2002-05-28 Akim Demaille <akim@epita.fr>
15921
15922 * data/bison.c++: Use C++ ostreams.
15923 (cdebug_): New member.
15924
15925 2002-05-28 Akim Demaille <akim@epita.fr>
15926
15927 * src/output.c (output_skeleton): Be sure to allocate enough room
15928 for `/' _and_ for `\0' in full_skeleton.
15929
15930 2002-05-28 Akim Demaille <akim@epita.fr>
15931
15932 * data/bison.c++: Catch up with bison.simple:
15933 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15934 and Paul Eggert <eggert@twinsun.com>: `error' handing.
15935 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
15936 and popping traces.
15937
15938 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15939
15940 * src/output.c (output_skeleton): Put an explicit path in front of
15941 the skeleton file name, rather than relying on the -I directory,
15942 to partially alleviate effects of having a skeleton file lying around
15943 in the current directory.
15944
15945 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15946
15947 * src/conflicts.c (log_resolution): Correct typo:
15948 obstack_printf should be obstack_fgrow1.
15949
15950 2002-05-26 Akim Demaille <akim@epita.fr>
15951
15952 * src/state.h (state_t): `solved_conflicts' is a new member.
15953 * src/LR0.c (new_state): Set it to 0.
15954 * src/conflicts.h, src/conflicts.c (print_conflicts)
15955 (free_conflicts, solve_conflicts): Rename as...
15956 (conflicts_print, conflicts_free, conflicts_solve): these.
15957 Adjust callers.
15958 * src/conflicts.c (enum conflict_resolution_e)
15959 (solved_conflicts_obstack): New, used by...
15960 (log_resolution): this.
15961 Adjust to attach the conflict resolution to each state.
15962 Complete the description with the precedence/associativity
15963 information.
15964 (resolve_sr_conflict): Adjust.
15965 * src/print.c (print_state): Output its solved_conflicts.
15966 * tests/conflicts.at (Unresolved SR Conflicts)
15967 (Solved SR Conflicts): Exercise --report=all.
15968
15969 2002-05-26 Akim Demaille <akim@epita.fr>
15970
15971 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15972 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15973 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
15974 (token_number_t, item_number_as_token_number)
15975 (token_number_as_item_number, muscle_insert_token_number_table):
15976 Rename as...
15977 (symbol_number_t, item_number_as_symbol_number)
15978 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
15979 these, since it is more appropriate.
15980
15981 2002-05-26 Akim Demaille <akim@epita.fr>
15982
15983 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
15984 `Error:' lines.
15985 * data/bison.simple (yystos) [YYDEBUG]: New.
15986 (yyparse) [YYDEBUG]: Display the symbols which are popped during
15987 error recovery.
15988 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
15989
15990 2002-05-25 Akim Demaille <akim@epita.fr>
15991
15992 * doc/bison.texinfo (Debugging): Split into...
15993 (Tracing): this new section, its former contents, and...
15994 (Understanding): this new section.
15995 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
15996 by...
15997 (report_flag): this.
15998 Adjust all dependencies.
15999 (report_args, report_types, report_argmatch): New.
16000 (usage, getargs): Report/support -r, --report.
16001 * src/options.h
16002 (struct option_table_struct): Rename as..,
16003 (struct option_table_s): this.
16004 Rename the `set_flag' member to `flag' to match with getopt_long's
16005 struct.
16006 * src/options.c (option_table): Split verbose into an entry for
16007 %verbose, and another for --verbose.
16008 Support --report/-r, so remove -r from the obsolete --raw.
16009 * src/print.c: Attach full item sets and lookaheads reports to
16010 report_flag instead of trace_flag.
16011 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16012
16013 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16014 and Paul Eggert <eggert@twinsun.com>
16015
16016 * data/bison.simple (yyparse): Correct error handling to conform to
16017 POSIX and yacc. Specifically, after syntax error is discovered,
16018 do not reduce further before shifting the error token.
16019 Clean up the code a bit by removing the labels yyerrdefault,
16020 yyerrhandle, yyerrpop.
16021 * NEWS: Document the above.
16022
16023 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16024
16025 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16026 type; it isn't always big enough, since it doesn't necessarily
16027 include non-terminals.
16028 (yytranslate): Expand definition of yy_token_number_type, so that
16029 the latter can be removed.
16030 (yy_token_number_type): Remove, only one use.
16031 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16032 don't use TokenNumberType as element type.
16033
16034 * tests/regression.at: Modify expected output to agree with change
16035 to yyr1 and yytranslate.
16036
16037 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16038
16039 * src/reader.c (parse_action): Use copy_character instead of
16040 obstack_1grow.
16041
16042 2002-05-13 Akim Demaille <akim@epita.fr>
16043
16044 * tests/regression.at (Token definitions): Prototype yylex and
16045 yyerror.
16046
16047 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16048
16049 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16050 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16051 32-bit arithmetic.
16052 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16053
16054 2002-05-07 Akim Demaille <akim@epita.fr>
16055
16056 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16057 avoid GCC warnings.
16058
16059 2002-05-07 Akim Demaille <akim@epita.fr>
16060
16061 Kill GCC warnings.
16062
16063 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16064 over the RHS of each rule.
16065 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16066 * src/state.h (state_t): Member `nitems' is unsigned short.
16067 * src/LR0.c (get_state): Adjust.
16068 * src/reader.c (packgram): Likewise.
16069 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16070 `Type'.
16071 (muscle_insert_int_table): Remove, unused.
16072 (prepare_rules): Remove `max'.
16073
16074 2002-05-06 Akim Demaille <akim@epita.fr>
16075
16076 * src/closure.c (print_firsts): Display of the symbol tags.
16077 (bitmatrix_print): Move to...
16078 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16079 here.
16080 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16081
16082 2002-05-06 Akim Demaille <akim@epita.fr>
16083
16084 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16085 hash_do_for_each.
16086
16087 2002-05-06 Akim Demaille <akim@epita.fr>
16088
16089 * src/LR0.c (new_state, get_state): Instead of using the global
16090 `kernel_size' and `kernel_base', have two new arguments:
16091 `core_size' and `core'.
16092 Adjust callers.
16093
16094 2002-05-06 Akim Demaille <akim@epita.fr>
16095
16096 * src/reader.c (packgram): No longer end `ritem' with a 0
16097 sentinel: it is not used.
16098
16099 2002-05-05 Akim Demaille <akim@epita.fr>
16100
16101 New experimental feature: display the lookaheads in the report and
16102 graph.
16103
16104 * src/print (print_core): When --trace-flag, display the rules
16105 lookaheads.
16106 * src/print_graph.c (print_core): Likewise.
16107 Swap the arguments.
16108 Adjust caller.
16109
16110 2002-05-05 Akim Demaille <akim@epita.fr>
16111
16112 * tests/torture.at (Many lookaheads): New test.
16113
16114 2002-05-05 Akim Demaille <akim@epita.fr>
16115
16116 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16117 (GENERATE_MUSCLE_INSERT_TABLE): this.
16118 (output_int_table, output_unsigned_int_table, output_short_table)
16119 (output_token_number_table, output_item_number_table): Replace with...
16120 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16121 (muscle_insert_short_table, muscle_insert_token_number_table)
16122 (muscle_insert_item_number_table): these.
16123 Adjust all callers.
16124 (prepare_tokens): Don't free `translations', since...
16125 * src/reader.h, src/reader.c (grammar_free): do it.
16126 Move to...
16127 * src/gram.h, src/gram.c (grammar_free): here.
16128 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16129 b4_translate_max.
16130
16131 2002-05-05 Akim Demaille <akim@epita.fr>
16132
16133 * src/output.c (output_unsigned_int_table): New.
16134 (prepare_rules): `i' is unsigned.
16135 `prhs', `rline', `r2' are unsigned int.
16136 Rename muscle `rhs_number_max' as `rhs_max'.
16137 Output muscles `prhs_max', `rline_max', and `r2_max'.
16138 Free rline and r1.
16139 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16140 to compute types instead of constant types.
16141 * tests/regression.at (Web2c Actions): Adjust.
16142
16143 2002-05-04 Akim Demaille <akim@epita.fr>
16144
16145 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16146 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16147 Adjust dependencies.
16148 * src/output.c (token_definitions_output): Be sure not to output a
16149 `#define 'a'' when fed with `%token 'a' "a"'.
16150 * tests/regression.at (Token definitions): New.
16151
16152 2002-05-03 Paul Eggert <eggert@twinsun.com>
16153
16154 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16155 for K&R C.
16156
16157 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16158
16159 * Makefile.am (SUBDIRS): Remove intl.
16160 (EXTRA_DIST): Add config/config.rpath.
16161
16162 2002-05-03 Akim Demaille <akim@epita.fr>
16163
16164 * data/bison.simple (m4_if): Don't output empty enums.
16165 And actually, output valid enum definitions :(.
16166
16167 2002-05-03 Akim Demaille <akim@epita.fr>
16168
16169 * configure.bat: Remove, completely obsolete.
16170 * Makefile.am (EXTRA_DIST): Adjust.
16171 Don't distribute config.rpath...
16172 * config/Makefile.am (EXTRA_DIST): Do it.
16173
16174 2002-05-03 Akim Demaille <akim@epita.fr>
16175
16176 * configure.in (GETTEXT_VERSION): New.
16177 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16178
16179 2002-05-03 Akim Demaille <akim@epita.fr>
16180
16181 * data/bison.simple (b4_token_enum): New.
16182 (b4_token_defines): Use it to output tokens both as #define and
16183 enums.
16184 Suggested by Paul Eggert.
16185 * src/output.c (token_definitions_output): Don't output spurious
16186 white spaces.
16187
16188 2002-05-03 Akim Demaille <akim@epita.fr>
16189
16190 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16191
16192 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16193
16194 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16195 Update the stack class, give a try to deque as the default container.
16196
16197 2002-05-02 Akim Demaille <akim@epita.fr>
16198
16199 * data/bison.simple (yyparse): Do not implement @$ = @1.
16200 (YYLLOC_DEFAULT): Adjust to do it.
16201 * doc/bison.texinfo (Location Default Action): Fix.
16202
16203 2002-05-02 Akim Demaille <akim@epita.fr>
16204
16205 * src/reader.c (parse_braces): Merge into...
16206 (parse_action): this.
16207
16208 2002-05-02 Akim Demaille <akim@epita.fr>
16209
16210 * configure.in (ALL_LINGUAS): Remove.
16211 * po/LINGUAS, hr.po: New.
16212
16213 2002-05-02 Akim Demaille <akim@epita.fr>
16214
16215 Remove the so called hairy (semantic) parsers.
16216
16217 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16218 * src/gram.h, src/gram.c (semantic_parser): Remove.
16219 (rule_t): Remove the guard and guard_line members.
16220 * src/lex.h (token_t): remove tok_guard.
16221 * src/options.c (option_table): Remove %guard and %semantic_parser
16222 support.
16223 * src/output.c, src/output.h (guards_output): Remove.
16224 (prepare): Adjust.
16225 (token_definitions_output): Don't output the `T'
16226 tokens (???).
16227 (output_skeleton): Don't output the guards.
16228 * src/files.c, src/files.c (attrsfile): Remove.
16229 * src/reader.c (symbol_list): Remove the guard and guard_line
16230 members.
16231 Adjust dependencies.
16232 (parse_guard): Remove.
16233 * data/bison.hairy: Remove.
16234 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16235 BISON_HAIRY.
16236
16237 2002-05-02 Akim Demaille <akim@epita.fr>
16238
16239 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16240 (parse_guard): Rename the formal argument `stack_offset' as
16241 `rule_length', which is more readable.
16242 Adjust callers.
16243 (copy_at, copy_dollar): Instead of outputting the hard coded
16244 values of $$, $n and so forth, output invocation to b4_lhs_value,
16245 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16246 Note: this patch partially drops `semantic-parser' support: it
16247 always does `rule_length - n', where semantic parsers ought to
16248 always use `-n'.
16249 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16250 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16251
16252 2002-05-02 Akim Demaille <akim@epita.fr>
16253
16254 * configure.in (AC_INIT): Bump to 1.49b.
16255 (AM_INIT_AUTOMAKE): Short invocation.
16256
16257 2002-05-02 Akim Demaille <akim@epita.fr>
16258
16259 Version 1.49a.
16260
16261 2002-05-01 Akim Demaille <akim@epita.fr>
16262
16263 * src/skeleton.h: Remove.
16264
16265 2002-05-01 Akim Demaille <akim@epita.fr>
16266
16267 * src/skeleton.h: Fix the #endif.
16268 Reported by Magnus Fromreide.
16269
16270 2002-04-26 Paul Eggert <eggert@twinsun.com>
16271
16272 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16273 Define if we define YYSTYPE and YYLTYPE, respectively.
16274 (YYCOPY): Fix [] quoting problem in the non-GCC case.
16275
16276 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
16277
16278 * src/scan-skel.l: Postprocess quadrigraphs.
16279
16280 * src/reader.c (copy_character): New function, used to output
16281 single characters while replacing `[' and `]' with quadrigraphs, to
16282 avoid troubles with M4 quotes.
16283 (copy_comment): Output characters with copy_character.
16284 (read_additionnal_code): Likewise.
16285 (copy_string2): Likewise.
16286 (copy_definition): Likewise.
16287
16288 * tests/calc.at: Exercise M4 quoting.
16289
16290 2002-04-25 Akim Demaille <akim@epita.fr>
16291
16292 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16293 between `!' and the command.
16294 Reported by Paul Eggert.
16295
16296 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
16297
16298 * tests/calc.at: Exercise prologue splitting.
16299
16300 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16301 `b4_post_prologue' instead of `b4_prologue'.
16302
16303 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16304 muscles.
16305 (output): Free pre_prologue_obstack and post_prologue_obstack.
16306 * src/files.h, src/files.c (attrs_obstack): Remove.
16307 (pre_prologue_obstack, post_prologue_obstack): New.
16308 * src/reader.c (copy_definition): Add a parameter to specify the
16309 obstack to fill, instead of using attrs_obstack unconditionally.
16310 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16311 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16312
16313 2002-04-23 Paul Eggert <eggert@twinsun.com>
16314
16315 * data/bison.simple: Remove unnecessary commentary and white
16316 space differences from 1_29-branch.
16317 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16318
16319 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16320 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16321 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16322 constructors or destructors.
16323
16324 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16325
16326 2002-04-23 Akim Demaille <akim@epita.fr>
16327
16328 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16329 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16330 location with columns.
16331 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16332 All reported by Paul Eggert.
16333
16334 2002-04-22 Akim Demaille <akim@epita.fr>
16335
16336 * src/reduce.c (dump_grammar): Move to...
16337 * src/gram.h, src/gram.c (grammar_dump): here.
16338 Be sure to separate long item numbers.
16339 Don't read the members of a rule's prec if its nil.
16340
16341 2002-04-22 Akim Demaille <akim@epita.fr>
16342
16343 * src/output.c (table_size, table_grow): New.
16344 (MAXTABLE): Remove, replace uses with table_size.
16345 (pack_vector): Instead of dying when the table is too big, grow it.
16346
16347 2002-04-22 Akim Demaille <akim@epita.fr>
16348
16349 * data/bison.simple (yyr1): Its type is that of a token number.
16350 * data/bison.c++ (r1_): Likewise.
16351 * tests/regression.at (Web2c Actions): Adjust.
16352
16353 2002-04-22 Akim Demaille <akim@epita.fr>
16354
16355 * src/reader.c (token_translations_init): 256 is now the default
16356 value for the error token, i.e., it will be assigned another
16357 number if the user assigned 256 to one of her tokens.
16358 (reader): Don't force 256 to error.
16359 * doc/bison.texinfo (Symbols): Adjust.
16360 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16361 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16362 etc. instead of 10, 20, 30 (which was used to `jump' over error
16363 (256) and undefined (2)).
16364
16365 2002-04-22 Akim Demaille <akim@epita.fr>
16366
16367 Propagate more token_number_t.
16368
16369 * src/gram.h (token_number_as_item_number)
16370 (item_number_as_token_number): New.
16371 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16372 Use it to create output_item_number_table and
16373 output_token_number_table.
16374 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16375 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16376 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16377 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16378
16379 2002-04-22 Akim Demaille <akim@epita.fr>
16380
16381 * src/output.h, src/output.c (get_lines_number): Remove.
16382
16383 2002-04-19 Akim Demaille <akim@epita.fr>
16384
16385 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16386 as Lex/Flex'.
16387 (Debugging): More details about enabling the debugging features.
16388 (Table of Symbols): Describe $$, $n, @$, and @n.
16389 Suggested by Tim Josling.
16390
16391 2002-04-19 Akim Demaille <akim@epita.fr>
16392
16393 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16394
16395 2002-04-10 Akim Demaille <akim@epita.fr>
16396
16397 * src/system.h: Rely on HAVE_LIMITS_H.
16398 Suggested by Paul Eggert.
16399
16400 2002-04-09 Akim Demaille <akim@epita.fr>
16401
16402 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16403 full stderr, and strip it according to the bison options, instead
16404 of composing the error message from different bits.
16405 This makes it easier to check for several error messages.
16406 Adjust all the invocations.
16407 Add an invocation exercising the error token.
16408 Add an invocation demonstrating a stupid error message.
16409 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16410 Adjust the tests.
16411 Error message are for stderr, not stdout.
16412
16413 2002-04-09 Akim Demaille <akim@epita.fr>
16414
16415 * src/gram.h, src/gram.c (error_token_number): Remove, use
16416 errtoken->number.
16417 * src/reader.c (reader): Don't specify the user token number (2)
16418 for $undefined, as it uselessly prevents using it.
16419 * src/gram.h (token_number_t): Move to...
16420 * src/symtab.h: here.
16421 (state_t.number): Is a token_number_t.
16422 * src/print.c, src/reader.c: Use undeftoken->number instead of
16423 hard coded 2.
16424 (Even though this 2 is not the same as above: the number of the
16425 undeftoken remains being 2, it is its user token number which
16426 might not be 2).
16427 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16428 `user_token_number_max'.
16429 Output `undef_token_number'.
16430 * data/bison.simple, data/bison.c++: Use them.
16431 Be sure to map invalid yylex return values to
16432 `undef_token_number'. This saves us from gratuitous SEGV.
16433
16434 * tests/conflicts.at (Solved SR Conflicts)
16435 (Unresolved SR Conflicts): Adjust.
16436 * tests/regression.at (Web2c Actions): Adjust.
16437
16438 2002-04-08 Akim Demaille <akim@epita.fr>
16439
16440 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16441 Adding #line.
16442 Remove the duplicate `typedefs'.
16443 (RhsNumberType): Fix the declaration and various other typos.
16444 Use __ofile__.
16445 * data/bison.simple: Use __ofile__.
16446 * src/scan-skel.l: Handle __ofile__.
16447
16448 2002-04-08 Akim Demaille <akim@epita.fr>
16449
16450 * src/gram.h (item_number_t): New, the type of item numbers in
16451 RITEM. Note that it must be able to code symbol numbers as
16452 positive number, and the negation of rule numbers as negative
16453 numbers.
16454 Adjust all dependencies (pretty many).
16455 * src/reduce.c (rule): Remove this `short *' pointer: use
16456 item_number_t.
16457 * src/system.h (MINSHORT, MAXSHORT): Remove.
16458 Include `limits.h'.
16459 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16460 (shortcpy): Remove.
16461 (MAXTABLE): Move to...
16462 * src/output.c (MAXTABLE): here.
16463 (prepare_rules): Use output_int_table to output rhs.
16464 * data/bison.simple, data/bison.c++: Adjust.
16465 * tests/torture.at (Big triangle): Move the limit from 254 to
16466 500.
16467 * tests/regression.at (Web2c Actions): Ajust.
16468
16469 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16470 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16471 passes, but produces negative #line number, once fixed, GCC is
16472 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16473 C), it passes.
16474 * src/state.h (state_h): Code input lines on ints, not shorts.
16475
16476 2002-04-08 Akim Demaille <akim@epita.fr>
16477
16478 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16479 and then the grammar.
16480
16481 2002-04-08 Akim Demaille <akim@epita.fr>
16482
16483 * src/system.h: No longer using strndup.
16484
16485 2002-04-07 Akim Demaille <akim@epita.fr>
16486
16487 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16488 * src/output.c (output_table_data): Return the longest number.
16489 (prepare_tokens): Output `token_number_max').
16490 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16491 New.
16492 Use them to define yy_token_number_type/TokenNumberType.
16493 Use this type for yytranslate.
16494 * tests/torture.at (Big triangle): Push the limit from 124 to
16495 253.
16496 * tests/regression.at (Web2c Actions): Adjust.
16497
16498 2002-04-07 Akim Demaille <akim@epita.fr>
16499
16500 * tests/torture.at (Big triangle): New.
16501 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16502 * tests/existing.at: here.
16503
16504 2002-04-07 Akim Demaille <akim@epita.fr>
16505
16506 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16507 nritems.
16508 Adjust dependencies.
16509
16510 2002-04-07 Akim Demaille <akim@epita.fr>
16511
16512 * src/reader.c: Normalize increments to prefix form.
16513
16514 2002-04-07 Akim Demaille <akim@epita.fr>
16515
16516 * src/reader.c, symtab.c: Remove debugging code.
16517
16518 2002-04-07 Akim Demaille <akim@epita.fr>
16519
16520 Rename all the `bucket's as `symbol_t'.
16521
16522 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16523 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16524 * src/symtab.c, src/symtab.h (bucket): Rename as...
16525 (symbol_t): this.
16526 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16527 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16528 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16529 (buckets_new, buckets_free, buckets_do): Rename as...
16530 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16531 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16532 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16533 (symbols_new, symbols_free, symbols_do): these.
16534
16535 2002-04-07 Akim Demaille <akim@epita.fr>
16536
16537 Use lib/hash for the symbol table.
16538
16539 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16540 EOF.
16541 * src/lex.c (lex): Set the `number' member of new terminals.
16542 * src/reader.c (bucket_check_defined, bucket_make_alias)
16543 (bucket_check_alias_consistence, bucket_translation): New.
16544 (reader, grammar_free, readgram, token_translations_init)
16545 (packsymbols): Adjust.
16546 (reader): Number the predefined tokens.
16547 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16548 for predefined tokens.
16549 * src/symtab.h (bucket): Remove all the hash table related
16550 members.
16551 * src/symtab.c (symtab): Replace by...
16552 (bucket_table): this.
16553 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16554 (buckets_new, buckets_do): New.
16555
16556 2002-04-07 Akim Demaille <akim@epita.fr>
16557
16558 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16559 (start_symbol, max_user_token_number, semantic_parser)
16560 (error_token_number): Initialize.
16561 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16562 Initialize.
16563 (reader): Don't.
16564 (errtoken, eoftoken, undeftoken, axiom): Extern.
16565
16566 2002-04-07 Akim Demaille <akim@epita.fr>
16567
16568 * src/gram.h (rule_s): prec and precsym are now pointers
16569 to the bucket giving the priority/associativity.
16570 Member `associativity' removed: useless.
16571 * src/reduce.c, src/conflicts.c: Adjust.
16572
16573 2002-04-07 Akim Demaille <akim@epita.fr>
16574
16575 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16576 Properly escape the symbols' TAG when outputting them.
16577
16578 2002-04-07 Akim Demaille <akim@epita.fr>
16579
16580 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16581
16582 2002-04-07 Akim Demaille <akim@epita.fr>
16583
16584 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16585 (LArule): this, which is an array to rule_t*.
16586 * src/print.c, src/conflicts.c: Adjust.
16587
16588 2002-04-07 Akim Demaille <akim@epita.fr>
16589
16590 * src/gram.h (rule_t): Rename `number' as `user_number'.
16591 `number' is a new member.
16592 Adjust dependencies.
16593 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16594
16595 2002-04-07 Akim Demaille <akim@epita.fr>
16596
16597 As a result of the previous patch, it is no longer needed
16598 to reorder ritem itself.
16599
16600 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
16601
16602 2002-04-07 Akim Demaille <akim@epita.fr>
16603
16604 Be sure never to walk through RITEMS, but use only data related to
16605 the rules themselves. RITEMS should be banished.
16606
16607 * src/output.c (output_token_translations): Rename as...
16608 (prepare_tokens): this.
16609 In addition to `translate', prepare the muscles `tname' and
16610 `toknum', which were handled by...
16611 (output_rule_data): this.
16612 Remove, and move the remainder of its outputs into...
16613 (prepare_rules): this new routines, which also merges content from
16614 (output_gram): this.
16615 (prepare_rules): Be sure never to walk through RITEMS.
16616 (output_stos): Rename as...
16617 (prepare_stos): this.
16618 (output): Always invoke prepare_states, after all, just don't use it
16619 in the output if you don't need it.
16620
16621 2002-04-07 Akim Demaille <akim@epita.fr>
16622
16623 * src/LR0.c (new_state): Display `nstates' as the name of the
16624 newly created state.
16625 Adjust to initialize first_state and last_state if needed.
16626 Be sure to distinguish the initial from the final state.
16627 (new_states): Create the itemset of the initial state, and use
16628 new_state.
16629 * src/closure.c (closure): Now that the initial state has its
16630 items properly set, there is no need for a special case when
16631 creating `ruleset'.
16632
16633 As a result, now the rule 0, reducing to $axiom, is visible in the
16634 outputs. Adjust the test suite.
16635
16636 * tests/conflicts.at (Solved SR Conflicts)
16637 (Unresolved SR Conflicts): Adjust.
16638 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
16639 * tests/conflicts.at (S/R in initial): New.
16640
16641 2002-04-07 Akim Demaille <akim@epita.fr>
16642
16643 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
16644 the RHS of the rules.
16645 * src/output.c (output_gram): Likewise.
16646
16647 2002-04-07 Akim Demaille <akim@epita.fr>
16648
16649 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
16650 bucket.
16651 Adjust all dependencies.
16652 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
16653 `number' of the buckets too.
16654 * src/gram.h: Include `symtab.h'.
16655 (associativity): Move to...
16656 * src/symtab.h: here.
16657 No longer include `gram.h'.
16658
16659 2002-04-07 Akim Demaille <akim@epita.fr>
16660
16661 * src/gram.h, src/gram.c (rules_rhs_length): New.
16662 (ritem_longest_rhs): Use it.
16663 * src/gram.h (rule_t): `number' is a new member.
16664 * src/reader.c (packgram): Set it.
16665 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
16666 the end of `rules', and count them out of `nrules'.
16667 (reduce_output, dump_grammar): Adjust.
16668 * src/print.c (print_grammar): It is no longer needed to check for
16669 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
16670 * tests/reduce.at (Reduced Automaton): New test.
16671
16672 2002-04-07 Akim Demaille <akim@epita.fr>
16673
16674 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
16675 lacking `+ 1' to nrules, Bison reported as useless a token if it
16676 was used solely to set the precedence of the last rule...
16677
16678 2002-04-07 Akim Demaille <akim@epita.fr>
16679
16680 * data/bison.c++, data/bison.simple: Don't output the current file
16681 name in #line, to avoid useless diffs between two identical
16682 outputs under different names.
16683
16684 2002-04-07 Akim Demaille <akim@epita.fr>
16685
16686 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
16687 Normalize loops to using `< nrules + 1', not `<= nrules'.
16688
16689 2002-04-07 Akim Demaille <akim@epita.fr>
16690
16691 * TODO: Update.
16692
16693 2002-04-07 Akim Demaille <akim@epita.fr>
16694
16695 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
16696 bucket.value as bucket.number.
16697
16698 2002-04-07 Akim Demaille <akim@epita.fr>
16699
16700 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
16701 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16702 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
16703 RHS, instead of being an index in RITEMS.
16704
16705 2002-04-04 Paul Eggert <eggert@twinsun.com>
16706
16707 * doc/bison.texinfo: Update copyright date.
16708 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
16709 (Symbols): Warn about running Bison in one character set,
16710 but compiling and/or running in an incompatible one.
16711 Warn about character code 256, too.
16712
16713 2002-04-03 Paul Eggert <eggert@twinsun.com>
16714
16715 * src/bison.data (YYSTACK_ALLOC): Depend on whether
16716 YYERROR_VERBOSE is nonzero, not whether it is defined.
16717
16718 Merge changes from bison-1_29-branch.
16719
16720 2002-03-20 Paul Eggert <eggert@twinsun.com>
16721
16722 Merge fixes from Debian bison_1.34-1.diff.
16723
16724 * configure.in (AC_PREREQ): 2.53.
16725
16726 2002-03-20 Akim Demaille <akim@epita.fr>
16727
16728 * src/conflicts.c (log_resolution): Argument `resolution' is const.
16729
16730 2002-03-19 Paul Eggert <eggert@twinsun.com>
16731
16732 * src/bison.simple (YYCOPY): New macro.
16733 (YYSTACK_RELOCATE): Use it.
16734 Remove Type arg; no longer needed. All callers changed.
16735 (yymemcpy): Remove; no longer needed.
16736
16737 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
16738 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16739
16740 2002-03-19 Akim Demaille <akim@epita.fr>
16741
16742 Test and fix the #line outputs.
16743
16744 * tests/atlocal.at (GCC): New.
16745 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
16746 (Prologue synch line, %union synch line, Postprologue synch line)
16747 (Action synch line, Epilogue synch line): New tests.
16748 * src/reader.c (parse_union_decl): Define the muscle stype_line.
16749 * data/bison.simple, data/bison.c++: Use it.
16750
16751 2002-03-19 Akim Demaille <akim@epita.fr>
16752
16753 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
16754 (Solved SR Conflicts, %expect not enough, %expect right)
16755 (%expect too much): Move to...
16756 * tests/conflicts.at: this new file.
16757
16758 2002-03-19 Akim Demaille <akim@epita.fr>
16759
16760 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16761 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
16762 that we can move to enums for instance.
16763 * src/output.c (token_definitions_output): Output a list of
16764 `token-name, token-number' instead of the #define.
16765 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
16766
16767 2002-03-14 Akim Demaille <akim@epita.fr>
16768
16769 Use Gettext 0.11.1.
16770
16771 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
16772
16773 * data/bison.c++: Make the user able to add members to the generated
16774 parser by subclassing.
16775
16776 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
16777
16778 * src/reader.c (read_additionnal_code): `c' should be an integer, not
16779 a character.
16780 Reported by Nicolas Tisserand and Nicolas Burrus.
16781
16782 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16783
16784 * src/reader.c: Warn about lacking semi-colons, do not complain.
16785
16786 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16787
16788 * data/bison.c++: Remove a debug line.
16789
16790 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16791
16792 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
16793 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
16794 provide a default implementation.
16795
16796 2002-03-04 Akim Demaille <akim@epita.fr>
16797
16798 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
16799 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
16800 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
16801 * tests/semantic.at (Parsing Guards): Similarly.
16802 * src/reader.at (readgram): Complain if the last rule is not ended
16803 with a semi-colon.
16804
16805 2002-03-04 Akim Demaille <akim@epita.fr>
16806
16807 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
16808 * src/closure.c: here.
16809 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
16810 RTC.
16811 * src/warshall.h, src/warshall.c: Remove.
16812 * tests/sets.at (Broken Closure): Adjust.
16813
16814 2002-03-04 Akim Demaille <akim@epita.fr>
16815
16816 * src/output.c (output_skeleton): tempdir is const.
16817 bytes_read is unused.
16818
16819 2002-03-04 Akim Demaille <akim@epita.fr>
16820
16821 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16822 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
16823 Update.
16824 From Michael Hayes.
16825
16826 2002-03-04 Akim Demaille <akim@epita.fr>
16827
16828 * src/closure.c (closure): `r' is unused.
16829
16830 2002-03-04 Akim Demaille <akim@epita.fr>
16831
16832 * tests/sets.at (Broken Closure): Add the ending `;'.
16833 * src/reader.at (readgram): Complain if a rule is not ended with a
16834 semi-colon.
16835
16836 2002-03-04 Akim Demaille <akim@epita.fr>
16837
16838 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
16839 (count_sr_conflicts): Use bitset_count.
16840 * src/reduce.c (inaccessable_symbols): Ditto.
16841 (bits_size): Remove.
16842 * src/warshall.h, src/warshall.c: Convert to bitsetv.
16843
16844 2002-03-04 Akim Demaille <akim@epita.fr>
16845
16846 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
16847 * src/reduce.c: Remove the `bitset_zero's following the
16848 `bitset_create's, as now it is performed by the latter.
16849
16850 2002-03-04 Akim Demaille <akim@epita.fr>
16851
16852 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
16853 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
16854 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
16855 latest sources from Michael.
16856
16857 2002-03-04 Akim Demaille <akim@epita.fr>
16858
16859 * src/output.c (output): Don't free the grammar.
16860 * src/reader.c (grammar_free): New.
16861 * src/main.c (main): Call it and don't free symtab here.
16862
16863 2002-03-04 Akim Demaille <akim@epita.fr>
16864
16865 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
16866 before returning.
16867 Reported by Benoit Perrot.
16868
16869 2002-03-04 Akim Demaille <akim@epita.fr>
16870
16871 Use bitset operations when possible, not loops over bits.
16872
16873 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
16874 bitset_or.
16875 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
16876 * src/reduce.c (useless_nonterminals): Formatting changes.
16877 * src/warshall.c (TC): Use bitset_or.
16878
16879 2002-03-04 Akim Demaille <akim@epita.fr>
16880
16881 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
16882 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
16883 Ditto.
16884
16885 2002-03-04 Akim Demaille <akim@epita.fr>
16886
16887 * src/lalr.c (F): Now a bitset*.
16888 Adjust all dependencies.
16889
16890 2002-03-04 Akim Demaille <akim@epita.fr>
16891
16892 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
16893 Adjust all dependencies.
16894
16895 2002-03-04 Akim Demaille <akim@epita.fr>
16896
16897 * src/L0.c, src/LR0.h (nstates): Be size_t.
16898 Adjust comparisons (signed vs unsigned).
16899 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
16900 bitset*.
16901 Adjust all dependencies.
16902
16903 2002-03-04 Akim Demaille <akim@epita.fr>
16904
16905 * src/closure.c (firsts): Now, also a bitset.
16906 Adjust all dependencies.
16907 (varsetsize): Remove, now unused.
16908 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
16909
16910 2002-03-04 Akim Demaille <akim@epita.fr>
16911
16912 * src/print.c: Convert to use bitset.h, not hand coded iterations
16913 over ints.
16914
16915 2002-03-04 Akim Demaille <akim@epita.fr>
16916
16917 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
16918
16919 2002-03-04 Akim Demaille <akim@epita.fr>
16920
16921 * src/closure.c (ruleset): Be a bitset.
16922 (rulesetsize): Remove.
16923
16924 2002-03-04 Akim Demaille <akim@epita.fr>
16925
16926 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16927 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
16928 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
16929 * src/closure.c (fderives): Be an array of bitsets.
16930
16931 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
16932
16933 * data/bison.c++: Merge the two generated headers. Insert a copyright
16934 notice in each output file.
16935
16936 2002-02-28 Akim Demaille <akim@epita.fr>
16937
16938 * data/bison.c++: Copy the prologue of bison.simple to fetch
16939 useful M4 definitions, such as b4_header_guard.
16940
16941 2002-02-25 Akim Demaille <akim@epita.fr>
16942
16943 * src/getargs.c (version): Give the name of the authors, and use a
16944 translator friendly scheme for the bgr
16945 copyright notice.
16946
16947 2002-02-25 Akim Demaille <akim@epita.fr>
16948
16949 * src/output.c (header_output): Remove, now handled completely via
16950 M4.
16951
16952 2002-02-25 Akim Demaille <akim@epita.fr>
16953
16954 * m4/m4.m4: New, from CVS Autoconf.
16955 * configure.in: Invoke it.
16956 * src/output.c (output_skeleton): Use its result instead of the
16957 hard coded name.
16958
16959 2002-02-25 Akim Demaille <akim@epita.fr>
16960
16961 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
16962 Fileutils 4.1.5.
16963 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
16964 * src/output.c (output_skeleton): Use mkstemp to create a real
16965 temporary file.
16966 Move the filling of `skeleton' and its muscle to...
16967 (prepare): here.
16968 (output): Move the definition of the prologue muscle to...
16969 (prepare): here.
16970 * src/system.h (DEFAULT_TMPDIR): New.
16971
16972 2002-02-14 Paul Eggert <eggert@twinsun.com>
16973
16974 Remove the support for C++ namespace cleanliness; it was
16975 causing more problems than it was curing, since it didn't work
16976 properly on some nonstandard C++ compilers. This can wait
16977 for a proper C++ parser.
16978
16979 * NEWS: Document this.
16980 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
16981 of C++, as it's treated like C now.
16982 * src/bison.simple (YYSTD): Remove.
16983 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
16984 Treat C++ just like Standard C instead of trying to support
16985 namespace cleanliness.
16986
16987 2002-02-14 Akim Demaille <akim@epita.fr>
16988
16989 * tests/regression.at (else): Adjust to Andreas' change.
16990
16991 2002-02-14 Akim Demaille <akim@epita.fr>
16992
16993 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
16994
16995 2002-02-13 Andreas Schwab <schwab@suse.de>
16996
16997 * src/output.c (output_rule_data): Don't output NULL, it might
16998 not be defined yet.
16999
17000 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17001
17002 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17003 (Copyright notice): Update.
17004
17005 2002-02-11 Akim Demaille <akim@epita.fr>
17006
17007 * tests/regression.at (%nonassoc and eof): Don't include
17008 nonportable headers.
17009
17010 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17011
17012 * data/bison.c++: Correct error recovery. Make the user able to
17013 initialize the starting location.
17014
17015 2002-02-07 Akim Demaille <akim@epita.fr>
17016
17017 * tests/input.at: New.
17018
17019 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17020
17021 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17022 more consistent when naming methods and variables. Put preprocessor
17023 directives around tables only needed for debugging.
17024
17025 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17026
17027 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17028 C++ parsers.
17029 (yy::b4_name::parse): Use print_.
17030
17031 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17032
17033 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17034
17035 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17036
17037 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17038 C++ parsers.
17039 (yy::b4_name::parse): Build verbose error messages, and use error_.
17040
17041 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17042
17043 * data/bison.c++: Fix m4 quoting in comments.
17044
17045 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17046
17047 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17048 not expanded by m4.
17049
17050 2002-02-05 Akim Demaille <akim@epita.fr>
17051
17052 * data/bison.c++: Adjust to the M4 back end.
17053 More is certainly needed.
17054
17055 2002-02-05 Akim Demaille <akim@epita.fr>
17056
17057 Give a try to M4 as a back end.
17058
17059 * lib/readpipe.c: New, from wdiff.
17060 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17061 BISON_HAIRY.
17062 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17063 specific values. Now it is m4 that performs the lookup.
17064 * src/parse-skel.y: Remove.
17065 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17066 * src/output.c (actions_output, guards_output)
17067 (token_definitions_output): No longer keeps track of the output
17068 line number, hence remove the second argument.
17069 (guards_output): Check against the guard member of a rule, not the
17070 action member.
17071 Adjust callers.
17072 (output_skeleton): Don't look for the skeleton location, let m4 do
17073 that.
17074 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17075 file will be used.
17076 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17077 (prepare): Given that for the time being changesyntax is not
17078 usable in M4, rename the muscles using `-' to `_'.
17079 Define `defines_flag', `output_parser_name' and `output_header_name'.
17080 * src/output.h (actions_output, guards_output)
17081 (token_definitions_output): Adjust prototypes.
17082 * src/scan-skel.l: Instead of scanning the skeletons, it now
17083 processes the output of m4: `__oline__' and `#output'.
17084 * data/bison.simple: Adjust to be used by M4(sugar).
17085 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17086 to date.
17087 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17088 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17089 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17090 shamelessly stolen from CVS Autoconf.
17091
17092 2002-02-05 Akim Demaille <akim@epita.fr>
17093
17094 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17095 * configure.in: Check for the declarations of free and malloc.
17096 * src/muscle_tab.c: Adjust.
17097
17098 2002-02-05 Akim Demaille <akim@epita.fr>
17099
17100 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17101 which have no values.
17102
17103 2002-02-05 Akim Demaille <akim@epita.fr>
17104
17105 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17106 * data/: here.
17107
17108 2002-01-29 Paul Eggert <eggert@twinsun.com>
17109
17110 * src/bison.simple (YYSIZE_T): Do not define merely because
17111 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17112 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17113
17114 2002-01-27 Akim Demaille <akim@epita.fr>
17115
17116 Fix `%nonassoc and eof'.
17117
17118 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17119 which were not properly copied! Replace
17120 memcpy (res->errs, src->errs, src->nerrs);
17121 with
17122 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17123 !!!
17124 * tests/regression.at (%nonassoc and eof): Adjust to newest
17125 Autotest: `.' is not in the PATH.
17126
17127 2002-01-27 Akim Demaille <akim@epita.fr>
17128
17129 * tests/sets.at (AT_EXTRACT_SETS): New.
17130 (Nullable): Use it.
17131 (Firsts): New.
17132
17133 2002-01-26 Akim Demaille <akim@epita.fr>
17134
17135 * tests/actions.at, tests/calc.at, tests/headers.at,
17136 * tests/torture.at: Adjust to the newest Autotest which no longer
17137 forces `.' in the PATH.
17138
17139 2002-01-25 Akim Demaille <akim@epita.fr>
17140
17141 * tests/regression.at (%nonassoc and eof): New.
17142 Suggested by Robert Anisko.
17143
17144 2002-01-24 Akim Demaille <akim@epita.fr>
17145
17146 Bison dumps core when trying to complain about broken input files.
17147 Reported by Cris van Pelt.
17148
17149 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17150 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17151 into...
17152 (Invalid inputs): Strengthen: exercise parse_percent_token.
17153
17154 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17155
17156 * src/Makefile.am: Add bison.c++.
17157 * src/bison.c++: New skeleton.
17158
17159 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17160
17161 * po/it.po: New.
17162
17163 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17164
17165 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17166
17167 2002-01-20 Marc Autret <marc@gnu.org>
17168
17169 * src/files.c (compute_output_file_names): Fix
17170
17171 2002-01-20 Marc Autret <marc@gnu.org>
17172
17173 * tests/output.at: New test.
17174 * src/files.c (compute_base_names): Don't map extensions when
17175 the YACC flag is set, use defaults.
17176 Reported by Evgeny Stambulchik.
17177
17178 2002-01-20 Marc Autret <marc@gnu.org>
17179
17180 * src/system.h: Need to define __attribute__ away for non-GCC
17181 compilers as well (i.e., the vendor C compiler).
17182 Suggested by Albert Chin-A-Young.
17183
17184 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17185
17186 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17187 canonical definition.
17188 * src/system.h: Use the canonical definition for PARAMS (avoids
17189 a conflict with the macro from lib/hash.h).
17190
17191 2002-01-11 Akim Demaille <akim@epita.fr>
17192
17193 * configure.in: Use AC_FUNC_STRNLEN.
17194 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17195
17196 2002-01-09 Akim Demaille <akim@epita.fr>
17197
17198 * src/files.c, src/files.h (output_infix): New.
17199 (tab_extension): Remove.
17200 (compute_base_names): Compute the former, drop the latter.
17201 * src/output.c (prepare): Insert the muscles `output-infix', and
17202 `output-suffix'.
17203 * src/parse-skel.y (string, string.1): New.
17204 (section.header): Use it.
17205 (section.yacc): Remove.
17206 (prefix): Remove too.
17207 * src/scan-skel.l: Adjust.
17208 * src/bison.simple, src/bison.hairy: Adjust.
17209
17210 2002-01-09 Akim Demaille <akim@epita.fr>
17211
17212 * configure.in (WERROR_CFLAGS): Compute it.
17213 * src/Makefile.am (CFLAGS): Pass it.
17214 * tests/atlocal.in (CFLAGS): Idem.
17215 * src/files.c: Fix a few warnings.
17216 (get_extension_index): Remove, unused.
17217
17218 2002-01-08 Akim Demaille <akim@epita.fr>
17219
17220 * src/getargs.c (AS_FILE_NAME): New.
17221 (getargs): Use it to convert DOSish file names.
17222 * src/files.c (base_name): Rename as full_base_name to avoid
17223 clashes with `base_name ()'.
17224 (filename_split): New.
17225 (compute_base_names): N-th rewrite, using filename_split.
17226
17227 2002-01-08 Akim Demaille <akim@epita.fr>
17228
17229 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17230 New, stolen from the Fileutils 4.1.
17231 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17232 * configure.in: Check for the presence of memrchr, and of its
17233 prototype.
17234
17235 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17236
17237 * lib/hash.h (__P): Added definition for this macro.
17238 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17239 BUILT_SOURCES, to ensure they are generated first.
17240 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17241 %error-verbose to allow bootstrapping with bison 1.30x.
17242
17243 2002-01-06 Akim Demaille <akim@epita.fr>
17244
17245 * src/reader.c (parse_braces): Don't fetch the next char, the
17246 convention is to fetch on entry.
17247 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17248 'switch' without a following semicolon.
17249 * tests/regression.at (braces parsing): New.
17250
17251 2002-01-06 Akim Demaille <akim@epita.fr>
17252
17253 Bison is dead wrong in its RR conflict reports.
17254
17255 * tests/torture.at (GNU Cim Grammar): New.
17256 * src/conflicts.c (count_rr_conflicts): Fix.
17257
17258 2002-01-06 Akim Demaille <akim@epita.fr>
17259
17260 Creating package.m4 from configure.ac causes too many problems.
17261
17262 * tests/Makefile.am (package.m4): Create it by hand,
17263 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17264
17265 2002-01-06 Akim Demaille <akim@epita.fr>
17266
17267 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17268 skeleton.h.
17269
17270 2002-01-04 Paul Eggert <eggert@twinsun.com>
17271
17272 * doc/bison.texinfo (Debugging):
17273 Remove YYSTDERR; it's no longer defined or used.
17274 Also, s/cstdio.h/cstdio/.
17275
17276 2002-01-03 Akim Demaille <akim@epita.fr>
17277
17278 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17279
17280 2002-01-03 Akim Demaille <akim@epita.fr>
17281
17282 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17283 tracing code to --trace, wait for a better --trace option, with
17284 args.
17285
17286 2002-01-03 Akim Demaille <akim@epita.fr>
17287
17288 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17289 The ISO C++ standard is extremely clear about it: stderr is
17290 considered a macro, not a regular symbol (see table 94 `Header
17291 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17292 Therefore std:: does not apply to it. It still does with fprintf.
17293 Also, s/cstdio.h/cstdio/.
17294
17295 2002-01-03 Akim Demaille <akim@epita.fr>
17296
17297 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17298 for non system headers.
17299
17300 2002-01-02 Akim Demaille <akim@epita.fr>
17301
17302 Equip the skeleton chain with location tracking, runtime trace,
17303 pure parser and scanner.
17304
17305 * src/parse-skel.y: Request a pure parser, locations, and prefix
17306 renaming.
17307 (%union): Having several members with the same type does not help
17308 type mismatches, simplify.
17309 (YYPRINT, yyprint): New.
17310 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17311 (skel_error): this.
17312 Handle locations.
17313 * src/scan-skel.l: Adjust to these changes.
17314 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17315 (LOCATION_PRINT, skel_control_t): New.
17316
17317 2001-12-30 Akim Demaille <akim@epita.fr>
17318
17319 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17320 replace `gb' with BLANKS.
17321 * src/scan-skel.l: Adjust.
17322
17323 2001-12-30 Akim Demaille <akim@epita.fr>
17324
17325 * src/system.h: We don't need nor want bcopy.
17326 Throw away MS-DOS crap: we don't need getpid.
17327 * configure.in: We don't need strndup. It was even causing
17328 problems: because Flex includes the headers *before* us,
17329 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17330 not visible.
17331 * lib/xstrndup.c: New.
17332 * src/scan-skel.l: Use it.
17333 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17334 * src/parse-skel.y: Use %directives instead of #defines.
17335
17336 2001-12-30 Akim Demaille <akim@epita.fr>
17337
17338 * src/skeleton.h: New.
17339 * src/output.c (output_parser, output_master_parser): Remove, dead
17340 code.
17341 * src/output.h (get_lines_number, actions_output, guards_output)
17342 (token_definitions_output): Prototype them.
17343 * src/parse-skel.y: Add the license notice.
17344 Include output.h and skeleton.h.
17345 (process_skeleton): Returns void, and takes a single parameter.
17346 * src/scan-skel.l: Add the license notice.
17347 Include skeleton.h.
17348 Don't use %option yylineno: it seems that then Flex imagines
17349 REJECT has been used, and therefore it won't reallocate its
17350 buffers (which makes no other sense to me than a bug). It results
17351 in warnings for `unused: yy_flex_realloc'.
17352
17353 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
17354
17355 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17356 (MUSCLE_INSERT_PREFIX): ...to there.
17357 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17358 (MUSCLE_INSERT_PREFIX): Move from here...
17359
17360 * src/bison.hairy: Add a section directive. Put braces around muscle
17361 names. This parser skeleton is still broken, but Bison should not
17362 choke on a bad muscle 'syntax'.
17363 * src/bison.simple: Add a section directive. Put braces around muscle
17364 names.
17365
17366 * src/files.h (strsuffix, stringappend): Add declarations.
17367 (tab_extension): Add declaration.
17368 (short_base_name): Add declaration.
17369
17370 * src/files.c (strsuffix, stringappend): No longer static. These
17371 functions are used in the skeleton parser.
17372 (tab_extension): New.
17373 (compute_base_names): Use the computations done in this function
17374 to guess if the generated parsers should have '.tab' in their
17375 names.
17376 (short_base_name): No longer static.
17377
17378 * src/output.c (output_skeleton): New.
17379 (output): Disable call to output_master_parser, and give a try to
17380 a new skeleton handling system.
17381 (guards_output, actions_output): No longer static.
17382 (token_definitions_output, get_lines_number): No longer static.
17383
17384 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17385
17386 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
17387 parse-skel.y.
17388
17389 * src/parse-skel.y: New file.
17390 * src/scan-skel.l: New file.
17391
17392 2001-12-29 Akim Demaille <akim@epita.fr>
17393
17394 %name-prefix is broken.
17395
17396 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17397 Adjust all dependencies.
17398 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17399 %name-prefix.
17400
17401 Renaming yylval but not yylloc is not consistent. Now we do.
17402
17403 * src/bison.simple: Prefix yylloc if used.
17404 * doc/bison.texinfo (Decl Summary): Document that.
17405
17406 2001-12-29 Akim Demaille <akim@epita.fr>
17407
17408 * doc/bison.texinfo: Promote `%long-directive' over
17409 `%long_directive'.
17410 Remove all references to fixed-output-files, yacc is enough.
17411
17412 2001-12-29 Akim Demaille <akim@epita.fr>
17413
17414 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17415 user prologue. These are defaults.
17416 * tests/actions.at (Mid-rule actions): Make sure the user can
17417 define YYDEBUG and YYERROR_VERBOSE.
17418
17419 2001-12-29 Akim Demaille <akim@epita.fr>
17420
17421 * src/output.c (header_output): Don't forget to export YYLTYPE and
17422 yylloc.
17423 * tests/headers.at (export YYLTYPE): New, make sure it does.
17424 * tests/regression.at (%union and --defines, Invalid CPP headers):
17425 Move to...
17426 * tests/headers.at: here.
17427
17428 2001-12-29 Akim Demaille <akim@epita.fr>
17429
17430 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17431
17432 2001-12-29 Akim Demaille <akim@epita.fr>
17433
17434 * tests/actions.at (Mid-rule actions): Output on a single line
17435 instead of several.
17436
17437 2001-12-29 Akim Demaille <akim@epita.fr>
17438
17439 * doc/bison.texinfo: Formatting changes.
17440
17441 2001-12-29 Akim Demaille <akim@epita.fr>
17442
17443 Don't store the token defs in a muscle, just be ready to output it
17444 on command. Now possible via `symbols'. Fixes a memory leak.
17445
17446 * src/output.c (token_definitions_output): New.
17447 (output_parser, header_output): Use it.
17448 * src/reader.c (symbols_save): Remove.
17449
17450 2001-12-29 Akim Demaille <akim@epita.fr>
17451
17452 * src/bison.simple: Do not provide a default for YYSTYPE and
17453 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17454 default.
17455
17456 2001-12-29 Akim Demaille <akim@epita.fr>
17457
17458 Mid-rule actions are simply... ignored!
17459
17460 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17461 the empty-rule associated to the dummy symbol, not to the host
17462 rule.
17463 * tests/actions.at (Mid-rule actions): New.
17464
17465 2001-12-29 Akim Demaille <akim@epita.fr>
17466
17467 Memory leak.
17468
17469 * src/reader.c (reader): Free grammar.
17470
17471 2001-12-29 Akim Demaille <akim@epita.fr>
17472
17473 Memory leak.
17474
17475 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17476 since it allocates it for each state, although only one is needed.
17477 (allocate_storage): Do it here.
17478
17479 2001-12-29 Akim Demaille <akim@epita.fr>
17480
17481 * src/options.h, src/options.c (create_long_option_table): Rename
17482 as...
17483 (long_option_table_new): this, with a clearer prototype.
17484 (percent_table): Remove, unused,
17485 * src/getargs.c (getargs): Adjust.
17486
17487 2001-12-29 Akim Demaille <akim@epita.fr>
17488
17489 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17490 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17491 as states.
17492
17493 2001-12-29 Akim Demaille <akim@epita.fr>
17494
17495 * src/lalr.c (build_relations): Rename `states' as `states1'.
17496 Sorry, I don't understand exactly what it is, no better name...
17497
17498 2001-12-29 Akim Demaille <akim@epita.fr>
17499
17500 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17501 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17502 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17503 as rules.
17504
17505 2001-12-29 Akim Demaille <akim@epita.fr>
17506
17507 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17508 ago.
17509
17510 2001-12-29 Akim Demaille <akim@epita.fr>
17511
17512 * src/reader.c, src/reader.h (user_toknums): Remove.
17513 Adjust all users to use symbols[i]->user_token_number.
17514
17515 2001-12-29 Akim Demaille <akim@epita.fr>
17516
17517 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17518 Adjust all users to use symbols[i]->prec or ->assoc.
17519
17520 2001-12-29 Akim Demaille <akim@epita.fr>
17521
17522 * src/reader.c, src/reader.h (tags): Remove.
17523 Adjust all users to use symbols[i]->tag.
17524
17525 2001-12-29 Akim Demaille <akim@epita.fr>
17526
17527 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17528 and rule_table.
17529 * src/reader.c (packsymbols): Fill this table.
17530 Drop sprec.
17531 * src/conflicts.c (resolve_sr_conflict): Adjust.
17532 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17533 single table.
17534 Use symbols[i]->tag instead of tags[i].
17535
17536 2001-12-29 Akim Demaille <akim@epita.fr>
17537
17538 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17539 In addition, put a comment in there, to replace...
17540 * tests/regression.at (%union and C comments): Remove.
17541
17542 2001-12-29 Akim Demaille <akim@epita.fr>
17543
17544 * tests/regression.at (Web2c Actions): Blindly move the actual
17545 output as expected output. The contents *seem* right to me, but I
17546 can't pretend reading perfectly parser tables... Nonetheless, all
17547 the other tests pass correctly, the table look OK, even though the
17548 presence of `$axiom' is to be noted: AFAICS it is useless (but
17549 harmless).
17550
17551 2001-12-29 Akim Demaille <akim@epita.fr>
17552
17553 * src/reader.c (readgram): Don't add the rule 0 if there were no
17554 rules read. In other words, add it _after_ having performed
17555 grammar sanity checks.
17556 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17557
17558 2001-12-29 Akim Demaille <akim@epita.fr>
17559
17560 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17561 visible, and some states have now a different number.
17562
17563 2001-12-29 Akim Demaille <akim@epita.fr>
17564
17565 * src/reader.c (readgram): Bind the initial rule's lineno to that
17566 of the first rule.
17567 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17568 (Solved SR Conflicts): Adjust rule 0's line number.
17569
17570 2001-12-29 Akim Demaille <akim@epita.fr>
17571
17572 Fix the `GAWK Grammar' failure.
17573
17574 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17575 the reductions of the first state which was mistakenly confused
17576 with the final state because precisely final_state was initialized
17577 to 0.
17578 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17579 now noticed by Bison.
17580 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17581 have a reduction on $default.
17582
17583 2001-12-29 Akim Demaille <akim@epita.fr>
17584
17585 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17586 rule line numbers.
17587 * src/closure.c (print_closure): Likewise.
17588 * src/derives.c (print_derives): Likewise.
17589 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17590 now.
17591
17592 2001-12-29 Akim Demaille <akim@epita.fr>
17593
17594 * src/lalr.c (lookaheads_print): New.
17595 (lalr): Call it when --trace-flag.
17596 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17597 are dumped.
17598
17599 2001-12-29 Akim Demaille <akim@epita.fr>
17600
17601 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
17602 when walking through ritem, even via rule->rhs.
17603 * src/reduce.c (dump_grammar, useful_production, reduce_output)
17604 (useful_production, useless_nonterminals): Likewise.
17605 (reduce_grammar_tables): Likewise, plus update nritems.
17606 * src/nullable.c (set_nullable): Likewise.
17607 * src/lalr.c (build_relations): Likewise.
17608 * tests/sets.at (Nullable): Adjust.
17609 Fortunately, now, the $axiom is no longer nullable.
17610
17611 2001-12-29 Akim Demaille <akim@epita.fr>
17612
17613 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
17614 the 0-sentinel.
17615 * src/gram.c (ritem_longest_rhs): Likewise.
17616 * src/reduce.c (nonterminals_reduce): Likewise.
17617 * src/print_graph.c (print_graph): Likewise.
17618 * src/output.c (output_rule_data): Likewise.
17619 * src/nullable.c (set_nullable): Likewise.
17620
17621 2001-12-29 Akim Demaille <akim@epita.fr>
17622
17623 * src/output.c: Comment changes.
17624
17625 2001-12-27 Paul Eggert <eggert@twinsun.com>
17626
17627 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
17628 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
17629 Sparc, as they were causing more porting problems than the
17630 (minor) performance improvement was worth.
17631
17632 Also, catch up with 1.31's YYSTD.
17633
17634 2001-12-27 Akim Demaille <akim@epita.fr>
17635
17636 * src/output.c (output_gram): Rely on nritems, not the
17637 0-sentinel. See below.
17638 Use -1 as separator, not 0.
17639 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
17640 Rely on -1 as separator in yyrhs, instead of 0.
17641 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
17642 twice `Now at end of input', therefore there are two lines less to
17643 expect.
17644
17645 2001-12-27 Akim Demaille <akim@epita.fr>
17646
17647 * tests/regression.at (Unresolved SR Conflicts):
17648 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
17649 below.
17650
17651 2001-12-27 Akim Demaille <akim@epita.fr>
17652
17653 * src/LR0.c (new_state): Recognize the final state by the fact it
17654 is reached by eoftoken.
17655 (insert_start_shifting_state, insert_eof_shifting_state)
17656 (insert_accepting_state, augment_automaton): Remove, since now
17657 these states are automatically computed from the initial state.
17658 (generate_states): Adjust.
17659 * src/print.c: When reporting a rule number to the user, substract
17660 1, so that the axiom rule is rule 0, and the first user rule is 1.
17661 * src/reduce.c: Likewise.
17662 * src/print_graph.c (print_core): For the time being, just as for
17663 the report, depend upon --trace-flags to dump the full set of
17664 items.
17665 * src/reader.c (readgram): Once the grammar read, insert the rule
17666 0: `$axiom: START-SYMBOL $'.
17667 * tests/set.at: Adjust: rule 0 is now displayed, and since the
17668 number of the states has changed (the final state is no longer
17669 necessarily the last), catch up.
17670
17671 2001-12-27 Akim Demaille <akim@epita.fr>
17672
17673 Try to make the use of the eoftoken valid. Given that its value
17674 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
17675 is used instead of > 0 where appropriate, (ii), depend upon nritems
17676 instead of the 0-sentinel.
17677
17678 * src/gram.h, src/gram.c (nritems): New.
17679 Expected to be duplication of nitems, but for the time being...
17680 * src/reader.c (packgram): Assert nritems and nitems are equal.
17681 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
17682 * src/closure.c (print_closure, print_fderives): Likewise.
17683 * src/gram.c (ritem_print): Likewise.
17684 * src/print.c (print_core, print_grammar): Likewise.
17685 * src/print_graph.c: Likewise.
17686
17687 2001-12-27 Akim Demaille <akim@epita.fr>
17688
17689 * src/main.c (main): If there are complains after grammar
17690 reductions, then output the report anyway if requested, then die.
17691 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
17692 * src/reader.c (eoftoken): New.
17693 (parse_token_decl): If the token being defined has value `0', it
17694 is the eoftoken.
17695 (packsymbols): No longer hack `tags' to insert `$' by hand.
17696 Be sure to preserve the value of the eoftoken.
17697 (reader): Make sure eoftoken is defined.
17698 Initialize nsyms to 0: now eoftoken is created just like the others.
17699 * src/print.c (print_grammar): Don't special case the eof token.
17700 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
17701 lie anyway, albeit pleasant.
17702 * tests/calc.at: Exercise error messages with eoftoken.
17703 Change the grammar so that empty input is invalid.
17704 Adjust expectations.
17705 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
17706
17707 2001-12-27 Akim Demaille <akim@epita.fr>
17708
17709 * configure.in: Check the protos of strchr ans strspn.
17710 Replace strchr if needed.
17711 * src/system.h: Provide the protos of strchr, strspn and memchr if
17712 missing.
17713 * lib/strchr.c: New.
17714 * src/reader.c (symbols_save): Use strchr.
17715
17716 2001-12-27 Akim Demaille <akim@epita.fr>
17717
17718 * src/print.c, src/print_graph.c (escape): New.
17719 Use it to quote the TAGS outputs.
17720 * src/print_graph.c (print_state): Now errors are in red, and
17721 reductions in green.
17722 Prefer high to wide: output the state number on a line of its own.
17723
17724 2001-12-27 Akim Demaille <akim@epita.fr>
17725
17726 * src/state.h, src/state.c (reductions_new): New.
17727 * src/LR0.c (set_state_table): Let all the states have a
17728 `reductions', even if reduced to 0.
17729 (save_reductions): Adjust.
17730 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
17731 * src/print.c (print_reductions, print_actions): Adjust.
17732 * src/output.c (action_row): Adjust.
17733
17734 2001-12-27 Akim Demaille <akim@epita.fr>
17735
17736 * src/state.h, src/state.c (errs_new, errs_dup): New.
17737 * src/LR0.c (set_state_table): Let all the states have an errs,
17738 even if reduced to 0.
17739 * src/print.c (print_errs, print_reductions): Adjust.
17740 * src/output.c (output_actions, action_row): Adjust.
17741 * src/conflicts.c (resolve_sr_conflict): Adjust.
17742
17743 2001-12-27 Akim Demaille <akim@epita.fr>
17744
17745 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
17746
17747 2001-12-27 Akim Demaille <akim@epita.fr>
17748
17749 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
17750 * src/print.c: here.
17751 (lookaheadset, shiftset): New, used as additional storage by
17752 print_reductions.
17753 (print_results): Adjust.
17754 (print_shifts, print_gotos, print_errs): New, extracted from...
17755 (print_actions): here.
17756 * src/print_graph.c (print_actions): Remove dead code.
17757
17758 2001-12-27 Akim Demaille <akim@epita.fr>
17759
17760 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
17761 `$n' and `@n'.
17762
17763 2001-12-27 Akim Demaille <akim@epita.fr>
17764
17765 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
17766 (build_relations): Adjust.
17767
17768 2001-12-27 Akim Demaille <akim@epita.fr>
17769
17770 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
17771 duplication.
17772
17773 2001-12-27 Akim Demaille <akim@epita.fr>
17774
17775 * src/reader.c (packgram): Catch nitems overflows.
17776
17777 2001-12-27 Akim Demaille <akim@epita.fr>
17778
17779 * src/files.c, src/files.h (guard_obstack): Remove.
17780 * src/output.c (output): Adjust.
17781 * src/reader.c (parse_braces): New, factoring...
17782 (copy_action, copy_guard): these two which are renamed as...
17783 (parse_action, parse_guard): these.
17784 As a voluntary consequence, using braces around guards is now
17785 mandatory.
17786
17787 2001-12-27 Akim Demaille <akim@epita.fr>
17788
17789 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
17790 * src/reader.c (symbol_list): `guard' and `guard_line' are new
17791 members.
17792 (symbol_list_new): Adjust.
17793 (copy_action): action_line is the first line, not the last.
17794 (copy_guard): Just as for actions, store the `action' only, not
17795 the switch/case/break flesh.
17796 Don't parse the user action that might follow the guard, let...
17797 (readgram): do it, i.e., now, there can be an action after a
17798 guard.
17799 In other words the guard is just explicitly optional.
17800 (packgram): Adjust.
17801 * src/output.c (guards_output): New.
17802 (output_parser): Call it when needed.
17803 (output): Also free the guard and attrs obstacks.
17804 * src/files.c, src/files.h (obstack_save): Remove.
17805 (output_files): Remove.
17806 As a result, if one needs the former `.act' file, using an
17807 appropriate skeleton which requires actions and guards is now
17808 required.
17809 * src/main.c (main): Adjust.
17810 * tests/semantic.at: New.
17811 * tests/regression.at: Use `input.y' as input file name.
17812 Avoid 8+3 problems by requiring input.c when the test needs the
17813 parser.
17814
17815 2001-12-27 Akim Demaille <akim@epita.fr>
17816
17817 * src/reader.c (symbol_list_new): Be sure to initialize all the
17818 fields.
17819
17820 2001-12-27 Akim Demaille <akim@epita.fr>
17821
17822 All the hacks using a final pseudo state are now useless.
17823
17824 * src/LR0.c (set_state_table): state_table holds exactly nstates.
17825 * src/lalr.c (nLA): New.
17826 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
17827 instead of lookaheadsp from the pseudo state (nstate + 1).
17828
17829 2001-12-27 Akim Demaille <akim@epita.fr>
17830
17831 * src/output.c (action_row, token_actions): Use a state_t instead
17832 of a integer, and nlookaheads instead of the following state's
17833 lookaheadsp.
17834
17835 2001-12-27 Akim Demaille <akim@epita.fr>
17836
17837 * src/conflicts.c (log_resolution, flush_shift)
17838 (resolve_sr_conflict, set_conflicts, solve_conflicts)
17839 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
17840 (conflicts_print, print_reductions): Use a state_t instead of an
17841 integer when referring to a state.
17842 As much as possible, depend upon nlookaheads, instead of the
17843 `lookaheadsp' member of the following state (since lookaheads of
17844 successive states are successive, the difference between state n + 1
17845 and n served as the number of lookaheads for state n).
17846 * src/lalr.c (add_lookback_edge): Likewise.
17847 * src/print.c (print_core, print_actions, print_state)
17848 (print_results): Likewise.
17849 * src/print_graph.c (print_core, print_actions, print_state)
17850 (print_graph): Likewise.
17851 * src/conflicts.h: Adjust.
17852
17853 2001-12-27 Akim Demaille <akim@epita.fr>
17854
17855 * src/bison.hairy: Formatting/comment changes.
17856 ANSIfy.
17857 Remove `register' indications.
17858 Add plenty of `static'.
17859
17860 2001-12-27 Akim Demaille <akim@epita.fr>
17861
17862 * src/output.c (prepare): Drop the muscle `ntbase' which
17863 duplicates ntokens.
17864 * src/bison.simple: Formatting/comment changes.
17865 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
17866 is an undocumented synonym.
17867
17868 2001-12-22 Akim Demaille <akim@epita.fr>
17869
17870 * src/output.c (output_table_data): Change the prototype to use
17871 `int' for array ranges: some invocations do pass an int, not a
17872 short.
17873 Reported by Wayne Green.
17874
17875 2001-12-22 Akim Demaille <akim@epita.fr>
17876
17877 Some actions of web2c.y are improperly triggered.
17878 Reported by Mike Castle.
17879
17880 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
17881 * tests/regression.at (Web2c): Rename as...
17882 (Web2c Report): this.
17883 (Web2c Actions): New.
17884
17885 2001-12-22 Akim Demaille <akim@epita.fr>
17886
17887 Reductions in web2c.y are improperly reported.
17888 Reported by Mike Castle.
17889
17890 * src/conflicts.c (print_reductions): Fix.
17891 * tests/regression.at (Web2c): New.
17892
17893 2001-12-18 Akim Demaille <akim@epita.fr>
17894
17895 Some host fail on `assert (!"foo")', which expands to
17896 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
17897 Reported by Nelson Beebee.
17898
17899 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
17900 `#define it_succeeded 0' and `assert (it_succeeded)'.
17901
17902 2001-12-17 Marc Autret <autret_m@epita.fr>
17903
17904 * src/bison.simple: Don't hard code the skeleton line and filename.
17905 * src/output.c (output_parser): Rename 'line' as 'output_line'.
17906 New line counter 'skeleton_line' (skeleton-line muscle).
17907
17908 2001-12-17 Paul Eggert <eggert@twinsun.com>
17909
17910 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
17911 YYDEBUG must be defined to a nonzero value.
17912
17913 * src/bison.simple (yytname): Do not assume that the user defines
17914 YYDEBUG to a properly parenthesized expression.
17915
17916 2001-12-17 Akim Demaille <akim@epita.fr>
17917
17918 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
17919 nlookaheads is a new member.
17920 Adjust all users.
17921 * src/lalr.h (nlookaheads): Remove this orphan declaration.
17922 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
17923 state.
17924
17925 2001-12-17 Akim Demaille <akim@epita.fr>
17926
17927 * src/files.h, src/files.c (open_files, close_files): Remove.
17928 * src/main.c (main): Don't open/close files, nor invoke lex_free,
17929 let...
17930 * src/reader.c (reader): Do it.
17931
17932 2001-12-17 Akim Demaille <akim@epita.fr>
17933
17934 * src/conflicts.c (print_reductions): Formatting changes.
17935
17936 2001-12-17 Akim Demaille <akim@epita.fr>
17937
17938 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
17939 (flush_reduce): New.
17940 (resolve_sr_conflict): Adjust.
17941
17942 2001-12-17 Akim Demaille <akim@epita.fr>
17943
17944 * src/output.c (output_obstack): Be static and rename as...
17945 (format_obstack): this, to avoid any confusion with files.c's
17946 output_obstack.
17947 * src/reader.h (muscle_obstack): Move to...
17948 * src/output.h: here, since it's defined in output.c.
17949
17950 2001-12-17 Akim Demaille <akim@epita.fr>
17951
17952 * src/output.c (action_row, save_column, default_goto)
17953 (sort_actions, matching_state, pack_vector): Better variable
17954 locality.
17955
17956 2001-12-17 Akim Demaille <akim@epita.fr>
17957
17958 * src/output.c: Various formatting changes.
17959
17960 2001-12-17 Akim Demaille <akim@epita.fr>
17961
17962 * src/files.c (output_files): Free the output_obstack.
17963 * src/main.c (main): Call print and print_graph conditionally.
17964 * src/print.c (print): Work unconditionally.
17965 * src/print_graph.c (print_graph): Work unconditionally.
17966 * src/conflicts.c (log_resolution): Output only if verbose_flag.
17967
17968 2001-12-16 Marc Autret <autret_m@epita.fr>
17969
17970 * src/output.c (actions_output): Fix. When we use %no-lines,
17971 there is one less line per action.
17972
17973 2001-12-16 Marc Autret <autret_m@epita.fr>
17974
17975 * src/bison.simple: Remove a useless #line directive.
17976 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
17977 * src/output.c (get_lines_number): New.
17978 (output_parser): Adjust, now takes care about the lines of a
17979 output muscles.
17980 Fix line numbering.
17981 (actions_output): Computes the number of lines taken by actions.
17982 (output_master_parser): Insert new skeleton which is the name of
17983 the output parser file name.
17984
17985 2001-12-15 Marc Autret <autret_m@epita.fr>
17986
17987 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
17988
17989 2001-12-15 Marc Autret <autret_m@epita.fr>
17990
17991 * src/output.c (output_gram): Keep track of the hairy one.
17992
17993 2001-12-15 Akim Demaille <akim@epita.fr>
17994
17995 Make `make distcheck' work.
17996
17997 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
17998 system.h which uses libgettext.h.
17999
18000 2001-12-15 Akim Demaille <akim@epita.fr>
18001
18002 * src/nullable.c (set_nullable): Useless rules must be skipped,
18003 otherwise, since we range over their symbols, we might look at a
18004 nonterminal which no longer ``exists'', i.e., it is not counted in
18005 `nvars', hence we overflow our arrays.
18006
18007 2001-12-15 Akim Demaille <akim@epita.fr>
18008
18009 The header can also be produced directly, without any obstack!
18010 Yahoo!
18011
18012 * src/files.c, src/files.h (defines_obstack): Remove.
18013 (compute_header_macro): Global.
18014 (defines_obstack_save): Remove.
18015 * src/reader.c (parse_union_decl): No longer output to
18016 defines_obstack: its content can be found in the `stype' muscle
18017 anyway.
18018 (output_token_translations): Merge into...
18019 (symbols_output): this.
18020 Rename as...
18021 (symbols_save): this.
18022 (reader): Adjust.
18023 * src/output.c (header_output): New.
18024 (output): Call it.
18025
18026 2001-12-15 Akim Demaille <akim@epita.fr>
18027
18028 * src/reader.c (parse_union_decl): Instead of handling two obstack
18029 simultaneously, use one to define the `stype' muscle, and use the
18030 value of the latter to fill defines_obstack.
18031 (copy_comment): Remove.
18032 (copy_comment2): Work for a single obstack.
18033 Rename as...
18034 (copy_comment): this.
18035
18036 2001-12-15 Akim Demaille <akim@epita.fr>
18037
18038 * src/lex.c, src/lex.h (xgetc): No longer static.
18039 * src/reader.c (parse_union_decl): Revamp.
18040
18041 2001-12-15 Akim Demaille <akim@epita.fr>
18042
18043 Still making progress in separating Bison into (i) input, (ii)
18044 process, (iii) output: now we can directly output the parser file
18045 without using table_obstack at all.
18046
18047 * src/files.c, src/files.h (table_obstack): Bye bye.
18048 (parser_file_name): New.
18049 * src/files.c (compute_output_file_names): Compute it.
18050 * src/output.c (actions_output, output_parser)
18051 (output_master_parser): To a file instead of an obstack.
18052
18053 2001-12-15 Akim Demaille <akim@epita.fr>
18054
18055 Attach actions to rules, instead of pre-outputting them to
18056 actions_obstack.
18057
18058 * src/gram.h (rule_t): action and action_line are new members.
18059 * src/reader.c (symbol_list): Likewise.
18060 (copy_action): Save the actions within the rule.
18061 (packgram): Save them in rule_table.
18062 * src/output.c (actions_output): New.
18063 (output_parser): Use it on `%%actions'.
18064 (output_rule_data): Don't free rule_table.
18065 (output): Do it.
18066 (prepare): Don't save the `action' muscle.
18067 * src/bison.simple: s/%%action/%%actions/.
18068
18069 2001-12-15 Akim Demaille <akim@epita.fr>
18070
18071 * src/reader.c (copy_action): When --yacc, don't append a `;'
18072 to the user action: let it fail if lacking.
18073 Suggested by Arnold Robbins and Tom Tromey.
18074
18075 2001-12-14 Akim Demaille <akim@epita.fr>
18076
18077 * src/lex.c (literalchar): Simply return the char you decoded, non
18078 longer mess around with obstacks and int pointers.
18079 Adjust all callers.
18080
18081 2001-12-14 Akim Demaille <akim@epita.fr>
18082
18083 * src/lex.c (literalchar): Don't escape the special characters,
18084 just decode them, and keep them as char (before, eol was output as
18085 the 2 char string `\n' etc.).
18086 * src/output.c (output_rule_data): Use quotearg to output the
18087 token strings.
18088
18089 2001-12-13 Paul Eggert <eggert@twinsun.com>
18090
18091 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18092 Do not infringe on the global user namespace when using C++.
18093 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18094 All uses of `fprintf' and `stderr' changed.
18095
18096 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18097
18098 2001-12-13 Akim Demaille <akim@epita.fr>
18099
18100 The computation of nullable is broken: it doesn't handle empty
18101 RHS's properly.
18102
18103 * tests/torture.at (GNU AWK Grammar): New.
18104 * tests/sets.at (Nullable): New.
18105 * src/nullable.c (set_nullable): Instead of blindly looping over
18106 `ritems', loop over the rules, and then over their rhs's.
18107
18108 Work around Autotest bugs.
18109
18110 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18111 frame, because Autotest understand lines starting with a `+' as
18112 traces from the shell. Then, they are not processed properly.
18113 Admittedly an Autotest bug, but we don't have time to wait for
18114 Autotest to catch up.
18115 * tests/regression.at (Broken Closure): Adjust to the new table
18116 frames.
18117 Move to...
18118 * tests/sets.at: here.
18119
18120 2001-12-13 Akim Demaille <akim@epita.fr>
18121
18122 * src/closure.c (closure): Use nrules instead of playing tricks
18123 with BITS_PER_WORD.
18124
18125 2001-12-13 Akim Demaille <akim@epita.fr>
18126
18127 * src/print.c (print_actions): Output the handling of `$' as the
18128 traces do: shifting the token EOF. Before EOF was treated as a
18129 nonterminal.
18130 * tests/regression.at: Adjust some tests.
18131 * src/print_graph.c (print_core): Complete the set of items via
18132 closure. The next-to-final and final states are still unsatisfying,
18133 but that's to be addressed elsewhere.
18134 No longer output the rule numbers, but do output the state number.
18135 A single loop for the shifts + gotos is enough, but picked a
18136 distinct color for each.
18137 (print_graph): Initialize and finalize closure.
18138
18139 2001-12-13 Akim Demaille <akim@epita.fr>
18140
18141 * src/reader.c (readgram): Remove dead code, an strip useless
18142 braces.
18143 (get_type): Remove, unused.
18144
18145 2001-12-12 Akim Demaille <akim@epita.fr>
18146
18147 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18148 on that of lib/error.c.
18149
18150 2001-12-12 Akim Demaille <akim@epita.fr>
18151
18152 Some hosts don't like `/' in includes.
18153
18154 * src/system.h: Include libgettext.h without qualifying the path.
18155 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18156 $(top_srcdir).
18157
18158 2001-12-11 Marc Autret <autret_m@epita.fr>
18159
18160 * src/output.c (output_parser): Remove useless muscle.
18161
18162 2001-12-11 Marc Autret <autret_m@epita.fr>
18163
18164 * src/bison.simple: Remove #line just before %%epilogue. It
18165 is now handled in ...
18166 * src/reader.c (read_additionnal_code): Add the output of a
18167 #line for the epilogue.
18168
18169 2001-12-10 Marc Autret <autret_m@epita.fr>
18170
18171 * src/reader.c (copy_definition): Re-use CPP-outed code which
18172 replace precedent remove.
18173 * src/bison.simple: Remove #line before %%prologue because
18174 %%input-line is wrong at this time.
18175
18176 2001-12-10 Marc Autret <autret_m@epita.fr>
18177
18178 * src/reader.c (symbols_output): Clean up.
18179 * src/output.c (output_gram, output): Clean up.
18180
18181 2001-12-10 Akim Demaille <akim@epita.fr>
18182
18183 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18184 * src/LR0.c (set_state_table): here.
18185 * src/lalr.c (lalr): Call it.
18186
18187 2001-12-10 Akim Demaille <akim@epita.fr>
18188
18189 * src/state.h (shifts): Remove the `number' member: shifts are
18190 attached to state, hence no longer need to be labelled with a
18191 state number.
18192
18193 2001-12-10 Akim Demaille <akim@epita.fr>
18194
18195 Now that states have a complete set of members, the linked list of
18196 shifts is useless: just fill directly the state's shifts member.
18197
18198 * src/state.h (shifts): Remove the `next' member.
18199 * src/LR0.c (first_state, last_state): Remove.
18200 Adjust the callers.
18201 (augment_automaton): Don't look for the shifts that must be added
18202 a shift on EOF: it is those of the state we looked for! But now,
18203 since shifts are attached, it is no longer needed to looking
18204 merely by its id: its number.
18205
18206 2001-12-10 Akim Demaille <akim@epita.fr>
18207
18208 * src/LR0.c (augment_automaton): Better variable locality.
18209 Remove an impossible branch: if there is a state corresponding to
18210 the start symbol being shifted, then there is shift for the start
18211 symbol from the initial state.
18212
18213 2001-12-10 Akim Demaille <akim@epita.fr>
18214
18215 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18216 only when appropriate: when insert_start_shifting_state' is not
18217 invoked.
18218 * tests/regression.at (Rule Line Numbers): Adjust.
18219
18220 2001-12-10 Akim Demaille <akim@epita.fr>
18221
18222 * src/LR0.c (augment_automaton): Now that all states have shifts,
18223 merge the two cases addition shifts to the initial state.
18224
18225 2001-12-10 Akim Demaille <akim@epita.fr>
18226
18227 * src/lalr.c (set_state_table): Move to...
18228 * src/LR0.c: here.
18229 * src/lalr.c (lalr): Don't call it...
18230 * src/LR0.c (generate_states): do it.
18231 * src/LR0.h (first_state): Remove, only the table is used.
18232
18233 2001-12-10 Akim Demaille <akim@epita.fr>
18234
18235 * src/LR0.h (first_shift, first_reduction): Remove.
18236 * src/lalr.c: Don't use first_shift: find shifts through the
18237 states.
18238
18239 2001-12-10 Akim Demaille <akim@epita.fr>
18240
18241 * src/LR0.c: Attach shifts to states as soon as they are
18242 computed.
18243 * src/lalr.c (set_state_table): Instead of assigning shifts to
18244 state, just assert that the mapping was properly done.
18245
18246 2001-12-10 Akim Demaille <akim@epita.fr>
18247
18248 * src/LR0.c (insert_start_shift): Rename as...
18249 (insert_start_shifting_state): this.
18250 (insert_eof_shifting_state, insert_accepting_state): New.
18251 (augment_automaton): Adjust.
18252 Better locality of the variables.
18253 When looking if the start_symbol is shifted from the initial
18254 state, using `while (... symbol != start_symbol ...)' sounds
18255 better than `while (... symbol < start_symbol ...)': If fail
18256 to see how the order between symbols could be relevant!
18257
18258 2001-12-10 Akim Demaille <akim@epita.fr>
18259
18260 * src/getargs.h: Don't declare `spec_name_prefix' and
18261 `spec_file_prefix', declared by src/files.h.
18262 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18263 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18264 * src/output.c (prepare): Adjust.
18265 * src/reader.c (symbols_output): Likewise.
18266 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18267
18268 2001-12-10 Akim Demaille <akim@epita.fr>
18269
18270 * src/muscle_tab.c (muscle_init): NULL is a better default than
18271 `"0"'.
18272
18273 2001-12-10 Akim Demaille <akim@epita.fr>
18274
18275 * src/reader.c (reader): Calling symbols_output once is enough.
18276
18277 2001-12-10 Akim Demaille <akim@epita.fr>
18278
18279 Now that states have a complete set of members, the linked list of
18280 reductions is useless: just fill directly the state's reductions
18281 member.
18282
18283 * src/state.h (struct reductions): Remove member `number' and
18284 `next'.
18285 * src/LR0.c (first_reduction, last_reduction): Remove.
18286 (save_reductions): Don't link the new reductions, store them in
18287 this_state.
18288 * src/lalr.c (set_state_table): No need to attach reductions to
18289 states, it's already done.
18290 * src/output.c (output_actions): No longer free the shifts, then
18291 the reductions, then the states: free all the states and their
18292 members.
18293
18294 2001-12-10 Akim Demaille <akim@epita.fr>
18295
18296 * src/options.c (OPTN, DRTV, BOTH): New.
18297 (option_table): Use them.
18298
18299 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18300 the job of system.h.
18301 * src/options.c: Don't include stdio.h and xalloc.h for the same
18302 reasons.
18303
18304 2001-12-10 Akim Demaille <akim@epita.fr>
18305
18306 * src/output.c (output, prepare): Make sure the values of the
18307 muscles `action' and `prologue' are 0-terminated.
18308
18309 2001-12-10 Akim Demaille <akim@epita.fr>
18310
18311 Clean up GCC warnings.
18312
18313 * src/reader.c (copy_action): `buf' is not used.
18314 (parse_skel_decl): Be static.
18315 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18316 * src/options.h (create_long_option_table): Have a real prototype.
18317 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18318 (hash_delete_at): Return const void *.
18319 Adjust casts to preserve the const.
18320
18321 2001-12-10 Akim Demaille <akim@epita.fr>
18322
18323 * configure.in: Require 2.52g.
18324 M4 is not needed, but AUTOM4TE is.
18325 * m4/m4.m4: Remove.
18326 * tests/Makefile.am: Adjust.
18327
18328 2001-12-10 Akim Demaille <akim@epita.fr>
18329
18330 One structure for states is enough, even though theoretically
18331 there are LR(0) states and LALR(1) states.
18332
18333 * src/lalr.h (state_t): Remove.
18334 (state_table): Be state_t **, not state_t *.
18335 * src/state.h (core, CORE_ALLOC): Rename as...
18336 (state_t, STATE_ALLOC): this.
18337 Add the LALR(1) members: shifts, reductions, errs.
18338 * src/LR0.c (state_table): Rename as...
18339 (state_hash): this, to avoid name clashes with the global
18340 `state_table'.
18341 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18342 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18343
18344 2001-12-10 Akim Demaille <akim@epita.fr>
18345
18346 Bison dumps core on bash.y.
18347 Reported by Pascal Bart.
18348
18349 * src/warshall.c (bitmatrix_print): New.
18350 (TC): Use it.
18351 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
18352 j must be the outer loop.
18353 * tests/regression.at (Broken Closure): New.
18354
18355 2001-12-05 Akim Demaille <akim@epita.fr>
18356
18357 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18358 its argument.
18359 Reported by Peter Hamorsky.
18360
18361 2001-12-05 Akim Demaille <akim@epita.fr>
18362
18363 * src/conflicts.c (err_table): Remove.
18364 (resolve_sr_conflict): Adjust.
18365 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18366 Rename as...
18367 (state_t.reductions, state_t.shifts): this.
18368
18369 2001-12-05 Akim Demaille <akim@epita.fr>
18370
18371 * src/reduce.c (reduce_grammar_tables): No longer disable the
18372 removal of useless rules via CPP but via `if (0)', so that the
18373 compiler still check the code is valid.
18374 For instance, it should have noticed `rline' no longer exists: use
18375 the `line' member of rule_t.
18376 * src/gram.c (dummy, rline): Remove, unused.
18377
18378 2001-12-05 Akim Demaille <akim@epita.fr>
18379
18380 * src/output.c (pack_vector): Use assert, not berror.
18381 * src/main.c (berror): Remove, unused.
18382
18383 2001-12-05 Akim Demaille <akim@epita.fr>
18384
18385 New experimental feature: if --verbose --trace output all the
18386 items of a state, not only its kernel.
18387
18388 * src/print.c (print_core): If `trace_flag', then invoke closure
18389 before outputting the items of the state (print_core is no longer
18390 a correct name them).
18391 (print_results): Invoke new_closure/free_closure if needed.
18392
18393 2001-12-05 Akim Demaille <akim@epita.fr>
18394
18395 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18396 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18397 (nitemset): for consistency with the rest of the project.
18398
18399 2001-12-05 Akim Demaille <akim@epita.fr>
18400
18401 * src/closure.c (print_closure): Improve.
18402 (closure): Use it for printing input and output.
18403
18404 2001-12-05 Akim Demaille <akim@epita.fr>
18405
18406 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18407 indexed by nonterminals.
18408
18409 2001-12-05 Akim Demaille <akim@epita.fr>
18410
18411 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18412 what it was!).
18413 * src/warshall.h: Remove accidental duplication of the content.
18414
18415 2001-12-05 Akim Demaille <akim@epita.fr>
18416
18417 * src/closure.c (set_fderives): De-obfuscate.
18418
18419 2001-12-05 Akim Demaille <akim@epita.fr>
18420
18421 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18422
18423 2001-12-05 Akim Demaille <akim@epita.fr>
18424
18425 * src/closure.c (set_firsts): De-obfuscate.
18426
18427 2001-12-05 Akim Demaille <akim@epita.fr>
18428
18429 * src/output.c (action_row): De-obfuscate
18430 using the good o' techniques: arrays not pointers, variable
18431 locality, BITISSET, RESETBIT etc.
18432
18433 2001-12-05 Akim Demaille <akim@epita.fr>
18434
18435 Pessimize the code to simplify it: from now on, all the states
18436 have a valid SHIFTS, which NSHIFTS is possibly 0.
18437
18438 * src/LR0.c (shifts_new): Be global and move to..
18439 * src/state.c, src/state.h: here.
18440 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18441 * src/print_graph: Adjust.
18442
18443 2001-12-05 Akim Demaille <akim@epita.fr>
18444
18445 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18446 * src/conflicts.c: Use it.
18447 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18448 incorrectly ``simplified''.
18449
18450 2001-12-05 Akim Demaille <akim@epita.fr>
18451
18452 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18453 using the good o' techniques: arrays not pointers, variable
18454 locality, BITISSET, RESETBIT etc.
18455
18456 2001-12-05 Akim Demaille <akim@epita.fr>
18457
18458 * src/state.h (SHIFT_SYMBOL): New.
18459 * src/conflicts.c: Use it to deobfuscate.
18460
18461 2001-12-05 Akim Demaille <akim@epita.fr>
18462
18463 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18464 (print_reductions): De-obfuscate using the good o' techniques:
18465 arrays not pointers, variable locality, BITISSET.
18466
18467 2001-12-05 Akim Demaille <akim@epita.fr>
18468
18469 * src/conflicts.c (print_reductions): Arrays, not pointers.
18470 Use BITISSET.
18471
18472 2001-12-05 Akim Demaille <akim@epita.fr>
18473
18474 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18475
18476 2001-12-05 Akim Demaille <akim@epita.fr>
18477
18478 * src/conflicts.c (print_reductions): Improve variable locality.
18479
18480 2001-12-05 Akim Demaille <akim@epita.fr>
18481
18482 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18483
18484 2001-12-05 Akim Demaille <akim@epita.fr>
18485
18486 * src/conflicts.c (print_reductions): Improve variable locality.
18487
18488 2001-12-05 Akim Demaille <akim@epita.fr>
18489
18490 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18491 * src/lalr.c: Use them.
18492
18493 2001-12-05 Akim Demaille <akim@epita.fr>
18494
18495 * src/LR0.c (augment_automaton): Formatting changes.
18496 Better variable locality.
18497
18498 2001-12-05 Akim Demaille <akim@epita.fr>
18499
18500 * src/lalr.c (matrix_print): New.
18501 (transpose): Use it.
18502 Use arrays instead of pointers.
18503
18504 2001-12-05 Akim Demaille <akim@epita.fr>
18505
18506 * src/lalr.c (maxrhs): Move to...
18507 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18508 * src/lalr.c (build_relations): Adjust.
18509
18510 2001-12-05 Akim Demaille <akim@epita.fr>
18511
18512 * src/lalr.c (transpose): Free the memory allocated to the
18513 argument, as it is replaced by the results by the unique caller.
18514 (build_relations): Merely invoke transpose: it handles the memory
18515 deallocation.
18516 Improve variable locality.
18517 Avoid variables used as mere abbreviations.
18518 (compute_lookaheads): Use arrays instead of pointers.
18519
18520 2001-12-05 Akim Demaille <akim@epita.fr>
18521
18522 * src/lalr.c (initialize_F): Improve variable locality.
18523 Avoid variables used as mere abbreviations.
18524
18525 2001-12-05 Akim Demaille <akim@epita.fr>
18526
18527 * src/derives.c (print_derives): Display the ruleno.
18528 * src/lalr.c (initialize_F, transpose): Better variable locality
18529 to improve readability.
18530 Avoid variables used as mere abbreviations.
18531
18532 2001-12-05 Akim Demaille <akim@epita.fr>
18533
18534 * src/lalr.c (traverse): Use arrays instead of pointers.
18535
18536 2001-12-05 Akim Demaille <akim@epita.fr>
18537
18538 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18539 the handling of squeue.
18540 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18541
18542 2001-12-05 Akim Demaille <akim@epita.fr>
18543
18544 Because useless nonterminals are now kept alive (instead of being
18545 `destroyed'), we now sometimes examine them, and store information
18546 related to them. Hence we need to know their number, and adjust
18547 memory allocations.
18548
18549 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18550 static.
18551 * src/LR0.c (allocate_itemsets): The memory allocated to
18552 `symbol_count' was used for two different purpose: once to count
18553 the number of occurrences of each symbol, and later reassigned to
18554 `shift_symbol', containing the symbol that can be shifted from a
18555 given state.
18556 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18557 only, and...
18558 (new_itemsets): Allocate `shift_symbol' here.
18559 (allocate_itemsets): symbol_count includes useless nonterminals.
18560 Make room for them.
18561 (free_storage): Use `free', not `XFREE', for pointers that cannot
18562 be null.
18563
18564 2001-12-05 Akim Demaille <akim@epita.fr>
18565
18566 * src/nullable.c (set_nullable): Deobfuscate the handling of
18567 ritem.
18568 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18569
18570 2001-12-05 Akim Demaille <akim@epita.fr>
18571
18572 * src/gram.c, src/gram.h (ritem_print): New.
18573 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18574 (This useless function was defined only to work around VMS linkers
18575 that can't handle compilation units with variables only).
18576 * src/reduce.c (dump_grammar): Use it to trace the construction of
18577 ritem.
18578
18579 2001-12-04 Paul Eggert <eggert@twinsun.com>
18580
18581 * src/bison.simple (union yyalloc): Change member names
18582 to be the same as the stack names.
18583 (yyparse): yyptr is now union yyalloc *, not char *.
18584 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18585 and may generate better code on some machines.
18586 (yystpcpy): Use prototype if __STDC__ is defined, not just
18587 if __cplusplus is defined.
18588
18589 2001-11-30 Akim Demaille <akim@epita.fr>
18590
18591 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18592 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18593 Gettext doesn't compile cleanly, and dies with -Werror.
18594 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18595 Include WARNING_CFLAGS here.
18596 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18597 before being defined.
18598
18599 2001-11-27 Paul Eggert <eggert@twinsun.com>
18600
18601 * lib/quotearg.h (quotearg_n, quotearg_n_style):
18602 First arg is int, not unsigned.
18603 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18604 (SIZE_MAX, UINT_MAX): New macros.
18605 (quotearg_n_options): Abort if N is negative.
18606 Avoid overflow check on hosts where size_t is 64 bits and int
18607 is 32 bits, as overflow is impossible there.
18608 Fix off-by-one typo that caused unnecessary reallocation.
18609
18610 2001-11-29 Paul Eggert <eggert@twinsun.com>
18611
18612 Name space cleanup in generated parser.
18613
18614 * doc/bison.texinfo (Bison Parser): Discuss system headers
18615 and their effect on the user name space.
18616
18617 * src/bison.simple:
18618 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
18619 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
18620 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
18621
18622 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
18623 on user names when possible.
18624
18625 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
18626 Simplify test for whather <alloca.h> exists.
18627
18628 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
18629
18630 (<stdio.h>): Include if YYDEBUG.
18631
18632 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
18633 ! defined (yyoverflow) && ! defined (yymemcpy).
18634
18635 (yymemcpy, yyparse): Rename local variables as needed so that
18636 they all begin with 'yy'.
18637
18638 (yystrlen, yystpcpy): New functions.
18639
18640 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
18641 All uses changed.
18642
18643 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
18644 instead of relying on string.h functions. Use YYSTACK_ALLOC
18645 and YYSTACK_FREE instead of malloc and free.
18646
18647 2001-11-30 Akim Demaille <akim@epita.fr>
18648
18649 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
18650 before their first uses.
18651 (YYBISON, YYPURE): Move to the top of the output.
18652
18653 2001-11-30 Akim Demaille <akim@epita.fr>
18654
18655 * tests/reduce.at (Useless Nonterminals): Fix.
18656
18657 2001-11-30 Akim Demaille <akim@epita.fr>
18658
18659 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
18660 if body instead of `;' to pacify GCC's warnings.
18661
18662 2001-11-30 Akim Demaille <akim@epita.fr>
18663
18664 Instead of mapping the LHS of unused rules to -1, keep the LHS
18665 valid, but flag the rules as invalid.
18666
18667 * src/gram.h (rule_t): `useful' is a new member.
18668 * src/print.c (print_grammar): Adjust.
18669 * src/derives.c (set_derives): Likewise.
18670 * src/reader.c (packgram, reduce_output): Likewise.
18671 * src/reduce.c (reduce_grammar_tables): Likewise.
18672 * tests/reduce.at (Underivable Rules, Useless Rules): New.
18673
18674 2001-11-30 Akim Demaille <akim@epita.fr>
18675
18676 * src/reduce.c (reduce_output): Formatting changes.
18677 * src/print.c (print_results, print_grammar): Likewise.
18678 * tests/regression.at (Rule Line Numbers)
18679 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
18680
18681 2001-11-30 Akim Demaille <akim@epita.fr>
18682
18683 * src/reduce.c (nonterminals_reduce): Instead of throwing away
18684 useless nonterminals, move them at the end of the symbol arrays.
18685 (reduce_output): Adjust.
18686 * tests/reduce.at (Useless Nonterminals): Adjust.
18687
18688 2001-11-30 Akim Demaille <akim@epita.fr>
18689
18690 * src/reduce.c: Various comment/formatting changes.
18691 (nonterminals_reduce): New, extracted from...
18692 (reduce_grammar_tables): here.
18693 (reduce_grammar): Call nonterminals_reduce.
18694
18695 2001-11-29 Paul Eggert <eggert@twinsun.com>
18696
18697 * src/bison.simple (YYSTACK_REALLOC): Remove.
18698 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
18699 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
18700 New macros.
18701 (union yyalloc): New type.
18702 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
18703 an arbitrary restriction on hosts where size_t is wider than int.
18704
18705 (yyparse): Don't dump core if alloca or malloc fails; instead, report
18706 a parser stack overflow. Allocate just one block of memory for all
18707 three stacks, instead of allocating three blocks; this typically is
18708 faster and reduces fragmentation.
18709
18710 Do not limit the number of items in the stack to a value that fits
18711 in 'int', as this is an arbitrary limit on hosts with 64-bit
18712 size_t and 32-bit int.
18713
18714 2001-11-29 Marc Autret <autret_m@epita.fr>
18715
18716 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
18717 of defining YYERROR_VERBOSE.
18718 [AT_DATA]: $4 is now out of C declarations in the prologue.
18719
18720 2001-11-28 Marc Autret <autret_m@epita.fr>
18721
18722 * src/reader.c (parse_dquoted_param): New.
18723 (parse_skel_decl): Use it.
18724 * src/lex.h: Add its prototype.
18725 * src/lex.c (literalchar): Become not static.
18726
18727 2001-11-28 Marc Autret <autret_m@epita.fr>
18728
18729 * src/output.h: And put its extern declaration here.
18730 * src/output.c (error_verbose): Define here.
18731 (prepare): Echo name modification.
18732 * src/getargs.h: Clean its extern declaration.
18733 * src/getargs.c (error_verbose_flag): Remove.
18734 (getargs): Remove case 'e'.
18735 * src/options.c (option_table): 'error-verbose' is now seen as simple
18736 percent option.
18737 Include output.h.
18738
18739 * src/reader.c (read_declarations): Remove case tok_include.
18740 (parse_include_decl): Remove.
18741 * src/lex.h (token_t): Remove tok_include.
18742 * src/options.c (option_table): 'include' is now a simple command line
18743 option.
18744
18745 2001-11-28 Marc Autret <autret_m@epita.fr>
18746
18747 * src/bison.simple: Adjust muscle names.
18748 * src/muscle_tab.c (muscle_init): Also rename the muscles.
18749 * src/output.c (prepare): s/_/-/ for the muscles names.
18750 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
18751
18752 2001-11-28 Marc Autret <autret_m@epita.fr>
18753
18754 * src/bison.simple: Fix debug.
18755 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
18756
18757 2001-11-28 Akim Demaille <akim@epita.fr>
18758
18759 * src/LR0.c (shifts_new): New.
18760 (save_shifts, insert_start_shift, augment_automaton): Use it.
18761
18762 2001-11-28 Akim Demaille <akim@epita.fr>
18763
18764 * src/closure.c (closure): `b' and `ruleno' denote the same value:
18765 keep ruleno only.
18766
18767 2001-11-28 Akim Demaille <akim@epita.fr>
18768
18769 * src/closure.c (closure): Instead of looping over word in array
18770 then bits in words, loop over bits in array.
18771
18772 2001-11-28 Akim Demaille <akim@epita.fr>
18773
18774 * src/closure.c (closure): No longer optimize the special case
18775 where all the bits of `ruleset[r]' are set to 0, to make the code
18776 clearer.
18777
18778 2001-11-28 Akim Demaille <akim@epita.fr>
18779
18780 * src/closure.c (closure): `r' and `c' are new variables, used to
18781 de-obfuscate accesses to RULESET and CORE.
18782
18783 2001-11-28 Akim Demaille <akim@epita.fr>
18784
18785 * src/reduce.c (reduce_print): Use ngettext.
18786 (dump_grammar): Improve the trace accuracy.
18787
18788 2001-11-28 Akim Demaille <akim@epita.fr>
18789
18790 * src/reduce.c (dump_grammar): Don't translate trace messages.
18791
18792 2001-11-28 Akim Demaille <akim@epita.fr>
18793
18794 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
18795 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
18796 as all tags are free'ed afterwards.
18797 From Enrico Scholz.
18798
18799 2001-11-27 Paul Eggert <eggert@twinsun.com>
18800
18801 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
18802 use alloca when we didn't want to, and vice versa.
18803
18804 2001-11-27 Marc Autret <autret_m@epita.fr>
18805
18806 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
18807 initialization.
18808 * src/output.c (prepare): Remove its update.
18809
18810 2001-11-27 Marc Autret <autret_m@epita.fr>
18811
18812 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
18813 Use %error-verbose.
18814
18815 2001-11-27 Marc Autret <autret_m@epita.fr>
18816
18817 * src/bison.simple: Remove YYERROR_VERBOSE using.
18818 Use %%error_verbose.
18819 (yyparse): Likewise.
18820 * src/output.c (prepare): Give its final value.
18821 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
18822 * src/getargs.h: Add its extern declaration.
18823 * src/getargs.c (error_verbose_flag): New int.
18824 (getargs): Update to catch new case.
18825 * src/options.c (option_table): 'error-verbose' is a new option.
18826 (shortopts): Update.
18827
18828 2001-11-27 Akim Demaille <akim@epita.fr>
18829
18830 * src/system.h: Use intl/libgettext.h.
18831 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
18832
18833 2001-11-27 Akim Demaille <akim@epita.fr>
18834
18835 * tests/torture.at (Exploding the Stack Size with Malloc):
18836 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
18837
18838 2001-11-27 Akim Demaille <akim@epita.fr>
18839
18840 * src/files.c: Include error.h.
18841 Reported by Hans Aberg.
18842
18843 2001-11-26 Marc Autret <autret_m@epita.fr>
18844
18845 * src/reader.c (parse_include_decl): New, not yet implemented.
18846 (read_declarations): Add case tok_include.
18847 * src/getargs.h (include): Add its extern definition.
18848 * src/getargs.c (include): New const char *.
18849 (getargs): Add case '-I'.
18850 * src/options.c (option_table): Add include as command line and
18851 percent option.
18852 * src/lex.h (token_t): Add tok_include.
18853
18854 2001-11-26 Akim Demaille <akim@epita.fr>
18855
18856 * src/reader.c (readgram): Make sure rules for mid-rule actions
18857 have a lineno equal to that of their host rule.
18858 Reported by Hans Aberg.
18859 * tests/regression.at (Rule Line Numbers): New.
18860
18861 2001-11-26 Akim Demaille <akim@epita.fr>
18862
18863 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
18864 size_ts.
18865
18866 2001-11-26 Akim Demaille <akim@epita.fr>
18867
18868 * src/complain.c, src/complain.h (error): Remove, provided by
18869 lib/error.[ch].
18870
18871 2001-11-26 Akim Demaille <akim@epita.fr>
18872
18873 * src/reader.c (read_declarations): Don't abort on tok_illegal,
18874 issue an error message.
18875 * tests/regression.at (Invalid %directive): New.
18876 Reported by Hans Aberg.
18877
18878 2001-11-26 Akim Demaille <akim@epita.fr>
18879
18880 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
18881 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18882
18883 2001-11-26 Akim Demaille <akim@epita.fr>
18884
18885 * src/conflicts.c (conflicts_print): Don't complain at all when
18886 there are no reduce/reduce conflicts, and as many shift/reduce
18887 conflicts as expected.
18888 * tests/regression.at (%expect right): Adjust.
18889
18890 2001-11-23 Akim Demaille <akim@epita.fr>
18891
18892 * lib/alloca.c: Update, from fileutils.
18893
18894 2001-11-23 Akim Demaille <akim@epita.fr>
18895
18896 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
18897
18898 2001-11-23 Akim Demaille <akim@epita.fr>
18899
18900 * src/system.h: Include alloca.h.
18901 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
18902
18903 2001-11-23 Akim Demaille <akim@epita.fr>
18904
18905 * src/print_graph.c (print_actions): Remove `rule', unused.
18906 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
18907 pacify GCC's signed < unsigned warnings.
18908 * src/closure.c (itemsetsize): Likewise.
18909 * src/reader.c (symbol_list_new): Static.
18910
18911 2001-11-23 Akim Demaille <akim@epita.fr>
18912
18913 Attaching lineno to buckets is stupid, since only one copy of each
18914 symbol is kept, only the line of the first occurrence is kept too.
18915
18916 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
18917 * src/reader.c (rline_allocated): Remove, unused.
18918 (symbol_list): Have a `line' member.
18919 (symbol_list_new): New.
18920 (readgram): Use it.
18921 * src/print.c (print_grammar): Output the rule line numbers.
18922 * tests/regression.at (Solved SR Conflicts)
18923 (Unresolved SR Conflicts): Adjust.
18924 Reported by Hans Aberg.
18925
18926 2001-11-22 Marc Autret <autret_m@epita.fr>
18927
18928 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
18929
18930 2001-11-22 Marc Autret <autret_m@epita.fr>
18931
18932 * src/muscle_tab.c (muscle_init): Remove initialization of
18933 skeleton muscle.
18934 * src/output.c (output_master_parser): Do it here.
18935
18936 2001-11-20 Akim Demaille <akim@epita.fr>
18937
18938 * po/sv.po: New.
18939 * configure.in (ALL_LINGUAS): Adjust.
18940 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
18941 longer contains strings to translate.
18942
18943 2001-11-19 Akim Demaille <akim@epita.fr>
18944
18945 * src/conflicts.c (conflicts_print): Add a missing \n.
18946
18947 2001-11-19 Akim Demaille <akim@epita.fr>
18948
18949 * src/nullable.c (nullable_print): New.
18950 (set_nullable): Call it when tracing.
18951 Better locality of variables.
18952
18953 2001-11-19 Akim Demaille <akim@epita.fr>
18954
18955 * src/print.c (print_actions): Better locality of variables.
18956
18957 2001-11-19 Akim Demaille <akim@epita.fr>
18958
18959 * src/derives.c (print_derives): Fix and enrich.
18960 * src/closure.c (print_fderives): Likewise.
18961
18962 2001-11-19 Akim Demaille <akim@epita.fr>
18963
18964 * src/closure.c (itemsetend): Remove, replaced with...
18965 (itemsetsize): new.
18966
18967 2001-11-19 Akim Demaille <akim@epita.fr>
18968
18969 * src/LR0.c (kernel_end): Remove, replaced with...
18970 (kernel_size): new.
18971
18972 2001-11-19 Akim Demaille <akim@epita.fr>
18973
18974 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
18975 to clarify.
18976
18977 2001-11-19 Akim Demaille <akim@epita.fr>
18978
18979 * src/closure.c (closure): Use arrays instead of pointers to clarify.
18980
18981 2001-11-19 Akim Demaille <akim@epita.fr>
18982
18983 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
18984 trace messages.
18985 * src/LR0.c: Likewise.
18986 (allocate_itemsets): Use arrays instead of pointers to clarify.
18987
18988 2001-11-19 Akim Demaille <akim@epita.fr>
18989
18990 * src/getargs.c (statistics_flag): Replace with...
18991 (trace_flag): New.
18992 (longopts): Accept --trace instead of --statistics.
18993 * src/getargs.h, src/options.c: Adjust.
18994 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
18995 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
18996
18997 2001-11-19 Akim Demaille <akim@epita.fr>
18998
18999 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19000 pointers to clarify the code.
19001 (save_reductions, save_shifts): Factor common parts of alternatives.
19002
19003 2001-11-19 Akim Demaille <akim@epita.fr>
19004
19005 * src/LR0.c (new_state, get_state): Complete TRACE code.
19006 * src/closure.c: Include `reader.h' to get `tags', needed by the
19007 trace code.
19008 Rename the conditional DEBUG as TRACE.
19009 Output consistently TRACEs to stderr, not stdout.
19010 * src/derives.c: Likewise.
19011 * src/reduce.c: (inaccessable_symbols): Using if is better style
19012 than goto.
19013 Use `#if TRACE' instead of `#if 0' for tracing code.
19014
19015 2001-11-19 Akim Demaille <akim@epita.fr>
19016
19017 * src/system.h (LIST_FREE, shortcpy): New.
19018 * src/LR0.c: Use them.
19019 * src/output.c (free_itemsets, free_reductions, free_shifts):
19020 Remove, replaced by LIST_FREE.
19021
19022 2001-11-19 Akim Demaille <akim@epita.fr>
19023
19024 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19025 (REDUCTIONS_ALLOC): New.
19026 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19027 allocation.
19028
19029 2001-11-19 Akim Demaille <akim@epita.fr>
19030
19031 * src/LR0.c (new_state): Complete trace code.
19032 * src/nullable.c (set_nullable): Don't translate traces.
19033
19034 2001-11-19 Akim Demaille <akim@epita.fr>
19035
19036 * src/print_graph.c (print_core): Better locality of variables.
19037 * src/print.c (print_core): Likewise.
19038
19039 2001-11-19 Akim Demaille <akim@epita.fr>
19040
19041 * src/vcg.c: You do the output, so you are responsible of the
19042 handling of VCG syntax, in particular: use quotearg.
19043 * src/print_graph.c: Don't.
19044 (print_actions): Don't output the actions as part of the nodes,
19045 since that's the job of the edges.
19046 (print_state): Don't output by hand: fill the node description,
19047 and ask for its output.
19048
19049 2001-11-19 Akim Demaille <akim@epita.fr>
19050
19051 * src/bison.simple (yyparse): When verbosely reporting an error,
19052 no longer put additional quotes around token names.
19053 * tests/calc.at: Adjust.
19054
19055 2001-11-19 Akim Demaille <akim@epita.fr>
19056
19057 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19058 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19059 * src/output.c: Adjust.
19060
19061 2001-11-19 Akim Demaille <akim@epita.fr>
19062
19063 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19064 (rule_t): this.
19065 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19066
19067 2001-11-19 Akim Demaille <akim@epita.fr>
19068
19069 * src/gram.h (rule_t): New.
19070 (rule_table): New.
19071 (rrhs, rlhs): Remove, part of state_t.
19072 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19073 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19074 * src/reader.c, src/reduce.c: Adjust.
19075
19076 2001-11-19 Akim Demaille <akim@epita.fr>
19077
19078 * src/reader.c (symbols_output): New, extracted from...
19079 (packsymbols): Here.
19080 (reader): Call it.
19081
19082 2001-11-19 Akim Demaille <akim@epita.fr>
19083
19084 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19085 (maxrhs): this new function.
19086
19087 2001-11-19 Akim Demaille <akim@epita.fr>
19088
19089 * src/lalr.c (F): New macro to access the variable F.
19090 Adjust.
19091
19092 2001-11-19 Akim Demaille <akim@epita.fr>
19093
19094 * src/lalr.h (LA): New macro to access the variable LA.
19095 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19096 * src/lalr.c: Adjust.
19097
19098 2001-11-19 Akim Demaille <akim@epita.fr>
19099
19100 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19101 (set_state_table): handle the `lookaheads' members.
19102
19103 2001-11-19 Akim Demaille <akim@epita.fr>
19104
19105 * src/lalr.h (lookaheads): Removed array, whose contents is now
19106 a member of...
19107 (state_t): this structure.
19108 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19109 Adjust.
19110
19111 2001-11-19 Akim Demaille <akim@epita.fr>
19112
19113 * src/lalr.h (consistent): Removed array, whose contents is now
19114 a member of...
19115 (state_t): this structure.
19116 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19117 Adjust.
19118
19119 2001-11-19 Akim Demaille <akim@epita.fr>
19120
19121 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19122 contents are now members of...
19123 (state_t): this structure.
19124 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19125 Adjust.
19126
19127 2001-11-19 Akim Demaille <akim@epita.fr>
19128
19129 * src/lalr.h (state_t): New.
19130 (state_table): Be a state_t * instead of a core **.
19131 (accessing_symbol): Remove, part of state_t.
19132 * src/lalr.c: Adjust.
19133 (set_accessing_symbol): Merge into...
19134 (set_state_table): this.
19135 * src/print_graph.c, src/conflicts.c: Adjust.
19136
19137 2001-11-14 Akim Demaille <akim@epita.fr>
19138
19139 * tests/calc.at, tests/output.at, tests/regression.at,
19140 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19141 now the tests are run in private dirs, therefore AC_CLEANUP and
19142 family can be simplified to 0-ary.
19143 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19144 use abs. path to find config.h.
19145 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19146 stderr, there can be way too much random noise.
19147 Instead pass -Werror to GCC and rely on the exit status.
19148 Reported by Wolfram Wagner.
19149
19150 2001-11-14 Akim Demaille <akim@epita.fr>
19151
19152 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19153 defined only if yyoverflow is defined, to avoid `warning: unused
19154 variable `yyvs1''.
19155 Reported by The Test Suite.
19156
19157 2001-11-14 Akim Demaille <akim@epita.fr>
19158
19159 * src/print.c: Include reduce.h.
19160 Reported by Hans Aberg.
19161
19162 2001-11-14 Akim Demaille <akim@epita.fr>
19163
19164 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19165 Revert a previous patch: these are really const.
19166 * src/conflicts.c (conflict_report): Additional useless pair of
19167 braces to pacify GCC's warnings for `if () if () {} else {}'.
19168 * src/lex.c (parse_percent_token): Replace equal_offset with
19169 arg_offset.
19170 arg is const.
19171 Be sure to strdup `arg' when used, since there is no reason for
19172 token_buffer not to change.
19173
19174 2001-11-14 Akim Demaille <akim@epita.fr>
19175
19176 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19177 definition.
19178 * src/main.c (main): Use them.
19179 Suggested by Hans Aberg.
19180
19181 2001-11-12 Akim Demaille <akim@epita.fr>
19182
19183 * src/system.h (ngettext): Now that we use ngettext, be sure to
19184 provide a default definition when NLS are not used.
19185
19186 2001-11-12 Akim Demaille <akim@epita.fr>
19187
19188 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19189 Use @kbd to denote user input.
19190 (Language and Grammar): ANSIfy the example.
19191 Adjust its layout for info/notinfo.
19192 (Location Tracking Calc): Output error messages to stderr.
19193 Output locations in a more GNUtically correct way.
19194 Fix a couple of Englishos.
19195 Adjust @group/@end group pairs.
19196
19197 2001-11-12 Akim Demaille <akim@epita.fr>
19198
19199 %expect was not functioning at all.
19200
19201 * src/conflicts.c (expected_conflicts): Set to -1.
19202 (conflict_report): Use ngettext.
19203 (conflicts_print): Check %expect and make its violation an error.
19204 * doc/bison.texinfo (Expect Decl): Adjust.
19205 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19206 * tests/regression.at (%expect not enough, %expect right)
19207 (%expect too much): New.
19208
19209 2001-11-12 Akim Demaille <akim@epita.fr>
19210
19211 * tests/regression.at (Conflicts): Rename as...
19212 (Unresolved SR Conflicts): this.
19213 (Solved SR Conflicts): New.
19214
19215 2001-11-12 Akim Demaille <akim@epita.fr>
19216
19217 * src/reduce.c (print_results): Rename as...
19218 (reduce_output): This.
19219 Output to OUT, passed as argument, instead of output_obstack.
19220 (dump_grammar): Likewise.
19221 (reduce_free): New.
19222 Also free V1.
19223 (reduce_grammar): No longer call reduce_output, since...
19224 * src/print.c (print_results): do it.
19225 * src/main.c (main): Call reduce_free;
19226
19227 2001-11-12 Akim Demaille <akim@epita.fr>
19228
19229 * src/conflicts.c (print_reductions): Accept OUT as argument.
19230 Output to it, not to output_obstack.
19231 * src/print.c (print_actions): Adjust.
19232
19233 2001-11-12 Akim Demaille <akim@epita.fr>
19234
19235 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19236 the result instead of using...
19237 (src_total, rrc_total, src_count, rrc_count): Remove.
19238 (any_conflicts): Remove.
19239 (print_conflicts): Split into...
19240 (conflicts_print, conflicts_output): New.
19241 * src/conflicts.h: Adjust.
19242 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19243 * src/print.c (print_grammar): Issue `\n' between two rules.
19244 * tests/regression.at (Conflicts): New.
19245 Reported by Tom Lane.
19246
19247 2001-11-12 Akim Demaille <akim@epita.fr>
19248
19249 * tests/regression.at (Invalid input): Remove, duplicate with
19250 ``Invalid input: 1''.
19251
19252 2001-11-12 Akim Demaille <akim@epita.fr>
19253
19254 * tests/torture.at (AT_DATA_STACK_TORTURE)
19255 (Exploding the Stack Size with Alloca)
19256 (Exploding the Stack Size with Malloc): New.
19257
19258 2001-11-12 Akim Demaille <akim@epita.fr>
19259
19260 * src/bison.simple (YYSTACK_REALLOC): New.
19261 (yyparse) [!yyoverflow]: Use it and free the old stack.
19262 Reported by Per Allansson.
19263
19264 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19265
19266 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19267 define CPP macro, which substitute YYSTYPE by yystype.
19268 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19269 with yyltype/YYLTYPE. This allows inclusion of the generated
19270 header within the parser if the compiler, such as GGC, accepts
19271 multiple equivalent #defines.
19272 From Akim.
19273
19274 2001-11-05 Akim Demaille <akim@epita.fr>
19275
19276 * src/reader.c (symbols_output): New, extracted from...
19277 (packsymbols): here.
19278 (reader): Adjust.
19279
19280 2001-11-05 Akim Demaille <akim@epita.fr>
19281
19282 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19283
19284 2001-11-05 Akim Demaille <akim@epita.fr>
19285
19286 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19287 pattern.
19288
19289 2001-11-05 Akim Demaille <akim@epita.fr>
19290
19291 * src/options.h (struct option_table_struct): set_flags is void*.
19292 * src/options.c (longopts): Support `--output' and `%output'.
19293 (usage): Adjust.
19294 * src/lex.h (tok_setopt): Remove, replaced with...
19295 (tok_intopt, tok_stropt): these new guys.
19296 * src/lex.c (getopt.h): Not needed.
19297 (token_buffer, unlexed_token_buffer): Not const.
19298 (percent_table): Promote `-' over `_' in directive names.
19299 Active `%name-prefix', `file-prefix', and `output'.
19300 (parse_percent_token): Accept possible arguments to directives.
19301 Promote `-' over `_' in directive names.
19302
19303 2001-11-04 Akim Demaille <akim@epita.fr>
19304
19305 * doc/bison.texinfo (Decl Summary): Split the list into
19306 `directives for grammars' and `directives for bison'.
19307 Sort'em.
19308 Add description of `%name-prefix', `file-prefix', and `output'.
19309 Promote `-' over `_' in directive names.
19310 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19311 Simplify the description of `--name-prefix'.
19312 Promote `-' over `_' in directive names.
19313 Promote `--output' over `--output-file'.
19314 Fix the description of `--defines'.
19315 * tests/output.at: Exercise %file-prefix and %output.
19316
19317 2001-11-02 Akim Demaille <akim@epita.fr>
19318
19319 * doc/refcard.tex: Update.
19320
19321 2001-11-02 Akim Demaille <akim@epita.fr>
19322
19323 * src/symtab.h (SUNDEF): New.
19324 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19325 stand for `uninitialized', instead of 0.
19326 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19327 * src/lex.c (lex): Adjust.
19328
19329 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19330 Number it 0.
19331 Let yylex return it instead of a plain 0.
19332 Reported by Dick Streefland.
19333
19334 2001-11-02 Akim Demaille <akim@epita.fr>
19335
19336 * tests/regression.at (Mixing %token styles): New test.
19337
19338 2001-11-02 Akim Demaille <akim@epita.fr>
19339
19340 * src/reader.c (parse_thong_decl): Formatting changes.
19341 (token_translations_init): New, extracted from...
19342 (packsymbols): Here.
19343 Adjust.
19344
19345 2001-11-01 Akim Demaille <akim@epita.fr>
19346
19347 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19348 Check that `9foo.y' produces correct cpp guards.
19349 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19350 guards.
19351 Reported by Wwp.
19352
19353 2001-11-01 Akim Demaille <akim@epita.fr>
19354
19355 * tests/regression.at (Invalid input: 2): New.
19356 * src/lex.c (unlexed_token_buffer): New.
19357 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19358 too.
19359 Reported by Wwp.
19360
19361 2001-11-01 Akim Demaille <akim@epita.fr>
19362
19363 * tests/calc.at: Catch up with 1.30.
19364 * configure.in: Bump to 1.49a.
19365 Adjust to newer Autotest.
19366
19367 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
19368
19369 * src/conflicts.c: Move global variables rrc_total and src_total ...
19370 (print_conflicts): here.
19371 * src/output.c (output): Free global variable user_toknums.
19372 * src/lex.c (token_obstack): Become static.
19373
19374 2001-10-18 Akim Demaille <akim@epita.fr>
19375
19376 * tests/atlocal.in (GCC): Add.
19377 * tests/calc.at: s/m4_match/m4_bmatch/.
19378 s/m4_patsubst/m4_bpatsubst/.
19379 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19380 * configure.in: AC_SUBST(GCC).
19381
19382 2001-10-14 Marc Autret <autret_m@epita.fr>
19383
19384 * src/options.c (create_long_option_table): Fix.
19385
19386 2001-10-10 Akim Demaille <akim@epita.fr>
19387
19388 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19389
19390 2001-10-04 Akim Demaille <akim@epita.fr>
19391
19392 * src/reader.c (parse_union_decl): Push the caracters in
19393 union_obstack, not attrs_obstack.
19394
19395 2001-10-04 Akim Demaille <akim@epita.fr>
19396
19397 Merge in the branch 1.29.
19398
19399 * src/reader.c (packsymbols): Use a temporary obstack for
19400 `%%tokendef', since output_stack is already used elsewhere.
19401
19402 2001-10-02 Akim Demaille <akim@epita.fr>
19403
19404 Bump 1.29d.
19405
19406 2001-10-02 Akim Demaille <akim@epita.fr>
19407
19408 Version 1.29c.
19409
19410 2001-10-02 Akim Demaille <akim@epita.fr>
19411
19412 * tests/regression.at (Invalid CPP headers): New.
19413 From Alexander Belopolsky.
19414 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19415
19416 2001-10-02 Akim Demaille <akim@epita.fr>
19417
19418 * tests/regression.at (Invalid input): New.
19419 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19420 Reported by Shura.
19421
19422 2001-10-02 Akim Demaille <akim@epita.fr>
19423
19424 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19425
19426 2001-10-02 Akim Demaille <akim@epita.fr>
19427
19428 * src/output.c (output_parser): Assert `skeleton'.
19429 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19430 systems.
19431 From Shura.
19432
19433 2001-10-01 Marc Autret <autret_m@epita.fr>
19434
19435 * src/lex.h: Echo modifications.
19436 * src/lex.c (unlex): Parameter is now token_t.
19437 From Hans Aberg.
19438
19439 2001-10-01 Marc Autret <autret_m@epita.fr>
19440
19441 * src/main.c: Include lex.h.
19442 From Hans Aberg.
19443
19444 2001-09-29 Akim Demaille <akim@epita.fr>
19445
19446 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19447
19448 2001-09-28 Akim Demaille <akim@epita.fr>
19449
19450 * tests/testsuite.at: Update to newer Autotest.
19451 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19452
19453 2001-09-27 Akim Demaille <akim@epita.fr>
19454
19455 Position independent wrapper.
19456
19457 * tests/bison: Remove.
19458 * tests/bison.in: New.
19459 * configure.in: Adjust.
19460
19461 2001-09-27 Paul Eggert <eggert@twinsun.com>
19462
19463 Port quotearg fixes from tar 1.13.24.
19464
19465 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19466 tm to be declared.
19467 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19468 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19469
19470 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19471 * m4/mbrtowc.m4: New file.
19472 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19473 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19474
19475 2001-09-27 Akim Demaille <akim@epita.fr>
19476
19477 Bump to 1.29c.
19478
19479 2001-09-27 Akim Demaille <akim@epita.fr>
19480
19481 Version 1.29b.
19482
19483 2001-09-25 Akim Demaille <akim@epita.fr>
19484
19485 * src/system.h: Include `xalloc.h'.
19486 Remove it from the C files.
19487 * src/files.c (output_files): Free the obstacks.
19488 * src/lex.c (init_lex): Rename as...
19489 (lex_init): this.
19490 (lex_free): New.
19491 * src/main.c (main): Use it.
19492
19493 2001-09-24 Marc Autret <autret_m@epita.fr>
19494
19495 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19496 to output informations in fout (FILE*).
19497 (open_graph, close_graph): Likewise.
19498 (output_graph, output_edge, output_node): Likewise.
19499 * src/vcg.h: Update function prototypes.
19500 * src/print_graph.c (print_graph): Open output graph file.
19501 (print_actions): Adjust.
19502 * src/files.h: Remove extern declaration.
19503 * src/files.c: Remove graph_obstack declaration.
19504 (open_files): Remove graph_obstack initialization.
19505 (output_files): Remove graph_obstack saving.
19506
19507 2001-09-24 Marc Autret <autret_m@epita.fr>
19508
19509 * src/files.c (compute_output_file_names): Fix.
19510
19511 2001-09-24 Marc Autret <autret_m@epita.fr>,
19512 Akim Demaille <akim@epita.fr>
19513
19514 * src/reader.c (reader): Remove call to free_symtab ().
19515 * src/main.c (main): Call it here.
19516 Include symtab.h.
19517 * src/conflicts.c (initialize_conflicts): Rename as...
19518 (solve_conflicts): this.
19519 * src/print.c (print_core, print_actions, print_state)
19520 (print_grammar): Dump to a file instead a `output_obstack'.
19521 (print_results): Dump `output_obstack', and then proceed with the
19522 FILE *.
19523 * src/files.c (compute_output_file_names, close_files): New.
19524 (output_files): Adjust.
19525 * src/main.c (main): Adjust.
19526
19527 2001-09-23 Marc Autret <autret_m@epita.fr>
19528
19529 * src/files.c (compute_header_macro): Computes header macro name
19530 from spec_defines_file when given.
19531
19532 2001-09-23 Marc Autret <autret_m@epita.fr>
19533
19534 * src/files.c (output_files): Add default extensions.
19535
19536 2001-09-22 Akim Demaille <akim@epita.fr>
19537
19538 * src/conflicts.c (finalize_conflicts): Rename as...
19539 (free_conflicts): this.
19540
19541 2001-09-22 Akim Demaille <akim@epita.fr>
19542
19543 * src/gram.c (gram_free): Rename back as...
19544 (dummy): this.
19545 (output_token_translations): Free `token_translations'.
19546 * src/symtab.c (free_symtab): Free the tag field.
19547
19548 2001-09-22 Akim Demaille <akim@epita.fr>
19549
19550 Remove `translations' as it is always set to true.
19551
19552 * src/gram.h: Adjust.
19553 * src/reader.c (packsymbols, parse_token_decl): Adjust
19554 * src/print.c (print_grammar): Adjust.
19555 * src/output.c (output_token_translations): Adjust.
19556 * src/lex.c (lex): Adjust.
19557 * src/gram.c: Be sure the set pointers to NULL.
19558 (dummy): Rename as...
19559 (gram_free): this.
19560
19561 2001-09-22 Akim Demaille <akim@epita.fr>
19562
19563 * configure.in: Invoke AM_LIB_DMALLOC.
19564 * src/system.h: Use dmalloc.
19565 * src/LR0.c: Be sure to have pointers initialized to NULL.
19566 (allocate_itemsets): Allocate kernel_items only if needed.
19567
19568 2001-09-22 Akim Demaille <akim@epita.fr>
19569
19570 * configure.in: Bump to 1.29b.
19571 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19572 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19573 need xmalloc.c in calc.y.
19574 From Pascal Bart.
19575
19576 2001-09-21 Akim Demaille <akim@epita.fr>
19577
19578 Version 1.29a.
19579 * Makefile.maint, config/config.guess, config/config.sub,
19580 * config/missing: Update from masters.
19581 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19582 upon package.m4.
19583 * configure.in (ALL_LINGUAS): Add `tr'.
19584
19585 2001-09-21 Akim Demaille <akim@epita.fr>
19586
19587 * tests/Makefile.am (package.m4): Move to...
19588 ($(srcdir)/$(TESTSUITE)): here.
19589
19590 2001-09-20 Akim Demaille <akim@epita.fr>
19591
19592 * src/complain.c: No longer try to be standalone: use system.h.
19593 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19594 * src/complain.h: Likewise.
19595 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19596 Remove the unused variable `n'.
19597 From Albert Chin-A-Young.
19598
19599 2001-09-18 Marc Autret <autret_m@epita.fr>
19600
19601 * doc/bison.1: Update.
19602 * doc/bison.texinfo (Bison Options): Update --defines and --graph
19603 descriptions.
19604 (Option Cross Key): Update.
19605 Add --graph.
19606
19607 2001-09-18 Marc Autret <autret_m@epita.fr>
19608
19609 * tests/regression.at: New test (comment in %union).
19610
19611 2001-09-18 Marc Autret <autret_m@epita.fr>
19612
19613 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
19614 do that.
19615 Reported by Keith Browne.
19616
19617 2001-09-18 Marc Autret <autret_m@epita.fr>
19618
19619 * tests/output.at: Add tests for --defines and --graph.
19620
19621 2001-09-18 Marc Autret <autret_m@epita.fr>
19622
19623 * tests/output.at: Removes tests of %{header,src}_extension features.
19624
19625 2001-09-18 Akim Demaille <akim@epita.fr>
19626
19627 * tests/Makefile.am (package.m4): New.
19628 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
19629 (_AT_CHECK_CALC_ERROR): Likewise.
19630 Factor the `, ' part of verbose error messages.
19631
19632 2001-09-18 Marc Autret <autret_m@epita.fr>
19633
19634 * src/getargs.c (longopts): Declare --defines and --graph as options
19635 with optional arguments.
19636 * src/files.h: Add extern declarations.
19637 * src/files.c (spec_graph_file, spec_defines_file): New.
19638 (output_files): Update.
19639 Remove CPP-outed code.
19640
19641 2001-09-18 Marc Autret <autret_m@epita.fr>
19642
19643 Turn off %{source,header}_extension feature.
19644
19645 * src/files.c (compute_exts_from_gf): Update.
19646 (compute_exts_from_src): Update.
19647 (output_files): CPP-out useless code.
19648 * src/files.h: Remove {header,source}_extension extern declarations.
19649 * src/reader.c (parse_dquoted_param): CPP-out.
19650 (parse_header_extension_decl): Remove.
19651 (parse_source_extension_decl): Remove.
19652 (read_declarations): Remove cases tok_{hdrext,srcext}.
19653 * src/lex.c (percent_table): Remove {header,source}_extension entries.
19654 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
19655
19656 2001-09-10 Akim Demaille <akim@epita.fr>
19657
19658 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
19659 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
19660 (AT_CHECK_OUTPUT): this.
19661 Merely check ls' exit status, its output is useless.
19662
19663 2001-09-10 Akim Demaille <akim@epita.fr>
19664
19665 * tests/calc.at: Use m4_match.
19666 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
19667
19668 2001-09-10 Marc Autret <autret_m@epita.fr>,
19669 Akim Demaille <akim@epita.fr>
19670
19671 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
19672 enum color_e.
19673 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
19674 to `normal'.
19675 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
19676 * src/lex.h: Adjust prototype.
19677 (token_t): Add `tok_undef'.
19678 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
19679 (parse_percent_token): Now returns token_t.
19680 Add default statement in switch.
19681 (lex): Separate `c' as an input variable, from the token_t result
19682 part.
19683 (unlexed): Is a token_t.
19684
19685 2001-09-10 Akim Demaille <akim@epita.fr>
19686
19687 * configure.in: Bump to 1.29a.
19688
19689 2001-09-07 Akim Demaille <akim@epita.fr>
19690
19691 Version 1.29.
19692
19693 2001-08-30 Akim Demaille <akim@epita.fr>
19694
19695 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
19696 * m4/atconfig.m4: Remove.
19697 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
19698 * tests/bison: New.
19699 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
19700 m4_if, m4_patsubst, and m4_regexp.
19701 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
19702 `input' file instead of echo.
19703
19704 2001-08-29 Akim Demaille <akim@epita.fr>
19705
19706 Bump to 1.28e.
19707
19708 2001-08-29 Akim Demaille <akim@epita.fr>
19709
19710 Version 1.28d.
19711
19712 2001-08-29 Paul Eggert <eggert@twinsun.com>
19713
19714 * src/bison.simple (yyparse): Don't take the address of an
19715 item before the start of an array, as that doesn't conform to
19716 the C Standard.
19717
19718 2001-08-29 Robert Anisko <anisko_r@epita.fr>
19719
19720 * doc/bison.texinfo (Location Tracking Calc): New node.
19721
19722 2001-08-29 Paul Eggert <eggert@twinsun.com>
19723
19724 * src/output.c (output): Do not define const, as this now
19725 causes more problems than it cures.
19726
19727 2001-08-29 Akim Demaille <akim@epita.fr>
19728
19729 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
19730 the nodes.
19731 Be sure to tag the `detailmenu'.
19732
19733 2001-08-29 Akim Demaille <akim@epita.fr>
19734
19735 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
19736 download in a tmp dir.
19737
19738 2001-08-28 Marc Autret <autret_m@epita.fr>
19739
19740 * config/depcomp: New file.
19741
19742 2001-08-28 Marc Autret <autret_m@epita.fr>
19743
19744 * doc/bison.1 (mandoc): Adjust.
19745 From Juan Manuel Guerrero.
19746
19747 2001-08-28 Marc Autret <autret_m@epita.fr>
19748
19749 * src/print_graph.c (print_state): Fix.
19750
19751 2001-08-27 Marc Autret <autret_m@epita.fr>
19752
19753 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
19754 char * members.
19755 Echo modifications to the functions prototypes.
19756 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
19757
19758 2001-08-27 Marc Autret <autret_m@epita.fr>
19759
19760 * src/vcg.c: Include `xalloc.h'.
19761 (add_colorentry): New.
19762 (add_classname): New.
19763 (add_infoname): New.
19764 * src/vcg.h: Add new prototypes.
19765
19766 2001-08-27 Akim Demaille <akim@epita.fr>
19767
19768 * Makefile.maint: Sync. again with CVS Autoconf.
19769
19770 2001-08-27 Akim Demaille <akim@epita.fr>
19771
19772 * Makefile.maint: Formatting changes.
19773 (po-update, cvs-update, update): New targets.
19774 (AMTAR): Remove.
19775
19776 2001-08-27 Akim Demaille <akim@epita.fr>
19777
19778 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19779 * Makefile.maint: Sync. with CVS Autoconf.
19780
19781 2001-08-27 Marc Autret <autret_m@epita.fr>
19782
19783 * src/vcg.h (struct infoname_s): New.
19784 (struct colorentry_s): New.
19785 (graph_s): New fields {vertical,horizontal}_order in structure.
19786 Add `infoname' field.
19787 Add `colorentry' field;
19788 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
19789 (G_HORIZONTAL_ORDER): New.
19790 (G_INFONAME): New.
19791 (G_COLORENTRY): New.
19792 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
19793 Add output of `infoname'.
19794 Add output of `colorentry'.
19795
19796 2001-08-27 Marc Autret <autret_m@epita.fr>
19797
19798 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
19799 This one shadowed a global parameter.
19800
19801 2001-08-24 Marc Autret <autret_m@epita.fr>
19802
19803 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
19804 instead of `unsigned'.
19805 (print_state): Do not call obstack_object_size () in obstack_grow ()
19806 to avoid macro variables shadowing.
19807
19808 2001-08-23 Marc Autret <autret_m@epita.fr>
19809
19810 * src/lex.c (percent_table): Typo: s/naem/name/.
19811 Add graph option.
19812 Normalize new options declarations.
19813
19814 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
19815
19816 * tests/suite.at: Exercise %header_extension and %source_extension.
19817
19818 2001-08-16 Marc Autret <autret_m@epita.fr>
19819
19820 * src/reader.c (parse_dquoted_param): New.
19821 (parse_header_extension_decl): Use it.
19822 (parse_source_extension_decl): Likewise.
19823
19824 2001-08-16 Marc Autret <autret_m@epita.fr>
19825
19826 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
19827 (get_xxxx_str): Use assert () instead of complain ().
19828 Remove return invokations in default cases.
19829 (get_decision_str): Modify default behaviour. Remove second argument.
19830 Echo modifications on calls.
19831 (output_graph): Fix.
19832
19833 2001-08-16 Marc Autret <autret_m@epita.fr>
19834
19835 * src/getargs.c (usage): Update with ``-g, --graph''.
19836
19837 2001-08-16 Marc Autret <autret_m@epita.fr>
19838
19839 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
19840 (Option Cross Key): Likewise.
19841 * doc/bison.1: Update.
19842
19843 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
19844
19845 * src/output.c (output_master_parser): Don't finish action_obstack.
19846 (output_parser): Don't care about the muscle action, here.
19847 (prepare): Copy the action_obstack in the action muscle.
19848 (output): Free action_obstack.
19849
19850 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
19851
19852 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
19853 will contain `%union' declaration.
19854 (parse_union_decl): Delete #line directive output.
19855 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
19856 informations about %union.
19857 (parse_union_decl): Copy the union_obstack in the muscle stype.
19858 * src/bison.simple: Add new #line directive.
19859 Add typdef %%stype YYSTYPE.
19860
19861 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
19862
19863 * src/bison.simple: Add new `#line' directive.
19864
19865 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
19866
19867 * src/bison.simple: New `#line' directive.
19868 * src/output.c (output_parser): Support new dynamic muscle input_line.
19869
19870 2001-09-22 Marc Autret <autret_m@epita.fr>
19871
19872 * src/output.c (output_master_parser): New.
19873 (output_parser): Be more re-entrant.
19874
19875 2001-09-21 Marc Autret <autret_m@epita.fr>
19876
19877 * src/reader.c (copy_definition, parse_union_decl): Update and use
19878 `linef' muscle.
19879 (copy_action): Likewise.
19880 Use obstack_1grow ().
19881 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
19882
19883 2001-09-21 Marc Autret <autret_m@epita.fr>
19884
19885 * src/options.c (option_table): Adjust.
19886 * src/lex.c (parse_percent_token): Fix.
19887
19888 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
19889
19890 * src/options.c (symtab.h): Include it, need by lex.h.
19891
19892 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
19893
19894 * src/lex.c (parse_percent_token): Change type of variable `tx', which
19895 is now an option_table_struct*.
19896 (option_strcmp): New function option_strcmp.
19897 (parse_percent_token): Call option_strcmp.
19898 * src/getargs.c (xalloc.h, options.h): Include it.
19899 (getargs): Call create_long_option_table.
19900 (getargs): Free longopts at the end of the function.
19901 (shortopts): Move in options.c.
19902 * src/options.c (create_long_option_table): New function. Convert
19903 information from option_table to option structure.
19904 * src/reader.c (options.h): Include it.
19905
19906 * src/Makefile.am: Adjust.
19907 * src/options.c (option_table): Create from longopts and percent_table.
19908 * src/getargs.c (longopts): Delete.
19909 * src/lex.c (struct percent_table_struct): Delete.
19910 (percent_table): Delete.
19911 (options.h): Include it.
19912 * src/options.c: Create.
19913 * src/options.h: Create.
19914 Declare enum opt_access_e.
19915 Define struct option_table_struct.
19916
19917 2001-09-20 Marc Autret <autret_m@epita.fr>
19918
19919 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
19920 sections of Bison.
19921
19922 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
19923
19924 * src/bison.simple: s/%%filename/%%skeleton.
19925 * src/muscle_tab.c (getargs.h): Include it.
19926 (muscle_init): Insert new muscle skeleton.
19927
19928 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
19929
19930 * src/output.c (output_parser): Delete unused variable actions_dumped.
19931
19932 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
19933
19934 * src/output.c (output): Delete call to reader_output_yylsp.
19935 * src/reader.c (reader): Likewise.
19936 * src/reader.h: Delete declaration of reader_output_yylsp.
19937
19938 2001-09-02 Marc Autret <autret_m@epita.fr>
19939
19940 * src/reader.c: Include muscle_tab.h.
19941 (parse_union_decl): Update.
19942 (parse_macro_decl): Rename parse_muscle_decl.
19943 Update to use renamed functions and variable.
19944 (read_declarations, copy_action, read_additionnal_code, : Updated
19945 with correct variables and functions names.
19946 (packsymbols, reader): Likewise.
19947
19948 * src/reader.h (muscle_obstack): Extern declaration update.
19949
19950 * src/output.c: Include muscle_tab.h
19951 In all functions using macro_insert, change by using muscle_insert ().
19952 (macro_obstack): Rename muscle_obstack.
19953 Echo modifications in the whole file.
19954 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
19955 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
19956 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
19957
19958 * src/muscle_tab.h: Update double inclusion macros.
19959 (macro_entry_s): Rename muscle_entry_s.
19960 Update prototypes.
19961
19962 * src/muscle_tab.c: Include muscle_tab.h.
19963 Rename macro_tabble to muscle_table.
19964 (mhash1, mhash2, mcmp): Use muscle_entry.
19965 (macro_init): Rename muscle_init. Update.
19966 (macro_insert): Rename muscle_insert. Update.
19967 (macro_find): Rename muscle_find. Update.
19968
19969 * src/main.c: Include muscle_tab.h.
19970 (main): Call muscle_init ().
19971 * src/Makefile.am (bison_SOURCES): Echo modifications.
19972
19973 2001-09-02 Marc Autret <autret_m@epita.fr>
19974
19975 Now the files macro_tab.[ch] are named muscle_tab.[ch].
19976
19977 * src/muscle_tab.c, src/muscle_tab.h: Add files.
19978
19979 2001-09-02 Marc Autret <autret_m@epita.fr>
19980
19981 * src/macrotab.c, src/macrotab.h: Remove.
19982
19983 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
19984
19985 * src/reader.c (copy_guard): Use muscle to specify the `#line'
19986 filename.
19987
19988 2001-09-01 Marc Autret <autret_m@epita.fr>
19989
19990 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
19991 to an explicit value to activate the feature. We do it here.
19992
19993 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19994
19995 * src/output.c (prepare): Delete the `filename' muscule insertion.
19996 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
19997 (parse_union_decl): Likewise.
19998 * src/macrotab.c (macro_init): Initialize filename by infile.
19999
20000 2001-08-31 Marc Autret <autret_m@epita.fr>
20001
20002 * src/bison.simple (YYLSP_NEEDED): New definition.
20003 * src/output.c (prepare): Add macro insertion of `locations_flag'
20004
20005 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20006
20007 * src/output.c (prepare): Delete insertion of previous muscles,
20008 and insert the `prefix' muscles.
20009 * src/macrotab.c (macro_init): Likewise.
20010 (macro_init): Initialization prefix directive by `yy'.
20011 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20012 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20013 yylval, yydebug, yyerror, yynerrs and yyparse.
20014 New directive `#define' to substitute yydebug, ... with option
20015 name_prefix.
20016
20017 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20018
20019 * src/main.c (main): Standardize.
20020 * src/output.c (output_table_data, output_parser): Likewise.
20021 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20022
20023 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20024
20025 * src/reader.c (read_additionnal_code): Rename %%user_code to
20026 %%epilogue.
20027 * src/output.c (output): Rename %%declarations to %%prologue.
20028 * src/bison.simple: Echo modifications.
20029
20030 2001-08-31 Marc Autret <autret_m@epita.fr>
20031
20032 * src/reader.c (readgram): CleanUp.
20033 (output_token_defines): Likewise.
20034 (packsymbols): Likewise.
20035 (reader): Likewise.
20036 * src/output.c (output): CPP-out useless code.
20037
20038 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20039
20040 * src/reader.c (reader): Delete obsolete call to function
20041 output_trailers and output_headers.
20042 * src/output.h: Remove obsolete functions prototypes of output_headers
20043 and output_trailers.
20044
20045 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20046
20047 * src/main.c: Include macrotab.h.
20048 * src/macrotab.h (macro_entry_s): Constify fields.
20049 Adjust functions prototypes.
20050 * src/macrotab.c (macro_insert): Constify key and value.
20051 (macro_find): Constify key.
20052 (macro_insert): Include 'xalloc.h'
20053 (macro_insert): Use XMALLOC.
20054 (macro_find): Constify return value.
20055 * src/output.c (output_table_data): Rename table to table_data.
20056 (output_parser): Constify macro_key, macro_value.
20057
20058 2001-08-30 Marc Autret <autret_m@epita.fr>
20059
20060 * src/reader.c (parse_skel_decl): New.
20061 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20062 * src/lex.h (token_t): New token `tok_skel'.
20063 * src/lex.c (percent_table): Add skeleton option entry.
20064 Standardize.
20065
20066 2001-08-29 Marc Autret <autret_m@epita.fr>
20067
20068 * src/bison.simple: Add %%user_code directive at the end.
20069 * src/reader.c (read_additionnal_code): New.
20070 (reader): Use it.
20071 * src/output.c (output_program): Remove.
20072 (output): Update.
20073
20074 2001-08-28 Marc Autret <autret_m@epita.fr>
20075
20076 * src/output.c (output_actions): Clean up.
20077 (output_gram): CPP-out useless code.
20078 * src/reader.c (reader): Clean up, CPP-out useless code.
20079
20080 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20081
20082 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20083 directive.
20084 * src/bison.simple: Add `%%definitions'.
20085
20086 2001-08-28 Marc Autret <autret_m@epita.fr>
20087
20088 * config/depcomp: New file.
20089
20090 2001-08-27 Paul Eggert <eggert@twinsun.com>
20091
20092 * src/bison.simple (yyparse): Don't take the address of an
20093 item before the start of an array, as that doesn't conform to
20094 the C Standard.
20095
20096 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20097
20098 * src/output.c (output): Remove the initialization of the macro
20099 obstack. It was done too late here.
20100
20101 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20102 completely wrong.
20103 (reader): Initialize the macro obstack here, since we need it to grow
20104 '%define' directives.
20105
20106 * src/reader.h: Declare the macro obstack as extern.
20107
20108 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20109
20110 * src/output.c (output_parser): Fix. Store single '%' characters in
20111 the output obstack instead of throwing them away.
20112
20113 2001-08-27 Akim Demaille <akim@epita.fr>
20114
20115 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20116
20117 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20118
20119 * lib/Makefile.am: Adjust.
20120
20121 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20122
20123 * src/bison.simple: Update and add '%%' directives.
20124
20125 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20126
20127 * src/reader.c (reader): Remove calls to 'output_headers' and
20128 'output_trailers'. Remove some C output.
20129 (readgram): Disable a piece of code that was writing a default
20130 definition for 'YYSTYPE'.
20131 (reader_output_yylsp): Remove.
20132 (packsymbols): Output token defintions to a macro.
20133 (copy_definition): Disable C output.
20134
20135 * src/reader.c (parse_macro_decl): New function used to parse macro
20136 declarations.
20137 (copy_string2): Put the body of copy_string into this new function.
20138 Add a parameter to let the caller choose whether he wants to copy the
20139 string delimiters or not.
20140 (copy_string): Be a simple call to copy_string2 with the last argument
20141 bound to true.
20142 (read_declarations): Add case for macro definition.
20143 (copy_identifier): New.
20144 (parse_macro_decl): Read macro identifiers using copy_identifier
20145 rather than lex.
20146
20147 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20148
20149 * src/output.c (prepare): Add prefixed names.
20150 (output_parser): Output semantic actions.
20151 (output_parser): Fix bug on '%%line' directives.
20152
20153 * src/output.c (output_headers): Remove. The C code printed by this
20154 function should now be in the skeletons.
20155 (output_trailers): Remove.
20156 (output): Disable call to 'reader_output_yylsp'.
20157 (output_rule_data): Do not output tables to the table obstack.
20158
20159 * src/output.c: Remove some C dedicated output.
20160 Improve the use of macro and output obstacks.
20161 (output_defines): Remove.
20162
20163 * src/output.c (output_token_translations): Associate 'translate'
20164 table with a macro. No output to the table obstack.
20165 (output_gram): Same for 'rhs' and 'prhs'.
20166 (output_stos): Same for 'stos'.
20167 (output_rule_data): Same for 'r1' and 'r2'.
20168 (token_actions): Same for 'defact'.
20169 (goto_actions): Same for 'defgoto'.
20170 (output_base): Same for 'pact' and 'pgoto'.
20171 (output_table): Same for 'table'.
20172 (output_check): Same for 'check'.
20173
20174 * src/output.c (output_table_data): New function.
20175 (output_short_table): Remove.
20176 (output_short_or_char_table): Remove.
20177
20178 * src/output.c (output_parser): Replace most of the skeleton copy code
20179 with something new. Skeletons are now processed character by character
20180 rather than line by line, and Bison looks for '%%' macros. This is the
20181 first step in making Bison's output process (a lot) more flexible.
20182 (output_parser): Use the macro table.
20183
20184 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20185
20186 * src/main.c (main): Initialize the macro table.
20187
20188 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20189
20190 * src/lex.c (percent_table): Add tok_define.
20191 * src/lex.h: Add tok_define.
20192
20193 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20194
20195 * src/macrotab.c: New file.
20196 * src/macrotab.h: New file.
20197 * src/Makefile.am: Update.
20198
20199 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20200
20201 * lib/hash.c: New file.
20202 * lib/hash.h: New file.
20203 * lib/Makefile.am: Update.
20204
20205 2001-08-15 Akim Demaille <akim@epita.fr>
20206
20207 Version 1.28c.
20208
20209 2001-08-15 Marc Autret <autret_m@epita.fr>
20210
20211 * src/reader.c (readgram): Indent output macro YYSTYPE.
20212 (packsymbols): Likewise.
20213 (output_token_defines): Likewise.
20214 * src/files.c: Standardize.
20215 (compute_header_macro): New.
20216 (defines_obstack_save): New. Use compute_header_macro.
20217 (output_files): Update. Use defines_obstack_save.
20218
20219 2001-08-15 Akim Demaille <akim@epita.fr>
20220
20221 * doc/bison.texinfo (Table of Symbols): Document
20222 YYSTACK_USE_ALLOCA.
20223
20224 2001-08-15 Akim Demaille <akim@epita.fr>
20225
20226 * missing: Update from CVS Automake.
20227 * config/config.guess, config/config.sub, config/texinfo.tex:
20228 Update from gnu.org.
20229
20230 2001-08-15 Akim Demaille <akim@epita.fr>
20231
20232 * Makefile.maint: Sync with CVS Autoconf.
20233
20234 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20235
20236 * doc/bison.texinfo: Include GNU Free Documentation License from
20237 `fdl.texi'.
20238 * doc/fdl.texi: Add to package.
20239
20240 2001-08-14 Marc Autret <autret_m@epita.fr>
20241
20242 Turn on %{source,header}_extension features.
20243
20244 * src/lex.c (percent_table): Un-CPP out header_extension and
20245 source_extension.
20246 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20247 (compute_exts_from_src): Remove conditions. It restores priorities
20248 between options.
20249
20250 2001-08-14 Marc Autret <autret_m@epita.fr>
20251
20252 * src/files.c (compute_base_names): Add extensions computing when
20253 `--file-prefix' used.
20254 Standardize function calls.
20255
20256 2001-08-13 Marc Autret <autret_m@epita.fr>
20257
20258 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20259 defining it (defined but null disables alloca).
20260
20261 2001-08-13 Marc Autret <autret_m@epita.fr>
20262
20263 * src/bison.simple (_yy_memcpy): CPP reformat.
20264
20265 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20266
20267 * tests/atconfig.in (CPPFLAGS): Fix.
20268
20269 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
20270
20271 * doc/bison.texinfo: Include GNU General Public License from
20272 `gpl.texi'.
20273 * doc/gpl.texi: Add to package.
20274
20275 2001-08-10 Marc Autret <autret_m@epita.fr>
20276
20277 * src/print_graph.h: Fix.
20278 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20279
20280 2001-08-10 Akim Demaille <akim@epita.fr>
20281
20282 * src/system.h: Provide default declarations for stpcpy, strndup,
20283 and strnlen.
20284
20285 2001-08-10 Robert Anisko <anisko_r@epita.fr>
20286
20287 * doc/bison.texinfo (Locations): Update @$ stuff.
20288
20289 2001-08-09 Robert Anisko <anisko_r@epita.fr>
20290
20291 * src/bison.simple (YYLLOC_DEFAULT): Update.
20292 (yyparse): Adjust.
20293
20294 2001-08-08 Marc Autret <autret_m@epita.fr>
20295
20296 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
20297 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20298 Reported by Fabrice Bauzac.
20299
20300 2001-08-08 Marc Autret <autret_m@epita.fr>
20301
20302 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20303 * src/vcg.c (output_node): Fix.
20304 * src/vcg.h: Cleanup.
20305 * src/print_graph.c: Add comments.
20306 (node_output_size): New global variable. Simplify the formatting of
20307 the VCG graph output.
20308 (print_actions): Unused code is now used. It notifies the final state
20309 and no action states in the VCG graph. It also give the reduce actions.
20310 The `shift and goto' edges are red and the `go to state' edges are
20311 blue.
20312 Get the current node name and node_obstack by argument.
20313 (node_obstack): New variable.
20314 (print_state): Manage node_obstack.
20315 (print_core): Use node_obstack given by argument.
20316 A node is not only computed here but in print_actions also.
20317 (print_graph): CPP out useless code instead of commenting it.
20318
20319 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
20320
20321 * tests/atconfig.in (CPPFLAGS): Fix.
20322
20323 2001-08-07 Akim Demaille <akim@epita.fr>
20324
20325 * src/print_graph.c (quote): New.
20326 (print_core): Use it.
20327
20328 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
20329
20330 * src/vcg.c (complain.h): Include it.
20331 Unepitaize `return' invocations.
20332 [NDEBUG] (main): Remove.
20333 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
20334 * src/files.c (open_files): Initialize graph_obstack.
20335 * src/print_graph.c (print_actions): CPP out useless code.
20336 (print_core): Don't output the last `\n' in labels.
20337 Use `quote'.
20338 * src/files.c (output_files): Output the VCG file.
20339 * src/main.c (main): Invoke print_graph ();
20340
20341 2001-08-06 Marc Autret <autret_m@epita.fr>
20342
20343 Automaton VCG graph output.
20344 Using option ``-g'' or long option ``--graph'', you can generate
20345 a gram_filename.vcg file containing a VCG description of the LALR (1)
20346 automaton of your grammar.
20347
20348 * src/main.c: Call to print_graph() function.
20349 * src/getargs.h: Update.
20350 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20351 (graph_flag): New flag.
20352 (longopts): Update.
20353 (getargs): Add case `g'.
20354 * src/files.c (graph_obstack): New obstack struct.
20355 (open_files): Initialize new obstack.
20356 (output_files): Saves graph_obstack if required.
20357 * src/files.h (graph_obstack): New extern declaration.
20358 * src/Makefile.am: Add new source files.
20359
20360 2001-08-06 Marc Autret <autret_m@epita.fr>
20361
20362 * src/print_graph.c, src/print_graph.h (graph): New.
20363 * src/vcg.h: New file.
20364 * src/vcg.c: New file, VCG graph handling.
20365
20366 2001-08-06 Marc Autret <autret_m@epita.fr>
20367
20368 Add of %source_extension and %header_extension which specify
20369 the source or/and the header output file extension.
20370
20371 * src/files.c (compute_base_names): Remove initialisation of
20372 src_extension and header_extension.
20373 (compute_exts_from_gf): Update.
20374 (compute_exts_from_src): Update.
20375 (output_files): Update.
20376 * src/reader.c (parse_header_extension_decl): New.
20377 (parse_source_extension_decl): New.
20378 (read_declarations): New case statements for the new tokens.
20379 * src/lex.c (percent_table): Add entries for %source_extension
20380 and %header_extension.
20381 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20382
20383 2001-08-06 Marc Autret <autret_m@epita.fr>
20384
20385 * configure.in: Bump to 1.28c.
20386 * doc/bison.texinfo: Texinfo thingies.
20387
20388 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
20389
20390 * tests/atconfig.in (CPPFLAGS): Add.
20391 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20392
20393 2001-08-03 Akim Demaille <akim@epita.fr>
20394
20395 Version 1.28b.
20396
20397 2001-08-03 Akim Demaille <akim@epita.fr>
20398
20399 * tests/Makefile.am (check-local): Ship testsuite.
20400 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20401 Include `string.h'.
20402
20403 2001-08-03 Akim Demaille <akim@epita.fr>
20404
20405 * configure.in: Try using -Wformat when compiling.
20406
20407 2001-08-03 Akim Demaille <akim@epita.fr>
20408
20409 * configure.in: Bump to 1.28b.
20410
20411 2001-08-03 Akim Demaille <akim@epita.fr>
20412
20413 * src/complain.c: Adjust strerror_r portability issues.
20414
20415 2001-08-03 Akim Demaille <akim@epita.fr>
20416
20417 Version 1.28a.
20418
20419 2001-08-03 Akim Demaille <akim@epita.fr>
20420
20421 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20422 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20423 * src/getargs.c: Include complain.h.
20424 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20425 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20426
20427 2001-08-03 Akim Demaille <akim@epita.fr>
20428
20429 * src/reader.c (readgram): Display hidden chars in error messages.
20430
20431 2001-08-03 Akim Demaille <akim@epita.fr>
20432
20433 Update to gettext 0.10.39.
20434
20435 2001-08-03 Akim Demaille <akim@epita.fr>
20436
20437 * lib/strspn.c: New.
20438
20439 2001-08-01 Marc Autret <autret_m@epita.fr>
20440
20441 * doc/bison.texinfo: Update.
20442 * doc/bison.1 (mandoc): Update.
20443 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20444 * src/files.c: Support output files extensions computing.
20445 (src_extension): New static variable.
20446 (header_extension): New static variable.
20447 (tr): New function.
20448 (get_extension_index): New function, gets the index of an extension
20449 filename in a string.
20450 (compute_exts_from_gf): New function, computes extensions from the
20451 grammar file extension.
20452 (compute_exts_from_src): New functions, computes extensions from the
20453 C source file extension, file given by ``-o'' option.
20454 (compute_base_names): Update.
20455 (output_files): Update.
20456
20457 2001-08-01 Robert Anisko <anisko_r@epita.fr>
20458
20459 * doc/bison.texi: Document @$.
20460 (Locations): New section.
20461
20462 2001-07-18 Akim Demaille <akim@epita.fr>
20463
20464 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20465 * config/prev-version.txt, config/move-if-change: New.
20466 * Makefile.am: Adjust.
20467
20468 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20469
20470 * src/bison.simple (yyparse): Suppress warning `comparaison
20471 between signed and unsigned'.
20472
20473 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
20474
20475 * src/getargs.h (raw_flag): Remove.
20476 * src/getargs.c: Die on `-r'/`--raw'.
20477 * src/lex.c (parse_percent_token): Die on `%raw'.
20478 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20479 * tests/calc.at: Suppress test with option `--raw'.
20480
20481 2001-07-14 Akim Demaille <akim@epita.fr>
20482
20483 * config/: New.
20484 * configure.in: Require Autoconf 2.50.
20485 Update to gettext 0.10.38.
20486
20487 2001-03-16 Akim Demaille <akim@epita.fr>
20488
20489 * doc/bison.texinfo: ANSIfy the examples.
20490
20491 2001-03-16 Akim Demaille <akim@epita.fr>
20492
20493 * getargs.c (skeleton): New variable.
20494 (longopts): --skeleton is a new option.
20495 (shortopts, getargs): -S is a new option.
20496 * getargs.h: Declare skeleton.
20497 * output.c (output_parser): Use it.
20498
20499 2001-03-16 Akim Demaille <akim@epita.fr>
20500
20501 * m4/strerror_r.m4: New.
20502 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20503 * lib/error.h, lib/error.c: Update.
20504
20505 2001-03-16 Akim Demaille <akim@epita.fr>
20506
20507 * src/getargs.c (longopts): Clean up.
20508
20509 2001-02-21 Akim Demaille <akim@epita.fr>
20510
20511 * src/reader.c (gensym): `gensym_count' is your own.
20512 Use a static buf to create the symbol name, as token_buffer is no
20513 longer a buffer.
20514
20515 2001-02-08 Akim Demaille <akim@epita.fr>
20516
20517 * src/conflicts.c (conflict_report): Be sure not to append to res
20518 between two calls, which could happen if both first sprintf were
20519 skipped, but not the first cp += strlen.
20520
20521 2001-02-08 Akim Demaille <akim@epita.fr>
20522
20523 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20524 New, from fileutils 4.0.37.
20525 * configure.in: Require Autoconf 2.49c. I took some time before
20526 making this decision. This is the only way out for portability
20527 issues in Bison, it would mean way too much duplicate effort to
20528 import in Bison features implemented in 2.49c since 2.13.
20529 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20530
20531 2001-02-02 Akim Demaille <akim@epita.fr>
20532
20533 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
20534 * lib/xalloc.h, lib/xmalloc.c: Update.
20535
20536 2001-01-19 Akim Demaille <akim@epita.fr>
20537
20538 Get rid of the ad hoc handling of token_buffer in the scanner: use
20539 the obstacks.
20540
20541 * src/lex.c (token_obstack): New.
20542 (init_lex): Initialize it. No longer call...
20543 (grow_token_buffer): this. Remove it.
20544 Adjust all the places which used it to use the obstack.
20545
20546 2001-01-19 Akim Demaille <akim@epita.fr>
20547
20548 * src/lex.h: Rename all the tokens:
20549 s/\bENDFILE\b/tok_eof/g;
20550 s/\bIDENTIFIER\b/tok_identifier/g;
20551 etc.
20552 Let them be enums, not #define, to ease debugging.
20553 Adjust all the code.
20554
20555 2001-01-18 Akim Demaille <akim@epita.fr>
20556
20557 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20558 * src/lex.c (maxtoken, grow_token_buffer): Static.
20559
20560 2001-01-18 Akim Demaille <akim@epita.fr>
20561
20562 Since we now use obstacks, more % directives can be enabled.
20563
20564 * src/lex.c (percent_table): Also accept `%yacc',
20565 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20566 `%debug'.
20567 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20568 instead of returning a token.
20569 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20570 * src/reader.c (read_declarations): Adjust.
20571 * src/files.c (open_files): Don't call `compute_base_names', don't
20572 compute `attrsfile' since they depend upon data which might be
20573 *in* the input file now.
20574 (output_files): Do it here.
20575 * src/output.c (output_headers): Document the fact that this patch
20576 introduces a guaranteed SEGV for semantic parsers.
20577 * doc/bison.texinfo: Document them.
20578 * tests/suite.at: Exercise these %options.
20579
20580 2000-12-20 Akim Demaille <akim@epita.fr>
20581
20582 Also handle the output file (--verbose) with obstacks.
20583
20584 * files.c (foutput): Remove.
20585 (output_obstack): New.
20586 Adjust all dependencies.
20587 * src/conflicts.c: Return a string.
20588 * src/system.h (obstack_grow_string): Rename as...
20589 (obstack_sgrow): this. Be ready to work with non literals.
20590 (obstack_fgrow4): New.
20591
20592 2000-12-20 Akim Demaille <akim@epita.fr>
20593
20594 * src/files.c (open_files): Fix the computation of short_base_name
20595 in the case of `-o foo.tab.c'.
20596
20597 2000-12-20 Akim Demaille <akim@epita.fr>
20598
20599 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20600 (copy_dollar): Now that everything uses obstacks, get rid of the
20601 FILE * parameters.
20602
20603 2000-12-20 Akim Demaille <akim@epita.fr>
20604
20605 * src/files.c (open_files): Actually the `.output' file is based
20606 on the short_base_name, not base_name.
20607 * tests/suite.at (Checking output file names): Adjust.
20608
20609 2000-12-20 Akim Demaille <akim@epita.fr>
20610
20611 * src/bison.s1: Remove, we now use directly...
20612 * src/bison.simple: this.
20613 * src/Makefile.am: Use pkgdata instead of data.
20614
20615 2000-12-20 Akim Demaille <akim@epita.fr>
20616
20617 * src/files.c (guard_obstack): New.
20618 (open_files): Initialize it.
20619 (output_files): Dump it...
20620 * src/files.h: Export it.
20621 * src/reader.c (copy_guard): Use it.
20622
20623 2000-12-19 Akim Demaille <akim@epita.fr>
20624
20625 * src/files.c (outfile, defsfile, actfile): Removed as global
20626 vars.
20627 (open_files): Don't compute them.
20628 (output_files): Adjust.
20629 (base_name, short_base_name): Be global.
20630 Adjust dependencies.
20631
20632 2000-12-19 Akim Demaille <akim@epita.fr>
20633
20634 * src/files.c (strsuffix): New.
20635 (stringappend): Be just like strcat but allocate.
20636 (base_names): Eve out from open_files.
20637 Try to simplify the rather hairy computation of base_name and
20638 short_base_name.
20639 (open_files): Use it.
20640 * tests/suite.at (Checking output file names): New test.
20641
20642 2000-12-19 Akim Demaille <akim@epita.fr>
20643
20644 * src/system.h (obstack_grow_literal_string): Rename as...
20645 (obstack_grow_string): this.
20646 * src/output.c (output_parser): Recognize `%% actions' instead of
20647 `$'.
20648 * src/bison.s1: s/$/%% actions/.
20649 * src/bison.hairy: Likewise.
20650
20651 2000-12-19 Akim Demaille <akim@epita.fr>
20652
20653 * src/output.c (output_parser): Compute the `#line' lines when
20654 there are.
20655 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
20656 Suggested by Hans Aberg.
20657
20658 2000-12-19 Akim Demaille <akim@epita.fr>
20659
20660 Let the handling of the skeleton files be local to the procedures
20661 that use it.
20662
20663 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
20664 longer static.
20665 (fparser, open_extra_files): Remove.
20666 (open_files, output_files): Don't take care of fparser.
20667 * src/files.h: Adjust.
20668 * src/output.c (output_parser): Open and close the file to the
20669 skeleton.
20670 * src/reader.c (read_declarations): When %semantic_parser, open
20671 fguard.
20672
20673 2000-12-19 Akim Demaille <akim@epita.fr>
20674
20675 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
20676 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
20677
20678 2000-12-19 Akim Demaille <akim@epita.fr>
20679
20680 * src/files.c (open_files): Yipee! We no longer need all the code
20681 looking for `/tmp' since we have no tmp file.
20682
20683 2000-12-19 Akim Demaille <akim@epita.fr>
20684
20685 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
20686 New macros.
20687 * src/files.c (open_files): Less dependency on MSDOS etc.
20688
20689 2000-12-14 Akim Demaille <akim@epita.fr>
20690
20691 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
20692 Provide a default definition.
20693 Use it when executing the default @ action.
20694 * src/reader.c (reader_output_yylsp): No longer include
20695 `timestamp' and `text' in the default YYLTYPE.
20696
20697 2000-12-12 Akim Demaille <akim@epita.fr>
20698
20699 * src/reader.c (copy_definition, parse_union_decl, copy_action)
20700 (copy_guard): Quote the file names.
20701 Reported by Laurent Mascherpa.
20702
20703 2000-12-12 Akim Demaille <akim@epita.fr>
20704
20705 * src/output.c (output_headers, output_program, output): Be sure
20706 to escape special characters when outputting filenames.
20707 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
20708 (output_headers): Don't depend on them, Use ACTSTR.
20709
20710 2000-11-17 Akim Demaille <akim@epita.fr>
20711
20712 * lib/obstack.h: Formatting changes.
20713 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
20714 prevents type checking.
20715 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20716 cast the value to (void *): assigning a `foo *' to a `void *'
20717 variable is valid.
20718 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20719 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
20720 append characters.
20721
20722 2000-11-17 Akim Demaille <akim@epita.fr>
20723
20724 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
20725 as...
20726 (suite.m4, regression.m4, calc.m4): these.
20727 * tests/atgeneral.m4: Update from CVS Autoconf.
20728
20729 2000-11-17 Akim Demaille <akim@epita.fr>
20730
20731 * tests/regression.m4 (%union and --defines): New test,
20732 demonstrating a current bug in the obstack implementation.
20733
20734 2000-11-17 Akim Demaille <akim@epita.fr>
20735
20736 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
20737 macros.
20738 Use them to declare the variables which are global or local to
20739 `yyparse'.
20740
20741 2000-11-17 Akim Demaille <akim@epita.fr>
20742
20743 * acconfig.h: Remove, no longer used.
20744
20745 2000-11-07 Akim Demaille <akim@epita.fr>
20746
20747 * src: s/Copyright (C)/Copyright/g.
20748
20749 2000-11-07 Akim Demaille <akim@epita.fr>
20750
20751 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
20752 defining.
20753 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
20754
20755 2000-11-07 Akim Demaille <akim@epita.fr>
20756
20757 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
20758 Merge in a single CPP if/else.
20759
20760 2000-11-07 Akim Demaille <akim@epita.fr>
20761
20762 * src/output.c (output): Remove useless variables.
20763 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
20764 argument `data' for consistency with the prototypes.
20765 Qualify it `const'.
20766 (obstack_copy, obstack_copy0): Rename the second argument as
20767 `address' for consistency. Qualify it `const'.
20768 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
20769 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
20770 `const' their input argument (`data' or `address').
20771 Adjust the corresponding macros to include `const' in casts.
20772
20773 2000-11-03 Akim Demaille <akim@epita.fr>
20774
20775 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
20776 s/PFILE1/BISON_HAIRY/.
20777 Adjust dependencies.
20778
20779 2000-11-03 Akim Demaille <akim@epita.fr>
20780
20781 For some reason, this was not applied.
20782
20783 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20784 `unlink': it's no longer used.
20785
20786 2000-11-03 Akim Demaille <akim@epita.fr>
20787
20788 * src/files.c (skeleton_find): New function, eved out of...
20789 (open_files, open_extra_files): here.
20790
20791 2000-11-03 Akim Demaille <akim@epita.fr>
20792
20793 Don't use `atexit'.
20794
20795 * src/files.c (obstack_save): New function.
20796 (done): Rename as...
20797 (output_files): this.
20798 Use `obstack_save'.
20799 * src/main.c (main): Don't use `atexit' to register `done', since
20800 it no longer has to remove tmp files, just call `output_files'
20801 when there are no errors.
20802
20803 2000-11-02 Akim Demaille <akim@epita.fr>
20804
20805 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20806 `unlink': it's no longer used.
20807 * src/files.h: Formatting changes.
20808
20809 2000-11-02 Akim Demaille <akim@epita.fr>
20810
20811 Remove the last uses of mktemp and unlink/delete.
20812
20813 * src/files.c (fdefines, ftable): Removed.
20814 (defines_ostack, table_obstack): New.
20815 Adjust dependencies of the former into uses of the latter.
20816 * src/output.c (output_short_or_char_table, output_short_table):
20817 Convert to using obstacks.
20818 * src/reader.c (copy_comment2): Accept one FILE * and two
20819 obstacks.
20820 (output_token_defines, reader_output_yylsp): Use obstacks.
20821 * src/system.h (obstack_fgrow3): New.
20822 * po/POTFILES.in: Adjust.
20823
20824 2000-11-01 Akim Demaille <akim@epita.fr>
20825
20826 Change each use of `fattrs' into a use of `attrs_obstack'.
20827
20828 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
20829 * src/files.c (fattrs): Remove.
20830 (attrs_obstack): New.
20831 Adjust all dependencies.
20832 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
20833
20834 2000-11-01 Akim Demaille <akim@epita.fr>
20835
20836 Introduce obstacks.
20837 Change each use of `faction' into a use of `action_obstack'.
20838
20839 * lib/obstack.h, lib/obstack.c: New files.
20840 * src/files.c (faction): Remove.
20841 (action_obstack): New.
20842 Adjust all dependencies.
20843
20844 2000-10-20 Akim Demaille <akim@epita.fr>
20845
20846 * lib/quote.h (PARAMS): New macro. Use it.
20847
20848 2000-10-16 Akim Demaille <akim@epita.fr>
20849
20850 * src/output.c (output_short_or_char_table): New function.
20851 (output_short_table, output_token_translations): Use it.
20852 (goto_actions): Use output_short_table.
20853
20854 2000-10-16 Akim Demaille <akim@epita.fr>
20855
20856 * src/symtab.c (bucket_new): New function.
20857 (getsym): Use it.
20858
20859 * src/output.c (output_short_table): New argument to display the
20860 comment associated with the table.
20861 Adjust dependencies.
20862 (output_gram): Use it.
20863 (output_rule_data): Nicer output layout for YYTNAME.
20864
20865 2000-10-16 Akim Demaille <akim@epita.fr>
20866
20867 * src/lex.c (read_typename): New function.
20868 (lex): Use it.
20869 * src/reader.c (copy_dollar): Likewise.
20870
20871 2000-10-16 Akim Demaille <akim@epita.fr>
20872
20873 * src/reader.c (copy_comment2): Expect the input stream to be on
20874 the `/' which is suspected to open a comment, instead of being
20875 called after `//' or `/*' was read.
20876 (copy_comment, copy_definition, parse_union_decl, copy_action)
20877 (copy_guard): Adjust.
20878
20879 2000-10-16 Akim Demaille <akim@epita.fr>
20880
20881 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
20882 `read_signed_integer'.
20883
20884 2000-10-16 Akim Demaille <akim@epita.fr>
20885
20886 * src/reader.c (copy_dollar): New function.
20887 (copy_guard, copy_action): Use it.
20888
20889 2000-10-16 Akim Demaille <akim@epita.fr>
20890
20891 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
20892 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
20893 New files, from Fileutils 4.0.27.
20894 * src/main.c (printable_version): Remove.
20895 * src/lex.c, src/reader.c: Use `quote'.
20896
20897 2000-10-04 Akim Demaille <akim@epita.fr>
20898
20899 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
20900
20901 2000-10-04 Akim Demaille <akim@epita.fr>
20902
20903 * doc/bison.texinfo: Various typos spotted by Neil Booth.
20904
20905 2000-10-04 Akim Demaille <akim@epita.fr>
20906
20907 When a literal string is used to define two different tokens,
20908 `bison -v' segfaults.
20909 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
20910
20911 * tests/regression.m4: New file.
20912 Include the core of the sample provided by Piotr Gackiewicz.
20913 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
20914 properly.
20915
20916 2000-10-04 Akim Demaille <akim@epita.fr>
20917
20918 * src/reader.c (parse_expect_decl): Keep `count' within the size
20919 of `buffer'.
20920 From Neil Booth.
20921
20922 2000-10-02 Paul Eggert <eggert@twinsun.com>
20923
20924 * bison.s1 (yyparse): Assign the default value
20925 unconditionally, to avoid a GCC warning and make the parser a
20926 tad smaller.
20927
20928 2000-10-02 Akim Demaille <akim@epita.fr>
20929
20930 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
20931 options.
20932
20933 2000-10-02 Akim Demaille <akim@epita.fr>
20934
20935 * src/derives.c, src/print.c, src/reduce.c: To ease the
20936 translation, move some `\n' out of the translated strings.
20937
20938 2000-10-02 Akim Demaille <akim@epita.fr>
20939
20940 The location tracking mechanism is precious for parse error
20941 messages. Nevertheless, it is enabled only when `@n' is used in
20942 the grammar, which is a different issue (you can use it in error
20943 message, but not in the grammar per se). Therefore, there should
20944 be another means to enable it.
20945
20946 * src/getargs.c (getargs): Support `--locations'.
20947 (usage): Report it.
20948 * src/getargs.h (locationsflag): Export it.
20949 * src/lex.c (percent_table): Support `%locations'.
20950 * src/reader.c (yylsp_needed): Remove this variable, now replaced
20951 with `locationsflag'.
20952 * doc/bison.texinfo: Document `--locations' and `%locations'.
20953 Sort the options.
20954 * tests/calc.m4: Test it.
20955
20956 For regularity of the names, replace each
20957 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
20958 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
20959 In addition replace each `flag' with `_flag'.
20960
20961 2000-10-02 Akim Demaille <akim@epita.fr>
20962
20963 Also test parse error messages, including with YYERROR_VERBOSE.
20964
20965 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
20966 associative).
20967 Use it to check the computations.
20968 Use it to check `nonassoc' is honored.
20969 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
20970 `--yyerror-verbose'.
20971 (_AT_CHECK_CALC): Adjust to this option.
20972 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
20973
20974 2000-10-02 Akim Demaille <akim@epita.fr>
20975
20976 Test also `--verbose', `--defines' and `--name-prefix'. Testing
20977 the latter demonstrates a flaw in the handling of non debugging
20978 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
20979 was used in order to simplify:
20980
20981 #if YYDEBUG
20982 if (yydebug)
20983 {
20984 ...
20985 }
20986 #endif
20987
20988 into
20989
20990 if (yydebug)
20991 {
20992 ...
20993 }
20994
20995 unfortunately this leads to a CPP conflict when
20996 `--name-prefix=foo' is used since it produces `#define yydebug
20997 foodebug'.
20998
20999 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21000 (YYDPRINTF): New macro.
21001 Spread its use.
21002 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21003 the bison options.
21004 Also test `--verbose', `--defines' and `--name-prefix'.
21005
21006 2000-10-02 Akim Demaille <akim@epita.fr>
21007
21008 Improve the readability of the produced parsers.
21009
21010 * src/bison.s1: Formatting changes.
21011 Improve the comment related to the `$' mark.
21012 (yydefault): Don't fall through to `yyresume': `goto' there.
21013 * src/output.c (output_parser): When the `$' is met, skip the end
21014 of its line.
21015 New variable, `number_of_dollar_signs', to check there's exactly
21016 one `$' in the parser skeleton.
21017
21018 2000-10-02 Akim Demaille <akim@epita.fr>
21019
21020 * lib/xstrdup.c: New file, from the fileutils.
21021 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21022 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21023 instead of strlen + xmalloc + strcpy.
21024 * src/symtab.c (copys): Remove, use xstrdup instead.
21025
21026 2000-10-02 Akim Demaille <akim@epita.fr>
21027
21028 * src/gram.h (associativity): New enum type which replaces the
21029 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21030 `right_assoc', `left_assoc' and `non_assoc'.
21031 Adjust all dependencies.
21032 * src/reader.c: Formatting changes.
21033 (LTYPESTR): Don't define it, use it as a literal in
21034 `reader_output_yylsp'.
21035 * src/symtab.h (symbol_class): New enum type which replaces the
21036 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21037 `sunknown', `stoken and `snterm'.
21038
21039 2000-10-02 Akim Demaille <akim@epita.fr>
21040
21041 * src/getargs.c (fixed_outfiles): Rename as...
21042 (yaccflag): for consistency and accuracy.
21043 Adjust dependencies.
21044
21045 2000-10-02 Akim Demaille <akim@epita.fr>
21046
21047 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21048 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21049 difficult and introduced a lot of core dump. It turns out that
21050 Bison used an implementation of `xmalloc' based on `calloc', and
21051 at various places it does depend upon the initialization to 0. I
21052 have not tried to isolate the pertinent places, and all the former
21053 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21054 someone should address this issue.
21055
21056 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21057 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21058 files.
21059 Adjust dependencies.
21060 * src/warshall.h: New file.
21061 Propagate.
21062
21063 2000-10-02 Akim Demaille <akim@epita.fr>
21064
21065 Various anti-`extern in *.c' changes.
21066
21067 * src/system.h: Include `assert.h'.
21068
21069 2000-10-02 Akim Demaille <akim@epita.fr>
21070
21071 * src/state.h (nstates, final_state, first_state, first_shift)
21072 (first_reduction): Move their exportation from here...
21073 * src/LR0.h: to here.
21074 Adjust dependencies.
21075 * src/getargs.c (statisticsflag): New variable.
21076 Add support for `--statistics'.
21077 Adjust dependencies.
21078
21079 Remove a lot of now useless `extern' statements in most files.
21080
21081 2000-10-02 Akim Demaille <akim@epita.fr>
21082
21083 * src/LR0.h: New file.
21084 Propagate its use.
21085
21086 2000-10-02 Akim Demaille <akim@epita.fr>
21087
21088 * src/print.h: New file.
21089 Propagate its use.
21090 * src/print.c: Formatting and ordering changes.
21091 (verbose, terse): Replace with...
21092 (print_results): this new function.
21093 Adjust dependencies.
21094
21095 2000-10-02 Akim Demaille <akim@epita.fr>
21096
21097 * src/conflicts.c (conflict_report): New function.
21098 (conflict_log, verbose_conflict_log): Replace with...
21099 (print_conflicts): this function.
21100 Adjust dependencies.
21101 * src/conflicts.h: New file.
21102 Propagate its inclusion.
21103
21104 2000-10-02 Akim Demaille <akim@epita.fr>
21105
21106 * src/nullable.h: New file.
21107 Propagate its inclusion.
21108 * src/nullable.c: Formatting changes.
21109
21110 2000-10-02 Akim Demaille <akim@epita.fr>
21111
21112 * src/reduce.h: New file.
21113 Propagate its inclusion.
21114 * src/reduce.c: Topological sort and other formatting changes.
21115 (bool, TRUE, FALSE): Move their definition to...
21116 * src/system.h: here.
21117
21118 2000-10-02 Akim Demaille <akim@epita.fr>
21119
21120 * src/files.c: Formatting changes.
21121 (tryopen, tryclose, openfiles): Rename as...
21122 (xfopen, xfclose, open_files): this.
21123 (stringappend): static.
21124 * src/files.h: Complete the list of exported symbols.
21125 Propagate its use.
21126
21127 2000-10-02 Akim Demaille <akim@epita.fr>
21128
21129 * src/reader.h: New file.
21130 Propagate its use instead of tedious list of `extern' and
21131 prototypes.
21132 * src/reader.c: Formatting changes, topological sort,
21133 s/register//.
21134
21135 2000-10-02 Akim Demaille <akim@epita.fr>
21136
21137 * src/lex.h: Prototype `lex.c' exported functions.
21138 * src/reader.c: Adjust.
21139 * src/lex.c: Formatting changes.
21140 (safegetc): Rename as...
21141 (xgetc): this.
21142
21143 2000-10-02 Akim Demaille <akim@epita.fr>
21144
21145 * src/lalr.h: New file.
21146 Propagate its inclusion instead of prototypes and `extern'.
21147 * src/lalr.c: Formatting changes, topological sorting etc.
21148
21149 2000-10-02 Akim Demaille <akim@epita.fr>
21150
21151 * src/output.c (token_actions): Introduce a temporary array,
21152 YYDEFACT, that makes it possible for this function to use
21153 output_short_table.
21154
21155 2000-10-02 Akim Demaille <akim@epita.fr>
21156
21157 `user_toknums' is output as a `short[]' in `output.c', while it is
21158 defined as a `int[]' in `reader.c'. For consistency with the
21159 other output tables, `user_toknums' is now defined as a table of
21160 shorts.
21161
21162 * src/reader.c (user_toknums): Be a short table instead of an int
21163 table.
21164 Adjust dependencies.
21165
21166 Factor the short table outputs.
21167
21168 * src/output.c (output_short_table): New function.
21169 * src/output.c (output_gram, output_stos, output_rule_data)
21170 (output_base, output_table, output_check): Use it.
21171
21172 2000-10-02 Akim Demaille <akim@epita.fr>
21173
21174 * src/output.c (output): Topological sort of the functions, in
21175 order to get rid of the `static' prototypes.
21176 No longer use `register'.
21177 * src/output.h: New file.
21178 Propagate its inclusion in files explicitly prototyping functions
21179 from output.c.
21180
21181 2000-09-21 Akim Demaille <akim@epita.fr>
21182
21183 * src/atgeneral.m4: Update from Autoconf.
21184
21185 2000-09-21 Akim Demaille <akim@epita.fr>
21186
21187 * src/closure.h: New file.
21188 * src/closure.c: Formatting changes, topological sort over the
21189 functions, use of closure.h.
21190 (initialize_closure, finalize_closure): Rename as...
21191 (new_closure, free_closure): these. Adjust dependencies.
21192 * src/LR0.c: Formatting changes, topological sort, use of
21193 cloture.h.
21194 (initialize_states): Rename as...
21195 (new_states): this.
21196 * src/Makefile.am (noinst_HEADERS): Adjust.
21197
21198 2000-09-20 Akim Demaille <akim@epita.fr>
21199
21200 * src/acconfig.h: Don't protect config.h against multiple
21201 inclusion.
21202 Don't define PARAMS.
21203 * src/system.h: Define PARAMS.
21204 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21205 purpose of config.h. system.h must not try to fix wrong
21206 definitions in config.h.
21207
21208 2000-09-20 Akim Demaille <akim@epita.fr>
21209
21210 * src/derives.h: New file.
21211 * src/main.c, src/derives.h: Use it.
21212 Formatting changes.
21213 * src/Makefile.am (noinst_HEADERS): Adjust.
21214
21215 2000-09-20 Akim Demaille <akim@epita.fr>
21216
21217 * tests/atgeneral.m4: Update from Autoconf.
21218 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21219 (AT_CHECK_CALC): New macros.
21220 Use these macros to test bison with options `', `--raw',
21221 `--debug', `--yacc', `--yacc --debug'.
21222
21223 2000-09-19 Akim Demaille <akim@epita.fr>
21224
21225 * src/output.c: Formatting changes.
21226 * src/machine.h: Remove, leaving its contents in...
21227 * src/system.h: here.
21228 Include stdio.h.
21229 Adjust all dependencies on stdio.h and machine.h.
21230 * src/getargs.h: New file.
21231 Let all `extern' declarations about getargs.c be replaced with
21232 inclusion of `getargs.h'.
21233 * src/Makefile.am (noinst_HEADERS): Adjust.
21234
21235 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21236 scope.
21237 (yyerror): Returns void, not int.
21238 * doc/bison.texinfo: Formatting changes.
21239
21240 2000-09-19 Akim Demaille <akim@epita.fr>
21241
21242 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21243 portable.
21244
21245 2000-09-18 Akim Demaille <akim@epita.fr>
21246
21247 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21248 * src/Makefile.am (INCLUDES): Don't.
21249 Be ready to fetch headers in lib/.
21250
21251 2000-09-18 Akim Demaille <akim@epita.fr>
21252
21253 * doc/bison.texinfo: Update the copyright.
21254 ANSIfy and GNUify the examples.
21255 Remove the old menu.
21256
21257 2000-09-18 Akim Demaille <akim@epita.fr>
21258
21259 First set of tests: use the `calc' example from the documentation.
21260
21261 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21262 is defined only when YYDEBUG is.
21263 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21264 * src/files.c (tryopen, tryclose): Formatting changes.
21265 Move to the top and be static.
21266 * src/reader.c (read_signed_integer): Likewise.
21267 * tests/calc.m4: New file.
21268 * Makefile.am, suite.m4: Adjust.
21269 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21270
21271 2000-09-18 Akim Demaille <akim@epita.fr>
21272
21273 Add support for an Autotest test suite for Bison.
21274
21275 * m4/m4.m4, m4/atconfig.m4: New files.
21276 * m4/Makefile.am (EXTRA_DIST): Adjust.
21277 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21278 files.
21279 * src/getargs.c: Display a more standard --version message.
21280 * src/reader.c (reader): Formatting changes.
21281 No longer depend upon VERSION_STRING.
21282 * configure.in: No longer use `dnl'.
21283 Set up the test suite and the new directory `tests/.
21284 (VERSION_STRING): Remove.
21285
21286 2000-04-14 Akim Demaille <akim@epita.fr>
21287
21288 * src/reader.c (copy_comment2): New function, same as former
21289 `copy_comment', but outputs into two FILE *.
21290 (copy_comment): Use it.
21291 (parse_union_decl): Use it.
21292 (get_type, parse_start_decl): Use the same `invalid' message.
21293 (parse_start_decl, parse_union_decl): Use the same `multiple'
21294 message.
21295 (parse_union_decl, copy_guard, copy_action): Use the same
21296 `unmatched' message.
21297 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21298
21299 2000-03-31 Akim Demaille <akim@epita.fr>
21300
21301 * src/files.c (tryopen, tryclose): Move to the top.
21302 Be static.
21303
21304 2000-03-31 Akim Demaille <akim@epita.fr>
21305
21306 * src/main.c (main): Don't call `done', exit does it.
21307
21308 2000-03-31 Akim Demaille <akim@epita.fr>
21309
21310 * allocate.c: s/return (foo)/return foo/.
21311 * lalr.c: Likewise.
21312 * LR0.c: Likewise.
21313 * output.c: Likewise.
21314 * reader.c: Likewise.
21315 * symtab.c: Likewise.
21316 * vmsgetargs.c: Likewise.
21317
21318 2000-03-31 Akim Demaille <akim@epita.fr>
21319
21320 Clean up the error reporting functions.
21321
21322 * src/report.c: New file.
21323 * src/report.h: Likewise.
21324 * src/Makefile.am: Adjust.
21325 * m4/error.m4: New file.
21326 * m4/Makefile.am: Adjust.
21327 * configure.in (jm_PREREQ_ERROR): Call it.
21328 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21329 Remove.
21330 (fatal, fatals): Remove. All callers use complain.c::fatal.
21331 (warn, warni, warns, warnss, warnss): Remove. All callers use
21332 complain.c::complain.
21333 (toomany): Remove, use fatal instead.
21334 * src/files.c (done): No argument, use complain_message_count.
21335 * src/main.c (main): Register `done' to `atexit'.
21336
21337 * src/getargs.c (usage): More `fputs', less `fprintf'.
21338
21339 2000-03-28 Akim Demaille <akim@epita.fr>
21340
21341 * lib/: New directory.
21342 * Makefile.am (SUBDIRS): Adjust.
21343 * configure.in: Adjust.
21344 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21345 useless.
21346 * src/alloca.c: Moved to lib/.
21347 * src/getopt.c: Likewise.
21348 * src/getopt1.c: Likewise.
21349 * src/getopt.h: Likewise.
21350 * src/ansi2knr.c: Likewise.
21351 * src/ansi2knr.1: Likewise.
21352 * src/Makefile.am: Adjust.
21353 * lib/Makefile.am: New file.
21354
21355 2000-03-28 Akim Demaille <akim@epita.fr>
21356
21357 * src/getargs.c (usage): Refresh the help message.
21358
21359 2000-03-17 Akim Demaille <akim@epita.fr>
21360
21361 * src/getopt1.c: Updated from textutils 2.0e
21362 * src/getopt.c: Likewise.
21363 * src/getopt.h: Likewise.
21364
21365 2000-03-17 Akim Demaille <akim@epita.fr>
21366
21367 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21368 the file name, not the whole `#line LINE FILE'.
21369
21370 2000-03-17 Akim Demaille <akim@epita.fr>
21371
21372 On syntax errors, report the token on which we choked.
21373
21374 * src/bison.s1 (yyparse): In the label yyerrlab, when
21375 YYERROR_VERBOSE, add yychar in msg.
21376
21377 2000-03-17 Akim Demaille <akim@epita.fr>
21378
21379 * src/reader.c (copy_at): New function.
21380 (copy_guard): Use it.
21381 (copy_action): Use it.
21382
21383 2000-03-17 Akim Demaille <akim@epita.fr>
21384
21385 Be kind to translators, save some useless translations.
21386
21387 * src/main.c (banner): New function.
21388 (fatal_banner): Use it.
21389 (warn_banner): Use it.
21390
21391 2000-03-17 Akim Demaille <akim@epita.fr>
21392
21393 * src/reader.c (copy_definition): Use copy_string and
21394 copy_comment. Removed now unused `match', `ended',
21395 `cplus_comment'.
21396 (copy_comment, copy_string): Moved, to be visible from
21397 copy_definition.
21398
21399 2000-03-17 Akim Demaille <akim@epita.fr>
21400
21401 * src/reader.c (copy_string): Declare `static inline'. No
21402 problems with inline, since it is checked by configure.
21403 (copy_comment): Likewise.
21404
21405 2000-03-17 Akim Demaille <akim@epita.fr>
21406
21407 * src/reader.c (packsymbols): Formatting changes.
21408
21409 2000-03-17 Akim Demaille <akim@epita.fr>
21410
21411 * src/reader.c (copy_comment): New function, factored out from:
21412 (copy_action): Use it. Removed now unused `match', `ended',
21413 `cplus_comment'.
21414 (copy_guard): Likewise.
21415
21416 2000-03-17 Akim Demaille <akim@epita.fr>
21417
21418 * src/reader.c (copy_string): New function, factored out from:
21419 (copy_action): Use it.
21420 (copy_guard): Likewise.
21421
21422 2000-03-17 Akim Demaille <akim@epita.fr>
21423
21424 Change the handling of @s so that they behave exactly like $s.
21425 There is now a pseudo variable @$ (readble and writable), location
21426 of the lhs of the rule (by default ranging from the location of
21427 the first symbol of the rhs, to the location of the last symbol,
21428 or, if the rhs is empty, YYLLOC).
21429
21430 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21431 yyval.
21432 (yyparse): When providing a default semantic action, provide a
21433 default location action.
21434 (after the $): No longer change `*YYLSP', just stack YYLOC the
21435 same way you stack YYVAL.
21436 * src/reader.c (read_declarations): Use warns.
21437 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21438 (copy_action, case '@'): Likewise.
21439 Use a standard error message, to save useless work from
21440 translators.
21441
21442 2000-03-17 Akim Demaille <akim@epita.fr>
21443
21444 * src/bison.s1: Formatting and cosmetics changes.
21445 * src/reader.c: Likewise.
21446 Update the Copyright notice.
21447
21448 2000-03-17 Akim Demaille <akim@epita.fr>
21449
21450 * src/bison.s1 (#line): All set to `#line' only, since the
21451 Makefile now handles them.
21452
21453 2000-03-16 Akim Demaille <akim@epita.fr>
21454
21455 * src/output.c (output_rule_data): Output the documentation of
21456 some of the tables.
21457 (Copyright notice): Update.
21458 Formatting changes.
21459
21460 2000-03-16 Akim Demaille <akim@epita.fr>
21461
21462 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21463 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21464 One `#if YYDEBUG' remains, since it uses variables which are
21465 defined only if `YYDEBUG != 0'.
21466
21467 2000-03-16 Akim Demaille <akim@epita.fr>
21468
21469 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21470 and related variables so that the similarities are highlighted.
21471
21472 2000-03-16 Akim Demaille <akim@epita.fr>
21473
21474 * src/bison.s1: Properly indent CPP directives.
21475
21476 2000-03-16 Akim Demaille <akim@epita.fr>
21477
21478 * src/bison.s1: Properly indent the `alloca' CPP section.
21479
21480 2000-03-16 Akim Demaille <akim@epita.fr>
21481
21482 Do not hard code values of directories in `configure.in'.
21483 Update the `configure' tool chain.
21484
21485 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21486 src/makefile.am.
21487 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21488 (AC_OUTPUT): Add m4/Makefile.
21489 Bump to bison 1.28a, 1.29 has never been released.
21490 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21491 handled via src/Makefile.am.
21492 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21493 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21494 autoheader.
21495 * Makefile.am (SUBDIRS): Add m4.
21496 (ACLOCAL_AM_FLAGS): New variable.
21497 (AUTOMAKE_OPTIONS): Add check-news.
21498 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21499 the proper line number and file name.
21500 (DEFS): Propagate the location of bison library files and of the
21501 locale files.
21502 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21503 builddir.
21504 * acinclude.m4: Remove, replaced by the directory m4.
21505 * m4/Makefile.am (EXTRA_DIST): New variable.
21506 * m4/gettext.m4: New file, from the fileutils.
21507 * m4/lcmessage.m4: Likewise
21508 * m4/progtest.m4: Likewise.
21509 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21510
21511 2000-03-10 Akim Demaille <akim@epita.fr>
21512
21513 * src/closure.c:
21514 Formatting changes of various comments.
21515 Respect the GNU coding standards at various places.
21516 Don't use `_()' when no translation is needed.
21517
21518 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21519
21520 * src/files.c:
21521 OS/2 honors TMPDIR environment variable.
21522
21523 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21524
21525 * doc/bison.texinfo: Tweaked spelling and grammar.
21526 Updated ISBN.
21527 Removed reference to price of printed copy.
21528 Mention BISON_SIMPLE and BISON_HAIRY.
21529
21530 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21531
21532 * configure.in, NEWS:
21533 Bison 1.29 released.
21534
21535 1999-10-27 Jesse Thilo <jthilo@gnu.org>
21536
21537 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21538 Added reference card.
21539
21540 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21541
21542 * po/ru.po: Added Russian translation.
21543
21544 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21545
21546 * configure.in: Added Russian translation.
21547
21548 1999-07-06 Jesse Thilo <jthilo@gnu.org>
21549
21550 * configure.in, NEWS, README:
21551 Released version 1.28.
21552
21553 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21554
21555 * src/system.h:
21556 Squashed redefinition warning on some systems.
21557
21558 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21559 Have configure build version string instead of relying on ANSI string
21560 concatentation.
21561
21562 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21563
21564 * po/POTFILES.in: Got rid of version.c.
21565
21566 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21567
21568 * acconfig.h, configure.in:
21569 Have configure build version string instead of relying on ANSI string
21570 concatentation.
21571
21572 1999-06-08 Jesse Thilo <jthilo@gnu.org>
21573
21574 * doc/bison.1:
21575 Dropped mention of `+' for long-named options.
21576
21577 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21578
21579 * src/files.c: Added <unistd.h> for unlink().
21580
21581 * src/Makefile.am, src/system.h:
21582 I18n fixes.
21583
21584 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21585
21586 * README: Added a FAQ list.
21587
21588 * configure.in, acconfig.h:
21589 I18n fixes.
21590
21591 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21592
21593 * doc/FAQ, doc/Makefile.am:
21594 Added a FAQ list.
21595
21596 1999-05-19 Jesse Thilo <jthilo@gnu.org>
21597
21598 * src/alloc.h, src/symtab.h, src/version.c:
21599 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21600
21601 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21602
21603 * src/.cvsignore, src/Makefile.am:
21604 Reorganized: sources in `src', documentation in `doc'.
21605
21606 * src/lex.c (literalchar):
21607 fixed the code for escaping double quotes (thanks
21608 Jonathan Czisny.)
21609
21610 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21611
21612 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
21613 Adjusted paths to reflect directory reorganization.
21614
21615 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21616
21617 * doc/.cvsignore, doc/Makefile.am:
21618 Reorganized: sources in `src', documentation in `doc'.
21619
21620 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21621
21622 * configure.in:
21623 Updated AC_INIT file to reflect directory reorganization.
21624
21625 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
21626 Reorganized: sources in `src', documentation in `doc'.
21627
21628 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21629
21630 * src/allocate.c:
21631 Don't declare calloc() and realloc() if not necessary.
21632
21633 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21634
21635 * configure.in, acconfig.h, acinclude.m4:
21636 Don't declare calloc() and realloc() if not necessary.
21637
21638 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21639
21640 * po/.cvsignore: Added i18n support.
21641
21642 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21643
21644 * acconfig.h, configure.in, Makefile.am:
21645 Added i18n support.
21646
21647 1999-03-22 Jesse Thilo <jthilo@gnu.org>
21648
21649 * src/bison.s1: Fixed #line numbers.
21650
21651 1999-03-15 Jesse Thilo <jthilo@gnu.org>
21652
21653 * po/es.po, po/fr.po, po/nl.po, po/de.po:
21654 Added PO files from Translation Project.
21655
21656 1999-03-03 Jesse Thilo <jthilo@gnu.org>
21657
21658 * Makefile.am:
21659 Added support for non-ANSI compilers (ansi2knr).
21660
21661 1999-02-16 Jesse Thilo <jthilo@gnu.org>
21662
21663 * configure.in: Bumped version number to 1.27.
21664
21665 * Makefile.am:
21666 Added `bison.simple' to list of files removed by `make distclean'.
21667
21668 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21669
21670 * src/files.c, src/files.h:
21671 Defined locations of parser files in config.h instead of Makefile.
21672
21673 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21674
21675 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
21676 Defined locations of parser files in config.h instead of Makefile.
21677
21678 1999-02-09 Jesse Thilo <jthilo@gnu.org>
21679
21680 * Makefile.am:
21681 Removed inappropriate use of $< macro.
21682
21683 1999-02-05 Jesse Thilo <jthilo@gnu.org>
21684
21685 * po/Makefile.in.in, po/POTFILES.in:
21686 Add `po' directory skeleton.
21687
21688 1999-01-27 Jesse Thilo <jthilo@gnu.org>
21689
21690 * README: Document help-bison list.
21691
21692 * configure.in: Add check for mkstemp().
21693
21694 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21695
21696 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
21697 Hush a few compiler warnings.
21698
21699 * src/files.c:
21700 Add tryclose(), which verifies that fclose was successful.
21701 Hush a couple of compiler warnings.
21702
21703 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21704
21705 * Makefile.am, OChangeLog:
21706 ChangeLog is now automatically generated. Include the old version as
21707 OChangeLog.
21708
21709 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21710
21711 * 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:
21712 Update FSF address.
21713
21714 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21715
21716 * doc/bison.texinfo: Fix formatting glitch.
21717
21718 * doc/bison.texinfo: Update FSF address.
21719
21720 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21721
21722 * acconfig.h: Update FSF address.
21723
21724 1999-01-08 Jesse Thilo <jthilo@gnu.org>
21725
21726 * src/system.h:
21727 Don't define PACKAGE here, since config.h defines it.
21728
21729 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21730
21731 * src/reader.c: Update copyright date.
21732
21733 * src/main.c:
21734 Ditch sprintf to statically-sized buffers in fatal/warn functions in
21735 favor of output directly to stderr (avoids buffer overruns).
21736
21737 * src/reader.c: Some checks for premature EOF.
21738
21739 * 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:
21740 Use prototypes if the compiler understands them.
21741
21742 * src/files.c: Honor TMPDIR on Unix hosts.
21743 Use prototypes if the compiler understands them.
21744
21745 * src/reader.c:
21746 Fix a couple of buffer overrun bugs.
21747 Use prototypes if the compiler understands them.
21748
21749 * src/system.h: Include unistd.h and ctype.h.
21750 Use #ifdef instead of #if for NLS symbols.
21751
21752 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21753
21754 * doc/bison.texinfo:
21755 Delete comment "consider using @set for edition number, etc..." since
21756 we now are doing so.
21757
21758 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21759
21760 * configure.in:
21761 Use prototypes if the compiler understands them.
21762
21763 * NEWS: Document 1.26 highlights.
21764
21765 * Makefile.am: Require Automake 1.3 or later.
21766
21767 * acconfig.h:
21768 Use prototypes if the compiler understands them.
21769
21770 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21771
21772 * src/version.c:
21773 Use VERSION symbol from automake for version number.
21774
21775 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21776
21777 * acconfig.h, configure.in, version.cin:
21778 Use VERSION symbol from automake for version number.
21779
21780 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21781
21782 * Makefile.am:
21783 Distribute original version of simple parser (bison.s1), not built
21784 version (bison.simple).
21785
21786 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21787
21788 * doc/bison.texinfo: Add info dir entry.
21789
21790 * doc/bison.texinfo:
21791 Let automake put version number into documentation.
21792
21793 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21794
21795 * src/bison.cld, src/build.com, src/vmshlp.mar:
21796 Add non-RCS files from /gd/gnu/bison.
21797
21798 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21799
21800 * doc/bison.1:
21801 Document the BISON_HAIRY and BISON_SIMPLE variables.
21802
21803 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21804
21805 * src/version.c: Build version.c automatically.
21806
21807 * src/reader.c:
21808 Fix token numbering (used to start at 258, not 257).
21809
21810 * src/system.h: Include config.h.
21811
21812 * src/getargs.c: Update bug report address.
21813
21814 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
21815 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
21816
21817 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21818
21819 * Makefile.am:
21820 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21821
21822 * configure.in, version.cin:
21823 Build version.c automatically.
21824
21825 * AUTHORS: Add AUTHORS file.
21826
21827 * README: Update bug report address.
21828
21829 * bison.simple:
21830 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21831
21832 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
21833 Add automake stuff.
21834
21835 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21836
21837 * doc/bison.texinfo: Clean up some formatting.
21838
21839 1998-05-05 Richard Stallman <rms@gnu.org>
21840
21841 * doc/bison.texinfo:
21842 Explain better why to make a pure parser.
21843
21844 1998-01-05 Richard Stallman <rms@gnu.org>
21845
21846 * src/files.c (openfiles):
21847 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
21848 find a temporary directory, if possible. Do not unlink files while
21849 they are open.
21850
21851 1997-08-25 Richard Stallman <rms@gnu.org>
21852
21853 * src/reader.c (stack_offset;):
21854 Change some warni to warns.
21855
21856 * src/lex.c (literalchar): Use warns, not warni.
21857
21858 1997-06-28 Richard Stallman <rms@gnu.org>
21859
21860 * src/bison.s1: Add a Bison version comment.
21861
21862 * src/main.c (fatal, warn, berror):
21863 Use program_name.
21864
21865 1997-06-28 Richard Stallman <rms@gnu.org>
21866
21867 * Makefile.in (bison_version): New variable.
21868 (dist): Use that variable.
21869 (bison.s1): Substitute the Bison version into bison.simple.
21870
21871 * bison.simple: Add a Bison version comment.
21872
21873 1997-06-18 Richard Stallman <rms@gnu.org>
21874
21875 * src/main.c (fatal, warn, berror):
21876 Make error messages standard.
21877 (toomany): Improve error message text.
21878
21879 * 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:
21880 new.h renamed to alloc.h.
21881
21882 1997-06-18 Richard Stallman <rms@gnu.org>
21883
21884 * Makefile.in: new.h renamed to alloc.h.
21885
21886 1997-05-24 Richard Stallman <rms@gnu.org>
21887
21888 * src/lex.c (literalchar):
21889 Fix the code for escaping \, " and '.
21890
21891 (lex): Avoid trouble when there are many chars
21892 to discard in a char literal with just several chars in it.
21893
21894 1997-05-17 Richard Stallman <rms@gnu.org>
21895
21896 * src/bison.s1:
21897 Use malloc, if using alloca is troublesome.
21898 (YYSTACK_USE_ALLOCA): New flag macro.
21899 Define it for some systems and compilers.
21900 (YYSTACK_ALLOC): New macro.
21901 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21902 If it was malloc'd, free it.
21903
21904 1997-05-17 Richard Stallman <rms@gnu.org>
21905
21906 * bison.simple:
21907 Use malloc, if using alloca is troublesome.
21908 (YYSTACK_USE_ALLOCA): New flag macro.
21909 Define it for some systems and compilers.
21910 (YYSTACK_ALLOC): New macro.
21911 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21912 If it was malloc'd, free it.
21913
21914 1997-04-23 Richard Stallman <rms@gnu.org>
21915
21916 * src/bison.s1:
21917 (alloca) [__hpux]: Always define as __builtin_alloca.
21918
21919 1997-04-23 Richard Stallman <rms@gnu.org>
21920
21921 * bison.simple:
21922 (alloca) [__hpux]: Always define as __builtin_alloca.
21923
21924 1997-04-22 Richard Stallman <rms@gnu.org>
21925
21926 * src/bison.s1:
21927 [__hpux]: Include alloca.h (right for HPUX 10)
21928 instead of declaring alloca (right for HPUX 9).
21929
21930 * src/bison.s1 (__yy_memcpy):
21931 Declare arg `count' as unsigned int.
21932 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21933
21934 1997-04-22 Richard Stallman <rms@gnu.org>
21935
21936 * bison.simple:
21937 [__hpux]: Include alloca.h (right for HPUX 10)
21938 instead of declaring alloca (right for HPUX 9).
21939
21940 * bison.simple (__yy_memcpy):
21941 Declare arg `count' as unsigned int.
21942 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21943
21944 1997-01-03 Richard Stallman <rms@gnu.org>
21945
21946 * src/allocate.c: [__STDC__ or _MSC_VER]:
21947 Declare calloc and realloc to return void *.
21948
21949 1997-01-02 Richard Stallman <rms@gnu.org>
21950
21951 * src/system.h:
21952 [_MSC_VER]: Include stdlib.h and process.h.
21953 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
21954
21955 * src/main.c (main): Return FAILURE as a value.
21956 (printable_version): Declare arg as int, not char.
21957
21958 1997-01-02 Richard Stallman <rms@gnu.org>
21959
21960 * Makefile.in (dist):
21961 Explicitly check for symlinks, and copy them.
21962
21963 1996-12-19 Richard Stallman <rms@gnu.org>
21964
21965 * src/files.c:
21966 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
21967
21968 1996-12-18 Paul Eggert <eggert@gnu.org>
21969
21970 * src/bison.s1 (yyparse):
21971 If __GNUC__ and YYPARSE_PARAM are both defined,
21972 declare yyparse to have a void * argument.
21973
21974 1996-12-18 Paul Eggert <eggert@gnu.org>
21975
21976 * bison.simple (yyparse):
21977 If __GNUC__ and YYPARSE_PARAM are both defined,
21978 declare yyparse to have a void * argument.
21979
21980 1996-12-17 Richard Stallman <rms@gnu.org>
21981
21982 * src/reduce.c (nbits): Add some casts.
21983
21984 1996-08-12 Richard Stallman <rms@gnu.org>
21985
21986 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
21987
21988 1996-08-12 Richard Stallman <rms@gnu.org>
21989
21990 * bison.simple: Test _MSDOS as well as _MSDOS_.
21991
21992 1996-07-31 Richard Stallman <rms@gnu.org>
21993
21994 * src/bison.s1:
21995 [__sun && __i386]: Include alloca.h.
21996
21997 1996-07-31 Richard Stallman <rms@gnu.org>
21998
21999 * bison.simple:
22000 [__sun && __i386]: Include alloca.h.
22001
22002 1996-07-30 Richard Stallman <rms@gnu.org>
22003
22004 * src/bison.s1: Comment change.
22005
22006 * src/bison.s1: Test _MSDOS_, not MSDOS.
22007
22008 1996-07-30 Richard Stallman <rms@gnu.org>
22009
22010 * bison.simple: Comment change.
22011
22012 * bison.simple: Test _MSDOS_, not MSDOS.
22013
22014 1996-06-01 Richard Stallman <rms@gnu.org>
22015
22016 * 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:
22017 Insert `_' macro around many string constants.
22018
22019 * src/main.c:
22020 Insert `_' macro around many string constants.
22021
22022 (main): Call setlocale, bindtextdomain and textdomain.
22023
22024 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22025 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22026 [ENABLE_NLS]: Include libintl.h.
22027 [ENABLE_NLS] (gettext): Define.
22028 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22029 (N_, PACKAGE, LOCALEDIR): New macros.
22030
22031 1996-06-01 Richard Stallman <rms@gnu.org>
22032
22033 * POTFILES.in: New file.
22034
22035 * Makefile.in (allocate.o):
22036 Define target explicitly.
22037
22038 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22039 (LDFLAGS): Set to @LDFLAGS@.
22040 (configure): Run autoconf only if preceding `cd' succeeds.
22041 (bison.s1): Redirect output to temporary file then move the
22042 temporary to the target, rather than redirecting directly to bison.s1.
22043 (clean): Remove config.status and config.log.
22044 (distclean): Don't remove config.status here.
22045
22046 1996-05-12 Richard Stallman <rms@gnu.org>
22047
22048 * src/bison.s1:
22049 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22050
22051 1996-05-12 Richard Stallman <rms@gnu.org>
22052
22053 * bison.simple:
22054 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22055
22056 1996-05-11 Richard Stallman <rms@gnu.org>
22057
22058 * src/bison.s1 (__yy_memcpy):
22059 Really reorder the args, as was supposedly done on Feb 14 1995.
22060 (yyparse): Calls changed accordingly.
22061
22062 1996-05-11 Richard Stallman <rms@gnu.org>
22063
22064 * Makefile.in (dist): Don't use $(srcdir).
22065
22066 * bison.simple (__yy_memcpy):
22067 Really reorder the args, as was supposedly done on Feb 14 1995.
22068 (yyparse): Calls changed accordingly.
22069
22070 1996-01-27 Richard Stallman <rms@gnu.org>
22071
22072 * src/output.c (output_rule_data):
22073 Test YYERROR_VERBOSE in the conditional
22074 around the definition of ttyname.
22075
22076 1995-12-29 Richard Stallman <rms@gnu.org>
22077
22078 * src/bison.s1:
22079 Fix line numbers in #line commands.
22080
22081 1995-12-29 Richard Stallman <rms@gnu.org>
22082
22083 * bison.simple:
22084 Fix line numbers in #line commands.
22085
22086 1995-12-27 Richard Stallman <rms@gnu.org>
22087
22088 * src/bison.s1 (YYPARSE_PARAM_DECL):
22089 In C++, make it always null.
22090 (YYPARSE_PARAM_ARG): New macro.
22091 (yyparse): Use YYPARSE_PARAM_ARG.
22092
22093 1995-12-27 Richard Stallman <rms@gnu.org>
22094
22095 * bison.simple (YYPARSE_PARAM_DECL):
22096 In C++, make it always null.
22097 (YYPARSE_PARAM_ARG): New macro.
22098 (yyparse): Use YYPARSE_PARAM_ARG.
22099
22100 1995-11-29 Richard Stallman <rms@gnu.org>
22101
22102 * doc/bison.texinfo:
22103 Describe literal string tokens, %raw, %no_lines, %token_table.
22104
22105 1995-11-29 Daniel Hagerty <hag@gnu.org>
22106
22107 * doc/bison.texinfo: Fixed update date
22108
22109 1995-10-16 Richard Stallman <rms@gnu.org>
22110
22111 * src/version.c: Version 1.25.
22112
22113 1995-10-16 Richard Stallman <rms@gnu.org>
22114
22115 * NEWS: *** empty log message ***
22116
22117 1995-10-16 Richard Stallman <rms@gnu.org>
22118
22119 * doc/bison.1, doc/bison.rnh:
22120 Add new options.
22121
22122 1995-10-15 Richard Stallman <rms@gnu.org>
22123
22124 * src/vmsgetargs.c, src/getargs.c:
22125 Added -n, -k, and -raw switches.
22126 (noparserflag, toknumflag, rawtoknumflag): New variables.
22127
22128 * src/symtab.h (SALIAS):
22129 New #define for adding aliases to %token.
22130 (struct bucket): Added `alias' field.
22131
22132 * src/reduce.c (reduce_grammar):
22133 Revise error message.
22134 (print_notices): Remove final `.' from error message.
22135
22136 * src/reader.c (reader_output_yylsp):
22137 New function.
22138 (readgram): Use `#if 0' around code that accepted %command
22139 inside grammar rules: The documentation doesn't allow it,
22140 and it will fail since the %command processors scan for the next %.
22141 (parse_token_decl): Extended the %token
22142 declaration to allow a multi-character symbol as an alias.
22143 (parse_thong_decl): New function.
22144 (read_declarations): Added %thong declarations.
22145 (read_declarations): Handle NOOP to deal with allowing
22146 % declarations as another means to specify the flags.
22147 (readgram): Allow %prec prior to semantics embedded in a rule.
22148 (skip_to_char, read_declarations, copy_definition)
22149 (parse_token_decl, parse_start_decl, parse_type_decl)
22150 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22151 (get_type_name, copy_guard, copy_action, readgram)
22152 (get_type, packsymbols): Revised most error messages.
22153 Changed `fatal' to `warnxxx' to avoid aborting for error.
22154 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22155 (read_declarations): Improve the error message for
22156 an invalid character. Do not abort.
22157 (read_declarations, copy_guard, copy_action): Use
22158 printable_version to avoid unprintable characters in printed output.
22159 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22160 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22161 Allow the type of a non-terminal can be given
22162 more than once, as long as all specifications give the same type.
22163
22164 * src/output.c:
22165 (output_headers, output_trailers, output, output_gram)
22166 (output_rule_data): Implement noparserflag variable.
22167 Implement toknumflag variable.
22168 (output): Call reader_output_yylsp to output LTYPESTR.
22169
22170 * src/main.c (main):
22171 If reader sees an error, don't process the grammar.
22172 (fatals): Updated to not use VARARGS1.
22173 (printable_version, int_to_string, warn, warni, warns, warnss)
22174 (warnsss): New error reporting functions. Avoid abort for error.
22175
22176 * src/lex.h:
22177 Added THONG and NOOP for alias processing.
22178 Added SETOPT for the new code that allows setting options with %flags.
22179
22180 * src/lex.c:
22181 Include getopt.h. Add some extern decls.
22182 (safegetc): New function to deal with EOF gracefully.
22183 (literalchar); new function to deal with reading \ escapes.
22184 (lex): Use literalchar.
22185 (lex): Implemented "..." tokens.
22186 (literalchar, lex, parse_percent_token): Made tokenbuffer
22187 always contain the token. This includes growing the token
22188 buffer while reading an integer.
22189 (parse_percent_token): Replaced if-else statement with percent_table.
22190 (parse_percent_token): Added % declarations as another
22191 way to specify the flags -n, -l, and -r. Also added hooks for
22192 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22193 major changes to files.c.
22194 (lex) Retain in the incoming stream a character following
22195 an incorrect '/'.
22196 (skip_white_space, lex): Revised most error messages
22197 and changed fatal to warn to avoid aborting.
22198 (percent_table): Added %thong declarations.
22199
22200 * src/gram.h: Comment changes.
22201
22202 * src/files.c (openfiles, open_extra_files, done):
22203 Add faction flag
22204 and actfile file. Handle noparserflag. Both for -n switch.
22205
22206 * src/conflicts.c (resolve_sr_conflict):
22207 Remove use of alloca.
22208
22209 1995-06-01 Jim Meyering <meyering@gnu.org>
22210
22211 * doc/bison.texinfo: *** empty log message ***
22212
22213 1995-05-06 Richard Stallman <rms@gnu.org>
22214
22215 * src/bison.s1: Comment change.
22216
22217 1995-05-06 Richard Stallman <rms@gnu.org>
22218
22219 * bison.simple: Comment change.
22220
22221 1995-05-03 Richard Stallman <rms@gnu.org>
22222
22223 * src/version.c: Version now 1.24.
22224
22225 * src/bison.s1: Change distribution terms.
22226
22227 * src/version.c: Version now 1.23.
22228
22229 1995-05-03 Richard Stallman <rms@gnu.org>
22230
22231 * doc/bison.texinfo:
22232 Rewrite "Conditions for Using Bison".
22233 Update version to 1.24.
22234
22235 1995-05-03 Richard Stallman <rms@gnu.org>
22236
22237 * bison.simple: Change distribution terms.
22238
22239 1995-02-23 Richard Stallman <rms@gnu.org>
22240
22241 * src/files.c: Test __VMS_POSIX as well as VMS.
22242
22243 1995-02-14 Jim Meyering <meyering@gnu.org>
22244
22245 * src/bison.s1 (__yy_memcpy):
22246 Renamed from __yy_bcopy to avoid
22247 confusion. Reverse FROM and TO arguments to be consistent with
22248 those of memcpy.
22249
22250 1995-02-14 Jim Meyering <meyering@gnu.org>
22251
22252 * bison.simple (__yy_memcpy):
22253 Renamed from __yy_bcopy to avoid
22254 confusion. Reverse FROM and TO arguments to be consistent with
22255 those of memcpy.
22256
22257 1994-11-10 David J. MacKenzie <djm@gnu.org>
22258
22259 * NEWS: reformat
22260
22261 * NEWS: New file.
22262
22263 * Makefile.in (DISTFILES): Include NEWS.
22264
22265 * Makefile.in (DISTFILES):
22266 Include install-sh, not install.sh.
22267
22268 * configure.in: Update to Autoconf v2 macro names.
22269
22270 1994-10-05 David J. MacKenzie <djm@gnu.org>
22271
22272 * Makefile.in: fix typo
22273
22274 * Makefile.in (prefix, exec_prefix):
22275 Let configure set them.
22276
22277 1994-09-28 David J. MacKenzie <djm@gnu.org>
22278
22279 * Makefile.in: Set datadir to $(prefix)/share.
22280
22281 1994-09-15 Richard Stallman <rms@gnu.org>
22282
22283 * src/bison.s1:
22284 Update copyright notice and GPL version.
22285
22286 1994-09-15 Richard Stallman <rms@gnu.org>
22287
22288 * bison.simple:
22289 Update copyright notice and GPL version.
22290
22291 1994-07-12 Richard Stallman <rms@gnu.org>
22292
22293 * src/reduce.c, src/reader.c:
22294 entered into RCS
22295
22296 1994-05-05 David J. MacKenzie <djm@gnu.org>
22297
22298 * Makefile.in: entered into RCS
22299
22300 1994-03-26 Richard Stallman <rms@gnu.org>
22301
22302 * src/bison.s1: entered into RCS
22303
22304 1994-03-26 Richard Stallman <rms@gnu.org>
22305
22306 * bison.simple: entered into RCS
22307
22308 1994-03-25 Richard Stallman <rms@gnu.org>
22309
22310 * src/main.c: entered into RCS
22311
22312 1994-03-24 Richard Stallman <rms@gnu.org>
22313
22314 * src/conflicts.c: entered into RCS
22315
22316 1994-01-02 Richard Stallman <rms@gnu.org>
22317
22318 * Makefile.in: *** empty log message ***
22319
22320 1993-11-21 Richard Stallman <rms@gnu.org>
22321
22322 * src/bison.s1: *** empty log message ***
22323
22324 1993-11-21 Richard Stallman <rms@gnu.org>
22325
22326 * doc/bison.texinfo: entered into RCS
22327
22328 * doc/bison.texinfo: *** empty log message ***
22329
22330 1993-11-21 Richard Stallman <rms@gnu.org>
22331
22332 * bison.simple: *** empty log message ***
22333
22334 1993-10-25 David J. MacKenzie <djm@gnu.org>
22335
22336 * doc/bison.texinfo: *** empty log message ***
22337
22338 1993-10-19 Richard Stallman <rms@gnu.org>
22339
22340 * src/bison.s1: *** empty log message ***
22341
22342 1993-10-19 Richard Stallman <rms@gnu.org>
22343
22344 * bison.simple: *** empty log message ***
22345
22346 1993-10-14 Richard Stallman <rms@gnu.org>
22347
22348 * src/bison.s1: *** empty log message ***
22349
22350 1993-10-14 Richard Stallman <rms@gnu.org>
22351
22352 * bison.simple: *** empty log message ***
22353
22354 1993-09-14 David J. MacKenzie <djm@gnu.org>
22355
22356 * doc/bison.texinfo: *** empty log message ***
22357
22358 1993-09-13 Noah Friedman <friedman@gnu.org>
22359
22360 * Makefile.in: *** empty log message ***
22361
22362 1993-09-10 Richard Stallman <rms@gnu.org>
22363
22364 * src/conflicts.c: *** empty log message ***
22365
22366 * src/system.h: entered into RCS
22367
22368 1993-09-10 Richard Stallman <rms@gnu.org>
22369
22370 * doc/bison.1: entered into RCS
22371
22372 1993-09-06 Noah Friedman <friedman@gnu.org>
22373
22374 * src/version.c: entered into RCS
22375
22376 1993-09-06 Noah Friedman <friedman@gnu.org>
22377
22378 * Makefile.in: *** empty log message ***
22379
22380 1993-07-30 David J. MacKenzie <djm@gnu.org>
22381
22382 * Makefile.in: *** empty log message ***
22383
22384 1993-07-24 Richard Stallman <rms@gnu.org>
22385
22386 * src/bison.s1: *** empty log message ***
22387
22388 1993-07-24 Richard Stallman <rms@gnu.org>
22389
22390 * bison.simple: *** empty log message ***
22391
22392 1993-07-08 David J. MacKenzie <djm@gnu.org>
22393
22394 * Makefile.in: *** empty log message ***
22395
22396 1993-07-04 Richard Stallman <rms@gnu.org>
22397
22398 * src/bison.s1: *** empty log message ***
22399
22400 1993-07-04 Richard Stallman <rms@gnu.org>
22401
22402 * bison.simple: *** empty log message ***
22403
22404 1993-06-26 David J. MacKenzie <djm@gnu.org>
22405
22406 * src/getargs.c: entered into RCS
22407
22408 1993-06-26 David J. MacKenzie <djm@gnu.org>
22409
22410 * doc/bison.texinfo: *** empty log message ***
22411
22412 * doc/bison.1: New file.
22413
22414 1993-06-25 Richard Stallman <rms@gnu.org>
22415
22416 * src/getargs.c: New file.
22417
22418 1993-06-16 Richard Stallman <rms@gnu.org>
22419
22420 * src/bison.s1: *** empty log message ***
22421
22422 1993-06-16 Richard Stallman <rms@gnu.org>
22423
22424 * bison.simple: *** empty log message ***
22425
22426 1993-06-03 Richard Stallman <rms@gnu.org>
22427
22428 * src/bison.s1: New file.
22429
22430 1993-06-03 Richard Stallman <rms@gnu.org>
22431
22432 * doc/bison.texinfo: *** empty log message ***
22433
22434 1993-06-03 Richard Stallman <rms@gnu.org>
22435
22436 * bison.simple: New file.
22437
22438 1993-05-19 Richard Stallman <rms@gnu.org>
22439
22440 * doc/bison.texinfo: New file.
22441
22442 1993-05-07 Noah Friedman <friedman@gnu.org>
22443
22444 * Makefile.in: *** empty log message ***
22445
22446 1993-04-28 Noah Friedman <friedman@gnu.org>
22447
22448 * src/reader.c: *** empty log message ***
22449
22450 1993-04-23 Noah Friedman <friedman@gnu.org>
22451
22452 * src/alloc.h: entered into RCS
22453
22454 1993-04-20 David J. MacKenzie <djm@gnu.org>
22455
22456 * src/version.c: *** empty log message ***
22457
22458 * src/files.c, src/allocate.c:
22459 entered into RCS
22460
22461 * src/reader.c: *** empty log message ***
22462
22463 * src/lex.c: entered into RCS
22464
22465 * src/conflicts.c: New file.
22466
22467 * src/symtab.c: entered into RCS
22468
22469 * src/alloc.h: New file.
22470
22471 * src/LR0.c: entered into RCS
22472
22473 1993-04-18 Noah Friedman <friedman@gnu.org>
22474
22475 * src/reader.c: New file.
22476
22477 * src/version.c: *** empty log message ***
22478
22479 1993-04-18 Noah Friedman <friedman@gnu.org>
22480
22481 * Makefile.in: *** empty log message ***
22482
22483 1993-04-17 Noah Friedman <friedman@gnu.org>
22484
22485 * Makefile.in: *** empty log message ***
22486
22487 1993-04-15 Richard Stallman <rms@gnu.org>
22488
22489 * src/main.c, src/files.c:
22490 New file.
22491
22492 1993-04-15 Noah Friedman <friedman@gnu.org>
22493
22494 * configure.in: entered into RCS
22495
22496 * configure.in: *** empty log message ***
22497
22498 * configure.in: New file.
22499
22500 1993-04-14 Richard Stallman <rms@gnu.org>
22501
22502 * Makefile.in: New file.
22503
22504 1993-04-13 Richard Stallman <rms@gnu.org>
22505
22506 * src/version.c: New file.
22507
22508 1993-03-25 Richard Stallman <rms@gnu.org>
22509
22510 * src/output.c: entered into RCS
22511
22512 1992-09-25 Richard Stallman <rms@gnu.org>
22513
22514 * configure.bat: entered into RCS
22515
22516 1992-06-22 Richard Stallman <rms@gnu.org>
22517
22518 * src/vmsgetargs.c: entered into RCS
22519
22520 1992-06-22 Richard Stallman <rms@gnu.org>
22521
22522 * doc/bison.rnh: entered into RCS
22523
22524 1992-04-20 David J. MacKenzie <djm@gnu.org>
22525
22526 * README: entered into RCS
22527
22528 1992-01-22 Richard Stallman <rms@gnu.org>
22529
22530 * src/machine.h: entered into RCS
22531
22532 1991-12-21 Richard Stallman <rms@gnu.org>
22533
22534 * src/lalr.c, src/closure.c:
22535 entered into RCS
22536
22537 1991-12-20 Richard Stallman <rms@gnu.org>
22538
22539 * src/state.h: entered into RCS
22540
22541 1991-12-18 Richard Stallman <rms@gnu.org>
22542
22543 * src/print.c, src/nullable.c, src/derives.c:
22544 entered into RCS
22545
22546 1991-11-03 David J. MacKenzie <djm@gnu.org>
22547
22548 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22549 entered into RCS
22550
22551 1988-09-09 Richard Stallman <rms@gnu.org>
22552
22553 * src/bison.hairy: entered into RCS
22554
22555 1987-12-16 Richard Stallman <rms@gnu.org>
22556
22557 * REFERENCES: entered into RCS
22558
22559
22560 -----
22561
22562 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
22563 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
22564 2007, 2008, 2009 Free Software Foundation, Inc.
22565
22566 Copying and distribution of this file, with or without
22567 modification, are permitted provided the copyright notice and this
22568 notice are preserved.