1 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
3 Use the correct conversion specifier for size_t.
4 Reported by Jim Meyering.
5 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
6 because Sbitset__Index is size_t.
7 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
9 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
11 tests: don't abuse AT_BISON_CHECK.
12 * tests/regression.at (parse-gram.y: LALR = IELR): Move
13 additional shell commands outside of AT_BISON_CHECK.
15 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
17 tests: check that parse-gram.y's IELR and LALR are identical.
18 * tests/atlocal.in (abs_top_srcdir): New shell variable.
19 * tests/regression.at (parse-gram.y: LALR = IELR): New test
22 2009-09-19 Alex Rozenman <rozenman@gmail.com>
24 Keep sub-messages aligned. Fix strings for translation.
25 * src/location.h: (location_print): Add return value.
26 * src/location.c: (location_print): Return number of printed
28 * src/complain.h: Two new functions (complain_at_indent,
30 * src/complain.cpp: Implement the alignment mechanism. Add new
31 static variable (indent_ptr). Use and update it (error_message,
32 complain_at_indent, warn_at_indent).
33 * src/scan-code.l: Fix strings for translations. Use new *_indent
34 functions (parse_ref, show_sub_messages).
35 * NEWS (2.5): Add an announcement about named references.
37 2009-09-17 Akim Demaille <demaille@gostai.com>
40 * doc/bison.texinfo: here.
41 Reported by Alex Rozenman.
43 2009-09-16 Akim Demaille <demaille@gostai.com>
45 doc: lalr1.cc and variants.
46 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
47 "variant" %define variables.
48 (C++ Semantic Values): Split into...
49 (C++ Unions, C++ Variants): these.
51 (C++ Parser Interface): Fix type names.
52 Document parser::syntax_error.
53 Document the fact that locations are not mandatory.
54 (C++ Scanner Interface): Split into...
55 (Split Symbols, Complete Symbols): these.
57 (Calc++ Parsing Driver): Use variants.
60 (Calc++ Parser): Declare all the tokens, no
61 longer accept raw characters.
63 Adjust types and printers.
65 (Calc++ Scanner): Use make_<SYMBOL> functions.
66 Use strerror in error message.
68 2009-09-16 Akim Demaille <demaille@gostai.com>
71 * doc/bison.texinfo: here.
73 2009-09-16 Akim Demaille <demaille@gostai.com>
76 * doc/bison.texinfo: Comment changes.
78 2009-09-16 Akim Demaille <demaille@gostai.com>
80 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
81 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
82 constructor to take a token_type instead of the (internal) symbol
85 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
86 don't call yytranslate_ here.
88 2009-09-16 Akim Demaille <demaille@gostai.com>
91 * TODO (Figures): New.
93 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
95 tests: clean up push.at test group titles.
96 * tests/push.at: Remove "Push Parsing: " from test group titles
97 because these are already under the banner "Push Parsing Tests".
99 2009-09-12 Alex Rozenman <rozenman@gmail.com>
101 Provide an additional sub-message for clarity.
102 Add "symbol not found in production" error message when
103 an "invalid reference" is detected in named references
105 * src/scan-code.l: Update "invalid reference" case.
106 * tests/named-ref.at: Adjust test-cases.
108 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
110 Clean up yacc.c a little.
111 * data/yacc.c: Clean up M4 for readability, and make output
112 whitespace more consistent. For the main parse function
113 comment, instead of saying "yyparse or yypush_parse", say either
114 "yyparse" or "yypush_parse" depending on which it actually is.
116 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
118 Fix --enable-gcc-warnings.
119 * src/parse-gram.y (%printer <param>): Handle param_none.
121 2009-09-09 Akim Demaille <demaille@gostai.com>
123 lalr1.cc: syntax_error as exceptions.
124 It is common to use sort of factories in the user actions. These
125 factories may check some "syntactic" constraints that are not
126 enforced by the grammar itself. This is possible using YYERROR
127 within the action itself. Provide the user with a means to throw
128 a syntax_error exception.
130 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
131 Declare and define yy::parser::syntax_error.
132 * data/lalr1.cc: Include stdexcept.
133 (yy::parser::parse): Wrap the user action within a try/catch.
134 * data/glr.cc: Include stdexcept.
136 2009-09-09 Akim Demaille <demaille@gostai.com>
138 lalr1.cc: add missing "inline".
139 * data/c++.m4 (b4_public_types_define): Add missing inline to
140 implementations provided in headers.
142 2009-09-09 Akim Demaille <demaille@gostai.com>
144 %param: documentation.
145 * NEWS (2.6): Document %param, %lex-param, and %parse-param
147 * doc/bison.texinfo: Document that %lex-param and %parse-param
149 Changes some examples to demonstrate it.
150 (Calc++ Parser): Use %param.
152 2009-09-09 Akim Demaille <demaille@gostai.com>
156 2009-09-09 Akim Demaille <demaille@gostai.com>
159 * src/parse-gram.y (add_param): Scope changes.
161 2009-09-09 Akim Demaille <demaille@gostai.com>
163 %parse: support several arguments.
164 * src/parse-gram.y (current_param): New.
165 (param_type): Add param_none.
166 (params): New nonterminal.
169 2009-09-09 Akim Demaille <demaille@gostai.com>
173 2009-09-09 Akim Demaille <demaille@gostai.com>
176 Provide a means to factor lex-param and parse-param common
179 * src/parse-gram.y (param_type): New.
180 Define a %printer for it.
182 (%parse-param, %lex-param): Merge into...
183 (%parse): this new token.
184 Adjust the grammar to use it.
185 * src/scan-gram.l (RETURN_VALUE): New.
186 (RETURN_PERCENT_FLAG): Use it.
187 (RETURN_PERCENT_PARAM): New.
188 Use it to support %parse-param, %lex-param and %param.
190 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
193 * src/output.c: Don't include assert.h.
194 (output_skeleton): Use aver not assert.
195 * src/system.h (aver): In documentation of why, add links to
196 Paul Eggert's explanations in the mailing lists.
198 2009-09-05 Alex Rozenman <rozenman@gmail.com>
200 Use "Unresolved reference" error message when no symbols were found
201 in a symbolic reference resolution. Remove .expr and -expr from
202 the shown reference when the reference is unresolved.
203 * src/scan-code.l: Change the error message, adjust location columns,
204 rename variable "exact_mode" to "explicit_bracketing".
205 * tests/named-ref.at: Adjust existing tests and add a new one.
207 2009-09-04 Akim Demaille <demaille@gostai.com>
209 Adjust synclines in src/parse-gram.[ch].
210 * tests/bison.in: Do some magic (including working around issues
211 with ylwrap) when this wrapper is used to compile
214 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
216 Complain about unused %define variables and %code qualifiers.
217 * NEWS (2.5): Document.
218 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
219 * doc/bison.texinfo (Decl Summary): Document complaint, and
220 improve %define documentation a little otherwise.
221 * tests/input.at (Reject unused %code qualifiers): Update.
222 (%define errors): Update.
223 (%define, --define, --force-define): Update.
224 (%define backward compatibility): Update.
225 (Unused %define api.pure): Update.
226 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
228 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
230 Don't suppress warnings about unused parse.error.
231 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
232 %define variable parse.error unless b4_error_verbose_flag is
233 actually expanded in a skeleton.
235 2009-09-03 Akim Demaille <demaille@gostai.com>
237 * NEWS (2.4.2): Add "Internationalization" item.
239 2009-09-03 Akim Demaille <demaille@gostai.com>
241 bootstrap: fix/improve find_tool.
242 * bootstrap (find_tool): Improve error messages.
243 Fix typo about find_tool_names.
245 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
247 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
249 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
250 * src/scan-code.h (code_props_rule_action_init): Rename
251 named_ref arg to name so it doesn't shadow named_ref type. This
252 makes it consistent with the function definition in scan-code.l
255 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
257 %define: accept unquoted values.
258 * NEWS (2.5): Group all %define changes together, and document
259 this one. Remove quotes in IELR and canonical LR entry.
260 * doc/bison.texinfo: Remove quotes in most examples throughout.
261 (Decl Summary): Update %define documentation.
262 (Table of Symbols): Likewise.
263 * src/ielr.c (LrType): Update documentation.
264 * src/parse-gram.y (content.opt): Add production for ID.
265 * tests/actions.at: Remove quotes in most tests.
266 * tests/calc.at: Likewise.
267 * tests/existing.at: Likewise.
268 * tests/input.at: Likewise.
269 * tests/local.at: Likewise.
270 * tests/push.at: Likewise.
271 * tests/reduce.at: Likewise.
272 * tests/torture.at: Likewise.
274 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
276 %define lr.type: make values lowercase IDs.
277 That is, "LALR" => "lalr", "IELR" => "ielr", and
278 "canonical LR" => "canonical-lr".
279 * NEWS (2.5): Update documentation.
280 * doc/bison.texinfo (Decl Summary): Likewise.
281 * src/ielr.c (ielr): Use new values.
282 * src/ielr.h (ielr): Update documentation.
283 * src/reader.c (prepare_percent_define_front_end_variables): Use
284 and validate new values.
285 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
287 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
289 2009-08-27 Eric Blake <ebb9@byu.net>
291 scan-gram: avoid portability trap with ctype usage.
292 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
293 Avoid compiler warning.
295 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
297 tests: use perl for printing special sequences to files.
298 And skip tests if perl is not available. This is better than
299 playing tricks with shell portability. Suggested by Akim
301 * tests/input.at (Bad character literals): Use it here for
302 omitting final newlines.
303 (Bad escapes in literals): Use it here for special characters.
305 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
307 tests: show a use of %define lr.default-reductions "consistent"
308 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
309 prevents the omission of expected tokens for %error-verbose.
311 2009-08-26 Akim Demaille <demaille@gostai.com>
313 tests: portability fix.
314 * tests/input.at (Bad escapes in literals): Don't expect "echo
315 '\0'" to output \ then 0.
317 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
319 Actually handle the yytable zero value correctly this time.
320 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
321 zero values in the YYTABLE comments.
322 * data/glr.c (yytable_value_is_error): Don't check for zero
324 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
325 * data/yacc.c (yytable_value_is_error): Likewise.
326 * data/lalr1.java (yy_table_value_is_error_): Likewise.
327 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
328 * src/tables.h: In header comments, explain why it's useless to
329 check for a zero value in yytable.
331 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
333 More fixes related to last two patches.
334 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
335 comments: zero indicates syntax error not default action.
336 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
338 * data/glr.c (yyis_pact_ninf): Rename to...
339 (yypact_value_is_default): ... this.
340 (yyisDefaultedState): Update for rename.
341 (yyis_table_ninf): Rename to...
342 (yytable_value_is_error): ... this, and check for value zero
343 besides just YYTABLE_NINF.
344 (yygetLRActions): Check for default value from yypact. It
345 appears that this check is always performed before this function
346 is invoked, and so adding the check here is probably redundant.
347 However, the code may evolve after this subtlety is forgotten.
348 Also, update for rename to yytable_value_is_error. Because that
349 macro now checks for zero, a different but equivalent branch of
350 the if-then-else here is evaluated.
351 (yyreportSyntaxError): Update for rename to
352 yytable_value_is_error. The zero condition was mishandled
354 (yyrecoverSyntaxError): Update for renames. No behavioral
356 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
358 (yy_table_value_is_error_): New function.
359 (parse): Use new functions where possible. No behavioral
361 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
362 The zero condition was mishandled before.
363 * data/yacc.c (yyis_pact_ninf): Rename to...
364 (yypact_value_is_default): ... this.
365 (yyis_table_ninf): Rename to...
366 (yytable_value_is_error): ... this, and check for value zero
367 besides just YYTABLE_NINF.
368 (yysyntax_error): Update for rename to yytable_value_is_error.
369 The zero condition was mishandled before.
370 (yyparse): Update for renames. No behavioral changes.
371 * src/tables.h: Improve comments about yypact, yytable, etc.
372 more. Most importantly, say yytable value of zero means syntax
373 error not default action.
375 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
377 Fix %error-verbose for conflicts resolved by %nonassoc.
378 * NEWS (2.5): Document.
379 * data/glr.c (yyreportSyntaxError): Fix this by checking
381 * data/yacc.c (yysyntax_error): Likewise.
382 * data/lalr1.cc (yysyntax_error_): Fix this by checking
384 * data/lalr1.java (yysyntax_error): Likewise.
385 * tests/conflicts.at (%nonassoc and eof): Update expected output
388 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
390 Some code and documentation improvements.
391 * data/c.m4 (b4_table_value_equals): New macro to capture
393 * data/glr.c (yyis_pact_ninf): Use it here.
394 (yyis_table_ninf): Likewise.
395 (yyreportSyntaxError): Improve internal comments.
396 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
397 Use it everywhere possible.
398 (yyis_table_ninf): Likewise.
399 (yysyntax_error): Improve internal comments.
400 * data/lalr1.cc (yysyntax_error_): Likewise.
401 * data/lalr1.java (yysyntax_error): Likewise.
402 * src/tables.h: Improve comments about yypact, yytable, etc.
404 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
406 Use locale when quoting.
407 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
408 quote rather than implementing quoting here.
410 2009-08-20 Eric Blake <ebb9@byu.net>
412 Make previous patch more robust.
413 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
415 (output_skeleton): Use it.
416 Suggested by Akim Demaille.
418 Import latest m4/m4.m4.
419 * submodules/autoconf: Update to autoconf 2.64.
420 * configure.ac (M4_GNU_OPTION): New define.
421 * src/output.c (output_skeleton): Use it to resolve FIXME.
422 * NEWS: Mention this.
424 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
426 Fix complaints about escape sequences.
427 Discussed starting at
428 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
429 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
430 For a \0 and similar escape sequences meaning the null
431 character, report an invalid escape sequence instead of an
432 invalid null character because the latter does not actually
433 appear in the user's input.
434 In all escape sequence complaints, don't escape the initial
435 backslash, and don't quote when the sequence appears at the end
436 of the complaint line unless there's whitespace that quotearg
438 Consistently say "invalid" not "unrecognized".
439 Consistently prefer "empty character literal" over "extra
440 characters in character literal" warning for invalid escape
441 sequences; that is, consistently discard those sequences.
442 * tests/input.at (Bad escapes in literals): New.
444 2009-08-19 Akim Demaille <demaille@gostai.com>
447 * doc/bison.texinfo: Fix minor Texinfo errors.
449 2009-08-19 Akim Demaille <demaille@gostai.com>
451 tests: distcc compliance.
452 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
453 error messages from the output.
455 2009-08-19 Akim Demaille <demaille@gostai.com>
457 variables: simplify the upgrade of namespace into api.namespace.
459 This patch simplifies "variables: rename namespace as
460 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
461 Suggested by Joel E. Denny in
462 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
464 * src/muscle-tab.c (muscle_percent_variable_update): New.
465 (muscle_percent_define_insert): Use it in replacement of the
466 previous tr invocation.
467 Remove variable_tr, no longer needed.
468 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
470 * data/c++.m4: No longer handle namespace -> api.namespace.
471 * tests/input.at (%define backward compatibility): Check that
472 namespace is treated as api.namespace.
474 2009-08-19 Akim Demaille <demaille@gostai.com>
476 doc: %initial-action to initialize yylloc.
477 Reported by Bill Allombert.
478 * doc/bison.texinfo: Set fill-column to 76.
479 (Location Type): Document the use of %initial-action to initialize
482 2009-08-19 Akim Demaille <demaille@gostai.com>
484 lalr1.cc: use state_type.
485 * data/lalr1.cc (yysyntax_error_): Use state_type.
486 Move argument names into yy*.
488 2009-08-19 Akim Demaille <demaille@gostai.com>
490 lalr1.cc: get rid of yyparse's yystate.
491 yystate and yystack_[0].state are equal, keep only the latter.
492 The former was also used as a temporary variable to compute the
493 post-reduction state. Move this computation into an auxiliary
496 * data/glr.c (yyLRgotoState): Fuse variable definition and first
498 * data/lalr1.cc (yy_lr_goto_state_): New.
500 Replace remaining uses of yystate by yystate_[0].state.
503 2009-08-19 Akim Demaille <demaille@gostai.com>
505 lalr1.cc: destroy $$ when YYERROR is called.
506 * data/lalr1.cc (yyreduce): Compute the resulting state before
507 running the user action so that yylhs is a valid symbol.
508 (yyerrorlab): Since yylhs is complete (it knows its type), we can
509 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
510 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
512 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
514 maint: update for gnulib's recent update-copyright changes
516 * .x-update-copyright (COPYING): Add as it's no longer implied
517 when .x-update-copyright is present.
518 * cfg.mk (update-copyright-local): Remove, now ignored.
519 (update-copyright): Declare update-b4-copyright as a dependency.
521 2009-08-17 Akim Demaille <demaille@gostai.com>
523 build: require gettext 0.17.
525 Suggested by Bruno Haible.
526 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
527 * configure.ac: require gettext 0.17 to ensure compatibility with
530 2009-08-17 Akim Demaille <demaille@gostai.com>
532 build: lower gettext requirements.
534 Bison was uselessly requiring the formatstring macros from
535 gettext, which resulted in mo files not being installed on systems
536 that perfectly supported Bison mo files. Lower the requirement.
537 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
539 * configure.ac: Require need-ngettext instead of
540 need-formatstring-macros.
541 Reported by Martin Jabocs.
542 Suggested by Bruno Haible.
543 * INSTALL: Restructure.
544 (Internationalization): New.
546 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
548 maint: fix use of copyright year intervals.
550 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
551 as now recommended in gnulib/NEWS.
552 * build-aux/update-b4-copyright: Fix.
553 * cfg.mk (update-copyright-env): Configure update-copyright.
555 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
557 Make it easier to write deterministic tests.
558 Continues Akim's work from his 2009-06-10 commits.
559 * src/reader.c (check_and_convert_grammar): Don't add any
560 symbols after the first symbols_do invocation.
561 * src/symtab.c (symbols_sorted): New static global.
562 (user_token_number_redeclaration): Update comments.
563 (symbol_from_uniqstr): If a new symbol is being created, assert
564 that symbols_sorted hasn't been allocated yet.
565 (symbols_free): Free symbols_sorted.
566 (symbols_cmp, symbols_cmp_qsort): New functions.
567 (symbols_do): Sort symbol_table into symbols_sorted on first
569 * tests/input.at (Numbered tokens): Recombine tests now that the
570 output should be deterministic across multiple numbers.
572 2009-08-12 Akim Demaille <demaille@gostai.com>
574 tests: GCC 4.5 compliance.
575 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
576 messages about #error.
578 2009-08-12 Akim Demaille <demaille@gostai.com>
580 build: fix the generation of the documentation.
581 Some of our targets use "bison --help", but they can't depend on
582 "bison" itself (to avoid additional requirements on the user), so
583 they used to call "make src/bison" in the commands. Then
584 concurrent builds may fail: one make might be aiming one of its
585 jobs at compiling src/bison, and another job at generating the man
586 page. If the latter is faster than the former, then we have two
587 makes that concurrently try to compile src/bison.
589 This might also be a more convincing explanation for the failure
590 described in the patch "build: fix paths".
592 * Makefile.am (SUFFIXES): Initialize.
593 * build-aux/move-if-change: New, symlink to gnulib's.
594 * build-aux/local.mk: Ship it.
595 * doc/common.x: Remove, merged into...
597 * doc/local.mk (doc/bison.help): New.
598 ($(CROSS_OPTIONS_TEXI)): Depend on it.
600 (.x.1): Replace with...
601 (doc/bison.1): this explicit, simpler, target.
602 (common_dep): Remove, inlined where appropriate.
603 (SUFFIXES, PREPATH): Remove, unused.
605 2009-08-12 Akim Demaille <demaille@gostai.com>
607 gnulib: improve prefixing.
608 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
609 change the value of...
611 Adjust more variables.
612 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
614 (prefix): Also transform rules whose targets have slashes.
615 Use $prefix liberally.
616 Map @MKDIR_P@ to $(MKDIR_P).
617 Prefix directories that are mkdir'd.
619 2009-08-12 Akim Demaille <demaille@gostai.com>
622 When using $(top_builddir) inconsistently, Make (including GNU
623 Make) is sometimes confused. As a result it may want to build
624 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
625 file, different names) concurrently, which, amusingly enough,
628 ranlib lib/libbison.a
629 ranlib lib/libbison.a
630 make[2]: *** [lib/libbison.a] Segmentation fault
634 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
637 2009-08-12 Akim Demaille <demaille@gostai.com>
641 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
643 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
645 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
647 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
649 Miscellaneous code readability improvements.
651 * src/reader.c (reader): Move %define front-end variable
652 defaults and checking into...
653 (prepare_percent_define_front_end_variables): ... this new
656 * src/scan-gram.l (INITIAL): For consistency with string
657 literals, don't store open quote on character literal. It's
658 discarded before returning anyway.
659 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
660 Make length test more readable, and make the character stored
661 for an empty literal more obvious while consistent with the
664 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
665 USER_NUMBER_HAS_STRING_ALIAS throughout.
666 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
667 that is repeated in symtab.h. Improve argument names to make it
668 clear which side of the symbol-string alias pair is which.
669 (symbol_check_alias_consistency): Improve local variable names
670 for the same purpose.
671 * src/symtab.h (struct symbol): Make comments about aliases
673 (symbol_make_alias): Improve comments and argument name.
674 * src/output.c (token_definitions_output): Update for rename to
675 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
677 2009-08-08 Alex Rozenman <rozenman@gmail.com>
679 Convert "misleading reference" messages to warnings.
680 * src/scan-code.l: New function 'show_sub_messages', more
682 * tests/named-ref.at: Adjust tests.
684 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
686 maint: run "make update-copyright"
688 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
690 maint: make update-b4-copyright easier to use
691 * build-aux/update-b4-copyright: In warnings, report line
692 numbers rather than character positions.
693 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
694 that update-copyright runs it.
697 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
699 maint: clean up update-b4-copyright code
700 * build-aux/update-b4-copyright: Do not accept 2-digit
701 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
702 Don't accept a `[' in a b4_copyright argument.
703 Format code more consistently.
704 Don't assume b4*copyright never occurs.
706 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
708 maint: automate b4_copyright updates.
709 * Makefile.am (update-b4-copyright): New target rule.
710 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
711 * build-aux/update-b4-copyright: New.
712 * data/yacc.c: Remove stray characters around b4_copyright
715 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
717 maint: automate annual package-wide copyright-year update.
718 * .x-update-copyright: New.
719 * Makefile.am (EXTRA_DIST): Remove maint.mk.
720 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
721 update-copyright. Remove gnumakefile, which is implied by
723 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
725 * maint.mk: Remove, now copied from gnulib.
726 * examples/extexi: Add missing "(C)" in copyright statement so
727 update-copyright can recognize it.
728 * src/LR0.h: Likewise.
729 * src/print.h: Likewise.
730 * src/print_graph.h: Likewise.
731 * src/gram.c: Add missing comma in copyright statement.
732 * src/gram.h: Likewise.
734 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
736 Fix "make distcheck".
737 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
740 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
742 Pacify "gcc -Wunused" for the input function from Flex.
743 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
745 * src/scan-code.l: Add "%option noinput", which I cannot find in
746 the Flex manual, but which Flex has supported since at least as
747 far back as 2.5.4. However, if any of our developers still use
748 Flex 2.5.4, they'll need to stop configuring with
749 --enable-gcc-warnings because "%option noinput" didn't work
750 correctly until Flex 2.5.6.
751 * src/scan-gram.l: Likewise.
752 * src/scan-skel.l: Likewise.
754 2009-07-31 Alex Rozenman <rozenman@gmail.com>
756 Fix --enable-gcc-warnings problems.
757 * src/reader.c: Adjust variable names.
758 * src/scan-code.l: Fix prototypes and adjust names.
759 * src/named-ref.c: Remove redundant "if".
761 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
763 Fix a --enable-gcc-warnings problem.
764 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
767 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
769 Warn about character literals not of length one.
770 * NEWS (2.5): Document.
771 * src/scan-gram.l (INITIAL): Remove comment that we don't check
773 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
774 * tests/input.at (Bad character literals): New test group.
776 2009-07-24 Alex Rozenman <rozenman@gmail.com>
778 Fix some memory leaks.
779 * src/named-ref.c: Add a pointer check (named_ref_free).
780 * src/scan-code.l: New function (variant_table_free). Called in
782 * src/symlist.c: Call to named_ref_free (symbol_list_free).
784 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
786 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
788 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
790 Some M4 cleanup in the testsuite.
791 Suggested by Eric Blake at
792 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
793 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
794 complicate the code by distinguishing between a missing value
795 and an empty string value for an optional argument. This fix is
796 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
797 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
798 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
799 arguments are not needed because of the following changes.
801 Bison developers should use GNU M4 and should not use
802 POSIXLY_CORRECT when building the test suite, so do not
803 complicate the code by avoiding $10 and above.
804 Do not quote an empty string value for an optional argument, and
805 do not distinguish between a missing value and an empty string
808 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
810 Revert unnecessary column realignment in --help output.
811 Reported by Akim Demaille at
812 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
813 * src/getargs.c (usage): Here.
815 2009-07-04 Alex Rozenman <rozenman@gmail.com>
817 Alphabetical order in src/local.mk.
818 * src/local.mk: Adjust.
820 2009-07-04 Alex Rozenman <rozenman@gmail.com>
822 Style changes and factoring.
823 * src/named-ref.h: Add comments.
824 * src/parse-gram.y: Readability and style changes.
825 * src/reader.c: Factoring: assign_named_ref function.
826 * src/scan-code.l: Factoring and style changes. Rename
827 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
828 Use "unsigned" type for variant index. Improve readablity.
829 * src/scan-gram.l: Change error messages and add comments.
830 * src/symlist.h: symbol_list_null: New function decl.
831 * src/symlist.c: symbol_list_null: Implement here.
832 * tests/named-refs.at: Adjust for new error messages.
834 2009-06-29 Eric Blake <ebb9@byu.net>
836 scan-code: avoid compiler warnings
837 * src/scan-code.l (parse_named_ref): Use correct specifiers.
839 2009-06-29 Akim Demaille <demaille@gostai.com>
841 build: avoid concurrent extraction of calc++.
842 * examples/calc++/Makefile.am (calc.stamp): New.
843 Depend on it to create the sources of calc++ so that concurrent
844 builds don't launch several "extexi" in parallel.
845 Not only this is inefficient, this also builds incorrect sources
846 with several extractions mixed together.
848 2009-06-29 Akim Demaille <demaille@gostai.com>
851 * data/bison.m4: Move code related to specific variables after the
852 definition of the variable-maintaining macros so that we don't
853 "invoke" b4_percent_define_check_values before it is defined.
855 2009-06-29 Akim Demaille <demaille@gostai.com>
857 variables: parse.error
859 Implement, document, and test the replacement of %error-verbose
860 by %define parse.error "verbose".
861 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
862 values of the parse.error variable.
863 Make "simple" its default value.
864 Check the valid values.
865 * src/parse-gram.y: Use %define parse.error.
866 (PERCENT_ERROR_VERBOSE): New token.
868 * src/scan-gram.l: Support %error-verbose.
870 * doc/bison.texinfo (Decl Summary): Replace the documentation of
871 %define error-verbose by that of %define parse.error.
874 * tests/actions.at, tests/calc.at: Use parse.error instead of
877 2009-06-27 Alex Rozenman <rozenman@gmail.com>
879 Implement support for named symbol references.
880 * src/parse-gram.y: Add new syntax (named_ref.opt).
881 * src/reader.c: Store named refs in symbol lists.
882 * src/reader.h: New argument for symbol_append and
883 action_append functions.
884 * src/scan-code.h: Add new field (named_ref) into
885 code_props data structure. Keeps named ref of midrule
887 * src/scan-code.l: Support for named refs in semantic
888 action code. New function 'parse_named_ref'.
889 * src/scan-gram.l: Support bracketed id.
890 * src/symlist.c: Store named refs in symbol lists.
891 * src/symlist.h: New field in symbol list: named_ref.
892 * src/named-ref.h: New file, a struct for named_ref.
893 * src/named-ref.cp: New file, named_ref_new function.
894 * src/local.mk: Add two new files.
895 * tests/testsuite.at: Include new test group:
896 * tests/named-refs.at: this new file.
898 2009-06-25 Akim Demaille <demaille@gostai.com>
900 hash: check insertion for memory exhaustion.
901 * src/uniqstr.c (uniqstr_new): New.
903 2009-06-24 Akim Demaille <demaille@gostai.com>
905 variables: rename namespace as api.namespace.
907 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
909 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
911 (b4_percent_define_use): New.
912 Use it where applicable.
913 * data/c++.m4: Replace uses of the variable "namespace" by
915 Default the latter to the former.
916 * doc/bison.texinfo (Decl Summary): Document "namespace" as
918 Document api.namespace.
919 Use @samp to document %define uses, keep @code for identifiers.
921 * tests/c++.at, tests/input.at: Test api.namespace instead of
922 namespace. (The tests passed with namespace.)
924 2009-06-11 Akim Demaille <demaille@gostai.com>
927 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
928 * src/print-xml.c: Style changes.
929 * tests/conflicts.at: Comment changes.
931 2009-06-11 Akim Demaille <demaille@gostai.com>
933 xml: beware of user strings used to give a %prec to rules.
934 * tests/conflicts.at (%prec with user strings): New.
935 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
938 2009-06-11 Akim Demaille <demaille@gostai.com>
940 hash: check insertion for memory exhaustion.
941 * src/muscle-tab.c (muscle_insert, muscle_grow)
942 * src/state.c (state_hash_insert): Check the return value of
945 2009-06-11 Akim Demaille <demaille@gostai.com>
947 tests: honor TESTSUITEFLAGS in every check target.
948 * tests/local.mk (RUN_TESTSUITE): New.
949 (check-local, installcheck-local, maintainer-check-g++)
950 (maintainer-check-posix, maintainer-check-valgrind): Use it.
952 2009-06-10 Akim Demaille <demaille@gostai.com>
954 deterministic test suite.
955 Some consistency checks on symbols are performed after all the
956 symbols were read, by an iteration over the symbol table. This
957 traversal is nondeterministic, which can be a problem for test
960 Addresses another form of nondeterminism reported by Joel E. Denny.
961 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
963 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
965 Use different file names for the three tests to make the
968 2009-06-10 Akim Demaille <demaille@gostai.com>
971 * gnulib: Update to latest.
972 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
973 * m4/.gitignore: Regen.
974 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
975 Call xalloc_die on hash_insert failures.
976 Requested by the new __warn_unused_result__ attribute of
979 2009-06-10 Akim Demaille <demaille@gostai.com>
981 deterministic user-token-number redeclaration errors.
982 Address nondeterminism reported by Joel E. Denny.
983 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
985 * src/uniqstr.h: Comment changes.
986 * src/location.h (boundary_cmp, location_cmp): New.
987 * src/symtab.c (user_token_number_redeclaration): New.
988 (symbol_translation): Use it.
989 * tests/input.at (Numbered tokens): Adjust the expected output.
991 2009-05-25 Akim Demaille <demaille@gostai.com>
993 build: avoid ignored errors.
994 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
995 errors, they pollute the output.
997 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
999 Convert multiple variable definition warnings to complaints.
1000 * NEWS (2.5): Add a new entry for that change.
1001 * doc/bison.texinfo (Decl Summary): Update %define entry.
1002 (Bison Options): Update -D/--define/-F/--force-define entry.
1003 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1004 * src/muscle-tab.h (muscle_percent_define_insert): Update
1006 * tests/input.at (`%define errors'): Update.
1007 (`%define, --define, --force-define'): Update.
1009 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1011 -F/--force-define and relative %define/-D/--define priorities.
1012 * NEWS (2.5): Add documentation to -D/--define entry.
1013 * build-aux/cross-options.pl: Hard-code association of
1014 --force-define with %define.
1015 * doc/bison.texinfo (Decl Summary): In %define entry,
1016 cross-reference command-line options.
1017 (Bison Options): Add documentation to -D/--define entry.
1018 (Option Cross Key): Widen column for --force-define row.
1019 * src/getargs.c (usage): Document -F/--force-define. Realign
1021 (short_options, long_options, getargs): Parse -F/--force-define,
1022 and update muscle_percent_define_insert invocations.
1023 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1024 (muscle_percent_define_insert): Add argument with that type.
1025 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1026 -F/--force-define behavior and priorities.
1027 (muscle_percent_define_ensure): Update
1028 muscle_percent_define_insert invocation.
1029 * src/parse-gram.y (prologue_declaration): Update
1030 muscle_percent_define_insert invocations.
1031 * tests/input.at (`%define, --define'): Rename to...
1032 (`%define, --define, --force-define'): ... this and extend.
1034 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1036 Update some comments to make sense for -D.
1037 * data/bison.m4 (b4_check_user_names): In header comments, say
1038 "user occurrence" instead of "grammar occurrence".
1039 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1040 (muscle_percent_code_grow): Likewise just for consistency.
1042 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1044 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1046 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1048 Handle a trailing `:' in a user-supplied C++ namespace better.
1049 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1050 among the closing braces here. This fix might make the
1051 generated code easier to debug, but otherwise it should be
1052 insignificant because a trailing `:' is a C++ error already.
1054 2009-05-19 Akim Demaille <demaille@gostai.com>
1056 remove useless variable.
1057 * src/getargs.c (skeleton_arg): Remove now useless variable.
1058 Should help the compiler see that this printf-like call is sane.
1060 2009-05-15 Akim Demaille <demaille@gostai.com>
1062 Rename token.prefix as api.tokens.prefix.
1064 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1066 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1067 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1068 (token.prefix): Rename as...
1069 (api.tokens.prefix): this.
1071 2009-05-11 Akim Demaille <demaille@gostai.com>
1073 doc: use C++ headers.
1074 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1077 2009-05-11 Akim Demaille <demaille@gostai.com>
1080 * doc/bison.simple (Decl Summary): Document token.prefix.
1081 (Calc++ Parser): Various fixes.
1084 Introduce a macro TOKEN to shorten the code and make it more
1086 (Calc++ Scanner): Adjust.
1087 * NEWS (Variable token.prefix): New.
1089 2009-05-04 Akim Demaille <demaille@gostai.com>
1091 bison: catch bad symbol names.
1092 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1093 * tests/input.at: Adjust.
1095 2009-05-04 Akim Demaille <demaille@gostai.com>
1097 identifiers: dashes are letters.
1098 Dashes can now start identifiers (symbols and directives).
1100 * src/scan-gram.l ({letter}): Add dash.
1102 * tests/input.at (Symbols): Adjust.
1103 Remove stray comment.
1104 * tests/regression.at (Invalid inputs): Adjust error message.
1105 * doc/bison.texinfo (Symbols): Update.
1107 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1109 Declare %code to be a permanent feature.
1110 * NEWS (2.4.2): Here.
1111 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1113 (Decl Summary): Likewise.
1115 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1117 Convert underscores to dashes in some %define variable names.
1118 For now, just api.push-pull and lr.keep-unreachable-states.
1119 Maintain old names for backward compatibility.
1120 * NEWS (2.5): Document.
1121 * data/c.m4 (b4_identification): Update comment.
1122 * data/yacc.c: Update access.
1123 * doc/bison.texinfo: Update.
1124 * etc/bench.pl.in (bench_push_parser): Update use.
1125 * src/files.c (tr): Move to...
1126 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1127 think of a better place to expose it. My logic is that, for all
1128 uses of tr so far, command-line arguments can be involved, and
1129 getargs.h is already included.
1130 * src/main.c (main): Update access.
1131 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1132 variable names to new variable names before assigning value.
1133 * src/reader.c (reader): Update setting default.
1134 * tests/calc.at: Update uses.
1135 * tests/conflicts.at (Unreachable States After Conflict
1136 Resolution): Update use.
1137 * tests/input.at (%define enum variables): Update use.
1138 (%define backward compatibility): New test group.
1139 * tests/push.at: Update uses.
1140 * tests/reduce.at: Update uses.
1141 * tests/torture.at: Update uses.
1143 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1145 Set all front-end %define defaults in one place.
1146 * src/main.c (main): Move lr.keep_unreachable_states default...
1147 * src/reader.c (reader): ... to here.
1149 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1151 Rename lr.default_reductions to lr.default-reductions.
1153 * doc/bison.texinfo: Here.
1154 * src/lalr.c (initialize_LA): Here.
1155 * src/print.c (print_reductions): Here.
1156 * src/reader.c (reader): Here.
1157 * src/tables.c (action_row): Here.
1158 * tests/input.at (%define enum variables): Here.
1159 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1161 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1163 Pacify ./configure --enable-gcc-warnings.
1164 * tests/input.at (Symbols): Prototype yyerror and yylex.
1166 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1168 Document how `%define "var" "value"' is not M4-friendly.
1169 * src/parse-gram.y (variable): In comments here.
1171 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1173 Clean up recent patches a little.
1174 Reported by Akim Demaille.
1175 * doc/bison.texinfo (Understanding): Fix typos.
1176 * src/print.c (print_reductions): Don't use negated variable.
1178 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1180 List accepted values for a %define enum variable with an invalid value.
1181 Suggested by Akim Demaille at
1182 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1183 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1184 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
1185 * tests/input.at (%define lr.default_reductions invalid values): Merge
1187 (%define enum variables): ... here, and update output.
1189 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1191 Rename "default rule" to "default reduction".
1192 This includes changing variable names in code, changing
1193 comments, and renaming %define lr.default_rules to %define
1194 lr.default_reductions.
1195 * NEWS (2.5): Update IELR documentation.
1196 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
1198 * data/glr.c, data/lalr1.java: Sync copyright dates.
1199 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1200 and lr.type documentation. Make some other wording
1202 (Glossary): Adjust cross-references and Default Reduction
1204 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1205 Remove a confusing comment pointed out by Akim Demaille.
1206 (initialize_LA): Adjust code.
1207 * src/print-xml.c (print_reductions): Adjust code.
1208 * src/print.c (print_reductions): Adjust code.
1209 * src/reader.c (reader): Adjust code.
1210 * src/tables.c (action_row): Adjust code.
1211 (token_actions): Adjust code.
1212 * src/tables.h: Adjust YYDEFACT documentation.
1213 * tests/input.at (%define lr.default_rules invalid values):
1214 Rename test group to...
1215 (%define lr.default_reductions invalid values): ... this, and
1216 update grammar file and expected output.
1217 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1218 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1220 2009-04-21 Akim Demaille <demaille@gostai.com>
1222 tests: check the use of dashes and periods in symbols.
1223 * tests/input.at (Symbol): New test group.
1225 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1227 Document %define lr.type and lr.default_rules.
1228 * NEWS (2.5): Add an entry.
1229 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1230 besides just LALR(1) and GLR(1).
1231 * doc/bison.texinfo (Introduction): Likewise.
1232 (Language and Grammar): Bison is no longer limited to LALR(1)
1234 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1235 when trying to distinguish from GLR. Talk about LR(1) grammars
1236 rather than LALR(1) grammars.
1237 (Decl Summary): In %define api.push_pull entry, say it applies
1238 to deterministic parsers in C rather than LALR(1) parsers in C.
1239 Add lr.default_rules entry.
1241 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1243 (Generalized LR Parsing): Same changes as for the previous GLR
1245 (Memory Management): Say deterministic rather than LALR(1).
1246 (Understanding): Correct some bison output.
1247 Index discussion of "accepting state".
1248 Say deterministic rather than LALR(1).
1249 (Bison Options): In --yacc entry, say deterministic rather than
1251 In --report, --graph, and --xml entries, just don't mention
1253 (C++ Parsers): Say deterministic rather than LALR(1).
1254 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1255 (Glossary): Add Accepting State, Consistent State, Default Rule,
1256 and IELR(1) definitions.
1257 In Generalized LR (GLR) definition, make same changes as in
1258 previous GLR sections.
1259 In LALR(1) definition, say Bison uses LALR(1) by default rather
1260 than implying Bison is limited to LALR(1).
1261 (LocalWords): Add IELR.
1263 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1265 Finish implementing %define lr.type.
1266 Its value can be "LALR", "IELR", or "canonical LR".
1267 * lib/timevar.def (TV_IELR_PHASE1): New var.
1268 (TV_IELR_PHASE2): New var.
1269 (TV_IELR_PHASE3): New var.
1270 (TV_IELR_PHASE4): New var.
1271 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1272 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1273 Sbitset.h, ielr.h, and ielr.c.
1274 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1275 trace_types): Add trace_ielr.
1276 * src/lalr.h, src/lalr.c (ngotos): Export it.
1278 (goto_follows): ... this, update all uses, and export it.
1279 (set_goto_map): Export it.
1280 (map_goto): Export it.
1281 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1283 (initialize_LA): Export it. Move lookback allocation to...
1284 (lalr): ... here because, for canonical LR, initialize_LA must
1285 be invoked but lookback and much of the rest of LALR isn't
1287 * main.c (main): Instead of lalr, invoke ielr, which invokes
1289 * src/reader.c (reader): Default lr.type to "LALR".
1290 Default lr.default_rules to "accepting" if lr.type is "canonical
1291 LR". Leave the default as "all" otherwise.
1292 Check for a valid lr.type value.
1293 * src/state.h, src/state.c (struct state_list): Add state_list
1295 (state_new): Initialize state_list member to NULL.
1296 (state_new_isocore): New function, exported.
1297 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1298 exercises all values of lr.type.
1299 (GNU AWK Grammar): Rename test group to...
1300 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1301 AT_TEST_EXISTING_GRAMMAR.
1302 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1303 (GNU pic Grammar): Rename test group to...
1304 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1305 AT_TEST_EXISTING_GRAMMAR.
1306 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1307 all values of lr.type.
1308 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1309 (Lane Split): Likewise.
1310 (Complex Lane Split): Likewise.
1311 (Split During Added Lookahead Propagation): Likewise.
1313 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1315 Add new files for IELR and canonical LR implementation.
1316 * src/AnnotationList.c: New.
1317 * src/AnnotationList.h: New.
1318 * src/InadequacyList.c: New.
1319 * src/InadequacyList.h: New.
1320 * src/Sbitset.c: New.
1321 * src/Sbitset.h: New.
1325 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1327 Implement %define lr.default_rules.
1328 Its value describes the states that are permitted to contain
1329 default rules: "all", "consistent", or "accepting".
1330 * src/reader.c (reader): Default lr.default_rules to "all".
1331 Check for a valid lr.default_rules value.
1332 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1333 is "accepting", then only mark the accepting state as
1335 (initialize_LA): Tell state_lookahead_tokens_count whether
1336 lr.default_rules is "accepting".
1337 * src/tables.c (action_row): If lr.default_rules is not "all",
1338 then disable default rules in inconsistent states.
1339 * src/print.c (print_reductions): Use this opportunity to
1340 perform some assertions about whether lr.default_rules was
1342 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1343 helps with checking the parser tables for a grammar.
1344 * tests/input.at (%define lr.default_rules invalid values): New
1346 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1347 AT_TEST_TABLES_AND_PARSE.
1348 (`no %define lr.default_rules'): New test group generated by
1349 AT_TEST_LR_DEFAULT_RULES.
1350 (`%define lr.default_rules "all"'): Likewise.
1351 (`%define lr.default_rules "consistent"'): Likewise.
1352 (`%define lr.default_rules "accepting"'): Likewise.
1354 2009-04-20 Akim Demaille <demaille@gostai.com>
1358 2009-04-20 Akim Demaille <demaille@gostai.com>
1361 * src/output.c (token_definitions_output): Use symbol_id_get
1362 instead of duplicating its logic.
1363 * TODO (YYERRCODE): Extend.
1365 2009-04-20 Akim Demaille <demaille@gostai.com>
1367 variables: prefer error-verbose to error_verbose.
1368 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
1369 instead of error_verbose.
1370 * src/scan-gram.l (%error-verbose): Map to the error-verbose
1372 * doc/bison.texinfo: Promote %define error-verbose instead of
1374 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
1376 2009-04-15 Akim Demaille <demaille@gostai.com>
1378 variables: accept dashes.
1379 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
1381 * src/scan-gram.l ({id}): Also accept dashes after the initial
1383 ({directive}): Use {id}.
1384 * src/parse-gram.y: Comment and formatting changes.
1385 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1387 * src/complain.h, src/complain.c (yacc_at): New.
1388 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1390 * src/output.c (token_definitions_output): Do not #define token
1393 2009-04-20 Akim Demaille <demaille@gostai.com>
1395 Consistently refer to Yacc, not YACC.
1396 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1398 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1400 Pacify make maintainer-check-posix.
1401 * tests/input.at (%define, --define): Move bison command-line
1402 options before grammar file name.
1404 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1406 Document semicolon warnings.
1409 2009-04-14 Akim Demaille <demaille@gostai.com>
1411 variables: use `parse.assert' instead of `assert'.
1412 * TODO (assert): Remove.
1413 * data/bison.m4 (b4_assert_if): Replace with...
1414 (b4_parse_assert_if): this.
1415 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
1416 * doc/bison.texinfo (Decl Summary): Document parse.assert.
1418 2009-04-14 Akim Demaille <demaille@gostai.com>
1420 variables: use `parse.trace' instead of `debug'.
1421 * src/getargs.c (getargs): Map -t to %define trace.parse.
1422 * src/scan-gram.l (%debug): Map to %define trace.parse.
1423 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
1424 names to `_' in macro names.
1425 (b4_debug_if): Replace with...
1426 (b4_parse_trace_if): this.
1427 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1428 * data/yacc.c: Adjust.
1429 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
1430 Use @code to label the variable list.
1431 Document the variable parse.trace.
1432 (Tracing): Promote the parse.trace variable.
1433 * TODO: %printer is not documented.
1435 2009-04-14 Akim Demaille <demaille@gostai.com>
1438 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1439 (Table of Symbols): Remove duplicate entry for %debug.
1441 2009-04-10 Eric Blake <ebb9@byu.net>
1443 submodules: update to latest
1444 * submodules/autoconf: Use latest upstream Autoconf.
1446 2009-04-06 Eric Blake <ebb9@byu.net>
1448 Work around autoconf 2.63b bug in testsuite.
1449 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1450 autoconf bug related to # in test.
1452 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1454 * NEWS (2.5): New section. Describe new -D/--define feature.
1456 2009-04-06 Akim Demaille <demaille@gostai.com>
1459 * src/parse-gram.h, src/parse-gram.c: Regen.
1461 2009-04-06 Akim Demaille <demaille@gostai.com>
1463 rename muscle_tab.* as muscle-tab.* for consistency.
1464 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
1465 * src/muscle-tab.h, src/muscle-tab.c: these.
1466 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
1467 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
1469 2009-04-06 Akim Demaille <demaille@gostai.com>
1471 Makefile: introduce $(BISON).
1472 * src/local.mk (BISON): New.
1475 2009-04-06 Akim Demaille <demaille@gostai.com>
1477 parser: handle %locations as %define locations.
1478 * src/getargs.h, src/getargs.c (locations_flag): Remove.
1479 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
1480 to set "locations" to true.
1481 * src/output.c (prepare): Don't output "locations".
1482 * src/scan-gram.l (%locations): Handle it as a %<flag>.
1483 * src/parse-gram.y: It's no longer a token.
1485 * data/bison.m4 (b4_locations_if): Define it with
1486 b4_percent_define_if_define.
1487 * data/c.m4, data/glr.cc: Adjust.
1489 2009-04-06 Akim Demaille <demaille@gostai.com>
1492 * src/parse-gram.c: Regen.
1494 2009-04-06 Akim Demaille <demaille@gostai.com>
1496 muscle: factor the handling of obsolete of obsolete directives.
1497 Suggested by Joel E. Denny.
1499 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
1500 New, extracted from...
1501 * src/parse-gram.y (prologue_declaration: pure-parser): here.
1503 (prologue_declaration: "%<flag>"): Use
1504 muscle_percent_define_ensure.
1505 (%error-verbose, %pure-parser): No longer tokens.
1506 * src/scan-gram.l (pure-parser): Return as a %<flag>.
1508 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1510 Fix options documentation.
1511 * build-aux/cross-options.pl: As in --help output, write optional
1512 arguments as [=ARG] not =[ARG].
1513 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1515 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1517 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1518 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1519 requirements for a correct m4 are stricter.
1520 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
1521 * configure.ac: Update to use AC_PROG_GNU_M4.
1522 Reported by Eric Blake.
1524 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1526 Help with updating web manual.
1527 * HACKING: Incorporate instructions from gnulib/doc/README.
1528 * bootstrap.conf (gnulib_modules): Add gendocs.
1530 2009-04-03 Akim Demaille <demaille@gostai.com>
1533 * src/parse-gram.h, src/parse-gram.c: Regen.
1535 2009-04-03 Akim Demaille <demaille@gostai.com>
1537 Factor %FLAG at scan level.
1538 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
1539 definitions and associated rules, replaced by....
1540 (PERCENT_FLAG): this new token type, and rule.
1541 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
1542 Use it for %debug and %error-verbose.
1544 2009-04-03 Akim Demaille <demaille@gostai.com>
1547 * src/parse-gram.h, src/parse-gram.c: Regen.
1549 2009-04-03 Akim Demaille <demaille@gostai.com>
1551 Treat %debug as %define debug.
1552 * data/bison.m4 (b4_debug_if): New.
1553 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
1554 * data/lalr1.java: Use it instead of b4_debug_flag.
1555 * src/getargs.h, src/getargs.c (debug_flag): Remove.
1556 * src/output.c (prepare): Don't output it.
1557 * src/parse-gram.y: Treat %debug as %define debug.
1559 2009-04-03 Akim Demaille <demaille@gostai.com>
1561 Treat %error-verbose as %define error_verbose.
1562 This allows to pass -Derror_verbose on the command line. Better
1563 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
1564 ERROR_VERBOSE being defined as false or true.
1565 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
1566 on b4_percent_define_ifdef, for does not check the defined value,
1567 but only whether the symbol is defined, rely on
1568 b4_percent_define_flag_if, so that a value of "false" is processed
1570 If not defined, define the flag to "false".
1571 (b4_error_verbose_if): New.
1572 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1573 b4_error_verbose_flag.
1574 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1575 * src/output.c (prepare): Don't output it.
1576 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1578 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1580 Fix strange %define locations for default values.
1581 Reported by Akim Demaille at
1582 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1583 and discussed again starting at
1584 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1585 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1586 because location information is bogus.
1587 Use angle brackets to delimit fake file name because square brackets
1588 look like underexpanded m4. Choose a better fake file name.
1589 Use negative line numbers.
1590 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1591 * src/location.c (location_print): If line for a boundary is negative,
1592 only print that boundary's file name.
1593 * src/location.h: Document that.
1594 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1595 defaults): Update output.
1597 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1599 Pacify ./configure --enable-gcc-warnings.
1600 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1601 in lib won't compile with it.
1602 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1604 2009-03-31 Akim Demaille <demaille@gostai.com>
1606 bootstrap: --help to stdout.
1607 * bootstrap (usage): Don't send --help to stderr.
1608 Use a here doc instead of a long string.
1610 2009-03-31 Akim Demaille <demaille@gostai.com>
1612 bootstrap: README-hacking no longer exists
1613 * bootstrap (checkout_only_file): Set to HACKING.
1615 2009-03-26 Akim Demaille <demaille@gostai.com>
1617 doc: merge HACKING and README-hacking.
1618 Two files is confusing.
1619 Reported by Alexandre Duret-Lutz.
1621 * README-hacking: Merge into...
1622 * HACKING (Working from the repository): here.
1624 2009-03-26 Akim Demaille <demaille@gostai.com>
1626 doc: update README-hacking.
1627 * README-hacking: We now use git and git submodules.
1628 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1630 2009-03-26 Akim Demaille <demaille@gostai.com>
1632 lalr1.cc: avoid GCC 4.3 warnings.
1633 GCC 4.3 now warns about "a || b && c" and asks for explicit
1635 Reported by Alexandre Duret-Lutz.
1636 * data/location.cc: Update copyright years.
1637 (Position::operator==): Use parens to make precedence explicit.
1638 Compare lines and columns first, as they are more likely to be
1639 different, and they are faster to compare.
1641 2009-03-26 Akim Demaille <demaille@gostai.com>
1644 * gnulib: Update to latest.
1645 * src/local.mk (AM_CFLAGS): Move to...
1646 * Makefile.am: here.
1647 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1650 2009-03-02 Akim Demaille <demaille@gostai.com>
1654 2009-03-02 Akim Demaille <demaille@gostai.com>
1656 Share b4_yytranslate_define.
1657 * data/lalr1.cc (b4_yytranslate_define): Move to...
1658 * data/c++.m4: here.
1660 2009-03-02 Akim Demaille <demaille@gostai.com>
1662 Use locations in the variant example.
1663 Yes, this obfuscates the point of this example, variants only.
1664 But glr.cc cannot work (yet?) without locations. This change
1665 makes it easier to use this example with glr.cc.
1667 * examples/variant.yy (assert): %define it.
1668 (locations): Request them.
1669 (yylex): Bind the location to the stage.
1671 2009-03-02 Akim Demaille <demaille@gostai.com>
1673 Dub make_TOKEN as a public type interface.
1674 * data/c++.m4 (b4_symbol_constructor_declare)
1675 (b4_symbol_constructor_define): New empty stubs.
1676 (b4_public_types_declare, b4_public_types_define): Use them.
1677 * data/lalr1.cc (b4_symbol_constructor_declare)
1678 (b4_symbol_constructor_declare_)
1679 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1681 * data/variant.hh: here.
1682 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1684 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
1685 b4_symbol_constructor_declare, as it is now done by
1686 b4_public_types_define and b4_public_types_declare.
1688 2009-03-02 Akim Demaille <demaille@gostai.com>
1690 Coding style changes.
1691 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1692 (b4_symbol_constructor_declarations)
1693 (b4_symbol_constructor_definition_)
1694 (b4_symbol_constructor_definitions)
1695 (b4_yytranslate_definition): Rename as...
1696 (b4_symbol_constructor_declare_)
1697 (b4_symbol_constructor_declare)
1698 (b4_symbol_constructor_define_)
1699 (b4_symbol_constructor_define)
1700 (b4_yytranslate_define): these.
1701 * data/variant.hh (b4_variant_definition): Rename as...
1702 (b4_variant_define): this.
1704 2009-03-02 Akim Demaille <demaille@gostai.com>
1706 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
1707 * data/bison.m4 (b4_percent_define_if_define): New.
1708 * data/c++.m4 (b4_variant_if): Move to...
1709 * data/bison.m4: Here, using b4_percent_define_if_define.
1710 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
1711 * data/bison.m4: Here, using b4_percent_define_if_define.
1713 2009-03-02 Akim Demaille <demaille@gostai.com>
1715 Dub symbol_type_base as a public type.
1716 * data/c++.m4 (b4_public_types_declare): Now define
1717 symbol_type_base and symbol_type.
1718 (b4_public_types_define): New.
1719 In both cases, the definitions are taken verbatim from lalr1.cc.
1720 * data/lalr1.cc: Adjust.
1722 2009-03-02 Akim Demaille <demaille@gostai.com>
1724 b4_public_types_declare.
1725 * data/c++.m4 (b4_public_types_declare): New.
1726 * data/glr.cc, data/lalr1.cc: Use it.
1728 2009-03-02 Akim Demaille <demaille@gostai.com>
1730 b4_semantic_type_declare.
1731 * data/c++.m4 (b4_semantic_type_declare): New.
1732 Factors and generalizes what was in glr.cc and lalr1.cc.
1733 * data/variant.hh (b4_semantic_type_declare): Redefine it for
1735 * data/lalr1.cc, data/glr.cc: Use it.
1737 2009-02-26 Akim Demaille <demaille@gostai.com>
1740 * gnulib: Upgrade from master.
1741 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1744 2009-02-25 Akim Demaille <demaille@gostai.com>
1746 Remove useless arguments.
1747 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1750 2009-02-25 Akim Demaille <demaille@gostai.com>
1753 * data/lalr1.cc: here.
1755 2009-02-25 Akim Demaille <demaille@gostai.com>
1757 Fix glr.cc's debug level handling.
1758 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1759 glr.c which is used.
1760 (debug_level, set_debug_level): Adjust.
1762 2009-02-25 Akim Demaille <demaille@gostai.com>
1765 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1767 2009-02-25 Akim Demaille <demaille@gostai.com>
1770 * etc/bench.pl.in (generate_grammar_list): Consitently use
1771 location_type, not yy::location.
1773 2009-02-25 Akim Demaille <demaille@gostai.com>
1776 * data/lalr1.cc: here.
1778 2009-02-19 Akim Demaille <demaille@gostai.com>
1780 Make yyparser::error public.
1781 * data/lalr1.cc: here.
1782 There is no good reason to keep it private (and it is convenient
1783 to use it from the scanner for instance). It is already public in
1786 2009-02-19 Akim Demaille <demaille@gostai.com>
1789 * data/glr.cc: here.
1791 2009-02-19 Akim Demaille <demaille@gostai.com>
1793 Remove trailing blanks.
1794 The epilogue has its own ending \n, no need to add another.
1796 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1798 * data/glr.cc: dnl when extending the epilogue.
1799 Remove stray "private:".
1801 2009-02-19 Akim Demaille <demaille@gostai.com>
1804 * data/c.m4 (b4_c_function_decl): Here.
1806 2009-02-19 Akim Demaille <demaille@gostai.com>
1809 * data/lalr1.cc: here.
1811 2009-02-19 Akim Demaille <demaille@gostai.com>
1814 * data/variant.hh: New, extracted from...
1815 * data/lalr1.cc: here.
1817 * data/local.mk: Adjust.
1819 2009-02-19 Akim Demaille <demaille@gostai.com>
1821 Extract stack.hh from lalr1.cc.
1822 * data/stack.hh: New.
1823 * data/lalr1.cc: Extract from here.
1824 * data/local.mk: Adjust.
1826 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1828 Add reminder about uploading public key to keys.gnupg.net.
1829 * HACKING (Release Procedure): Here.
1831 2009-01-28 Akim Demaille <demaille@gostai.com>
1833 * NEWS: Update information about 2.4.1 and 2.4.2.
1835 2008-11-04 Akim Demaille <demaille@gostai.com>
1838 * NEWS: Use more outline-mode markup.
1839 Suggested by Jim Meyering.
1841 2009-01-08 Akim Demaille <demaille@gostai.com>
1843 Fix grep portability issues.
1844 Grep on Solaris does not support -q.
1845 Reported by Summum Bonum.
1847 * NEWS: Add a stub for 2.4.2.
1848 * THANKS: Add Summum Bonum.
1849 * tests/atlocal.in (EGREP): New.
1850 (CC, CXX, XSLTPROC): Make it possible to override them via
1852 * tests/java.at: Use $EGREP instead of egrep.
1853 Use AT_CHECK's ignore instead of grep's -q.
1855 2008-12-11 Akim Demaille <demaille@gostai.com>
1857 Pass the token type to yysyntax_error.
1858 * data/yacc.c (yysyntax_error): Take the transated token instead
1863 2008-12-11 Akim Demaille <demaille@gostai.com>
1866 * data/glr.c: Formatting changes.
1868 2008-12-11 Akim Demaille <demaille@gostai.com>
1870 Propagate i18n changes into glr.c.
1872 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1873 building the error message format dynamically.
1874 * data/lalr1.java: Formatting changes.
1876 2008-12-11 Akim Demaille <demaille@gostai.com>
1879 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1880 Solves problems when top_srcdir is an absolute path.
1881 Suggested by Eric Blake.
1882 * configure.ac: Require Autoconf 2.62.
1884 2008-12-11 Akim Demaille <demaille@gostai.com>
1886 Simplify the i18n of the error messages.
1887 * data/lalr1.cc: Comment changes.
1888 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1889 lalr1.cc instead of building dynamically the format string.
1891 2008-12-08 Akim Demaille <demaille@gostai.com>
1893 Fix portability issue in the test suite.
1894 * tests/local.at (AT_MATCHES_CHECK): New.
1895 Based on Perl instead of Sed. Sed has too many portability
1896 pitfalls, not ever Sed is GNU Sed.
1897 * tests/actions.at (Fix user actions without a trailing semicolon):
1900 2008-12-08 Akim Demaille <demaille@gostai.com>
1903 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1905 2008-12-08 Akim Demaille <demaille@gostai.com>
1907 Install autoconf as a submodule to get m4sugar.
1908 * .gitmodules: Add submodules/autoconf.
1909 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1910 submodules/autoconf.
1912 2008-12-08 Akim Demaille <demaille@gostai.com>
1914 Test token.prefix in all the skeletons.
1915 * data/java.m4 (b4_token_enum): Use the token.prefix.
1916 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1917 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1918 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1919 * tests/java.at: Comment changes.
1920 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1921 (Java parser class and package names): Add token.prefix check.
1923 2008-12-08 Akim Demaille <demaille@gostai.com>
1925 Fix regeneration of atconfig.
1926 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1927 remove it: now that there is no tests/Makefile.am, the top-level
1928 Makefile properly updates atconfig when needed.
1930 2008-12-07 Di-an Jan <dianj@freeshell.org>
1932 Implement the FIXME that ends an user action with a semicolon
1933 if it seems necessary.
1934 * src/scan-code.l (flex rules section): Flag cpp directive from
1935 any `#' to the first unescaped end-of-line. Semicolon is not
1936 needed after `;', `{', '}', or cpp directives and is needed after
1937 any other token (whitespaces and comments have no effect).
1938 * tests/actions.at (Fix user actions without a trailing semicolon):
1940 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1941 to make user actions complete statements.
1942 Adjust column numbers in error messages.
1943 * tests/regression.at (Fix user actions without a trailing semicolon):
1944 Remove. Covered by new test.
1946 2008-12-07 Akim Demaille <demaille@gostai.com>
1949 * gnulib: Update from master.
1951 2008-12-05 Eric Blake <ebb9@byu.net>
1953 Avoid compiler warning.
1954 * src/output.c (muscle_insert_item_number_table): Delete unused
1957 2008-12-02 Eric Blake <ebb9@byu.net>
1959 Build testsuite with newer autoconf.
1960 * tests/output.at (m4_expand): Don't override in newer autoconf,
1961 where the underlying implementation changed.
1962 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1963 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1964 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1965 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1966 since some of them contain unbalanced ')'.
1968 2008-12-01 Akim Demaille <demaille@gostai.com>
1970 Use b4_symbol for printers and destructors everywhere.
1971 * data/bison.m4 (b4_symbol_action_location): New.
1972 * data/c.m4 (b4_symbol_actions): Remove.
1973 Adjust all callers to use by b4_symbol_foreach and the corresponding
1974 b4_symbol_printer/destructor macro.
1975 * data/glr.cc: Adjust.
1976 * data/lalr1.java: Adjust the %destructor sanity check.
1977 * src/output.c (symbol_code_props_output): Remove, we no longer
1978 need the b4_symbol_printers/destructors tables.
1980 2008-12-01 Akim Demaille <demaille@gostai.com>
1982 Use b4_symbol_case_.
1983 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1986 2008-12-01 Akim Demaille <demaille@gostai.com>
1988 Move b4_symbol based macro to bison.m4.
1989 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1990 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1991 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1992 (b4_type_foreach): Move to...
1993 * data/bison.m4: Here.
1994 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1995 b4_symbol_value_template instead of b4_symbol_value.
1997 2008-12-01 Akim Demaille <demaille@gostai.com>
1999 b4_symbol/type_foreach.
2000 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2003 2008-12-01 Akim Demaille <demaille@gostai.com>
2005 Use the symbol properties to output the printer/destructor for lalr1.cc.
2006 Instead of defining complex list of tuples to define various
2007 properties of the symbols, we now prefer to define symbols as
2008 "structs" in m4: using the symbol key (its number), and the
2009 property name, b4_symbol gives it value. Use this to handle
2010 destructors and printers.
2012 * src/output.c (CODE_PROP): New.
2013 (prepare_symbol_definitions): Use it to define the printer and
2014 destructor related attributes of the symbols.
2015 * data/lalr1.cc (b4_symbol_actions): Rename as...
2016 (b4_symbol_action): this.
2017 Use b4_symbol instead of 6 arguments.
2018 (b4_symbol_printer, b4_symbol_destructor): New.
2019 Use them instead of b4_symbol_actions.
2021 2008-12-01 Akim Demaille <demaille@gostai.com>
2023 Avoid capturing variables too easily.
2024 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2025 v__ and p__ instead of v and p.
2027 2008-12-01 Akim Demaille <demaille@gostai.com>
2029 Remove spurious empty line before syncline.
2030 * data/bison.m4 (b4_syncline): Don't output an empty line before
2033 2008-11-26 Akim Demaille <demaille@gostai.com>
2035 Convert lib/Makefile.am into lib/local.mk.
2036 The real problem is rather gnulib.mk, which itself is extracted
2037 from a Makefile.am that gnulib expects to the "recursive". The
2038 tool prefix-gnulib-mk converts such a gnulib.mk to be
2039 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2041 * etc/prefix-gnulib-mk: New.
2042 * bootstrap (slurp): Use it to convert further gnulib.mk.
2043 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2045 * lib/Makefile.am: Rename as...
2046 * lib/local.mk: this.
2047 Adjust to be prefixed.
2048 * Makefile.am, configure.ac: Adjust.
2049 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2051 2008-11-26 Akim Demaille <demaille@gostai.com>
2054 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2055 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2056 Reported by Eric Blake.
2058 2008-11-26 Akim Demaille <demaille@gostai.com>
2060 Use b4_parser_tables_define in glr.cc.
2061 * data/glr.c: Use b4_parser_tables_define instead of defining the
2062 (deterministic integral) tables by hand.
2064 2008-11-26 Akim Demaille <demaille@gostai.com>
2066 Use b4_parser_tables_define in Java.
2067 * data/java.m4 (b4_typed_parser_table): Rename as...
2068 (b4_typed_parser_table_define): this, for consistency.
2069 Accept a comment as $4.
2071 (b4_integral_parser_table): Rename as...
2072 (b4_integral_parser_table_define): this.
2073 * data/lalr1.java: Adjust all uses.
2074 Use b4_parser_tables_define instead of generation by hand.
2076 2008-11-26 Akim Demaille <demaille@gostai.com>
2078 Prepare the convergence bw C style and Java table generation.
2079 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2080 (b4_tables_define): Rename as...
2081 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2082 (b4_parser_tables_define): these.
2083 * data/c.m4 (b4_table_define): Rename as...
2084 (b4_integral_parser_table_define): this.
2085 * data/lalr1.cc: Adjust.
2086 (b4_table_define, b4_table_declare): Rename as...
2087 (b4_integral_parser_table_define)
2088 (b4_integral_parser_table_declare): these.
2089 (yyrline_): Move the comment where it is actually used.
2090 * data/yacc.c: Adjust.
2091 (yyrline): Use b4_integral_parser_table_define.
2093 2008-11-26 Akim Demaille <demaille@gostai.com>
2096 * src/parse-gram.h, src/parse-gram.c: Regen.
2098 2008-11-26 Akim Demaille <demaille@gostai.com>
2100 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
2101 * data/lalr1.cc (b4_tables_map): Move to...
2102 * data/bison.m4: here.
2103 Update the comment for yytable during the flight.
2104 (b4_tables_declare, b4_tables_define): New.
2105 * data/lalr1.cc: Use them.
2106 * data/c.m4 (b4_table_define): New.
2107 * data/yacc.c: Use b4_tables_define instead of output the tables
2109 * tests/regression.at (Web2c Actions): Adjust the expected output,
2110 the order of the tables changed.
2112 2008-11-26 Akim Demaille <demaille@gostai.com>
2114 Get rid of (yy)rhs and (yy)prhs.
2115 These tables are no longer needed in the parsers, and they don't seem to
2116 be useful. They are not documented either.
2118 * src/output.c (prepare_rules): Get rid of rhs and prhs.
2119 Adjust the computation of (yy)r2.
2121 2008-11-26 Akim Demaille <demaille@gostai.com>
2123 Rule length is unsigned.
2124 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
2126 2008-11-26 Akim Demaille <demaille@gostai.com>
2128 Get rid of lalr1-split.cc.
2129 It was no longer maintainer.
2131 * data/lalr1-split.cc: Remove.
2132 * etc/bench.pl.in (bench_fusion_parser): Remove.
2135 2008-11-26 Akim Demaille <demaille@gostai.com>
2137 Use yy* consistently.
2138 * data/glr.c: Now that yyrhs no longer exists as a global
2139 variable, rename local "rhs" variables into "yyrhs" for
2142 2008-11-25 Akim Demaille <demaille@gostai.com>
2144 Get rid of yyrhs and yyprhs in glr.c.
2145 * data/glr.c (yyrhs, yyprhs): Remove.
2146 Instead, use the state stack and yystos.
2148 2008-11-25 Akim Demaille <demaille@gostai.com>
2151 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
2152 as an Autotest keyword.
2154 2008-11-25 Akim Demaille <demaille@gostai.com>
2156 Prefer TESTSUITE_FLAGS.
2157 TESTSUITEFLAGS is barely readable.
2159 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
2160 for backward compatibility.
2161 Use the former instead of the latter.
2163 2008-11-25 Akim Demaille <demaille@gostai.com>
2165 Get rid of yyrhs and yyprhs in larl1.java.
2166 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
2167 (yy_reduce_print): Rather, use yystos_ and the state stack.
2169 2008-11-25 Akim Demaille <demaille@gostai.com>
2173 2008-11-25 Akim Demaille <demaille@gostai.com>
2175 Get rid of yyrhs and yyprhs in yacc.c.
2176 They were used to get the symbol types, given a rule number, when
2177 displaying the top of the stack before a reduction. But the
2178 symbol type is available from the state stack. This has two be
2179 benefits: two tables less in the parser (making it smaller), and a
2180 more consistent use of the three stacks which will help to fuse
2183 * data/yacc.c (yyprhs, yyrhs): Remove.
2184 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
2185 (yy_reduce_print): Take yyssp as argument.
2186 Use it, together with yystos, to get the symbol type.
2187 * tests/regression.at (Web2c Report): Remove these tables from the
2190 2008-11-25 Akim Demaille <demaille@gostai.com>
2193 The point is to factor the generation of the tables across skeletons.
2194 This is language dependant.
2196 * data/c.m4 (b4_comment_): New.
2197 Should be usable to define how to generate tables independently of
2199 (b4_c_comment): New.
2200 (b4_comment): Bounce to b4_c_comment.
2201 Now support $2 = [PREFIX] for indentation.
2202 * data/lalr1.cc (b4_table_declare): Don't output a comment if
2203 there is no comment.
2204 Indent it properly when there is one.
2205 Output the ending semicolon.
2206 (b4_table_define): Space changes.
2207 Output the ending semicolon.
2208 (b4_tables_map): New.
2209 Use it twice instead of declaring and defining the (integral)
2212 2008-11-25 Akim Demaille <demaille@gostai.com>
2215 * data/lalr1.cc (b4_table_declare): New.
2216 Use it to declare the tables defined with b4_table_define.
2217 (b4_table_define): Declare a third arg to match b4_table_declare
2219 Move all the comments around invocations of b4_table_define into
2220 the invocations itselves.
2221 Move things around to have the order for declarations and
2224 2008-11-25 Akim Demaille <demaille@gostai.com>
2227 * data/lalr1.java: here.
2229 2008-11-25 Akim Demaille <demaille@gostai.com>
2231 b4_args is more general than only C++.
2232 * data/lalr1.cc (b4_args, _b4_args): Move to...
2233 * data/bison.m4: here.
2235 2008-11-21 Di-an Jan <dianj@freeshell.org>
2237 Implement no-XXX arguments for --warnings, --report, --trace.
2238 * src/getargs.c (flags_argmatch): Handles no-XXX.
2239 Fix typo in doxygen comment.
2241 2008-11-21 Akim Demaille <demaille@gostai.com>
2243 Display the changes in cross-options.texi.
2244 * build-aux/cross-options.pl ($sep): New, to separate items.
2245 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
2248 2008-11-20 Di-an Jan <dianj@freeshell.org>
2250 Improves options in the manual.
2251 * doc/bison.texinfo (-g, -x): Add space before argument.
2252 (Option Cross Key): Implement FIXME: listing directives also.
2253 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2254 (Short Option): Special case -d. Put arguments inside @option.
2255 (Bison Directive): Add column, automatically extracted from
2256 src/scan-gram.l (actual name passed as the first argument)
2257 with special case for %define.
2258 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
2259 to build-aux/cross-options.pl.
2260 * src/getargs.c (usage): Document limitations of cross-options.pl.
2261 * src/scan-gram.l: Likewise.
2263 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2265 Fix unexpanded macros in GLR defines file.
2266 Reported by Csaba Raduly at
2267 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2268 * THANKS (Csaba Raduly): Add.
2269 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2270 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2271 lexer in a separate module that includes the defines file.
2272 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
2274 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2275 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2276 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2277 (AT_DATA_SOURCE_PROLOGUE): New.
2278 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2279 (AT_DATA_SOURCE): New.
2280 (AT_FULL_COMPILE): Extend to support an additional source file.
2282 2008-11-18 Akim Demaille <demaille@gostai.com>
2285 * TODO: More short term issues.
2287 2008-11-18 Akim Demaille <demaille@gostai.com>
2290 * src/parse-gram.h, src/parse-gram.c: Regen.
2292 2008-11-18 Akim Demaille <demaille@gostai.com>
2294 Use b4_subtract where possible.
2295 * data/lalr1.cc (b4_subtract): Move to...
2296 * data/bison.m4: here.
2297 * data/glr.c (b4_rhs_data): Use it.
2298 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
2300 2008-11-18 Akim Demaille <demaille@gostai.com>
2302 Remove incorrect mode specification.
2303 * data/glr.cc: Don't pretend it's C code.
2305 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2307 Simplify last patch slightly.
2308 * src/getargs.c (getargs): Here.
2310 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2312 Fix last warning from --enable-gcc-warnings.
2313 * src/getargs.c (getargs): Don't assign const address to non-const
2316 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2318 Don't let maintainer-*-check targets force a version update.
2319 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2322 2008-11-17 Di-an Jan <dianj@freeshell.org>
2324 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2325 Align menus. Adjust word wrapping. Use node names for menu names.
2326 (Examples): Don't abbreviate node names.
2327 (LocalWords): Remove abbreviations.
2328 (Copying): Make description a sentence.
2329 (Java Action Features): Remove period to match the rest of menu.
2331 2008-11-17 Di-an Jan <dianj@freeshell.org>
2333 Handles several --enable-gcc-warnings.
2334 * src/getargs.c (command_line_location): Set parameters to void.
2335 * src/output.c (symbol_type_name_cmp): Make static.
2336 (symbols_by_type_name): Set parameters to void.
2337 (symbol_definitions_output): Remove unused parameter. Rename as...
2338 (prepare_symbol_definitions): this.
2339 (muscles_output): Move symbol_definitions_output to...
2340 (output): here as prepare_symbol_definitions.
2341 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
2342 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
2344 2008-11-17 Di-an Jan <dianj@freeshell.org>
2346 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
2347 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
2349 2008-11-16 Akim Demaille <demaille@gostai.com>
2351 Add missing $(EXEEXT).
2352 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
2353 "src/bison$(EXEEXT)".
2354 Reported by Di-an Jan.
2356 2008-11-15 Akim Demaille <demaille@gostai.com>
2360 2008-11-15 Akim Demaille <demaille@gostai.com>
2363 * tests/input.at: here.
2365 2008-11-15 Akim Demaille <demaille@gostai.com>
2367 Remove duplicate header inclusion.
2370 2008-11-15 Akim Demaille <demaille@gostai.com>
2372 * src/parse-gram.h, src/parse-gram.c: Regen.
2374 2008-11-15 Akim Demaille <demaille@gostai.com>
2376 Support parametric types.
2378 There are two issues to handle: first scanning nested angle
2379 bracket pairs to support types such as std::pair< std::string,
2380 std::list<std::string> > >.
2382 Another issue is to address idiosyncracies of C++: do not glue two
2383 closing angle brackets together (otherwise it's operator>>), and
2384 avoid sticking blindly a TYPE to the opening <, as it can result
2385 in '<:' which is a digraph for '['.
2387 * src/scan-gram.l (brace_level): Rename as...
2390 Implement support for complex tags.
2393 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
2394 (b4_symbol_variant): Leave space around types as parameters.
2395 * examples/variant.yy: Use nested template types and leading ::.
2396 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
2398 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
2399 * tests/c++.at: Test parametric types.
2401 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2404 This is not sufficient, but we test at least that the make_SYMBOL
2405 interface is not affected by token.prefix. A more general test
2406 will be implemented when the support of token.prefix is generalized
2409 * tests/c++.at: One more variant test, using token.prefix.
2411 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2413 Test the make_TOKEN interface.
2414 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
2415 Factor the common code in yylex.
2416 Use it to test "%define lex_symbol".
2418 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2422 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2424 Simplify code for variants bench marks.
2425 * etc/bench.pl.in (&generate_grammar_list): Define and use
2427 Factor the common code in yylex.
2429 2008-11-15 Akim Demaille <demaille@gostai.com>
2431 Better error message.
2432 * bootstrap (find_tool): Fix the error message.
2434 2008-11-15 Akim Demaille <demaille@gostai.com>
2436 Update variant.yy to newest interface.
2437 * examples/variant.yy: Define lex_symbol.
2440 2008-11-15 Akim Demaille <demaille@gostai.com>
2442 Don't use locations in variant.yy.
2443 * examples/variant.yy: Adjust to not using locations.
2445 2008-11-15 Akim Demaille <demaille@gostai.com>
2448 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
2449 comments for the license.
2451 2008-11-15 Akim Demaille <demaille@gostai.com>
2453 Remove tests/Makefile.am.
2454 * tests/Makefile.am: Rename as...
2455 * tests/local.mk: this.
2456 * Makefile.am, configure.ac: Adjust.
2457 * Makefile.am (DISTCLEANFILES): Define.
2458 (maintainer-check, maintainer-xml-check, maintainer-push-check):
2459 Remove, we no longer need to bounce to the real targets.
2461 2008-11-15 Akim Demaille <demaille@gostai.com>
2465 2008-11-15 Akim Demaille <demaille@gostai.com>
2468 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
2469 * djgpp/local.mk: this new file.
2471 2008-11-15 Akim Demaille <demaille@gostai.com>
2473 Remove doc/Makefile.am.
2474 * doc/Makefile.am: Rename as...
2475 * doc/local.mk: this.
2477 * Makefile.am, configure.ac: Adjust.
2478 * Makefile.am (MOSTLYCLEANFILES): New.
2479 * src/local.mk: Adjust.
2481 2008-11-15 Akim Demaille <demaille@gostai.com>
2483 Move sc_tight_scope into maint.mk.
2484 It does not work, and I don't know how it was supposed to work: it
2485 seems to be looking for sources in the build tree. I just moved
2486 it at a better place, fixing it is still required.
2488 * src/local.mk (echo): Remove.
2489 (sc_tight_scope): Move to...
2492 2008-11-15 Akim Demaille <demaille@gostai.com>
2495 * src/parse-gram.h, src/parse-gram.h: Regen.
2497 2008-11-15 Akim Demaille <demaille@gostai.com>
2499 Remove src/Makefile.am.
2500 * src/Makefile.am: Rename as...
2501 * src/local.mk: this.
2502 Prefix all the paths with src/.
2503 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
2504 (AM_CPPFLAGS): Find find in builddir/src.
2505 (YACC): Move the flags into...
2507 * maint.mk (sc_tight_scope): Disable.
2508 It used to bounce to the version in src/Makefile.am which is now
2509 part of this very Makefile.
2510 * Makefile.am, configure.ac: Adjust.
2511 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
2512 include "..." to find files "here": we are no longer in src/, so
2513 qualify the includes with src/.
2514 * doc/Makefile.am (PREPATH): No longer include the top_builddir
2516 (.x.1): Adjust to be able to create src/foo from the top level
2517 Makefile, instead of going bounce to src/Makefile the creation of
2520 2008-11-15 Akim Demaille <demaille@gostai.com>
2522 Remove useless variable.
2523 * doc/Makefile.am (srcsrcdir): Remove.
2525 2008-11-15 Akim Demaille <demaille@gostai.com>
2527 Remove data/Makefile.am.
2528 * data/Makefile.am: Rename as...
2529 * data/local.mk: this.
2531 * Makefile.am, configure.ac: Adjust.
2533 2008-11-15 Akim Demaille <demaille@gostai.com>
2535 Remove etc/Makefile.am.
2536 * etc/Makefile.am: Rename as...
2537 * etc/local.mk: this.
2539 * Makefile.am, configure.ac: Adjust.
2541 2008-11-15 Akim Demaille <demaille@gostai.com>
2543 Remove examples/local.mk.
2544 examples/calc++/Makefile.am might be interesting to keep as is, since
2545 it is an example in itself.
2547 * examples/Makefile.am: Rename as...
2548 * examples/local.mk: this.
2550 * Makefile.am, configure.ac: Adjust.
2552 2008-11-15 Akim Demaille <demaille@gostai.com>
2554 Remove build-aux/Makefile.am.
2555 Recursive Makefiles are really way too slow, let's get rid of some of
2558 * build-aux/Makefile.am: Rename as...
2559 * build-aux/local.mk: this.
2561 * Makefile.am, configure.ac: Adjust.
2563 2008-11-15 Akim Demaille <demaille@gostai.com>
2565 Provide convenience constructors for locations and positions.
2566 * data/location.cc (position::position): Accept file, line and
2567 column as arguments with default values.
2568 Always qualify initial line and column literals as unsigned.
2569 (location::location): Provide convenience constructors.
2571 2008-11-15 Akim Demaille <demaille@gostai.com>
2573 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2575 Using template buys us nothing, and makes it uselessly complex to
2576 construct a symbol. Besides, it could not be generalized to other
2577 languages, while make_FOO would work in C/Java etc.
2579 * data/lalr1.cc (b4_symbol_): New.
2580 (b4_symbol): Use it.
2581 (b4_symbol_constructor_declaration_)
2582 (b4_symbol_constructor_definition_): Instead of generating
2583 specializations of an overloaded template function, just generate
2584 several functions whose names are forged from the token names
2585 without the token.prefix.
2586 (b4_symbol_constructor_declarations): Generate them for all the
2587 symbols, not just by class of symbol type, now that instead of
2588 specializing a function template by the token, we generate a
2589 function named after the token.
2590 (b4_symbol_constructor_specialization_)
2591 (b4_symbol_constructor_specializations): Remove.
2592 * etc/bench.pl.in: Adjust to this new API.
2594 2008-11-13 Akim Demaille <demaille@gostai.com>
2596 %define token.prefix.
2597 Provide a means to add a prefix to the name of the tokens as
2598 output in the generated files. Because of name clashes, it is
2599 good to have such a prefix such as TOK_ that protects from names
2600 such as EOF, FILE etc. But it clutters the grammar itself.
2602 * data/bison.m4 (token.prefix): Empty by default.
2603 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2604 * data/lalr1.cc (b4_symbol): Ditto.
2606 2008-11-13 Akim Demaille <demaille@gostai.com>
2608 Compute at M4 time some of the subtractions.
2609 * data/lalr1.cc (b4_subtract): New.
2610 (b4_rhs_data): Use it.
2612 2008-11-13 Akim Demaille <demaille@gostai.com>
2615 This allows the user to get the type of a token returned by yylex.
2617 * data/lalr1.cc (symbol::token): New.
2618 (yytoknum_): Define when %define lex_symbol, independently of
2620 (yytoken_number_): Move into...
2621 (symbol::token): here, since that's the only use.
2622 The other one is YYPRINT which was not officially supported
2623 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2624 array under a different name (yytoknum).
2626 2008-11-13 Akim Demaille <demaille@gostai.com>
2629 * TODO (YYERRCODE): Mention the case of $undef.
2631 2008-11-13 Akim Demaille <demaille@gostai.com>
2634 * TODO (YYPRINT): New.
2636 2008-11-13 Akim Demaille <demaille@gostai.com>
2639 * data/lalr1.cc, data/yacc.c: Fix the description of the
2640 yytranslate and yytoknum tables.
2642 2008-11-13 Akim Demaille <demaille@gostai.com>
2644 Define make_symbol in the header.
2645 To reach good performances these functions should be inlined (yet
2646 this is to measure precisely). To this end they must be available
2649 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2650 location_type with the class name.
2651 Since will now be output in the header, declare "inline".
2652 No longer use b4_symbol_constructor_specializations, but
2653 b4_symbol_constructor_definitions in the header.
2654 Don't call it in the *.cc file.
2656 2008-11-13 Akim Demaille <demaille@gostai.com>
2658 Define yytranslate in the header for lex_symbol.
2659 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2660 into the header file when using %define lex_symbol.
2661 (yytranslate_): Declare inline.
2663 2008-11-13 Akim Demaille <demaille@gostai.com>
2665 Define the constructors of symbol_type in
2666 b4_symbol_constructor_definitions.
2667 The constructors are called by the make_symbol functions, which a
2668 forthcoming patch will move elsewhere. Hence the interest of
2669 putting them together.
2671 The stack_symbol_type does not need to be moved, it is used only
2674 * data/lalr1.cc: Move symbol_type and symbol_base_type
2675 constructors into...
2676 (b4_symbol_constructor_definitions): here.
2679 2008-11-13 Akim Demaille <demaille@gostai.com>
2681 Make it easier to move the definition of yytranslate_.
2682 Forthcoming changes will make it possible to use yytranslate_
2683 from outside the parser implementation file.
2685 * data/lalr1.cc (b4_yytranslate_definition): New.
2688 2008-11-13 Akim Demaille <demaille@gostai.com>
2690 Remove useless class specification.
2691 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
2692 to refer to the class name to use a type defined by the class for
2693 arguments of member functions.
2695 2008-11-13 Akim Demaille <demaille@gostai.com>
2697 Finer input type for yytranslate.
2698 This patch is debatable: the tradition expects yylex to return an int
2699 which happens to correspond to token_number (which is an enum). This
2700 allows for instance to return characters (such as '*' etc.). But this
2701 goes against the stronger typing I am trying to have with the new
2702 lex interface which return a symbol_type. So in this case, feed
2703 yytranslate_ with a token_type.
2705 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
2706 expect a token_type.
2708 2008-11-13 Akim Demaille <demaille@gostai.com>
2710 Honor lex-params in %define lex_symbol mode.
2711 * data/lalr1.cc: Use b4_lex_param.
2713 2008-11-13 Akim Demaille <demaille@gostai.com>
2716 * src/output.c (symbol_definitions_output): Rename symbol
2717 attributes type_name and has_type_name as type and has_type.
2718 * data/lalr1.cc: Adjust uses.
2720 2008-11-13 Akim Demaille <demaille@gostai.com>
2722 Use b4_type_names for the union type.
2723 The union used to compute the size of the variant used to iterate
2724 over the type of all the symbols, with a lot of redundancy. Now
2725 iterate over the lists of symbols having the same type-name.
2727 * data/lalr1.cc (b4_char_sizeof_): New.
2728 (b4_char_sizeof): Use it.
2729 Adjust to be called with a list of numbers instead of a single
2731 Adjust its caller for new-line issues.
2733 2008-11-13 Akim Demaille <demaille@gostai.com>
2735 Define the "identifier" of a symbol.
2736 Symbols may have several string representations, for instance if
2737 they have an alias. What I call its "id" is a string that can be
2738 used as an identifier. May not exist.
2740 Currently the symbols which have the "tag_is_id" flag set are
2741 those that don't have an alias. Look harder for the id.
2743 * src/output.c (is_identifier): Move to...
2744 * src/symtab.c (is_identifier): here.
2745 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2746 * src/output.c (symbol_definitions_output): Use it to define "id"
2748 Remove the definition of "tag_is_id".
2749 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2750 "tag_is_id" were used to produce code.
2751 We still use "tag" for documentation.
2753 2008-11-11 Akim Demaille <demaille@gostai.com>
2755 Locations are no longer required by lalr1.cc.
2756 * data/lalr1.cc (_b4_args, b4_args): New.
2757 Adjust all uses of locations to make them optional.
2758 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2759 (AT_CHECK_NAMESPACE): Check the use of locations.
2760 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2761 without locations with lalr1.cc.
2763 * tests/output.at: Check lalr1.cc with and without location
2765 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2766 Don't use locations.
2768 2008-11-11 Akim Demaille <demaille@gostai.com>
2771 * tests/local.at (AT_FULL_COMPILE): New.
2772 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2774 2008-11-11 Akim Demaille <demaille@gostai.com>
2776 Support parens in calc++.
2777 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2778 * examples/calc++/test (run): Check the expected output.
2782 2008-11-11 Akim Demaille <demaille@gostai.com>
2784 Simplify lalr1.cc since %defines is mandatory.
2785 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2787 2008-11-11 Akim Demaille <demaille@gostai.com>
2790 * TODO (yysyntax_error): New item.
2792 2008-11-11 Akim Demaille <demaille@gostai.com>
2795 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2798 2008-11-11 Akim Demaille <demaille@gostai.com>
2800 Support i18n of the parse error messages.
2801 * TODO (lalr1.cc/I18n): Remove.
2802 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2803 error messages, as done in yacc.c.
2804 Stay within the yy* pseudo namespace.
2806 2008-11-11 Akim Demaille <demaille@gostai.com>
2809 * TODO (single stack, yysyntax_error): New.
2811 2008-11-11 Akim Demaille <demaille@gostai.com>
2813 Make it possible to return a symbol_type from yylex.
2814 * data/lalr1.cc (b4_lex_symbol_if): New.
2815 (parse): When lex_symbol is defined, expected yylex to return the
2817 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2819 (bench_variant_parser): Exercise it.
2821 2008-11-11 Akim Demaille <demaille@gostai.com>
2823 Remove useless bench case.
2824 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2827 2008-11-11 Akim Demaille <demaille@gostai.com>
2829 Improve display of directives.
2830 * etc/bench.pl.in (parse_term): Don't add useless eol.
2832 2008-11-11 Akim Demaille <demaille@gostai.com>
2834 Use string_cast in the bench.
2835 * etc/bench.pl.in (generate_grammar_list): Define and use
2838 2008-11-11 Akim Demaille <demaille@gostai.com>
2840 Replace yychar with a Boolean.
2841 * data/lalr1.cc (parse::yychar): Replace by...
2842 (parse::yyempty): this.
2844 2008-11-11 Akim Demaille <demaille@gostai.com>
2849 2008-11-11 Akim Demaille <demaille@gostai.com>
2851 Let yytranslate handle the eof case.
2852 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2854 No longer expect yychar to be equal to yyeof_, rather, test the
2855 lookahead's (translated) kind.
2857 2008-11-11 Akim Demaille <demaille@gostai.com>
2859 yychar cannot be empty in yyerrlab.
2860 * TODO (yychar == yyempty_): New.
2861 * data/lalr1.cc: Remove the handling of this case.
2862 This eases forthcoming changes related to yychar and yytranslate.
2864 2008-11-11 Akim Demaille <demaille@gostai.com>
2866 Bench: syntactic sugar for %define/#define.
2867 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2868 (&bench_push_parser, bench_variant_parser): Use this feature.
2872 2008-11-11 Akim Demaille <demaille@gostai.com>
2874 Less memory pressure on the "list" bench.
2875 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2876 the values, to limit memory pressure.
2878 2008-11-11 Akim Demaille <demaille@gostai.com>
2880 Introduce make_symbol.
2881 make_symbol provides a means to construct a full symbol (kind,
2882 value, location) in a single shot. It is meant to be a Symbol
2883 constructor, parameterized by the symbol kind so that overloading
2884 would prevent incorrect kind/value pairs. Unfortunately
2885 parameterized constructors do not work well in C++ (unless the
2886 parameter also appears as an argument, which is not acceptable),
2887 hence the use of a function instead of a constructor.
2889 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2890 (b4_symbol_constructor_declarations)
2891 (b4_symbol_constructor_specialization_)
2892 (b4_symbol_constructor_specializations)
2893 (b4_symbol_constructor_definition_)
2894 (b4_symbol_constructor_definitions): New.
2895 Use them where appropriate to generate declaration, declaration of
2896 the specializations, and implementations of the templated
2897 overloaded function "make_symbol".
2898 (variant::variant): Always define a default ctor.
2899 Also provide a copy ctor.
2900 (symbol_base_type, symbol_type): New ctor overloads for value-less
2902 (symbol_type): Now public, so that functions such as yylex can use
2905 2008-11-11 Akim Demaille <demaille@gostai.com>
2907 Inform m4 whether a tag is a valid id.
2908 * src/output.c (is_identifier): New.
2909 (symbol_definitions_output): Use it to define tag_is_id.
2910 But maybe this should be done at m4 level?
2912 2008-11-11 Akim Demaille <demaille@gostai.com>
2914 Test 214 was failing: it greps with a pattern containing [ ]*
2915 which obviously meant to catch spaces and tabs, but contained only
2916 spaces. Tabulations in sources are a nuisance, so to simplify the
2917 matter, get rid of all the tabulations in the Java sources. The
2918 other skeletons will be treated equally later.
2920 * data/java.m4, data/lalr1.java: Untabify.
2921 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2922 tabulations are no longer generated.
2924 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2926 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2927 * configure.ac: Adjust usage.
2928 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2929 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2930 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2932 2008-11-10 Di-an Jan <dianj@freeshell.org>
2934 Workaround Java's ``code too large'' problem for parser tables
2935 in most cases, by using one function per initialization.
2936 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2937 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2938 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2939 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2940 (yytname_): Use b4_typed_parser_table.
2941 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2942 ``code too large'' error.
2944 2008-11-10 Di-an Jan <dianj@freeshell.org>
2946 * NEWS: Document them.
2948 General Java skeleton improvements.
2949 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2950 using gcj < 4.3 in the testsuite, according to comments in
2951 gnulib/m4/javacomp.m4.
2952 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2953 location_type, position_type): Remove extraneous brackets from
2954 b4_percent_define_default.
2955 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2956 m4_define and m4_define_default.
2957 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2958 which marks the end of user code with appropriate syncline, like all
2959 the other skeletons.
2960 (b4_user_post_prologue): Add. Don't silently drop.
2962 (parse): Inline yylex.
2963 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2964 (%{...%}): Fix typo of %code imports.
2965 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2967 Support annotations on parser class with %define annotations.
2968 * data/lalr1.java (annotations): Add to parser class modifier.
2969 * doc/bison.texinfo (Java Parser Interface): Document
2970 %define annotations.
2971 (Java Declarations Summary): Document %define annotations.
2972 * tests/java.at (Java parser class modifiers): Test annotations.
2974 Do not generate code for %error-verbose unless requested.
2975 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2976 Make private. Make conditional on %error-verbose.
2977 (getErrorVerbose, setErrorVerbose): New.
2978 (yytnamerr_): Make conditional on %error-verbose.
2979 (yysyntax_error): Make some code conditional on %error-verbose.
2980 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2981 about %error-verbose having no effect.
2982 (getErrorVerbose, setErrorVerbose): Document.
2984 Move constants for token names to Lexer interface.
2985 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2986 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2987 (parse): Qualify EOF to Lexer.EOF.
2988 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2989 EOF and token names to Java Lexer Interface.
2990 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2992 Make yyerror public.
2993 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2994 (yyerror): Change to public. Add Javadoc comments. Use longer
2995 parameter names. Make the body rather than the declarator
2996 conditional on %locations.
2997 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2999 Allow user to add code to the constructor with %code init.
3000 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3001 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3002 Add %code init to the front of the constructor body.
3003 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3004 and %define init_throws.
3005 (Java Declarations Summary): Document %code init and
3006 %define init_throws.
3007 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3008 (Java constructor init and init_throws): Add tests.
3010 2008-11-10 Akim Demaille <demaille@gostai.com>
3013 * TODO (-D): is implemented.
3014 (associativity): Same precedence must have the same associativity.
3015 For instance, how can a * b / c be parsed if * is %left and / is
3017 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3019 2008-11-10 Akim Demaille <demaille@gostai.com>
3023 2008-11-10 Akim Demaille <demaille@gostai.com>
3025 More information about the symbols.
3026 * src/output.c (type_names_output): Document all the symbols,
3027 including those that don't have a type-name.
3028 (symbol_definitions_output): Define "is_token" and
3030 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3031 type-name, now that they are defined too in b4_type_names.
3033 2008-11-10 Akim Demaille <demaille@gostai.com>
3037 2008-11-10 Akim Demaille <demaille@gostai.com>
3039 Make parser::yytranslate static.
3040 Small speedup (1%) on the list grammar. And makes yytranslate_
3041 available in non member functions.
3043 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3046 2008-11-10 Akim Demaille <demaille@gostai.com>
3048 Avoid trailing spaces.
3049 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3050 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3051 they can be empty, and anyway this incorrectly indents the first
3054 2008-11-10 Akim Demaille <demaille@gostai.com>
3058 2008-11-10 Akim Demaille <demaille@gostai.com>
3060 Use "enum" for integral constants.
3061 This is just nicer to read, I observed no speedup.
3063 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3064 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3065 (yyuser_token_number_max_, yyundef_token_): Move into...
3066 (yytranslate_): here.
3068 2008-11-10 Akim Demaille <demaille@gostai.com>
3070 Shortcuts in bench directives.
3071 * etc/bench.pl.in (parse_dirs): New.
3073 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3074 Create the benches in "benches/".
3076 2008-11-10 Akim Demaille <demaille@gostai.com>
3079 * data/lalr1.cc: here.
3081 2008-11-10 Akim Demaille <demaille@gostai.com>
3083 Adjust verbose message to using emacs.
3084 * etc/bench.pl.in: Inform compilation-mode when we change the
3086 (generate_grammar_list): Recognize %define "variant" in addition
3089 2008-11-10 Akim Demaille <demaille@gostai.com>
3091 Classify symbols by type-name.
3092 * src/uniqstr.h (UNIQSTR_CMP): New.
3093 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
3094 (type_names_output): New.
3095 (muscles_output): Use it.
3096 * data/lalr1.cc (b4_symbol_action_): Remove.
3097 (b4_symbol_case_, b4_type_action_): New.
3098 Adjust uses of b4_symbol_action_ to use b4_type_action_.
3100 2008-11-10 Akim Demaille <demaille@gostai.com>
3102 Change the handling of the symbols in the skeletons.
3103 Before we were using tables which lines were the symbols and which
3104 columns were things like number, tag, type-name etc. It is was
3105 difficult to extend: each time a column was added, all the numbers had
3106 to be updated (you asked for colon $2, not for "tag"). Also, it was
3107 hard to filter these tables when only a subset of the symbols (say the
3108 tokens, or the nterms, or the tokens that have and external number
3109 *and* a type-name) was of interest.
3111 Now instead of monolithic tables, we define one macro per cell. For
3112 instance "b4_symbol(0, tag)" is a macro name which contents is
3113 self-decriptive. The macro "b4_symbol" provides easier access to
3116 * src/output.c (type_names_output): Remove.
3117 (symbol_numbers_output, symbol_definitions_output): New.
3118 (muscles_output): Call them.
3119 (prepare_symbols): Define b4_symbols_number.
3121 2008-11-10 Akim Demaille <demaille@gostai.com>
3124 * src/getargs.h, src/getargs.c (trace_muscle): New.
3125 (trace_types, trace_args): Support it.
3126 * src/output.c (output_skeleton): Use it.
3128 2008-11-10 Akim Demaille <demaille@gostai.com>
3131 * src/output.c (muscles_output): New, extracted from...
3132 (output_skeleton): here.
3135 2008-11-10 Akim Demaille <demaille@gostai.com>
3139 2008-11-10 Akim Demaille <demaille@gostai.com>
3141 Update the variant example.
3142 * examples/variant.yy: Formatting changes.
3145 2008-11-10 Akim Demaille <demaille@gostai.com>
3147 Support constructor with an argument.
3148 This improves the "list" bench by 2%.
3150 * data/lalr1.cc (variant::build): Add an overloaded version with
3152 * tests/c++.at (AT_CHECK_VARIANT): Check it.
3154 2008-11-10 Akim Demaille <demaille@gostai.com>
3157 * tests/c++.at (AT_CHECK_VARIANTS): New.
3158 Use it with and without %define assert.
3160 2008-11-10 Akim Demaille <demaille@gostai.com>
3162 Add %precedence support.
3163 Unfortunately it is not possible to reuse the %prec directive. This
3164 is because to please POSIX, we do not require to end the rules with a
3165 semicolon. As a result,
3169 is ambiguous: either a rule which precedence is that of baz, or a rule,
3170 and then a declaration of the precedence of the token baz.
3172 * doc/bison.texinfo: Document %precedence.
3173 (Precedence Only): New.
3174 * src/assoc.h, src/assoc.c (precedence_assoc): New.
3175 * src/conflicts.c (resolve_sr_conflict): Support it.
3176 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
3178 * tests/calc.at: Use %precedence for NEG.
3179 * tests/conflicts.at (%precedence does not suffice)
3180 (%precedence suffices): New tests.
3182 2008-11-09 Akim Demaille <demaille@gostai.com>
3184 Make benches in a sub dirs.
3185 * etc/bench.pl.in ($dir): New.
3187 Check the use of constructors with an argument.
3188 (bench_variant_parser): Fix.
3190 2008-11-09 Akim Demaille <demaille@gostai.com>
3194 2008-11-09 Akim Demaille <demaille@gostai.com>
3198 2008-11-09 Akim Demaille <demaille@gostai.com>
3200 Require the generation of parse-gram.output.
3201 * src/Makefile.am (YACC): Pass --report=all.
3203 2008-11-09 Akim Demaille <demaille@gostai.com>
3207 2008-11-09 Akim Demaille <demaille@gostai.com>
3210 * TODO: Remove obsolete items.
3213 2008-11-09 Akim Demaille <demaille@gostai.com>
3216 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
3217 (@token, $grammar, $bench): New.
3218 (generate_grammar_variant): Rename as...
3219 (generate_grammar_list): this.
3220 (generate_grammar): Adjust.
3221 (bench_grammar): Rename as...
3223 Use it in the various bench-marking routines.
3224 (-b, -g): New options.
3226 2008-11-09 Akim Demaille <demaille@gostai.com>
3228 Use a static hierarchy for symbols in the C++ parser.
3229 * data/lalr1.cc (symbol_base_type, symbol_type)
3230 (stack_symbol_type): Make it a static hierarchy.
3231 Adjust dependencies.
3233 2008-11-09 Akim Demaille <demaille@gostai.com>
3235 bench.pl -d, --directive.
3236 * etc/bench.pl.in (@directive): New.
3237 (&bench_grammar): Use it.
3238 (&bench_list_grammar): New, to provide access to the "variant"
3241 (getopts): Support -d, --directive.
3243 2008-11-09 Akim Demaille <demaille@gostai.com>
3245 Use inline for small operations.
3246 * data/lalr1.cc (symbol_base_type, symbol_type)
3247 (stack_symbol_type): Declare constructor and other operations as
3249 (yy_destroy_): Inline.
3251 2008-11-09 Akim Demaille <demaille@gostai.com>
3253 Introduce a hierarchy for symbols.
3254 * data/lalr1.cc (symbol_base_type, symbol_type): New.
3255 (data_type): Rename as...
3256 (stack_symbol_type): this.
3257 Derive from symbol_base_type.
3258 (yy_symbol_value_print_): Merge into...
3259 (yy_symbol_print_): this.
3262 (yydestruct_): Rename as...
3263 (yy_destroy_): this.
3264 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
3265 (parser::parse): yyla is now of symbol_type.
3266 Use its type member instead of yytoken.
3268 2008-11-09 Akim Demaille <demaille@gostai.com>
3270 Rename data_type and stack_symbol_type.
3271 * data/lalr1.cc (data_type): Rename as...
3272 (stack_symbol_type): this.
3274 2008-11-09 Akim Demaille <demaille@gostai.com>
3276 Handle semantic value and location together.
3277 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
3278 yydata.value and yydata.location.
3279 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
3280 (YY_SYMBOL_PRINT): Now take semantic value and location as a
3283 (yydestruct_): New overload for a stack symbol.
3285 2008-11-09 Akim Demaille <demaille@gostai.com>
3287 Push a complete symbol, not connected parts.
3288 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
3289 state, value and location.
3292 2008-11-09 Akim Demaille <demaille@gostai.com>
3294 Agregate yylval and yylloc.
3295 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
3296 (parser::yyla): this.
3298 2008-11-09 Akim Demaille <demaille@gostai.com>
3300 Rely on the state stack to display reduction traces.
3301 To display rhs symbols before a reduction, we used information
3302 about the rule reduced, which required the tables yyrhs and
3303 yyprhs. Now use rely only on the state stack to get the same
3306 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
3308 (parser::yyrhs_, parser::yyprhs_): Remove.
3309 (parser::yy_reduce_print_): Use the state stack.
3311 2008-11-09 Akim Demaille <demaille@gostai.com>
3313 Fuse yyval and yyloc into yylhs.
3314 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
3316 (parse): Replace yyval and yyloc with yylhs.value and
3318 After a user action, compute yylhs.state earlier.
3319 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
3322 2008-11-09 Di-an Jan <dianj@freeshell.org>
3324 Remove unused variable.
3325 * src/output.c (type_names_output): Remove unused variable sep.
3327 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
3329 Change tests/output.at quoting.
3330 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
3331 expanding arguments.
3333 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3335 Don't add a semicolon to actions for %skeleton or %language.
3336 It breaks Java test cases as reported by Akim Demaille.
3337 * src/scan-code.l: Implement.
3339 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3341 Clean up %skeleton and %language priority implementation.
3342 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3343 remove static qualifier because others will soon need to see it.
3344 (language_prio): Likewise.
3345 (getargs): Use command_line_prio rather than 0.
3346 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3348 (skeleton_prio): Extern it.
3349 (language_prio): Extern it.
3350 * src/parse-gram.y: Use grammar_prio rather than 1.
3352 2008-11-07 Akim Demaille <demaille@gostai.com>
3354 Moving push traces into yypush_.
3355 * data/lalr1.cc (yypush_): Now takes a optional trace message.
3358 2008-11-07 Akim Demaille <demaille@gostai.com>
3360 The single-stack C++ parser is now the standard one.
3361 * data/lalr1.cc: Rename as...
3362 * data/lalr1-split.cc: this.
3363 * data/lalr1-fusion.cc: Rename as...
3364 * data/lalr1.cc: this.
3365 * etc/bench.pl.in: Adjust.
3367 2008-11-07 Akim Demaille <demaille@gostai.com>
3369 Avoid empty-if warnings.
3370 Reported by Quentin Hocquet.
3372 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
3373 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
3375 2008-11-07 Akim Demaille <demaille@gostai.com>
3377 Pass command line location to skeleton_arg and language_argmatch.
3378 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
3379 The location argument is now mandatory.
3380 Adjust all dependencies.
3381 (getargs): Use command_line_location.
3383 2008-11-07 Akim Demaille <demaille@gostai.com>
3386 * src/getargs.c (usage): Document -D.
3387 Fix help string for --locations.
3388 (command_line_location): New.
3389 (short_options, long_options, getargs): Support -D, --define.
3390 (getargs): Move -d support at the right place.
3391 * doc/bison.texinfo (Bison Options): Update.
3392 * tests/input.at (%define, --define): New.
3394 2008-11-07 Akim Demaille <demaille@gostai.com>
3396 Initialize the muscle table before parsing the command line.
3397 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
3398 (getargs): Define file_name.
3399 * src/main.c (main): Initialize muscle_tab before calling
3401 * src/muscle_tab.c (muscle_init): No longer define file_name, as
3402 its value is not available yet.
3404 2008-11-07 Akim Demaille <demaille@gostai.com>
3406 Locations without columns for command line arguments.
3407 * src/location.c (location_print): Don't display negative columns.
3408 * src/location.h: Document this.
3410 2008-11-07 Akim Demaille <demaille@gostai.com>
3413 * src/getargs.c (usage): Fix help string for -W.
3415 2008-11-07 Akim Demaille <demaille@gostai.com>
3417 Handle more general types of option arguments.
3418 * build-aux/cross-options.pl: The argument ends at the first
3419 space, not the first non-symbol character.
3420 Use @var for each word appearing the argument description.
3422 2008-11-07 Akim Demaille <demaille@gostai.com>
3424 Destroy the variants that remain on the stack in case of error.
3425 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
3427 Display the value only if yymsg is nonnull.
3428 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
3430 2008-11-07 Akim Demaille <demaille@gostai.com>
3432 Add "%define assert" to variants.
3433 This is used to help the user catch cases where some value gets
3434 ovewritten by a new one. This should not happen, as this will
3437 Unfortunately this uncovered a bug in the C++ parser itself: the
3438 lookahead value was not destroyed between two calls to yylex. For
3439 instance if the previous lookahead was a std::string, and then an int,
3440 then the value of the std::string was correctly taken (i.e., the
3441 lookahead was now an empty string), but std::string structure itself
3444 This is now done in variant::build(other&) (which is used to take the
3445 value of the lookahead): other is not only stolen from its value, it
3446 is also destroyed. This incurs a new performance penalty of a few
3447 percent, and union becomes faster again.
3449 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
3450 (b4_variant_if): New.
3451 (variant::built): New.
3452 Use it whereever the status of the variant changes.
3453 * etc/bench.pl.in: Check the penalty of %define assert.
3455 2008-11-07 Akim Demaille <demaille@gostai.com>
3457 Use "%define variant" in bench.pl.
3458 * etc/bench.pl.in: No longer use the pseudo directive %variants,
3459 just use %define variants.
3461 2008-11-07 Akim Demaille <demaille@gostai.com>
3464 * src/parse-gram.h, src/parse-gram.c: Regen.
3466 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3468 Fix user actions without a trailing semicolon.
3469 Reported by Sergei Steshenko at
3470 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3471 * THANKS (Sergei Steshenko): Add.
3472 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3473 * tests/regression.at (Fix user actions without a trailing semicolon):
3476 2008-11-04 Akim Demaille <demaille@gostai.com>
3478 Use b4_copyright_years.
3479 * data/yacc.c (b4_copyright_years): New.
3480 Fix its value according to the comments in the file.
3481 Use it and undefine it.
3483 2008-11-04 Akim Demaille <demaille@gostai.com>
3486 * data/lalr1-fusion.cc, src/parse-gram.y: here.
3488 2008-11-04 Akim Demaille <demaille@gostai.com>
3491 * data/lalr1-fusion.cc: here.
3493 2008-11-04 Akim Demaille <demaille@gostai.com>
3495 Use strict on bench.pl.
3496 * etc/bench.pl.in (&run, &generate_grammar): New.
3497 Rename the grammar generating functions for consistency.
3498 Change the interface so that the list of benches to run is passed
3499 as (optionless) arguments.
3500 (&compile): Use &run.
3502 2008-11-04 Akim Demaille <demaille@gostai.com>
3504 Remove spurious initial empty lines.
3505 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3506 * data/yacc.c: End the @output lines with an @.
3508 2008-11-04 Akim Demaille <demaille@gostai.com>
3510 Improve the display of sizes.
3511 * etc/bench.p.in: Higher precision.
3512 Sort by decreasing size.
3514 2008-11-04 Akim Demaille <demaille@gostai.com>
3516 Don't memcpy C++ structures.
3517 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
3519 (variant::build): New overload for
3520 copy-construction-that-destroys.
3521 (variant::swap): New.
3522 (parser::yypush_): Use it in variant mode.
3524 2008-11-04 Akim Demaille <demaille@gostai.com>
3526 Better defaults for bench.pl.
3527 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
3529 Adjust &verbose uses.
3532 2008-11-04 Akim Demaille <demaille@gostai.com>
3534 Make variant.yy more complex.
3535 std::list cannot be copied via memcpy, they are more demanding than
3536 std::string. Use one std::list to strengthen the test.
3538 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
3540 Create a list of strings, instead of a single large string.
3542 2008-11-04 Akim Demaille <demaille@gostai.com>
3545 * etc/bench.pl.in (--bench, $bench): New.
3547 2008-11-04 Akim Demaille <demaille@gostai.com>
3550 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
3551 Define it after as().
3553 2008-11-04 Akim Demaille <demaille@gostai.com>
3556 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
3558 2008-11-04 Akim Demaille <demaille@gostai.com>
3560 Issue missing synclines after user actions.
3561 * data/c.m4 (b4_case): Issue synclines on the output file.
3563 2008-11-04 Akim Demaille <demaille@gostai.com>
3565 Remove trailing empty line.
3566 * data/lalr1-fusion.cc: Don't add an empty line after the user's
3569 2008-11-04 Akim Demaille <demaille@gostai.com>
3571 Fix output of copyright years.
3572 * data/bison.m4 (b4_copyright): Fix the indentation of the
3573 copyright year paragraph.
3574 Use b4_copyright_years when no years are given.
3575 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3576 (b4_copyright_years): New.
3579 2008-11-04 Akim Demaille <demaille@gostai.com>
3581 Avoid the spurious initial empty line.
3582 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3583 the end of @output request to suppress the empty line that
3586 2008-11-04 Akim Demaille <demaille@gostai.com>
3588 Remove parser::rhs_number_type.
3589 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3590 (yyrhs_): Use b4_table_define.
3592 2008-11-04 Akim Demaille <demaille@gostai.com>
3595 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3597 2008-11-04 Akim Demaille <demaille@gostai.com>
3599 Factor the declaration of the integer tables.
3600 * data/lalr1-fusion.cc (b4_table_define): New.
3603 2008-11-03 Akim Demaille <demaille@gostai.com>
3605 Fix indentation of tables in lalr1.cc
3606 * data/lalr1-fusion.cc: Fix the indentation.
3608 2008-11-03 Akim Demaille <demaille@gostai.com>
3610 Destroy the lhs symbols after reduction.
3611 * data/lalr1-fusion.cc (parse): After the user action, when in
3612 variant mode, destroy the lhs symbols.
3614 2008-11-03 Akim Demaille <demaille@gostai.com>
3616 Simplify yysyntax_error_ use.
3617 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3618 type, but make it unnamed in the declaration when it is not used.
3620 2008-11-03 Akim Demaille <demaille@gostai.com>
3622 Let yy::variant::build return an lvalue.
3623 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3626 2008-11-03 Akim Demaille <demaille@gostai.com>
3628 Define yy::variant only when needed.
3629 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3632 2008-11-03 Akim Demaille <demaille@gostai.com>
3634 Bench the three-stack lalr1.cc.
3635 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3638 2008-11-03 Akim Demaille <demaille@gostai.com>
3640 Fail on parse error in calc++.
3641 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
3643 * examples/calc++/test ($me, $number, $exit, run): New.
3644 Use them to propagate errors to the exit status.
3646 2008-11-03 Akim Demaille <demaille@gostai.com>
3648 Don't specify the skeleton twice in the example.
3649 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3650 file does what is needed.
3652 2008-11-03 Akim Demaille <demaille@gostai.com>
3654 bench: Improve output.
3655 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3657 2008-11-03 Akim Demaille <demaille@gostai.com>
3659 bench: check impact of %debug on variants.
3660 * etc/bench.pl.in (variant_grammar): Fix the computation of
3662 Generate a grammar file that can work with or without %debug.
3663 Do use the @directive.
3664 (bench_variant_parser): Check impact of %debug.
3665 (@directives): Rename all the occurrences to...
3666 (@directive): this, for consistency.
3668 2008-11-03 Akim Demaille <demaille@gostai.com>
3670 bench: report the size too.
3671 * etc/bench.pl.in ($iterations): Defaults to -3.
3672 (&bench_grammar): Require hireswallclock.
3673 Compute and display the size of the result.
3676 2008-11-03 Akim Demaille <demaille@gostai.com>
3678 bench: More use of the verbosity level.
3679 * etc/bench.pl.in ($verbose, &verbose): New.
3681 More POD documentation.
3683 2008-11-03 Akim Demaille <demaille@gostai.com>
3685 bench.pl: a command line interface
3686 * etc/bench.pl.in: More doc.
3687 Some fixes in the documentation.
3688 ($cflags, $iterations, &help, &getopt): New.
3690 (&variant_grammar): Let the number of stages be 10 times what is
3693 2008-11-03 Akim Demaille <demaille@gostai.com>
3695 Bench the use of Boost.Variants.
3696 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
3698 (&compile): Be ready to compile C++ parsers.
3699 (&bench_push_parser): Move debug information to the outermost
3701 * THANKS: Add Michiel De Wilde.
3703 2008-11-03 Akim Demaille <demaille@gostai.com>
3705 bench.pl: Pass directives as a list instead of as a string.
3706 * etc/bench.pl.in (&directives): New.
3707 (&triangular_grammar, &calc_grammar): Use it to format the Bison
3709 (&triangular_grammar): Do use the directives (were ignored).
3710 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
3713 2008-11-03 Akim Demaille <demaille@gostai.com>
3715 Improve genericity of bench.pl.
3716 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
3718 (&bench_push_parser): New.
3721 2008-11-03 Akim Demaille <demaille@gostai.com>
3723 Add documentation to bench.pl.
3724 * etc/bench.pl.in: Comment changes.
3726 2008-11-03 Akim Demaille <demaille@gostai.com>
3728 Fuse the three stacks into a single one.
3730 In order to make it easy to perform benchmarks to ensure that
3731 there are no performance loss, lalr1.cc is forked into
3732 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
3735 Meanwhile, to make sure that lalr1-fusion.cc is correctly
3736 exercized by the test suite, the user must install a symbolic link
3737 from lalr1.cc to it.
3739 Instead of having three stacks (state, value, location), use a
3740 stack of triples. This considerably simplifies the code (and it
3741 will be easier not to require locations as currently does the C++
3742 parser), and also gives a 10% speedup according to
3743 etc/bench (probably mainly since memory allocation is done once
3744 instead of three times).
3746 Another motivation is to make it easier to destruct properly
3747 semantic values: now that they are bound to their state (hence
3748 symbol type) it will be easier to call the appropriate destructor.
3750 These changes should probably benefit the C parser too.
3752 * data/lalr1.cc: Copy as...
3753 * data/lalr1-fusion.cc: this new file.
3754 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3756 (state_stack_type, semantic_stack_type, location_stack_type)
3757 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3758 (data_type, stack_type, yystack_): New.
3759 (YYLLOC_DEFAULT, yypush_): Adjust.
3760 (yyerror_range): Now based on data_type, not location_type.
3762 2008-11-03 Akim Demaille <demaille@gostai.com>
3764 Push the state, value, and location at the same time.
3765 This is needed to prepare a forthcoming patch that fuses the three
3768 * data/lalr1.cc (parser::yypush_): New.
3769 (parser::yynewstate): Change the semantics: instead of arriving to
3770 this label when value and location have been pushed, but yystate
3771 is to be pushed on the state stack, now the three of them must
3772 have been pushed before. yystate still must be the new state.
3773 This allows to use yypush_ everywhere instead of individual
3774 handling of the stacks.
3776 2008-11-03 Akim Demaille <demaille@gostai.com>
3778 Prefer references to pointers.
3779 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3780 definition to use references instead of pointers.
3781 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3782 Take the value and location as references.
3785 2008-11-03 Akim Demaille <demaille@gostai.com>
3787 stack::size instead of stack::height.
3788 * data/lalr1.cc (stack::height): Rename as...
3789 (stack::size): this.
3790 Fix the output type.
3793 2008-11-03 Akim Demaille <demaille@gostai.com>
3795 Use variants to support objects as semantic values.
3796 This patch was inspired by work by Michiel De Wilde. But he used
3797 Boost variants which (i) requires Boost on the user side, (ii) is
3798 slow, and (iii) has useless overhead (the parser knows the type of
3799 the semantic value there is no reason to duplicate this
3800 information as Boost.Variants do).
3802 This implementation reserves a buffer large enough to store the
3803 largest objects. yy::variant implements this buffer. It was
3804 implemented with Quentin Hocquet.
3806 * src/output.c (type_names_output): New.
3807 (output_skeleton): Invoke it.
3808 * data/c++.m4 (b4_variant_if): New.
3809 (b4_symbol_value): If needed, provide a definition for variants.
3810 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3811 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3812 (b4_char_sizeof, yy::variant): New.
3813 (parser::parse): If variants are requested, define
3814 parser::union_type, parser::variant, change the definition of
3815 semantic_type, construct $$ before running the user action instead
3816 of performing a default $$ = $1.
3817 * examples/variant.yy: New.
3818 Based on an example by Michiel De Wilde.
3820 2008-11-03 Akim Demaille <demaille@gostai.com>
3822 Parameterize the extraction of semantic values.
3823 To make future changes easier, no longer rely on ".TYPE" being the
3824 way to get a semantic value.
3826 * data/c.m4 (b4_symbol_value): New.
3828 * data/c++.m4, data/yacc.c: Use it.
3829 * data/glr.c: Use b4_symbol_value.
3833 2008-11-03 Akim Demaille <demaille@gostai.com>
3835 Prepare easier M4 changes.
3836 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3839 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3841 Initiate further development.
3842 * NEWS: Create an empty section for new entries.
3843 * gnulib: Update submodule to HEAD.
3845 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3847 * NEWS: Version 2.4.
3849 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3851 Prepare for next release.
3852 * NEWS: Briefly mention changes since 2.3b.
3853 * README: Say GNU m4 1.4.6, which we've been requiring in release
3854 announcements already, not 1.4.3, which breaks the build.
3856 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3858 Say %language is experimental.
3859 We're thinking of extending it's effect on output file naming. See the
3861 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3862 * NEWS: Say it's experimental.
3863 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3864 recommend it over %skeleton for now.
3865 (Bison Options): Likewise.
3866 (C++ Bison Interface): Use %skeleton not %language.
3867 (Calc++ Parser): Use %skeleton not %language.
3868 * src/getargs.c (usage): Say it's experimental.
3870 2008-11-01 Di-an Jan <dianj@freeshell.org>
3871 Paolo Bonzini <bonzini@gnu.org>
3873 Support all Java parser class modifiers.
3874 * data/java.m4 (b4_percent_define_get3): New.
3875 (b4_final_if, b4_strictfp_if): New.
3876 * data/lalr1.java (final, strictfp, extends, implements): Support.
3877 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3879 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3880 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3881 (AT_CHECK_JAVA_GREP): New.
3882 (Java parser class modifiers): New test.
3883 (Java parser class extends and implements): New test.
3885 Model exception propagation better with throws and lex_throws.
3886 * data/java.m4 (b4_list2): New.
3887 (throws): Change default.
3888 * data/lalr1.java (yyaction): Add throws.
3889 (parse): Add lex_throws in addition to throws.
3890 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3891 * tests/java.at (Java throws specifications): New test.
3893 Improve documentation for Java parsers.
3894 * doc/bison.texinfo (Java Parsers): Add subsections.
3895 Don't quote first argument of %define.
3896 (Java Bison Interface): Document output files. Move documentation
3897 of parser class and merge into Java Parser Interface. Document
3898 features that error out. Document directives with no effect.
3899 Move note about Javadoc higher.
3900 (Java Semantic Values): Explicitly mention stype.
3901 Document that generic types cannot be used.
3902 (Java Location Values): Use @deftypeivar. Document constructors.
3903 Correct return value for toString.
3904 (Java Parser Interface): List undocumented constants/fields.
3905 Move documentation of fields added by %parse-param closer to list
3906 of members. Document that token names are added as fields.
3907 Document constructors accurately. Remove error method.
3908 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3909 Interface. Describe %code lexer and yylex accutately.
3910 Remove documentation that does not match the code.
3911 (Java Action Features): New.
3912 (Java Differences): Add reference. Add item on semantic values.
3913 Add note about @{ ... @}. Clarify %% epilogue placement.
3914 (Java Declarations Summary): New.
3917 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3918 (b4_remove_comma): Quote test argument.
3919 (b4_identification): Remove "bison" field.
3920 * tests/java.at (Java parser class and package names): New test.
3921 (Java %parse-param and %lex-param): New test.
3922 (Java stype, position_class and location_class): New test.
3924 2008-10-31 Di-an Jan <dianj@freeshell.org>
3926 * data/lalr1.jave: Update copyright years.
3927 (YYParser): Correct name of "generated from" file in Javadoc:
3928 use b4_file_name instead of @ofile@.
3929 (Location constructor): Correct Javadoc parameter name.
3930 (yylloc): Add missing opening m4 quote after b4_location_if.
3931 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3932 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3933 (YYParser constructor): Correct Javadoc parameter name.
3935 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3937 Always put auxiliary code files in the same dir as other output files.
3938 * src/files.c (compute_file_name_parts): When the user specifies
3939 --output but not --file-prefix, extract the directory prefix from the
3940 file prefix not from the grammar file name. This affects the location
3941 of files like location.hh generated by the C++ skeleton. The includes
3942 in the other output files require this fix.
3943 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3944 for expected output files.
3945 (Output files): Add a test for the above.
3947 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3949 * gnulib: Update submodule to HEAD.
3951 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3953 Update copyright year.
3954 * src/files.c: Here.
3956 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3958 Don't overwrite the input file.
3959 * src/files.c (output_file_name_check): Fatal error if using input file
3961 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3963 (Conflicting output files): Add test.
3965 2008-10-28 Akim Demaille <demaille@gostai.com>
3968 * data/lalr1.cc: Formatting changes.
3970 2008-10-28 Akim Demaille <demaille@gostai.com>
3972 Don't define debugging functions when !YYDEBUG.
3973 * data/lalr1.cc (debug_stream, set_debug_stream)
3974 (debug_level_type, debug_level, set_debug_level): Don't
3975 declare them when YYDEBUG is not defined.
3976 The implementation are already YYDEBUG-aware.
3978 2008-10-28 Akim Demaille <demaille@gostai.com>
3980 Prefer "continue" for empty loop bodies.
3981 * etc/bench.pl.in: Use "continue" instead of {}.
3983 2008-10-28 Akim Demaille <demaille@gostai.com>
3985 Space and comments changes.
3986 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3987 * data/c.m4, data/lalr1.cc: Space changes.
3989 2008-10-28 Akim Demaille <demaille@gostai.com>
3991 Make gnulib a submodule.
3993 * .gitmodules (gnulib): New.
3995 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3997 Fix yyerror_range for user-defined location type in C++. Reported by
3999 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4000 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4001 * THANKS (Georg Sauthoff): Add.
4003 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4005 Update several administrative files mainly to facilitate releasing.
4006 * HACKING (Administrivia): Make the git-merge-changelog notes more
4008 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4009 (Release Procedure): Update for git and add numerous details that were
4011 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4012 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4013 that announcements don't claim we bootstrapped with whatever bison
4014 happened to be in PATH. Add flex as a bootstrap tool.
4015 * Makefile.maint: Remove, previously replaced by maint.mk.
4016 * Makefile.cfg: Remove, and migrate settings to...
4017 * cfg.mk: ... here for the sake of `make announcement'.
4018 * bootstrap.conf (gnulib_modules): Add announce-gen.
4019 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4022 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4024 Small but important bugfixes for the Java skeleton.
4025 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4026 (yy_symbol_print): Call toString on yyvaluep.
4028 2008-08-29 Akim Demaille <demaille@gostai.com>
4030 Clarify UPDATED use.
4031 * doc/bison.texinfo: It refers to the last edition of this file,
4032 not to the release date of Bison.
4033 Reported by Joel E. Denny.
4035 2008-08-29 Akim Demaille <demaille@gostai.com>
4037 * README: Update FAQ pointer.
4038 Reported by Joel E. Denny.
4040 2008-08-27 Eric Blake <ebb9@byu.net>
4042 Resync m4sugar from autoconf.
4043 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4044 (m4_init): Adjust to latest m4.git changes.
4045 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4047 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4048 (_m4_list_cmp): Reduce side effects.
4050 2008-08-27 Akim Demaille <demaille@gostai.com>
4052 Check yyerrok in calc.at.
4053 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4054 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4057 2008-08-27 Akim Demaille <demaille@gostai.com>
4059 Support yyerrok in lalr1.cc.
4060 YYBACKUP is still to import back into lalr1.cc.
4061 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
4063 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4065 For maintainer-check*, don't recompile for a $(VERSION) update.
4067 (_is-dist-target): Override the one in GNUmakefile.
4068 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4070 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4072 Update for recent change to gnulib.
4073 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4076 2008-08-15 Eric Blake <ebb9@byu.net>
4078 Remaining m4sugar merge from autoconf.
4079 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4080 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4081 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4082 * src/output.c (output_skeleton): Tell m4 how to find it.
4084 Partial m4sugar merge from autoconf: m4_map.
4085 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4086 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4087 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4088 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
4090 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
4092 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
4095 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
4097 Keep .version and PACKAGE_VERSION in sync.
4098 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
4099 dependency, and add comments justifying this in more detail. Discussed
4101 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
4103 2008-08-06 Eric Blake <ebb9@byu.net>
4105 Partial m4sugar merge from autoconf: m4_shiftn.
4106 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
4107 (m4_shift2, m4_shift3): New macros.
4108 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
4109 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
4110 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
4111 * data/java.m4 (b4_remove_comma): Likewise.
4113 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
4114 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
4115 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
4116 (m4_init): Consolidate wrapped text into single m4_wrap.
4117 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
4120 2008-08-05 Eric Blake <ebb9@byu.net>
4122 Partial m4sugar merge from autoconf: builtins, version.m4.
4123 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
4124 (m4_prepend): Remove, as it is unused and inherently quadratic,
4125 whereas m4_append is linear in newer m4.
4126 (m4_mkstemp): New builtin.
4127 (m4_symbols): Make rename conditional.
4128 (m4_version_prereq): Ensure fatal error if used in bison, which
4129 intentionally lacks version.m4.
4131 Fix comments in m4sugar.
4132 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
4134 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4136 Update for recent .gitignore fix in Gnulib.
4137 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
4138 anchored .gitignore entries.
4140 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4142 Set gnu or gnits strictness.
4143 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
4144 development and gnits strictness for releases. Based on Eric Blake's
4146 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
4148 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4150 * NEWS: Clarify documentation of %language.
4152 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
4154 Support usage of git-merge-changelog.
4155 * .gitattributes: New.
4156 * HACKING: Document usage of git-merge-changelog.
4157 * bootstrap: Install git-merge-changelog entries in .git/config
4160 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4162 Remove remaining dependence on CVS Id keyword.
4163 * ChangeLog: For the sake of people still using CVS, don't use dollars
4165 * data/xslt/bison.xsl: Remove Id from header comments, where it was
4167 * data/xslt/xml2dot.xsl: Likewise.
4168 * data/xslt/xml2text.xsl: Likewise.
4169 * data/xslt/xml2xhtml.xsl: Likewise.
4170 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
4171 * doc/Makefile.am (neutralize): Remove, no longer needed.
4172 (.x.1): Don't use neutralize.
4173 (edit): Don't substitute for ID.
4174 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
4176 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4178 Fix dependence on computed configure variables.
4179 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
4180 $(top_srcdir)/configure.ac so that changes to computed variables, such
4181 as PACKAGE_VERSION, are seen.
4182 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
4184 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
4186 Update copyright dates for recent changes.
4187 * Makefile.am: Here.
4188 * src/Makefile.am: Here.
4189 * src/reduce.c: Here.
4190 * tests/reduce.at: Here.
4192 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
4194 Use git-version-gen for version names between releases.
4195 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
4196 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
4197 * .prev-version: New.
4198 * .version.in: Remove.
4199 * ChangeLog: Remove the Id previously used for capturing the CVS
4201 * GNUmakefile: Remove, now copied from Gnulib.
4202 * Makefile.am: Add code suggested by comments in
4203 build-aux/git-version-gen.
4204 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
4205 .prev-version, and .version.
4206 * NEWS (2.3b+): Rename to...
4207 (?.?): ... this because we're dropping the "+" version naming scheme,
4208 but, in general, we still can't be sure of our next release name.
4209 * bootstrap: Add a quick hack to remove from .gitignore the
4210 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
4211 entry. This should really be fixed in gnulib instead.
4212 * bootstrap.conf (gnulib_modules): Add gnumakefile.
4213 * configure.ac (AC_INIT): Set version name by invoking
4214 build-aux/git-version-gen.
4215 (AC_CONFIG_FILES): Remove .version, now generated by
4216 build-aux/git-version-gen.
4217 * maint.mk: New, copied from coreutils.
4218 * doc/.cvsignore (bison.1): Add.
4219 * doc/.gitignore (/bison.1): Add.
4220 * doc/bison.1: Remove, generated.
4221 * src/.cvsignore (revision.c): Remove.
4222 * src/.gitignore (/revision.c): Remove.
4223 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
4224 (BUILT_SOURCES): Remove revision.c.
4225 (revision.c): Remove.
4226 * src/getargs.c (version): Don't print revision after the VERSION.
4227 * src/revision.h: Remove.
4229 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4231 Fix untranslatable composition of sentences. Reported by Goran
4233 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
4234 * THANKS (Goran Uddeborg): Add.
4235 * src/reduce.c (reduce_print): Report the number of nonterminals and
4236 rules useless in the grammar in separate sentences.
4237 * tests/reduce.at (Useless Rules): Update output.
4238 (Reduced Automaton): Likewise.
4239 (Underivable Rules): Likewise.
4240 (Empty Language): Likewise.
4242 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4244 Fix some .gitignore and .cvsignore problems.
4245 * bootstrap (insert_sorted_if_absent): Replace all uses with...
4246 (insert_vc_ignore): ... this new function, which prepends `/' to all
4247 .gitignore entries before passing them to insert_sorted_if_absent.
4248 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
4249 .cvsignore files are maintained even though Bison developers run
4250 bootstrap while using Git.
4251 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
4254 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
4255 unneeded. Reported by Eric Blake.
4256 * lib/.gitignore (/*~): Add.
4257 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
4258 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
4260 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
4262 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4264 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
4265 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
4266 * bootstrap.conf (gnulib_modules): Add unsetenv.
4267 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
4268 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
4270 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
4271 the first argument because it may become position-dependent, and unset
4272 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
4273 Add comments explaining these issues in more detail.
4275 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
4277 Add .gitignore everywhere based on .cvsignore.
4279 * build-aux/.gitignore: New.
4280 * data/.gitignore: New.
4281 * doc/.gitignore: New.
4282 * etc/.gitignore: New.
4283 * examples/.gitignore: New.
4284 * examples/calc++/.gitignore: New.
4285 * lib/.gitignore: New.
4286 * m4/.gitignore: New.
4287 * po/.gitignore: New.
4288 * runtime-po/.gitignore: New.
4289 * src/.gitignore: New.
4290 * tests/.gitignore: New.
4292 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4294 * NEWS (2.3b+): New section, empty for now.
4295 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
4297 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4299 * NEWS (2.3b): Update release date since there has been a delay in
4300 getting the announcements and tarballs out.
4302 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4304 * NEWS: Version 2.3b.
4305 * configure.ac (AC_INIT): Likewise.
4306 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
4308 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4310 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
4311 been doing it for years.
4312 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
4313 (Release Procedure): Add FIXME about make alpha being unmaintained.
4315 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
4317 * data/yacc.c: Reformat m4 a little for readability.
4318 * src/lalr.c (build_relations): Correct comment.
4320 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4322 DJGPP specific issue.
4323 * djgpp/config.sed: Fixes required to run configure scripts generated
4326 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4328 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
4329 coordinator@translationproject.org.
4331 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4333 * THANKS: Add Eric Blake.
4335 2008-04-23 Eric Blake <ebb9@byu.net>
4337 Revert prior patch, by working around autoconf regression.
4338 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
4339 ("Output file name: ("): Uncomment test.
4340 ("Output file name: )"): Likewise.
4341 Based on an idea from Noah Misch.
4343 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4345 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
4346 2.61. Reported by Juan Manuel Guerrero at
4347 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
4348 * tests/output.at ("Output file name: ("): Comment out test case for
4350 ("Output file name: )"): Likewise.
4352 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4354 * GNUmakefile: Update git-version-gen invocation so make dist
4357 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4359 Update to the current gnulib CVS repository, and fix trigraph handling
4361 * bootstrap: Update gnulib CVS repository URL.
4362 (symlink_to_dir): Encapsulate the code that guarantees the destination
4363 directory exists into...
4364 (check_dst_dir): ... this new function, and...
4365 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
4366 fail when copying files into lib/uniwidth/.
4367 * src/output.c (prepare_symbols): When writing yytname muscles, where
4368 symbol names will be encoded in C-string literals, tell quotearg to
4369 escape trigraphs. This used to be the default in gnulib.
4370 * tests/regression.at (Token definitions): Because of the change in
4371 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
4372 escapes trigraphs in symbol names. Thus, yytname no longer has
4373 trigraphs unnecessarily doubly escaped. Update test case output.
4374 Extend test case to be sure Bison's own error messages will no longer
4375 have trigraphs in symbol names unnecessarily escaped once.
4377 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
4379 Fix make dist infinite loop reported by Juan Manuel Guerrero at
4380 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
4381 * .cvsignore: Add .version.
4383 * bootstrap.conf (gnulib_modules): Add git-version-gen.
4384 * configure.ac (AC_CONFIG_FILES): Add .version.
4385 * build-aux/.cvsignore: Add git-version-gen.
4387 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4389 * NEWS (2.3a+): Mention that -g now takes an argument.
4390 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
4391 consistency. Update the -g and -x entries now that they take
4392 arguments. Use brackets to indicate optional arguments.
4393 * src/getargs.c (usage): Explain the relationship between arguments of
4394 long and short options more completely. Document --defines and -d
4395 separately since the former takes an argument but, for POSIX Yacc, the
4397 (short_options): Let -W take an optional argument like --warnings.
4398 (getargs): Sort cases.
4400 2008-02-28 Akim Demaille <demaille@gostai.com>
4402 * doc/bison.texinfo: Fix a few typos.
4404 2008-02-28 Akim Demaille <akim@epita.fr>
4406 * doc/bison.texinfo (Bison Options): Document -W.
4407 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
4409 2008-02-28 Akim Demaille <akim@epita.fr>
4411 * src/getargs.c (short_options): Split and sort for readability.
4412 -g and -x take optional arguments, just like their long options.
4413 * build-aux/cross-options.pl: Use /x to make the regexp easier to
4415 Fix the handling of $opt which resulted in all the argument to be
4416 considered as optional.
4418 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
4420 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
4421 say its interface is experimental.
4422 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4424 (Bison Options): In the -L and --language entry, mention Java.
4425 (Java Bison Interface): Say the interface is experimental.
4426 * src/getargs.c (usage): Mention -L and --language.
4428 * NEWS (2.3a+): Say the push parsing interface is experimental.
4429 * doc/bison.texinfo (Push Decl): Likewise.
4430 (Decl Summary): Likewise in the "%define api.push_pull" entry.
4431 (Push Parser Function): Likewise.
4432 (Pull Parser Function): Likewise.
4433 (Parser Create Function): Likewise.
4434 (Parser Delete Function): Likewise.
4435 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
4436 yypull_parse, and yypush_parse entries.
4438 * NEWS (2.3a+): Mention XML support, and say the schema is
4440 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
4441 * src/getargs.c (usage): Say the XML schema is experimental.
4443 * NEWS (2.3a+): Say option instead of flag.
4445 2008-02-21 Wojciech Polak <polak@gnu.org>
4447 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
4450 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
4452 Fix impure push parser compile error reported by Bob Rossi at
4453 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
4454 * data/yacc.c: Clean up whitespace in the output a little.
4455 (yypstate_allocated): Define for impure push parsers regardless of
4456 whether the pull interface is also requested.
4457 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
4458 check impure push parsers without the pull interface.
4460 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
4461 yyerror takes arguments specified by %parse-param while yypstate_new
4463 * doc/bison.texinfo (Parser Create Function): Document that
4464 yypstate_new returns 0 for multiple impure parser instances.
4465 * tests/push.at (Push Parsing: Multiple impure instances): Update
4466 expected stderr output.
4468 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4470 * runtime-po/POTFILES.in (push.c): Remove.
4472 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4474 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
4475 * data/push.c: Rename to...
4476 * data/yacc.c: ... this, overwriting it.
4477 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
4478 `%push-pull-parser' -> `%define api.push_pull "both"'.
4479 Remove old yacc.c tests, and update push.c tests to yacc.c.
4481 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4483 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4484 `"%code top" blocks' instead of `%code "top" blocks'.
4485 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
4486 Clean up whitespace in the output a little.
4488 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4490 Fix documentation problems reported by Tim Josling at
4491 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
4492 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
4493 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
4494 integers. Explain the effect of literal string aliases on error
4495 messages. Copy token 0 documentation from the C++ skeleton
4498 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4500 Accept a token number in a %left, %right, or %nonassoc for POSIX
4501 conformance. Reported by Tim Josling at
4502 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
4503 * NEWS (2.3a+): Mention.
4504 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
4505 and code numbers are treated by precedence declarations.
4506 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
4508 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
4510 (symbol.prec): New, just like symbol but allows INT.
4511 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
4513 * tests/regression.at (Token number in precedence declaration): New
4516 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4518 DJGPP specific issues.
4519 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
4520 be changed. Copyright timestamp adjusted.
4521 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
4522 be changed. Copyright timestamp adjusted.
4523 * djgpp/config.site: Copyright timestamp adjusted.
4524 * djgpp/config_h.sed: Copyright timestamp adjusted.
4525 * djgpp/djunpack.bat: Copyright timestamp adjusted.
4526 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
4527 filename translation list.
4528 * djgpp/subpipe.c (init_subpipe): Check the environment variables
4529 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
4530 files shall be created. Before trying to use the temp dir where the
4531 environment variable points to check that the dir really exists. If
4532 not default to the cwd as temp dir. Copyright timestamp adjusted.
4533 * djgpp/subpipe.h: Copyright timestamp adjusted.
4534 * djgpp/testsuite.sed: Copyright timestamp adjusted.
4536 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4538 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
4540 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
4542 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
4543 Problem reported by Claudio Saavedra in
4544 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
4546 2008-01-05 Wojciech Polak <polak@gnu.org>
4548 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
4549 document's title with the input grammar file name.
4551 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
4553 Automate regression testing of the XML/XSLT implementation. Discussed
4555 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4556 * configure.ac (XSLTPROC): New substitution.
4557 * Makefile.am (maintainer-xml-check): New phony target invoking...
4558 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4559 invoking make maintainer-check with BISON_TEST_XML=1.
4560 * tests/atlocal.in (XSLTPROC): New.
4561 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4562 not to report reachable memory when Bison is expected to have a
4563 non-zero exit status and (2) to compare XML/XSLT output with --graph
4564 and --report=all output for every working grammar when
4566 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4567 (AT_BISON_CHECK_XML): New.
4568 (AT_QUELL_VALGRIND): New.
4569 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4570 (AT_CHECK): ... don't redefine this since this was the old way to
4572 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4573 AT_BISON_CHECK invocations.
4574 * tests/c++.at: Likewise.
4575 * tests/calc.at: Likewise.
4576 * tests/conflicts.at: Likewise.
4577 * tests/cxx-type.at: Likewise.
4578 * tests/existing.at: Likewise.
4579 * tests/glr-regression.at: Likewise.
4580 * tests/headers.at: Likewise.
4581 * tests/input.at: Likewise.
4582 * tests/java.at: Likewise.
4583 * tests/output.at: Likewise.
4584 * tests/push.at: Likewise.
4585 * tests/reduce.at: Likewise.
4586 * tests/regression.at: Likewise.
4587 * tests/sets.at: Likewise.
4588 * tests/skeletons.at: Likewise.
4589 * tests/synclines.at: Likewise.
4590 * tests/torture.at: Likewise.
4591 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4592 tends to hang xsltproc.
4593 (Big horizontal): Likewise.
4595 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4597 In XML output, remove redundant class attribute on symbol element.
4598 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4599 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4600 look up a symbol to determine whether it's a nonterminal or terminal.
4601 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4602 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4604 Add prec/assoc information to XML output.
4605 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4606 %prec, add a percent_prec attribute.
4607 * src/print-xml.c (print_grammar): For each terminal that has a
4608 precedence or associativity, add a prec or assoc attribute.
4610 (xml_puts): Use xml_indent.
4611 (xml_printf): Use xml_indent.
4612 * src/print-xml.h (xml_indent): Prototype.
4614 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4615 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4617 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4619 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4620 (bison:ruleByNumber): ... this for clarity.
4621 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4622 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4623 (xsl:template match="reduction"): Update.
4624 (xsl:template match="item"): Update.
4625 (xsl:template match="reduction"): Update.
4627 In the XML output, don't print the list of rules where symbols appear.
4628 Compute it in XSLT instead. Discussed at
4629 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4630 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4631 (bison:ruleByRhs): New.
4632 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4634 (xsl:template match="terminal/rule"): Remove.
4635 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4637 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4639 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4640 bison:ruleByRhs and mode="number-link" for rule template.
4641 (xsl:template match="terminal/rule"): Remove.
4642 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4643 bison:ruleByRhs and mode="number-link" for rule template.
4644 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4646 (xsl:template match="rule" mode="number-link"): ... this.
4647 * src/print-xml.c (print_grammar): Don't print the list of rules.
4649 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4651 Don't let --report affect XML output; always print all information.
4653 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4654 * src/conflicts.c (log_resolution): Implement.
4655 * src/print-xml.c (print_core): Implement.
4656 (print_state): Implement.
4657 (print_xml): Implement.
4659 * NEWS (2.3a+): Fix quotes.
4660 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4661 don't let %verbose clear the list specified by --report.
4663 2007-11-26 Akim Demaille <akim@epita.fr>
4665 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4667 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4669 In the XML output, list useless and unused symbols and rules with the
4670 useful ones and add a "usefulness" attribute. Discussed starting at
4671 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4672 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4673 (grammar_rules_print_xml): Print all rules instead of just those
4674 useful in the grammar, and add a "usefulness" attribute.
4675 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4676 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4677 (print_grammar): Print all nonterminals instead of just useful ones,
4678 and add a "usefulness" attribute to nonterminals and terminals.
4679 (print_xml): Don't print a separate "reductions" or
4680 "rules-useless-in-parser" element.
4681 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4682 (reduce_xml): Remove.
4683 (reduce_token_unused_in_grammar): New.
4684 (reduce_nonterminal_useless_in_grammar): New.
4685 * src/reduce.h (reduce_xml): Remove prototype.
4686 (reduce_token_unused_in_grammar): Add prototype.
4687 (reduce_nonterminal_useless_in_grammar): Add prototype.
4688 * data/xslt/xml2text.xsl: Update for XML changes.
4689 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4690 * tests/reduce.at (Useless Terminals): Update output.
4691 (Useless Rules): Update output.
4692 (Reduced Automaton): Update output.
4694 Say "Terminals unused in grammar" instead of "Unused terminals".
4695 * NEWS (2.3a+): Update.
4696 * doc/bison.texinfo (Understanding): Update example output.
4697 * src/reduce.c (reduce_output): Implement.
4698 * data/xslt/xml2text.xsl: Implement.
4699 * data/xslt/xml2xhtml.xsl: Implement.
4701 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4703 Accept --report-file=FILE to override the default `.output' filename.
4704 * NEWS (2.3a+): Mention.
4705 * doc/bison.texinfo (Bison Options): Add an entry.
4706 * src/files.c (compute_output_file_names): Don't override
4707 spec_verbose_file if already set.
4708 * src/getargs.c (usage): Document --report-file.
4709 (REPORT_FILE_OPTION): New anonymous enum member.
4710 (long_options): Add entry for it.
4711 (getargs): Add case for it setting spec_verbose_file.
4713 * build-aux/cross-options.pl: Don't record a short option just because
4715 * doc/.cvsignore: Add yacc.1.
4717 2007-11-14 Akim Demaille <akim@epita.fr>
4719 * doc/yacc.1.in: New.
4720 * configure.ac, doc/Makefile.am: Adjust.
4721 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4723 Use AC_SUBST for assignments too.
4724 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4726 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4728 * src/gram.c: Remove comments that duplicate comments in gram.h.
4730 When reporting useless rules and nonterminals, say "useless in grammar"
4731 instead of "useless", and say "useless in parser" instead of "never
4732 reduced". Discussed starting at
4733 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4734 * NEWS (2.3a+): Mention this change.
4735 * data/xslt/xml2text.xsl: Update output text and expected input XML
4736 element names to match changes below.
4737 * data/xslt/xml2xhtml.xsl: Likewise.
4738 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4739 Contents: "Rules useless in parser due to conflicts".
4740 * doc/bison.texinfo (Decl Summary): Reword a little.
4741 (Understanding): Update example output for changes below.
4742 * src/gram.c: (rule_useful_p): Rename to...
4743 (rule_useful_in_grammar_p): ... this.
4744 (rule_useless_p): Rename to...
4745 (rule_useless_in_grammar_p): ... this.
4746 (rule_never_reduced_p): Rename to...
4747 (rule_useless_in_parser_p): ... this.
4748 (grammar_rules_print): Update for renames.
4749 (grammar_rules_print_xml): Update for renames.
4750 (grammar_rules_never_reduced_report): Rename to...
4751 (grammar_rules_useless_report): ... this since it is used for either
4752 kind of useless rule.
4753 * src/gram.h: Reword comments and update function names in prototypes.
4754 * src/main.c (main): Say "rule useless in parser due to conflicts".
4755 * src/print-xml.c (print_rules_never_reduced): Rename to...
4756 (print_rules_useless_in_parser): ... this, and rename output XML
4757 element "rules-never-reduced" to "rules-useless-in-parser".
4758 (print_xml): Update for rename.
4759 * src/print.c (print_results): Say "Rules useless in parser due to
4761 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4762 (nonterminals_reduce): Say "nonterminal useless in grammar".
4763 (reduce_output): Say "Nonterminals useless in grammar".
4764 Say "Rules useless in grammar".
4765 (reduce_xml): Rename output XML element "useless" to
4766 "useless-in-grammar".
4767 (reduce_print): Don't report the count of grammatically useless rules
4768 as "rules never reduced" just because %yacc is specified.
4769 In the correct report of this count, say nonterminal(s) and rule(s)
4770 "useless in grammar".
4771 * tests/conflicts.at (S/R in initial): Update expected output.
4772 (Defaulted Conflicted Reduction): Likewise.
4773 (Unreachable States After Conflict Resolution): Likewise.
4774 * tests/existing.at (GNU pic Grammar): Likewise.
4775 * tests/reduce.at (Useless Nonterminals): Likewise.
4776 (Useless Rules): Likewise.
4777 (Reduced Automaton): Likewise.
4778 (Underivable Rules): Likewise.
4779 (Empty Language): Likewise.
4781 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4783 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4784 here document and before the EOF so that BSD's implementation of Bourne
4785 shell doesn't parse the delimiter as part of the here document.
4786 * doc/.cvsignore: Add cross-options.texi.
4787 * src/getargs.c (usage): Add a blank line after the warning categories.
4789 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4791 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4793 2007-11-05 Akim Demaille <akim@epita.fr>
4795 Remove Id: from bison.1.
4796 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4797 (perl -0777 -pi -e 's/\.PP\nId): New.
4798 (.x.1): Use it to ignore the version control revision.
4800 2007-11-05 Akim Demaille <demaille@gostai.com>
4802 * build-aux/Makefile.am: Ship cross-options.pl.
4803 * doc/Makefile.am: Always refer to cross-options.texi with
4805 (MAINTAINERCLEANFILES): Add it.
4807 2007-11-04 Akim Demaille <demaille@gostai.com>
4809 Generate the long/short option cross-table.
4810 * build-aux/cross-options.pl: New.
4811 * doc/Makefile.am (cross-options.texi): New.
4812 * doc/bison.texinfo: Use it.
4814 2007-11-04 Akim Demaille <demaille@gostai.com>
4816 Generate bison.1 using help2man.
4817 * doc/common.x, doc/bison.x: New.
4818 * doc/Makefile.am (bison.1, .x.1): New.
4819 The code is taken from autoconf-2.61/man/Makefile.am.
4820 * configure.ac: Look for help2man.
4822 2007-11-04 Akim Demaille <demaille@gostai.com>
4825 * src/getargs.c (usage): Document -W, make it clear that -d,
4826 -g and -x have optional arguments.
4828 2007-11-04 Akim Demaille <demaille@gostai.com>
4830 Find sha1sum when named gsha1sum.
4831 * bootstrap (find_tool): New.
4834 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4836 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4838 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4839 * NEWS (2.3a+): Mention.
4840 * data/bison.m4 (b4_pure_if): Don't define it here.
4841 * data/c.m4 (b4_identification): Depend on individual skeletons to
4842 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4843 values of the %define variables api.pure or api.push_pull. Define
4844 YYPURE, YYPUSH, and YYPULL accordingly.
4845 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4846 glr.cc has already defined b4_pure_flag.
4847 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4848 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4849 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4850 * doc/bison.texinfo (Pure Decl): Update.
4851 (Push Decl): Update.
4852 (Decl Summary): Add api.pure to %define entry.
4853 In %pure-parser entry, say it's deprecated and reference %define.
4854 (Pure Calling): Update.
4855 (Error Reporting): Update.
4856 (C++ Scanner Interface): Update.
4857 (How Can I Reset the Parser): Update.
4858 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4860 * src/getargs.c (pure_parser): Remove global variable.
4861 * src/getargs.h (pure_parser): Remove extern.
4862 * src/output.c (prepare): Don't define pure_flag muscle.
4863 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4864 wrapper around `%define api.pure'.
4865 * tests/calc.at (Simple LALR Calculator): Update.
4866 (Simple GLR Calculator): Update.
4867 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4869 (GLR: Resolve ambiguity, pure, locations): Update.
4870 (GLR: Merge conflicting parses, pure, no locations): Update.
4871 (GLR: Merge conflicting parses, pure, locations): Update.
4872 * tests/glr-regression.at (Uninitialized location when reporting
4874 * tests/input.at (Unused %define api.pure): New test case.
4875 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4876 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4877 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4879 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4881 %define push_pull -> %define api.push_pull. Discussed starting at
4882 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4883 * data/push.c: Expect the new name.
4884 * data/yacc.c: Likewise.
4885 * doc/bison.texinfo (Push Decl): Update.
4886 (Decl Summary): Update %define entry.
4887 (Push Parser Function): Update.
4888 (Pull Parser Function): Update.
4889 (Parser Create Function): Update.
4890 (Parser Delete Function): Update.
4891 * tests/calc.at (Simple LALR Calculator): Update.
4892 * tests/input.at (%define enum variables): Update.
4893 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4894 (Push Parsing: Multiple impure instances): Update.
4895 (Push Parsing: Unsupported Skeletons): Update.
4896 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4897 (Exploding the Stack Size with Malloc): Update.
4899 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4902 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4904 For the XML output's terminal element, rename @number to @token-number,
4905 and add @symbol-number. In the nonterminal element, rename @number to
4906 @symbol-number. Discussed starting at
4907 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4908 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4910 (xsl:template match="nonterminal"): Likewise.
4911 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4912 (xsl:template match="nonterminal"): Likewise.
4913 * src/print-xml.c (print_grammar): Implement.
4915 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4917 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4918 2007-10-11 change, the child elements here are items not rules.
4919 (xsl:template match="item"): New.
4920 (xsl:template match="rule"): Update for new reduced itemset.
4921 (xsl:template match="point"): Remove.
4922 (xsl:template match="empty"): For consistency with --graph, don't
4923 output "/* empty */".
4924 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4925 line-wrap, don't pass a negative value as first-line-length since this
4926 won't work with the following changes.
4927 (xsl:template name="line-wrap"): Simplify slightly.
4928 (xsl:template name="ws-search"): Eliminate recursion.
4929 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4930 set next to an item whose dot is not at the end of the RHS even if it
4931 happens to be associated with the same rule.
4933 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4935 Add %define lr.keep_unreachable_states.
4936 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4937 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4938 * src/main.c (main): Implement it.
4939 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4940 Extend to test it, and fix a typo.
4942 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4944 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4945 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4946 the example .output text.
4947 * tests/regression.at (Extra lookahead sets in report): Improve wording
4950 2007-10-17 Wojciech Polak <polak@gnu.org>
4952 * src/print-xml.c (print_grammar): Renamed
4953 <terminal> and <nonterminal> attributes:
4954 "type" to "number" and "symbol" to "name".
4955 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4956 Use new attribute names.
4957 (xsl:template match="nonterminal"): Likewise.
4958 * data/xslt/xml2xhtml.xsl: Likewise.
4960 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4962 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4963 (Option Cross Key): Likewise.
4965 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4966 next to an item whose dot is not at the end of the RHS even if it
4967 happens to be associated with the same rule.
4968 * src/print.c (print_core): Likewise.
4969 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4970 (Resolved SR Conflicts): Update output.
4971 * tests/regression.at (Extra lookahead sets in report): New test case.
4973 2007-10-11 Wojciech Polak <polak@gnu.org>
4975 * src/print-xml.c (print_core): Remove item set
4977 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4978 Improve processing time. Suggested by Joel E. Denny.
4979 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4980 Write xsl:param "required" attribute as comment.
4981 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4982 (xsl:template match="rule"): Support new reduced itemset.
4983 (xsl:template match="point"): Remove.
4984 * data/xslt/xml2xhtml.xsl: Likewise.
4986 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4988 * src/getargs.c (version): Update copyright year.
4990 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4992 Make xml2dot.xsl and --graph produce the same output.
4993 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
4994 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4996 (xsl:template name="output-node"): Use the new escape template instead
4997 of the string-replace template directly.
4998 (xsl:template name="output-edge"): Likewise.
4999 (xsl:template name="escape"): New, escapes backslashes and newlines in
5000 addition to quotation marks.
5001 * src/graphviz.c (start_graph, output_node, output_edge): Add
5002 whitespace to output for legibility.
5004 Make xml2text.xsl and --report produce the same output, and remove the
5005 XML "conflicts" element since a conflict summary is easily extracted
5007 * data/xslt/bison.xsl: New.
5008 (xsl:template match="state" mode="bison:count-conflicts): New.
5009 * data/xslt/xml2text.xsl: Import bison.xsl.
5010 (xsl:template match="bison-xml-report"): Instead of styling the
5011 "conflicts" element, style the "automaton" element with mode
5012 "conflicts". Unlike the former, the latter lists S/R and R/R
5013 conflicts for a state on the same line.
5014 (xsl:template match="conflicts"): Remove.
5015 (xsl:template match="conflict"): Remove.
5016 (xsl:template match="terminal"): Line-wrap the list of rules in which
5017 the terminal is used.
5018 (xsl:template match="nonterminal"): Likewise for nonterminals.
5019 (xsl:template match="automaton" mode="conflicts"): New.
5020 (xsl:template match="state" mode="conflicts"): New.
5021 (xsl:template name="line-wrap"): New.
5022 (xsl:template name="ws-search"): New.
5023 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5024 (xsl:template match="bison-xml-report"): Instead of styling the
5025 "conflicts" element, style the "automaton" element with mode
5027 (xsl:template match="conflicts"): Remove.
5028 (xsl:template match="conflict"): Remove.
5029 (xsl:template match="automaton" mode="conflicts"): New.
5030 (xsl:template match="state" mode="conflicts): New.
5031 * src/conflicts.c (conflicts_output_xml): Remove.
5032 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5033 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5034 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5035 the corresponding XSLT is easier. Also, never wrap between a word and
5036 the comma that follows it.
5038 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5040 Improve C++ namespace support. Discussed starting at
5041 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5042 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5043 b4_namespace_close): New macros that interpret the %define variable
5044 "namespace" so its value can contain "::" to indicate nested
5046 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5048 * data/lalr1.cc (b4_namespace): Likewise.
5049 * data/location.cc (b4_namespace): Likewise.
5050 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5051 inside a new table in the general %define entry. Document `%define
5052 namespace' there as well. Point the %name-prefix entry to it since it
5053 explains it more completely in the case of C++.
5054 (C++ Bison Interface): Mention `%define namespace' instead of
5056 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5058 * tests/c++.at (Relative namespace references): New test case.
5059 (Absolute namespace references): New test case.
5060 (Syntactically invalid namespace references): New test case.
5061 * tests/input.at (C++ namespace reference errors): New test case.
5063 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5065 Add syncline support and location accessor to internal %define
5067 * data/bison.m4 (b4_percent_define_get_loc): New.
5068 (b4_percent_define_get_syncline): New.
5069 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5070 (b4_percent_define_default): Record defining location as line 1 rather
5071 than 0 for the sake of synchronizing #line's, and define
5072 b4_percent_define_syncline(VARIABLE).
5073 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5074 * src/muscle_tab.c (muscle_syncline_grow): New.
5075 (muscle_code_grow): Use muscle_syncline_grow.
5076 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5077 define b4_percent_define_syncline(VARIABLE).
5078 (muscle_percent_define_get_loc): New.
5079 (muscle_percent_define_get_syncline): New.
5080 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5081 remove some unused variables.
5082 (muscle_percent_define_default): Record defining location as line 1
5083 rather than 0 for the sake of synchronizing #line's, and define
5084 b4_percent_define_syncline(VARIABLE).
5085 (muscle_percent_define_check_values): Use
5086 muscle_percent_define_get_loc.
5087 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5088 (muscle_percent_define_get_syncline): Prototype.
5089 * tests/skeletons.at (%define Boolean variables: invalid skeleton
5090 defaults): Update output for location change.
5091 (Complaining during macro argument expansion): Extend to test
5092 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
5094 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
5096 Fix some error-reporting macro bugs.
5097 * data/bison.m4 (b4_cat): New.
5098 (b4_error, b4_error_at): Use b4_cat to send error directives directly
5099 to stdout so they don't become arguments to other macros. Update
5100 comments and add examples.
5101 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
5103 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
5104 after printing the error directive so that M4 doesn't report subsequent
5105 problems that are induced by this problem.
5106 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
5107 instead of just in them. Recognize @\n in both places. Both expand to
5108 the empty string. Needed by b4_cat.
5109 * tests/skeletons.at (Complaining during macro argument expansion):
5111 (Fatal errors make M4 exit immediately): New test case.
5113 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
5115 Implement --print-datadir.
5116 * src/getargs.c (usage): Mention.
5117 (PRINT_DATADIR_OPTION): New anonymous enum member.
5118 (long_options): Add entry for it.
5119 (getargs): Add case for it calling compute_pkgdatadir.
5120 * src/output.c (output_skeleton): Encapsulate data directory
5121 computation from here...
5122 (prepare): ... and from here...
5123 (compute_pkgdatadir): ... into this new function.
5124 * src/output.h (compute_pkgdatadir): Prototype.
5126 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
5128 * src/print-xml.c (escape_bufs): New static global variable
5130 (xml_escape_n): ... the static local variable buf here.
5131 (print_xml): Free memory for escape_bufs.
5132 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
5134 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
5136 Replace `%push-parser' and `%push-pull-parser' with
5137 `%define push_pull "push"' and `%define push_pull "both"'.
5138 `%define push_pull "pull"' is the default.
5139 * doc/bison.texinfo (Push Decl, Push Parser Function,
5140 Pull Parser Function, Parser Create Function, Parser Delete Function):
5141 Update declarations.
5142 (Decl Summary, Table of Symbols): Replace %push-parser and
5143 %push-pull-parser entries with a %define push_pull entry.
5144 * data/bison.m4 (b4_percent_define_check_values): New macro.
5145 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
5147 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
5149 * data/push.c: ... to here and compute them from the value of the
5150 %define variable push_pull.
5151 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
5152 parsing requests here...
5153 * data/yacc.c: ... hack this to switch to push.c any time
5154 b4_use_push_pull_flag or the %define variable push_pull is set. This
5155 will go away when we mv push.c yacc.c.
5156 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
5157 push parsing is not supported since unused %define variables are
5159 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
5160 * src/muscle_tab.h (muscle_percent_define_check_values): Update
5161 comments for consistency with b4_percent_define_check_values.
5162 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
5164 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
5166 (prologue_declaration): Remove %push-parser and %push-pull-parser
5168 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
5169 * tests/calc.at: Update declarations.
5170 * tests/input.at (%define enum variables): New test case.
5171 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
5173 (Push Parsing: Multiple impure instances): Update declaration.
5174 (Push Parsing: Unsupported Skeletons): New test case.
5175 * tests/torture.at (Exploding the Stack Size with Alloca): Update
5177 (Exploding the Stack Size with Malloc): Update declaration.
5179 2007-09-24 Wojciech Polak <polak@gnu.org>
5181 Add XSLT transformations.
5183 * data/xslt/xml2dot.xsl: Transform XML into DOT.
5184 * data/xslt/xml2text.xsl: Transform XML into plain text.
5185 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
5186 * data/Makefile.am (xsltdir): New variable.
5187 (dist_xslt_DATA): Add xslt/*.xsl files.
5189 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
5191 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
5192 Problem reported by Wojciech Polak.
5193 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
5194 (xml_printf): Undo change I made on 21 September; that is,
5195 indent 2 spaces, not 1.
5197 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
5199 Pacify ./configure --enable-gcc-warnings.
5200 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
5201 `char const *' instead of `char *'.
5202 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
5203 local variable `sep'.
5205 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5207 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
5209 * src/print-xml.c: Prefer "const" after types; that's more consistent.
5210 (xml_printf): Indent just 1 space for level.
5211 (e_char, xlate_char): Remove.
5212 (xml_escape_string): Rewrite to avoid undefined behavior (used
5213 storage that was freed from the stack).
5214 (xml_escape_n): Don't bother checking for subscript error.
5216 2007-09-21 Wojciech Polak <polak@gnu.org>
5218 Add Bison XML Automaton Report.
5220 Add support for an -x option to generate an XML report.
5221 It is not documented yet.
5222 * src/print-xml.c: New file.
5223 * src/print-xml.h: Likewise.
5224 * lib/timevar.def (TV_XML): New var.
5225 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
5226 * src/conflicts.c: Include print-xml.h.
5227 (solved_conflicts_xml_obstack): New var.
5228 (log_resolution, conflicts_solve, conflicts_free):
5229 Add support for XML report.
5230 (conflicts_output_val): New function.
5231 * src/conflicts.h (conflicts_output_val): New decl.
5232 * src/files.c (spec_xml_file): New var.
5233 (compute_output_file_names, output_file_names_free): Add XML support.
5234 * src/files.h (spec_xml_file): New decl.
5235 * src/getargs.c (xml_flag): New var.
5236 (usage, short_options, long_options, getargs): Add XML support.
5237 * src/getargs.h (xml_flag): New decl.
5238 * src/gram.c: Include print-xml.h.
5239 (rule_lhs_print_xml, rule_rhs_print_xml):
5240 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
5242 * src/gram.h: Declare external ones.
5243 * src/main.c: Include print-xml.h.
5244 (main): Add XML support.
5245 * src/reduce.c: Include print-xml.h.
5246 (reduce_xml): New function.
5247 * src/reduce.h: Declare it.
5248 * src/state.c: Include print-xml.h.
5249 (state_new): Add XML support.
5250 (state_rule_lookahead_tokens_print_xml): New function.
5251 * src/state.h: Declare it.
5252 (struct state): New member solved_conflicts_xml.
5253 * src/symtab.c (symbol_class_get_string): New function.
5254 * src/symtab.h: Declare it.
5256 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5258 * GNUmakefile: Switch to coreutils's version.
5259 * bootstrap: Likewise.
5260 * Makefile.cfg: Adjust to new GNUmakefile.
5261 * README-hacking: Likewise.
5265 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5266 Bruno Haible <bruno@clisp.org>
5268 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5269 and is a script that invokes bison. Tighten the code. Add comments.
5271 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
5273 Spell "boolean" as "Boolean". Reported by Akim Demaille.
5274 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
5275 * doc/bison.texinfo (Decl Summary): Fix.
5276 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
5277 * tests/input.at (Boolean %define variables): Update output.
5278 * tests/skeletons.at (%define boolean variables: invalid skeleton
5279 defaults): Rename to...
5280 (%define Boolean variables: invalid skeleton defaults): ... this and
5283 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
5285 In impure push mode, don't allow more than one yypstate to be allocated
5286 since multiple impure parsers would corrupt yynerrs.
5287 * data/push.c (yypstate_allocated): New static global variable
5289 (yypull_parse): If yypstate_new returns 0, don't report it as memory
5290 exhaustion if yypstate_allocated is 1, but still return 2.
5291 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
5292 already 1. Otherwise, set it to 1.
5293 (yypstate_delete): Set it to 0.
5294 * tests/push.at (Push Parsing: Multiple impure instances): New test
5297 2007-08-17 Bob Rossi <bob@brasko.net>
5299 * doc/bison.texinfo (Push Decl): Document the push parser.
5300 (Table of Symbols): Ditto.
5302 (Decl Summary): Ditto.
5303 (Multiple Parsers, Push Parser Function, Pull Parser Function,
5304 Parser Create Function, Parser Delete Function):
5305 Add new push parser symbols.
5306 (Table of Symbols): Document push-parser, push-pull-parser,
5307 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
5309 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
5312 * doc/gpl-3.0.texi: New file.
5313 * doc/gpl.texi: Remove.
5314 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
5315 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
5316 * README-hacking, TODO, bootstrap, bootstrap.conf:
5317 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
5318 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
5319 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
5320 * data/lalr1.cc, data/lalr1.java, data/location.cc:
5321 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
5322 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
5323 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
5324 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
5325 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
5326 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
5327 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
5328 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
5329 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
5330 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
5331 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
5332 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
5333 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
5334 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
5335 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
5336 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
5337 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
5338 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
5339 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
5340 * src/complain.c, src/complain.h, src/conflicts.c:
5341 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
5342 * src/files.h, src/flex-scanner.h, src/getargs.c:
5343 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
5344 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
5345 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
5346 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
5347 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
5348 * src/print.c, src/print.h, src/print_graph.c:
5349 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
5350 * src/reduce.h, src/relation.c, src/relation.h:
5351 * src/revision.h, src/scan-code.h, src/scan-code.l:
5352 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
5353 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
5354 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
5355 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
5356 * tests/Makefile.am, tests/actions.at, tests/c++.at:
5357 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
5358 * tests/existing.at, tests/glr-regression.at:
5359 * tests/headers.at, tests/input.at, tests/java.at:
5360 * tests/local.at, tests/output.at, tests/push.at:
5361 * tests/reduce.at, tests/regression.at, tests/sets.at:
5362 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
5366 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5368 Get rid of broken %no-parser, -n, and --no-parser implementation and
5370 * TODO: Don't mention them.
5371 * doc/bison.1: Likewise.
5372 * doc/bison.texinfo (Decl Summary): Likewise.
5373 (Bison Options): Likewise.
5374 (Option Cross Key): Likewise.
5375 * src/getargs.c (no_parser_flag): Remove global variable.
5376 (usage): Don't print description of -n and --no-parser.
5377 (long_options): Remove --no-parser entry here.
5378 (getargs): Remove -n case in the switch here.
5379 * src/getargs.h (no_parser_flag): Remove extern.
5380 * tests/regression.at (Web2c Actions): Remove comment that mentions
5383 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5385 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
5386 name user variables starting with `yy'. Just pass NULL instead of a
5387 dummy local &yylval to yypush_parse.
5388 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
5391 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
5393 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
5394 true since it's then always used regardless of whether yyoverflow is
5395 defined. Reported by Christian Burger at
5396 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
5397 * THANKS: Add Christian Burger.
5399 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5400 node names: say "Decl Summary" not "Bison Declaration Summary".
5402 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
5404 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
5405 determine whether this function has already complained about an invalid
5406 value for a %define boolean variable, don't check whether Bison has
5407 ever examined the value. As written, the check was a tautology.
5408 Instead, record and check for this complaint using a separate muscle.
5410 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5412 Fix push parsing memory leak reported by Brandon Lucia at
5413 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
5414 * THANKS: Add Brandon Lucia.
5415 * data/push.c (yypstate_delete): Free the stack if it was reallocated
5416 but the parse never completed and thus freed it.
5417 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
5418 * tests/testsuite.at: Include push.at.
5419 * test/push.at: New.
5420 (Push Parsing: Memory Leak for Early Deletion): New test case.
5422 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
5424 Improve handling of multiple S/R conflicts in the same state and of S/R
5425 conflicts involving multiple reductions.
5426 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
5427 set for a state here or Bison will abort if it is reassigned on a
5428 later conflicted reduction in the same state.
5429 Similarly, don't finalize and assign the solved conflicts report here
5430 or it will be lost if it is reassigned on a later conflicted reduction
5432 (set_conflicts): Instead, assign them both here after all S/R conflicts
5433 in the state have been fully examined.
5434 * src/print.c (shift_set): Rename to...
5435 (no_reduce_set): ... this.
5436 (print_reductions): Update for rename, and add %nonassoc error action
5437 tokens to no_reduce_set so that, when printing the first remaining
5438 reduction on an error action token, the reduction is enclosed in
5440 (print_results): Update for rename.
5441 * tests/conflicts.at (Solved conflicts report for multiple reductions
5442 in a state): New test case.
5443 (%nonassoc error actions for multiple reductions in a state): New test
5446 * src/main.c (main): Don't depend on C99 features.
5448 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5450 * build-aux/.cvsignore: Add compile.
5451 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
5454 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
5456 * bootstrap (slurp): Create target directories that don't exist.
5457 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
5459 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5461 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
5463 * closure.c (closure): Likewise.
5464 * state.h (reductions): Comment sorting of rules.
5465 (state): Comment sorting of items.
5467 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
5469 Fix C++ test cases after recent Gnulib changes. Discussed starting at
5470 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
5471 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
5472 definition in order to avoid Gnulib headers since we don't use config.h
5474 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
5475 rather than AT_DATA so that config.h is included.
5477 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
5479 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
5480 instead of fprintf. Guard these functions with #if YYDEBUG instead of
5481 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
5482 and so that YYFPRINTF is guaranteed to be defined here.
5484 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5486 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
5488 (muscle_percent_define_check_values): ... this more helpful function.
5489 Again, it's not used yet, but it will be.
5490 * src/muscle_tab.h: Likewise.
5492 Improve some comments in parser table construction.
5493 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
5494 (generate_states): Don't mention ruleset, which is internal to closure.
5495 * src/closure.c (closure): Explain sorting of core and itemset, which
5496 is required for this function to behave correctly.
5497 * src/closure.h (closure): Mention sorting.
5499 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
5501 * src/lalr.c (state_lookahead_tokens_count): For code readability,
5502 move the check for disabled transitions to an aver since conflict
5503 resolution hasn't happened yet.
5505 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
5506 labels a state as inconsistent just because it has error transitions.
5507 The original form of this check appeared in revision 1.1 of lalr.c,
5508 which was committed on 1991-12-21. Now (at least), changing the
5509 consistency label on such a state appears to have no useful effect in
5510 any of the places it is examined, which I enumerate below. The key
5511 point to understanding each item in this enumeration is that a state
5512 with an error transition is labelled consistent in the first place only
5513 if it has no rules, so the check cannot matter for states that have
5514 rules. (1) Labelling a state as inconsistent will cause set_conflicts
5515 to try to identify its conflicts, and a state must have *rules* to have
5516 conflicts. (2) Labelling a state as inconsistent will affect how
5517 action_row sets the default *rule* for the state. (3) Labelling a
5518 state as inconsistent will cause build_relations to add lookback edges
5519 to *rules* in that state.
5520 * src/state.h (struct state): Word the comment for member consistent
5523 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5525 Don't depend on C99 features.
5526 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
5527 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
5528 * src/reader.c (check_and_convert_grammar): Fix for-loop.
5529 * src/state.c (state_mark_reachable_states): Fix for-loop.
5530 (state_remove_unreachable_states): Fix for-loop.
5532 Don't widen struct state with member reachable just to temporarily
5533 record reachability. Instead, use a local bitset.
5534 * src/state.h (struct state): Remove member.
5535 * src/state.c (state_new): Don't initialize it.
5536 (state_mark_reachable_states): Rename to...
5537 (state_record_reachable_states): ... this, and use bitset.
5538 (state_remove_unreachable_states): Use bitset.
5540 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
5542 * src/Makefile.am (yacc): Quote target action commands properly so
5543 that the yacc script isn't corrupt. Reported by Hans Aberg at
5544 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
5546 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
5547 the case of pure parsers. Reported by Frans Englich at
5548 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
5549 * THANKS: Add Frans Englich.
5551 * NEWS (2.3a+): In the %code entry, reference section `Bison
5552 Declaration Summary' from the manual now since the %code summary has
5554 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5555 in the rules section must be terminated by semicolons.
5557 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5559 Extend the front-end API for %define variables to more completely
5560 mirror the back-end. This will be useful in the future.
5561 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5562 Update comments to mention the new front-end counterparts of these
5564 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5565 for muscle_string_decode and muscle_location_decode.
5566 (muscle_string_decode): New static function.
5567 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5568 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5570 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5571 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5572 implementation more closely.
5573 (muscle_percent_define_invalid_value): New function.
5574 * src/muscle_tab.h (muscle_percent_define_get,
5575 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5578 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5580 * NEWS (2.3a+): Mention yesterday's state-removal change.
5581 (2.3a): Remove the %language entry, which was added after 2.3a.
5582 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5583 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5584 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5585 tests/existing.at: Update copyright date.
5587 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5589 If conflict resolution makes states unreachable, remove those states,
5590 report rules that are then unused, and don't report conflicts in those
5592 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5593 New global function.
5594 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5596 * src/main.c (main): After conflict resolution, remove the unreachable
5597 states and update all data structures that reference states by number.
5598 * src/state.c (state_new): Initialize each state's reachable member to
5600 (state_mark_reachable_states): New static function.
5601 (state_remove_unreachable_states): New global function.
5602 * src/state.h (struct state): Add member bool reachable.
5603 (state_remove_unreachable_states): Prototype.
5604 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5606 * tests/existing.at (GNU pic Grammar): Update test case output now that
5607 an unused rule is discovered.
5609 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5611 Minor code cleanup in parser table construction.
5612 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5613 (new_itemsets, save_reductions): Update for rename to nitemset.
5614 * src/closure.c (nritemset): Rename to...
5615 (nitemset): ... this since the "r" appears to meaningless and isn't
5616 used in the comments.
5617 (closure): Update for rename.
5618 * src/closure.h (nritemset): Update extern to...
5619 (nitemset): ... this.
5620 * src/lalr.c (LA): Fix a typo in comments.
5621 * src/print.c (print_core): Update for rename to nitemset.
5622 * src/print_graph.c (print_graph): Likewise.
5623 * src/state.h: Fix some typos in header comments.
5625 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5627 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5628 still sticks to ASCII. Sorry!
5630 * README-hacking: New file, taken mostly from coreutils, with changes
5631 for Bison. Contains much of the contents of:
5632 * README-cvs: Remove.
5633 * bootstrap: Sync from gnulib.
5634 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5635 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5637 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5639 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5641 (Java Differences): Fix some typos.
5642 * THANKS: Add Sebastian Setzer.
5644 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5646 * data/java.m4 (b4_single_class_if): Remove.
5647 (b4_abstract_if): Look at "%define abstract".
5649 (b4_union_name): Rename...
5650 (b4_yystype): ... to this. Map to "%define stype".
5651 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5652 b4_maybe_throws): Fix quoting.
5653 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5654 * data/lalr1.java (Lexer interface): Always define.
5655 (Lexer interface within parser class): Remove.
5656 (YYLexer class): New, used when "%code lexer" is present.
5657 (constructor): When "%code lexer" is used, pass %lex-param
5658 to the lexer constructor.
5659 (yylex, yyparse): Remove %lex-param from method invocations
5660 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5662 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5663 abstract". Rename "%define union_name" to "%define stype".
5664 Rename method names according to previous patch.
5665 (Java Scanner Interface): Describe "%code lexer" instead of
5666 "%pure-parser" and "%define single_class".
5667 (Java Differences): Mention "%code lexer".
5669 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5670 Include scanner here, using macros from tests/local.at.
5671 (AT_DATA_CALC_Y): Remove final argument.
5672 (_AT_CHECK_JAVA_CALC): Likewise.
5673 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5674 of %locations and %error-verbose.
5675 (main): Test with and without %lex-param.
5676 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5677 (AT_BISON_OPTION_POPDEFS): Pop it.
5679 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5681 DJGPP spefic issue. Inhibit the use of disallowed characters for
5682 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5683 and concern testsuite case 46.
5684 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5685 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5686 * djgpp/config.bat: Inhibit the use of disallowed characters.
5688 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5690 Miscellaneous %define and %code cleanup.
5691 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5692 values are interpreted.
5693 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5694 documentation a little more.
5695 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5696 muscle_percent_define_insert, muscle_percent_code_grow): New
5698 * src/muscle_tab.h (muscle_percent_define_insert,
5699 muscle_percent_code_grow): Prototype.
5700 * src/parse-gram.y (prologue_declaration): Use
5701 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5702 %define and %code directives.
5704 Make it easy to share %define boolean variables between the front-end
5705 and back-end. Though not used yet, this will be useful in the future.
5706 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5707 Bison uses of names rather than just skeleton uses of names.
5708 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5709 b4_percent_define_skeleton_variables(VARIABLE) to
5710 b4_percent_define_bison_variables(VARIABLE).
5711 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5712 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5713 b4_percent_code_bison_qualifiers(QUALIFIER).
5714 (b4_check_user_names_wrap): Update for renames.
5715 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5716 muscle_percent_define_default): New functions mimicking
5717 b4_percent_define_flag_if and b4_percent_define_default.
5719 For %define variables, report locations for invalid values and
5721 * data/bison.m4 (b4_percent_define_flag_if): Read
5722 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5724 (b4_percent_define_default): Save a special location in
5725 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5726 must later be reported as invalid.
5727 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5729 (muscle_percent_define_insert): Record the location of VARIABLE in
5730 muscle percent_define_loc(VARIABLE), and use it to report the previous
5731 location for a redefinition.
5732 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5733 (muscle_percent_define_default): Update like b4_percent_define_default.
5734 (muscle_grow_user_name_list): Rename to...
5735 (muscle_user_name_list_grow): ... this for consistency and use
5736 muscle_location_grow.
5737 * src/muscle_tab.h (muscle_location_grow): Prototype.
5738 * tests/input.at (%define errors): Update expected output.
5739 * tests/skeletons.at (%define boolean variables: invalid skeleton
5740 defaults): New test case.
5742 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5744 * src/print.c (lookahead_set, state_default_rule): Remove.
5745 (print_reductions): Replace state_default_rule invocation with
5746 equivalent use of yydefact, which was computed in token_actions in
5748 (print_results): Don't allocate lookahead_set.
5750 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5752 * data/lalr1.java: Prefix all private members with yy.
5754 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5756 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5757 Sebastien Fricker at
5758 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5759 * THANKS: Add Sebastien Fricker.
5760 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5761 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5762 accept a variable number of arguments.
5764 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5766 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5768 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5770 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5771 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5772 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5774 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5776 Undo my 2007-02-07 change, switching back to the c-strcase module
5777 introduced in the 2007-02-03 change. Bruno Haible reported that
5778 the 2007-02-07 change would be dangerous in Turkish if we add a
5779 language whose name contains "i", since "i" is not lowercase "I"
5781 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5782 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5783 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5784 * m4/.cvsignore: Remove strcase.m4.
5785 * src/getargs.c: Revert 2007-02-07 change, as follows.
5786 Include c-strcase.h.
5787 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5789 2007-02-11 Bruno Haible <bruno@clisp.org>
5791 Enable the Java related testsuite tests when the only Java compiler
5792 found is a gcj < 4.3. Discussed at
5793 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5794 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5796 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5798 * data/Makefile.am: Update copyright date.
5799 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5800 yypstate_new returns NULL.
5801 (yypstate_new): Return NULL if malloc does.
5802 * src/reader.c (packgram): Move translation of rule actions from the
5803 beginning of packgram to...
5804 (check_and_convert_grammar): ... here right before packgram is invoked
5805 so it's easier to write more complete comments, and remove redundant
5808 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5810 As in semantic actions, make @$ in %initial-action, %destructor, and
5811 %printer imply %locations.
5812 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5814 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5815 (@$ in %initial-action implies %locations,
5816 @$ in %destructor implies %locations,
5817 @$ in %printer implies %locations): ... these new test cases.
5819 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5821 Undo most of the 2007-02-03 change, switching to the strcase module
5822 now that gnulib strcase has been fixed.
5823 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5824 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5825 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5826 * m4/.cvsignore: Add strcase.m4.
5827 * src/getargs.c: Revert 2007-02-03 change, as follows.
5828 Don't include c-strcase.h.
5829 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5830 strcasecmp has "unspecified behavior" outside the POSIX locale,
5831 but it works fine in practice if at least one argument is ASCII,
5832 as is the case in Bison.
5834 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5836 * tests/java.at: Skip tests if only one of javac/java is present.
5837 Reported by Joel E. Denny.
5838 * tests/atlocal.in: Adjust copyright years.
5840 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5842 * data/lalr1.java (Stack): Work around old verifiers that disallow
5843 access to the private fields of an inner class, from the outer class.
5844 We can make Stack's fields public because user code doesn't have access
5845 to the instance of Stack used by parse(). Reported by Paul Eggert.
5847 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5849 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5850 the right spot for these files?
5851 * bootstrap.conf (gnulib_modules): Add c-strcase.
5852 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5854 * src/getargs.c: Include c-strcase.h.
5855 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5856 to avoid unspecified behavior.
5858 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5860 * doc/bison.texinfo (Decl Summary): Correct typo.
5862 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5864 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5865 Complain if the value does not match empty, "true" or "false".
5866 * data/c++.m4: Adjust default definitions of %define variables.
5867 * data/java.m4: Adjust default definitions of %define variables.
5868 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5870 * tests/input.at (Boolean %define variables): Test new behavior.
5872 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5874 * NEWS: Mention java.
5875 * TODO: Remove things that are done.
5876 * bootstrap.conf: Add javacomp-script and javaexec-script.
5877 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5879 * data/Makefile.am: Add new files.
5880 * data/java-skel.m4: New.
5881 * data/java.m4: New.
5882 * data/lalr1.java: New.
5884 * doc/bison.texinfo: Put "A Complete C++ Example" under
5885 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5886 under Other Languages.
5888 * src/getargs.c (valid_languages): Add Java.
5889 * src/getargs.h (struct bison_language): Update size of string fields.
5891 * tests/Makefile.am: Add java.at.
5892 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5893 * tests/java.at: New.
5894 * tests/testsuite.at: Include it.
5896 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5899 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5900 at_directive_argv arguments so these no longer have to be global
5901 variables. Also, update the implementation for the following changes.
5902 (fail_for_at_directive_too_many_args,
5903 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5904 (at_directive_name): Remove as at_directive_argv[0] will be used for
5906 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5907 for the directive name.
5908 (at_directive_argc, at_directive_argv): Make these local within
5909 skel_lex instead of global.
5910 (INITIAL): Update directive start action for above changes.
5911 (SC_AT_DIRECTIVE_ARG): Rename to...
5912 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5913 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5914 (scan_skel): Move yylex_destroy to...
5915 (skel_scanner_free): ... here.
5916 * tests/skeletons.at (installed skeleton file name): Rename to...
5917 (installed skeleton file names): ... this.
5919 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5921 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5922 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5923 Summary" not "Directives".
5924 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5925 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5926 since the former is now the more complete one.
5927 (Prologue Alternatives): Likewise and do the same for %defines.
5928 (Table of Symbols): Add summary of %code, add summary of %define, and
5929 move full %code documentation to...
5930 (Decl Summary): ... here for consistency with other entries in these
5932 Move %define entry in order to keep this list alphabetized.
5933 Reword %define entry a little to put less emphasis on the skeleton
5934 concept, which most users shouldn't have to think about.
5936 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5938 Adjust to recent gnulib changes.
5939 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5940 Add string.h, string_.h, unistd_.h, wchar_.h.
5941 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5942 * src/system.h: Don't include <stpcpy.h>; this is now done by
5945 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5947 Simplify implementation of unqualified %code, implement macros for
5948 uniform treatment of boolean %define flags. Document %define.
5949 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5950 b4_percent_code_ifdef): New.
5951 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5952 * data/c++.m4: Define default value for global_tokens_and_yystype.
5953 * data/glr.cc: Likewise.
5954 * data/location.cc: Use b4_percent_define_flag_if.
5956 * doc/bison.texinfo (Decl Summary): Document %define.
5958 * src/parse-gram.y (Unqualified %code): Change muscle name to
5960 (content.opt): Default to empty.
5962 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5964 Implement support for relative and absolute skeleton file names.
5965 Discussed starting at
5966 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5967 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5968 (Bison Options): Document in --skeleton entry.
5969 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5970 full_skeleton can't necessarily hold all of pkgdatadir.
5971 If the specified skeleton file name contains a `/', don't prepend
5973 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5974 file name contains a `/', prepend the grammar file directory.
5975 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5976 * skeletons.at: New file.
5977 (relative skeleton file names): New test case.
5978 (installed skeleton file names): New test case.
5979 * tests/testsuite.at: Include skeletons.at.
5981 * bootstrap: Update copyright to 2007.
5983 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5985 * bootstrap: Remove occurrences of .#bootmp from the files.
5987 2007-01-17 Akim Demaille <akim@epita.fr>
5989 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5991 Use per-type %printer.
5993 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5995 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5996 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5997 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5998 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5999 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6000 tests/glr-regression.at, tests/input.at, tests/local.at,
6001 tests/output.at, tests/torture.at: Update copyright to 2007.
6003 2007-01-16 Akim Demaille <akim@epita.fr>
6005 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6007 (Calc++ Scanner): Exit with failure if we can't open the input
6009 Accept "-" standing for stdin.
6010 (Calc++ Top Level): Print the result only if the parsing was
6013 2007-01-16 Akim Demaille <akim@epita.fr>
6015 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6017 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
6018 and Joel E. Denny <jdenny@ces.clemson.edu>
6020 Clean up %define and %code implementation in M4 some. Most
6021 importantly, rename all related macros to be in the b4_percent_define
6022 and b4_percent_code namespaces. Also, complete support for `.' in
6023 %define variable names and %code qualifiers.
6024 * data/bison.m4 (b4_check_user_names): Check for special
6025 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6027 (b4_get_percent_define, b4_get_percent_code): Rename to...
6028 (b4_percent_define_get, b4_percent_code_get): ... these.
6029 Extend documentation with examples.
6030 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6031 b4_percent_define_skeleton_variables and
6032 b4_percent_code_skeleton_qualifiers.
6033 Expect any value for the %define variable `foo' to be stored in the
6034 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6035 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6036 expect any unqualified %code blocks to be stored in a macro named
6037 `b4_percent_code_unqualified'.
6038 Use m4_indir so that %define variable names and %code qualifiers can
6039 contain `.', which is allowed by the grammar parser.
6040 (b4_percent_define_default): New macro to set a default value for a
6042 (m4_wrap): Update wrapped code, and fix some underquoting.
6043 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6044 Expect grammar uses of %define variables and %code qualifiers to be
6045 defined in b4_percent_define_user_variables and
6046 b4_percent_code_user_qualifiers.
6047 * data/c++.m4: Use b4_percent_define_default rather than
6048 m4_define_default. Fix some underquoting. Skeleton usage of %define
6049 variable define_location_comparison now implies skeleton usage of
6050 %define variable filename_type.
6051 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6052 data/push.c, data/yacc.c: Update macro names.
6053 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6056 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6058 DJGPP specific issues.
6060 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6061 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6063 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6065 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6066 run parsers in all tests so that Valgrind is invoked during
6067 maintainer-check-valgrind.
6068 (Duplicate representation of merged trees): Free all semantic values.
6069 (Duplicated user destructor for lookahead): Likewise.
6071 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6073 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6074 command-line prefix.
6075 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6076 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6077 miss Valgrind messages.
6078 (Exploding the Stack Size with Malloc): Likewise.
6080 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6082 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6083 locals. Reported by Juan Manuel Guerrero at
6084 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6085 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6086 Fix some indentation also.
6087 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6088 explaining this issue.
6090 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
6091 and Joel E. Denny <jdenny@ces.clemson.edu>
6093 Simplify union and prologue handling, and escape union and lex/parse
6094 params with digraphs.
6095 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
6096 values to the empty string since these are no longer guaranteed
6097 initialized by the front-end.
6098 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
6099 braces around b4_user_stype since this is no longer done by the
6101 * src/files.c, src/files.h (pre_prologue_obstack,
6102 post_prologue_obstack): Remove.
6103 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
6104 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
6105 with digraphs. This fixes lex params and parse params.
6106 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
6107 * src/output.c (prepare): Remove muscle insertion of the prologues.
6108 (output): Remove freeing of pre_prologue_obstack and
6109 post_prologue_obstack.
6110 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
6111 than prologue_augment for prologue parsing so you don't need prologue
6113 (grammar_declaration): For %union RHS, use `braceless' instead of
6114 "{...}" so that braces are already stripped and code is escaped with
6116 * src/reader.c (prologue_augment): Remove.
6117 (reader): Remove initialization of pre_prologue_obstack and
6118 post_prologue_obstack.
6119 * src/reader.h (prologue_augment): Remove.
6121 * data/c.m4: Remove stray parenthesis.
6123 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6125 Remove quotes from variables names in %define directives and from
6126 qualifiers in %code directives, and restrict the characters that are
6127 allowed in them to M4-friendly ones. For %define, continue to support
6128 the quoted form as a deprecated feature. Discussed starting at
6129 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
6130 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
6132 * doc/bison.texinfo (Prologue Alternatives): Update.
6133 (Decl Summary): In %defines entry, update mention of `%code requires'
6134 and `%code provides'.
6135 (C++ Location Values): Update %define uses.
6136 (Calc++ Parser Interface): Likewise.
6137 (Calc++ Parser): Likewise, and update `%code requires' uses.
6138 (Table of Symbols): Update %code documentation.
6139 * src/parse-gram.y (prologue_declaration): For %define variables, use
6140 `variable' instead of `STRING'.
6141 (grammar_declaration): For %code qualifiers, use `ID' instead of
6143 (variable): New nonterminal that takes an `ID' or a `STRING'.
6144 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
6146 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
6147 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
6148 (%define errors): Update %define uses.
6150 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6152 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
6153 instead of muscle_insert for %define values so that M4-special
6154 characters are replaced with digraphs.
6155 * tests/input.at (%define errors): Extend to check weird values.
6157 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6159 Instead of having skeletons declare all valid %define variables and
6160 %code qualifiers, provide macros that retrieve the associated values
6161 and build these lists automatically. Thus Bison will now warn when a
6162 variable or qualifier is not used by the skeleton in the current
6163 invocation regardless of whether it might sometimes be used by that
6164 skeleton in other invocations. Also, move all %define value macros to
6165 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
6166 form, which is replaced by %code.
6167 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
6168 (b4_check_user_names): ... this, and change the series of valid name
6169 arguments to a single list argument for names used in the skeleton
6170 similar to the existing list argument for names used in the grammar.
6171 Warn instead of complaining.
6172 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
6173 values and %code code, to format %code code properly, and to build
6174 lists of all %define variables and %code qualifiers used in the
6175 skeleton: b4_skeleton_percent_define_variables and
6176 b4_skeleton_percent_code_qualifiers.
6177 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
6179 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
6180 the skeleton names lists can finish building first. In place of
6181 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
6182 expect the lists b4_user_percent_define_variables and
6183 b4_user_percent_code_qualifiers.
6184 * data/c++.m4: Where setting default values for b4_parser_class_name,
6185 b4_location_type, b4_filename_type, b4_namespace, and
6186 b4_define_location_comparison, update their names to the
6187 b4_percent_define_ namespace.
6188 * data/glr.c: Don't use b4_check_percent_define_variables and
6189 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6190 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
6191 (b4_parser_class_name, b4_namespace): Define these using
6192 b4_get_percent_define for parser_class_name and namespace.
6193 * data/location.cc: Use b4_get_percent_define.
6194 * data/push.c: Don't use b4_check_percent_define_variables and
6195 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6196 * data/yacc.c: Likewise, and don't call m4_exit in
6197 b4_use_push_for_pull_if or m4_wrap code will never execute.
6198 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
6200 (muscle_grow_user_name_list): ... this for consistency with the
6201 terminology used in bison.m4.
6202 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
6203 %define variable names, and rename muscle used_percent_define_variables
6204 to user_percent_define_variables.
6205 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
6206 user_percent_code_qualifiers.
6208 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
6209 {CODE} form is no longer accepted.
6210 * tests/input.at (Reject bad %code qualifiers): Rename to...
6211 (Reject unused %code qualifiers): ... this, and update test output.
6212 (%define error): Update test output.
6214 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
6216 Check for unrecognized %define variables similar to checking for
6217 unrecognized %code qualifiers. Check for redefined %define variables.
6218 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
6220 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
6221 (b4_check_percent_define_variables): New, also wraps it.
6222 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
6223 variables using b4_check_percent_define_variables.
6224 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
6225 all those exercised in the test suite and all those listed in the
6226 `Default values' section of c++.m4. Are there others?
6227 * data/push.c, data/yacc.c: Declare no valid %define variables.
6228 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
6229 similar to muscle_find, but it works even when the muscle stores a
6231 (muscle_grow_used_name_list): New function for constructing the used
6232 name list muscles that b4_check_for_unrecognized_names requires.
6233 * src/parse-gram.y (prologue_declaration): Warn if a variable is
6234 %define'd more than once. Define the b4_used_percent_define_variables
6235 muscle with muscle_grow_used_name_list.
6236 (grammar_declaration): Abbreviate %code code with
6237 muscle_grow_used_name_list.
6238 * tests/input.at (%define errors): New.
6240 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6242 Provide warn_at, complain_at, and fatal_at function callbacks to the
6243 skeletons, and use this for %code qualifier complaints.
6244 * data/bison.m4 (b4_error_at): New, invoked by...
6245 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
6246 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
6247 @fatal_at(...@) directives.
6248 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
6249 qualifiers in b4_used_percent_code_qualifiers and to use
6251 * src/location.c, src/location.h (boundary_set_from_string): New global
6253 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
6255 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
6256 to b4_used_percent_code_qualifiers.
6257 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
6259 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
6260 (lineno): Rename to...
6261 (out_lineno): ... this so I don't misunderstand it again.
6262 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
6263 here; these newlines are in the input but not the output file.
6264 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
6265 (at_directive_perform): ... this new static function, and add handling
6266 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
6268 * tests/input.at (Reject bad %code qualifiers): Update test output with
6269 locations and extend.
6271 * tests/output.at (Output file name: [, Output file name: ]): Remove
6272 bogus comment about these tests failing.
6274 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6276 Clean up b4_check_percent_code_qualifiers a little.
6277 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
6278 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
6279 documentation and add examples.
6280 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
6283 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6285 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
6286 unreliable -- especially when they're hidden inside another macro.
6287 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
6288 data/c.m4: Remove m4_divert(-1).
6289 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6290 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
6291 m4_divert_push(0) and m4_divert_pop(0).
6292 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
6293 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
6294 pushed and popped by m4sugar, should be first on the stack.
6296 Provide warn, complain, and fatal function callbacks to the skeletons.
6297 This provides more flexibility than m4_fatal, improves the error
6298 message format, and captures messages for translation. Discussed
6300 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
6301 * data/bison.m4 (b4_error): New, invoked by...
6302 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
6303 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
6304 directives. Because these M4 macros might be called when the current
6305 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
6306 the previous removal of uses of m4_divert, which caused trouble.
6307 (b4_check_percent_code_qualifiers): Use b4_complain instead of
6308 m4_fatal to report unrecognized %code qualifiers.
6309 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
6310 push parser requests.
6311 * data/glr.c: Use b4_complain instead of m4_fatal to report
6312 non-deterministic push parser requests.
6313 Update @output usage to @output(...@) form.
6314 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
6315 report missing %defines. Update @output usage to @output(...@) form.
6316 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
6318 * src/main.c (main): Invoke skel_scanner_free.
6319 * src/scan-skel.h (skel_scanner_free): Prototype new function.
6320 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
6321 obstack_for_string from flex-scanner.h.
6322 (YY_DECL): Use to declare skel_lex static.
6323 (decode_at_digraphs): Remove; now handled in the new
6324 SC_AT_DIRECTIVE_ARG start condition.
6325 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
6327 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
6328 at_directive_argv): New static globals.
6329 (INITIAL): Use fail_for_invalid_at.
6330 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
6331 recognize the start of a generalized `@directive(...@)' form and
6333 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
6334 directive args (using the new obstack_for_string), to decode the
6335 contained @ diagraphs, and to perform the directive. It recognizes
6336 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
6338 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
6339 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
6341 (scan_skel): Initialize obstack_for_string on the first call.
6342 (skel_scanner_free): New function to free obstack_for_string.
6343 * tests/input.at (Reject bad %code qualifiers): Update test output.
6345 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
6347 Consolidate the 4 prologue alternative directives (%code, %requires,
6348 %provides, and %code-top) into a single %code directive with an
6349 optional qualifier field. Discussed at
6350 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
6351 * NEWS (2.3a+): Rewrite the existing entry for the prologue
6353 * doc/bison.texinfo (Prologue Alternatives): Update.
6354 (Decl Summary): Update to %code "requires" and %code "provides".
6355 (Calc++ Parser): Update to %code "requires".
6356 (Table of Symbols): Remove entries for %requires, %provides, and
6357 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
6358 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
6359 are replaced by b4_percent_code_provides and b4_percent_code_requires,
6360 which are skeleton-specific.
6361 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
6362 declare what %code qualifiers it supports and to complain if any other
6363 qualifiers were used in the grammar.
6364 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
6365 and b4_user_code([b4_percent_code_provides]) in place of
6366 b4_user_requires and b4_user_provides.
6367 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
6368 Add b4_user_code([b4_percent_code_top]) and
6369 b4_user_code([b4_percent_code]).
6370 Invoke b4_check_percent_code_qualifiers.
6371 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6372 PERCENT_REQUIRES): Remove.
6373 (grammar_declaration): Remove RHS's for %code-top, %provides, and
6374 %requires. Rewrite the %code RHS as the unqualified form defining the
6375 muscle b4_percent_code. Add another RHS for the qualified %code form,
6376 which defines muscles of the form b4_percent_code_QUALIFIER and the
6377 b4_used_percent_code_qualifiers muscle.
6378 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6379 PERCENT_REQUIRES): Remove.
6380 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
6381 %code "requires" and %code "provides".
6382 * tests/input.at (Reject bad %code qualifiers): New.
6384 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6386 Use the new code_props interface for destructors and printers.
6387 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
6388 printer_location members, and change the type of the destructor and
6389 printer members to code_props.
6390 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
6391 symbol_printer_get, semantic_type_destructor_set,
6392 semantic_type_printer_set, default_tagged_destructor_set,
6393 default_tagless_destructor_set, default_tagged_printer_set,
6394 default_tagless_printer_set): Use code_props in arguments and return
6395 types in place of char const * and location.
6396 (symbol_destructor_location_get, symbol_printer_location_get): Remove
6397 since the locations are now contained in the return of
6398 symbol_destructor_get and symbol_printer_get.
6399 * src/output.c (symbol_destructors_output, symbol_printers_output):
6401 (symbol_code_props_output): ... this to eliminate duplicate code.
6402 (output_skeleton): Update to use symbol_code_props_output.
6403 * src/reader.c (symbol_should_be_used): Update use of
6404 symbol_destructor_get.
6405 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6406 Update uses of the various _destructor_set and _printer_set functions.
6407 * src/symtab.c: (default_tagged_destructor_location,
6408 default_tagless_destructor_location, default_tagged_printer_location,
6409 default_tagless_printer_location): Remove since we...
6410 (default_tagged_destructor, default_tagless_destructor,
6411 default_tagged_printer, default_tagless_printer): ... change the type
6412 of these to code_props.
6413 (symbol_new, semantic_type_new, symbol_destructor_set,
6414 semantic_type_destructor_set, symbol_destructor_get,
6415 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
6416 symbol_check_alias_consistency, default_tagged_destructor_set,
6417 default_tagless_destructor_set, default_tagged_printer_set,
6418 default_tagless_printer_set): Update.
6419 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
6420 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
6422 (symbol_print): Use SYMBOL_CODE_PRINT.
6424 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6426 Use the new code_props interface for rule actions.
6427 * src/symlist.h (symbol_list): Replace action, action_location, and
6428 used members with a code_props action_props member.
6429 * src/reader.c (symbol_should_be_used, grammar_rule_check,
6430 grammar_midrule_action, grammar_current_rule_merge_set,
6431 grammar_current_rule_symbol_append, packgram): Update.
6432 * src/scan-code.h (translate_rule_action): Remove, no longer used.
6433 * src/scan-code.l (handle_action_dollar): Update.
6434 (translate_rule_action): Remove, no longer used.
6435 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
6437 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6439 Use the new code_props interface in parse-gram.y.
6440 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
6441 Update all uses of translate_* functions to use the new code_props
6442 interface and to use gram_scanner_last_string_free and
6443 code_scanner_last_string_free where possible.
6444 (grammar_declaration): symbol_list_destructor_set and
6445 symbol_list_printer_set now perform the translation, so don't do it
6446 here. Use gram_scanner_last_string_free where possible.
6447 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
6448 translate_code): Remove, no longer used.
6449 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
6450 symbol_list_printer_set): Perform code translation here rather than
6451 depending on the caller to do so.
6453 * src/symlist.h (struct symbol_list): Correct some documentation typos.
6454 * src/scan-gram.h (gram_last_string): Remove declaration.
6455 * src/scan-gram.l (last_string): Declare it static.
6457 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6459 Encapsulate code properties and related functionality for the various
6460 destructors, printers, and actions into a code_props structure and
6461 interface. This patch merely implements code_props in scan-code.h and
6462 scan-code.l. Future patches will rewrite other modules to use it.
6463 Discussed starting at
6464 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
6465 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
6466 consistently initialize const structs that have an empty location
6468 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
6469 to ensure consistency.
6470 * src/scan-code.h (code_props): New structure.
6471 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
6472 function, macro, and const global variable for initializing a
6473 code_props with no code.
6474 (code_props_plain_init, code_props_symbol_action_init,
6475 code_props_rule_action_init, code_props_translate_code): The rest of
6476 the new code_props functional interface. Among other things, the init
6477 functions set the code_props kind field so that
6478 code_props_translate_code will know whether to behave like
6479 translate_symbol_action, translate_rule_action, or translate_code.
6480 These old translate functions must remain until all other modules are
6481 updated to use the new code_props interface.
6482 (code_scanner_last_string_free): New function similar to
6483 gram_scanner_last_string_free.
6484 (code_scanner_free): Add documentation.
6485 * src/scan-code.l: Implement the new interface.
6486 (code_lex): Make it static, add a code_props* argument, and remove the
6488 (last_string): New static global similar to the one in scan-gram.l.
6489 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
6491 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
6492 code_props since Bison may one day use this information for destructors
6494 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
6495 (handle_action_dollar): Use symbol_list_n_get and set used flag
6496 directly since symbol_list_n_used_set is removed.
6497 (translate_action): Add a code_props* argument and remove the rule,
6498 action, and location arguments. Pass the code_props* on to code_lex.
6499 (translate_rule_action, translate_symbol_action, translate_code):
6500 Rewrite as wrappers around the new code_props interface.
6501 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
6502 it would eventually need to break the encapsulation of code_props.
6504 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6506 * etc/.cvsignore: New.
6508 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6510 Add maintainer-push-check to run maintainer-check using push parsing in
6511 place of pull parsing where available.
6512 * Makefile.am (maintainer-push-check): New.
6513 * data/bison.m4 (b4_use_push_for_pull_if): New.
6514 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
6515 appropriately based on their existing values.
6516 (yypush_parse): Don't print push-parser-specific diagnostics if push
6517 parsing is being used in place of pull parsing.
6518 * data/yacc.c: If push parsing should replace pull parsing, redirect to
6520 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
6521 variable, and insert b4_use_push_for_pull_flag into muscles.
6522 * tests/Makefile.am (maintainer-push-check): New.
6524 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6526 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
6527 (whether successful or failed) so that yypush_parse can be invoked
6528 again to start a new parse using the same yypstate.
6529 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
6530 check multiple yypull_parse invocations on the same yypstate. For pull
6531 mode, extend to check multiple yyparse invocations.
6532 (Exploding the Stack Size with Alloca): Extend to try with
6534 (Exploding the Stack Size with Malloc): Likewise.
6536 * tests/calc.at (Simple LALR Calculator): Don't specify
6537 %skeleton "push.c" since %push-pull-parser implies that now.
6538 * tests/headers.at (export YYLTYPE): Don't check for the push
6539 declarations. Otherwise, this test case can't be used to see if push
6540 mode can truly emulate pull mode.
6541 * tests/input.at (Torturing the Scanner): Likewise.
6542 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
6543 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
6544 AT_YACC_IF, which now includes the case of push mode since %skeleton
6545 need not be used for push mode. This will be more intuitive once
6546 push.c is renamed to yacc.c.
6548 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6550 For push mode, convert yyparse from a macro to a function, invoke yylex
6551 instead of passing a yylexp argument to yypull_parse, and don't
6552 generate yypull_parse or yyparse unless %push-pull-parser is declared.
6553 Discussed starting at
6554 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6555 * data/bison.m4 (b4_pull_if): New.
6556 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6557 * data/push.c: Improve M4 quoting a little.
6558 (b4_generate_macro_args, b4_parenthesize): Remove.
6559 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6560 any time a pull parser is requested.
6561 Don't #define this as a wrapper around yypull_parse. Instead, when
6562 both push and pull are requested, make it a function that does that
6564 (yypull_parse): If there's a b4_prefix, #define this to
6565 b4_prefix[pull_parse] when both push and pull are requested.
6566 Don't define this as a function unless both push and pull are
6568 Remove the yylexp argument and hard-code yylex invocation instead.
6569 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6571 * src/getargs.c (pull_parser): New global initialized to true.
6572 * getargs.h (pull_parser): extern it.
6573 * src/output.c (prepare): Insert pull_flag muscle.
6574 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6575 (prologue_declaration): Set both push_parser and pull_parser = true for
6576 %push-pull-parser. Set push_parser = true and pull_parser = false for
6578 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6579 %push-parser since there's no backward-compatibility concern here.
6580 Scan %push-pull-parser.
6581 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6582 instead of %push-parser.
6583 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6584 prototype it in the module that calls yyparse.
6585 * tests/input.at (Torturing the Scanner): Likewise.
6586 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6588 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6590 Update etc/bench.pl. Optimize push mode a little (the yyn change
6591 deserves most of the credit).
6592 * Makefile.am (SUBDIRS): Add etc subdirectory.
6593 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6594 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6595 yytoken, yyval, and yyloc declarations to...
6596 (yyparse or yypush_parse): ... here to improve performance. For
6597 yypush_parse invocations after the first, be sure to assign yyn its old
6599 (yypstate_new): Don't bother initializing the yyresult field since the
6600 initial value isn't used.
6601 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6602 remove the #define that, in push mode, set it to yyps->NAME.
6603 * etc/Makefile.am: New.
6604 * etc/bench.pl: Remove and build it instead from...
6605 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6606 "tests/bison" from the build directory by default rather than just
6607 invoking "bison" from $PATH.
6608 (calc_grammar): Update push parser code: don't declare yylval globally,
6609 don't define yyparse_wrapper, and don't #define yyparse.
6610 (bench_grammar): Update to check all working combinations of yacc.c,
6611 push.c, impure, pure, pull, and push.
6613 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6615 For push mode, add pull wrappers around yypush_parse.
6616 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6617 (yypull_parse): New function wrapping yypush_parse.
6618 (yyparse): New #define wrapping yypull_parse.
6619 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6621 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6622 prototype yylex in the module that calls yyparse, and don't prototype
6623 yyparse there. Otherwise, the yyparse expansion won't compile.
6624 * tests/input.at (Torturing the Scanner): Likewise.
6626 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6628 Enable push parsers to operate in impure mode. Thus, %push-parser no
6629 longer implies %pure-parser. The point of this change is to move
6630 towards being able to test the push parser code by running the entire
6631 test suite as if %push-parser had been declared.
6632 * data/push.c (yypush_parse): For impure mode, remove the
6633 yypushed_char, yypushed_val, and yypushed_loc arguments.
6634 Instead, declare these as local variables initialized to the global
6635 yychar, yylval, and yylloc.
6636 For the first yypush_parse invocation only, restore the initial values
6637 of these global variables when it's time to read a token since they
6638 have been overwritten.
6639 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6641 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6642 %pure-parser along with %push-parser since this test case was designed
6643 for pure push parsers.
6644 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6645 (AT_YACC_OR_PUSH_IF): New.
6646 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6647 add a note that it's still wrong for some cases (as it has been for a
6649 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6650 %push-parser no longer implies %pure-parser.
6652 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6654 Remove some unnecessary differences between the pull parser code and
6655 the push parser code. This patch enables yynerrs in push mode.
6656 * data/push.c: Reformat M4 a little.
6657 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6658 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6659 because push mode is on. Instead, if pure mode is on, move yynerrs
6661 (b4_declare_parser_state_variables): ... here.
6662 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6663 to yyps->NAME so it can be used in yypush_parse.
6664 (yypush_parse): Don't omit uses of yynerrs in push mode.
6666 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6668 Fix bug such that the first pushed token's value and location are
6669 sometimes overwritten (sometimes by %initial-action) before being used.
6670 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6671 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6672 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6673 more closely mimic the pull parser logic.
6674 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6675 time to read a token, which is after any initialization of yylval and
6677 (gottoken): Rename label to...
6678 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6681 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6683 Rearrange initialization of the parser state variables so that the
6684 skeleton doesn't have to have a copy for pull mode and another for push
6685 mode. This patch also fixes at least a bug such that yylloc was not
6686 initialized (with b4_location_initial_line and
6687 b4_location_initial_column) upon calling yypush_parse. However, that
6688 initialization now overwrites the first token's location;
6689 %initial-action assigning @$ already did the same thing, and both bugs
6690 will be fixed in a later patch.
6691 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6692 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6693 yyss, yyvs, yyls, and yystacksize.
6694 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6695 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6697 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6698 yyps->NAME so it can be used in yypush_parse.
6699 (yyparse or yypush_parse): For yypush_parse, don't print the
6700 "Starting parse" diagnostic for invocations after the first.
6701 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6702 yypush_parse, only do it for the first invocation.
6703 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6704 initialization to occur in yypush_parse but only on the first
6707 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6709 * data/push.c: Add CPP guards around push parser declarations in both
6710 the header and the code file.
6711 In the code file, move the push parser declarations to the same place
6712 they appear in the header file.
6713 Clean up the M4 some, especially the inconsistent underquoting in
6714 some b4_c_function_def and b4_c_function_decl uses.
6716 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6718 Encapsulate the push parser state variables into an M4 macro so the
6719 push skeleton doesn't have to list them again for pull mode's yyparse.
6720 For push mode, remove yypush_parse's local equivalents of these
6721 variables to eliminate unnecessary copying between the two sets at
6722 run-time. This patch also fixes at least a bug related to multiple
6723 %initial-action invocations in push mode.
6724 * data/push.c (b4_declare_parser_variables): Rename to...
6725 (b4_declare_scanner_communication_variables): ... this for clarity and
6727 (b4_declare_yyparse_variables): Remove and move its contents to the one
6728 spot where it was invoked.
6729 (b4_declare_parser_state_variables): New macro containing the parser
6730 state variables required by push mode.
6731 (struct yypstate): Replace all fields but yynew with
6732 b4_declare_parser_state_variables.
6733 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6734 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6735 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6736 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6737 parser state variable declarations with
6738 b4_declare_parser_state_variables.
6739 Don't initialize parser state variables when calling yypush_parse since
6740 yypstate_new already does that.
6741 Invoke the user's initial action only upon the first yypush_parse
6743 Remove all code that copies between the local parser state variables
6746 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6748 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6749 prevent a name collision in a future patch where these names will
6750 sometimes be #define'd.
6751 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6752 since it no longer has the same name as the existing argument.
6753 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6755 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6756 and Joel E. Denny <jdenny@ces.clemson.edu>
6758 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6759 that the argument is case-insensitive, and there's no `=' here.
6760 For the %skeleton entry, mention that %language is better.
6761 (Bison Options): Likewise for --language and --skeleton. Move the
6762 --skeleton entry so that the `Tuning the parser' section is sorted
6763 alphabetically on long options.
6764 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6765 %language directive in detail here; cross-reference the %language
6766 documentation instead.
6767 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6768 `%require "2.3b"' so that the example is always up-to-date.
6769 (Table of Symbols): Add entries for %language and %skeleton.
6770 * examples/extexi (normalize): Instead of replacing every %require
6771 argument with the current Bison version, just substitute for
6772 `@value{VERSION}'. This guarantees that we're testing what actually
6773 appears in the documentation.
6774 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6775 rather than `@VERSION@'.
6777 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6779 * NEWS: Reword the %language news a bit, and put it earlier.
6781 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6782 Rewrite to simplify the logic.
6783 (language_argmatch): Likewise.
6784 (program_name): We now own this var.
6785 * src/getargs.h (struct bison_language): Use char[] rather than
6788 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6790 * src/complain.c (program_name): Remove decl; no longer needed.
6791 * src/main.c (program_name): Remove; now belongs to getargs.
6793 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6795 * NEWS: Document %language.
6797 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6799 * data/c-skel.m4, data/c++-skel.m4: New files.
6800 * data/glr.c: Complain on push parsers.
6802 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6804 (Decl Summary): Document %language and %skeleton.
6805 (Command line): Document -L.
6807 * examples/extexi: Rewrite %require directive.
6808 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6810 * src/files.c (compute_exts_from_gc): Look in language structure
6812 (compute_file_name_parts): Check whether .tab should be added.
6813 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6814 (language, skeleton_arg, language_argmatch): New.
6815 (long_options): Add --language.
6816 (getargs): Use skeleton_arg, add -L/--language.
6817 * src/getargs.h: Include location.h.
6818 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6819 * src/output.c (prepare): Pick default skeleton from struct language.
6820 Don't dispatch C skeletons here.
6821 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6822 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6823 * src/scan-gram.l ("%language"): New rule.
6825 * tests/calc.at: Test %skeleton and %language.
6826 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6827 (AT_GLR_IF): Look for %skeleton "glr.cc".
6828 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6829 (AT_YACC_IF): Reject %language.
6831 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6833 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6834 since it wasn't used; only the typedef name 'semantic_type' is needed.
6835 Also, omit trailing white space.
6837 * bootstrap: Sync from coreutils.
6838 (gnulib_extra_files): Add build-aux/announce.gen.
6839 (slurp): Adjust .gitignore files like .cvsignore files.
6840 * build-aux/announce-gen: Remove from CVS, since bootstrap
6843 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6845 Make %push-parser imply %pure-parser. This fixes several bugs; see
6846 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6847 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6849 * data/push.c: Don't bother testing b4_push_if when deciding whether
6850 to expand b4_declare_parser_variables globally.
6851 (yypush_parse): Likewise in here.
6853 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6854 (yy_reduce_print): Reformat M4 for readability.
6856 2006-12-15 Bob Rossi <bob@brasko.net>
6857 and Joel Denny <jdenny@ces.clemson.edu>
6859 * data/push.c (yypstate): Add typedef, and update all uses of
6860 struct yypstate to just yypstate.
6861 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6863 2006-12-14 Bob Rossi <bob@brasko.net>
6865 * data/push.c (yypush_parse): Declare prototype regardless of
6868 2006-12-14 Bob Rossi <bob@brasko.net>
6870 * data/push.c (yyparse): Remove the prototype and the #define when in
6873 2006-12-13 Bob Rossi <bob@brasko.net>
6875 * data/push.c (yypstate_init): Rename to...
6876 (yypstate_new): ... this and use b4_c_function_def.
6877 (yypstate_delete): New.
6878 (yypush_parse): Change parameters yynval and yynlloc to be const.
6879 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6880 yypstate_delete functions.
6882 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6884 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6885 strange test case titles. Reported by Bob Rossi.
6887 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6889 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6890 of potential ambiguities in GLR grammers.
6892 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6894 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6895 `bison ', use m4_index instead of m4_substr since chopping up a string
6896 containing M4-special characters causes problems here.
6898 Fix a couple of bugs related to special characters in user-specified
6899 file names, and make it easier for skeletons to compute output file
6900 names with the same file name prefix as Bison-computed output file
6902 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6903 b4_parser_file_name and b4_spec_defines_file instead of
6904 @output_parser_name@ and @output_header_name@, which are now redundant.
6905 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6906 b4_parser_file_name, b4_spec_defines_file, and the new
6907 @basename(FILENAME@) instead of @output_parser_name@ and
6908 @output_header_name@, which inappropriately escaped the file names as
6910 * src/files.c (all_but_ext): Remove static qualifier.
6911 (compute_output_file_names): Move `free (all_but_ext)' to...
6912 (output_file_names_free): ... here since all_but_ext is needed later.
6913 * src/files.h (all_but_ext): Extern.
6914 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6915 exactly what MUSCLE_INSERT_STRING used to do.
6916 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6917 characters are escaped properly.
6918 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6920 For pkgdatadir muscle, maintain previous functionality by using
6921 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6922 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6923 digraphs would never be expanded. Hopefully no one has M4-special
6924 characters in his Bison installation path.
6925 * src/scan-skel.l: Don't parse @output_header_name@ and
6926 @output_parser_name@ anymore since they're now redundant.
6927 In @output, use decode_at_digraphs.
6928 Parse a new @basename command that invokes last_component.
6929 (decode_at_digraphs): New.
6930 (BASE_QPUTS): Remove unused.
6931 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6932 (Output file name): New tests.
6934 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6936 Warn about output files that are generated by the skeletons and that
6937 conflict with other output files.
6938 * data/glr.c: Don't generate the header file here when glr.cc does.
6939 * src/files.c (file_names, file_names_count): New static globals.
6940 (compute_output_file_names): Invoke output_file_name_check for files
6941 not generated by the skeletons and remove existing checks.
6942 (output_file_name_check): New function that warns about conflicting
6944 (output_file_names_free): Free file_names.
6945 * src/files.h (output_file_name_check): Declare.
6946 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6948 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6949 (Conflicting output files): New tests.
6951 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6953 * doc/bison.texinfo: Fix a couple of typos.
6955 2006-12-08 Bob Rossi <bob@brasko.net>
6957 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6959 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6961 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6962 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6964 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6965 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6967 2006-12-07 Bob Rossi <bob@brasko.net>
6968 and Joel Denny <jdenny@ces.clemson.edu>
6970 * data/push.c (yypvarsinit): Change return type from void* to struct
6971 yypvars*. No longer cast to void* on return.
6972 (struct yypvars): Remove yylen since it need not be remembered between
6973 yypushparse invocations.
6974 (yypushparse): Don't copy between yylen and pv->yylen.
6976 2006-12-05 Bob Rossi <bob@brasko.net>
6978 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6979 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6980 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6981 (struct yypvars): Remove b4_declare_parser_variables.
6982 (yypvarsinit): Remove init code for removed variables.
6983 (global scope): Do not declare b4_declare_parser_variables if
6985 (yypushparse): Add b4_declare_parser_variables.
6986 Init new local variables, and remove init code for removed
6989 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6990 and yyparse for other modes.
6991 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6992 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6993 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6994 (AT_PURE_LEX_IF): True if pure or push parser.
6996 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6998 Document Yacc prologue alternatives and default %destructor's and
6999 %printer's as experimental. Don't mention Java yet. Discussed at
7000 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7001 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7002 (2.3a): Annotate this entry to say the old forms of these features were
7004 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
7005 Table of Symbols): Say they're experimental. Comment out any mention
7006 of Java (we'll want this back eventually).
7008 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7010 Support a file name argument to %defines. Deprecate `=' in
7011 %file-prefix, %name-prefix, and %output. Discussed at
7012 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7013 * NEWS (2.3a+): Mention.
7014 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
7015 form of %defines, and remove `=' from entries for %file-prefix,
7016 %name-prefix, and %output.
7017 * src/parse-gram.y (prologue_declaration): Implement.
7018 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7019 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7020 all but one occurrence of %name-prefix.
7021 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7022 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7023 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7024 occurrence of each of %file-prefix and %output. Add check for %defines
7026 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7027 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7028 Remove the `=' from %output.
7030 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7032 Don't escape $ in test case titles since Autoconf 2.61 now does that
7034 * tests/actions.at (Default %printer and %destructor are not for error
7035 or $undefined): Here.
7036 (Default %printer and %destructor are not for $accept): Here.
7037 * tests/input.at (Invalid $n and @n): Here.
7039 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7041 Rename <!> to <>. Discussed starting at
7042 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7043 * NEWS (2.3a+): Update.
7044 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
7046 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7047 * src/scan-gram.l (INITIAL): Implement.
7048 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7049 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7051 * tests/actions.at (Default tagless %printer and %destructor,
7052 Default tagged and per-type %printer and %destructor,
7053 Default %printer and %destructor are not for error or $undefined,
7054 Default %printer and %destructor are not for $accept,
7055 Default %printer and %destructor for mid-rule values): Update.
7056 * tests/input.at (Default %printer and %destructor redeclared,
7057 Unused values with default %destructor): Update.
7059 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7061 Don't let %prec take a nonterminal.
7062 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7064 * tests/input.at (%prec takes a token): New test checking that %prec
7065 won't take a nonterminal.
7067 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7069 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7070 it was double-quoted.
7071 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7072 grammar is maintained with Bison's highest standards.
7073 * src/getargs.c: Fix some typos in Doxygen comments.
7075 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7077 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7078 later. Reported by Paul Eggert in
7079 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7080 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7081 * src/scan-code.l (translate_action): Don't bother invoking
7082 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7083 (code_scanner_free): Instead of invoking
7084 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7086 * src/scan-gram.l (gram_scanner_free): Likewise.
7087 * src/scan-skel.l (scan_skel): Likewise.
7089 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
7091 * src/files.c (tr): Change return type to void.
7092 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
7093 has been called previously for the same key.
7094 (muscle_find): Return storage instead of value so that
7095 --enable-gcc-warnings doesn't produce warnings that the return discards
7096 const. aver that the value and storage are the same since storage
7097 could potentially be NULL when value is not.
7098 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
7101 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7103 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
7104 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
7105 us a slightly cleaner distribution, and also works.
7106 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
7109 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
7110 and Paul Eggert <eggert@cs.ucla.edu>
7112 Don't let Bison leak memory except when it complains.
7113 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
7114 (spec_defines_file, dir_prefix): Now char *, not const char *,
7115 since they are freed.
7116 * src/files.c: Likewise.
7117 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
7119 (tr): Now operates in-place. All uses changed.
7120 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
7122 (compute_file_name_parts, compute_output_file_names): Don't store
7123 read-only data in variables that will be freed.
7124 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
7125 src_extension, and header_extension.
7126 (output_file_names_free): New public function to free
7127 spec_verbose_file, spec_graph_file, spec_defines_file,
7128 parser_file_name, and dir_prefix.
7129 * src/getargs.c (getargs): Don't store read-only data in variables that
7131 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
7132 (which previously existed but was unused), and quotearg_free.
7133 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
7134 * src/muscle_tab.c: Likewise.
7135 (muscle_entry): Make the value char const *,
7136 and add a new storage member that is char * and can be freed.
7137 (muscle_entry_free): New private function.
7138 (muscle_init): Use it instead of free.
7139 (muscle_insert, muscle_grow): Update and use new storage member.
7140 (muscle_code_grow): Free the string passed to muscle_grow
7141 since it's not needed anymore.
7142 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
7143 add a new `char *code' member.
7144 ("{...}"): Declare semantic type as code.
7145 * src/scan-code.h (translate_rule_action):
7146 (translate_symbol_action, translate_code, translate_action): Return
7147 `char const *' rather than `char *' since external code should not free
7149 * src/scan-code.l: Likewise.
7150 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
7151 which is "{...}" in the parser.
7152 * tests/Makefile.am (maintainer-check-valgrind): Set
7153 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
7155 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
7157 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
7158 expecting a non-zero exit status sets --leak-check=summary and
7159 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
7160 this case, and we don't want to hear about it.
7162 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7164 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
7165 instead of from the template, to simplify configuration a bit.
7166 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
7167 and m4/wint_t.m4, as they are needed with the latest gnulib.
7169 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7171 Disable unset/unused mid-rule value warnings by default, and recognize
7172 --warnings=midrule-values to enable them. Discussed starting at
7173 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
7174 * NEWS (2.3a+): Mention.
7175 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
7176 warnings): Add entry for midrule-values subargument.
7177 * src/reader.c (symbol_should_be_used): Don't return true just because
7178 the value is a set/used mid-rule value unless
7179 --warnings=midrule-values was specified.
7180 * tests/input.at (Unused values, Unused values before symbol
7181 declarations): Run tests with and without --warnings=midrule-values.
7183 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
7184 than LIST_FREE directly.
7186 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7188 Finish implementing --warnings=error, which should not be implied by
7189 --warnings=all (or by its synonyms -W and --warnings without
7191 * src/complain.c (set_warning_issued): New function to report that
7192 warnings are being treated as errors and to record an error if so.
7194 (warn_at, warn): ... here.
7195 * src/getargs.c (warnings_args, warnings_types): Reorder so that
7196 "error - warnings are errors" does not appear above "all - all of the
7198 (getargs): For -W and --warnings without subarguments, don't let
7199 FLAGS_ARGMATCH set warnings_error in warnings_flag.
7200 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
7202 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7204 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
7205 empty subargument list. For example: `bison --warnings= parser.y'.
7207 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7209 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
7210 the parser header file so that gcc doesn't warn.
7212 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7214 Split the default %destructor/%printer into two kinds: <*> and <!>.
7215 Discussed starting at
7216 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
7217 * NEWS (2.3a+): Mention.
7218 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
7219 previous change today related to mid-rules.
7220 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
7221 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
7222 (TYPE_TAG_ANY): Add as <*>.
7223 (TYPE_TAG_NONE): Add as <!>.
7224 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
7226 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
7227 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
7228 * src/symlist.c (symbol_list_default_new): Split into tagged and
7230 (symbol_list_destructor_set, symbol_list_printer_set): Split
7231 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
7232 SYMLIST_DEFAULT_TAGLESS.
7233 * src/symlist.h: Update symbol_list_default*_new prototypes.
7234 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
7235 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
7236 * src/symtab.c (default_destructor, default_destructor_location,
7237 default_printer, default_printer_location): Split each into tagged and
7239 (symbol_destructor_get, symbol_destructor_location_get,
7240 symbol_printer_get, symbol_printer_location_get): Implement tagged
7241 default and tagless default cases.
7242 (default_destructor_set, default_printer_set): Split each into tagged
7243 and tagless versions.
7244 * src/symtab.h: Update prototypes.
7245 * tests/actions.at (Default %printer and %destructor): Rename to...
7246 (Default tagless %printer and %destructor): ... this, and extend.
7247 (Per-type %printer and %destructor): Rename to...
7248 (Default tagged and per-type %printer and %destructor): ... this, and
7250 (Default %printer and %destructor for user-defined end token): Extend.
7251 (Default %printer and %destructor are not for error or $undefined):
7253 (Default %printer and %destructor are not for $accept): Update.
7254 (Default %printer and %destructor for mid-rule values): Extend.
7255 * tests/input.at (Default %printer and %destructor redeclared): Extend.
7256 (Unused values with default %destructor): Extend.
7258 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7260 Don't apply the default %destructor/%printer to an unreferenced midrule
7262 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
7263 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
7264 like $@n instead of just @n so that the default %destructor/%printer
7265 logic doesn't see them as user-defined symbols.
7266 (symbol_is_dummy): Check for both forms of the name.
7267 * src/reader.c (packgram): Remove the `$' from each midrule symbol
7268 name for which the midrule value is referenced in any action.
7269 * tests/actions.at (Default %printer and %destructor for mid-rule
7271 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
7272 for change to dummy symbol names.
7274 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7276 Warn about unset midrule $$ if the corresponding $n is used.
7277 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
7279 (packgram): Before invoking grammar_rule_check on any rule, make sure
7280 all actions have already been scanned in order to set `used' flags.
7281 Otherwise, checking that a midrule's $$ is set will not always work
7282 properly because the midrule check must forward-reference the midrule's
7284 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
7287 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7289 More improvements to the documentation of the prologue alternatives:
7290 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
7292 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
7293 some text to clarify the relative importance of the new directives and
7294 to show how these directives may be viewed as code labels.
7296 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
7298 Similar to the recently removed %before-header, add %code-top as the
7299 alternative to the pre-prologue. Mentioned at
7300 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
7301 Also, let the prologue alternatives appear in the grammar section.
7302 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
7303 (prologue_declaration): Move the existing prologue alternatives to...
7304 (grammar_declaration): ... here and add %code-top.
7305 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
7307 Clean up and extend documentation for the prologue alternatives.
7308 * NEWS (2.3a+): Describe prologue alternatives.
7309 * doc/bison.texinfo (Prologue): Move discussion of prologue
7311 (Prologue Alternatives): ... this new section, and extend it to discuss
7312 all 4 directives in detail.
7313 (Table of Symbols): Clean up discussion of prologue alternatives and
7316 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7318 DJGPP specific issues.
7320 * djgpp/config.bat: config.hin has been moved to lib. Adjust
7321 config.bat accordingly.
7322 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
7323 * djgpp/config.site: Likewise.
7325 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
7327 Replace %*-header with %provides, %requires, %code. See discussion at
7328 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
7330 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
7331 (b4_user_start_header): Remove.
7332 * data/glr.c: Use new macros instead of b4_*start_header
7334 * data/glr.cc: Likewise.
7335 * data/lalr1.cc: Likewise.
7336 * data/push.c: Likewise.
7337 * data/yacc.c: Likewise.
7339 * doc/bison.texinfo: Remove %before-header, rename
7340 %{start,end,after}-header to %requires, %provides, %code.
7342 * src/parse-gram.y: Likewise (also rename token names accordingly).
7343 * src/scan-gram.l: Likewise.
7344 * tests/actions.at: Likewise.
7346 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
7348 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
7349 Problem reported by Joel E. Denny.
7351 2006-10-14 Jim Meyering <jim@meyering.net>
7353 (Sync from coreutils.)
7354 Work also when the working directory (with e.g. coreutils sources)
7355 is version controlled with git, rather than CVS.
7356 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
7358 In messages and comments, say e.g., "checked-out sources",
7359 rather than "CVS sources".
7360 (version_controlled_file): New function. Work for git as well as
7361 for CVS. Don't use grep's -q option.
7362 (slurp): Call it here, in place of CVS-specific code.
7364 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
7366 Fix testsuite for ./configure --enable-gcc-warnings:
7367 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
7368 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
7369 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
7370 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
7371 * test/regression.at (Diagnostic that expects two alternatives):
7374 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7376 * bootstrap.conf (gnulib_modules): Add config-h.
7377 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
7378 worry about HAVE_CONFIG_H.
7379 * lib/abitset.c: Likewise.
7380 * lib/bitset.c: Likewise.
7381 * lib/bitset_stats.c: Likewise.
7382 * lib/bitsetv-print.c: Likewise.
7383 * lib/bitsetv.c: Likewise.
7384 * lib/ebitset.c: Likewise.
7385 * lib/get-errno.c: Likewise.
7386 * lib/lbitset.c: Likewise.
7387 * lib/subpipe.c: Likewise.
7388 * lib/timevar.c: Likewise.
7389 * lib/vbitset.c: Likewise.
7390 * lib/bitset.c: Include "bitset.h" first, to test interface.
7391 * lib/bitset_stats.c: Include "bitset_stats.h" first.
7392 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
7393 * lib/bitsetv.c: Include "bitsetv.h" first.
7394 * lib/get-errno.c: Include "get-errno.h" first.
7395 * m4/.cvsignore: Add config-h.m4.
7396 * tests/actions.at (Default %printer and %destructor for ...):
7397 Adjust expected line numbers in output to reflect removal of #if
7398 HAVE_CONFIG_H lines.
7399 * tests/glr-regression.at (Missed %merge type warnings when ...):
7401 * tests/regression.at (Braced code in declaration in rules section):
7403 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
7404 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
7405 Include <config.h> unconditionally.
7407 * bootstrap: Sync from coreutils, as follows:
7409 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7411 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
7412 variable was sometimes used without being initialized. This
7413 messed up the installation of the INSTALL file in some cases.
7415 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7417 * bootstrap (usage, main program, symlink_to_gnulib): Add option
7418 --copy. Inspired by a suggestion from Bruno Haible.
7420 2006-10-03 Jim Meyering <jim@meyering.net>
7422 * bootstrap: Undo last change to this file, since now gnulib-tool
7423 sticks with the automake default in generating dependencies.
7425 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7427 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
7428 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
7430 * doc/bison.1: Add copyright notice.
7432 * data/glr.c: Don't include <stdarg.h>; not used.
7434 * NEWS: The -g and --graph options now output graphs in Graphviz
7435 DOT format, not VCG format.
7436 * doc/bison.1: Likewise.
7437 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
7438 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
7440 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
7441 * TODO: Remove Graphviz entry.
7442 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
7443 remove vcg.c, vcg.h, vcg_defaults.h.
7444 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
7445 * src/graphviz.c, src/graphviz.h: New files.
7446 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
7447 * src/files.h: Make comment more generic.
7448 * src/main.c (main): Likewise.
7449 * src/print_graph.h: Likewise.
7450 * src/getargs.c (usage): Make usage description more generic.
7451 * src/print_graph.c: Include graphviz.h rather than vcg.h.
7452 (static_graph, fgraph): Remove. All uses changed to pass
7453 arguments instead of sharing a static var.
7454 (print_core, print_actions, print_state, print_graph):
7455 Output graphviz format rather than VCG format.
7456 * tests/.cvsignore: Remove *.vcg; add *.dot.
7457 * tests/output.at: Expect *.dot files, not *.vcg files.
7459 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
7460 accommodates the 2006-10-08 change.
7462 2006-10-11 Bob Rossi <bob@brasko.net>
7464 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
7465 (b4_yyssa, b4_yyerror_range): New macros.
7466 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
7467 (yypvarsinit): Remove init of removed fields.
7468 (yypushparse): Remove use of removed fields; use new macros instead.
7470 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7472 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
7473 in a push parser. Reindent slightly to match yacc.c better.
7475 2006-10-11 Bob Rossi <bob@brasko.net>
7477 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
7479 (yypvarsinit, yypushparse): Remove init of removed fields.
7480 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
7482 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7484 * THANKS: Add Paolo Bonzini and Bob Rossi.
7486 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
7488 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
7489 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
7490 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
7491 b4_define_user_cde and uses): Remove.
7492 (b4_comment, b4_prefix, b4_sync_start): New.
7493 * data/bison.m4: New file, with most of the content removed from c.m4.
7494 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
7495 * src/output.c (output_skeleton): Pass bison.m4.
7496 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
7499 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
7501 Fix test failure reported by Tom Lane in
7502 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
7503 and try to make such failures easier to catch in the future.
7504 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
7505 that's now the caller's responsibility.
7506 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
7507 Set yychar = YYEOF if it's negative.
7508 * tests/actions.at (yylex): Abort if asked to read past EOF.
7509 * tests/conflicts.at (yylex): Likewise.
7510 * tests/cxx-type.at (yylex): Likewise.
7511 * tests/glr-regression.at (yylex): Likewise.
7512 * tests/input.at (yylex): Likewise.
7513 * tests/regression.at (yylex): Likewise.
7514 * tests/torture.at (yylex): Likewise.
7516 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
7518 Fix problems with translating English-language diagnostics.
7519 * bootstrap: Fix bug introduced in recent bootstrap changes, with
7520 respect to bison-runtime pot generation. The YY_ stuff
7521 wasn't being captured.
7522 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
7523 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
7524 * runtime-po/POTFILES.in: Add data/push.c.
7526 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
7528 Merge bootstrap changes from coreutils.
7530 2006-09-28 Jim Meyering <jim@meyering.net>
7532 Automatically generated dependencies are important even
7533 when all of the sources in a directory come from gnulib.
7534 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
7535 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
7537 2006-09-23 Jim Meyering <jim@meyering.net>
7539 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
7541 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7543 * bootstrap: Add support for --force.
7544 (usage): New function. Describe usage less tersely.
7545 (CVS_only_file): New var.
7547 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
7549 * data/push.c (YYPUSH_MORE): Make it an enum instead.
7550 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
7551 Adjust white space and comments to match GNU style better.
7553 2006-09-20 Bob Rossi <bob@brasko.net>
7555 * data/push.c (yyresult_get): Remove function.
7556 (YYPUSH_MORE): Add #define.
7557 (yypushparse): Modify return value.
7559 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7561 * stamp-h.in: Remove; no longer needed.
7562 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7563 Remove config.h, config.hin, intl (no longer created).
7564 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7567 Sync bootstrap from coreutils, as follows:
7569 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7571 * bootstrap (symlink_to_gnulib): New function.
7572 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7573 to copies-of-gnulib.
7574 (cp_mark_as_generated, slurp, gnulib_files):
7575 Avoid making a copy if it's the same as the old version.
7576 (gnulib_files): Add support for this variable (used by Bison).
7578 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7580 * src/getargs.c (usage): Rework to use conventions similar to
7581 coreutils, to make translation a bit easier and the code a bit
7582 smaller. Problem reported by Tim Van Holder.
7584 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7586 Use some of gnulib's new modules, taken from coreutils.
7588 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7589 * bootstrap.conf: New file.
7590 (gnulib_modules): Add configmake, inttypes, unistd.
7591 (XGETTEXT_OPTIONS): Add complain, complain_at,
7592 fatal, fatal_at, warn, warn_at, unexpected_end.
7593 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7594 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7596 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7598 (GNULIB_AUTOCONF_SNIPPET): Remove.
7599 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7601 * lib/.cvsignore: Add inttypes_.h.
7602 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7603 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7604 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7605 no-longer-necessary initializations.
7606 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7607 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7608 use the unistd module.
7609 * src/system.h: Likewise.
7610 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7611 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7612 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7613 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7614 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7615 * src/system.h: Include inttypes.h unconditionally, now that we
7616 use the inttypes module. Don't bother to include stdint.h, since
7617 inttypes.h now does that for us.
7618 (LOCALEDIR): Remove, now that we use the configmake module.
7619 * src/getargs.c: Include configmake.h.
7620 * src/main.c: Likewise.
7621 * src/output.c: Likewise.
7622 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7623 not from $abs_top_builddir, since config.h moved.
7626 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7627 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7629 * src/parse-gram.y (symbol_declaration): Don't put statements
7630 before declarations; it's not portable to C89.
7631 * src/scan-code.l (handle_action_at): Likewise.
7633 * src/scan-code.l: Always initialize braces_level; the old code
7634 left it uninitialized and therefore had undefined behavior.
7636 Don't attempt to redefine 'assert', since it runs afoul of
7637 systems where standard headers (mistakenly) include <assert.h>.
7638 Instead, define and use our own alternative, called 'aver'.
7639 * src/reader.c: Don't include assert.h, since we no longer
7641 * src/scan-code.l: Likewise.
7642 * src/system.h (assert): Remove, replacing with....
7643 (aver): New function, taking a bool arg. All uses changed.
7644 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7645 not merely an integer.
7647 2006-09-15 Bob Rossi <bob@brasko.net>
7649 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7650 * data/c.m4 (YYPUSH): New.
7651 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7652 * src/getargs.c (push_parser): New var.
7653 * src/getargs.h (push_parser): New declaration.
7654 * src/output.c (prepare): Add macro insertion of `push_flag'.
7655 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7656 (prologue_declaration): Parse %push-parser.
7657 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7658 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7659 list of removed lines from the traces observed.
7660 (AT_CHECK_CALC_LALR): Added push parser tests.
7662 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7664 * NEWS: Version 2.3a.
7665 * configure.ac (AC_INIT): Likewise.
7667 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7668 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7669 due to header ordering dependencies. I don't know why the #define
7672 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7673 runtime cost when YYDEBUG is not defined, and so that some tests
7674 that used to fail now work. Problem and initial suggestion by
7676 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7677 * data/glr.cc (b4_parser_class_name):
7678 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7679 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7680 (yydebug_) [YYDEBUG]: New member.
7681 (yycdebug_): Now defined only if YYDEBUG.
7682 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7683 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7684 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7686 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7687 Define only if YYDEBUG.
7688 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7690 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7691 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7692 AT_CHECK_CALC_GLR_CC that are working now.
7694 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7696 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7697 We don't need them in glr.cc, and glr.c defines them.
7698 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7699 assumes that defining it to anything is the same as defining
7700 it to 1. Problem reported by Paolo Bonzini.
7702 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7704 * data/c.m4 (b4_null, b4_case): Define.
7705 * src/output.c (prepare_symbols): Use b4_null.
7706 (user_actions_output): Use b4_case.
7708 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7710 * data/glr.c (b4_shared_declarations): Put start-header first,
7711 before any #includes that we generate, so that feature-test
7712 macros work. Problem reported by Michael Deutschmann in
7713 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7714 * data/lalr1.cc: Likewise.
7715 * doc/bison.texinfo (Prologue): Document that feature-test macros
7716 should be defined before any Bison declarations.
7717 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7718 that depend on location.hh after, not before, Bison decls, since
7719 we now include location.hh after the first user prologue.
7721 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7722 Sander Brandenburg in
7723 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7724 Also, fix minor white space and comment issues.
7725 (Prologue): Mention that it's better to define feature-test macros
7726 before Bison declarations. Problem reported by Michael Deutschmann.
7728 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7730 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7731 This adjusts to recent gnulib changes.
7733 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7735 Finish implementation of per-type %destructor/%printer. Discussed
7737 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7739 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7740 * NEWS (2.3+): Add a description of this feature to the default
7741 %destructor/%printer description.
7742 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7743 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7744 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7745 list node contains a semantic type.
7746 * src/symtab.c, src/symtab.h: Extend with a table that associates
7747 semantic types with their %destructor's and %printer's.
7748 (semantic_type_from_uniqstr, semantic_type_get,
7749 semantic_type_destructor_set, semantic_type_printer_set): New functions
7750 composing the public interface of that table.
7751 (symbol_destructor_get, symbol_destructor_location_get,
7752 symbol_printer_get, symbol_printer_location_get): If there's no
7753 per-symbol %destructor/%printer, look up the per-type before trying
7755 * tests/actions.at (Per-type %printer and %destructor): New test case.
7756 * tests/input.at (Default %printer and %destructor redeclared):
7757 Extend to check that multiple occurrences of %symbol-default in a
7758 single %destructor/%printer declaration is an error.
7759 (Per-type %printer and %destructor redeclared, Unused values with
7760 per-type %destructor): New test cases.
7762 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7764 Require default %destructor/%printer to be declared using
7765 %symbol-default instead of an empty symbol list, and start working on
7766 new per-type %destructor/%printer. Discussed at
7767 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7768 * NEWS (2.3+): Add %symbol-default to example.
7769 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7770 (Table of Symbols): Add entry for %symbol-default.
7771 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7772 (generic_symlist, generic_symlist_item): New nonterminals for creating
7773 a list in which each item is a symbol, semantic type, or
7775 (grammar_declaration): Use generic_symlist in %destructor and %printer
7776 declarations instead of symbols.1 or an empty list.
7777 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7778 for changes to symbol_list.
7779 * src/reader.c: Update for changes to symbol_list.
7780 * src/scan-code.l: Likewise.
7781 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7782 * src/symlist.c, src/symlist.h: Extend such that a list node may
7783 represent a semantic type or a %symbol-default in addition to just an
7784 ordinary symbol. Add switched functions for setting %destructor's and
7786 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7787 %destructor/%printer declarations.
7789 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7791 Whether the default %destructor/%printer applies to a particular symbol
7792 isn't a question of whether the user *declares* that symbol (in %token,
7793 for example). It's a question of whether the user by any means
7794 *defines* the symbol at all (by simply using a char token, for
7795 example). $end is defined by Bison whereas any other token with token
7796 number 0 is defined by the user. The error token is always defined by
7797 Bison regardless of whether the user declares it with %token, but we
7798 may one day let the user define error as a nonterminal instead.
7799 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7800 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7801 the meaning of "user-defined".
7802 * tests/actions.at (Default %printer and %destructor for user-declared
7803 end token): Rename to...
7804 (Default %printer and %destructor for user-defined end token): ...
7807 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7808 computation of whether to apply the default, don't maintain a list of
7809 every Bison-defined symbol. Instead, just check for a first character
7810 of '$', which a user symbol cannot have, and check for the error token.
7812 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7814 Don't apply the default %destructor or %printer to the error token,
7815 $undefined, or $accept. This change fits the general rule that the
7816 default %destructor and %printer are only for user-declared symbols,
7817 and it solves several difficulties that are described in the new test
7819 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7820 * tests/actions.at (Default %printer and %destructor are not for error
7821 or $undefined, Default %printer and %destructor are not for $accept):
7824 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7826 Allow %start after the first rule.
7827 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7828 when parsing the first rule.
7829 (check_and_convert_grammar): Search for it here after all grammar
7830 declarations have been parsed. Skip midrules, which have dummy LHS
7832 * src/symtab.c (symbol_is_dummy): New function.
7833 * src/symtab.h (symbol_is_dummy): Declare it.
7834 * tests/input.at (%start after first rule): New test.
7836 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7838 Redo some of the previous commit: add back the ability to use
7839 non-aliased/undeclared string literals since it might be useful to
7840 those declaring %token-table.
7841 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7842 commit: don't worry about complaints from symbols_pack.
7843 * src/symtab.c (symbol_new, symbol_class_set,
7844 symbol_check_alias_consistency): Undo changes in previous commit: count
7845 each string literal as a new symbol and token, assign it a symbol
7846 number, and don't complain about non-aliased string literals.
7847 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7848 and token counts but does still set aliased tokens to the same number,
7849 symbol_pack_processor now leaves empty slots in the symbols array.
7851 * tests/regression.at (Undeclared string literal): Remove test case
7852 added in previous commit since non-aliased string literals are allowed
7854 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7855 remove unnecessary string literal declarations.
7856 * tests/sets.at (Firsts): Likewise.
7858 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7860 Don't allow an undeclared string literal, but allow a string literal to
7861 be used before its declaration.
7862 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7863 symbols_pack complained.
7864 * src/symtab.c (symbol_new): Don't count a string literal as a new
7866 (symbol_class_set): Don't count a string literal as a new token, and
7867 don't assign it a symbol number since symbol_make_alias does that.
7868 (symbol_make_alias): It's not necessary to decrement the symbol and
7869 token counts anymore. Don't assume that an alias declaration occurs
7870 before any uses of the identifier or string, and thus don't assert that
7871 one of them has the highest symbol number so far.
7872 (symbol_check_alias_consistency): Complain if there's a string literal
7873 that wasn't declared as an alias.
7874 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7875 symbol_pack asserts that every token has been assigned a symbol number
7876 although undeclared string literals have not.
7877 * tests/regression.at (String alias declared after use, Undeclared
7878 string literal): New test cases.
7879 (Characters Escapes, Web2c Actions): Declare string literals as
7881 * tests/sets.at (Firsts): Likewise.
7883 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7885 In the grammar scanner, STRING_FINISH unclosed constructs and return
7886 them to the parser in order to improve error messages.
7887 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7888 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7889 * tests/input.at (Unclosed constructs): New test case.
7890 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7893 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7896 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7898 Handle string aliases for character tokens correctly.
7899 * src/symtab.c (symbol_user_token_number_set): If the token has an
7900 alias, check and set its alias's user token number instead of its own,
7901 which is set to indicate the alias. Previously, every occurrence of
7902 the character token in the grammar overwrote that alias indicator with
7904 * tests/input.at (String aliases for character tokens): New test.
7906 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7908 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7910 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7912 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7913 to prevent failures when building on older platforms.
7914 Check for autopoint failure.
7915 Set XGETTEXT_OPTIONS to values that check for C format strings,
7916 so that translators are warned about them (this also helps
7917 prevent core dumps).
7919 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7920 function, since it simplifies our code a bit.
7922 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7923 rather than -W, so we don't get bogus warnings about sign comparisons.
7924 Add -Wpointer-arith, since that warning is useful (it reports code
7925 that does not conform to C89 and that some compilers reject).
7926 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7927 since it's no longer needed.
7929 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7931 Clean up scanners a bit.
7932 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7933 definitions so gcc won't warn when obstack_for_string is unused.
7934 * src/scan-code.l: config.h and system.h are already #include'd by
7935 scan-code-c.c, so get rid of them here.
7936 * src/scan-gram.l: Likewise.
7937 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7938 definitions rather than duplicating the rest of it.
7939 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7941 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7943 Suppress signed/unsigned comparison warnings for yycheck.
7944 * data/c.m4 (b4_safest_int_type): New macro.
7945 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7946 a signed int type, cast it to b4_safest_int_type first.
7947 * data/yacc.c: Likewise.
7948 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7951 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7953 * doc/bison.texinfo: Fix some typos.
7955 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7957 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7958 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7960 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7961 the latest gnulib does this a different way.
7962 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7963 translation was patched, so stop omitting it.
7965 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7967 Enable declaration of default %printer/%destructor. Make the parser
7968 use these for all user-declared grammar symbols for which the user does
7969 not declare a specific %printer/%destructor. Thus, the parser uses it
7970 for token 0 if the user declares it but not if Bison generates it as
7971 $end. Discussed starting at
7972 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7973 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7975 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7976 * NEWS (2.3+): Mention.
7977 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7978 declare a %destructor for a mid-rule's semantic value. It's just
7979 impossible to declare one specific to it.
7980 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7981 code. Describe default %destructor form.
7982 * src/parse-gram.y (grammar_declaration): Parse default
7983 %printer/%destructor declarations.
7984 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7985 and symbol_destructor_location_get rather than accessing the destructor
7986 and destructor_location members of struct symbol.
7987 (symbol_printers_output): Likewise but for %printer's.
7988 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7990 * src/symtab.c (default_destructor, default_destructor_location,
7991 default_printer, default_printer_location): New static global
7992 variables to record the default %destructor and %printer.
7993 (symbol_destructor_get, symbol_destructor_location_get,
7994 symbol_printer_get, symbol_printer_location_get): New functions to
7995 compute the appropriate %destructor and %printer for a symbol.
7996 (default_destructor_set, default_printer_set): New functions to set the
7997 default %destructor and %printer.
7998 * src/symtab.h: Prototype all those new functions.
7999 * tests/actions.at (Default %printer and %destructor): New test to
8000 check that the right %printer and %destructor are called, that they're
8001 not called for $end, and that $$ and @$ work correctly.
8002 (Default %printer and %destructor for user-declared end token): New
8003 test to check that the default %printer and %destructor are called for
8004 a user-declared end token.
8005 * tests/input.at (Default %printer and %destructor redeclared, Unused
8006 values with default %destructor): New tests to check related grammar
8007 warnings and errors.
8009 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8011 Clean up handling of %destructor for the end token (token 0).
8012 Discussed starting at
8013 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8015 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8017 Make the skeletons consistent in how they pop the end token and invoke
8019 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8020 state, which has token number 0, since this would invoke the
8021 %destructor for the end token.
8022 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8023 until after shifting the end token, or else it won't be popped.
8024 * data/yacc.c (yyparse): Likewise.
8026 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8027 it's the end token. Upon termination, destroy an unshifted lookahead
8028 even when it's the end token.
8029 * data/lalr1.cc (yy::parser::parse): Likewise.
8030 * data/yacc.c (yyparse): Likewise.
8032 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8033 value warnings for the end token when the user gives the end token a
8036 * tests/actions.at (Printers and Destructors): Test all the above.
8038 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8040 Update to latest gnulib and gettext versions.
8041 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8043 (gnulib_files): Add m4/warning.m4. Don't worry about files
8044 overwritten by autopoint.
8045 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8046 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8048 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8049 so that we can remove the intl files at a better time.
8050 (intl_files_to_remove): Remove aclocal.m4, since it gets
8051 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8052 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8053 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8054 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8055 Remove datarootdir hack; no longer needed.
8056 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8057 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8058 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8060 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8061 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8063 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8065 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8066 it with --assume-autoconf='latest-stable'.
8068 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8070 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8071 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8073 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8074 those from muscle_tab.c since the old ones are misleading.
8076 2006-07-13 Akim Demaille <akim@epita.fr>
8078 Support %define "KEY" {VALUE}.
8079 * src/scan-code.h, src/scan-code.l (translate_action)
8080 (translate_rule_action, translate_symbol_action, translate_code):
8081 Return char *, not const char *.
8082 * src/parse-gram.y (declaration): Rename as...
8083 (prologue_declaration): this.
8084 (string_content): Remove this nonterminal, use STRING.
8085 (braceless, content, content.opt): New nonterminal.
8087 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
8089 * src/scan-gram.l (getargs.h): Don't include it.
8091 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
8093 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
8094 rather than a for-loop that declares a local bool variable. This
8095 should work around a compatibility problem with a Cray x1e C++
8096 compiler reported by Hung Nguyen in
8097 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
8098 The for-loop was introduced in the 2004-11-17 change but I don't
8099 know why it was needed.
8101 2006-07-12 Akim Demaille <akim@epita.fr>
8103 * data/c.m4: Comment changes.
8105 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
8107 * src/complain.c (error_message, ERROR_MESSAGE): New.
8109 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
8110 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
8112 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8114 * NEWS: Instead of %union, you can define and use your own union type
8115 YYSTYPE if your grammar contains at least one <type> tag.
8116 Your YYSTYPE need not be a macro; it can be a typedef.
8117 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
8118 (Union Decl, Decl Summary): Document this.
8119 * data/glr.c (YYSTYPE): Implement this.
8120 * data/glr.cc (YYSTYPE): Likewise.
8121 * data/lalr1.cc (YYSTYPE): Likewise.
8122 * data/yacc.c (YYSTYPE): Likewise.
8123 * src/output.c (prepare): Output tag_seen_flag.
8124 * src/parse-gram.y (declaration, grammar_declaration):
8125 Use 'union_seen' rather than 'typed' to determine whether
8126 %union has been seen, since grammars can now be typed without
8128 (symbol_declaration, type.opt, symbol_def):
8129 Keep track of whether a tag has been seen.
8130 * src/reader.c (union_seen, tag_seen): New vars.
8132 * src/reader.h (union_seen, tag_seen, typed): Likewise.
8133 * src/scan-code.l (untyped_var_seen): New variable.
8134 (handle_action_dollar): Adjust to above changes.
8135 (handle_action_dollar, handle_action_at):
8136 Improve overflow checking for outlandish numbers.
8137 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
8138 avoid new diagnostics generated by above changes.
8139 * tests/regression.at (YYSTYPE typedef): Add test to check
8140 for type tags without %union.
8142 * src/symlist.c (symbol_list_length): Return int, not unsigned
8143 int, since callers expect int. This may need to get revisited
8144 once we have proper integer overflow checking.
8146 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
8147 object is now static.
8149 * src/getargs.c (flags_argmatch): Return void, not int,
8150 to pacify ./configure --enable-gcc-warnings.
8152 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
8153 since last_string is already defined to FLEX_PREFIX (last_string).
8155 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8157 Implement --warnings/-W.
8158 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
8160 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
8162 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
8163 (warnings_args, warnings_types): New.
8164 (getargs, short_options, long_options): Accept -W/--warnings.
8165 Sort the options by alphabetical order, upper case letter right
8166 before its lower case.
8168 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
8170 Change %merge result type clash warnings to errors. Discussed at
8171 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
8172 * src/reader.c (record_merge_function_type): Use complain_at.
8173 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8174 declared later): Update test case results.
8176 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
8178 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
8179 to be in alphabetical order.
8180 (trace_args): Spelling fixes.
8182 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8184 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
8185 so they don't collide with user-defined macros.
8186 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
8187 this was never guaranteed, and now that we're using gnulib stdint,
8188 which defines int_fast16_t to long int, the problem is exposed.
8190 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
8192 * data/c.m4 (b4_basename): Simplify a bit, since we don't
8193 need the full POSIX semantics (and weren't implementing them
8196 Adjust to Autoconf 2.60 and today's gnulib.
8197 * bootstrap (gnulib_modules): Add stdint.
8198 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
8199 no longer copies it.
8200 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
8201 since stdint needs the former and wcwidth (which is now required
8202 by mbswidth) needs the latter.
8203 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
8204 work around a compatibility glitch between gettext 0.14.6 and
8206 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
8207 Do not check for uintptr_t, since new stdint module does the right
8209 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
8210 Add stdint.h, stdint_.h, wcwidth.h.
8211 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
8212 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
8213 stdint.m4, wchar_t.m4, wcwidth.m4.
8214 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
8215 usual order for ../lib/*.h files.
8216 (file_name_split): Use last_component, not base_name, to adjust
8218 * src/parse-gram.h: Include <strverscmp.h> in the usual order
8219 for ../lib/*.h files.
8220 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
8221 Define unconditionally, since we now assume the stdint module.
8222 * src/scan-skel.l: Include <dirname.h>.
8223 (BASE_QPUTS): Use last_component, not base_name.
8224 * src/system.h: Include <unlocked-io.h> in the usual order
8225 for ../lib/*.h files. Include <stdint.h> unconditionally,
8226 since we now use the stdint module.
8227 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
8228 HAVE_UINTPTR_T, since we now use the stdint module.
8229 (base_name): Remove decl, since files now include <dirname.h>
8232 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8234 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
8236 * data/yacc.c, data/glr.c, data/location.cc: Use them.
8237 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
8239 * tests/calc.at: Adjust.
8241 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
8243 * data/c.m4 (b4_basename): New.
8244 (b4_syncline): Also output the location of its invocation (from
8246 (b4_user_action, b4_define_user_action, b4_user_actions)
8247 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
8248 (b4_user_stype): New.
8249 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
8251 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8253 In the grammar file, the first column is 1 not 0 on the first line as
8254 on every other line.
8255 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
8256 * tests/input.at (Torturing the Scanner): Update output.
8258 * src/scan-gram.l (scanner_cursor): Declare it static.
8260 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8262 In warnings, say "previous declaration" rather than "first
8264 * src/symtab.c (redeclaration): Do that here.
8265 * src/reader.c (record_merge_function_type): In the case of a result
8266 type clash, report the previous declaration rather than the very first
8267 one in the grammar file.
8268 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8269 declared later): Add a third declaration to check this behavior.
8270 * tests/input.at (Incompatible Aliases): Update output.
8272 2006-06-27 Akim Demaille <akim@epita.fr>
8274 * doc/Doxyfile.in: New.
8275 * doc/Makefile.am: Use it.
8276 * src/lalr.h, src/symtab.h: Initial doxygenation.
8278 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8280 Don't miss %merge result type warnings just because the LHS types are
8281 declared after the %merge. This continues the effort of the previous
8283 * src/reader.c (get_merge_function): Don't set the merger type yet.
8284 (record_merge_function_type): New function for setting the merger type
8285 and checking for clashes.
8286 (grammar_current_rule_merge_set): Set the location of the %merge for
8288 (packgram): Invoke record_merge_function_type for each rule now that
8289 all symbol type declarations have been parsed.
8290 * src/reader.h (merger_list.type_declaration_location): New member
8291 storing the location of the first %merge from which the type for this
8292 merging function was derived.
8293 * src/symlist.h (symbol_list.merger_declaration_location): New member
8294 storing the location of a rule's %merge, if any.
8295 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8296 declared later): New test to catch the error fixed by the above patch.
8298 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8300 Get action warnings (grammar_rule_check) right even when symbol
8301 declarations appear after the rules. Discussed at
8302 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
8304 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
8305 Don't mistake the type of $$ in a midrule to be that of its parent
8307 * src/reader.c (grammar_current_rule_end): Don't invoke
8308 grammar_rule_check yet since not all symbol declarations may have been
8310 (grammar_midrule_action): Likewise.
8311 Don't record whether the midrule's $$ has been used yet since actions
8312 haven't been translated yet.
8313 Record the midrule's parent rule and its RHS index within the parent
8315 (grammar_current_rule_action_append): Don't translate the action yet
8316 since not all symbol declarations may have been parsed yet and, thus,
8317 warnings about types for $$, $n, @$, and @n can't be reported yet.
8318 (packgram): Translate the action and invoke grammar_rule_check now that
8319 all symbol declarations have been parsed.
8320 * src/scan-code.l (handle_action_dollar): Now that this is invoked
8321 after parsing the entire grammar file, the symbol list here in the case
8322 of a midrule is actually the midrule's empty RHS, so reference its
8323 parent rule's RHS where necessary.
8324 On the other hand, now that you can already know it's a midrule, you
8325 aren't forced to think $$ has the same type as its parent rule's $$.
8326 (handle_action_at): In the case of a midrule, reference the parent rule
8328 * src/symlist.c (symbol_list_new): Initialize new midrule-related
8330 (symbol_list_length): Now that this is invoked after all rules have
8331 been parsed, a NULL symbol (rather than a NULL symbol list node)
8332 terminates a rule. symbol_list_print already does this correctly.
8333 * src/symlist.h (symbol_list.midrule_parent_rule,
8334 symbol_list.midrule_parent_rhs_index): New members so that midrules can
8335 remember their relationships with their parents.
8336 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
8337 fixed by the above patch.
8338 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
8340 (Unused values): ... this old test case and...
8341 (Unused values before symbol declarations): ... this new test case.
8342 This one is the same as `Unused values' except that all symbol
8343 declarations appear after the rules in order to catch the rest of the
8344 errors fixed by the above patch.
8346 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8349 * src/reader.c (current_rule): Declare it static since it's no longer
8350 used outside this file.
8351 (grammar_current_rule_action_append): Remove redundant arguments from
8352 translate_rule_action invocation.
8353 * src/reader.h (current_rule): Remove this unused extern.
8354 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
8355 * src/scan-code.l (translate_rule_action): Likewise.
8357 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
8359 Clean up yesterday's patch.
8360 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
8362 * src/reader.c (grammar_current_rule_action_append): ... here for
8363 consistency with grammar_current_rule_symbol_append.
8364 * tests/regression.at (Braced code in declaration in rules section):
8365 Make yyerror and yylex static as usual.
8367 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
8369 Fix bug that mistakes braced code in a declaration in the rules section
8370 to be a rule action. Mentioned at
8371 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
8372 * src/scan-gram.l: Move midrule action detection from the start of the
8373 scanning of any braced code to...
8374 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
8375 action. For readability, use $2 and @2 rather than the equivalent
8377 * tests/regression.at (Braced code in declaration in rules section):
8378 New test to catch the error fixed by the above patch.
8380 Work on code readability some.
8381 * src/scan-code.l (current_rule): Get rid of this misleading and
8382 redundant declaration: it's actually extern'ed in reader.h.
8383 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
8384 translate_action): Add a rule argument and use it instead of the global
8386 (translate_rule_action): This already receives current_rule through an
8387 argument, so pass it on to translate_action instead of assigning
8388 current_rule to current_rule.
8389 (translate_symbol_action, translate_code): Pass rule = NULL to
8392 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
8394 Rename %before-definitions to %start-header and %after-definitions to
8395 %end-header. Don't use these declarations to separate pre-prologue
8396 blocks from post-prologue blocks. Add new order-independent
8397 declarations %before-header and %after-header as alternatives to the
8398 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
8399 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
8400 * NEWS (2.3+): Update for these changes.
8401 * data/glr.c (b4_before_definitions): Update to...
8402 (b4_start_header): ... this.
8403 (b4_after_definitions): Update to...
8404 (b4_end_header): ... this.
8405 * data/glr.cc: Likewise.
8406 * data/lalr1.cc: Likewise.
8407 * data/yacc.c: Likewise.
8408 * doc/bison.texinfo (The prologue): Update names, and replace remaining
8409 prologue blocks with %*-header declarations.
8410 (Calc++ Parser): Likewise.
8411 (Decl Summary): Update names.
8412 (Table of Symbols): Update description.
8413 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
8414 (PERCENT_END_HEADER): ... this.
8415 (PERCENT_BEFORE_DEFINITIONS): Update to...
8416 (PERCENT_START_HEADER): ... this.
8417 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8418 (declaration): Update token names and m4 macro names.
8419 When parsing %end-header and %start-header, invoke translate_code
8420 before muscle_code_grow, and no longer set global booleans to remember
8421 whether these declarations have been seen.
8422 Parse new %after-header and %before-header.
8423 * src/reader.c (before_definitions, after_definitions): Remove.
8424 (prologue_augment): Accept a new bool argument to specify whether to
8425 augment the pre-prologue or post-prologue.
8426 * src/reader.h (before_definitions, after_definitions): Remove these
8428 (prologue_augment): Add new bool argument.
8429 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
8430 (PERCENT_END_HEADER): ... this.
8431 (PERCENT_BEFORE_DEFINITIONS): Update to...
8432 (PERCENT_START_HEADER): ... this.
8433 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8434 * tests/actions.at (Printers and Destructors): Update names.
8436 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
8438 Add comparison operators for C++ location classes. Discussed at
8439 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
8440 * data/c++.m4 (b4_define_location_comparison): New boolean %define
8441 declaration indicating whether filename_type has an operator==. If
8442 filename_type is `std::string', it defaults to `1', `0' otherwise.
8443 * data/location.cc: Iff b4_define_location_comparison is `1', add
8444 operator== and operator!= for class position and for class location.
8447 * src/scan-action.l: Remove unused file.
8448 * src/symtab.c (symbol_printer_set): Use printer_location not
8449 destructor_location.
8450 * src/symtab.h (struct symbol): Replace incorrect source comment for
8452 * tests/input.at (Incompatible Aliases): Update output with correct
8455 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
8457 Don't put the pre-prologue in the header file. For the yacc.c code
8458 file and the glr.c header and code files, move the pre-prologue before
8459 the token definitions. Add new %before-definitions and
8460 %after-definitions to declare code that will go in both the header file
8461 and code file. Discussed at
8462 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
8463 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
8465 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
8466 * NEWS (2.3+): Describe these changes.
8467 * data/glr.c (b4_pre_prologue): Move from within to before...
8468 (b4_shared_declarations): ... this.
8469 Add new b4_before_definitions before b4_token_enums.
8470 Add new b4_after_definitions at the end.
8471 * data/glr.cc (b4_pre_prologue): Replace with...
8472 (b4_before_definitions): ... this in the header file.
8473 (b4_after_definitions): New near the end of the header file.
8474 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
8475 code file right before including the header file.
8476 (b4_before_definitions): New in the previous position of
8477 b4_pre_prologue in the header file.
8478 (b4_after_definitions): New near the end of the header file.
8479 * data/yacc.c: Clean up some m4 quoting especially in the header file.
8480 (b4_token_enums_defines): In the code file, move to right before
8481 YYSTYPE for consistency with the header file.
8482 (b4_before_definitions): New right before b4_token_enums_defines in
8483 both the header and code file.
8484 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
8485 header and code file.
8486 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
8487 of prologues for %union dependencies.
8488 (Decl Summary): In %defines description, mention the effect of
8489 %before-definitions and %after-definitions on the header file.
8490 (Calc++ Parser): Forward declare driver in a %before-definitions rather
8491 than in the pre-prologue so that make check succeeds.
8492 (Table of Symbols): Add entries for %before-definitions and
8494 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
8495 %before-definitions.
8496 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
8497 (declaration): Parse those declarations and append to
8498 b4_before_definitions and b4_after_definitions, respectively.
8499 * src/reader.c (before_definitions, after_definitions): New bools to
8500 track whether those declarations have been seen.
8501 (prologue_augment): Add to the post-prologue if %union,
8502 %before-definitions, or %after-definitions has been seen.
8503 * src/reader.h (before_definitions, after_definitions): New extern's.
8504 * src/scan-gram.l: Scan the new declarations.
8505 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
8506 prologue block in a %before-definitions or a %after-definitions based
8507 on whether the %union is declared.
8508 * tests/regression.at (Early token definitions with --yacc, Early token
8509 definitions without --yacc): Move tests for token definitions into the
8510 post-prologue since token names are no longer defined in the
8513 2006-06-20 Akim Demaille <akim@epita.fr>
8515 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
8516 (symbol_get): Use it.
8517 * src/parse-gram.y: Use it.
8519 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
8521 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
8522 build succeeds when configured with --enable-gcc-warnings.
8524 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
8526 * src/parse-gram.y (char_name): New function.
8527 (CHAR, STRING, string_content): For %printer, properly escape.
8528 (ID): Prefer fputs to fprintf.
8529 (id): Reindent to be consistent with other rules.
8530 Properly quote char.
8532 The Translation Project changed its way of publishing translations
8533 to maintainers. I haven't received any responses to my request
8534 for supporting the old way, or for documenting the new way. I
8535 have modified 'bootstrap' to use screen scraping
8536 (in this case, HTML scraping). This is unreliable and inelegant,
8537 but I don't see any better way. Yuck.
8538 * bootstrap (TP_URL, WGET_COMMAND): New vars.
8539 (get_translations): New function, which uses HTML scraping to
8540 deduce locations of latest translations.
8541 Use this function to grab both bison and bison-runtime .po files.
8542 Don't bother priming the pump for the runtime-po domain any more,
8543 as it's now translated better than bison is.
8545 2006-06-19 Akim Demaille <akim@epita.fr>
8547 * src/scan-gram.l: No longer "parse" things after `%union' until
8548 `{'. Rather, return a single "%union" token.
8549 No longer make symbols: return strings, and leave the conversion
8550 to symbols to the parser.
8551 (SC_PRE_CODE, token_type): Remove.
8552 * src/parse-gram.y (%union): New field `character'.
8555 (ID, ID_COLON): Now that the scanner no longer makes them
8556 identifiers, adjust all uses to invoke symbol_get.
8557 (id_colon): New, wraps the conversion from string to symbol.
8558 (%union): Accept a possible union_name.
8559 (symbol): Now can be a char.
8560 * data/c.m4 (b4_union_name): Leave a default value.
8561 * data/glr.c, data/yacc.c: Use it.
8563 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8565 For associating token numbers with token names for "yacc.c", don't use
8566 #define statements unless `--yacc' is specified; always use enum
8567 yytokentype. Most important discussions start at:
8568 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8569 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8571 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8572 * NEWS (2.3+): Mention.
8573 * data/c.m4 (b4_yacc_if): New.
8574 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8576 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8577 on token name definitions.
8578 * src/getargs.c (usage): Capitalize `Yacc' in English.
8579 * src/output.c (prepare): Define b4_yacc_flag.
8580 * tests/regression.at (Early token definitions): Test that tokens names
8581 are defined before the pre-prologue not just before the post-prologue.
8582 Remove this test case and copy to...
8583 (Early token definitions with --yacc): ... this to test #define's.
8584 (Early token definitions without --yacc): ... and this to test enums.
8586 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8588 * NEWS: Reword the post-2.3 change to not be so optimistic about
8589 removing the old "look-ahead" spelling.
8590 Update previous look-ahead/lookahead change reports.
8591 * REFERENCES: look-ahead -> lookahead (since that's
8592 what he actually wrote).
8593 * doc/refcard.tex: look ahead -> lookahead,
8594 look-ahead -> lookahead
8596 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8598 For consistency, use `lookahead' instead of `look-ahead' or
8599 `look_ahead'. Discussed starting at
8600 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8602 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8603 * NEWS: For the next release, note the change to `--report'.
8604 * TODO, doc/bison.1: Update English.
8605 * doc/bison.texinfo: Update English.
8606 (Understanding Your Parser, Bison Options): Document as
8607 `--report=lookahead' rather than `--report=look-ahead'.
8608 * src/conflicts.c: Update English in comments.
8609 (lookahead_set): Rename from look_ahead_set.
8610 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8611 (resolve_sr_conflict): Rename local look_ahead_tokens to
8612 lookahead_tokens, and update other uses.
8613 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8614 count_rr_conflicts, conflicts_free): Update uses.
8615 * src/getargs.c (report_args): Move "lookahead" before alternate
8617 (report_types): Update uses.
8618 (usage): For `--report' usage description, state `lookahead' spelling
8619 rather than `look-ahead'.
8620 * src/getargs.h (report.report_lookahead_tokens): Rename from
8621 report_look_ahead_tokens.
8622 * src/lalr.c: Update English in comments.
8623 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8624 (state_lookahead_tokens_count): Rename from
8625 state_look_ahead_tokens_count.
8626 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8627 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8628 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8630 Update English in output.
8631 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8632 * src/print.c: Update English in comments.
8633 (lookahead_set): Rename from look_ahead_set.
8634 (print_reduction): Rename argument lookahead_token from
8636 (print_core, state_default_rule, print_reductions, print_results):
8638 * src/print_graph.c: Update English in comments.
8639 (print_core): Update uses.
8640 * src/state.c: Update English in comments.
8641 (reductions_new): Update uses.
8642 (state_rule_lookahead_tokens_print): Rename from
8643 state_rule_look_ahead_tokens_print, and update other uses.
8644 * src/state.h: Update English in comments.
8645 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8646 (state_rule_lookahead_tokens_print): Rename from
8647 state_rule_look_ahead_tokens_print.
8648 * src/tables.c: Update English in comments.
8649 (conflict_row, action_row): Update uses.
8650 * tests/glr-regression.at
8651 (Incorrect lookahead during deterministic GLR,
8652 Incorrect lookahead during nondeterministic GLR): Rename
8653 print_look_ahead to print_lookahead.
8654 * tests/torture.at: Update English in comments.
8655 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8656 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8657 (Many lookahead tokens): Update uses.
8658 * data/glr.c: Update English in comments.
8659 * lalr1.cc: Likewise.
8661 * src/conflicts.h: Likewise.
8662 * src/lalr.h: Likewise.
8663 * src/main.c: Likewise.
8664 * src/output.c: Likewise.
8665 * src/parse-gram.c: Likewise.
8666 * src/tables.h: Likewise.
8667 * tests/calc.at: Likewise.
8669 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8671 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8673 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8675 * TODO: Add request from Nelson H. F. Beebe to be able to install
8676 Bison without installing the yacc script.
8678 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8680 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8681 and yytext if they're already #define'd.
8682 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8683 * src/scan-code-c.c: ... here.
8684 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8687 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8689 Get Bison to build again when configured with --enable-gcc-warnings.
8690 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8692 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8693 loc argument as it shadows a global.
8694 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8697 * src/.cvsignore: Add scan-code.c.
8699 2006-06-07 Akim Demaille <akim@epita.fr>
8701 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8703 * src/scan-code.l: here.
8704 * tests/input.at (Torturing the Scanner): Fix another location
8707 2006-06-07 Akim Demaille <akim@epita.fr>
8709 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8711 2006-06-06 Akim Demaille <akim@epita.fr>
8713 Extract the parsing of user actions from the grammar scanner.
8714 As a consequence, the relation between the grammar scanner and
8715 parser is much simpler. We can also split "composite tokens" back
8717 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8718 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8720 * src/location.h, src/location.c (add_column_width)
8721 (location_compute): these.
8722 Fix the column count: the initial column is 0.
8723 (location_print): Be robust to ending column being 0.
8724 * src/location.h (boundary_set): New.
8725 * src/main.c: Adjust to scanner_free being renamed as
8727 * src/output.c: Include scan-code.h.
8728 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8730 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8731 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8732 which is now, again, a separate token.
8733 Adjust all dependencies.
8734 Whereever actions with $ and @ are used, use translate_code.
8735 (action): Remove this nonterminal which is now useless.
8736 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8737 (grammar_current_rule_action_append): Use translate_code.
8738 (packgram): Bound check ruleno, itemno, and rule_length.
8739 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8740 (last_string, last_braced_code_loc, max_left_semantic_context)
8741 (scanner_initialize, scanner_free, scanner_last_string_free)
8742 (gram_out, gram_lineno, YY_DECL_): Move to...
8743 * src/scan-gram.h: this new file.
8744 (YY_DECL): Rename as...
8746 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8747 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8748 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8749 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8750 Move these declarations, and...
8751 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8753 * src/flex-scanner.h: this new file.
8754 * src/scan-gram.l (rule_length, rule_length_overflow)
8755 (increment_rule_length): Remove.
8756 (last_braced_code_loc): Rename as...
8757 (gram_last_braced_code_loc): this.
8758 Adjust to the changes of the parser.
8759 Move all the handling of $ and @ into...
8760 * src/scan-code.l: here.
8761 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8762 (handle_action_dollar, handle_action_at): Move to...
8763 * src/scan-code.l: here.
8764 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8765 scan-code.h, scan-code-c.c, scan-gram.h.
8766 (EXTRA_bison_SOURCES): Add scan-code.l.
8767 (BUILT_SOURCES): Add scan-code.c.
8768 (yacc): Be robust to white spaces.
8770 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8771 * tests/regression.at: Adjust the column numbers.
8772 * tests/regression.at: Adjust the error message.
8774 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8776 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8777 Use Akim's wording from
8778 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8780 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8782 Between Bison releases, manually append `+' to the previous Bison
8783 release number, and use that as a signal to automatically print the
8784 ChangeLog's CVS Id keyword from --version. Discussed starting at
8785 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8786 * ChangeLog: Add Id header.
8787 * configure.ac (AC_INIT): Append `+' to `2.3'.
8788 * src/.cvsignore: Add revision.c.
8789 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8790 (BUILT_SOURCES): Add revision.c.
8791 (revision.c): New target rule. This file defines a new global variable
8792 named revision. It initializes it with either the Id from ChangeLog
8793 or, if VERSION doesn't contain `+', with the empty string.
8794 * src/getargs.c (version): Print the value of revision.
8795 * src/revision.h: Extern revision.
8797 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8799 * NEWS: Version 2.3.
8800 * configure.ac (AC_INIT): Likewise.
8802 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8804 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8805 with no arguments, not as an object-like macro. This is for
8806 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8807 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8808 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8811 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8813 * src/getargs.c (usage): Back out yesterday's modification of the
8814 --help output so that we don't have to wait for translation before
8817 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8819 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8820 Problem reported by Akim Demaille.
8822 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8824 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8826 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8828 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8829 generated source code. Problem reported by Frans Englich in
8830 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8832 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8834 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8835 shell, not within 'make', so that 'make' by an ordinary builder
8836 (using GNU make) does not worry about configuring gzip. This also
8837 works around a bug reported independently by Keith Thompson and by
8838 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8839 stderr rather than stdout, messing up the build logs.
8841 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8843 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8844 to make sure that YYID will never be unused. This fixes a 'make
8845 maintainer-check' failure caused by the recent changes to the 'Trivial
8846 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8848 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8850 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8852 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8853 state before an empty RHS is always resolved here. Only the location
8854 of that state is guaranteed to be resolved, and that's enough. This
8855 fixes the remaining bug reported by Derek M. Jones in
8856 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8857 * tests/glr-regression.at (Uninitialized location when reporting
8858 ambiguity): Test the above case.
8859 Also, the embedded comments in this test case claim it checks the case
8860 of an empty RHS that has inherited the initial location. However, the
8861 corresponding LHS was already resolved, so yyresolveLocations didn't
8862 actually have reason to modify it. Fix this by forcing
8863 nondeterministic operation at the beginning of the parse.
8865 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8867 * data/c.m4 (b4_yy_symbol_print_generate):
8868 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8869 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8870 of the bugs reported today by Derek M Jones in
8871 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8872 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8873 defined to be a type name without parens or brackets.
8874 (Location Type): Similarly for YYLTYPE.
8875 * tests/regression.at (Trivial grammars): Put in a test for this
8876 bug that will be caught by 'make maintainer-check' (though not,
8877 alas, by 'make check' unless your compiler is picky).
8879 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8881 * NEWS: Version 2.2.
8882 * configure.ac (AC_INIT): Likewise.
8884 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8886 * data/glr.c (yyreportTree): Make room in yystates for the state
8887 preceding the RHS. This fixes the segmentation fault reported by Derek
8889 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8890 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8891 to the user. Reported for yyreportTree by Derek M. Jones later in the
8893 * THANKS: Add Derek M. Jones.
8894 Update my email address.
8895 Fix typo in Steve Murphy's name.
8897 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8899 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8900 checking against YYLAST that caused the parser to miss a potential
8901 alternative in its diagnostic.
8902 Problem reported by Maria Jose Moron Fernandez in
8903 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8904 * data/lalr1.cc (yysyntax_error_): Likewise.
8905 * data/yacc.c (yysyntax_error): Likewise.
8906 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8907 tokens, in case we run into an older C compiler.
8908 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8909 Use them to check for the off-by-one error fixed above.
8911 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8912 YYSIZE_T, not size_t.
8913 * tests/regression.at (Trivial grammars): New test, to catch
8914 the error fixed by the above patch.
8916 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8918 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8920 Reported by Steve Murphy.
8922 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8924 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8925 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8927 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8929 Implement --trace=m4.
8930 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8931 * src/output.c (output_skeleton): When set, pass -dV to m4.
8933 Factor the handling of flags in m4.
8934 * src/output.c (prepare): Rename the muscle names debug, defines,
8935 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8936 * data/c.m4: Adjust.
8937 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8938 Use b4_define_flag_if to define other b4_FLAG_if macros.
8939 (b4_location_if): As a consequence, rename as...
8940 (b4_locations_if): this, for consistency.
8941 Adjust all the skeletons.
8943 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8945 * etc/bench.pm: Shorten bench names.
8947 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8949 * src/output.h, src/output.c (error_verbose): Move to...
8950 * src/getargs.h, src/getargs.c: here.
8952 Adjust dependencies.
8954 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8956 * data/c.m4 (b4_copyright): Put the special exception for Bison
8957 skeletons here, so we don't have to put it in each skeleton. All
8958 uses changed. Suggested by Akim Demaille. Also, wrap the
8959 copyright notice, in case it is longer than 80 columns. Replace
8960 comma by newline after title.
8962 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8964 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8965 incompatibility, not a bug. Mention that it wasn't fixed as of
8968 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8970 * examples/extexi: Enforce the precedence of concatenation over
8972 Reported by Tommy Nordgren.
8974 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8976 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8977 with the member "token".
8978 Reported by Martin Nylin.
8980 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8982 * data/glr.c: Switch to Bison 2.2 special-exception language in
8983 the copyright notice. Use more-regular format for titles and
8985 * data/glr.cc: Likewise.
8986 * data/location.cc: Likewise.
8987 * data/yacc.cc: Likewise.
8988 * doc/bison.texinfo (Conditions): Document this.
8989 * NEWS: likewise. Upgrade version to 2.2.
8991 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8993 * data/glr.cc: Remove dead code.
8995 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8997 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8998 that variable and the line breaks the bootstrap. Problem reported
8999 by Juan M. Guerrero.
9001 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9003 * doc/bison.texinfo (Multiple start-symbols): New.
9005 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
9007 * etc/README, etc/bench.pl: New.
9009 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
9011 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9013 Reported by Mickael Labau.
9014 * tests/input.at (Torturing the Scanner): Test it.
9016 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9018 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9019 Problem reported by Bob Rossi.
9021 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9023 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9024 and didn't really work.
9025 For the index, use @ifnotinfo, not @iftex.
9026 Minor cleanups of spacing and terminology.
9028 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9030 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9031 of AT_NAME_PREFIX when %name-prefix is not used.
9033 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
9035 Apply --prefix to C++ skeletons too: they change the namespace.
9036 The test suite already exercize these cases.
9037 * data/c++.m4 (b4_namespace): New.
9038 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9039 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9040 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9041 * doc/bison.texinfo: Document it.
9042 (Option Cross Key): Use @multitable in all formats. It looks
9043 nicer, even in TeX outputs.
9044 (Rules): Use the same code whatever the output type is.
9045 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9046 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9047 * tests/calc.at: Use it, instead of hard coding `yy'.
9049 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9051 * TODO: Remove dead items.
9053 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9055 * doc/FAQ: Remove, merged into...
9056 * doc/bison.texinfo (FAQ): this.
9057 * doc/Makefile.am (EXTRA_DIST): Adjust.
9059 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
9061 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9063 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9064 * doc/bison.texinfo (Calc++ Scanner): Use it.
9066 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9068 Fix two nits reported by twlevo, plus one more that I discovered.
9070 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9071 this is the usual Bison style.
9072 * src/location.h (location_print): Likewise.
9074 * src/reader.h (token_name): Likewise.
9076 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9078 Fix some nits reported by twlevo.
9079 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9080 and "POSIX". Use more-modern syntax for URLs. Mention C++
9081 and ask for Java. Don't hardwire OS version numbers. Add
9083 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9084 * src/conflicts.c (solved_conflicts_obstack): Now static.
9086 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
9088 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
9089 page. Say "you can use it" not "you may use it" as on the web page;
9090 we're describing capabilities not granting permission.
9092 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
9094 * data/glr.c (yyresolveLocations): Rename local variables to avoid
9095 shadowing warnings. Use usual patter for iterating through RHS.
9096 * tests/glr-regression.at
9097 (Uninitialized location when reporting ambiguity):
9098 Modify yylex so that it uses its argument, rather than trying
9099 to rely on ARGSUSED (which doesn't work for gcc with warnings).
9100 const char -> char const.
9102 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
9103 Don't use tabs inside commands; it messes up 'ps'.
9104 Problem reported by twlevo.
9106 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
9108 * tests/glr-regression.at (Uninitialized location when reporting
9109 ambiguity): New test case.
9110 * data/glr.c (yyresolveLocations): New function, which uses
9112 (yyresolveValue): Invoke yyresolveLocations before reporting an
9114 * doc/bison.texinfo (Default Action for Locations): Note
9115 YYLLOC_DEFAULT's usage for ambiguity locations.
9116 (GLR Semantic Actions): Cross-reference those notes.
9118 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
9120 * tests/glr-regression.at (Leaked semantic values when reporting
9121 ambiguity): Remove unnecessary union and type declarations.
9122 (Leaked lookahead after nondeterministic parse syntax error): New test
9124 * data/glr.c (yyparse): Check for zero stacks remaining before
9125 attempting to shift the lookahead so that you don't lose it.
9127 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9129 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
9130 * tests/glr-regression.at (Leaked semantic values when reporting
9131 ambiguity): New test case.
9132 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
9133 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
9134 now unnecessary yystackp parameter.
9135 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
9136 destructors can be called.
9138 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
9139 in existing testcases.
9141 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9143 Don't leak semantic values for parent RHS when a user action cuts the
9144 parser, and clean up related code a bit.
9145 * tests/glr-regression.at (Leaked merged semantic value if user action
9146 cuts parse): Rename to...
9147 (Leaked semantic values if user action cuts parse): ... this. Add check
9148 for leaked parent RHS values.
9149 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
9150 between an unresolved state (non-empty chain of semantic options) and
9151 an incomplete one (signaled by an empty chain).
9152 (yyresolveStates): Document the interface. Move all manipulation of a
9153 successfully or unsuccessfully resolved yyGLRState to...
9154 (yyresolveValue): ... here so that yyresolveValue always leaves a
9155 yyGLRState with consistent data and thus is easier to understand.
9156 Remove the yyvalp and yylocp parameters since they are always just
9157 taken from the yys parameter. When reporting a discarded merged value
9158 in debugging output, note that it is incompletely merged. Document the
9160 (yyresolveAction): If resolving any of the RHS states fails, destroy
9161 them all rather than leaking them. Thus, as long as user actions are
9162 written to clean up the RHS correctly, yyresolveAction always cleans up
9163 the RHS of a semantic option. Document the interface.
9165 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
9167 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
9168 led to a segmentation fault in GNU Pascal. Problem reported
9171 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
9173 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
9174 mid-rule action inside a nonterminal symbol in order to declare a
9175 destructor for its semantic value.
9177 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
9179 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
9180 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
9181 __cplusplus && ! defined _STDLIB_H && !
9182 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
9183 defined free))]: Include <stdlib.h> rather than rolling our own
9184 declarations of malloc and free, to avoid problems with
9185 incompatible declarations (using 'throw') C++'s stdlib.h. This
9186 should fix Debian bug 340012
9187 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
9188 reported by Guillaume Melquiond.
9190 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9192 * NEWS: Clarify symbols versus types in unused-value warnings.
9194 * configure.ac (AC_INIT): Bump version number.
9196 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9198 * NEWS: Version 2.1a.
9199 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
9200 since C99 requires this.
9202 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
9204 * m4/c-working.m4: New file.
9205 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
9207 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
9209 * Makefile.maint: Merge from coreutils.
9211 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
9213 More portability fixes for problems summarized by Nelson H. F. Beebe.
9215 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
9216 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
9217 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
9218 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
9219 messes up because C++ code is compiled in 32-bit mode but linked
9222 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
9224 More portability fixes for problems summarized by Nelson H. F. Beebe.
9226 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
9227 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
9229 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
9230 nodist_PROGRAMS, since we don't need to actually compile the
9231 example if we're just doing a plain 'make'. This avoids bothering
9232 the installer unnecessarily about problems due to weird C++
9235 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
9237 More portability fixes for problems summarized by Nelson H. F. Beebe.
9239 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
9240 than #include "...", and compile with -I'.'. The old method was
9241 not portable, according to Posix and the C standard, and it does
9242 not work with Sun C 5.7, where previous #line directives affect
9243 the working directory used in later #include "..." directives.
9245 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9247 Various DJGGP specific issues in /djgpp
9249 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
9251 More portability fixes for problems summarized by Nelson H. F. Beebe.
9253 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
9254 '#include <map>' works and that you can apply ++ to iterators.
9256 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
9258 Work around portability problems summarized by Nelson H. F. Beebe in
9259 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
9261 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9262 that '#include <string>' works.
9264 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
9265 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
9266 "warning: sorry: semantics of inline function static data `const
9267 unsigned char translate_table[262]' are wrong (you'll wind up with
9270 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
9271 or, xor to not_, and_, or_, and xor_, respectively. This works
9272 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
9273 random system header somewhere that includes the equivalent of
9276 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
9277 -E" works; it apparently doesn't work with PathScale EKO Compiler
9280 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
9282 During deterministic GLR operation, user actions should be able to
9283 influence the parse by changing yychar. To make this easier to fix and
9284 to make glr.c easier to evolve in general, don't maintain yytoken in
9285 parallel with yychar; just compute yytoken when needed.
9286 * tests/glr-regression.at (Incorrect lookahead during deterministic
9287 GLR): Check that setting yychar in a user action has the intended
9289 * data/glr.c (yyGLRStack): Remove yytokenp member.
9290 (yyclearin): Don't set *yytokenp.
9291 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
9292 yychar rather than *yytokenp to determine the current lookahead.
9293 Compute yytoken locally when needed.
9294 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
9297 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
9298 after `--report' documentation.
9300 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
9302 * src/parse-gram.y (grammar_declaration): Location of printer
9303 symbol is @1, not list->location. Bug reported by twlevo.
9304 * tests/input.at (Incompatible Aliases): Adjust to above change.
9306 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
9308 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
9309 all the test at once. This makes the output easier to read in the
9312 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
9313 got from <http://bro-ids.org/download.html>. The bug is that
9314 when two actions appeared in succession, the second one was
9315 scanned before the first one was added to the grammar rule
9316 as a midrule action. Bison then output the incorrect warning
9317 "parse.y:905.17-906.36: warning: unused value: $3".
9318 * src/parse-gram.y (BRACED_CODE, action): These are no longer
9319 associated with a value.
9320 (rhs): Don't invoke grammar_current_rule_action_append.
9321 (action): Invoke it here instead.
9322 * src/reader.c (grammar_midrule_action): Now extern.
9323 (grammar_current_rule_action_append): Don't invoke
9324 grammar_midrule_action; that is now the scanner's job.
9325 * src/reader.h (last_string, last_braced_code_loc):
9326 (grammar_midrule_action): New decls.
9327 * src/scan-gram.l (last_string): Now extern, sigh.
9328 (last_braced_code_loc): New extern variable.
9329 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
9330 rule already has an action.
9331 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
9332 * tests/input.at (AT_CHECK_UNUSED_VALUES):
9333 Add some tests to check that the above changes fixed the bug.
9335 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
9337 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
9338 All used changed. Check whether the symbol has a destructor,
9339 not whether it is typed.
9340 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
9341 that the values are still reported as unused. All line numbers
9344 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
9346 Work around a bug in bro 0.8, which underparenthesizes its
9347 definition of YYLLOC_DEFAULT.
9348 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
9350 * data/lalr1.cc: Likewise.
9351 * data/yacc.cc: Likewise.
9353 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
9355 Work around a bug in Pike 7.0, and give the Pike folks a
9356 better way to override the usual int widths.
9357 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
9358 user can override the types.
9359 (short): #undef, to work around a bug in Pike 7.0.
9360 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
9361 (union yyalloc.yyss): Use yytype_int16 rather than short.
9363 (yysigned_char): Remove.
9364 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
9365 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
9366 * tests/regression.at (Web2c Actions): Adjust to above changes.
9368 * src/reader.c (check_and_convert_grammar): New function.
9369 (reader): Close the input file even if something went wrong during
9370 parsing. Minor file descriptor leak reported by twlevo.
9372 * src/assoc.c (assoc_to_string): Use a default: abort (); case
9373 to pacify gcc -Wswitch-default.
9374 * src/scan-gram.l (adjust_location): Use a default: break; case
9375 to pacify gcc -Wswitch-default.
9376 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
9377 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9378 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9379 Move these decls to scan-skel.l, since they don't need to be
9381 * src/scan-skel.l: Accept the above decls.
9382 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
9385 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
9387 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
9388 since we don't want to insist on a version number at the start
9389 of the changelog every time.
9390 * Makefile.maint: Sync from coreutils a bit better.
9391 (sc_trailing_blank): Renamed from sc_trailing_space.
9393 (sc_no_if_have_config_h, sc_require_config_h):
9394 (sc_prohibit_assert_without_use): New rules.
9395 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
9396 (sc_dd_max_sym_length): Fix leading spaces in rule.
9397 (sc_system_h_headers): Prefix with @.
9398 (sc_useless_cpp_parens, m4-check): Output line numbers.
9399 (changelog-check): Allow version only in head.
9400 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
9401 satisfy new Makefile.maint rule.
9402 * data/glr.c: Likewise.
9403 * data/glr.cc: Likewise.
9404 * data/lalr1.cc: Likewise.
9405 * data/yacc.c: Likewise.
9406 * lib/ebitsetv.c: Likewise.
9407 * lib/lbitset.c: Likewise.
9408 * lib/subpipe.c: Likewise.
9409 * lib/timevar.c: Likewise.
9410 * src/system.h: Likewise.
9411 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
9412 * djgpp/Makefile.maint: Add copyright notice.
9413 * djgpp/README.in: Likewise.
9414 * djgpp/config.bat: Likewise.
9415 * djgpp/config.site: Likewise.
9416 * djgpp/config_h.sed: Likewise.
9417 * djgpp/djunpack.bat: Likewise.
9418 * djgpp/config.sed: Fix copyright notice to match standard format.
9419 * djgpp/subpipe.h: Likewise.
9420 * lib/bitsetv-print.c: Likewise.
9421 * lib/bitsetv.c: Likewise.
9422 * lib/subpipe.h: Likewise.
9423 * lib/timevar.c: Likewise.
9424 * lib/timevar.h: Likewise.
9425 * djgpp/subpipe.c: Use standard recipe for config.h.
9426 * lib/abitset.c: Likewise.
9427 * lib/bitset.c: Likewise.
9428 * lib/bitset_stats.c: Likewise.
9429 * lib/bitsetv-print.c: Likewise.
9430 * lib/bitsetv.c: Likewise.
9431 * lib/ebitsetv.c: Likewise.
9432 * lib/get-errno.c: Likewise.
9433 * lib/lbitset.c: Likewise.
9434 * lib/subpipe.c: Likewise.
9435 * lib/timevar.c: Likewise.
9436 * lib/vbitset.c: Likewise.
9437 * tests/local.at: Likewise.
9438 * src/scan-gram.l: Don't include verify.h, since system.h does
9440 * .x-sc_require_config_h: New file.
9441 * .x-sc_unmarked_diagnostics: New file.
9443 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
9445 Be a bit more systematic about using 'abort'.
9446 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
9447 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
9448 Put 'default: abort ();' before some other case, to satisfy older
9450 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9451 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
9452 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
9453 * src/conflicts.c (resolve_sr_conflict): Likewise.
9454 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
9455 (get_decision_str, get_orientation_str, get_node_alignment_str):
9456 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
9457 (get_linestyle_str, get_arrowstyle_str): Likewise.
9458 * src/conflicts.c (resolve_sr_conflict):
9459 Use a default case rather than one for the one remaining enum
9460 value, to catch invalid enum values as well.
9461 * src/lalr.c (set_goto_map, map_goto):
9462 Prefer "assert (FOO);" to "if (!FOO) abort ();".
9463 * src/nullable.c (nullable_compute, token_definitions_output):
9465 * src/reader.c (packgram, reader): Likewise.
9466 * src/state.c (transitions_to, state_new, state_reduction_find):
9468 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
9469 (symbol_pack): Likewise.
9470 * src/tables.c (conflict_row, pack_vector): Likewise.
9471 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
9472 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
9473 * src/system.h: Don't include <assert.h>.
9474 (assert): New macro.
9476 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
9477 (Destructor Decl, Parser Function, Pure Calling):
9478 Describe rules for braces inside C code more carefully.
9480 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
9482 Fix some porting glitches found by Nelson H. F. Beebe.
9483 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
9484 compilers that don't understand that abort () does not return.
9485 * src/state.c (transitions_to): Likewise.
9486 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9487 that '#include <cstdlib>' works.
9488 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
9489 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
9490 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
9491 for the benefit of some pre-C99 compilers.
9493 * bootstrap: Undo changes to gnulib files that autoreconf made.
9495 Minor fixups to get 'make maintainer-check' to work.
9496 * configure.ac: Don't use -Wnested-externs, as it's incompatible
9497 with the new verify.h implementation.
9498 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
9499 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
9500 * data/yacc.c (YYUSE): Likewise.
9501 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
9502 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
9503 * src/parse-gram.y (declaration): Don't pass a string constant
9504 to a function that expects char *, since GCC might complain
9505 about the constant value.
9506 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
9507 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
9508 before #defining them.
9509 * tests/glr-regression.at
9510 (Incorrectly initialized location for empty right-hand side in GLR):
9511 In yyerror, use the msg arg.
9512 (Corrupted semantic options if user action cuts parse):
9513 (Incorrect lookahead during deterministic GLR):
9514 (Incorrect lookahead during nondeterministic GLR):
9515 Don't name a local var 'index'; it shadows string.h's 'index'.
9517 2006-01-19 Akim Demaille <akim@epita.fr>
9519 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
9520 location, not just parts of it.
9522 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
9524 * NEWS: Document the fact that multiple %unions are now allowed.
9525 * doc/bison.texinfo (Union Decl): Likewise.
9526 * TODO: This feature is now implemented, so remove it from
9529 * Makefile.maint: Merge with coreutils Makefile.maint.
9530 (CVS_LIST): Use build-aux version if available.
9531 (VERSION_REGEXP): New macro.
9532 (syntax-check-rules): Add sc_no_if_have_config_h,
9533 sc_prohibit_assert_without_use, sc_require_config_h,
9534 sc_useless_cpp_parens.
9535 (sc_obsolete_symbols): Check for O_NDELAY.
9536 (sc_dd_max_sym_length): Track coreutils.
9537 (sc_unmarked_diagnostics): Look in all files, not just *.c.
9538 (sc_useless_cpp_parens): New rule.
9539 (news-date-check): Look for version or today's date.
9540 (changelog-check): Don't require version number near head.
9541 (copyright-check): Use current year instead of hardwiring 2005.
9542 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
9543 (announcement): Add --gpg-key-ID.
9545 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
9548 Avoid undefined behavior that addressed just before the start of an
9549 array. Problem reported by twlevo.
9550 * src/reader.c (packgram): Prepend a new sentinel before ritem.
9551 * src/lalr.c (build_relations): Rely on new sentinel.
9552 * src/gram.c (gram_free): Adjust to new sentinel.
9554 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9556 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9557 yylookaheadNeeds. All uses updated.
9558 (yysplitStack): Rename local yynewLookaheadStatuses to
9559 yynewLookaheadNeeds.
9560 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9561 GLR): In comments, change `lookahead status' to `lookahead need'.
9563 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9565 * data/glr.c (yysplitStack): A little stylistic rewrite.
9567 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9569 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9571 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9573 * doc/bison.texinfo: Fix some typos.
9574 (GLR Semantic Actions): New subsection discussing special
9575 considerations because GLR semantic actions might be deferred.
9576 (Actions): Mention look-ahead usage of yylval.
9577 (Actions and Locations): Mention look-ahead usage of yylloc.
9578 (Special Features for Use in Actions): Add YYEOF entry and mention it
9579 in the yychar entry.
9580 In the yychar entry, remove mention of the local yychar case (pure
9581 parser) since this is irrelevant information when writing semantic
9582 actions and since it's already discussed in `Table of Symbols' where
9583 yychar is otherwise described as an external variable.
9584 In the yychar entry, don't call it the `current' look-ahead since it
9585 isn't when semantic actions are deferred.
9586 In the yychar and yyclearin entries, add note about deferred semantic
9588 Add yylloc and yylval entries discussing look-ahead usage.
9589 (Look-Ahead Tokens): When discussing yychar, don't call it the
9590 `current' look-ahead, and do mention yylval and yylloc.
9591 (Error Recovery): Cross-reference `Action Features' when mentioning
9593 (Table of Symbols): In the yychar entry, don't call it the `current'
9595 In the yylloc and yylval entries, mention look-ahead usage.
9597 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9599 * tests/glr-regression.at: Update copyright year to 2006.
9601 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9603 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9604 use during nondeterministic operation to track which stacks have
9605 actually needed the current lookahead.
9606 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9607 Allocate, deallocate, resize, and otherwise shuffle space for
9608 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9609 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9610 appropriately during nondeterministic operation.
9611 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9612 members to store the current lookahead to be used by the deferred
9614 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9615 from which the RHS is taken. Set the lookahead members of the new
9616 yySemanticOption according to the lookahead status for stack yyk.
9617 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9618 yyaddDeferredAction.
9619 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9620 members of yySemanticOption before invoking yyuserAction, and then set
9621 them back to their current values afterward.
9622 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9623 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9624 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9625 titles for consistency.
9626 (Leaked merged semantic value if user action cuts parse): In order to
9627 suppress lint warnings, use arguments in merge function, and assign
9628 char value < 128 in main.
9629 (Incorrect lookahead during deterministic GLR): New test case.
9630 (Incorrect lookahead during nondeterministic GLR): New test case.
9632 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9634 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9635 !yyvaluep as signal that no semantic value is available to print.
9636 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9637 to print a semantic value.
9639 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9641 * tests/glr-regression.at: For consistency with my newer test cases,
9644 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9646 * data/glr.c (yyresolveValue): When merging semantic options, if at
9647 least one user action succeeds but a later one cuts the parse, then
9648 destroy the semantic value before returning rather than leaking it.
9649 (yyresolveStates): If a user action cuts the parse and thus
9650 yyresolveValue fails, ignore the (unset) semantic value rather than
9651 corrupting the yyGLRState, and empty the semantic options list since
9652 the user actions should have called all necessary destructors.
9653 Simplify code with YYCHK.
9654 * tests/glr-regression.at (Corrupted semantic options if user action
9655 cuts parse): New test case.
9656 (Undesirable destructors if user action cuts parse): New test case.
9657 Before applying any of this patch, this test case never actually failed
9658 for me... but only because the corrupted semantic options usually
9660 (Leaked merged semantic value if user action cuts parse): New test
9663 2006-01-05 Akim Demaille <akim@epita.fr>
9665 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9667 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9669 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9670 _MSC_VER. Problem reported by Cenzato Marco.
9671 (b4_c_function_def): Use it.
9672 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9674 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9675 than rolling our own.
9677 2006-01-04 Akim Demaille <akim@epita.fr>
9679 Also warn about non-used mid-rule values.
9680 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9682 (symbol_list_new): Adjust.
9683 * src/reader.c (symbol_typed_p): New.
9684 (grammar_rule_check): Use it.
9685 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9687 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9689 * tests/actions.at (Exotic Dollars): Adjust.
9691 2006-01-04 Akim Demaille <akim@epita.fr>
9693 * src/reader.c (grammar_midrule_action): If $$ is set in a
9694 mid-rule, move the `used' bit to its lhs.
9695 * tests/input.at (Unused values): New.
9696 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9698 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9700 * doc/bison.texinfo (Bison Options): Say more accurately what
9702 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9703 about declarations in the grammar when in Yacc mode, as POSIX does
9704 not require a diagnostic when the grammar uses extensions.
9706 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9708 Warn about dubious constructions like "%token T T".
9710 * src/symtab.h (struct symbol.declared): New member.
9711 * src/symtab.c (symbol_new): Initialize it to false.
9712 (symbol_class_set): New arg DECLARING, specifying whether
9713 this is a declaration that we want to warn about, if there
9714 is more than one of them. All uses changed.
9716 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9717 Allow multiple %union directives, whose contents concatenate.
9718 * src/parse-gram.y (grammar_declaration): Likewise.
9719 Use muscle_code_grow, so that we don't need stype_line any more.
9722 * src/muscle_tab.c (muscle_grow): Fix comment.
9724 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9725 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9726 Update copyright year to 2006.
9728 2006-01-03 Akim Demaille <akim@epita.fr>
9730 Have glr.cc pass (some of) the calc.at tests.
9731 * data/glr.cc (b4_parse_param_orig): New.
9732 (b4_parse_param): Improve its definition, and bound it more
9733 clearly in the skeleton.
9734 (b4_epilogue): Append, instead of prepending, in order to keep
9736 Simplify the generation of auxiliary functions: locations and
9737 purity are mandated.
9738 (b4_global_tokens_and_yystype): Honor it.
9739 * data/location.cc (c++.m4): Don't include it.
9740 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9742 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9744 Be sure to initialize the first position's filename.
9745 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9747 (AT_CHECK_CALC_GLR_CC): New.
9748 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9750 2006-01-02 Akim Demaille <akim@epita.fr>
9752 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9754 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9755 * data/glr.cc: Do not include stack.hh.
9757 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9759 * data/glr.c: Reformat whitespace with tabs.
9760 (b4_lpure_formals): Remove this unused m4 macro.
9761 * tests/cxx-type.at: Reformat whitespace with tabs.
9762 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9763 since it's a member. Rename type to isNterm for clarity.
9765 2005-12-29 Akim <akim@sulaco.local>
9767 Let glr.cc catch up with symbol_value_print.
9768 * data/glr.cc (b4_yysymprint_generate): Replace by...
9769 (b4_yy_symbol_print_generate): this.
9770 (yy_symbol_print, yy_symbol_value_print): Declare them.
9772 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9774 * src/location.h (boundary): Note that a line or column equal
9775 to INT_MAX indicates an overflow.
9776 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9777 (rule_length_overflow, increment_rule_length, add_column_width):
9779 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9780 (<SC_BRACED_CODE>"}"):
9781 Use increment_rule_length rather than incrementing it by hand.
9782 (adjust_location, handle_syncline): Diagnose overflow.
9783 (handle_action_dollar, handle_action_at):
9784 Fix bug with monstrosities like $-2147483648.
9785 Remove now-unnecessary checks.
9786 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9787 (convert_ucn_to_byte): Verify assumptions.
9788 (handle_syncline): New arg LOC. All callers changed.
9789 Don't store through a value derived from char const * pointer.
9791 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9794 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9796 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9797 Remove unnecessary forward static decls.
9799 2005-12-27 Akim Demaille <akim@epita.fr>
9801 * src/reader.c (grammar_current_rule_check): Also check that $$
9803 Take the rule to check as argument, hence rename as...
9804 (grammar_rule_check): this.
9805 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9807 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9808 (grammar_midrule_action, grammar_symbol_append): Now static.
9809 * tests/torture.at (input): Don't rely on the default action
9810 being always performed.
9811 * tests/calc.at: "Set" $$ even when the action is "cut" with
9813 * tests/actions.at (Exotic Dollars): Instead of using unused
9814 values, check that the warning is issued.
9816 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9818 * NEWS: Improve wording for unused-value warnings.
9820 2005-12-22 Akim Demaille <akim@epita.fr>
9822 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9823 (b4_yysymprint_generate): Rename as...
9824 (b4_yy_symbol_print_generate): this.
9825 Generate yy_symbol_print instead of yysymprint.
9826 Generate also yy_symbol_value_print, and use it.
9828 2005-12-22 Akim Demaille <akim@epita.fr>
9830 * NEWS: Warn about unused values.
9831 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9833 (symbol_list_n_get, symbol_list_n_used_set): New.
9834 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9835 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9836 * src/reader.c (grammar_current_rule_check): Check that values are
9838 * src/symtab.c (symbol_print): Accept 0.
9839 * tests/existing.at: Remove the type information.
9841 Remove useless actions (beware of mid-rule actions: perl -000
9842 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9843 * tests/actions.at (Exotic Dollars): Use unused values.
9844 * tests/calc.at: Likewise.
9845 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9848 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9851 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9853 Undo 2005-12-01 tentative license wording change. The wording is
9854 still being reviewed by the lawyers, and we don't want to wait for
9855 them before publishing a test release. For now, revert to the
9857 * NEWS: Undo 2005-12-01 change.
9858 * data/glr.c: Revert to previous license wording.
9859 * data/glr.cc: Likewise.
9860 * data/lalr1.cc: Likewise.
9861 * data/location.cc: Likewise.
9862 * data/yacc.c: Likewise.
9864 * NEWS: Reword %destructor vs YYABORT etc.
9865 * data/glr.c: Use American spacing, for consistency.
9866 * data/glr.cc: Likewise.
9867 * data/lalr1.cc: Likewise.
9868 * data/yacc.c: Likewise.
9869 * data/yacc.c: Reformat comments slightly.
9870 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9871 for consistency. Fix some spelling errors and reword recently-included
9873 * tests/cxx-type.at: Cast results of malloc, for C++.
9875 2005-12-21 Joel E. Denny <address@hidden>
9877 * tests/cxx-type.at: Construct a tree, count the parents of shared
9878 nodes, and free each node once and only once. Previously, the memory
9879 for semantic values was leaked instead.
9881 2005-12-21 Joel E. Denny <address@hidden>
9883 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9884 (yylval, yylloc): If pure, #define to yystackp->yyval and
9885 yystackp->yyloc similar to yychar and yynerrs.
9886 (yyparse): If pure, remove local yylval and yylloc. Add local
9887 yystackp to accommodate pure definitions of yylval and yylloc.
9888 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9889 yylvalp and yyllocp to &yylval and &yylloc.
9890 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9891 namespace. Previously, nerrs and char were missing, but lval and lloc
9893 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9894 yylvalp and yyllocp parameters since, if pure, these are now always
9895 accessible through yystackp. If not pure, they are still accessible
9897 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9898 `if (YYID (N))' to pacify lint.
9900 2005-12-21 Akim Demaille <akim@epita.fr>
9902 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9903 destroy the RHS symbols of a rule.
9904 * data/yacc.c (yylen): Initialize to 0.
9905 Keep its value to the number of items to possibly shift.
9906 In particular, a regular successful parse that ends on YYFINAL by
9907 a (internal) YYACCEPT must not have yylen != 0.
9908 (yyerrorlab, yyreturn): Pop the RHS.
9909 Reorder a bit to emphasize the `shifting' bits of code.
9910 (YYPOPSTACK): Now accept a number of items to pop.
9911 * data/lalr1.cc: Likewise.
9912 * data/glr.c: Formatting changes.
9913 Use goto instead of fall through.
9914 * doc/bison.texinfo (Destructor Decl): Complete.
9916 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9918 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9919 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9920 * djgpp/config.bat: Replace every occurence of the file name
9921 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9922 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9923 * djgpp/config.sed: Replace every occurence of the file name
9924 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9925 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9926 * djgpp/djunpack.bat: DJGPP specific file.
9927 * djgpp/fnchange.lst: DJGPP specific file.
9928 * djgpp/README.in: Add new information about how to unpack the bison
9929 source on MSDOS and other systems which have 8.3 file name restrictions
9930 using djunpack.bat and fnchange.lst.
9932 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9934 * bootstrap (build_cvs_prefix): Remove; unused.
9935 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9936 when getting gnulib.
9938 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9940 * data/glr.c: Reorder typedef declarations for structs to match order
9941 of struct declarations.
9942 Rename yystack everywhere to yystackp except in yyparse where it's not
9944 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9946 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9947 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9948 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9951 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9953 * tests/sets.at (Accept): Fix typos in regular expression used to
9954 sed out the final state number.
9956 Work around portability problem on Solaris 10: flex-generated
9957 files include <stdio.h> before <config.h>, which messes up
9958 because the latter defines __EXTENSIONS__. Address the problem
9959 by creating two new little files that include <config.h> first,
9960 then include the flex-generated files. Rewrite everyone else
9961 to include <config.h> first, as well.
9962 * lib/timevar.c: Always include "config.h".
9963 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9964 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9965 (EXTRA_bison_SOURCES): New macro.
9966 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9967 * src/system.h: Don't include config.h.
9968 * src/LR0.c: Include <config.h> first.
9969 * src/assoc.c: Likewise.
9970 * src/closure.c: Likewise.
9971 * src/complain.c: Likewise.
9972 * src/conflicts.c: Likewise.
9973 * src/derives.c: Likewise.
9974 * src/files.c: Likewise.
9975 * src/getargs.c: Likewise.
9976 * src/gram.c: Likewise.
9977 * src/lalr.c: Likewise.
9978 * src/location.c: Likewise.
9979 * src/main.c: Likewise.
9980 * src/muscle_tab.c: Likewise.
9981 * src/nullable.c: Likewise.
9982 * src/output.c: Likewise.
9983 * src/parse-gram.y: Likewise.
9984 * src/print.c: Likewise.
9985 * src/print_graph.c: Likewise.
9986 * src/reader.c: Likewise.
9987 * src/reduce.c: Likewise.
9988 * src/relation.c: Likewise.
9989 * src/state.c: Likewise.
9990 * src/symlist.c: Likewise.
9991 * src/symtab.c: Likewise.
9992 * src/tables.c: Likewise.
9993 * src/uniqstr.c: Likewise.
9994 * src/vcg.c: Likewise.
9996 * src/parse-gram.y: Fix minor problems uncovered by lint.
9997 (current_lhs, current_lhs_location): Now static.
9998 (current_assoc): Remove unused variable.
10000 Cleanups so that Bison-generated parsers have less lint.
10001 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10002 Prepend /*ARGSUSED*/, for lint's sake.
10003 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10004 definition if 'lint' is defined.
10005 (YYID): New macro (or function, if lint).
10006 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10007 * data/yacc.c: Likewise.
10008 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10009 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10010 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10012 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10013 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10014 Use YYID(0) rather than 0, for lint.
10015 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10016 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10018 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10020 * tests/glr-regression.at
10021 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10022 Close memory leak reported by twlevo.
10024 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10026 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10028 (yyparse): Iterate another stack in order to call user destructors.
10029 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10031 (Duplicated user destructor for lookahead): This test now is expected
10034 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10036 * NEWS: Document the following change.
10037 * data/yacc.c: Say "parser skeleton" rather than "file", since
10038 it's no longer just a file.
10039 * data/glr.c: Grant a special exception for C GLR parsers, that
10040 reads like the already-existing exception for C LALR(1) parsers.
10041 * data/glr.cc: Likewise.
10042 * data/lalr1.cc: Likewise.
10043 * data/location.cc: Likewise.
10044 * data/yacc.c: Reword the "written by" statement to clarify that
10045 it was the parser skeleton, not the entire output file.
10046 * data/glr.c: Written by Paul Hilfinger.
10047 * data/glr.cc: Written by Akim Demaille.
10048 * data/lalr1.cc: Likewise.
10050 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10052 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10053 Fix typos in previous change that broke 'make check'.
10054 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10056 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10057 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10058 We can revert this once things settle down.
10060 * src/conflicts.c (conflicts_print): Don't print file name twice
10061 when %expect fails because there were no conflicts.
10062 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10064 * tests/conflicts.at (%expect not enough, %expect too much):
10065 (%expect with reduce conflicts): Adjust to new behavior.
10067 2005-11-18 Akim Demaille <akim@epita.fr>
10069 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10071 * NEWS: Document this.
10072 * doc/bison.texinfo (Expect Decl): Likewise.
10074 2005-11-16 Akim Demaille <akim@epita.fr>
10076 Generalize the display of semantic values and locations in traces.
10077 * data/glr.c (yy_reduce_print): Fix indices (again).
10078 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10080 * data/lalr1.cc (yyreduce_print): Rename as...
10081 (yy_reduce_print): this.
10082 Display values and locations.
10083 * data/yacc.c (yy_reduce_print): Likewise.
10084 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10085 (yysymprint): Move higher to be visible from yy_reduce_print).
10087 * tests/calc.at: Adjust the expected length of the traces.
10089 2005-11-14 Akim Demaille <akim@epita.fr>
10091 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
10092 from 1 to N, while values and location start at 0.
10093 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
10095 2005-11-14 Akim Demaille <akim@epita.fr>
10097 * data/glr.c (yy_reduce_print): Fix the $ number.
10099 2005-11-14 Akim Demaille <akim@epita.fr>
10101 "Use" parse parameters.
10102 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
10103 * data/glr.c, data/glr.cc: Use them.
10104 * data/glr.c (YYUSE): Have a C++ definition that supports
10107 2005-11-14 Akim Demaille <akim@epita.fr>
10109 * data/glr.c (yyexpandGLRStack): Declare only if defined.
10111 2005-11-14 Akim Demaille <akim@epita.fr>
10113 * data/glr.cc: New.
10114 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
10116 2005-11-12 Akim Demaille <akim@epita.fr>
10118 Let position and location be PODs.
10119 * data/location.cc (position::initialize, location::initialize): New.
10120 (position::position, location::location): Define only if
10121 b4_location_constructors is defined.
10122 * data/lalr1.cc (b4_location_constructors): Define it for backward
10124 * doc/bison.texinfo (Initial Action Decl): Use initialize.
10126 2005-11-12 Akim Demaille <akim@epita.fr>
10128 * data/lalr1.cc: Move the body of the ctor and dtor into the
10129 parser file (instead of the header).
10130 Wrap the implementations in a "namespace yy".
10132 2005-11-12 Akim Demaille <akim@epita.fr>
10134 Have glr.c include its header file when created.
10135 * data/glr.c (b4_shared_declarations): New.
10136 Output them verbatim in the parser if !%defines, otherwise
10137 output then in the header file, and include it instead.
10139 2005-11-11 Akim Demaille <akim@epita.fr>
10141 * data/glr.c: Comment changes.
10143 2005-11-11 Akim Demaille <akim@epita.fr>
10145 When yydebug, report semantic and location values for reductions.
10146 * data/glr.c (yy_reduce_print): Report the semantic values and the
10148 (YY_REDUCE_PRINT): Adjust.
10149 (yyglrReduce): Use them.
10150 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
10151 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
10152 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
10155 2005-11-10 Akim Demaille <akim@epita.fr>
10157 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
10158 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
10159 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
10161 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
10163 * m4/cxx.m4, examples/Makefile.am: Don't build
10164 examples/calc++ if no C++ compiler is available. (trivial change)
10166 2005-11-09 Akim Demaille <akim@epita.fr>
10168 * src/scan-skel.l: Use a couple of asserts.
10170 2005-11-03 Akim Demaille <akim@epita.fr>
10172 In some (weird) cases, the final state number is incorrect.
10173 Reported by Alexandre Duret-Lutz.
10174 * src/LR0.c (state_list_append): Remove the computation of
10176 (save_reductions): Do it here.
10177 (get_state): Alpha conversion.
10178 (generate_states): Use a for loop.
10179 * src/gram.h (item_number_is_rule_number)
10180 (item_number_is_symbol_number): New.
10181 * src/state.c: Use assert.
10182 * src/system.h: Include assert.h.
10183 * tests/sets.at (Accept): New.
10185 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10187 * data/glr.c (yyfill): Adjust comment.
10188 (yyresolveAction): Initialize default location properly
10189 for empty right-hand sides.
10190 (yydoAction): Ditto.
10191 Add comment explaining apparently dead code.
10192 * tests/glr-regression.at
10193 (Incorrectly initialized location for empty right-hand side in GLR):
10196 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
10198 * bootstrap (cleanup_gnulib): New function. Use it to clean up
10199 gnulib when interrupted. This fixes some race conditions and
10200 works around some portability problems (one noted by Paul
10203 2005-10-22 Akim <akim@epita.fr>
10205 * Makefile.cfg: Adjust to config -> build-aux.
10206 Reported by twledo.
10208 2005-10-21 Akim Demaille <akim@epita.fr>
10210 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
10212 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
10213 * data/yacc.c (b4_Pure_if): Rename as...
10214 (b4_yacc_pure_if): this.
10215 (YY_SYMBOL_PRINT, yyparse): Adjust.
10216 * doc/bison.texinfo: Formatting changes.
10218 2005-10-21 Akim Demaille <akim@epita.fr>
10220 Finish the transition config -> build-aux.
10221 * configure.ac, Makefile.am: Use build-aux.
10222 * config/prev-version, config/announce-gen, config/Makefile.am:
10224 * build-aux/prev-version, build-aux/announce-gen,
10225 * build-aux/Makefile.am: here.
10227 2005-10-14 Akim Demaille <akim@epita.fr>
10229 * examples/calc++/test: Use set -x only when VERBOSE.
10231 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
10233 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
10234 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
10236 2005-10-13 Akim Demaille <akim@epita.fr>
10238 * src/scan-skel.l: Output the base name parts of the parser and
10240 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
10242 Use this to exercise C++ outputs in subdirs.
10243 Reported by Oleg Smolsky.
10245 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
10247 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
10248 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
10249 Problem reported by John P. Hartmann.
10250 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
10251 already defined it.
10253 2005-10-12 Akim Demaille <akim@epita.fr>
10255 * src/parse-gram.y (version_check): Exit 63 to please missing
10256 (stands for "version mismatch).
10257 * tests/input.at, doc/bison.texinfo: Adjust.
10259 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
10261 Work around portability problems with Visual Age C compiler
10262 (xlc and xlC_r) reported by John P. Hartmann.
10263 * data/location.cc (initial_column, initial_line): Remove.
10264 All uses replaced by 0 and 1.
10265 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
10266 that xlc complains about.
10267 * src/scan-skel.l (skel_wrap): Likewise.
10268 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
10270 * data/yacc.c (YYMODERN_C): New macro, which also looks at
10271 __STDC_VERSION__. Use it everywhere instead of looking at
10272 __STDC__ and __cplusplus.
10274 2005-10-10 Akim Demaille <akim@epita.fr>
10276 * examples/calc++/test: Be quiet unless VERBOSE.
10278 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
10280 * data/c.m4 (yydestruct, yysymprint):
10281 Use YYUSE instead of casting to void.
10282 * data/glr.c (YYUSE): New macro.
10283 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10284 Use it instead of rolling our own.
10285 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10287 Use /*CONSTCOND*/ to suppress lint warnings.
10288 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10289 (YY_STACK_PRINT): Use 'false' not '0'.
10290 (YYUSE): New macro.
10291 (yysymprint_, yydestruct_): Use it instead of rolling our own.
10292 * data/yacc.c (YYUSE): New macro.
10293 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
10294 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
10295 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
10298 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
10299 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
10301 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
10303 Undo the parts of the unlocked-I/O change that substituted
10304 putc or puts for printf. This might hurt performance a bit,
10305 but some people prefer the printf style.
10306 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
10307 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
10308 All uses replaced by YYFPRINTF and YYDPRINTF.
10309 * data/yacc.c: Likewise.
10310 * lib/bitset.c (bitset_print): Likewise.
10311 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
10313 * lib/lbitset.c (debug_lbitset): Likewise.
10314 * src/closure.c (print_firsts, print_fderives): Likewise.
10315 * src/gram.c (grammar_dump): Likewise.
10316 * src/lalr.c (look_ahead_tokens_print): Likewise.
10317 * src/output.c (escaped_output): Likewise.
10318 (user_actions_output): Break apart two printfs.
10319 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
10320 * src/reduce.c (reduce_print): Likewise.
10321 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10322 * src/system.h: Include unlocked-io.h rathe than stdio.h.
10324 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10325 Use assignments rather than casts-to-void to suppress
10326 unused-variable warnings. This pacifies 'lint'.
10327 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
10328 unused-variable warnings.
10330 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10332 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10334 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
10336 Use unlocked I/O for a minor performance improvement on hosts like
10337 GNU/Linux and Solaris that support unlocked I/O. The basic idea
10338 is to use the gnlib unlocked-io module, and to prefer putc and
10339 puts to printf when either will work (since the latter doesn't
10340 come in an unlocked flavor).
10341 * bootstrap (gnulib_modules): Add unlocked-io.
10342 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
10343 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
10344 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
10345 and similarly for puts and putc and printf.
10346 * data/yacc.c: Likewise.
10347 * lib/bitset.c (bitset_print): Likewise.
10348 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
10349 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
10351 * lib/lbitset.c (debug_lbitset): Likewise.
10352 * src/closure.c (print_firsts, print_fderives): Likewise.
10353 * src/gram.c (grammar_dump): Likewise.
10354 * src/lalr.c (look_ahead_tokens_print): Likewise.
10355 * src/output.c (escaped_output): Likewise.
10356 (user_actions_output): Coalesce two printfs.
10357 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
10358 * src/reduce.c (reduce_print): Likewise.
10359 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10360 * src/system.h: Include unlocked-io.h rather than stdio.h.
10362 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
10363 this confuses xgettext.
10365 2005-10-02 Akim Demaille <akim@epita.fr>
10367 * bootstrap (gnulib_modules): Add strverscmp.
10368 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
10369 * m4/.cvsignore: Add strverscmp.m4.
10370 * src/parse-gram.y (%require): New token, new rule.
10371 (version_check): New.
10372 * src/scan-gram.l (%require): Adjust.
10373 * tests/input.at (AT_REQUIRE): New.
10375 * doc/bison.texinfo (Require Decl): New.
10376 (Calc++ Parser): Use %require.
10378 2005-10-02 Akim Demaille <akim@epita.fr>
10380 * data/location.cc: New.
10382 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
10383 Akim Demaille <akim@epita.fr>
10385 Make sure -odir/foo.cc creates dir/location.hh etc.
10386 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
10387 (spec_file_prefix, spec_verbose_file, spec_graph_file)
10388 (spec_defines_file): Now const.
10390 (short_base_name): Remove.
10391 * src/files.c: Adjust.
10392 (dirname.h): Include.
10393 (base_name): Don't prototype it.
10394 (finput): Remove, duplicates gram_in.
10395 (full_base_name, short_base_name): Replace by...
10396 (all_but_ext, all_but_tab_ext): these.
10397 (compute_base_names): Rename as...
10398 (compute_file_name_parts): this.
10399 Update to compute the new variables, including dir_prefix.
10400 Adjust dependencies.
10401 * src/output.c (prepare): Output them.
10402 * src/reader.c: Adjust to use gram_in, not finput.
10403 * src/scan-skel.l (@dir_prefix@): New.
10405 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10407 * lib/subpipe.c: New function end_of_output_subpipe() added
10408 to allow support for non-posix systems. This is a no-op function
10411 * lib/subpipe.h: New function end_of_output_subpipe() added
10412 to allow support for non-posix systems. This is a no-op function
10415 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
10416 handle the lack of pipe/fork functionality on non-posix systems.
10418 * djgpp/Makefile.maint: DJGPP specific file.
10420 * djgpp/README.in: DJGPP specific file.
10422 * djgpp/config.bat: DJGPP specific configuration file.
10424 * djgpp/config.sed: DJGPP specific configuration file.
10426 * djgpp/config.site: DJGPP specific configuration file.
10428 * djgpp/config_h.sed: DJGPP specific configuration file.
10430 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
10432 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
10434 2005-10-02 Akim Demaille <akim@epita.fr>
10436 * data/location.cc: New, extract from...
10437 * data/lalr1.cc: here.
10438 (location.hh): Include it after the user prologue, in case the
10439 filename type is defined by the user.
10440 Forward declation location and position before the pre-prologue.
10441 (yyresult_): Rename as...
10442 (yyresult): this, it's a local variable, not an attribute.
10443 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
10445 2005-10-01 Akim Demaille <akim@epita.fr>
10447 * examples/extexi: Restore the #line generation.
10449 2005-09-30 Akim Demaille <akim@epita.fr>,
10450 Alexandre Duret-Lutz <adl@gnu.org>
10452 Move the token type and YYSTYPE in the parser class.
10453 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
10454 (parser::token): New, from the moved free definition of tokens.
10455 (parser::semantic_value): Now a full definition instead of an
10456 indirection to YYSTYPE.
10457 (b4_post_prologue): No longer included in the header file, but
10458 in the implementation file.
10459 * doc/bison.texi (C+ Language Interface): Update.
10460 * src/parse-gram.y: Support unary %define.
10461 * tests/actions.at: Define global_tokens_and_yystype for backward
10462 compatibility until we update the tests.
10463 * tests/calc.at: Idem.
10464 (first_line, first_column, last_line, last_column): Define for lalr1.cc
10465 to simplify the code.
10467 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
10469 Port to SunOS 4.1.4, which lacks strtoul and strerror.
10470 Ah, the good old days! Problem reported by Peter Klein.
10471 * bootstrap (gnulib_modules): Add strerror, strtoul.
10472 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
10473 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
10475 2005-09-29 Akim Demaille <akim@epita.fr>
10477 * data/c.m4 (b4_error_verbose_if): New.
10478 * data/lalr1.cc: Use it.
10479 (YYERROR_VERBOSE_IF): Remove.
10480 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
10481 parser members, replaced by...
10482 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
10484 (yysyntax_error_): Takes the state number as argument.
10485 (yyreduce_print_): Use the argument yyrule, not the former
10488 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
10490 * bootstrap (gnulib_modules): Add verify.
10491 * lib/.cvsignore: Add verify.h.
10492 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
10493 * src/system.h (verify): Remove.
10494 Include verify.h instead.
10495 * src/tables.c (tables_generate): Use new API for 'verify'.
10497 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
10499 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
10500 local variables whose names begin with 'yy'.
10501 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10502 Trivial changes from Joel E. Denny.
10504 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
10506 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
10507 don't use alloca any more.
10509 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
10510 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
10511 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
10512 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
10513 to match yacc.c, to test more hosts.
10515 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
10517 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
10518 doesn't affect behavior.
10519 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
10521 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
10522 This works a bit better with glibc, if user code has already included
10524 * doc/bison.texinfo (Bison Parser): Document that users can't
10525 arbitrarily use malloc and free for other purposes. Document
10526 that <alloca.h> and <malloc.h> might be included.
10527 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
10528 user must declare alloca.
10530 * HACKING (release): Forwarn the Translation Project about
10533 2005-09-20 Akim Demaille <akim@epita.fr>
10535 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
10537 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
10539 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
10540 (YYSTACK_ALLOC_MAXIMUM): Use it.
10541 (yysyntax_error): New function.
10542 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
10543 multiple syntax errors are reported, and alloca is being used.
10544 Instead, reallocate buffers twice as big each time, so that
10545 we waste at most half the allocated memory. Start with a small
10546 (128-byte) buffer that will suffice in most cases anyway.
10547 Use yysyntax_error to do most of the work.
10549 * doc/bison.texinfo (Error Reporting, Table of Symbols):
10550 yynerrs is the number of errors reported, not the number of
10551 errors encountered.
10553 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10554 Mark it as expected to fail.
10555 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10556 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10557 Don't start user-code symbols with "yy", to avoid name space problems.
10559 2005-09-19 Akim Demaille <akim@epita.fr>
10561 Remove the traits, failed experiment.
10562 It never proved useful, and anyway because of the current
10563 definition, it was not possible to have several specialization of
10564 this traits, making it useless.
10565 * data/lalr1.cc (yy:traits): Remove.
10566 Inline its definitions in the parser class.
10568 2005-09-19 Akim Demaille <akim@epita.fr>
10570 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10571 least Mac OSX with a /usr/local install of gettext.
10573 2005-09-19 Akim Demaille <akim@epita.fr>
10575 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10576 and yytoken for similarity with the other skeletons.
10578 2005-09-19 Akim Demaille <akim@epita.fr>
10580 * NEWS, configure.ac: update version number to 2.1a.
10582 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10584 * NEWS: Version 2.1.
10586 * NEWS: Remove notice of yytname change, since it was never in an
10588 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10590 * src/output.c (prepare): Likewise.
10591 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10592 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10593 is not defined. This is an awful hack, but it's enough for now.
10594 All callers changed.
10595 * tests/glr-regression-at (make_value): Args are const pointers now,
10596 to avoid GCC warning.
10597 (Duplicated user destructor for lookahead): New test. Currently
10598 skipped. It fails on my host but I'm not sure it'll always fail.
10600 2005-09-16 Akim Demaille <akim@epita.fr>
10602 * src/symtab.h (struct symbol): Declare the printer and destructor
10603 as const, to avoid accidental calls to free.
10604 (symbol_destructor_set, symbol_printer_set): Adjust.
10605 * src/symtab.c: Adjust.
10607 2005-09-16 Akim Demaille <akim@epita.fr>
10609 * data/c.m4 (b4_token_enums): New.
10610 (b4_token_defines): Rename as...
10611 (b4_token_enums_defines): this.
10612 (b4_token_defines): New, output only the #defines.
10613 * data/yacc.c, data/glr.c: Adjust.
10614 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10615 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10618 2005-09-16 Akim Demaille <akim@epita.fr>
10620 * data/lalr1.cc (yylex_): Remove, inline its code.
10621 (yyreport_syntax_error_): Remove, replaced by...
10622 (yysyntax_error_): this which returns a string and leaves to the
10623 caller the call to the users' error function.
10624 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10625 Move from members of the parser object...
10626 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10627 to local variables of the parse function.
10629 2005-09-16 Akim Demaille <akim@epita.fr>
10631 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10632 since it's in Bison's name space.
10634 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10636 * data/glr.c (yyresolveValue): Add default case to pacify
10637 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10639 * NEWS: Document when yyparse started to return 2.
10640 * doc/bison.texinfo (Parser Function): Document when yyparse
10643 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10644 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10646 (class position): file_name -> filename (reverting). All uses changed.
10648 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10650 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10651 do anything if $@ exists. This reverts part of the 2005-07-07
10654 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10656 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10657 contains obsolete information and isn't worth distributing as a
10658 separate file anyway.
10659 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10660 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10661 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10662 (yyparse): Abort if user code uses longjmp to throw an unexpected
10665 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10667 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10668 Suggested by twlevo@xs4all.nl.
10670 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10671 This avoids a diagnostic from gcc -Wswitch-enum.
10672 Problem reported by twlevo@xs4all.nl.
10674 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10675 standards. Use "file name" or "file" or "name", depending on
10677 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10678 not to hack/foo.tab.c.
10679 (Calc++ Top Level): 2nd arg of main is not const.
10680 * data/glr.c: b4_filename -> b4_file_name.
10681 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10683 (class position): filename -> file_name. All uses changed.
10684 * data/yacc.c: b4_filename -> b4_file_name.
10685 * lib/bitset.h: filename -> file_name in local vars.
10686 * lib/bitset_stats.c: Likewise.
10687 * src/files.c: Likewise.
10688 * src/scan-skel.l ("@output ".*\n): Likewise.
10689 * src/files.c (file_name_split): Renamed from filename_split.
10690 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10692 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10694 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10695 to accommodate latest gnulib.
10697 * tests/glr-regression.at (Duplicate representation of merged trees):
10698 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10700 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10703 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10705 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10706 All uses changed. Invoke user destructor after an error during a
10707 split parse (trivial change from Joel E. Denny).
10709 * tests/glr-regression.at
10710 (User destructor after an error during a split parse): New test case.
10711 Problem reported by Joel E. Denny in:
10712 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10714 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10716 * README-cvs: Give URLs for recommended tools.
10717 Mention Gzip version problem, and bootstrapping issues.
10718 Remove troubleshooting section, as it's somewhat obsolete.
10720 * bootstrap (no_cache): New var, to accommodate different wget
10721 variants. Use it instead of '-C off'. Problem reported by
10724 * data/glr.c (yydestroyStackItem): New function.
10725 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10726 debugging information. Problem reported by Joel E. Denny.
10728 2005-08-25 Akim Demaille <akim@epita.fr>
10730 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10732 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10734 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10735 Don't invoke destructor on unresolved entries.
10736 * tests/glr-regression.at
10737 (User destructor for unresolved GLR semantic value): New test case.
10738 Problem reported by Joel E. Denny in:
10739 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10741 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10743 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10745 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10746 lib-prefix.m4, po.m4.
10748 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10749 in yydestruct diagnostic, since it might not be an error.
10750 Problem reported by Joel Denny near end of
10751 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10752 * data/lalr1.cc (yyerturn): Likewise.
10753 * data/yacc.c (yyreturn): Likewise.
10754 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10756 * src/files.c: Remove obsolete FIXME comment.
10758 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10759 with the other templates, and to fix bogus run-on messages such
10760 as the one reported at the end of
10761 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10762 All callers changed to avoid the newline.
10763 (yyprocessOneStack): Output two lines rather than one, to accommodate
10764 the above change. This changes the debug output format slightly.
10766 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10767 reported by Joel E. Denny in
10768 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10770 * tests/glr-regression.at (Duplicate representation of merged trees):
10771 New test, from Joel E. Denny in:
10772 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10773 * THANKS: Add Joel E. Denny.
10775 * configure.ac (AC_INIT): Bump to 2.0c.
10777 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10779 * NEWS: Version 2.0b.
10781 * Makefile.am (SUBDIRS): Put examples before tests, so that
10782 "make check" doesn't finish with "All 1 tests passed".
10784 * tests/regression.at (Token definitions): Don't rely on
10785 AT_PARSER_CHECK for data that contains backslashes. It currently
10786 uses 'echo', and 'echo' isn't portable if its argument contains
10787 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10788 that the byte '\0xff' is not printable in the C locale; it is,
10789 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10790 not printable, so use '\0x81' to test.
10792 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10793 version of GCC, since the macro is used with non-GCC compilers.
10795 Fix core dump reported by Pablo De Napoli in
10796 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10797 * tests/regression.at (Invalid inputs with {}): New test.
10798 * src/parse-gram.y (token_name): Translate type before using
10801 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10802 the user's name space. All uses changed to __attribute__
10804 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10805 Add __attribute__ ((__noreturn__)).
10807 * etc/clcommit: Remove. We weren't using it, and it failed
10808 "make maintainer-distcheck".
10809 * Makefile.maint: Merge from coreutils.
10810 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10811 (syntax-check-rules): Change list of rules as described below.
10812 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10813 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10814 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10815 (sc_trailing_space): New rules.
10816 (sc_xalloc_h_in_src): Remove.
10817 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10818 (sc_space_tab, sc_error_exit_success, sc_changelog):
10819 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10820 (makefile-check, po-check, author_mark_check):
10821 (makefile_path_separator_check, copyright-check):
10822 Use grep -n, to make it easier to find violations.
10823 Use CVS_LIST and CVS_LIST_EXCEPT.
10824 (header_regexp, h_re): Remove.
10826 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10827 (my-distcheck): Use more-modern GCC flags.
10828 (signatures, %.asc): Remove.
10829 (rel-files, announcement): Remove signatures.
10830 Restore old updating code, even though we don't use it, so
10831 that we're the same as coreutils.
10832 (alpha, beta, major): Depend on news-date-check.
10833 Make the upload commands.
10835 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10836 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10837 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10838 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10839 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10840 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10841 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10842 * tests/sets.at: Likewise.
10844 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10845 we comment out the Autoconf version number.
10846 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10847 it's error-prone and "make maintainer-distcheck" rejects it.
10849 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10850 Indent calls to "error" to pacify "make maintainer-distcheck",
10851 when the calls are not intended to be translated.
10852 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10854 * src/Makefile.am (DEFS): Use +=, to pacify
10855 "make maintainer-distcheck".
10856 (bison_SOURCES): Add scan-skel.h.
10857 (sc_tight_scope): New rule, from coreutils.
10859 * src/files.c (src_extension, header_extension):
10860 Now static, not extern.
10861 * src/getargs.c (short_options): Likewise.
10862 * src/muscle_tab.c (muscle_table): Likewise.
10863 * src/parse-gram.y (current_class, current_type, current_prec):
10865 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10866 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10867 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10868 void, to avoid warning when NLS is disabled.
10869 * src/output.c: Include scan-skel.h.
10870 (scan_skel): Remove decl, since scan-skel.h does this.
10872 Indent calls to "error" to pacify "make maintainer-distcheck".
10873 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10874 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10875 "make maintainer-distcheck".
10876 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10877 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10878 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10879 (skel_lex_destroy, scan_skel): Move these decls to...
10880 * src/scan-skel.h: New file.
10881 * src/uniqstr.c (uniqstr_assert):
10882 Indent calls to "error" to pacify "make maintainer-distcheck".
10884 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10887 * tests/torture.at: Revamp to avoid misuse of atoi that
10888 "make maintainer-distcheck" complained about.
10890 * examples/extexi (message): Don't print a message more than once,
10891 and omit line-number decoration that makes Emacs compile think
10892 that informative messages are worth worrying about.
10894 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10896 * configure.ac: Update version number.
10898 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10900 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10901 autogenerated by the maintainer.
10902 * examples/calc++/.cvsignore: Add *.yy.
10904 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10905 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10906 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10908 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10910 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10911 from maintainer-distcheck about casting the argument of 'free'.
10913 * NEWS: Mention recent yytname changes.
10914 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10916 * bootstrap: For translations that have not yet been upgraded to
10917 the new runtime-po domain, prime the pump by extracting the
10918 relevant strings from the obsolete translations. This code can be
10919 removed once the bison-runtime domain has been translated by each
10922 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10923 now that token names are already quoted.
10925 Fix problem reported by Anthony Heading.
10926 * data/glr.c (YYTOKEN_TABLE): New macro.
10927 (yytname): Define if YYTOKEN_TABLE.
10928 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10929 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10930 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10931 * src/output.c (prepare_symbols): Output token_table_flag.
10933 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10935 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10936 again if the first call fails.
10938 * data/glr.c (yytnamerr): New function.
10939 (yyreportSyntaxError): Use it to dequote most string literals.
10940 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10941 with other skeletons. All uses changed.
10942 (yytnameerr_): New function.
10943 (yyreport_syntax_error): Use it to dequote most string literals.
10944 * data/yacc.c (yytnamerr): New function.
10945 (yyerrlab): Use it to decode most string literals.
10946 * doc/bison.texinfo (Decl Summary, Calling Convention):
10947 Clarify quoting convention of yytname.
10948 * src/output.c (prepare_symbols): Quote all names. This undoes
10949 the 2005-04-17 change, which is now accomplished (mostly) via
10950 changes in the parsers as described above.
10951 * tests/regression.at (Token definitions, Web2c Actions):
10952 Undo most 2005-04-17 change here, too.
10954 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10956 Fix more problems reported by twlevo@xs4all.nl.
10957 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10958 remove trailing spaces. This loses the exit status of ./types,
10959 and isn't needed since ./types shouldn't be emitting trailing
10961 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10962 as the stack isn't valid in that case.
10964 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10965 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10966 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10967 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10969 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10970 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10971 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10974 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10975 overly-picky compilers that reject 'char *foo = "bar";'.
10977 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10978 to FILE * parameter, not to stderr. This fixes a typo introduced
10979 in the 2005-07-12 change.
10981 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10982 warnings from GCC 4.
10984 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10985 (yyglrShiftDefer, yysplitStack):
10986 Remove unused parameters b4_pure_formals. All uses changed.
10987 (yyglrShift): Remove unused parameters b4_user_formals.
10989 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10991 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10993 Destructor cleanups and regularization among the three skeletons.
10994 * NEWS: Document the behavior changes.
10995 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10996 stack before failing, as the cleanup code will do it for us now.
10997 * data/lalr1.cc (yyerrlab): Likewise.
10998 * data/glr.c (yyparse): Pop everything off the stack before
10999 freeing it, so that destructors get called properly.
11000 * data/lalr1.cc (yyreturn): Likewise.
11001 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11002 This is more consistent.
11003 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11004 why destructors might be called. 1.875 -> 2.1.
11005 (Destructor Decl, Decl Summary, Table of Symbols):
11006 Some English-language cleanups for %destructor.
11007 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11008 Add output line for destructor of start symbol.
11009 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11010 because of that same extra output line.
11012 * NEWS: Document minor wording changes in diagnostics of
11013 Bison-generated parsers.
11014 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11015 Remove unused formals. All uses changed.
11016 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11017 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11018 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11019 Rename yyoverflowab to yyexhaustedlab.
11020 When memory exhaustion occurs during syntax-error reporting,
11021 report it separately rather than in a single diagnostic; this
11023 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11024 (Memory Exhausted): Renamed from Parser Stack Overflow.
11025 Revamp wording slightly to prefer "memory exhaustion".
11026 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11028 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11030 Add i18n support to the GLR skeleton. Partially fix the C++
11031 skeleton; a C++ expert needs to finish this. Remove debugging
11032 msgids; there's little point to having them translated, since they
11033 can be understood only by someone who can read the
11034 (English-language) source code.
11036 Generate runtime-po/bison-runtime.pot automatically, so that we
11037 don't have to worry about garbage getting in that file. We'll
11038 make sure after the next official release that old msgids don't
11040 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11042 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11043 Now auto-generated.
11044 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11045 Fix typos in explanations of the runtime file.
11046 * bootstrap: Change gettext keyword from YYI18N to YY_.
11047 Use standard Makefile.in.in in runtime-po, since we'll arrange
11048 for backward-compatible bison-runtime.po files in a different way.
11049 * data/glr.c (YY_): New macro, from yacc.c.
11050 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11051 Translate messages intended for users.
11052 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11053 the wording in the other skeletons. We don't know that the memory
11055 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11056 Use same method that yacc.c uses.
11057 Don't translate debugging messages.
11058 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11059 it doesn't work (yet), and requires C++ expertise to fix.
11060 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11061 Move defn to a more logical place, to be consistent with other
11063 Don't translate debugging messages.
11064 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11065 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11066 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11067 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11069 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11070 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11072 * tests/glr-regression.at (Badly Collapsed GLR States):
11074 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11075 yylex should return 0 at EOF rather than aborting.
11077 Improve tests for stack overflow in GLR parser.
11078 Problem reported by twlevo@xs4all.nl.
11079 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11081 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11082 can handle the problem.
11083 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11084 (yyparse): New local variable yyresult to record the result.
11085 Use result of setjmp to set it, rather than storing itinto
11087 (yyDone): Remove label.
11088 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
11089 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
11090 if YYABORT is used).
11091 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
11092 yyparse status; put status > 1 into diagnostic.
11093 Check that status==2 works.
11094 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
11095 Use exit status 3 for failure to open (which shouldn't happen).
11097 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
11099 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
11100 1 on syntax error; just let yyparse do its thing.
11101 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
11102 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
11103 (Exploding the Stack Size with Alloca):
11104 (Exploding the Stack Size with Malloc):
11105 Expect exit status 2, not 1, since the parser is supposed to blow
11106 its stack. Problem reported by twlevo@xs4all.nl.
11108 * data/glr.c (yyparse): Don't assume that the initial calls
11109 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
11110 Print a stack-overflow message and fail instead.
11111 Initialize the line-number information before creating the stack,
11112 so that the stack-overflow message can report line zero safely.
11114 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
11116 Fix problems reported by twlevo@xs4all.nl.
11117 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
11118 (yyuserMerge): Provide a default case if b4_mergers is empty.
11119 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
11120 * tests/glr-regression.at
11121 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11122 Add casts to pacify C++ compilers.
11123 * tests/glr-regression.at (Improper merging of GLR delayed action
11124 sets): Declare yylex before using it.
11125 * tests/Makefile.am (maintainer-check-g++): Fix a stray
11126 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
11127 test for valgrind; valgrind is independent of g++.
11128 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
11129 for compatibility with POSIX 1003.1-2001 (if running coreutils).
11130 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
11131 Use a destructor, so that we can expand the stack. Change
11132 YYSTYPE to char * so that we can free it. Cast result of malloc.
11134 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11136 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
11137 a valgrind failure. Problem reported by twlevo@xs4all.nl.
11139 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
11141 * PACKAGING: New file, suggested by Bruno Haible and taken from
11142 similar wording in gettext's PACKAGING file.
11143 * NEWS: Mention PACKAGING.
11144 * Makefile.am (EXTRA_DIST): Add PACKAGING.
11146 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
11148 * NEWS: Document recent i18n improvements.
11149 * bootstrap: Get runtime translations into runtime-po.
11150 Create runtime-po files automatically, if possible.
11151 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
11152 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
11153 does not infringe on the user's name space.
11154 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
11155 * doc/bison.texinfo (Internationalization): Revamp the English
11156 and Texinfo syntax a bit, to try to make it clearer.
11157 (Bison Options, Option Cross Key): Mention --print-localedir.
11158 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
11159 YYENABLE_NLS. Quote a bit more.
11160 * runtime-po/.cvsignore: New file.
11161 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
11162 * runtime-po/Rules-quot: Remove; now created by bootstrap.
11163 * runtime-po/quot.sed: Likewise.
11164 * runtime-po/boldquot.sed: Likewise.
11165 * runtime-po/en@quot.header: Likewise.
11166 * runtime-po/en@boldquot.header: Likewise.
11167 * runtime-po/insert-header.sin: Likewise.
11168 * runtime-po/remove-potcdate.sin: Likewise.
11169 * runtime-po/Makevars: Likewise.
11170 * runtime-po/LINGUAS: Likewise.
11171 * runtime-po/de.po: Likewise; we will rely on the translation project
11172 to maintain this, so "bootstrap" should get it.
11173 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
11175 * src/main.c (main): Bind the bison-runtime domain, too.
11177 2005-07-12 Bruno Haible <bruno@clisp.org>
11179 * data/yacc.c: Include <libintl.h> when NLS is enabled.
11180 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
11181 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
11182 * runtime-po: New directory.
11183 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
11184 $(DOMAIN).pot-update rule, so that old messages are never dropped.
11185 * runtime-po/Rules-quot: New file, copied from po/.
11186 * runtime-po/quot.sed: Likewise.
11187 * runtime-po/boldquot.sed: Likewise.
11188 * runtime-po/en@quot.header: Likewise.
11189 * runtime-po/en@boldquot.header: Likewise.
11190 * runtime-po/insert-header.sin: Likewise.
11191 * runtime-po/remove-potcdate.sin: Likewise.
11192 * runtime-po/Makevars: New file.
11193 * runtime-po/POTFILES.in: New file.
11194 * runtime-po/LINGUAS: New file.
11195 * runtime-po/bison-runtime.pot: New file.
11196 * runtime-po/de.po: New file.
11197 * m4/bison.m4: New file.
11198 * Makefile.am (SUBDIRS): Add runtime-po.
11199 (aclocaldir, aclocal_DATA): New variables.
11200 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
11202 * src/getargs.c (usage): Document --print-localedir option.
11203 (PRINT_LOCALEDIR_OPTION): New enum item.
11204 (long_options): Add --print-localedir option.
11205 (getargs): Handle --print-localedir option.
11206 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
11207 (Internationalization): New section.
11209 2005-07-12 Akim Demaille <akim@epita.fr>
11211 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
11212 for consistency with the rest of the code.
11213 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
11216 2005-07-12 Akim Demaille <akim@epita.fr>
11218 * src/parse-gram.y: Use %printer instead of YYPRINT.
11220 2005-07-12 Akim Demaille <akim@epita.fr>
11222 * src/symtab.h, src/symtab.c (symbol_print): New.
11223 * src/symlist.h, src/symlist.c (symbol_list_print): New.
11224 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
11226 2005-07-12 Akim Demaille <akim@epita.fr>
11228 * data/glr.c (b4_syncline): Fix (swap) the definitions of
11229 b4_at_dollar and b4_dollar_dollar.
11231 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
11233 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
11234 and Pennello's paper.
11236 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
11238 * data/yacc.c (yyparse): Undo previous patch. Instead,
11239 set yylsp[0] and yyvsp[0] only if the initial action
11240 sets yylloc and yylval, respectively.
11242 * data/yacc.c (yyparse): In the initial action, set
11243 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
11244 This avoids the use of undefined variables if the initial
11245 action does not set yylloc and/or yylval.
11247 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
11249 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
11250 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
11251 Remove from CVS. These files are automatically generated.
11252 * examples/extexi: Clarify that this file is now part of Bison,
11253 not GNU M4, and that it works with any POSIX-compatible Awk.
11254 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
11255 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
11256 so that we also get calc++-parser.yy. Geneate it.
11257 Use $(AWK), not gawk, since any conforming Awk will do.
11258 Put comment before action, since older 'make' can't handle comment
11260 $(BUILT_SOURCES): List all built sources, not just some of them.
11261 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
11262 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
11263 $($(calc_sources_generated)): Remove unnecessary test for existence
11264 of target. (This had a shell syntax error anyway; a stray "x".)
11265 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
11267 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
11269 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
11270 implied by the other modules.
11272 2005-07-06 Akim Demaille <akim@epita.fr>
11274 Bind examples/calc++ to the package.
11275 * examples/calc++/Makefile: Remove, replaced by...
11276 * examples/calc++/Makefile.am: ... this new file.
11277 * examples/calc++/test: Remove input.
11278 * examples/calc++/compile: Remove.
11279 * examples/Makefile.am: New.
11280 * configure.ac, Makefile.am: Adjust.
11281 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
11283 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
11285 * data/glr.c (yyFail): Drastically simplify; since the format argument
11286 never had any % directives, we can simply pass it to yyerror.
11287 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
11288 be modified later, as that is the usual style in glr.c.
11289 Problems reported by Paul Hilfinger.
11291 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
11292 and size overflow errors.
11293 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
11294 in case the user prolog sets feature-test macros like _GNU_SOURCE.
11295 (YYSIZEMAX): New macro.
11296 (yystpcpy): New function, taken from yacc.c.
11297 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
11298 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
11299 so that we don't have to maintain their signatures.
11300 (yyFail): Check for buffer overflow, by using vsnprintf rather
11301 than vsprintf. Allocate a bigger buffer if possible.
11302 Report an error if buffer allocation fails.
11303 (yyStackOverflow): New function.
11304 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
11305 the initialization was successful. It might fail if storage was
11307 (yyexpandGLRStack): Add more checks for storage allocation failure.
11308 Use yyStackOverflow to report failures.
11309 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
11310 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
11311 Don't assume stack number fits in int.
11312 (yysplitStack): Check for storage allocation failure.
11313 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
11314 can print diagnostics on storage allocation failure. All callers
11316 (yyresolveValue): Use yybool for boolean.
11317 (yyreportSyntaxError): Check for size-calculation overflow.
11318 This code is taken from yacc.c.
11319 (yyparse): Check for storage allocation errors when allocating
11322 2005-07-05 Akim Demaille <akim@epita.fr>
11324 Extract calc++ from the documentation.
11325 * doc/bison.texinfo (Calc++): Add the extraction marks.
11326 * examples/extexi: New, from the aborted GNU Programming 2E.
11327 Separate the different paragraph of a file with empty lines.
11328 * examples/Makefile: Use it to extract the whole calc++ example.
11330 2005-06-24 Akim Demaille <akim@epita.fr>
11332 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
11335 2005-06-22 Akim Demaille <akim@epita.fr>
11337 * doc/bison.texinfo (C++ Language Interface): First stab.
11338 (C++ Parsers): Remove.
11340 2005-06-22 Akim Demaille <akim@epita.fr>
11342 * data/lalr1.cc (yylex_): Honor %lex-param.
11344 2005-06-22 Akim Demaille <akim@epita.fr>
11346 Start a set of simple examples.
11347 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
11348 * examples/calc++/calc++-driver.hh,
11349 * examples/calc++/calc++-parser.yy,
11350 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
11351 * examples/calc++/compile, examples/calc++/test: New.
11353 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
11355 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
11356 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
11357 which stems from the 2005-05-27 patch.
11359 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11361 * data/glr.c: Modify treatment of unused parameters to permit use
11362 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
11364 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
11366 Fix infringement on user name space reported by Janos Zoltan Szabo.
11367 * data/yacc.c (yyparse): strlen -> yystrlen.
11369 2005-05-30 Akim Demaille <akim@epita.fr>
11371 * data/lalr1.cc (_): New.
11372 Translate the various messages.
11374 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
11376 Fix infringement on user name space reported by Bruno Haible.
11377 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
11378 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
11379 the user's name space.
11380 (alloca): Include <stdlib.h> to get it, if it's not built in.
11381 (YYMALLOC, YYFREE): Define only if needed.
11382 (malloc, free): Declare, but only if needed, as this infringes on
11383 the user name space.
11385 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
11387 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
11388 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
11390 * lib/ebitset.c (min, max): Undef before defining.
11391 * lib/vbitset.c (min, max): Likewise.
11392 * lib/subpipe.c (create_subpipe): Save local variables in case
11393 vfork clobbers them.
11395 2005-05-24 Bruno Haible <bruno@clisp.org>
11397 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
11398 error message syntax used by gcc-4.0.
11400 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
11402 * README: Mention m4 1.4.3. Remove obsolete advice about
11403 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
11405 * bootstrap: Remove workaround for problem I encountered with
11406 gettext 0.14.1; it seems to be fixed now.
11408 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
11410 * NEWS: Version 2.0a.
11412 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
11413 the previous change.
11415 Various maintainer cleanups.
11416 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
11417 conftest*, for benefit of CVS commands run at the same time as
11418 "configure". Add build-aux, since "bootstrap" now creates it and
11420 * Makefile.cfg (move_if_change): Remove.
11421 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
11422 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
11423 (po_repo, do-po-update, po-update, wget_files, get-targets):
11424 (config.guess-url_prefix, config.sub-url_prefix):
11425 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
11426 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
11427 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
11429 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
11430 this is now the recommended name.
11431 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
11432 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
11433 ylwrap. These files now go into build-aux.
11434 * config/move-if-change: Remove.
11435 * config/prev-version.txt: Bump from 1.75 to 2.0.
11437 * bootstrap: Add stdio-safer, unistd-safer modules.
11438 Remove m4/glibc2.m4 (introduced by latest gnulib, but
11440 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
11441 fopen-safer.c, stdio-safer.h, unistd-safer.h.
11442 * lib/subpipe.c: Include "unistd-safer.h".
11443 (create_subpipe): Make sure all the newly-created
11444 file descriptors are > 2, so that diagnostics don't
11445 get sent down them (which might cause Bison to hang, in theory).
11446 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
11447 * src/files.c (xfopen): Use fopen_safer, not fopen.
11449 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
11450 yesterday's yacc.c fix.
11452 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
11454 * data/glr.c, data/lalr1.cc: Update copyright date.
11456 Fix a destructor bug reported by Wolfgang Spraul in
11457 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
11458 * data/yacc.c (yyabortlab): Don't call destructor, and
11459 don't set yychar to EMPTY.
11460 (yyoverflowlab): Don't call destructor.
11461 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
11462 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
11463 since we no longer output the message "discarding lookahead token
11466 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11468 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
11469 fix a small glitch in debugging output.
11470 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
11471 after YY_SYMBOL_PRINT where needed.
11473 (struct yyGLRState): Add some comments.
11474 (struct yySemanticOption): Add some comments.
11475 (union yyGLRStackItem): Add comment.
11477 (yymergeOptionSets): Correct this to properly perform the union,
11478 avoiding infinite reported by Michael Rosien.
11481 * tests/glr-regression.at: Add test for GLR merging error reported
11484 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
11486 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
11487 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
11488 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
11489 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
11490 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
11491 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
11492 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
11493 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
11494 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
11495 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
11496 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
11497 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
11498 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
11499 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
11500 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
11501 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
11502 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
11503 src/derives.h, src/files.c, src/files.h, src/getargs.c,
11504 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
11505 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
11506 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
11507 src/output.h, src/parse-gram.c, src/parse-gram.h,
11508 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
11509 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
11510 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
11511 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
11512 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
11513 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
11514 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
11515 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
11516 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
11517 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
11518 tests/reduce.at, tests/regression.at, tests/sets.at,
11519 tests/synclines.at, tests/testsuite.at, tests/torture.at:
11520 Update FSF postal mail address.
11522 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
11524 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
11525 Problem reported by Ralf Menzel.
11527 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
11529 * tests/actions.at: Test that stack overflow invokes destructors.
11530 From Marcus Holland-Moritz.
11531 * data/yacc.c (yyerrlab): Move the code that destroys the stack
11533 (yyreturn): to here. That way, destructors are called properly
11534 even if the stack overflows, or the user calls YYACCEPT or
11535 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
11536 (yyoverflowlab): Destroy the lookahead.
11538 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
11540 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
11542 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
11544 * NEWS: Bison-generated C parsers no longer quote literal strings
11545 associated with tokens.
11546 * src/output.c (prepare_symbols): Don't escape strings,
11547 since users don't want to see C escapes.
11548 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
11550 * tests/input.at (Torturing the Scanner): Likewise.
11551 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
11553 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11555 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11556 the data size is known to be too small and we can't increase it.
11557 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11559 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11561 * src/parse-gram.y: Include quotearg.h.
11562 (string_as_id): Quote $1 before using it as a key, since the
11563 lexer no longer quotes it for us.
11564 (string_content): Don't strip quotes, since lexer no longer
11566 * src/scan-gram.l: Include quotearg.h.
11567 ("\""): Omit quote.
11568 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11569 a key, since the rest of the lexer doesn't quote it.
11570 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11571 * tests/regression.at (Token definitions): Check for backslashes
11574 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11575 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11576 (yyparse): Revamp code to generate long syntax error message, to
11577 make it easier to translate, and to avoid problems with arithmetic
11578 overflow. Change "virtual memory" to "memory" in diagnostic, since
11579 we don't know whether the memory is virtual.
11581 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11583 * NEWS: Bison-generated C parsers now use the _ macro to
11585 * data/yacc.c (_) [!defined _]: New macro.
11586 All English strings wrapped inside this macro.
11587 * doc/bison.texinfo (Bison Parser): Document _.
11588 * po/POTFILES.in: Include src/parse-gram.c, since it now
11589 includes translateable strings that parse-gram.y doesn't.
11591 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11593 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11594 reverting the 2004-10-11 change to this function.
11595 (symbol_check_alias_consistency): Don't call symbol_type_set
11596 if the type name is already correct.
11597 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11599 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11601 * tests/regression.at (Token definitions): Don't use a token named
11602 c, as that generates a "#define c ..." that runs afoul of buggy
11603 stdlib.h that uses the identifier c as a member of struct
11604 drand48_data. Problem reported by Horst Wente.
11606 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11608 * bootstrap: Change translation URL from
11609 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11610 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11611 redirection glitches. Problem reported by twlevo@xs4all.nl.
11613 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11615 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11616 after operands; POSIX says this isn't portable for the c99 command.
11618 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11620 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11621 immediately if a data overrun has occurred; this may help us track
11622 down what may be a spurious failure on MacOS.
11624 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11626 Respond to problems reported by twlevo@xs4all.nl.
11628 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11630 * src/vcg.h: Comment fix.
11631 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11632 (G_CMAX): Change to -1 instead of INT_MAX.
11634 * data/yacc.c (yyparse): Omit spaces before #line.
11636 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11638 * src/tables.c (state_number_to_vector_number): Put it inside an
11639 "#if 0", since it's not currently used. Problem reported by
11642 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11644 * src/output.c (escaped_output): Renamed from
11645 escaped_file_name_output, since we now use it for symbol tags as
11646 well. All uses changed.
11647 (symbol_destructors_output, symbol_printers_output):
11648 Escape symbol tags too.
11649 Problem reported by Matyas Forstner in
11650 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11652 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11654 * src/output.c (user_actions_output, token_definitions_output,
11655 symbol_destructors_output, symbol_printers_output): Likewise.
11656 * src/reader.c (prologue_augment): Likewise.
11657 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11659 * src/vcg.c (output_edge): Don't quote linestyle arg.
11660 Problem reported by twlevo@xs4all.nl.
11662 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11664 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11665 example, reported by Derek M Jones. Also, make the example even
11666 more outrageous, to better illustrate how bad the problem is.
11668 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11670 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11671 putsym. Typo reported by Sebastian Piping.
11673 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11675 * doc/bison.texinfo (Language and Grammar): some -> same
11676 (Epilogue): int he -> in the
11677 Typos reported by Sebastian Piping via Justin Pence.
11679 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11681 * tests/glr-regression.at (Improper handling of embedded actions
11682 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11683 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11684 with dollar signs in test names.
11685 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11686 for a similar reason.
11688 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11690 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11691 wants to redefine G_VIEW.
11693 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11695 * src/vcg.c (get_view_str): Remove case for normal_view.
11696 Problem reported by twlevo@xs4all.nl.
11698 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11700 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11701 Problem reported by twlevo@xs4all.nl.
11703 * doc/bison.texinfo: Change @dircategory from "GNU programming
11704 tools" to "Software development". Requested by Richard Stallman
11707 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11709 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11710 Problem reported by twlevo@xs4all.nl.
11712 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11714 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11715 keyword; it's not needed with modern compilers, and it doesn't
11716 affect correctness with older compilers. Suggested by
11719 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11721 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11722 gcc -Wswitch-default.
11723 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11724 * data/yacc.c (yyparse): Likewise.
11726 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11728 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11729 already. Let config.h define any nonstandard values.
11731 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11733 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11734 for the benefit of slower hosts. Problem reported by
11735 Nelson H. F. Beebe.
11737 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11739 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11740 being defined and not used.
11741 * data/lalr1.cc (yyparse): Likewise.
11742 Use "if (false)" rather than "if (0)".
11744 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11746 * TODO: Mention that we should allow NUL bytes in tokens.
11748 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11750 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11751 Problem reported by Hans Aberg.
11753 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11755 * src/getargs.c (version): Happy new year; update overall
11756 program copyright date from 2004 to 2005.
11758 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11759 Problem reported by Hans Aberg.
11760 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11761 (Output file names.): Add a test for the case when standard output
11764 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11766 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11767 to fix an oversight in the Bison 2.0 manual.
11769 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11771 * NEWS: Version 2.0. Reformat the existing news items since
11772 1.875, so that related items are grouped together.
11773 * configure.ac (AC_INIT): Bump version to 2.0.
11774 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11776 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11777 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11778 otherwise, we're not testing alloca. Unfortunately there's no
11779 simple way to consult HAVE_ALLOCA here.
11781 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11784 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11785 hand. This avoids a warning about comparing int to size_t when
11786 GCC warnings are enabled.
11788 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11790 * NEWS: Bison-generated parsers no longer default to using the
11791 alloca function (when available) to extend the parser stack, due
11792 to widespread problems in unchecked stack-overflow detection.
11793 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11794 responsibility to set it to a positive value. This lets the user
11795 specify a value that is not a preprocessor constant.
11796 * data/yacc.c (YYMAXDEPTH): Likewise.
11797 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11798 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11799 to be a compile-time constant. However, explain the constraints on it.
11800 Also, explain the constraints on YYINITDEPTH.
11801 (Table of Symbols): Explain that alloca is no longer the default.
11802 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11805 * doc/bison.texinfo (Location Default Action): Mention that n must
11806 be zero when k is zero. Suggested by Frank Heckenbach.
11808 2004-12-22 Akim Demaille <akim@epita.fr>
11810 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11811 (parser::state_type, parser::semantic_type, parser::location_type):
11812 Private, not public.
11813 (parser::parse): Return ints, not bool.
11814 Returning a bool introduces a problem: 0 corresponds to false, and
11815 it seems weird to return false on success. Returning true changes
11816 the conventions for yyparse.
11817 Alternatively we could return void and send an exception.
11818 There is no clear consensus (yet?).
11819 (state_stack, semantic_stack, location_stack): Rename as...
11820 (state_stack_type, semantic_stack_type, location_stack_type): these.
11821 Private, not public.
11822 * tests/c++.at: New.
11823 * tests/testsuite.at, tests/Makefile.am: Adjust.
11825 2004-12-21 Akim Demaille <akim@epita.fr>
11827 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11829 2004-12-21 Akim Demaille <akim@epita.fr>
11831 Don't impose std::string for filenames.
11833 * data/lalr1.cc (b4_filename_type): New.
11834 (position::filename): Use it.
11835 (parser.hh): Move the inclusion of stack.hh and location.hh below
11836 the user code, so that needed headers for the filename type can be
11838 Forward declare them before the user code.
11839 * tests/Makefile.am (check-local, installcheck-local): Pass
11840 TESTSUITEFLAGS to the TESTSUITE.
11842 2004-12-20 Akim Demaille <akim@epita.fr>
11844 Use more STL like names: my_class instead of MyClass.
11846 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11847 (SemanticStack, SemanticType, StateStack, StateType)
11848 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11849 (Parser::value): Rename as...
11850 (location_stack, location_type, rhs_number_type, semantic_stack)
11851 (semantic_type, state_stack, state_type, token_number_type, stack)
11852 (slice, traits, parser::yylloc, parser::yylval): these.
11854 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11856 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11858 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11859 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11861 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11863 Remove uses of 'short int' and 'unsigned short int'. This raises
11864 some arbitrary limits. It uses more memory but nowadays that's
11865 not much of an issue.
11867 This change does not affect the generated parsers; that's a different
11868 task, as some users will want to conserve memory there.
11870 Ideally we should use size_t to represent all object counts, and
11871 something like ptrdiff_t to represent signed differences of object
11872 counts; but that will require more code-cleanup than I have the
11873 time to do right now.
11875 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11876 Use size_t, not int or short int, to count objects.
11877 * src/closure.c (nritemset, closure): Likewise.
11878 * src/closure.h (nritemset, closure): Likewise.
11879 * src/nullable.c (nullable_compute): Likewise.
11880 * src/print.c (print_core): Likewise.
11881 * src/print_graph.c (print_core): Likewise.
11882 * src/state.c (state_compare, state_hash): Likewise.
11883 * src/state.h (struct state): Likewise.
11884 * src/tables.c (default_goto, goto_actions): Likewise.
11886 * src/gram.h (rule_number, rule): Use int, not short int.
11887 * src/output.c (prepare_rules): Likewise.
11888 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11889 errs, reductions): Likewise.
11890 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11892 * src/tables.c (vector_number, tally, action_number,
11893 ACTION_NUMBER_MINIMUM): Likewise.
11894 * src/output.c (muscle_insert_short_int_table): Remove.
11896 2004-12-17 Akim Demaille <akim@epita.fr>
11898 * data/lalr1.cc: Extensive Doxygenation.
11899 (error_): Rename as...
11900 (error): this, since it is visible to the user.
11902 (Parser::message): Now an automatic variable from...
11903 (Parser::yyreport_syntax_error_): here.
11904 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11906 * tests/input.at: Escape $.
11908 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11910 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11911 Parenthesize rhs to avoid obscure problems with mistakes like
11912 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11913 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11914 b4_rhs_location): Likewise.
11915 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11916 b4_rhs_location): Likewise.
11918 2004-12-16 Akim Demaille <akim@epita.fr>
11920 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11921 yacc.c: be sure to stay within yycheck_.
11922 * tests/actions.at: Re-enable C++ tests.
11924 2004-12-16 Akim Demaille <akim@epita.fr>
11926 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11929 2004-12-16 Akim Demaille <akim@epita.fr>
11931 Use #define to handle the %name-prefix.
11933 * data/glr.c, data/yacc.c: Comment changes.
11934 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11935 so that one can refer to yylex in the parser file, and have it
11936 renamed, as is the case with other skeletons.
11938 2004-12-16 Akim Demaille <akim@epita.fr>
11940 Move lalr1.cc internals into yy*.
11942 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11943 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11944 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11945 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11946 (empty_, final_, terror_, errcode_, ntokens_)
11947 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11948 (looka_, ilooka_, error_range_, nerrs_):
11950 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11951 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11952 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11953 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11954 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11955 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11956 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11957 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11960 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11962 Fix some problems reported by twlevo at xs4all.
11963 * src/symtab.c (symbol_new): Report an error if the input grammar
11964 contains too many symbols. This is better than calling abort() later.
11965 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11966 (struct node, struct graph):
11967 Rename member expand to stretch. All uses changed.
11968 (struct graph): Remove member layoutalgorithm. All uses removed.
11969 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11970 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11972 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11974 2004-12-15 Akim Demaille <akim@epita.fr>
11976 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11977 Add more Doxygen comments.
11978 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11979 (report_syntax_error_, translate_): Rename as...
11980 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11981 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11983 2004-12-15 Akim Demaille <akim@epita.fr>
11985 * data/lalr1.cc (lex_): Rename as...
11987 Move the trace here.
11988 Take the %name-prefix into account.
11989 Reported by Alexandre Duret-Lutz.
11991 2004-12-15 Akim Demaille <akim@epita.fr>
11993 Simplify the C++ parser constructor.
11995 * data/lalr1.cc (debug_): Rename as...
11996 (yydebug_): so that the parser's internals are always in the yy*
11999 (b4_parse_param_decl): Remove the leading comma as it is now only
12000 called as unique argument list.
12001 (Parser::Parser): Remove the constructor accepting a location and
12002 an initial debugging level.
12003 Remove from the other ctor the argument for the debugging level.
12004 (debug_level_type, debug_level, set_debug_level): New.
12006 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12009 2004-12-15 Akim Demaille <akim@epita.fr>
12011 Remove b4_root related material: failure experiment
12012 (which goal was to allow to derive from a class).
12014 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12015 definitions and uses.
12017 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12019 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12020 not 2, since it's not portable to subtract 1 from the start of an
12021 array. The new item 0 is never set or used. All uses changed.
12023 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12024 the default definition of YYLLOC_DEFAULT. Problem reported
12025 by Frank Heckenbach.
12027 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12029 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12030 the normal case and one for the error case. Just use the
12031 first one uniformly. Problem reported by Frank Heckenbach.
12032 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12033 use exactly the same macro in both places.
12034 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12035 so that the normal-case YYRHSLOC works for the error case too.
12037 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12038 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12039 * doc/bison.texinfo (Location Default Action): Don't claim that
12040 we have an array of locations. Use the same macro for both glr
12041 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12044 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12046 * HACKING: Update email addresses to send announcements to.
12048 * configure.ac (AC_INIT): Bump version to 1.875f.
12050 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12052 * NEWS: Version 1.875e.
12053 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12055 * src/scan-skel.l: Include "complain.h", for "fatal".
12057 * src/relation.h (relation_print, relation_digraph):
12058 Relation sizes are of type relation_node, not size_t (this is
12059 merely a doc fix, since the two types are equivalent).
12060 (relation_transpose): Relation sizes are of type relation_node,
12062 * src/relation.c: Likewise.
12063 (top, infinity): Now of type relation_node, not int.
12064 (traverse, relation_transpose): Use relation_node, not int.
12066 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12067 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12068 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12070 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
12071 specifying whether the test should be skipped. Use it tp
12072 specify that the [%defines %skeleton "lalr1.cc"] tests currently
12073 fail on some hosts, and should be skipped.
12075 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12077 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12078 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12079 unless otherwise specified below.
12081 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12082 to allocate kernel_base, kernel_items, kernel_size, since
12083 they needn't be initialized to 0.
12084 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12085 * src/closure.c (new_closure): Likewise, for itemset.
12086 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
12087 * src/lalr.c (set_goto_map): Likewise, for temp_map.
12088 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
12089 (build_relations): Likewise for edge, states1, includes.
12090 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
12091 * src/reader.c (packgram): Likewise, for ritem, rules.
12092 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
12093 * src/relation.c (relation_digraph): Likewise for VERTICES.
12094 (relation_transpose): Likewise for new_R, end_R.
12095 * src/symtab.c (symbols_token_translations_init): Likewise for
12096 token_translations.
12097 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
12098 (token_actions): Likewise for yydefact, actrow, conflrow,
12100 (save_column): Likewise for froms[symno], tos[symno].
12101 (goto_actions): Likewise for state_count.
12102 (pack_table): Likewise for base, pos, check.
12103 (tables_generate): Likewise for width.
12105 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
12106 for initial core. Just have a separate core, so we needn't worry
12107 about whether kernel_size and kernel_base are initialized.
12109 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
12110 kernel_size, kernel_items): Remove unnecessary initialization.
12111 * src/conflicts.c (conflicts): Likewise.
12112 * src/derives.c (derives): Likewise.
12113 * src/muscle_tablc (muscle_insert): Likewise.
12114 * src/relation.c (relation_digraph): Likewise.
12115 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
12116 conflrow, conflict_table, conflict_list, table, check):
12119 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
12120 This is because all callers pass unsigned int.
12121 * src/closure.h (new_closure): Likewise.
12123 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
12124 (build_relations): Initialize includes[i] in all cases.
12125 * src/reader.c (packgram): Always initialize rules[ruleno].prec
12126 and rules[ruleno].precsym. Initialize members in order.
12127 * src/relation.c (relation_transpose): Always initialize new_R[i]
12129 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
12131 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
12132 conflict_list[0] was always 0, but now it isn't initialized.
12134 * src/table.c (table_grow): When conflict_table grew, the grown
12135 area wasn't cleared. Fix this.
12137 * lib/.cvsignore: Add strdup.c, strdup.h.
12138 * m4/.cvsignore: Add strdup.m4.
12140 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
12142 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
12143 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
12144 GOTO_NUMBER_MAXIMUM, since we occasionally compute
12145 ngotos + 1 without checking for overflow.
12146 (build_relations): Use END_NODE, not -1, to denote end of edges.
12147 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
12148 build_relations): Use goto_number, not int, for goto numbers.
12149 * src/tables.c (save_column, default_goto): Likewise.
12151 2004-11-23 Akim Demaille <akim@epita.fr>
12153 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
12154 of #defining from yystype.
12155 Don't typedef yystype, C++ does not need it.
12156 This lets it possible to forward declare it as union.
12158 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
12160 * bootstrap (gnulib_modules): Add extensions.
12161 Problem reported by Jim Meyering.
12163 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
12165 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
12166 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
12167 src/system.h, src/tables.c: XFREE -> free, to accommodate
12168 recent change to gnulib xalloc.h.
12169 Problem reported by Jim Meyering.
12171 2004-11-17 Akim Demaille <akim@epita.fr>
12173 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
12175 2004-11-17 Akim Demaille <akim@epita.fr>,
12176 Alexandre Duret-Lutz <adl@gnu.org>
12178 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
12180 (YYCDEBUG): Adjust.
12181 Use it instead of cdebug_.
12182 (Parser::debug_stream, Parser::set_debug_stream): New.
12183 (Parser::symprint_): Define cdebug_ for temporary backward
12185 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
12188 2004-11-17 Akim Demaille <akim@epita.fr>
12190 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
12191 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
12192 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
12193 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12195 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
12197 * data/glr.c (yyloc_default): Remove; not used.
12198 Problem reported by Frank Heckenbach.
12200 2004-10-25 Akim Demaille <akim@epita.fr>
12202 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
12203 Introduce another definition to address simple location arrays.
12204 (yyGLRStack): New member: yyerror_range.
12205 (yyrecoverSyntaxError, yyparse): Update it.
12206 (yyrecoverSyntaxError): Use it when shifting the error token to
12207 have an accurate range, equivalent to the one computed by both
12208 yacc.c and lalr1.cc.
12209 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
12210 that column numbers start at column 0, as per GNU Coding
12211 Standards, the others tests, and the doc.
12212 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
12213 Adjust to the above change (first column is 0).
12214 And adjust the location of the "<error>", now covering the whole
12217 2004-10-22 Akim Demaille <akim@epita.fr>
12218 and Paul Eggert <eggert@cs.ucla.edu>
12220 Remove some arbitrary limits on goto numbers and relations.
12221 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
12222 initial values, since they're never used.
12223 (set_goto_map): ngotos is now unsigned, so test for overflow
12224 by seeing whether it wraps around to zero.
12225 * src/lalr.h (goto_number): Now size_t, not short int.
12226 (GOTO_NUMBER_MAXIMUM): Remove.
12227 * src/relation.c (relation_print, traverse, relation_transpose):
12228 Check for END_NODE rather than looking at sign.
12229 * src/relation.h (END_NODE): New macro.
12230 (relation_node): Now size_t, not short int.
12232 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
12234 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
12235 keyword, not an identifier. Problem reported by Baron Schwartz in
12236 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
12238 2004-10-11 Akim Demaille <akim@epita.fr>
12240 * src/symtab.c (symbol_check_alias_consistency): Also check
12241 type names, destructors, and printers.
12242 Reported by Alexandre Duret-Lutz.
12243 Recode the handling of associativity and precedence in terms
12244 of symbol_precedence_set.
12245 Accept no redeclaration at all, not even equal to the previous
12247 (redeclaration): New.
12248 Use it to factor redeclaration complaints.
12249 (symbol_make_alias): Don't set the type of the alias, let
12250 symbol_check_alias_consistency do it as for other features.
12251 * src/symtab.h (symbol): Add new member prec_location, and
12253 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
12254 * tests/input.at (Incompatible Aliases): New.
12256 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
12258 .cvsignore fixes to accommodate gnulib changes,
12259 and the practice of naming build directories "_build".
12260 * .cvsignore: Add "_*". Sort.
12261 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
12262 * m4/.cvsignore: Add "*_gl.m4".
12264 2004-10-06 Akim Demaille <akim@epita.fr>
12266 * src/parse-gram.y (add_param): Fix the truncation of trailing
12269 2004-10-05 Akim Demaille <akim@epita.fr>
12271 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
12272 whether the reducion was empty or not. This leaves room to
12273 improve the use of YYLLOC_DEFAULT in such a case.
12274 lalr1.cc is still experimental, so changing this is acceptable.
12275 And finally, there are probably not many users who changed the
12276 handling of locations in GLR, so changing is admissible too.
12278 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
12279 empty reduction, set @$ to an empty location ending the previously
12281 Adjust uses to make sure the code is triggered on empty
12283 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
12284 expected output: empty reductions have empty locations.
12286 2004-09-29 Akim Demaille <akim@epita.fr>
12288 * data/lalr1.cc: Move towards a more standard C++ coding style
12289 for templates: Class < T > -> Class<T>.
12291 2004-09-29 Akim Demaille <akim@epita.fr>
12293 * data/lalr1.cc: Reinstall the former ctor, for sake of
12294 compatibility, but warn it will be removed.
12295 Move towards a more standard C++ coding style (i.e., type *var ->
12298 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
12300 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
12301 since it's less likely to work if NULs are involved in the future.
12303 2004-09-27 Akim Demaille <akim@epita.fr>
12305 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
12307 2004-09-27 Akim Demaille <akim@epita.fr>
12309 * data/lalr1.cc (b4_parse_param_decl_1): New.
12310 (b4_parse_param_decl): Use it to have different names between attribute
12311 and argument names.
12312 (b4_cc_constructor_call): Likewise.
12314 2004-09-24 Akim Demaille <akim@epita.fr>
12316 * src/parse-gram.y (add_param): Strip the leading and trailing
12317 blanks from a formal argument declaration.
12318 (YY_LOCATION_PRINT): New.
12320 2004-09-24 Akim Demaille <akim@epita.fr>
12322 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
12323 after the location.
12325 2004-09-24 Akim Demaille <akim@epita.fr>
12327 * doc/bison.texinfo (Table of Symbols): Sort.
12329 2004-09-21 Akim Demaille <akim@epita.fr>
12331 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
12332 the useless parentheses.
12333 Suggested by Paul Eggert.
12335 2004-09-20 Akim Demaille <akim@epita.fr>
12337 Let the initial-action act on the look-ahead, and use it for the
12338 "initial push" (corresponding to an hypothetical beginning-of-file).
12339 And let lalr1.cc honor %initial-action.
12341 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
12343 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
12344 (Parser::Parser): Remove the ctor that used to initialize it.
12345 (Parser::parse): Like in the other skeletons, issue the "starting
12346 parse" message before any action.
12347 Honor %initial-action.
12348 Initialize the stacks with the lookahead.
12349 * data/yacc.c: Let $$ and @$ in %initial-action designate the
12351 Push them in the stacks.
12352 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
12354 2004-09-20 Akim Demaille <akim@epita.fr>
12356 * doc/bison.texinfo (Initial Action Decl): New.
12358 2004-09-20 Akim Demaille <akim@epita.fr>
12360 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
12361 clearer criterion to define it.
12362 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
12363 When reducing on an empty RHS, use the latest stacked location as
12365 yylloc is not always available.
12366 * data/glr.c: Likewise.
12367 Also, honor initial-actions.
12369 2004-09-20 Akim Demaille <akim@epita.fr>
12371 * data/yacc.c (YY_LOCATION_PRINT): New.
12372 Define when we know YYLTYPE's structure, i.e., when the default
12373 YYLLOC_DEFAULT is used.
12374 * data/c.m4 (b4_yysymprint_generate): Use it.
12375 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
12376 value of the result.
12377 (error_start_): Replace with...
12378 (error_range_): this location array.
12379 This allows to replace code relying on the implementation of
12380 locations by portable code.
12381 * data/yacc.c (yylerrsp): Replace with...
12382 (yyerror_range): this.
12383 Every time a token is popped, update yyerror_range[0], to have an
12384 accurate location for the error token.
12385 * data/glr.c (YY_LOCATION_PRINT): New.
12386 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
12387 deference a pointer.
12388 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
12389 report the location in %printers.
12391 * src/scan-skel.l: Instead of abort, report error messages to ease
12392 understanding skeleton scanning failures.
12394 2004-09-16 Akim Demaille <akim@epita.fr>
12396 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
12397 (iterator, const_iterator): these, to be more in the C++ spirit.
12398 Also, return reverse iterators so that when displaying the stack
12399 we display its bottom first.
12400 (Parser::stack_print_, Parser::reduce_print_): Match the messages
12402 We should probably use vector here though.
12404 2004-09-16 Akim Demaille <akim@epita.fr>
12406 Have more complete shift traces.
12408 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
12409 to report Shifts instead of ad hoc YYDPRINTF invocations,
12410 including for the error token.
12411 * data/lalr1.cc (symprint_): Output the location.
12412 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
12413 output the location within the %printer.
12414 Activate GLR tests, at least to make sure they compile properly.
12415 They still don't pass though.
12416 * tests/calc.at: Adjust expect verbose output, since now "Entering
12417 state..." is on a different line than the "Shifting" message.
12419 2004-09-08 Akim Demaille <akim@epita.fr>
12421 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
12422 Bison directive from the Bison file to the invocation of this
12423 macro, so that these directives are passed to
12424 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
12425 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
12426 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
12427 the extra Bison directives instead of the whole series.
12428 Change the grammar so that there are recoverable errors, and
12429 unrecoverable errors. Now we can have the parser give up before
12430 consuming the whole input. As a result we now can observe that
12431 the lookahead is freed when needed.
12432 Change the parser source to parse argv[1] instead of a hard coded
12434 Simplify yylex, and give a value and location to EOF.
12435 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
12436 passed directives already coded in the file.
12437 Add some tests to check the location of "error".
12438 For some tests, the C++ parser is correct, and not yacc.c.
12439 For other tests, they provide different, but unsatisfying, values,
12440 so keep the C++ value so that at least one parser is "correct"
12441 according to the test suite.
12442 (Actions after errors): Remove, this is subsumed by the
12443 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
12445 2004-09-06 Akim Demaille <akim@epita.fr>
12447 * data/lalr1.cc: Adjust the indentation of the labels.
12448 (Parser::pop): New.
12451 2004-09-06 Akim Demaille <akim@epita.fr>
12453 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
12454 argument, an informative message.
12455 Call YY_SYMBOL_PRINT.
12456 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
12457 * data/lalr1.cc (destruct_): Likewise.
12458 In addition, no longer depend on b4_yysymprint_generate and
12459 b4_yydestruct_generate to generate these functions, do it "by
12462 2004-09-03 Akim Demaille <akim@epita.fr>
12464 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
12465 invoked, yydestruct the lookahead.
12466 * tests/calc.at (Calculator $1): Update the expected lengths of
12467 traces: there is an added line for the discarded lookahead.
12468 * doc/bison.texinfo (Destructor Decl): Some rewording.
12469 Define "discarded" symbols.
12471 2004-09-02 Akim Demaille <akim@epita.fr>
12473 * data/lalr1.cc (translate_, destruct_): No reason to be static.
12475 2004-09-02 Akim Demaille <akim@epita.fr>
12477 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
12478 (YYDSYMPRINTF): Rename as...
12479 (YY_SYMBOL_PRINT): this.
12480 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
12482 Use it instead of direct symprint_ calls.
12483 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
12486 2004-09-02 Akim Demaille <akim@epita.fr>
12488 * data/lalr1.cc (b4_yysymprint_generate): New.
12489 (symprint_): New member function, defined when YYDEBUG.
12490 Use it consistently instead of token/nterm debugging output by
12492 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
12493 %printer calls to use cdebug_ when using lalr1.cc.
12495 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
12497 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
12498 with #ifdef YYDEBUG.
12500 2004-08-26 Akim Demaille <akim@epita.fr>
12502 * doc/bison.texinfo (Implementing Loops): Rename as...
12503 (Implementing Gotos/Loops): this.
12505 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
12507 Adjust to latest gnulib.
12508 * bootstrap (gnulib_modules): Add xalloc-die.
12509 Set LC_ALL=C so that file names sort consistently.
12510 Prefer the gnulib copies of gettext.m4, glibc21.m4,
12511 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
12512 uintmax_t.m4, ulonglong.m4.
12513 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
12514 po.m4 since we are now using _gl.m4 instead.
12516 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
12518 * src/scan-action.l: Remove. Scanning of semantic actions is
12519 handled in scan-gram.l.
12521 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
12523 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
12525 * src/location.h (struct): The file member is a uniqstr.
12526 (equal_boundaries): Use UNIQSTR_EQ for comparison.
12528 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
12530 Fix bug with non-%union parsers that have printers or destructors,
12531 which led to a Bison core dump. Reported by Peter Fales in
12532 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
12534 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
12535 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
12536 not to our own type.
12537 * src/output.c (symbol_destructors_output, symbol_printers_output):
12538 Don't assume %union.
12539 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
12540 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
12541 UNION-FLAG. All callers changed.
12542 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
12543 Use type char, not unsigned int, when declaring an array of char;
12544 this lets us remove a cast.
12545 (Printers and Destructors): Add non-%union test cases.
12547 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12549 * doc/bison.texinfo: Minor editorial changes, mostly to the new
12550 GLR writeups. E.g., avoid frenchspacing and the future tense,
12551 change "lookahead" to "look-ahead", and change "wrt" to "with
12554 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12556 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12557 New sections, split off from the GLR Parsers section. Put the new
12558 Simple GLR Parser near the start of the GLR section, for clarity.
12559 Rewrite connective text.
12561 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
12563 * doc/bison.texinfo (Simple GLR Parsers): New section.
12565 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12567 * NEWS, TODO, doc/bison.texinfo:
12568 Use "look-ahead" instead of "lookahead", to be consistent.
12569 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12570 while we're fixing "look-ahead".
12571 * src/conflicts.c (shift_set): Renamed from shiftset.
12572 (look_ahead_set): Renamed from lookaheadset.
12573 * src/print.c: Likewise.
12574 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12575 name for "lookahead".
12576 (report_types, usage): Likewise.
12577 * src/getargs.h (report_look_ahead_tokens): Renamed from
12579 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12580 compute_lookaheads.
12581 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12582 (look_ahead_tokens_print): Renamed from lookaheads_print.
12583 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12584 state_rule_lookaheads_print.
12585 * src/state.h: Likewise.
12586 (reductions.look_ahead_tokens): Renamed from lookaheads.
12587 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12588 AT_DATA_LOOKAHEADS_GRAMMAR.
12590 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12592 * README: Update location of patched M4 distribution.
12594 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12596 Don't assume the C++ compiler takes the same arguments as the C compiler
12598 * configure.ac (O0CXXFLAGS): New var.
12599 * tests/atlocal.in (CXXFLAGS): Use it.
12601 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12603 Fix some "make check" problems with C++ reported by
12604 Albert Chin-A-Young for Tru64 C++ in this thread:
12605 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12607 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12608 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12609 Output to a .cc file for C++, not to a .c file.
12610 * tests/calc.at (AT_CHECK_CALC): Likewise.
12611 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12612 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12614 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12616 * tests/calc.at, tests/actions.at: Workaround for SGI
12617 C++ compiler. (trivial change)
12619 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12621 Spent a few hours checking out which prerequisite versions the
12622 current sources actually require. I went all the way back to
12623 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12624 a seemingly endless set of combinations of versions more recent
12625 than that. The bottom line is that the current sources require
12626 fairly recent versions of the build tools, and it'll be some work
12628 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12629 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12630 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12631 Add comments explaining why those particular versions are
12634 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12635 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12636 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12638 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12639 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12641 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12643 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12644 0.11.5. Suggested by Bruno Haible.
12645 * bootstrap: Remove gettext version checking.
12647 * doc/bison.texinfo (Decl Summary): Also mention that %union
12648 can depend on prerequisite types. Problem reported by Tim
12651 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12653 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12654 * README-alpha: Don't tell people not to package this.
12656 * bootstrap: Don't assume $(...) works; use `...` instead.
12657 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12660 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12661 put into the -d output file, and mention what to do if YYSTYPE is
12662 defined as a macro.
12664 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12666 Undo change made earlier today: it caused autopoint to not bring
12667 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12670 * bootstrap: Check that gettext version matches what's in
12671 configure.ac. Warn users to ignore robots.txt ERROR 404.
12672 * bootstrap: Undo today's earlier change (logged below).
12673 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12675 The gettext version checking is causing more trouble than it's
12676 curing; remove it. Problem reported by Paul Hilfinger.
12678 * bootstrap: Issue a warning that one can expect a message
12679 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12680 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12682 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12684 Ensure that the C++ compiler used for testing actually works on a
12685 simple test program; if not, skip the C++-related tests. Problem
12686 reported by Vin Shelton in:
12687 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12689 * m4/cxx.m4: New file.
12690 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12691 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12692 * tests/local.at (AT_COMPILE_CXX): Use it.
12694 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12696 * data/glr.c (yylloc): Output this macro even if locations are not
12697 being generated, as the GLR parser needs it even in that case.
12698 Problem reported by Troy A. Johnson
12699 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12701 * configure.ac (AC_INIT): Update to 1.875e.
12703 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12705 * NEWS: Version 1.875d.
12706 * configure.ac (AC_INIT): Likewise.
12707 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12709 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12710 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12711 lalr1.cc runs afoul of the first, and the last two are no longer
12712 supported by GCC 3.4.0.
12713 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12714 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12716 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12718 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12719 unsigned int, for compatibility with latest gnulib hash module.
12720 * src/state.c (state_hash, state_hasher): Likewise.
12721 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12722 * src/uniqstr.c (hash_uniqstr): Likewise.
12724 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12726 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12728 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12729 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12730 character and string literals.
12731 (unexpected_end): New function.
12732 (unexpected_eof): Use it.
12733 (unexpected_newline): New function.
12734 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12737 * NEWS: Document %expect-rr.
12739 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12740 Fix typo by replacing $1 with $option.
12741 Remove more 'intl'-related files.
12742 Don't DEFUN AM_INTL_SUBDIR twice.
12744 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12745 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12747 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12748 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12749 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12750 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12751 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12752 * src/.cvsignore: Add *.output.
12754 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12755 gets copied to the output file.
12757 2004-04-28 Paul Eggert <eggert@twinsun.com>
12759 Get files from the gnulib and po repositories, instead of relying
12760 on them being in our CVS. Upgrade to latest versions of gnulib
12763 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12764 * bootstrap: Bootstrap from gnulib and po repositories.
12765 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12766 * README-cvs: Document these changes. Remove version numbers from
12767 mentions of build tools, since they change so often. Mention Flex.
12769 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12770 (gl_USE_SYSTEM_EXTENSIONS): Add.
12771 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12772 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12774 (AC_ISC_POSIX): Remove; we no longer support this
12775 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12776 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12777 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12778 Do not check for C89 headers, except for locale.h which is used
12779 by the Yacc library and must port to K&R hosts.
12780 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12781 Do not check for C89 functions, except for setlocale which is
12782 used by the Yacc library.
12783 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12784 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12785 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12786 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12787 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12788 AM_GNU_GETTEXT): Remove; now done by:
12789 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12790 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12793 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12794 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12795 Define to empty, as gnulib.mk will do the rest for us.
12796 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12798 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12799 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12801 * src/files.c: Include gnulib's xstrndup.h.
12803 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12804 (REALLOC): Use xnrealloc, for likewise.
12805 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12806 (strnlen, memrchr): Remove decls; functions no longer used.
12807 Include <stpcpy.h>.
12809 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12810 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12811 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12812 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12813 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12814 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12815 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12816 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12817 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12818 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12819 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12820 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12821 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12822 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12823 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12824 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12825 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12826 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12827 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12828 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12829 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12830 Remove, as these files are now generated automatically
12831 by bootstrap or automake.
12833 * po/ChangeLog: Remove: all but one entry was a duplicate
12834 of this file, and I moved that 2000-11-02 entry here.
12836 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12837 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12838 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12839 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12840 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12841 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12842 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12843 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12844 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12845 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12846 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12848 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12849 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12850 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12851 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12852 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12853 * src/.cvsignore: Remove *_.c.
12856 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12857 support it. (The latest stable gzip doesn't.)
12859 2004-04-27 Paul Eggert <eggert@twinsun.com>
12861 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12862 case, as stos_ is now used by destructors due to the 2004-02-09
12865 Remove more K&R C support.
12866 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12867 * lib/subpipe.c (errno): Remove decl.
12868 Include <stdlib.h> unconditionally.
12869 (EXIT_FAILURE): Remove macro.
12870 * src/complain.c (vfprintf, strerror): Remove.
12871 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12873 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12874 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12875 (strchr, strspn, memchr): Remove decls.
12876 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12877 unconditionally. Do not declare perror.
12878 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12881 * src/complain.c (_): Remove useless defn, as system.h defines this.
12883 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12884 with latest obstack.h.
12885 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12886 to procedure types, as obstack.h now does that for us.
12887 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12889 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12890 so that this include file can stand alone.
12891 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12892 does this now. Include subpipe.h first after config.h, to
12893 test whether it can stand alone.
12895 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12896 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12897 unused declaration.
12899 * tests/synclines.at (%union synch line): Put a dummy member in
12900 the union, because empty unions aren't allowed in C. Caught
12903 2004-04-13 Jim Meyering <jim@meyering.net>
12905 * src/conflicts.c (conflicts_print): Correct format string typo:
12906 use `%%' to produce literal `%'. (trivial change)
12908 2004-03-30 Paul Eggert <eggert@twinsun.com>
12910 * src/getargs.c (version): Update copyright year to 2004.
12912 * data/c.m4 (b4_int_type): Use 'short int' rather than
12913 'short', and similarly for 'long', 'unsigned', etc.
12914 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12915 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12916 yy_yypstack, yydumpstack): Likewise.
12917 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12918 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12920 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12921 yy_stack_print, yyparse): Likewise.
12922 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12923 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12924 * lib/bitset.c (bitset_print): Likewise.
12925 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12926 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12927 * lib/bitsetv.c (bitsetv_dump): Likewise.
12928 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12929 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12931 * src/LR0.c (allocate_itemsets): Likewise.
12932 * src/gram.h (rule_number, rule): Likewise.
12933 * src/lalr.h (goto_number): Likewise.
12934 * src/nullable.c (nullable_compute): Likewise.
12935 * src/output.c (prepare_rules): Likewise.
12936 * src/relation.c (relation_print, relation_digraph): Likewise.
12937 * src/relation.h (relation_node): Likewise.
12938 * src/state.h (state_number, transitions, errs, reductions,
12939 struct state): Likewise.
12940 * src/symtab.h (symbol_number, struct symbol): Likewise.
12941 * src/tables.c (vector_number, tally, action_number,
12942 default_goto, goto_actions): Likewise.
12943 * tests/existing.at (GNU Cim Grammar): Likewise.
12944 * tests/regression.at (Web2c Actions): Likewise.
12946 * src/output.c (muscle_insert_short_int_table): Renamed from
12947 muscle_insert_short_table. All uses changed.
12949 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12951 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12952 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12953 Add %expect-rr rule.
12955 * src/scan-gram.l: Recognize %expect-rr.
12957 * src/conflicts.h (expected_sr_conflicts): Rename from
12958 expected_conflicts.
12959 (expected_rr_conflicts): Declare.
12961 * src/conflicts.c (expected_sr_conflicts): Rename from
12962 expected_conflicts.
12963 (expected_rr_conflicts): Define.
12964 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12966 Use expected_sr_conflicts in place of expected_conflicts.
12967 Warn if expected_rr_conflicts used in non-GLR parser.
12969 * doc/bison.texinfo: Add documentation for %expect-rr.
12971 2004-03-08 Paul Eggert <eggert@gnu.org>
12973 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12974 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12976 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12978 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12979 * src/scan-gram.l (scan_integer): New function.
12981 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12982 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12983 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12984 Say "long int", not "long", for uniformity with GNU style.
12986 2004-02-25 Paul Eggert <eggert@twinsun.com>
12988 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12989 compilers. This fixes a problem with Intel's C++ compiler being
12990 chatty, reported by Guido Trentalancia in
12991 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12993 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12995 Support %destructor and merge error locations in lalr1.cc.
12997 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12998 (Parser::stos_): Define unconditionally.
12999 (Parser::destruct_): New method. Generate its body with
13000 b4_yydestruct_generate.
13001 (Parser::error_start_): New attribute.
13002 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13003 token which are discarded.
13004 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13005 error_start_ when erroneous token are discarded.
13006 (Parser::parse) <yyerrlab1>: Compute the location of the error
13007 token so that it covers all the discarded tokens.
13008 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13009 it can be called with `%skeleton "lalr1.cc"', and do that.
13011 2004-02-02 Paul Eggert <eggert@twinsun.com>
13013 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13014 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13015 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13016 There's no need to mention top_builddir since Automake does that
13018 (INCLUDES): Remove, as Automake says it's obsolescent.
13019 Contents migrated into AM_CPPFLAGS as described above.
13020 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13022 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13024 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13025 (yyreportSyntaxError): Handle case where lookahead token is
13028 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13030 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13031 resulting parsers are compilable with C++.
13033 2003-12-23 Paul Eggert <eggert@twinsun.com>
13035 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13036 * src/output.c (output_skeleton): Rename local var.
13037 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13038 Bison tokens, as this runs afoul of the 2003-10-07 change that
13039 disallowed NUL bytes in character constants or string literals.
13041 * tests/local.at: Require Autoconf 2.59's Autotest.
13042 * tests/testsuite.at: Don't include local.at, since we now assume
13043 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13045 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13046 multiple inclusion warnings.
13048 2003-12-02 Akim Demaille <akim@epita.fr>
13050 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13054 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13056 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13058 2003-10-07 Paul Eggert <eggert@twinsun.com>
13060 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13061 if testsuite doesn't exist.
13063 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13064 literals, unfortunately.
13065 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13066 Complain about NUL bytes in character constants or string literals.
13068 2003-10-05 Paul Eggert <eggert@twinsun.com>
13070 * NEWS: Don't document %no-default-prec, as it's still
13072 * doc/bison.texinfo: Document %no-default-prec only if
13073 the defaultprec flag is set. Normally it's not.
13075 2003-10-04 Paul Eggert <eggert@twinsun.com>
13077 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13078 non-modifiable lvalue, instead of a modifiable one.
13079 * doc/bison.texinfo (Actions): Document that $$ can
13080 be assigned to. Do not claim that $$ and $N are
13081 array element references: user code should not rely on this.
13083 2003-10-01 Paul Eggert <eggert@twinsun.com>
13085 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
13086 (grammar_declaration): Use it.
13087 * src/scan-gram.l: New token %no-default-prec.
13088 * tests/conflicts.at: Revamp tests to use %no-default-prec.
13089 * NEWS, doc/bison.texinfo: Document the above.
13091 2003-10-01 Akim Demaille <akim@epita.fr>
13093 VCG no longer supports long_straight_phase.
13095 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
13096 * src/print_graph.c (print_graph): Adjust.
13098 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
13099 and Paul Eggert <eggert@twinsun.com>
13101 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
13102 Table of Symbols): Document %default-prec.
13103 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
13104 (grammar_declaration): Set default_prec on %default-prec.
13105 * src/scan-gram.l (%default-prec): New token.
13106 * src/reader.h (default_prec): New flag.
13107 * src/reader.c: Likewise.
13108 (packgram): Handle it.
13109 * tests/conflicts.at (%default-prec without %prec,
13110 %default-prec with %prec, %default-prec 1): New tests.
13112 2003-09-30 Paul Eggert <eggert@twinsun.com>
13114 * tests/testsuite.at: Include local.at, not input.at, fixing
13115 a typo in the 2003-08-25 patch.
13117 2003-08-27 Akim Demaille <akim@epita.fr>
13119 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
13122 2003-08-26 Akim Demaille <akim@epita.fr>
13124 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
13125 "<\#" to avoid magic from Gnus when posting parts of this script.
13127 2003-08-26 Akim Demaille <akim@epita.fr>
13129 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
13130 (Parser::parse): here.
13131 Adjust: nerrs and errstatus is now replaced by...
13132 (Parser::nerrs_, Parser::errstatus_): New.
13134 2003-08-25 Akim Demaille <akim@epita.fr>
13136 * config/announce-gen, Makefile.cfg: New.
13137 * Makefile.am: Adjust.
13138 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
13139 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
13141 2003-08-25 Akim Demaille <akim@epita.fr>
13143 When reducing initial empty rules, Bison parser read an initial
13144 location that is not defined. This results in garbage, and that
13145 affects Bison's own parser. Therefore we need (i) to extend Bison
13146 to support a means to initialize this location, and (ii) to use
13147 this CVS Bison to fix CVS Bison's parser.
13149 * src/reader.h, reader.c (epilogue_augment): Remove, replace
13151 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
13152 * src/parse-gram.y: Adjust.
13153 (%initial-action): New.
13154 (%error-verbose): Since we require CVS Bison, there is no reason
13156 * src/scan-gram.l: Adjust.
13157 * src/Makefile.am (YACC): New, to make sure we use our own parser.
13158 * data/yacc.c (yyparse): Use b4_initial_action.
13160 2003-08-25 Akim Demaille <akim@epita.fr>
13162 * doc/bison.texinfo: Don't promote stdout for error messages.
13164 2003-08-25 Akim Demaille <akim@epita.fr>
13166 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
13167 From Alexandre Duret-Lutz.
13169 2003-08-25 Akim Demaille <akim@epita.fr>
13173 2003-08-25 Akim Demaille <akim@epita.fr>
13175 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
13178 2003-08-25 Akim Demaille <akim@epita.fr>
13180 * data/lalr1.cc (Parser::reduce_print_): New.
13183 2003-08-25 Akim Demaille <akim@epita.fr>
13185 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
13186 error recovery loops. This patch is based on
13187 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
13188 Also, augment the similarity between lalr1.cc and yacc.c.
13189 Note: the locations of error recovery rules are not correct yet.
13191 * data/lalr1.cc: Comment changes to augment the similarity between
13192 lalr1.cc and yacc.c.
13193 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
13194 (yyerrlab1): Remove, but where it used to be (now the bottom part of
13195 yyerrlab), when hitting EOF, pop the whole stack here instead of
13196 merely falling thru the default error handling mechanism.
13197 (yyerrorlab): New label, with the old contents of YYERROR,
13198 plus the following change: pop the stack of rhs corresponding
13199 to the production that invoked YYERROR. That is how Yacc
13200 behaves (required by POSIX).
13201 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
13204 2003-08-25 Akim Demaille <akim@epita.fr>
13206 Tune local.at so that people can "autom4te -l autotest calc.at -o
13207 calc" for instance, to extract a sub test suite.
13209 * tests/testsuite.at: Move the initialization, Autotest version
13210 requirement, and AT_TESTED invocation into...
13211 * tests/local.at: here.
13212 * tests/testsuite.at: Include it for compatibility with Autoconf
13214 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
13217 2003-08-04 Paul Eggert <eggert@twinsun.com>
13219 Rework code slightly to avoid gcc -Wtraditional warnings.
13220 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
13221 The returned value is now stored in *YY0. All callers changed.
13222 * src/output.c (merge_output): Adjust to the above change.
13224 2003-07-26 Paul Eggert <eggert@twinsun.com>
13226 * data/glr.c (YYASSERT): New macro.
13227 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
13228 yyresolveStates, yyprocessOneStack):
13229 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
13230 Derived from a suggestion by Frank Heckenbach.
13232 2003-07-25 Paul Eggert <eggert@twinsun.com>
13234 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
13235 for portability to K&R C (after ansi2knr, presumably). See
13236 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
13237 by Frank Heckenbach, though I have omitted the structure-initialization
13238 part of his glr-knr.diff patch since I recall that the Portable
13239 C Compiler didn't require that change.
13241 Let the user specify how to allocate and free memory.
13242 Derived from a suggestion by Frank Heckenbach in
13243 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
13244 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
13245 All uses of free, malloc, realloc changed to use these macros,
13246 and unnecessary casts removed.
13247 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
13249 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
13251 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
13252 use s.empty() rather than s == "" to test for empty string; see
13253 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
13256 2003-06-25 Akim Demaille <akim@epita.fr>
13258 * config/depcomp, config/install-sh: Update from masters.
13260 2003-06-20 Paul Eggert <eggert@twinsun.com>
13262 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
13263 and return properly parenthesized result.
13264 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
13265 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13266 Remove unnecessary parentheses from uses.
13267 * doc/bison.texinfo (Location Default Action): Describe the
13268 conventions for parentheses.
13270 2003-06-19 Paul Eggert <eggert@twinsun.com>
13272 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
13273 yyreportTree): Do not assume that size_t is the same width as int,
13274 when printing sizes. Print sizes using an unsigned format.
13275 Problem reported by Frank Heckenbach in
13276 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
13278 Port to Forte Developer 7 C compiler.
13279 * data/glr.c (struct YYLTYPE): If locations are not being used,
13280 declare a single dummy member, as empty structs do not conform
13282 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
13283 the Forte Developer 7 C compiler complains that end-of-loop
13284 code is not reached.
13286 2003-06-17 Paul Eggert <eggert@twinsun.com>
13288 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
13289 avoid warnings from picky compilers about redefinition of PARAMS.
13291 2003-06-17 Paul Eggert <eggert@twinsun.com>
13295 * NEWS: Document 1.875b.
13297 * lib/bbitset.h: Do not include config.h; that's the includer's job.
13298 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
13299 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
13300 Don't use 'index' in comments, as it's a builtin fn on some hosts.
13301 * lib/bitset_stats.c: Include gettext.h unconditionally, as
13302 per recent gettext manual's suggestion.
13303 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
13304 Use prototypes, not old-style definitions.
13305 * lib/lbitset.c (lbitset_unused_clear): Likewise.
13306 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
13307 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
13308 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
13309 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
13310 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
13311 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
13312 vbitset_or_and_cmp, vbitset_copy): Likewise.
13314 * lib/libiberty.h: Do not include config.h; that's the includer's job.
13315 Do not include <stdlib.h>.
13316 (PARAMS): Define unconditionally for C89.
13317 (ATTRIBUTE_NORETURN): Remove.
13318 (ATTRIBUTE_UNUSED): Define unconditionally.
13320 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
13321 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
13322 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
13323 * lib/vbitset.c, lib/vbitset.h: New files.
13324 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13325 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
13328 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
13329 `How Can I Reset @code{yyparse}', since texinfo does not allow
13330 arbitrary @ in node names.
13332 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
13333 shouldn't be needed according to the gettext 0.12.1 documentation
13334 but which seem to be needed anyway: codeset.m4 glibc21.m4
13335 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
13336 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
13337 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
13339 * lib/.cvsignore: Add stdbool.h.
13340 * m4/.cvsignore: Add nls.m4, po.m4.
13342 Upgrade to CVS gnulib.
13343 * stdbool_.h: File renamed from stdbool.h.in.
13344 * configure.ac (AM_STDBOOL_H): Invoke this instead of
13346 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
13347 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
13348 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
13349 (MOSTLYCLEANFILES): New var.
13350 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
13351 (stdbool.h): New rule.
13352 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
13353 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
13354 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
13355 m4/quote.m4: Upgrade to today's gnulib.
13357 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
13358 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
13359 the tests right now.
13360 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
13361 yyerror are declared before use; C99 requires this.
13363 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13365 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
13367 (yyrecoverSyntaxError): Correct the logic for setting and testing
13369 Correct comment on handling EOF.
13370 Allow states with only a default reduction, rather than failing
13371 (I can't quite reconstruct why these were not allowed before).
13373 Fixes to avoid problem that $-N rules in GLR parsers can cause
13374 buffer overruns, corrupting state.
13376 * src/output.c (prepare_rules): Output max_left_semantic_context
13378 * src/reader.h (max_left_semantic_context): New variable declaration.
13379 * src/scan-gram.l (max_left_semantic_context): Define.
13380 (handle_action_dollar): Update max_left_semantic_context.
13381 * data/glr.c (YYMAXLEFT): New definition.
13382 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
13383 (yyresolveAction): Ditto.
13385 Fixes to problems with location handling in GLR parsers reported by
13386 Frank Heckenbach (2003/06/05).
13388 * data/glr.c (YYLTYPE): Make trivial if locations not used.
13389 (YYRHSLOC): Add parentheses, and define only if locations used.
13390 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
13391 locations not used.
13392 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
13393 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
13395 * tests/cxx-type.at: Exercise location information; update tests
13396 to differentiate output with and without locations.
13397 Remove forward declarations of yylex and yyerror---caused errors
13398 because default YYLTYPE not yet defined.
13399 Change semantic actions to compute strings, rather than printing
13400 them directly (to test proper passing of semantics values). Change
13401 output to prefix notation and update test data and expected results.
13402 (yylex): Track locations.
13403 (stmtMerge): Return value rather than printing, and include arguments
13406 2003-06-03 Paul Eggert <eggert@twinsun.com>
13408 Avoid warnings generated by GCC 2.95.4 when Bison is
13409 configured with --enable-gcc-warnings.
13410 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
13411 yy::]b4_parser_class_name[::translate_,
13412 yy::Stack::operator[] (unsigned),
13413 yy::Stack::operator[] (unsigned) const,
13414 yy::Slice::operator[] (unsigned),
13415 yy::Slice::operator[] (unsigned) const):
13416 Rename local vars to avoid warnings.
13417 * tests/glr-regression.at (Improper handling of embedded actions
13418 and $-N in GLR parsers): Remove unused local variable from yylex.
13419 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
13420 (void) as arg when not pure, since we now assume C89 when building
13421 Bison. Pacify GCC by using parameter.
13423 2003-06-02 Paul Eggert <eggert@twinsun.com>
13425 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
13426 yy::Location::lines, yy::Location::columns): Rename arguments
13427 to avoid shadowing; this removes a warning generated by GCC 3.3.
13429 2003-06-01 Paul Eggert <eggert@twinsun.com>
13431 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
13432 to g++, as GCC 3.3 complains if you do it.
13433 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
13434 everything that WARNING_CFLAGS has, except omit warnings
13435 not suitable for C++.
13436 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
13437 * tests/atlocal.in (CXXFLAGS): New var.
13438 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
13440 Fix a GLR parser bug I reported in February; see
13441 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
13442 The problem was that GLR parsers did not conform to the C standard,
13443 because actions like { $1 = $2 + $3; } expanded to expressions
13444 that invoked YYFILL in separate subexpressions, and YYFILL assigned
13445 to a local variable. The C standard says that expressions
13446 like (var = f ()) + (var = f ()) have undefined behavior.
13447 Another problem was that GCC sometimes issues warnings that
13448 yyfill and its parameters are unused.
13450 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
13451 as possibly unused.
13452 (yyfill): New function.
13454 (yyuserAction): Change type of yynormal to bool, so that it matches
13455 the new yyfill signature. Mark it as possibly unused.
13458 Follow up on a bug I reported in February, where a Bison-generated
13459 parser can loop. Provide a test case and a fix for yacc.c. I
13460 don't have a fix for lalr1.cc or for glr.c, unfortunately.
13461 The original bug report is in:
13462 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
13464 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
13465 macro's size was becoming unwieldy.
13466 (yyerrlab): Do not discard an empty lookahead symbol, as this
13467 might destroy garbage.
13468 (yyerrorlab): New label, with the old contents of YYERROR,
13469 plus the following change: pop the stack of rhs corresponding
13470 to the production that invoked YYERROR. That is how Yacc
13471 behaves, and POSIX requires this behavior.
13472 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
13473 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
13474 Define 'alarm' to do nothing if unistd.h is not available.
13475 Add a new rule "exp: '-' error;" to test the above change to
13476 data/yacc.c. Use 'alarm' to abort any test taking longer than
13477 10 seconds, as it's probably looping.
13478 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
13479 Also, the new yacc.c generates two fewer diagnostics for an
13482 2003-05-24 Paul Eggert <eggert@twinsun.com>
13484 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
13485 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
13486 This fixes a problem reported by John Bowman when the Compaq/HP
13487 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
13488 -ansi -Wall -gall).
13489 * data/yacc.c (union yyalloc): Likewise.
13490 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
13492 Switch from 'int' to 'bool' where that makes sense.
13494 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
13495 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
13496 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
13497 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
13498 Return or accept bool, not int. All callers changed.
13499 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
13500 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
13501 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
13502 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
13503 bitset_or_and_cmp_): Likewise.
13504 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
13505 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
13506 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
13507 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
13508 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
13509 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
13510 bitset_stats_or_and_cmp): Likewise.
13511 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
13512 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
13513 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
13514 ebitset_xor_cmp): Likewise.
13515 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
13516 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
13517 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
13518 lbitset_xor_cmp): Likewise.
13519 * lib/bbitset.h: Include <stdbool.h>.
13520 (struct bitset_vtable): The following members now return bool, not
13521 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
13522 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
13524 * src/conflicts.c (count_rr_conflicts): Likewise.
13525 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
13527 * lib/ebitset.c (ebitset_obstack_init): Likewise.
13528 * lib/lbitset.c (lbitset_obstack_init): Likewise.
13529 * src/getargs.c (debug_flag, defines_flag, locations_flag,
13530 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13531 graph_flag): Likewise.
13532 * src/getargs.h (debug_flag, defines_flag, locations_flag,
13533 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13534 graph_flag): Likewise.
13535 * src/output.c (error_verbose): Likewise.
13536 * src/output.h (error_verbose): Likewise.
13537 * src/reader.c (start_flag, typed): Likewise.
13538 * src/reader.h (typed): Likewise.
13539 * src/getargs.c (LOCATIONS_OPTION): New constant.
13540 (long_options, getargs): Use it.
13541 * src/lalr.c (build_relations): Use bool, not int.
13542 * src/nullable.c (nullable_compute): Likewise.
13543 * src/print.c (print_reductions): Likewise.
13544 * src/tables.c (action_row, pack_vector): Likewise.
13545 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
13546 * src/output.c (prepare): Use it.
13547 * src/output.c (token_definitions_output,
13548 symbol_destructors_output, symbol_destructors_output): Use string,
13549 not boolean integer, to keep track of whether to output separator.
13550 * src/print_graph.c (print_core): Likewise.
13551 * src/state.c (state_rule_lookaheads_print): Likewise.
13553 * config/install-sh: Sync from automake 1.7.5.
13555 2003-05-14 Paul Eggert <eggert@twinsun.com>
13557 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13558 semicolon after a grammar declaration, in the interest of possible
13559 future changes to the Bison input language.
13560 Do not allow a stray semicolon at the start of the grammar.
13561 (rhses.1): Allow one or more semicolons after any rule, including
13562 just before "|" as required by POSIX.
13563 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13566 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13568 %parse-param support for lalr1.cc.
13570 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13571 b4_cc_constructor_calls, b4_cc_constructor_call,
13572 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13574 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13575 parse-param arguments.
13576 (yy::b4_parser_class_name): Declare instance variables to
13577 hold parse-param arguments.
13578 * tests/calc.at: s/value/semantic_value/ because value clashes
13579 with a member of yy::b4_parser_class_name. Adjust C++ code
13580 to handle %parse-param. Enable %parse-param test in C++.
13582 2003-05-12 Paul Eggert <eggert@twinsun.com>
13584 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13585 English a bit. Fix fclose typo. Change "const char" to "char
13586 const", and use ANSI C rather than K&R for "main". Suggest
13587 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13588 and suggest yy_switch_to_buffer.
13590 2003-05-05 Paul Eggert <eggert@twinsun.com>
13592 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13593 C89. This avoids a diagnostic on compilers that define __STDC__
13594 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13595 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13597 2003-05-03 Paul Eggert <eggert@twinsun.com>
13599 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13600 Do not overrun array bounds.
13601 This should fix a bug reported today by Olatunji Oluwabukunmi in
13602 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13604 2003-04-29 Akim Demaille <akim@epita.fr>
13606 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13607 * src/getargs.c, src/getargs.h: here, as bool, not int.
13608 (nondeterministic_parser): New.
13609 * src/parse-gram.y, src/scan-gram.l: Support
13610 %nondeterministic-parser.
13611 * src/output.c (prepare): Use nondeterministic_parser instead
13612 of glr_parser where appropriate.
13613 * src/tables.c (conflict_row, action_row, save_row)
13614 (token_actions, token_actions, pack_vector): Ditto.
13616 2003-04-29 Akim Demaille <akim@epita.fr>
13618 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13620 2003-04-29 Akim Demaille <akim@epita.fr>
13622 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13623 with %pure-parser and %locations to exercise the patch from Yakov
13626 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13628 * data/yacc.c: (b4_lex_param): Corrected for the case where
13629 %lex-param is provided and %pure-parser isn't.
13631 2003-04-27 Paul Eggert <eggert@twinsun.com>
13633 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13634 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13635 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13636 if it is not defined.
13637 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13639 2003-04-26 Paul Eggert <eggert@twinsun.com>
13641 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13642 Declare to be of type suitable for the ninf value itself, not of
13643 type suitable for the corresponding table, since the latter might
13644 be unsigned but the ninf value might be negative. This fixes a
13645 bug reported by Alexandre Duret-Lutz in
13646 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13648 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13649 invokes it. We shouldn't invoke it twice because it will attempt
13650 to put error.o in the archive twice. This fixes a glitch reported
13651 by Martin Mokrejs in
13652 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13654 2003-04-21 Paul Eggert <eggert@twinsun.com>
13656 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13659 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13661 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13662 Fix obvious typo that results in uncompilable GLR parsers
13663 when both %pure-parser and %locations are used. (trivial change)
13665 2003-04-17 Paul Eggert <eggert@twinsun.com>
13667 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13668 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13669 Do not insert the expected token via unput, as this runs afoul
13670 of a POSIX-compatibility bug in flex 2.5.31.
13671 All uses changed to BEGIN the parent state,
13672 since we no longer insert the expected token via unput.
13673 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13674 that is no longer emitted after the above change.
13676 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13677 the first one. This change is from Paul Hilfinger, and it fixes
13678 regression reported by Werner Lemberg in
13679 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13681 (resolve_sr_conflict): Don't invoke state_errs_set
13682 unless one or more tokens have been explicitly made errors.
13683 Otherwise, the above change causes Bison to abort.
13685 * tests/existing.at (GNU pic Grammar): New test case, taken from
13688 2003-03-31 Akim Demaille <akim@epita.fr>
13690 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13692 2003-03-31 Akim Demaille <akim@epita.fr>
13694 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13697 2003-03-31 Akim Demaille <akim@epita.fr>
13699 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13700 From Paul Hilfinger.
13702 2003-03-29 Akim Demaille <akim@epita.fr>
13704 * m4/error.m4: Do not put under dynamic conditions some code which
13705 expansion is under static control.
13707 2003-03-29 Akim Demaille <akim@epita.fr>
13709 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13711 2003-03-29 Akim Demaille <akim@epita.fr>
13713 * doc/bison.texinfo (Strings are Destroyed): New.
13715 2003-03-13 Paul Eggert <eggert@twinsun.com>
13717 * .cvsignore: Add configure.lineno.
13718 * src/.cvsignore: Add yacc.
13719 * tests/.cvsignore: Add testsuite.log.
13720 * doc/fdl.texi: Sync with latest FSF version.
13722 2003-03-12 Paul Eggert <eggert@twinsun.com>
13724 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13725 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13726 cursor, instead of leaving it undefined. This fixes a bug
13727 reported by Tim Van Holder in
13728 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13729 * tests/input.at (Torturing the Scanner): Test the scanner on
13730 an empty input file, which was Tim Van Holder's test case.
13732 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13733 <sys/resource.h> can be included, include sys/time.h and
13734 sys/times.h first, if available. This works around the SunOS
13735 4.1.4 porting bug reported by Bruce Becker in
13736 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13738 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13739 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13740 AC_HEADER_SYS_WAIT.
13742 Merge changes from gnulib. This was prompted because the CVS
13743 snapshot didn't build on Solaris 7 due to strnlen problems.
13745 These changes need to be merged back into gnulib:
13746 * lib/hash.c: Include <stdbool.h> unconditionally.
13747 * m4/onceonly.m4 (m4_quote): New macro.
13748 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13749 Quote AC_FOREACH variable-expansions properly.
13750 The 2003-01-03 obstack.h change also needs merging.
13751 {end of changes requiring merging}
13753 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13754 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13755 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13756 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13757 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13758 New files, imported from gnulib.
13759 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13762 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13763 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13766 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13768 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13769 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13770 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13771 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13772 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13773 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13774 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13775 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13776 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13777 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13778 (jm_PREREQ_ARGMATCH): Remove.
13779 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13780 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13782 * src/system.h: Include <stdbool.h> unconditionally.
13784 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13785 assuming at least C89 in the bitset code for some time now.
13787 2003-03-03 Akim Demaille <akim@epita.fr>
13791 2003-03-02 Akim Demaille <akim@epita.fr>
13793 * doc/bison.texinfo (Table of Symbols): Reactivate the
13794 documentation for %lex-param, and %parse-param.
13796 2003-03-02 Akim Demaille <akim@epita.fr>
13798 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13799 generate verbose error messages.
13800 Use the number of tokens as an upper bound in yytname, as it
13801 cannot be a non terminal.
13803 2003-03-02 Akim Demaille <akim@epita.fr>
13805 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13808 2003-03-02 Akim Demaille <akim@epita.fr>
13810 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13811 Use them to exercise yycheck overrun.
13812 Based on Andrew Suffield's grammar.
13814 2003-03-02 Akim Demaille <akim@epita.fr>
13816 Create tests/local.at for Bison generic testing macros.
13818 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13819 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13821 * tests/calc.at (AT_CHECK_CALC): Adjust.
13822 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13823 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13824 * tests/local.at: here.
13825 (AT_COMPILE_CXX): Tags the tests using it as c++.
13826 Ignore the test if CXX is not functional.
13828 2003-03-01 Paul Eggert <eggert@twinsun.com>
13830 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13831 not loc->end, since loc->end might contain garbage and this leads
13832 to undefined behavior on some platforms.
13833 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13834 depend on *loc, so that the reader doesn't give the the false
13835 impression that *loc is initialized.
13836 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13837 does not survive the return.
13839 2003-03-01 Akim Demaille <akim@epita.fr>
13841 * src/scan-gram.l (code_start): Always initialize it when entering
13842 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13843 yylex invocation. An alternative would be making it static, but
13844 then it starts with the second %%'s beginning, instead of its end.
13846 2003-02-28 Paul Eggert <eggert@twinsun.com>
13848 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13849 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13850 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13852 2003-02-26 Paul Eggert <eggert@twinsun.com>
13854 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13855 Remove Sequent/Pyramid discussion (nobody uses them any more).
13856 Merge VMS and MS-DOS discussion; these ports may well be dead
13857 but let's keep mentioning them for now. Put <> around email
13858 addresses. Add copyright notice.
13860 2003-02-24 Paul Eggert <eggert@twinsun.com>
13862 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13863 to avoid collision with flex use of yylineno.
13864 Problem reported by Bruce Lilly in
13865 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13866 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13867 * data/yacc.c (yy_reduce_print): Likewise.
13869 * config/depcomp: Sync with Automake 1.7.3.
13871 2003-02-21 Akim Demaille <akim@epita.fr>
13873 * data/lalr1.cc: Use temporary variables instead of casts to
13874 change integer types.
13875 Suggested by Paul Eggert.
13877 2003-02-21 Akim Demaille <akim@epita.fr>
13879 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13880 to avoid confusions with lalr1.cc's notion of Position.
13881 Suggested by Paul Eggert.
13883 2003-02-20 Akim Demaille <akim@epita.fr>
13885 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13886 before initial_columns.
13887 (location.hh): Use consistent variable names when defining the
13889 Use "last" so that we subtract from Positions, not from unsigned.
13891 2003-02-20 Akim Demaille <akim@epita.fr>
13893 * data/lalr1.cc (position.hh): New subfile, including the extended
13894 and Doxygen'ed documentation of class Position.
13895 (location.hh): Use it.
13896 Document a` la Doxygen.
13897 With the help of Benoit Perrot.
13899 2003-02-20 Akim Demaille <akim@epita.fr>
13901 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13903 Redefine AT_YYERROR_SEES_LOC_IF using it.
13904 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13906 Don't use the location in yy::Parser::error_ and
13907 yy::Parser::print_ when not %locations.
13908 Activate more lalr1.cc tests.
13910 2003-02-19 Akim Demaille <akim@epita.fr>
13912 * data/lalr1.cc: When displaying a line number, be sure to make it
13915 2003-02-19 Akim Demaille <akim@epita.fr>
13917 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13919 (YYABORT, YYACCEPT, YYERROR): New.
13920 * tests/calc.at: Renable the lalr1.cc test.
13922 2003-02-19 Akim Demaille <akim@epita.fr>
13924 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13925 error recovery, mixing with/without pops and discarding of the
13928 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13930 2003-02-17 Paul Eggert <eggert@twinsun.com>
13932 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13933 * tests/testsuite.at (AT_COMPILE): Use them.
13934 This fixes the testsuite problem reported by Robert Lentz in
13935 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13937 2003-02-12 Paul Eggert <eggert@twinsun.com>
13939 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13940 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13941 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13942 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13943 Check for malloc failure, for consistency with yacc.c.
13944 (yytname_size): Remove, for consistency with yacc.c.
13946 The bug still remains in data/lalr1.cc, as I didn't have time
13949 2003-02-06 Akim Demaille <akim@epita.fr>
13951 * configure.ac (GXX): Rename as...
13952 (CXX): this, to keep the original Autoconf semantics.
13954 * data/lalr1.cc: Fix b4_copyright invocations.
13955 If YYDEBUG is not defined, don't depend upon name_ being defined.
13956 (location.hh): Include string and iostream.
13957 (Position::filename): New member.
13958 (Position::Position ()): New.
13959 (operator<< (Position)): New.
13960 (operator- (Position, int)): New.
13961 (Location::first, Location::last): Rename as...
13962 (Location::begin, Location::end): these, to mock the conventional
13964 (operator<< (Location)): New.
13965 * tests/atlocal.in (CXX): New.
13966 * tests/testsuite.at (AT_COMPILE_CXX): New.
13967 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13968 locations in a more synthetic way.
13969 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13971 Adjust the C locations to match those from Emacs: first column is
13973 Change all the expected results.
13974 Conform to the GCS: simplify the locations when applicable.
13975 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13976 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13977 these CPP macros with the m4 macros new defined by...
13978 (AT_CHECK_PUSHDEFS): this, i.e.:
13979 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13980 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13982 (AT_CHECK_POPDEFS): Undefine them.
13983 (AT_CHECK_CALC_LALR1_CC): New.
13984 Use it for the first lalr1.cc test.
13986 2003-02-04 Akim Demaille <akim@epita.fr>
13988 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13989 Location as is defined.
13991 2003-02-04 Akim Demaille <akim@epita.fr>
13993 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13994 name_ being defined.
13996 2003-02-03 Paul Eggert <eggert@twinsun.com>
13998 * src/gram.h (start_symbol): Remove unused decl.
14000 Use more-consistent naming conventions for local vars.
14002 * src/derives.c (derives_compute): Change type of local var from
14003 int to rule_number.
14004 * src/gram.c (grammar_rules_partial_print): Likewise.
14005 * src/print.c (print_core): Likewise.
14006 * src/reduce.c (reduce_grammar_tables): Likewise.
14008 * src/gram.c (grammar_dump): Change name of item_number *
14009 local var from r to rp.
14010 * src/nullable.c (nullable_compute): Likewise.
14012 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14014 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14015 for symbol or symbol_number var.
14016 * src/reader.c (grammar_start_symbol_set): Likewise.
14017 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14019 * src/state.c (transitions_to): Likewise.
14020 * src/state.h: Likewise.
14021 * src/tables.c (symbol_number_to_vector_number): Likewise.
14023 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14026 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14029 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14032 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14033 Use str, not s, for char * var. Use ch, not c, for character var.
14034 Use size for size var.
14036 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14038 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14040 * src/uniqstr.h: Likewise.
14042 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14043 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14044 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14045 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14046 param to have same name as that of enum, so that we don't use
14047 "s" to stand for a non-state.
14049 2003-02-02 Akim Demaille <akim@epita.fr>
14051 * src/scan-skel.l: Scan more than one inert character per yylex
14054 2003-02-01 Paul Eggert <eggert@twinsun.com>
14058 * po/LINGUAS: Add ms.
14060 2003-01-30 Akim Demaille <akim@epita.fr>
14062 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14064 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14066 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14069 Changes in response to error report by S. Eken: GLR mode does not
14070 handle negative $ indices or $ indices in embedded rules correctly.
14071 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
14073 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14074 (b4_rhs_location): Ditto.
14075 (yyfill): New function to copy from stack tree into array
14077 (yyuserAction): Modify to allow incremental move of semantic values
14078 to rhs array when in GLR mode.
14079 Define YYFILL to use in user-defined actions to fill semantic array
14081 Remove dummy use of yystack, as there is now a guaranteed use.
14082 (yydoAction): Modify to allow incremental move of semantic values
14083 to rhs array when in GLR mode.
14084 (yyresolveAction): Ditto.
14085 (yyglrShiftDefer): Update comment.
14086 (yyresolveStates): Use X == NULL for pointers, not !X.
14087 (yyglrReduce): Ditto.
14088 (yydoAction): Ditto
14090 * tests/glr-regr1.at: Rename to ...
14091 * tests/glr-regression.at: Add new regression test for the problems
14092 described above (adapted from S. Eken).
14093 Update copyright notice.
14094 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
14095 * tests/Makefile.am: Ditto.
14097 2003-01-28 Paul Eggert <eggert@twinsun.com>
14099 * data/lalr1.cc: Do not use @output_header_name@ unless
14100 b4_defines_flag is set. This fixes two bugs reported by
14102 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
14103 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
14105 2003-01-21 Paul Eggert <eggert@twinsun.com>
14107 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
14108 we don't need to worry about yyerrlab1 being reported as an
14109 "unused label" by non-GCC C compilers. The downside is that if
14110 locations are used then a couple of statements are duplicated each
14111 time YYERROR is invoked, but the upside is that the warnings
14113 (yyerrlab1): Move code to YERROR.
14114 (yyerrlab2): Remove. Change uses back to yyerrlab1.
14115 This reverts some of the 2002-12-27 change.
14117 2003-01-17 Paul Eggert <eggert@twinsun.com>
14119 * src/output.c (symbol_printers_output): Fix typo that led
14120 to core dump. Problem reported by Antonio Rus in
14121 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
14123 2003-01-13 Akim Demaille <akim@epita.fr>,
14124 Quoc Peyrot <chojin@lrde.epita.fr>,
14125 Robert Anisko <anisko_r@lrde.epita.fr>
14127 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
14128 when the stacks contain one element, as the loop would otherwise
14129 free the last state, and then use the top state (the one we just
14130 popped). This means that the initial elements will not be freed
14131 explicitly, as is the case in yacc.c; it is not a problem, as
14132 these elements have fake values.
14134 2003-01-11 Paul Eggert <eggert@twinsun.com>
14136 * NEWS: %expect-violations are now just warnings, reverting
14137 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
14138 bootstrapping problem reported by Matthias Klose; see
14139 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
14140 * src/conflicts.c (conflicts_print): Likewise.
14141 * tests/conflicts.at (%expect not enough, %expect too much,
14142 %expect with reduce conflicts): Likewise.
14143 * doc/bison.texinfo (Expect Decl): Document this. Also mention
14144 that the warning is enabled if the number of conflicts changes
14145 (not necessarily increases).
14147 * src/getargs.c (version): Update copyright year.
14149 2003-01-09 Akim Demaille <akim@epita.fr>
14151 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
14153 2003-01-08 Paul Eggert <eggert@twinsun.com>
14155 * Makefile.maint (WGETFLAGS):
14156 New macro, containing "-C off" to disable proxy caches.
14157 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
14158 (rel-check): Use $(WGET) instead of wget.
14160 2003-01-06 Paul Eggert <eggert@twinsun.com>
14162 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
14163 the GLR paper of Scott, Johnstone and Hussain.
14165 2003-01-04 Paul Eggert <eggert@twinsun.com>
14167 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
14168 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
14169 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
14170 (EXTRA_LIBRARIES): New var, for liby.a.
14171 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
14172 (EXTRA_SCRIPTS): New var, for yacc.
14174 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
14175 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
14176 Problem reported by Nelson H. F. Beebe.
14178 2003-01-03 Paul Eggert <eggert@twinsun.com>
14180 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
14181 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
14182 when compiling Bison 1.875's `bitset bset = obstack_alloc
14183 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
14185 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
14186 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
14187 grow to a huge size with typical invocation.
14189 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
14190 Use the pattern recommended by Autoconf 2.57, except also protect
14191 against double-definition.
14192 * src/system.h: Likewise.
14193 Portability issues reported by Nelson H. F. Beebe.
14195 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
14196 All uses changed. Provide a definition in both C and C++.
14197 (yytrue, yyfalse): Define even if defined (__cplusplus).
14199 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
14200 Reported by Nelson H. F. Beebe.
14202 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
14204 2003-01-02 Paul Eggert <eggert@twinsun.com>
14206 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
14207 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
14208 Bug reported by Nelson H. F. Beebe.
14210 2003-01-01 Paul Eggert <eggert@twinsun.com>
14214 2002-12-30 Paul Eggert <eggert@twinsun.com>
14216 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
14218 (<INITIAL>","): Here. This causes stray "," to be treated
14221 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
14222 last brace in braced code when not in Yacc mode, for compatibility
14223 with Bison 1.35. This resurrects the 2001-12-15 patch to
14226 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
14227 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
14229 2002-12-28 Paul Eggert <eggert@twinsun.com>
14231 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
14232 that of SYM's type. This fixes Debian bug 168069, reported by
14235 2002-12-28 Paul Eggert <eggert@twinsun.com>
14239 Switch back to the Yacc style of conflict reports, undoing some
14240 of the 2002-07-30 change.
14241 * doc/bison.texinfo (Understanding): Use Yacc style for
14242 conflict reports. Also, use new way of locating rules.
14243 * src/conflicts.c (conflict_report):
14244 Renamed from conflict_report_yacc, removing the old
14245 'conflict_report'. Translate the entire conflict report at once,
14246 so that we don't assume that "," has the same interpretation in
14248 (conflicts_output): Use Yacc-style conflict report for each state,
14249 instead of our more-complicated style.
14250 (conflicts_print): Use Yacc-style conflict report, except print
14251 the input file name when not emulating Yacc.
14252 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
14253 Conflicted Reduction, %expect not enough, %expect too much,
14254 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
14255 * tests/existing.at (GNU Cim Grammar): Likewise.
14256 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
14258 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
14259 fatal): Don't invoke fflush; it's not needed and it might even be
14260 harmful for stdout, as stdout might not be open.
14261 * src/reduce.c (reduce_print): Likewise.
14263 2002-12-27 Paul Eggert <eggert@twinsun.com>
14265 Fix a bug where error locations were not being recorded correctly.
14266 This problem was originally reported by Paul Hilfinger in
14267 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
14269 * data/yacc.c (yyparse): New local var yylerrsp, to record the
14270 top of the location stack's error locations.
14271 (yyerrlab): Set it. When discarding a token, push its location
14272 onto yylerrsp so that we don't lose track of the error's end.
14273 (yyerrlab1): Now is only the target of YYERROR, so that we can
14274 properly record the location of the action that failed. For GCC
14275 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
14276 GCC warning about yyerrlab1 being unused if YYERROR is unused.
14277 (yyerrlab2): New label, which yyerrlab now falls through to.
14278 Compute the error's location by applying YYLLOC_DEFAULT to
14279 the locations of all the symbols that went into the error.
14280 * doc/bison.texinfo (Location Default Action): Mention that
14281 YYLLOC_DEFAULT is also invoked for syntax errors.
14282 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14283 Error locations include the locations of all the tokens that were
14284 discarded, not just the last token.
14286 2002-12-26 Paul Eggert <eggert@twinsun.com>
14288 * src/files.c: Include quote.h.
14289 (compute_output_file_names): Warn if we detect conflicting
14290 outputs to the same file. This should catch the misunderstanding
14291 exemplified by Debian Bug 165349, reported by Bruce Stephens..
14293 * src/conflicts.c (conflicts_print): If the user specifies
14294 "%expect N", report an error if there are any reduce/reduce
14295 conflicts. This is what the manual says should happen.
14296 This fixes Debian bug 130890, reported by Anthony DeRobertis.
14297 * tests/conflicts.at (%expect with reduce conflicts): New test.
14299 Don't use m4_include on relative file names, as it doesn't work as
14300 desired if there happens to be a file with that name under ".".
14302 * m4sugar/version.m4: Remove; it was included but it wasn't used.
14303 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
14304 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
14305 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
14306 * src/output.c (output_skeleton): Use full path names when
14307 specifying a file to include; don't rely on include path, as
14308 it's unreliable when the working file contains a file with
14311 2002-12-25 Paul Eggert <eggert@twinsun.com>
14313 Remove obsolete references to bison.simple and bison.hairy.
14314 Problem mentioned by Aubin Mahe in
14315 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
14316 * data/glr.c: Comment fix.
14317 * doc/bison.1: Remove references. Also, mention "yacc".
14319 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
14322 * src/parse-gram.y (declaration): Use enum "report_states" rather
14323 than its numeric value 1.
14325 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
14326 opening a new one. This fixes Debian bug 165349, reported by
14329 2002-12-24 Paul Eggert <eggert@twinsun.com>
14333 * Makefile.maint (cvs-update): Don't assume that the shell
14334 supports $(...), as Solaris sh doesn't.
14336 * src/parse-gram.y (lloc_default): Remove test for empty
14337 nonterminals at the end, since it didn't change the result.
14339 2002-12-24 Paul Eggert <eggert@twinsun.com>
14341 If the user does not define YYSTYPE as a macro, Bison now declares it
14342 using typedef instead of defining it as a macro. POSIX requires this.
14343 For consistency, YYLTYPE is also declared instead of defined.
14345 %union directives can now have a tag before the `{', e.g., the
14346 directive `%union foo {...}' now generates the C code
14347 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
14348 The default union tag is `YYSTYPE', for compatibility with Solaris 9
14349 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
14350 instead of `yyltype'.
14352 `yystype' and `yyltype' are now obsolescent macros instead of being
14353 typedefs or tags; they are no longer documented and will be
14354 withdrawn in a future release.
14356 * data/glr.c (b4_location_type): Remove.
14357 (YYSTYPE): Renamed from yystype.
14358 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
14359 (struct YYLTYPE): Renamed from struct yyltype.
14360 (YYLTYPE): Renamed from yyltype.
14361 (yyltype, yystype): New (and obsolescent) macros,
14362 for backward compatibility.
14363 * data/yacc.c: Likewise.
14365 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
14366 does not specify a union tag. This is for compatibility with
14369 * src/parse-gram.y (add_param): 2nd arg is now char * not char
14370 const *, since it is now modified by stripping surrounding { }.
14371 (current_braced_code): Remove.
14372 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
14373 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
14374 trailing " {...}". Now of type <chars>.
14375 (grammar_declaration): Adjust to bundled tokens.
14376 (code_content): Remove; stripping is now done by add_param.
14377 (print_token_value): Print contents of bundled tokens.
14378 (token_name): New function.
14380 * src/reader.h (braced_code, current_braced_code): Remove.
14381 (token_name): New decl.
14383 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
14384 token_type, not braced_code code_kind. All uses changed.
14385 (SC_PRE_CODE): New state, for scanning after a keyword that
14386 has (or usually has) an immediately-following braced code.
14387 (token_type): New local var, to keep track of which token type
14388 to return when scanning braced code.
14389 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
14390 <INITIAL>"%parse-param", <INITIAL>"%printer",
14391 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
14392 instead of returning a token type immediately.
14393 (<INITIAL>"{"): Set token type.
14394 (<SC_BRACED_CODE>"}"): Use it.
14395 (handle_action_dollar, handle_action_at): Now returns bool
14396 indicating success. Fail if ! current_rule; this prevents a core dump.
14397 (handle_symbol_code_dollar, handle_symbol_code_at):
14398 Remove; merge body into caller.
14399 (handle_dollar, handle_at): Complain in invalid contexts.
14401 * NEWS, doc/bison.texinfo: Document the above.
14402 * NEWS: Fix years and program names in copyright notice.
14404 2002-12-17 Paul Eggert <eggert@twinsun.com>
14406 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
14407 Reporting, Table of Symbols): Omit mentions of %lex-param and
14408 %parse-param from the documentation for now.
14410 2002-12-15 Paul Eggert <eggert@twinsun.com>
14412 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
14413 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
14414 lookahead symbol, and which sets yychar in parser actions) and it
14415 disagreed with the Bison documentation. Bug
14416 reported by Andrew Walrond.
14418 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
14419 as the caller now does that.
14420 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
14421 (YYEMPTY): Parenthesize right hand side, since others use it.
14422 (yyparse): Don't assume that our generated code is the only code
14425 2002-12-13 Paul Eggert <eggert@twinsun.com>
14429 POSIX requires a "yacc" command.
14430 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
14431 (MOSTLYCLEANFILES): Add yacc.
14433 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
14434 as an alias for bison y.
14436 * po/LINGUAS: Add da.
14438 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
14439 problem with latest <getopt.h>.
14440 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
14442 * doc/fdl.texi: Upgrade to 1.2.
14443 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
14444 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
14445 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
14447 * config/install-sh: Sync with autotools.
14449 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
14450 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14451 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
14452 locations are requested.
14453 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
14454 locations are requested.
14456 2002-12-12 Paul Eggert <eggert@twinsun.com>
14458 Remove unportable casts and storage allocation tricks.
14459 While we're at it, remove almost all casts, since they
14460 usually aren't needed and are a sign of trouble.
14462 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
14464 * src/derives.c (derives_compute): Do not subtract NTOKENS from
14465 the pointer DSET returned by malloc; this isn't portable.
14466 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
14467 Similarly for DERIVES.
14468 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
14469 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
14470 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
14472 * src/derives.c (derives_compute): Do not bother invoking
14473 int_of_rule_number, since rule numbers are integers.
14475 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
14476 rather than XMALLOC (char, N).
14478 * src/files.c (filename_split): Rewrite to avoid cast.
14480 * src/gram.h (symbol_number_as_item_number,
14481 item_number_as_symbol_number, rule_number_as_item_number,
14482 item_number_as_rule_number):
14483 Now inline functions rather than macros, to avoid casts.
14484 * src/state.h (state_number_as_int): Likewise.
14485 * src/tables.c (state_number_to_vector_number,
14486 symbol_number_to_vector_number): Likewise.
14488 * src/gram.h (int_of_rule_number): Remove; no longer used.
14490 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
14491 since the resulting storage is always stored into.
14493 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
14496 * src/muscle_tab.c (muscle_m4_output):
14497 Now inline. Return bool, not int.
14498 * src/state.c (state_compare): Likewise.
14499 * src/symtab.c (symbol_check_defined,
14500 symbol_check_alias_consistency, symbol_pack, symbol_translation,
14501 hash_compare_symbol, hash_symbol):
14503 * src/uniqstr.c (uniqstr_print): Likewise.
14504 * src/muscle_tab.c (muscle_m4_output_processor):
14505 New function, to avoid casts.
14506 * src/state.c (state_comparator, stage_hasher): Likewise.
14507 * src/symtab.c (symbol_check_defined_processor,
14508 symbol_check_alias_consistency_processor, symbol_pack_processor,
14509 symbol_translation_processor, hash_symbol_comparator,
14510 hash_symbol_hasher): Likewise.
14511 * src/uniqstr.c (uniqstr_print_processor): Likewise.
14512 * src/muscle_tab.c (muscles_m4_output):
14513 Use new functions instead of casting old functions unportably.
14514 * src/state.c (state_hash_new): Likewise.
14515 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
14516 symbols_token_translations_init):
14518 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
14520 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
14521 var instead of casting to long, to avoid casts.
14522 (prepare_states): Use MALLOC rather than alloca, so that we don't
14523 have to worry about alloca.
14524 * src/state.c (state_hash_lookup): Likewise.
14526 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
14527 local var instead of casting to unsigned char, to avoid casts.
14529 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
14530 STATE_ALLOC): Remove.
14531 (transitions_new, errs_new, reductions_new, state_new): Use malloc
14532 rather than calloc, and use offsetof to avoid allocating slightly
14534 (state_new): Initialize all members.
14536 * src/state.c (state_hash): Use unsigned accumulator, not signed.
14538 * src/symtab.c (symbol_free): Remove; unused.
14539 (symbol_get): Remove cast in lhs of assignment.
14540 (symbols_do): Now static. Accept generic arguments, not
14541 hashing-related ones.
14543 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
14544 (symbol_processor): Remove.
14545 (symbols_do): Remove decl; now static.
14547 * src/system.h (alloca): Remove; decl no longer needed.
14548 (<stddef.h>): Include, for offsetof.
14549 (<inttypes.>, <stdint.h>): Include if available.
14550 (uintptr_t): New type, if system lacks it.
14551 (CALLOC, MALLOC, REALLOC): New macros.
14552 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
14555 * src/tables.c (table_size): Now int, to pacify GCC.
14556 (table_grow, table_ninf_remap): Use signed table size.
14557 (save_row): Don't bother initializing locals when not needed.
14558 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14559 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14561 * src/vcg.h: Correct misspellings.
14563 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14566 * src/getargs.c (getargs): Don't assume EOF == -1.
14568 2002-12-09 Paul Eggert <eggert@twinsun.com>
14570 Change identifier spellings to avoid collisions with names
14571 that are reserved by POSIX.
14573 Don't use names ending in _t, since POSIX reserves them.
14574 For consistency, remove _e and _s endings -- they're weren't
14575 needed to remove ambiguity. All uses changed.
14576 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14577 turn was just renamed from struniq_t.
14578 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14579 which in turn was just renamed from struniq_processor_t.
14580 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14581 in turn was renamed from hash_compare_struniq_t.
14582 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14583 (state_list): Renamed from state_list_t.
14584 * src/assoc.h (assoc): Renamed from assoc_t.
14585 * src/conflicts.c (enum conflict_resolution): Renamed from
14586 enum conflict_resolution_e.
14587 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14588 (rule_list): Renamed from rule_list_t.
14589 * src/getargs.h (enum trace): Renamed from enum trace_e.
14590 (enum report): Renamed from enum report_e.
14591 * src/gram.h (item_number): Renamed from item_number_t.
14592 (rule_number): Renamed from rule_number_t.
14593 (struct rule_s): Remove the "rule_s" part; not used.
14594 (rule): Renamed from rule_t.
14595 (rule_filter): Renamed from rule_filter_t.
14596 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14597 (goto_list): Renamed from goto_list_t.
14598 * src/lalr.h (goto_number): Renamed from goto_number_t.
14599 * src/location.h (location): Renamed from location_t.
14600 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14601 and moved here from:
14602 * src/muscle_tab.h (muscle_entry_t): here.
14603 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14604 (rule_list): Renamed from rule_list_t.
14605 * src/print_graph.c (static_graph): Renamed from graph.
14606 * src/reader.h (braced_code): Renamed from braced_code_t.
14607 Remove brace_code_e tag.
14608 * src/relation.h (relation_node): Renamed from relation_node_t.
14609 (relation_nodes): Renamed from relation_nodes_t.
14610 (relation): Renamed from relation_t.
14611 * src/state.h (state_number): Renamed from state_number_t.
14612 (struct state): Renamed from struct state_s.
14613 (state): Renamed from state_t.
14614 (transitions): Renamed from transitions_t. Unused (and
14615 misspelled) transtion_s tag removed.
14616 (errs): Renamed from errs_t. Unused errs_s tag removed.
14617 (reductions): Renamed from reductions_t. Unused tag
14618 reductions_s removed.
14619 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14620 (struct symbol_list): Renamed from struct symbol_list_s.
14621 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14622 (struct symbol): Renamed from struct symbol_s.
14623 (symbol): Renamed from symbol_t.
14624 * src/tables.c (vector_number): Renamed from vector_number_t.
14625 (action_number): Renamed from action_t.
14626 * src/tables.h (base_number): Renamed from base_t.
14627 * src/vcg.h (enum color): Renamed from enum color_e.
14628 (enum textmode): Renamed from enum textmode_e.
14629 (enum shape): Renamed from enum shape_e.
14630 (struct colorentry): Renamed from struct colorentry_s.
14631 (struct classname): Renamed from struct classname_s.
14632 (struct infoname): Renamed from struct infoname_s.
14633 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14634 (enum decision): Renamed from enum decision_e.
14635 (enum orientation): Renamed from enum orientation_e.
14636 (enum alignment): Renamed from enum alignment_e.
14637 (enum arrow_mode): Renamed from enum arrow_mode_e.
14638 (enum crossing_type): Renamed from enum crossing_type_e.
14639 (enum view): Renamed from enum view_e.
14640 (struct node): Renamed from struct node_s.
14641 (node): Renamed from node_t.
14642 (enum linestyle): Renamed from enum linestyle_e.
14643 (enum arrowstyle): Renamed from enum arrowstyle_e.
14644 (struct edge): Renamed from struct edge.
14645 (edge): Renamed from edge_t.
14646 (struct graph): Renamed from struct graph_s.
14647 (graph): Renamed from graph_t.
14648 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14649 Rename value_t -> value.
14650 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14651 value_t_as_yystype -> value_as_yystype.
14653 Don't include <errno.h> in the mainstream code, since it
14654 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14655 * lib/get-errno.c, lib/get-errno.h: New files.
14656 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14658 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14659 * src/output.c (output_skeleton): Likewise.
14660 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14662 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14664 (handle_action_dollar, handle_action_at): Likewise.
14665 * src/system.h: Do not include <errno.h>.
14666 (TAB_EXT): Renamed from EXT_TAB.
14667 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14669 Avoid str[a-z]*, since <string.h> reserves that name space.
14670 Change all instances of "struniq" in names to "uniqstr", and
14671 likewise for "STRUNIQ" and "UNIQSTR".
14672 * src/uniqstr.c: Renamed from src/struniq.c.
14673 * src/uniqstr.h: Renamed from src/struniq.h.
14674 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14675 * src/files.c (strsuffix): Remove; unused.
14676 (concat2): Renamed from stringappend. Now static.
14677 * src/files.h (strsuffix, stringappend): Remove; unused.
14678 * src/parse-gram.y (<chars>): Renamed from <string>.
14679 (<uniqstr>): Renamed from <struniq>.
14680 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14681 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14682 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14683 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14684 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14685 (N_EXPAND): Renamed from N_STRETCH.
14687 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14688 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14689 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14691 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14692 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14693 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14694 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14695 (BASE_MAXIMUM): Renamed from BASE_MAX.
14696 (BASE_MINIMUM): Renamed from BASE_MIN.
14697 (ACTION_MAX): Remove; unused.
14698 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14699 Unnecessary casts removed from above defines.
14702 Fix misspelling in names.
14703 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14704 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14708 * lib/timevar.c (timevar_report): Renamed from time_report,
14709 for consistency with other names.
14710 * lib/timevar.h (timevar_report): New decl.
14711 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14714 Sort include-file uses.
14716 Reorder all include files under src to be in the order "system.h".
14717 then the ../lib include files in angle brackets (alphabetized),
14718 then the . include files in double-quotes (alphabetized). Fix
14719 dependency breakages encountered in this process, as follows:
14720 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14721 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14722 * src/state.h: Include "symtab.h".
14724 2002-12-08 Paul Eggert <eggert@twinsun.com>
14726 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14727 since this causes problems when __file__ contains character
14728 sequences like "@" that are treated specially by src/scan-skel.l.
14729 Instead, just use the file's basename. This fixes the bug
14730 reported by Martin Mokrejs in
14731 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14733 2002-12-06 Paul Eggert <eggert@twinsun.com>
14735 Add support for rules that do not have trailing semicolons, as
14736 POSIX requires. Improve the quality of locations in Bison
14739 * src/location.c: Include <quotearg.h>.
14740 (empty_location): Now const.
14741 (location_print): New function. Follow the recommendation of the
14742 GNU Coding Standards for locations that span file boundaries.
14743 * src/location.h: Do not include <quotearg.h>; no longer needed.
14744 (boundary): New type.
14745 (location_t): Use it. This allows locations to span file boundaries.
14746 All member uses changed: file -> start.file or end.file (as needed),
14747 first_line -> start.line, first_column -> start.column,
14748 last_line -> end.line, last_column -> end.column.
14749 (equal_boundaries): New function.
14750 (LOCATION_RESET, LOCATION_STEP): Remove.
14751 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14752 (empty_location): Now const.
14753 (location_print): New decl.
14754 * src/parse-gram.y (lloc_default): New function, which handles
14755 empty locations more accurately.
14756 (YYLLOC_DEFAULT): Use it.
14757 (%token COLON): Remove.
14758 (%token ID_COLON): New token.
14760 (declarations, rules): Remove trailing semicolon.
14761 (declaration, rules_or_grammar_declaration):
14762 Allow empty (";") declaration.
14763 (symbol_def): Remove empty actions; no longer needed.
14764 (rules_or_grammar_declaration): Remove trailing semicolon.
14765 (semi_colon.opt): Remove.
14766 * src/reader.h: Include location.h.
14767 (scanner_cursor): New decl.
14768 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14770 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14772 (STEP): Remove. No longer needed, now that adjust_location does
14773 the work. All uses removed.
14774 (scanner_cursor): New var.
14775 (adjust_location): Renamed from extend_location. It now sets
14776 *loc and adjusts the scanner cursor. All uses changed.
14777 Don't bother testing for CR.
14778 (handle_syncline): Remove location arg; now updates scanner cursor.
14779 All callers changed.
14780 (unexpected_end_of_file): Now accepts start boundary of token or
14781 comment, not location. All callers changed. Update scanner cursor,
14783 (SC_AFTER_IDENTIFIER): New state.
14784 (context_state): Renamed from c_context. All uses changed.
14785 (id_loc, code_start, token_start): New local vars.
14786 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14787 processing of Yacc white space and equivalents here.
14788 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14789 instead of returning ID immediately, since we need to search for
14790 a subsequent colon.
14791 (<INITIAL>"'", "\""): Save token_start.
14792 (<INITIAL>"%{", "{", "%%"): Save code_start.
14793 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14794 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14795 BEGIN context_state at end, not INITIAL.
14796 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14797 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14798 Return correct token start.
14799 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14800 the start of a character, string or multiline comment is found.
14801 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14802 Reduction): Adjust reported locations to match the more-precise
14803 results now expected.
14804 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14805 * tests/reduce.at (Useless Rules, Reduced Automaton,
14806 Underivable Rules): Likewise.
14807 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14808 or "|"' now that so many other tokens are allowed by the new grammar.
14810 * src/complain.h (current_file): Remove duplicate decl;
14811 current_file is now owned by files.h.
14812 * src/complain.c, src/scan-gram.l: Include files.h.
14814 2002-12-06 Paul Eggert <eggert@twinsun.com>
14816 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14817 promotes to int; it might be unsigned int.
14818 * data/yacc.c (yy_reduce_print): Likewise.
14820 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14821 be #defined in the prologue, not in the Bison declarations.
14822 This fixes Debian Bug 102878, reported by Shaul Karl.
14824 2002-12-02 Paul Eggert <eggert@twinsun.com>
14826 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14827 * lib/strtoul.c: New file, from gnulib.
14828 This fixes a porting bug reported by Peter Klein in
14829 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14831 2002-11-30 Paul Eggert <eggert@twinsun.com>
14833 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14834 and put only a forward declaration in the prologue. This is for
14835 consistency with the other scanner helper functions.
14837 Type clashes now generate warnings, not errors, since it
14838 appears that POSIX may allow some grammars with type clashes.
14839 * src/reader.c (grammar_current_rule_check): Warn about
14840 type clashes instead of complaining.
14841 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14843 Add Yacc library, since POSIX requires it.
14844 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14845 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14846 * lib/main.c, lib/yyerror.c: New files.
14848 gram_error can be static; it need not be extern.
14849 * src/reader.h (gram_error): Remove decl.
14850 * src/parse-gram.y (gram_error): Now static. Add static decl.
14851 (print_token_value): Omit parameter names from forward decl,
14854 2002-11-29 Paul Eggert <eggert@twinsun.com>
14856 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14857 be declared before being used. E.g., one should typically
14858 declare them in the prologue. Use GNU coding style in examples.
14859 Put "const" consistently after the type it modifies. Mention
14860 that C99 supports "inline". Mention that yyerror traditionally
14863 %parse-param and %lex-param now take just one argument, the
14864 declaration; the argument name is deduced from the declaration.
14866 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14867 Reporting, Table of Symbols): Document this.
14868 * src/parse-gram.y (add_param): New function.
14870 (declaration): Implement new rule for %parse-param and %lex-param.
14871 * src/scan-gram.l: "," now elicits a warning, rather than being
14872 a token; this is more compatible with byacc.
14873 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14875 2002-11-27 Paul Eggert <eggert@twinsun.com>
14877 Rename identifiers to avoid real and potential collisions.
14879 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14880 to avoid collision with lex macro described by Bruce Lilly in
14881 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14882 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14883 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14884 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14886 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14887 The name "yycontrol" violates the name space rules, and this stuff
14888 wasn't being used anyway.
14889 (input): Remove action; this stuff wasn't being used.
14890 (gram_error): Rename local variable yylloc -> loc.
14891 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14892 (YY_DECL): Don't use "yy" at start of local variables.
14893 All uses changed, e.g., yylloc -> loc.
14894 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14895 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14896 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14897 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14899 * src/parse-gram.y (gram_error): loc is now const *.
14900 * src/reader.h (gram_error): Likewise.
14902 2002-11-24 Paul Eggert <eggert@twinsun.com>
14906 * tests/actions.at (Actions after errors): Use an output format
14907 more similar to that of the Printers and Destructors test.
14908 Test the position of the ';' token too.
14909 (Printers and Destructors): Likewise.
14910 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14911 unnecessarily alarming people when the test fails.
14913 * data/yacc.c (yyerrlab1): Move this label down, so that the
14914 parser does not discard the lookahead token if the user code
14915 invokes YYERROR. This change is required for POSIX conformance.
14917 * lib/error.c: Sync with gnulib.
14919 2002-11-22 Paul Eggert <eggert@twinsun.com>
14921 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14922 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14923 * lib/xmalloc.c: Likewise.
14925 2002-11-20 Paul Eggert <eggert@twinsun.com>
14927 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14929 2002-11-20 Paul Eggert <eggert@twinsun.com>
14931 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14932 should use `if (! x) abort ();' rather than `assert (x);', and
14933 anyway it's one less thing to worry about configuring.
14935 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14936 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14937 and replace all instances of assert with abort.
14938 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14939 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14941 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14942 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14943 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14944 hash_find_entry, hash_rehash, hash_insert): Likewise.
14945 * src/conflicts.c (resolve_sr_conflict): Likewise.
14946 * src/lalr.c (set_goto_map, map_goto): Likewise.
14947 * src/nullable.c (nullable_compute): Likewise.
14948 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14949 * src/reader.c (packgram, reader): Likewise.
14950 * src/state.c (state_new, state_free, state_transitions_set,
14951 state_reduction_find): Likewise.
14952 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14953 symbol_pack): Likewise.
14954 * src/tables.c (conflict_row, pack_vector): Likewise.
14955 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14956 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14957 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14958 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14960 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14961 (ARGMATCH_CONSTRAINT): New macro.
14962 (ARGMATCH_ASSERT): Use it.
14964 * src/system.h (verify): New macro.
14965 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14966 rather than assert.
14967 * src/tables.c (tables_generate): Likewise.
14969 * src/struniq.c (struniq_assert): Now returns void, and aborts
14970 if the assertion is false.
14971 (struniq_assert_p): Remove.
14972 * src/struniq.h: Likewise.
14974 2002-11-18 Paul Eggert <eggert@twinsun.com>
14976 * data/glr.c (yygetLRActions): Replace `yyindex' with
14977 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14978 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14979 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14981 2002-11-18 Akim Demaille <akim@epita.fr>
14983 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14985 From Tim Van Holder.
14987 2002-11-17 Paul Eggert <eggert@twinsun.com>
14989 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14990 to "SyntaxError" for consistency with my 2002-11-15 change.
14992 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14993 not define to {}, since this breaks the common use of `YYDPRINTF
14994 ((...));' if a single statement is desired (e.g. before `else').
14995 Work around GCC warnings by surrounding corresponding calls with
14997 (yyhasResolvedValue): Remove unused function.
14998 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15000 (yyreportSyntaxError): Renamed from yyreportParseError.
15001 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15003 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15004 extern when possible. Remove unused initializations.
15006 2002-11-16 Akim Demaille <akim@epita.fr>
15008 Augment the similarity between GLR and LALR traces.
15010 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15011 (YY_REDUCE_PRINT): New.
15012 (yyparse): Use them.
15013 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15015 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15016 state reached after the reduction/recovery, since...
15017 (yyparse, yyprocessOneStack): Report the state we are entering in.
15019 2002-11-16 Akim Demaille <akim@epita.fr>
15021 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15022 Add support for --trace=skeleton.
15023 * src/scan-skel.l: %option debug.
15024 Scan strings of non-@ or \n instead of character by character.
15025 (scan_skel): Handle trace_skeleton.
15027 (@output_parser_name@, @output_header_name@): ``Restore'' their
15028 support (used to be M4 macros).
15029 * data/yacc.c: Quote larger chunks, a la glr.c.
15030 * data/lalr1.cc: Likewise.
15031 The header guards are no longer available, so use some other
15032 string than `YYLSP_NEEDED'.
15034 2002-11-16 Akim Demaille <akim@epita.fr>
15036 Make the ``Printers and Destructors'' test more verbose, taking
15037 `yacc.c''s behavior as (possibly wrong) reference.
15039 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15040 instead of fprint on stdout.
15041 Set and report the last_line of the symbols.
15042 Consistently display values and locations.
15044 2002-11-16 Paul Eggert <eggert@twinsun.com>
15046 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15048 2002-11-15 Paul Eggert <eggert@twinsun.com>
15050 * tests/actions.at (Actions after errors): New test case.
15052 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15053 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15054 tests/action.at, tests/calc.at, tests/conflicts.at,
15055 tests/cxx-type.at, tests/regression.at:
15056 "parse error" -> "syntax error" for POSIX compatibility.
15057 "parsing stack overflow..." -> "parser stack overflow" so
15058 that code matches Bison documentation.
15060 2002-11-15 Akim Demaille <akim@epita.fr>
15062 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15063 take two BRACED_CODE, not two string_content.
15064 Free the scanner's obstack when we are done.
15065 (code_content): New.
15066 * tests/calc.at: Adjust.
15067 * doc/bison.texinfo: Adjust.
15068 Also, make sure to include the `,' for these declarations.
15070 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15072 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15073 definition; avoids potential autoreconf problems.
15075 2002-11-15 Akim Demaille <akim@epita.fr>
15077 Always check the value returned by yyparse.
15079 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15080 returned by yyparse.
15081 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15083 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15084 returned by yyparse.
15086 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15088 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
15091 2002-11-14 Paul Eggert <eggert@twinsun.com>
15093 * src/output.c (output_skeleton): Call xfopen instead of
15094 duplicating xfopen's body.
15096 Fix bugs reported by Nelson H. F. Beebe in
15097 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
15099 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
15100 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
15101 Group compiler. Instead, use "$CC -E bar.c". Include the .h
15102 file twice in the grammar, as an extra check.
15104 * tests/input.at (Torturing the Scanner): Surround the
15105 backslash-newline tests with "#if 0", to make it less likely that
15106 we'll run into compiler bugs. Bring back solitary \ inside
15107 comment, but add a closing comment to work around HP C bug. Don't
15108 test backslash-newline in C character constant.
15110 2002-11-14 Akim Demaille <akim@epita.fr>
15112 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
15113 status of the compiler.
15114 Calling `exit 1' is no longer needed.
15115 Reported by Nelson H. F. Beebe.
15117 2002-11-14 Akim Demaille <akim@epita.fr>
15119 * tests/atlocal.in (CPPFLAGS): We have config.h.
15120 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
15122 * tests/actions.at, tests/calc.at, tests/conflicts.at,
15123 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
15124 * tests/regression.at, tests/torture.at: Use them for all the
15125 grammars that are to be compiled.
15126 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
15127 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
15128 * doc/bison.texinfo (GLR Parsers): Document `inline'.
15130 2002-11-14 Akim Demaille <akim@epita.fr>
15132 * doc/bison.texinfo: Various formatting changes (alignments in
15133 samples, additional @group/@end group, GCS in samples.
15134 Use @deffn instead of simple @table to define the directives,
15135 macros, variables etc.
15137 2002-11-13 Paul Eggert <eggert@twinsun.com>
15139 Fix some bugs reported by Albert Chin-A-Young in
15140 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
15142 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
15143 -o c"; the HP C compiler chatters during compilation.
15144 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
15145 * tests/headers.at (export YYLTYPE): Likewise.
15147 * tests/input.at (Torturing the Scanner): Remove lines containing
15148 solitary backslashes, as they tickle a bug in the HP C compiler.
15150 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
15151 comments, since they're not portable. Use GNU coding style.
15153 2002-11-13 Akim Demaille <akim@epita.fr>
15155 * data/yacc.c: Leave bigger chunks of quoted text.
15156 (YYDSYMPRINTF): New.
15157 Use it to report symbol activities.
15158 * data/glr.c (YYDSYMPRINTF): New.
15161 2002-11-12 Paul Eggert <eggert@twinsun.com>
15165 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
15166 (yyglrReduce): Return yyok, not 0.
15167 This should avoid the enumerated-type warnings reported
15168 by Nelson H. F. Beebe in
15169 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
15171 * lib/bbitset.h (BITSET_INLINE): Remove.
15172 * lib/bitset.h [! BITSET_INLINE]: Remove.
15173 (bitset_set, bitset_reset, bitset_test): Rename local vars
15174 to avoid shadowing warnings by GCC.
15176 * data/glr.c (inline): Remove #define. It's the user's
15177 responsibility to #define it away, just like 'const'.
15178 This fixes one of the bugs reported by Nelson H. F. Beebe in
15179 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
15181 * Makefile.maint (po-check): Scan .l and .y files instead of the
15182 .c and the .h files that they generate. This fixes the bug
15183 reported by Tim Van Holder in:
15184 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
15185 Look for N_ as well as for _. Try to avoid matching #define for
15187 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
15188 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
15189 * src/scan-gram.l: Revamp regular expressions so that " and '
15190 do not confuse xgettext.
15192 * src/struniq.h (struniq_new): Do not declare the return type
15193 to be 'const'; this violates the C standard.
15194 * src/struniq.c (struniq_new): Likewise.
15196 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
15198 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
15199 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
15202 2002-11-12 Akim Demaille <akim@epita.fr>
15204 * Makefile.maint: Sync with Autoconf:
15205 (local_updates): New.
15207 2002-11-12 Akim Demaille <akim@epita.fr>
15209 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
15211 2002-11-12 Akim Demaille <akim@epita.fr>
15213 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
15216 2002-11-12 Akim Demaille <akim@epita.fr>
15218 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
15221 2002-11-12 Akim Demaille <akim@epita.fr>
15223 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
15224 Use it to test the GLR parser.
15226 2002-11-12 Akim Demaille <akim@epita.fr>
15228 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
15230 * data/glr.c (yystos): New.
15231 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
15232 (YYDSYMPRINT): New.
15233 (yyval): Don't define it, it is handled via M4.
15234 (yyrecoverParseError): Free verbosely the discarded symbols.
15235 * data/yacc.c (yysymprint): Remove, rather...
15236 (b4_yysymprint_generate): invoke.
15237 * data/c.m4 (b4_yysymprint_generate): New.
15238 Accept pointers as arguments, as opposed to the version from
15240 (b4_yydestruct_generate): Likewise.
15241 * tests/cations.at (Printers and Destructors): Use Bison directives
15242 instead of CPP macros.
15243 Don't rely on internal details.
15245 2002-11-12 Akim Demaille <akim@epita.fr>
15247 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
15248 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
15249 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
15250 it against YYEMPTY and so forth), work on yytoken (i.e., set
15251 it to YYEMPTY etc.).
15252 (yydestruct): Replace with a b4_yydestruct_generate invocation.
15253 (b4_symbol_actions): Remove.
15254 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
15255 for 0, end-of-input.
15257 2002-11-12 Akim Demaille <akim@epita.fr>
15259 * doc/bison.texinfo (Destructor Decl): New.
15261 2002-11-12 Akim Demaille <akim@epita.fr>
15263 * src/tables.c (tables_generate): Use free for pointers that
15264 cannot be NULL, not XFREE.
15265 (pack_vector): Use assert, not fatal, for bound violations.
15266 * src/state.c (state_new): Likewise.
15267 * src/reader.c (reader): Likewise.
15268 * src/lalr.c (set_goto_map): Likewise.
15269 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
15272 2002-11-12 Akim Demaille <akim@epita.fr>
15274 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
15276 * src/scan-gram.l (last_string): Is global to the file, not to
15278 * src/parse-gram.y (input): Don't append the epilogue here,
15279 (epilogue.opt): do it here, and free the scanner's obstack.
15280 * src/reader.c (epilogue_set): Rename as...
15281 (epilogue_augment): this.
15282 * data/c.m4 (b4_epilogue): Defaults to empty.
15284 2002-11-12 Akim Demaille <akim@epita.fr>
15286 * src/getargs.c (long_options): Remove duplicates.
15287 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
15289 * doc/bison.rnh: Remove.
15290 * doc/bison.texinfo (VMS Invocation): Remove.
15292 2002-11-12 Akim Demaille <akim@epita.fr>
15294 * src/struniq.h, src/struniq.c (struniq_t): Is const.
15295 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
15297 Use struniq for symbols.
15299 * src/symtab.h (symbol_t): The tag member is a struniq.
15300 (symbol_type_set): Adjust.
15301 * src/symtab.c (symbol_new): Takes a struniq.
15302 (symbol_free): Don't free the tag member.
15303 (hash_compare_symbol_t, hash_symbol_t): Rename as...
15304 (hash_compare_symbol, hash_symbol): these.
15305 Use the fact that tags as struniqs.
15306 (symbol_get): Use struniq_new.
15307 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
15309 * src/reader.h (merger_list, grammar_currentmerge_set): The name
15310 and type members are struniqs.
15311 * src/reader.c (get_merge_function)
15312 (grammar_current_rule_merge_set): Adjust.
15313 (TYPE, current_type): Are struniq.
15315 Use struniq for file names.
15317 * src/files.h, src/files.c (infile): Split into...
15318 (grammar_file, current_file): these.
15319 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
15320 * src/reduce.c (reduce_print): Likewise.
15321 * src/getargs.c (getargs): Likewise.
15322 * src/complain.h, src/complain.c: Likewise.
15323 * src/main.c (main): Call struniqs_new early enough to use it for
15325 Don't free the input file name.
15327 2002-11-12 Akim Demaille <akim@epita.fr>
15329 * src/symtab.c (symbol_free): Remove dead deactivated code:
15330 type_name are properly removed.
15331 Don't use XFREE to free items that cannot be NULL.
15332 * src/struniq.h, src/struniq.c: New.
15333 * src/main.c (main): Initialize/free struniqs.
15334 * src/parse-gram.y (%union): Add astruniq member.
15336 * src/scan-gram.l (<{tag}>): Return a struniq.
15337 Free the obstack bit that used to store it.
15338 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
15340 2002-11-11 Paul Eggert <eggert@twinsun.com>
15342 Revamp to fix many (but not all) of the C- and M4-related quoting
15343 problems. Among other things, this fixes the Bison bug reported
15344 by Jan Hubicka when processing the Bash grammar; see:
15345 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
15347 Use new @ escapes consistently. Represent brackets with @{ and @}
15348 rather than @<:@ and @:>@, since this works a bit better with dumb
15349 editors like vi. Represent @ with @@, since @ is now consistently
15350 an escape. Use @oline@ and @ofile@ rather than __oline__ and
15351 __ofile__, to avoid unexpected expansions. Similarly, use @output
15352 rather than #output.
15354 * data/c.m4 (b4_copyright): Omit file name from comment, since
15355 the file name could contain "*/".
15356 (b4_synclines_flag): Don't quote the 2nd argument; it should already
15357 be quoted. All uses changed.
15359 * data/glr.c: Use new @ escapes consistently.
15360 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
15361 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
15362 Remove, since they couldn't handle arbitrary characters in file
15364 * data/lalr1.cc: Likewise.
15365 * data/yacc.c: Likewise.
15367 * src/files.c (output_infix): Remove; all uses removed.
15368 * src/files.h: Likewise.
15370 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
15371 mishandled funny characters in file names, and anyway it isn't
15373 * data/yacc.c: Likewise.
15374 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
15376 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
15377 * data/yacc.c: Likewise.
15379 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
15381 (muscle_init): Quote filename as a C string.
15382 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
15383 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
15384 * src/output.c (escaped_file_name_output): New function.
15385 (prepare_symbols): Quote tokens for M4.
15386 (prepare): Don't insert output_infix, output_prefix,
15387 output_parser_name, output_header_name; this is now down by scan-skel.
15388 Insert skeleton as a C string.
15390 * src/output.c (user_actions_output, symbol_destructors_output,
15391 symbol_printers_output): Quote filenames for C and M4.
15392 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15394 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
15395 escapes other than \\ and \'; this simplifies the code.
15396 (<SC_STRING>): Likewise, for \\ and \".
15397 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
15398 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
15399 Use new escapes @{ and @} for [ and ].
15401 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
15402 them with auto vars.
15403 Switch to new escape scheme, where @ is the escape character uniformly.
15404 Abort if a stray escape character is found. Avoid unbounded input
15405 buffer when parsing non-escaped text.
15407 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
15408 __oline__, #output, $@, and @{ do not have unintended meanings.
15410 2002-11-09 Paul Eggert <eggert@twinsun.com>
15412 Fix the test failure due to GCC warnings described in
15413 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
15414 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
15415 evaluate to 0 if it's impossible for NINF to be in the respective
15417 (yygetLRActions, yyrecoverParseError): Use them.
15419 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
15420 counted in the token inserted at end of file. Now takes
15421 location_t *, not location_t, so that the location can be
15422 adjusted. All uses changed.
15424 * tests/regression.at (Invalid inputs): Adjust wording in
15425 diagnostic to match the new behavior.
15427 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
15428 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
15429 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
15430 abort ();'. This reduces the runtime of the "Many lookaheads"
15431 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
15434 2002-11-07 Paul Eggert <eggert@twinsun.com>
15436 * src/parse-gram.y (CHARACTER): Remove unused token.
15439 * src/scan-gram.l: Remove stack option. We no longer use the
15440 stack, since the stack was never deeper than 1; instead, use the
15441 new auto var c_context to record the stacked value.
15443 Remove nounput option. At an unexpected end of file, we now unput
15444 the minimal input necessary to end cleanly; this simplifies the
15447 Avoid unbounded token sizes where this is easy.
15449 (unexpected_end_of_file): New function.
15450 Use it to systematize the error message on unexpected EOF.
15451 (last-string): Now auto, not static.
15452 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
15453 (scanner_last_string_free): Remove; not used.
15454 (percent_percent_count): Move decl to just before use.
15455 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
15456 not the (never otherwised-used) CHARACTER.
15458 2002-11-07 Akim Demaille <akim@epita.fr>
15460 Let yyerror always receive the msg as last argument, so that
15461 yyerror can be variadic.
15463 * data/yacc.c (b4_yyerror_args): New.
15464 Use it when calling yyerror.
15465 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
15466 Use it when calling yyerror.
15467 * doc/bison.texinfo (Error Reporting): Adjust.
15468 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
15469 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
15471 2002-11-06 Akim Demaille <akim@epita.fr>
15473 #line should have quoted strings.
15474 Ideally, this should be done by m4_quotearg.
15476 * src/scan-skel.l: Include quotearg.h.
15478 * src/output.c (symbol_printers_output)
15479 (symbol_destructors_output): Quote the file name.
15481 2002-11-06 Akim Demaille <akim@epita.fr>
15483 * tests/regression.at (Invalid inputs): Adjust to the recent
15486 2002-11-06 Akim Demaille <akim@epita.fr>
15488 Restore --no-lines.
15489 Reported by Jim Kent.
15491 * data/c.m4 (b4_syncline): New.
15492 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
15493 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
15494 * src/output.c (user_actions_output): Likewise.
15495 (prepare): Define 'b4_synclines_flag'.
15496 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
15498 2002-11-06 Akim Demaille <akim@epita.fr>
15500 * src/main.c (main): Free `infile'.
15501 * src/scan-gram.l (handle_syncline): New.
15503 * src/output.c (user_actions_output, symbol_destructors_output)
15504 (symbol_printers_output): Use the location's file name, not
15506 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15508 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15510 * src/tables.c (matching_state): Don't allow states to match if
15511 either has GLR conflict entries.
15513 2002-11-05 Paul Eggert <eggert@twinsun.com>
15515 * src/scan-gram.l: Use more accurate diagnostics, e.g.
15516 "integer out of range" rather than "invalid value".
15517 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
15520 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
15521 Also, remove one static variable in the scanner.
15523 * src/scan-gram.l (braces_level): Now auto, not static.
15524 Initialize to zero if the compiler is being picky.
15525 (INITIAL): Clear braces_level instead of incrementing it.
15526 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
15527 as POSIX 1003.1-2001 requires.
15528 * src/system.h (IF_LINT): New macro, taken from coreutils.
15529 * configure.ac: Define "lint" if --enable-gcc-warnings.
15531 2002-11-05 Akim Demaille <akim@epita.fr>
15533 * src/scan-gram.l: When it starts with `%', complain about the
15534 whole directive, not just that `invalid character: %'.
15536 2002-11-04 Akim Demaille <akim@epita.fr>
15538 * Makefile.maint: Update from Autoconf.
15539 (update, cvs-update, po-update, do-po-update): New.
15541 2002-11-04 Akim Demaille <akim@epita.fr>
15543 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
15545 Have yyerror `use' its arguments.
15546 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
15547 returns true when location & yacc & pure & parse-param.
15548 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
15550 2002-11-04 Akim Demaille <akim@epita.fr>
15552 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
15554 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15557 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15560 2002-11-03 Paul Eggert <eggert@twinsun.com>
15562 * src/reader.c (get_merge_function, grammar_current_rule_check):
15563 Use consistent diagnostics for reporting type name clashes.
15564 Quote the types with <>, for consistency with Yacc.
15565 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15567 2002-11-03 Akim Demaille <akim@epita.fr>
15569 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15571 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15572 (b4_parse_param): Remove.
15573 Use b4_identification.
15574 Propagate b4_pure_args where needed to pass them to yyerror.
15575 * data/glr.m4 (b4_parse_param): Remove.
15576 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15577 (b4_lpure_formals): New.
15578 Use b4_identification.
15579 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15580 b4_user_formals and b4_user_args.
15581 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15582 (yyreportAmbiguity): When using a pure parser, also need
15583 the location, and the parse-params.
15585 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15586 When using a pure parser, also need the parse-params.
15588 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15589 (%pure-parser + %parse-param) LALR and GLR parsers.
15590 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15591 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15592 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15593 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15594 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15595 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15596 * doc/bison.texinfo: Untabify the whole file.
15597 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15598 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15599 (Error Reporting): Adjust to these new directives.
15600 Document %error-verbose, deprecate YYERROR_VERBOSE.
15602 2002-11-03 Akim Demaille <akim@epita.fr>
15604 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15605 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15606 command line options.
15607 * tests/cxx-type.at: Formatting changes.
15609 2002-11-03 Paul Eggert <eggert@twinsun.com>
15611 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15612 to count columns correctly, and to check for invalid inputs.
15614 Use mbsnwidth to count columns correctly. Account for tabs, too.
15615 Include mbswidth.h.
15616 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15617 (extend_location): New function.
15618 (YY_LINES): Remove.
15620 Handle CRLF in C code rather than in Lex code.
15621 (YY_INPUT): New macro.
15622 (no_cr_read): New function.
15624 Scan UCNs, even though we don't fully handle them yet.
15625 (convert_ucn_to_byte): New function.
15627 Handle backslash-newline correctly in C code.
15628 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15629 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15631 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15632 Use {splice} wherever C allows backslash-newline.
15633 YY_STEP after space, newline, vertical-tab.
15634 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15636 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15638 ({int}, handle_action_dollar, handle_action_at): Check for integer
15641 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15643 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15644 as well as \000. Check for UCHAR_MAX, not 255.
15645 Allow \x with an arbitrary positive number of digits, as in C.
15646 Check for overflow here.
15647 Allow \? and UCNs, for compatibility with C.
15649 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15650 with quote slot used by complain_at.
15652 * tests/input.at: Add tests for backslash-newline, m4 quotes
15653 in symbols, long literals, and funny escapes in strings.
15655 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15656 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15657 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15658 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15659 * m4/mbswidth.m4: New file, from GNU coreutils.
15661 * doc/bison.texinfo (Grammar Outline): Document // comments.
15662 (Symbols): Document that trigraphs have no special meaning in Bison,
15663 nor is backslash-newline allowed.
15664 (Actions): Document that trigraphs have no special meaning.
15666 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15669 2002-11-02 Paul Eggert <eggert@twinsun.com>
15671 * src/reader.c: Don't include quote.h; not needed.
15672 (get_merge_function): Reword warning to be consistent with
15673 type clash diagnostic in grammar_current_rule_check.
15675 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15676 bug in trigraph handling.
15678 * src/output.c (prepare_symbols): When printing token names,
15679 escape "[" as "@<:@" and likewise for "]".
15681 * src/system.h (errno): Remove declaration, as we are now
15682 assuming C89 or better, and C89 guarantees errno.
15684 2002-10-30 Paul Eggert <eggert@twinsun.com>
15686 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15687 Check for close failures.
15688 * src/files.h (xfclose): Return void, not int, since it always
15690 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15692 * src/output.c (output_skeleton): Use xfclose rather than fclose
15693 and ferror. xfclose now checks ferror.
15695 * data/glr.c (YYLEFTMOST_STATE): Remove.
15696 (yyreportTree): Use a stack-based leftmost state. This avoids
15697 our continuing battles with bogus warnings about initializers.
15699 2002-10-30 Akim Demaille <akim@epita.fr>
15701 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15704 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15706 * tests/glr-regr1.at: New test for reported regressions.
15707 * tests/testsuite.at: Add glr-regr1.at test.
15708 * tests/Makefile.am: Add glr-regr1.at test.
15710 2002-10-24 Paul Eggert <eggert@twinsun.com>
15714 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15715 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15716 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15717 Don't assume strdup exists; POSIX says its an XSI extension.
15718 Check for buffer overflow on input.
15720 2002-10-24 Akim Demaille <akim@epita.fr>
15722 * src/output.c (output_skeleton): Don't disable M4sugar comments
15723 too soon: it results in comments being expanded.
15724 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15727 2002-10-24 Akim Demaille <akim@epita.fr>
15729 * data/yacc.c (m4_int_type): New.
15730 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15731 char' as only yacc.c wants K&R portability.
15732 * data/glr.c (yysigned_char): Remove.
15733 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15734 Reported by Quoc Peyrot.
15736 2002-10-23 Paul Eggert <eggert@twinsun.com>
15738 * src/main.c (main): With --trace=time, report times even if a
15739 non-fatal error occurs. Formerly, the times were reported in some
15740 such cases but not in others.
15741 * src/reader.c (reader): Just return if a complaint has been issued,
15742 instead of exiting, so that 'main' can report times.
15744 2002-10-22 Akim Demaille <akim@epita.fr>
15746 * src/system.h: Include sys/types.
15747 Reported by Bert Deknuydt.
15749 2002-10-23 Paul Eggert <eggert@twinsun.com>
15751 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15752 Suggested by Art Haas.
15754 2002-10-22 Paul Eggert <eggert@twinsun.com>
15756 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15757 decl; not needed any more.
15758 * src/main.c (main): Use return to exit, undoing yesterday's change.
15759 The last OS that we could find where this wouldn't work is
15760 SunOS 3.5, and that's too old to worry about now.
15762 * data/glr.c (struct yyltype): Define members even when not
15763 doing locations. This is more consistent with yacc.c, and it
15764 works around the following bug reports:
15765 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15766 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15768 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15769 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15770 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15772 2002-10-22 Akim Demaille <akim@epita.fr>
15774 * data/README: New.
15776 2002-10-21 Paul Eggert <eggert@twinsun.com>
15778 Be consistent about 'bool'; the old code used an enum in one
15779 module and an int in another, and this violates the C standard.
15780 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15781 * configure.ac (AC_HEADER_STDBOOL): Add.
15782 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15783 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15784 * src/symtab.c (hash_compare_symbol_t): Likewise.
15785 * src/system.h (bool, false, true): Use a definition consistent
15786 with ../lib/hash.c. All uses changed.
15788 * src/complain.c (warning_issued): Renamed from warn_message_count,
15789 so that we needn't worry about integer overflow (!).
15790 Now of type bool. All uses changed.
15791 (complaint_issued): Renamed from complain_message_count; likewise.
15793 * src/main.c (main): Use exit to exit with failure.
15795 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15796 rather than 1 and 0.
15797 * src/main.c (main): Likewise.
15798 * src/getargs.c (getargs): Likewise.
15799 * src/reader.c (reader): Likewise.
15801 * src/getarg.c (getargs): Remove duplicate code for
15802 "Try `bison --help'".
15804 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15805 What was that "2" for?
15807 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15808 * src/getargs.c (usage): Likewise.
15810 * src/getargs.c (getargs): When there are too few operands, report
15811 the last one. When there are too many, report the first extra
15812 one. This is how diffutils does it.
15814 2002-10-20 Paul Eggert <eggert@twinsun.com>
15816 Remove K&R vestiges.
15817 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15818 * src/complain.c (VA_START): Remove. Assume prototypes.
15819 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15820 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15821 fatal): Assume prototypes.
15822 * src/complain.h: Assume prototypes.
15823 * src/system.h (PARAMS): Remove.
15824 Include <limits.h> unconditionally, since it's guaranteeed even
15825 for a freestanding C89 compiler.
15826 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15827 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15829 2002-10-20 Akim Demaille <akim@epita.fr>
15831 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15832 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15833 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15834 (yyresolveStates, yyresolveAction, yyresolveStack)
15835 (yyprocessOneStack): Use them.
15836 (yy_reduce_print): New.
15837 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15839 2002-10-20 Akim Demaille <akim@epita.fr>
15841 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15842 arguments and output `void'.
15843 (b4_c_function): Rename as...
15844 (b4_c_function_def): this.
15845 (b4_c_function_decl, b4_c_ansi_function_def)
15846 (b4_c_ansi_function_decl): New.
15847 Change the interpretation of the arguments: before `int, foo', now
15849 * data/yacc.c (yyparse): Prototype and define thanks to these.
15850 Adjust b4_c_function_def uses.
15851 * data/glr.c (yyparse): Likewise, but ANSI only.
15853 2002-10-20 Akim Demaille <akim@epita.fr>
15855 * src/output.c (prepare): Move the definition of `tokens_number',
15856 `nterms_number', `undef_token_number', `user_token_number_max'
15858 (prepare_tokens): Here.
15859 (prepare_tokens): Rename as...
15860 (prepare_symbols): this.
15861 (prepare): Move the definition of `rules_number' to...
15862 (prepare_rules): here.
15863 (prepare): Move the definition of `last', `final_state_number',
15864 `states_number' to...
15865 (prepare_states): here.
15866 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15868 2002-10-20 Akim Demaille <akim@epita.fr>
15870 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15872 2002-10-20 Akim Demaille <akim@epita.fr>
15874 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15877 2002-10-20 Akim Demaille <akim@epita.fr>
15879 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15880 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15882 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15884 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15885 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15888 2002-10-19 Paul Eggert <eggert@twinsun.com>
15890 Do not create a temporary file, as that involves security and
15891 cleanup headaches. Instead, use a pair of pipes.
15892 Derived from a suggestion by Florian Krohm.
15893 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15894 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15895 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15896 (BISON_PREREQ_SUBPIPE): Add.
15897 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15898 Add subpipe.h, subpipe.c.
15899 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15900 * po/POTFILES.in: Add lib/subpipe.c.
15901 * src/output.c: Include "subpipe.h".
15902 (m4_invoke): Remove decl.
15903 (scan_skel): New decl.
15904 (output_skeleton): Use pipe rather than temporary file for m4 input.
15905 Check that m4sugar.m4 is readable, to avoid deadlock.
15906 Check for pipe I/O error.
15907 * src/scan-skel.l (readpipe): Remove decl.
15908 (scan_skel): New function, to be used in place of m4_invoke.
15909 Read from stream rather than file.
15911 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15912 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15913 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15914 this generates a more-accurate value anyway.
15916 * lib/timevar.c (timervar_accumulate): Rename locals to
15917 avoid confusion with similarly-named more-global.
15918 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15920 * src/output.c (prepare): Use xstrdup to convert char const *
15921 to char *, to avoid GCC warning.
15923 2002-10-19 Akim Demaille <akim@epita.fr>
15925 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15926 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15927 Use them to have `calc.y' ready for %pure-parser.
15928 * data/yacc.c (YYLEX): Pass a yylex return type to
15929 b4_c_function_call.
15931 2002-10-19 Akim Demaille <akim@epita.fr>
15933 Prototype support of %lex-param and %parse-param.
15935 * src/parse-gram.y: Add the definition of the %lex-param and
15936 %parse-param tokens, plus their rules.
15937 Drop the `_' version of %glr-parser.
15939 * src/scan-gram.l (INITIAL): Scan them.
15940 * src/muscle_tab.c: Comment changes.
15941 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15942 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15943 (muscle_entry_s): The `value' member is no longer const.
15944 Adjust all dependencies.
15945 * src/muscle_tab.c (muscle_init): Adjust: use
15946 MUSCLE_INSERT_STRING.
15947 Initialize the obstack earlier.
15948 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15949 (muscle_pair_list_grow): New.
15950 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15951 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15952 * tests/calc.at: Use %locations, not --locations.
15953 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15955 2002-10-19 Akim Demaille <akim@epita.fr>
15957 * src/getargs.c (usage): Take status as argument and exit
15959 Report the traditional `Try ... --help' message when status != 0.
15960 (usage, version): Don't take a FILE * as arg, it is pointless.
15961 (getargs): When there is an incorrect number of arguments, make it
15962 an error, and report it GNUlically thanks to `usage ()'.
15964 2002-10-18 Paul Eggert <eggert@twinsun.com>
15966 * data/glr.c (yyreportParseError): Don't assume that sprintf
15967 yields the length of the printed string, as this is not true
15968 on SunOS 4.1.4. Reported by Peter Klein.
15970 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15971 * tests/conflicts.at (%nonassoc and eof): Likewise.
15972 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15974 2002-10-17 Akim Demaille <akim@epita.fr>
15976 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15977 * src/getargs.c (trace_types, trace_args): Adjust.
15978 * src/reader.c (grammar_current_rule_prec_set)
15979 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15980 Standardize error messages.
15981 And s/@prec/%prec/!
15982 (reader): Use trace_flag to enable scanner/parser debugging,
15983 instead of an adhoc scheme.
15984 * src/scan-gram.l: Remove trailing debugging code.
15986 2002-10-16 Paul Eggert <eggert@twinsun.com>
15988 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15991 * NEWS: Officially drop support for building Bison with K&R C,
15992 since it didn't work anyway and it's not worth worrying about.
15993 * Makefile.maint (wget_files): Remove ansi2knr.c.
15994 (ansi2knr.c-url_prefix): Remove.
15995 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15996 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15997 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15999 2002-10-15 Paul Eggert <eggert@twinsun.com>
16001 Stop using the "enum_" trick for K&R-style function definitions;
16002 it confused me, and I was the author! Instead, assume that people
16003 who want to use K&R C compilers (when using these modules in GCC,
16004 perhaps?) will run ansi2knr.
16006 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16007 All uses of "enum_" changed to "enum ".
16008 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16009 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16011 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16012 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16013 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16014 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16015 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16016 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16017 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16018 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16019 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16020 Use function prototypes; this removes the need for declaring
16021 static functions simply to provide their prototypes.
16022 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16023 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16024 bitset_count_, bitset_create, bitset_dump, bitset_first,
16025 bitset_free, bitset_init, bitset_last, bitset_next,
16026 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16027 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16028 bitset_print, bitset_release_memory, bitset_toggle_,
16029 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16030 debug_bitset): Likewise.
16031 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16032 * lib/bitset_stats.c (bitset_log_histogram_print,
16033 bitset_percent_histogram_print, bitset_stats_and,
16034 bitset_stats_and_cmp, bitset_stats_and_or,
16035 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16036 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16037 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16038 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16039 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16040 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16041 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16042 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16043 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16044 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16045 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16046 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16047 bitset_stats_zero): Likewise.
16048 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16049 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16050 bitsetv_dump, debug_bitsetv): Likewise.
16051 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16052 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16053 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16054 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16055 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16056 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16057 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16058 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16059 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16060 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16061 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16063 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16064 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16065 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16066 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16067 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16068 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16069 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16070 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16071 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16072 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16073 lbitset_xor_cmp, lbitset_zero): Likewise.
16075 2002-10-14 Akim Demaille <akim@epita.fr>
16079 2002-10-14 Akim Demaille <akim@epita.fr>
16081 * tests/Makefile.am (maintainer-check-posix): New.
16083 2002-10-14 Akim Demaille <akim@epita.fr>
16085 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
16088 2002-10-14 Akim Demaille <akim@epita.fr>
16090 * src/tables.c (table_ninf_remap): base -> tab.
16091 Reported by Matt Rosing.
16093 2002-10-14 Paul Eggert <eggert@twinsun.com>
16095 * tests/action.at, tests/calc.at, tests/conflicts.at,
16096 tests/cxx-type.at, tests/headers.at, tests/input.at,
16097 tests/regression.at, tests/synclines.at, tests/torture.at:
16098 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
16099 so that the tests still work even if POSIXLY_CORRECT is set.
16100 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
16102 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
16103 for portability to K&R hosts. Fix typo: signed char is guaranteed
16104 only to 127, not to 128.
16105 * data/glr.c (yysigned_char): New type.
16106 * data/yacc.c (yysigned_char): Likewise.
16107 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
16109 2002-10-13 Paul Eggert <eggert@twinsun.com>
16111 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
16112 true due to limited range of data type" warning from GCC.
16114 * data/c.m4 (b4_token_defines): Protect against double-inclusion
16115 by wrapping enum yytokentype's definition inside #ifndef
16116 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
16118 2002-10-13 Akim Demaille <akim@epita.fr>
16120 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
16121 Un yy- yyrhs to avoid the name clash with the global YYRHS.
16123 2002-10-13 Akim Demaille <akim@epita.fr>
16125 * Makefile.maint: Update from Autoconf 2.54.
16126 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
16128 2002-10-13 Akim Demaille <akim@epita.fr>
16130 * src/print.c (print_state): Separate the list of solved conflicts
16131 from the other items.
16132 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
16134 2002-10-13 Akim Demaille <akim@epita.fr>
16136 Let nondeterministic skeletons be usable with deterministic
16139 With the patch, GAWK compiled by GCC without -O2 passes its test
16140 suite using a GLR parser driven by LALR tables. It fails with -O2
16141 because `struct stat' gives two different answers on my machine:
16142 88 (definition of an auto var) and later 96 (memset on this var).
16143 Hence the stack is badly corrumpted. The headers inclusion is to
16144 blame: if I move the awk.h inclusion before GLR's system header
16145 inclusion, the two struct stat have the same size.
16147 * src/tables.c (pack_table): Always create conflict_table.
16148 (token_actions): Always create conflict_list.
16149 * data/glr.c (YYFLAG): Remove, unused.
16151 2002-10-13 Akim Demaille <akim@epita.fr>
16153 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
16155 (VALGRIND, GXX): New.
16156 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
16157 * tests/bison.in: Run $PREBISON a pre-command.
16158 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
16159 (maintainer-check-g++): New.
16160 * Makefile.am (maintainer-check): New.
16162 2002-10-13 Akim Demaille <akim@epita.fr>
16164 * data/glr.c: Formatting changes.
16165 Tweak some trace messages to match yacc.c's.
16167 2002-10-13 Akim Demaille <akim@epita.fr>
16169 GLR parsers sometimes raise parse errors instead of performing the
16171 Reported by Charles-Henry de Boysson.
16173 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
16174 check the length of the traces when %glr.
16175 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
16177 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
16179 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
16180 (yyltype): Remove the yy prefix from the member names.
16181 (yytable): Complete its comment.
16182 (yygetLRActions): Map error action number from YYTABLE from
16184 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
16185 (which was a bug: it should have been YYTABEL_NINF, and yet it was
16186 not satisfying as we could compare an YYACTION computed from
16187 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
16188 only value for error actions.
16189 (yyreportParseError): In verbose parse error messages, don't issue
16190 `error' in the list of expected tokens.
16191 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
16192 next action to perform to match glr.c's decoding.
16193 (yytable): Complete its comment.
16195 2002-10-13 Paul Eggert <eggert@twinsun.com>
16197 Fix problem reported by Henrik Grubbstroem in
16198 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
16199 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
16200 because the Bison parser reads the second action before reducing
16202 * src/scan-gram.l (rule_length): New static var.
16203 Use it to keep track of the rule length in the scanner, since
16204 we can't expect the parser to be in lock-step sync with the scanner.
16205 (handle_action_dollar, handle_action_at): Use this var.
16206 * tests/actions.at (Exotic Dollars): Test for the problem.
16208 2002-10-12 Paul Eggert <eggert@twinsun.com>
16210 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
16211 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
16212 Include <sys/time.h> when checking for clock_t and struct tms.
16213 Use same include order as source.
16214 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
16215 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
16217 * lib/timevar.c: Update copyright date and clarify comments.
16218 (get_time) [IN_GCC]: Keep the GCC version for reference.
16220 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
16221 GCC version as of today, then merge Bison's changes.
16222 Change "GCC" to "Bison" in copyright notice. timevar.def's
16223 author is Akim, so change that too.
16225 * src/reader.c (grammar_current_rule_check):
16226 Don't worry about the default action if $$ is untyped.
16227 Prevents bogus warnings reported by Jim Gifford in
16228 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
16230 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
16231 * data/glr.c, data/lalr1.cc, data/yacc.c:
16232 Output token definitions before the first part of user declarations.
16233 Fixes compatibility problem reported by Jim Gifford for kbd in
16234 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
16236 2002-10-11 Paul Eggert <eggert@twinsun.com>
16238 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
16239 (yyparse): here. This undoes some of the 2002-07-25 change.
16240 Compatibility problem reported by Ralf S. Engelschall with
16241 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
16243 2002-10-11 Akim Demaille <akim@epita.fr>
16245 * tests/regression.at Characters Escapes): New.
16246 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
16248 Reported by Jan Nieuwenhuizen.
16250 2002-10-11 Akim Demaille <akim@epita.fr>
16254 2002-10-10 Paul Eggert <eggert@twinsun.com>
16256 Portability fixes for bitsets; this also avoids several GCC
16259 * lib/abitset.c: Include <stddef.h>, for offsetof.
16260 * lib/lbitset.c: Likewise.
16262 * lib/abitset.c (abitset_bytes): Return a size that is aligned
16263 properly for vectors of objects. Do not assume that adding a
16264 header size to a multiple of a word size yields a value that is
16265 properly aligned for the whole union.
16266 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16268 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
16269 unique names for structures.
16270 * lib/ebitset.c (ebitset_bytes): Likewise.
16271 * lib/lbitset.c (lbitset_bytes): Likewise.
16273 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
16274 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
16275 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
16276 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
16277 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
16278 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
16279 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
16280 to improve the type-checking that GCC can do.
16281 * lib/bitset.c (bitset_op4_cmp): Likewise.
16282 * lib/bitset_stats.c (bitset_stats_count,
16283 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
16284 bitset_stats_copy, bitset_stats_disjoint_p,
16285 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
16286 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
16287 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
16288 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
16289 bitset_stats_and_or_cmp, bitset_stats_andn_or,
16290 bitset_stats_andn_or_cmp, bitset_stats_or_and,
16291 bitset_stats_or_and_cmp): Likewise.
16292 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
16293 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
16294 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
16295 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
16297 * lib/abitset.h: Include bitset.h, not bbitset.h.
16298 * lib/ebitset.h: Likewise.
16299 * lib/lbitset.h: Likewise.
16301 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
16302 All instances of parameters of type enum bitset_opts are now of
16303 type enum_bitset_opts, to conform to the C Standard, and similarly
16304 for enum_bitset_type.
16305 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16306 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16308 Do not use "struct bitset_struct" to mean different things in
16309 different modules. Not only is this confusing, it violates
16310 the C Standard, which requires that structure types in different
16311 modules must be compatible if one is to be passed to the other.
16312 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
16313 All instances of "struct bitset_struct *" replaced with "bitset".
16314 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
16315 (union bitset_union, struct abitset_struct, struct ebitset_struct,
16316 struct lbitset_struct, struct bitset_stats_struct): New types.
16317 All uses of struct bitset_struct changed to union bitset_union,
16319 * lib/abitset.c (struct abitset_struct, abitset,
16320 struct bitset_struct): Remove.
16321 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
16322 struct bitset_struct): Remove.
16323 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
16324 bitset_struct): Remove.
16325 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
16328 Do not call a function of type T using a call that assumes the
16329 function is of a different type U. Standard C requires that a
16330 function must be called with a type that is compatible with its
16332 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16334 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16336 * lib/ebitset.c (PFV): Remove.
16337 * lib/lbitset.c (PFV): Likewise.
16338 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
16339 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
16341 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
16342 (ebitset_vtable): Use them.
16343 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
16344 lbitset_xor): New functions.
16345 (lbitset_vtable): Use them.
16347 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
16350 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
16352 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
16353 Use offsetof, for simplicity.
16355 2002-10-06 Paul Eggert <eggert@twinsun.com>
16357 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
16358 the same width as int. This reapplies a hunk of the 2002-08-12 patch
16359 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
16360 which was inadvertently undone by the 2002-09-30 patch.
16361 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
16362 the same width as int.
16364 2002-10-04 Paul Eggert <eggert@twinsun.com>
16368 * configure.ac (AC_INIT), NEWS: Increment version number.
16370 * doc/bison.texinfo: Minor spelling, grammar, and white space
16372 (Symbols): Mention that any negative value returned from yylex
16373 signifies end-of-input. Warn about negative chars. Mention
16374 the portable Standard C character set.
16376 The GNU coding standard says CFLAGS and YFLAGS are reserved
16377 for the installer to set.
16378 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
16379 * src/Makefile.am (AM_CFLAGS): Likewise.
16380 (AM_YFLAGS): Renamed from YFLAGS.
16382 Fix some MAX and MIN problems.
16383 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
16384 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
16385 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
16386 * src/reader.c (reader): Use it.
16388 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
16389 POSIX 1003.1-2001 has removed fgrep.
16391 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
16393 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
16394 interpreted as signed.
16395 * lib/ebitset.c (ebitset_list): Fix bug.
16397 2002-10-01 Paul Eggert <eggert@twinsun.com>
16399 More fixes for 64-bit hosts and large bitsets.
16401 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
16402 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
16403 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
16404 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
16405 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
16406 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
16407 bitset_count_): Likewise.
16408 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
16409 bitset_first, bitset_last): Likewise.
16410 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
16411 bitset_stats_list_reverse, bitset_stats_size,
16412 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
16414 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16415 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16416 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16417 bitsetv_reflexive_transitive_closure): Likewise.
16418 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
16419 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
16421 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
16424 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
16425 Use size_t, not unsigned int, to count bytes.
16426 * lib/abitset.h (abitset_bytes): Likewise.
16427 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
16429 * lib/bitset.h (bitset_bytes): Likewise.
16430 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
16431 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
16432 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16433 * lib/ebitset.c (ebitset_bytes): Likewise.
16434 * lib/ebitset.h (ebitset_bytes): Likewise.
16435 * lib/lbitset.c (lbitset_bytes): Likewise.
16436 * lib/lbitset.h (lbitset_bytes): Likewise.
16438 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
16439 abitset_subset_p, abitset_disjoint_p, abitset_and,
16440 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
16441 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
16442 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
16443 abitset_or_and, abitset_or_and_cmp):
16444 Use bitset_windex instead of unsigned int.
16445 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16446 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
16447 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
16448 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
16450 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
16452 * lib/bitset.c (bitset_print):
16453 Use proper printf formats for widths of integer types.
16454 * lib/bitset_stats.c (bitset_percent_histogram_print,
16455 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
16456 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16457 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16458 * lib/lbitset.c (lbitset_bytes): Likewise.
16460 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
16461 BITSET_SIZE_MAX): New macros.
16462 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
16463 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
16464 to BITSET_WINDEX_MAX.
16466 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
16467 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
16468 since we now return the bitset_bindex type (not int).
16470 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
16471 when computing sizes.
16472 * lib/ebitset.c (ebitset_elts_grow): Likewise.
16474 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
16475 and avoid cast to unsigned.
16477 2002-09-30 Akim Demaille <akim@epita.fr>
16479 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
16480 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
16481 Updates from Michael Hayes.
16483 2002-09-30 Art Haas <ahaas@neosoft.com>
16485 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
16487 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
16490 2002-09-27 Akim Demaille <akim@epita.fr>
16494 2002-09-27 Akim Demaille <akim@epita.fr>
16496 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
16497 (Because of AC_LIBSOURCE).
16499 2002-09-27 Akim Demaille <akim@epita.fr>
16501 Playing with Autoscan.
16503 * configure.ac: Remove the old LIBOBJ tweaks.
16504 (AC_REPLACE_FUNCS): Add strrchr and strtol.
16505 * lib/strrchr.c: New.
16506 * lib/strtol.c: New, from the Coreutils 4.5.1.
16508 2002-09-27 Akim Demaille <akim@epita.fr>
16510 Playing with Autoscan.
16512 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
16513 * lib/Makefile.am (libbison_a_SOURCES): No longer include
16514 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
16515 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
16518 2002-09-24 Akim Demaille <akim@epita.fr>
16520 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
16521 (Frequently Asked Questions, Parser Stack Overflow): New.
16523 2002-09-13 Akim Demaille <akim@epita.fr>
16525 Playing with autoscan.
16527 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
16528 * src/files.c (skeleton_find): Remove, unused.
16529 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
16530 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
16532 2002-09-13 Akim Demaille <akim@epita.fr>
16534 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
16535 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
16537 2002-09-13 Akim Demaille <akim@epita.fr>
16539 * configure.ac: Require 2.54.
16540 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
16541 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
16542 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
16543 Remove, provided by Autoconf macros.
16545 2002-09-12 Akim Demaille <akim@epita.fr>
16547 * m4/prereq.m4: Update, from Coreutils 4.5.1.
16549 2002-09-12 Akim Demaille <akim@epita.fr>
16551 * m4/prereq.m4: Update, from Fileutils 4.1.5.
16552 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
16553 Reported by Martin Mokrejs.
16555 2002-09-10 Akim Demaille <akim@epita.fr>
16557 * src/parse-gram.y: Associate a human readable string to each
16559 * tests/regression.at (Invalid inputs): Adjust.
16561 2002-09-10 Gary V. Vaughan <gary@gnu.org>
16563 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16564 with an Autoconf-2.5x style configure.ac.
16566 2002-09-06 Paul Eggert <eggert@twinsun.com>
16568 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16569 exception applies only to yacc.c. This is a modification of a
16570 patch originally suggested by Akim Demaille.
16572 2002-09-06 Akim Demaille <akim@epita.fr>
16574 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16576 * data/yacc.c: here.
16578 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16580 (b4_ltype): Default to yy::Location from location.hh.
16582 2002-09-04 Jim Meyering <jim@meyering.net>
16584 * data/yacc.c: Guard the declaration of yytoknum also with
16585 `#ifdef YYPRINT', so it is declared only when used.
16587 2002-09-04 Akim Demaille <akim@epita.fr>
16589 * configure.in: Rename as...
16590 * configure.ac: this.
16593 2002-09-04 Akim Demaille <akim@epita.fr>
16595 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16596 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16597 translate maintainer only messages.
16599 2002-08-12 Paul Eggert <eggert@twinsun.com>
16603 * Makefile.am (SUBDIRS): Remove intl.
16604 (DISTCLEANFILES): Remove.
16605 * NEWS: Mention that GNU M4 is now required. Clarify what is
16606 meant by "larger grammars". Mention the pt_BR translation.
16607 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16608 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16609 Bump version from 0.11.2 to 0.11.5.
16610 (BISON_PREREQ_STAGE): Remove.
16611 (AM_GNU_GETTEXT): Use external gettext.
16612 (AC_OUTPUT): Remove intl/Makefile.
16614 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16616 * data/glr.c: Include string.h, for strlen.
16617 (yyreportParseError): Use size_t for yysize.
16618 (yy_yypstack): No longer nested inside yypstates, as nested
16619 functions are not portable. Do not assume size_t is the
16621 (yypstates): Do not assume that ptrdiff_t is the same width
16622 as int, and similarly for yyposn and YYINDEX.
16624 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16626 * lib/Makefile.am (INCLUDES): Do not include from the intl
16627 directory, which has been removed.
16628 * src/Makefile.am (INCLUDES): Likewise.
16630 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16631 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16634 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16635 * tests/Makefile.am (EXTRA_DIST): Likewise.
16637 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16638 Do not assume that bitset_windex is the same width as unsigned.
16640 * lib/abitset.c (abitset_unused_clear): Do not assume that
16641 bitset_word is the same width as int.
16642 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16643 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16644 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16645 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16646 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16648 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16649 portability to one's complement hosts!).
16650 * lib/ebitset.c (ebitset_op1): Likewise.
16651 * lib/lbitset.c (lbitset_op1): Likewise.
16653 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16654 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16655 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16656 Sync with fileutils.
16657 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16658 lib/gettext.h: Sync with diffutils.
16660 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16661 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16663 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16664 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16667 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16668 size_t; the old version tried to do this but casted improperly.
16669 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16670 (bitset_test): Now returns int, not unsigned long.
16672 * lib/bitset_stats.c: Include "gettext.h".
16674 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16675 name locals "index", as it generates unnecessary warnings on some
16676 hosts that have an "index" function.
16678 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16679 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16680 they need translation.
16681 * src/LR0.c (state_list_append, new_itemsets, get_state,
16682 append_states, generate_states): Likewise.
16683 * src/assoc.c (assoc_to_string): Likewise.
16684 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16685 * src/gram.c (grammar_dump): Likewise.
16686 * src/injections.c (injections_compute): Likewise.
16687 * src/lalr.c (lookaheads_print): Likewise.
16688 * src/relation.c (relation_transpose): Likewise.
16689 * src/scan-gram.l: Likewise.
16690 * src/tables.c (table_grow, pack_vector): Likewise.
16692 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16693 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16694 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16695 * m4/mbstate_t.m4: Sync with fileutils.
16696 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16698 * po/LINGUAS: Add pt_BR.
16699 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16700 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16702 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16704 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16706 * src/complain.c (strerror_r): Remove decl; not needed.
16707 (strerror): Use same pattern as ../lib/error.c.
16709 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16711 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16713 * src/main.c (main): Cast result of bindtextdomain and textdomain
16714 to void, to avoid a GCC warning when --disable-nls is in effect.
16716 * src/scan-gram.l: Use strings rather than escapes when possible,
16717 to minimize the number of warnings from xgettext.
16718 (handle_action_dollar, handle_action_at): Don't use isdigit,
16719 as it mishandles negative chars and it may not work as expected
16720 outside the C locale.
16722 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16723 this is a GCC extension and is not portable to other compilers.
16725 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16726 Do not include <ctype.h>; no longer needed.
16727 Do not include <malloc.h>; no longer needed (and generates
16728 warnings on OpenBSD 3.0).
16730 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16733 * tests/regression.at: Do not use 'cc -c input.c -o input';
16734 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16736 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16737 exit status as failure, not just exit status 1. Sun C exits
16738 with status 2 sometimes.
16740 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16741 Use it for the two large tests.
16743 2002-08-02 Akim Demaille <akim@epita.fr>
16745 * src/conflicts.c (conflicts_output): Don't output rules never
16746 reduced here, since anyway that computation doesn't work.
16747 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16748 (rule_useless_p, rule_never_reduced_p): New.
16749 (grammar_rules_partial_print): Use a filter instead of a range.
16750 Display the title only if needed.
16751 (grammar_rules_print): Adjust.
16752 (grammar_rules_never_reduced_report): New.
16753 * src/tables.c (action_row): Move the computation of rules never
16755 (token_actions): here.
16756 * src/main.c (main): Make the parser before making the report, so
16757 that rules never reduced are computed.
16758 Call grammar_rules_never_reduced_report.
16759 * src/print.c (print_results): Report rules never reduced.
16760 * tests/conflicts.at, tests/reduce.at: Adjust.
16762 2002-08-01 Akim Demaille <akim@epita.fr>
16764 Instead of attaching lookaheads and duplicating the rules being
16765 reduced by a state, attach the lookaheads to the reductions.
16767 * src/state.h (state_t): Remove the `lookaheads',
16768 `lookaheads_rule' member.
16769 (reductions_t): Add a `lookaheads' member.
16770 Use a regular array for the `rules'.
16771 * src/state.c (reductions_new): Initialize the lookaheads member
16773 (state_rule_lookaheads_print): Adjust.
16774 * src/state.h, src/state.c (state_reductions_find): New.
16775 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16776 (count_rr_conflicts): Adjust.
16777 * src/lalr.c (LArule): Remove.
16778 (add_lookback_edge): Adjust.
16779 (state_lookaheads_count): New.
16780 (states_lookaheads_initialize): Merge into...
16781 (initialize_LA): this.
16782 (lalr_free): Adjust.
16783 * src/main.c (main): Don't free nullable and derives too early: it
16784 is used by --verbose.
16785 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16787 2002-08-01 Akim Demaille <akim@epita.fr>
16789 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16791 (set_derives, free_derives): Rename as...
16792 (derives_compute, derives_free): this.
16793 Adjust all dependencies.
16794 * src/nullable.c (set_nullable, free_nullable): Rename as...
16795 (nullable_compute, nullable_free): these.
16796 (rule_list_t): Store rule_t *, not rule_number_t.
16797 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16798 pointers, instead of their numbers.
16799 * src/main.c (main): Call nullable_free, and derives_free earlier,
16800 as they were lo longer used.
16802 2002-08-01 Akim Demaille <akim@epita.fr>
16804 * lib/timevar.c (get_time): Include children time.
16805 * src/lalr.h (LA, LArule): Don't export them: used with the
16807 * src/lalr.c (LA, LArule): Static.
16808 * src/lalr.h, src/lalr.c (lalr_free): New.
16809 * src/main.c (main): Call it.
16810 * src/tables.c (pack_vector): Check whether loc is >= to the
16812 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16813 (tables_generate): do it, since that's also it which allocates
16815 Don't free LA and LArule, main does.
16817 2002-07-31 Akim Demaille <akim@epita.fr>
16819 Separate parser tables computation and output.
16821 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16822 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16823 (yydefgoto, yydefact, high): Move to...
16824 * src/tables.h, src/tables.c: here.
16825 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16826 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16827 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16828 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16829 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16830 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16831 (action_row, save_row, token_actions, save_column, default_goto)
16832 (goto_actions, sort_actions, matching_state, pack_vector)
16833 (table_ninf_remap, pack_table, prepare_actions): Move to...
16834 * src/tables.c: here.
16835 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16836 * src/output.c (token_actions, output_base, output_conflicts)
16837 (output_check): Merge into...
16838 (prepare_actions): this.
16839 (actions_output): Rename as...
16840 (user_actions_output): this.
16841 * src/main.c (main): Call tables_generate and tables_free.
16843 2002-07-31 Akim Demaille <akim@epita.fr>
16845 Steal GCC's --time-report support.
16847 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16848 stolen/adjusted from GCC.
16849 * m4/stage.m4: Remove time related checks.
16850 * m4/timevar.m4: New.
16851 * configure.in: Adjust.
16852 * src/system.h: Adjust to using timevar.h.
16853 * src/getargs.h, src/getargs.c: Support trace_time for
16855 * src/main.c (stage): Remove.
16856 (main): Replace `stage' invocations with timevar calls.
16857 * src/output.c: Insert pertinent timevar calls.
16859 2002-07-31 Akim Demaille <akim@epita.fr>
16861 Let --trace have arguments.
16863 * src/getargs.h (enum trace_e): New.
16864 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16865 (long_options, short_options): --trace/-T takes an optional
16867 Change all the uses of trace_flag to reflect the new flags.
16868 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16870 Strengthen `stage' portability.
16872 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16873 * configure.in: Use it.
16874 Don't check for malloc.h and sys/times.h.
16875 * src/system.h: Include them when appropriate.
16876 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16877 times and struct tms are available.
16879 2002-07-30 Akim Demaille <akim@epita.fr>
16881 In verbose parse error message, don't report `error' as an
16883 * tests/actions.at (Printers and Destructors): Adjust.
16884 * tests/calc.at (Calculator $1): Adjust.
16885 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16886 error message, do not report the parser accepts the error token in
16889 2002-07-30 Akim Demaille <akim@epita.fr>
16891 Normalize conflict related messages.
16893 * src/complain.h, src/complain.c (warn, complain): New.
16894 * src/conflicts.c (conflicts_print): Use them.
16895 (conflict_report_yacc): New, extracted from...
16896 (conflicts_print): here.
16897 * tests/conflicts.at, tests/existing.at: Adjust.
16899 2002-07-30 Akim Demaille <akim@epita.fr>
16901 Report rules which are never reduced by the parser: those hidden
16904 * src/LR0.c (save_reductions): Don't make the final state too
16905 different: save its reduction (accept) instead of having a state
16906 without any action (no shift or goto, no reduce).
16907 Note: the final state is now a ``regular'' state, i.e., the
16908 parsers now contain `reduce 0' as default reduction.
16909 Nevertheless, since they decide to `accept' when yystate =
16910 final_state, they still will not reduce rule 0.
16911 * src/print.c (print_actions, print_reduction): Adjust.
16912 * src/output.c (action_row): Track reduced rules.
16913 (token_actions): Report rules never reduced.
16914 * tests/conflicts.at, tests/regression.at: Adjust.
16916 2002-07-30 Akim Demaille <akim@epita.fr>
16918 `stage' was accidently included in a previous patch.
16919 Initiate its autoconfiscation.
16921 * configure.in: Look for malloc.h and sys/times.h.
16922 * src/main.c (stage): Adjust.
16923 Report only when trace_flag.
16925 2002-07-29 Akim Demaille <akim@epita.fr>
16927 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16929 (errs_t): symbol_t*, not symbol_number_t.
16930 (reductions_t): rule_t*, not rule_number_t.
16931 (FOR_EACH_SHIFT): New.
16932 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16933 * src/print.c, src/print_graph.c: Adjust.
16935 2002-07-29 Akim Demaille <akim@epita.fr>
16937 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16939 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16940 (endtoken, accept): these.
16941 * src/reader.c (reader): Set endtoken's default tag to "$end".
16942 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16943 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16946 2002-07-29 Akim Demaille <akim@epita.fr>
16948 * src/reduce.c (reduce_grammar): When the language is empty,
16949 complain about the start symbol, not the axiom.
16951 * tests/reduce.at (Empty Language): New.
16953 2002-07-26 Akim Demaille <akim@epita.fr>
16955 * src/reader.h, src/reader.c (gram_error): ... can't get
16956 yycontrol without making too strong assumptions on the parser
16958 * src/output.c (prepare_tokens): Use the real 0th value of
16959 token_translations instead of `0'.
16960 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16962 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16963 for the time being: %locations ought to provide it to yyerror.
16965 2002-07-25 Akim Demaille <akim@epita.fr>
16967 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16968 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16969 * tests/regression.at (Web2c Actions): Adjust.
16971 2002-07-25 Akim Demaille <akim@epita.fr>
16973 Stop storing rules from 1 to nrules + 1.
16975 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16976 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16977 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16978 Iterate from 0 to nrules.
16979 Use rule_number_as_item_number and item_number_as_rule_number.
16980 Adjust to `derive' now containing possibly 0.
16981 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16982 Handle the `- 1' part in rule numbers from/to item numbers.
16983 * src/conflicts.c (log_resolution): Fix the message which reversed
16985 * src/output.c (action_row): Initialize default_rule to -1.
16986 (token_actions): Adjust.
16987 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16989 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16991 2002-07-25 Akim Demaille <akim@epita.fr>
16993 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16994 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16995 (b4_c_knr_arg_decl): New.
16996 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16997 yyreport_parse_error.
16999 2002-07-25 Akim Demaille <akim@epita.fr>
17001 * data/yacc.c (yyreport_parse_error): New, extracted from...
17003 (yydestruct, yysymprint): Move above yyparse.
17006 2002-07-25 Akim Demaille <akim@epita.fr>
17008 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17010 (b4_sint_type, b4_uint_type): these.
17011 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17012 * tests/regression.at (Web2c Actions): Adjust.
17014 2002-07-25 Akim Demaille <akim@epita.fr>
17016 * src/gram.h (TIEM_NUMBER_MAX): New.
17017 (item_number_of_rule_number, rule_number_of_item_number): Rename
17019 (rule_number_as_item_number, item_number_as_rule_number): these.
17020 Adjust dependencies.
17021 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17022 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17023 (symbol_number_to_vector_number): New.
17024 (order): Of vector_number_t* type.
17025 (base_t, BASE_MAX, BASE_MIN): New.
17026 (froms, tos, width, pos, check): Of base_t type.
17027 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17028 (actrow): Of action_number_t type.
17029 (conflrow): Of unsigned int type.
17030 (table_ninf, base_ninf): New.
17031 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17032 (muscle_insert_int_table, muscle_insert_base_table)
17033 (muscle_insert_rule_number_table): New.
17034 (prepare_tokens): Output `toknum' as int_table.
17035 (action_row): Returns a rule_number_t.
17036 Use ACTION_MIN, not SHRT_MIN.
17037 (token_actions): yydefact is rule_number_t*.
17038 (table_ninf_remap): New.
17039 (pack_table): Use it for `base' and `table'.
17040 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17042 (YYPACT_NINF, YYTABLE_NINF): these.
17043 (yypact, yytable): Compute their types instead of hard-coded
17045 * tests/regression.at (Web2c Actions): Adjust.
17047 2002-07-19 Akim Demaille <akim@epita.fr>
17049 * src/scan-gram.l (id): Can start with an underscore.
17051 2002-07-16 Akim Demaille <akim@epita.fr>
17053 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17054 Adjust all former `associativity' dependencies.
17055 * src/symtab.c (symbol_new): Default associativity is `undef', not
17057 (symbol_check_alias_consistence): Adjust.
17059 2002-07-09 Akim Demaille <akim@epita.fr>
17061 * doc/bison.texinfo: Properly set the ``header'' part.
17062 Use @dircategory ``GNU programming tools'' as per Texinfo's
17066 2002-07-09 Akim Demaille <akim@epita.fr>
17068 * lib/quotearg.h: Protect against multiple inclusions.
17069 * src/location.h (location_t): Add a `file' member.
17070 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17071 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17072 `error_one_per_line' support.
17074 2002-07-09 Akim Demaille <akim@epita.fr>
17076 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17077 * src/reader.c (lineno): Remove.
17078 Adjust all dependencies.
17079 (get_merge_function): Take a location and use complain_at.
17080 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17081 * tests/regression.at (Invalid inputs, Mixing %token styles):
17084 2002-07-09 Akim Demaille <akim@epita.fr>
17086 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
17087 recovery rule, and forbid extensions when --yacc.
17088 (gram_error): Use complain_at.
17089 * src/reader.c (reader): Exit if there were parse errors.
17091 2002-07-09 Akim Demaille <akim@epita.fr>
17093 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
17094 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
17095 Reported by R Blake <blakers@mac.com>.
17097 2002-07-09 Akim Demaille <akim@epita.fr>
17099 * data/yacc.c: Output the copyright notive in the header.
17101 2002-07-03 Akim Demaille <akim@epita.fr>
17103 * src/output.c (froms, tos): Are state_number_t.
17104 (save_column): sp, sp1, and sp2 are state_number_t.
17105 (prepare): Rename `final' as `final_state_number', `nnts' as
17106 `nterms_number', `nrules' as `rules_number', `nstates' as
17107 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
17109 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
17110 * data/lalr1.cc (nsym_): Remove, unused.
17112 2002-07-03 Akim Demaille <akim@epita.fr>
17114 * src/lalr.h, src/lalr.c (goto_number_t): New.
17115 * src/lalr.c (goto_list_t): New.
17117 * src/nullable.c (rule_list_t): New.
17119 * src/types.h: Remove.
17121 2002-07-03 Akim Demaille <akim@epita.fr>
17123 * src/closure.c (print_fderives): Use rule_rhs_print.
17124 * src/derives.c (print_derives): Use rule_rhs_print.
17125 (rule_list_t): New, replaces `shorts'.
17126 (set_derives): Add comments.
17127 * tests/sets.at (Nullable, Firsts): Adjust.
17129 2002-07-03 Akim Demaille <akim@epita.fr>
17131 * src/output.c (prepare_actions): Free `tally' and `width'.
17132 (prepare_actions): Allocate and free `order'.
17133 * src/symtab.c (symbols_free): Free `symbols'.
17134 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
17135 * src/output.c (m4_invoke): Move to...
17136 * src/scan-skel.l: here.
17137 (<<EOF>>): Close yyout, and free its name.
17139 2002-07-03 Akim Demaille <akim@epita.fr>
17141 Fix some memory leaks, and fix a bug: state 0 was examined twice.
17143 * src/LR0.c (new_state): Merge into...
17144 (state_list_append): this.
17145 (new_states): Merge into...
17146 (generate_states): here.
17147 (set_states): Don't ensure a proper `errs' state member here, do it...
17148 * src/conflicts.c (conflicts_solve): here.
17149 * src/state.h, src/state.c: Comment changes.
17150 (state_t): Rename member `shifts' as `transitions'.
17151 Adjust all dependencies.
17152 (errs_new): For consistency, also take the values as argument.
17153 (errs_dup): Remove.
17154 (state_errs_set): New.
17155 (state_reductions_set, state_transitions_set): Assert that no
17156 previous value was assigned.
17158 (states_free): Use it.
17159 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
17160 temporary storage: use `errs' and `nerrs' as elsewhere.
17161 (set_conflicts): Allocate and free this `errs'.
17163 2002-07-02 Akim Demaille <akim@epita.fr>
17165 * lib/libiberty.h: New.
17166 * lib: Update the bitset implementation from upstream.
17167 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
17168 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
17169 * src/main.c: Adjust bitset stats calls.
17171 2002-07-01 Paul Eggert <eggert@twinsun.com>
17173 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
17174 char, so that negative chars don't collide with $.
17176 2002-06-30 Akim Demaille <akim@epita.fr>
17178 Have the GLR tests be `warning' checked, and fix the warnings.
17180 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
17181 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
17182 (yyremoveDeletes): `yyi' and `yyj' are size_t.
17183 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
17184 (yyaddDeferredAction): static.
17185 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
17186 (yyreportParseError): yyprefix is const.
17187 yytokenp is used only when verbose.
17188 (yy__GNUC__): Replace with __GNUC__.
17189 (yypdumpstack): yyi is size_t.
17190 (yypreference): Un-yy local variables and arguments, to avoid
17191 clashes with `yyr1'. Anyway, we are not in the user name space.
17192 (yytname_size): be an int, as is compared with ints.
17193 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
17195 * tests/cxx-gram.at: Use quotation to protect $1.
17196 Use AT_COMPILE to enable warnings hunts.
17197 Prototype yylex and yyerror.
17199 Include `string.h', not `strings.h'.
17200 Produce and prototype stmtMerge only when used.
17201 yylex takes a location.
17203 2002-06-30 Akim Demaille <akim@epita.fr>
17205 We spend a lot of time in quotearg, in particular when --verbose.
17207 * src/symtab.c (symbol_get): Store a quoted version of the key.
17208 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
17209 Adjust all callers.
17211 2002-06-30 Akim Demaille <akim@epita.fr>
17213 * src/state.h (reductions_t): Rename member `nreds' as num.
17214 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
17215 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
17217 2002-06-30 Akim Demaille <akim@epita.fr>
17219 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
17220 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
17221 (shifts_to): Rename as...
17222 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
17223 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
17224 (TRANSITION_IS_DISABLED, transitions_to): these.
17226 2002-06-30 Akim Demaille <akim@epita.fr>
17228 * src/print.c (print_shifts, print_gotos): Merge into...
17229 (print_transitions): this.
17230 (print_transitions, print_errs, print_reductions): Align the
17231 lookaheads columns.
17232 (print_core, print_transitions, print_errs, print_state,
17233 print_grammar): Output empty lines separator before, not after.
17234 (state_default_rule_compute): Rename as...
17235 (state_default_rule): this.
17236 * tests/conflicts.at (Defaulted Conflicted Reduction),
17237 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
17238 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
17240 2002-06-30 Akim Demaille <akim@epita.fr>
17242 Display items as we display rules.
17244 * src/gram.h, src/gram.c (rule_lhs_print): New.
17245 * src/gram.c (grammar_rules_partial_print): Use it.
17246 * src/print.c (print_core): Likewise.
17247 * tests/conflicts.at (Defaulted Conflicted Reduction),
17248 (Unresolved SR Conflicts): Adjust.
17249 (Unresolved SR Conflicts): Adjust and rename as...
17250 (Resolved SR Conflicts): this, as was meant.
17251 * tests/regression.at (Web2c Report): Adjust.
17253 2002-06-30 Akim Demaille <akim@epita.fr>
17255 * src/print.c (state_default_rule_compute): New, extracted from...
17256 (print_reductions): here.
17257 Pessimize, but clarify the code.
17258 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
17260 2002-06-30 Akim Demaille <akim@epita.fr>
17262 * src/output.c (action_row): Let default_rule be always a rule
17265 2002-06-30 Akim Demaille <akim@epita.fr>
17267 * src/closure.c (print_firsts, print_fderives, closure):
17268 Use BITSET_EXECUTE.
17269 * src/lalr.c (lookaheads_print): Likewise.
17270 * src/state.c (state_rule_lookaheads_print): Likewise.
17271 * src/print_graph.c (print_core): Likewise.
17272 * src/print.c (print_reductions): Likewise.
17273 * src/output.c (action_row): Likewise.
17274 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
17276 2002-06-30 Akim Demaille <akim@epita.fr>
17278 * src/print_graph.c: Use report_flag.
17280 2002-06-30 Akim Demaille <akim@epita.fr>
17282 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
17284 * src/relation.h, src/relation.c (traverse, relation_digraph)
17285 (relation_print, relation_transpose): New.
17287 2002-06-30 Akim Demaille <akim@epita.fr>
17289 * src/state.h, src/state.c (shifts_to): New.
17290 * src/lalr.c (build_relations): Use it.
17292 2002-06-30 Akim Demaille <akim@epita.fr>
17294 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
17295 (item_number_of_rule_number, rule_number_of_item_number): New.
17296 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
17297 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17298 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
17299 Propagate their use.
17300 Much remains to be done, in particular wrt `shorts' from types.h.
17302 2002-06-30 Akim Demaille <akim@epita.fr>
17304 * src/symtab.c (symbol_new): Initialize the `printer' member.
17306 2002-06-30 Akim Demaille <akim@epita.fr>
17308 * src/LR0.c (save_reductions): Remove, replaced by...
17309 * src/state.h, src/state.c (state_reductions_set): New.
17310 (reductions, errs): Rename as...
17311 (reductions_t, errs_t): these.
17312 Adjust all dependencies.
17314 2002-06-30 Akim Demaille <akim@epita.fr>
17316 * src/LR0.c (state_list_t, state_list_append): New.
17317 (first_state, last_state): Now symbol_list_t.
17318 (this_state): Remove.
17319 (new_itemsets, append_states, save_reductions): Take a state_t as
17321 (set_states, generate_states): Adjust.
17322 (save_shifts): Remove, replaced by...
17323 * src/state.h, src/state.c (state_shifts_set): New.
17324 (shifts): Rename as...
17326 Adjust all dependencies.
17327 * src/state.h (state_t): Remove the `next' member.
17329 2002-06-30 Akim Demaille <akim@epita.fr>
17331 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
17334 2002-06-30 Akim Demaille <akim@epita.fr>
17336 Use hash.h for the state hash table.
17338 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
17339 (allocate_storage): Use state_hash_new.
17340 (free_storage): Use state_hash_free.
17341 (new_state, get_state): Adjust.
17342 * src/lalr.h, src/lalr.c (states): Move to...
17343 * src/states.h (state_t): Remove the `link' member, no longer
17345 * src/states.h, src/states.c: here.
17346 (state_hash_new, state_hash_free, state_hash_lookup)
17347 (state_hash_insert, states_free): New.
17348 * src/states.c (state_table, state_compare, state_hash): New.
17349 * src/output.c (output_actions): Do not free states now, since we
17350 still need to know the final_state number in `prepare', called
17351 afterwards. Do it...
17352 * src/main.c (main): here: call states_free after `output'.
17354 2002-06-30 Akim Demaille <akim@epita.fr>
17356 * src/state.h, src/state.c (state_new): New, extracted from...
17357 * src/LR0.c (new_state): here.
17358 * src/state.h (STATE_ALLOC): Move to...
17359 * src/state.c: here.
17360 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
17361 * src/state.h, src/state.c: here.
17363 2002-06-30 Akim Demaille <akim@epita.fr>
17365 * src/reader.c (gensym): Rename as...
17366 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
17367 (getsym): Rename as...
17368 (symbol_get): this.
17370 2002-06-30 Akim Demaille <akim@epita.fr>
17372 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
17373 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
17374 * src/output.c, src/print.c, src/print_graph.c: Propagate.
17375 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
17377 2002-06-30 Akim Demaille <akim@epita.fr>
17379 Make the test suite pass with warnings checked.
17381 * tests/actions.at (Printers and Destructors): Improve.
17382 Avoid unsigned vs. signed issues.
17383 * tests/calc.at: Don't exercise the scanner here, do it...
17384 * tests/input.at (Torturing the Scanner): here.
17386 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17388 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
17389 reorganize first lines parallel to yacc.c.
17391 2002-06-28 Akim Demaille <akim@epita.fr>
17393 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
17394 (b4_token_enum, b4_token_defines): New, factored from...
17395 * data/lalr1.cc, data/yacc.c, glr.c: here.
17397 2002-06-28 Akim Demaille <akim@epita.fr>
17399 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
17401 * src/output.c (merger_output): static.
17403 2002-06-28 Akim Demaille <akim@epita.fr>
17405 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
17406 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
17408 * src/output.c (save_row): Initialize all the variables to pacify GCC.
17410 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17412 Accumulated changelog for new GLR parsing features.
17414 * src/conflicts.c (count_total_conflicts): Change name to
17415 conflicts_total_count.
17416 * src/conflicts.h: Ditto.
17417 * src/output.c (token_actions): Use the new name.
17418 (output_conflicts): Change conflp => conflict_list_heads, and
17419 confl => conflict_list for better readability.
17420 * data/glr.c: Use the new names.
17421 * NEWS: Add self to GLR announcement.
17423 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
17425 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
17428 * data/bison.glr: Change name to glr.c
17429 * data/glr.c: Renamed from bison.glr.
17430 * data/Makefile.am: Add glr.c
17434 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
17435 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
17437 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17439 * data/bison.glr: Be sure to restore the
17440 current #line when returning to the skeleton contents after having
17441 exposed the input file's #line.
17443 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17445 * data/bison.glr: Bring up to date with changes to bison.simple.
17447 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17449 * data/bison.glr: Correct definitions that use b4_prefix.
17450 Various reformatting.
17451 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
17452 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
17453 yytokenp argument; now part of stack.
17454 (yychar): Define to behave as documented.
17455 (yyclearin): Ditto.
17457 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17459 * src/reader.h: Add declaration for free_merger_functions.
17461 * src/reader.c (merge_functions): New variable.
17462 (get_merge_function): New function.
17463 (free_merger_functions): New function.
17464 (readgram): Check for %prec that is not followed by a symbol.
17465 Handle %dprec and %merge declarations.
17466 (packgram): Initialize dprec and merger fields in rules array.
17468 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
17469 conflict_list_cnt, conflict_list_free): New variables.
17470 (table_grow): Also grow conflict_table.
17471 (prepare_rules): Output dprec and merger tables.
17472 (conflict_row): New function.
17473 (action_row): Output conflict lists for GLR parser. Don't use
17474 default reduction in conflicted states for GLR parser so that there
17475 are spaces for the conflict lists.
17476 (save_row): Also save conflict information.
17477 (token_actions): Allocate conflict list.
17478 (merger_output): New function.
17479 (pack_vector): Pack conflict table, too.
17480 (output_conflicts): New function to output yyconflp and yyconfl.
17481 (output_check): Allocate conflict_tos.
17482 (output_actions): Output conflict tables, also.
17483 (output_skeleton): Output b4_mergers definition.
17484 (prepare): Output b4_max_rhs_length definition.
17485 Use 'bison.glr' as default skeleton for GLR parsers.
17487 * src/gram.c (glr_parser): New flag.
17488 (grammar_free): Call free_merger_functions.
17490 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
17491 all pairs of conflicting reductions, rather than just all tokens
17492 causing conflicts. Needed to size conflict tables.
17493 (conflicts_output): Modify call to count_rr_conflicts for new
17495 (conflicts_print): Ditto.
17496 (count_total_conflicts): New function.
17498 * src/reader.h (merger_list): New type.
17499 (merge_functions): New variable.
17501 * src/lex.h (tok_dprec, tok_merge): New token types.
17503 * src/gram.h (rule_s): Add dprec and merger fields.
17504 (glr_parser): New flag.
17506 * src/conflicts.h (count_total_conflicts): New function.
17508 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
17510 * doc/bison.texinfo (Generalized LR Parsing): New section.
17511 (GLR Parsers): New section.
17512 (Language and Grammar): Mention GLR parsing.
17513 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
17514 Correct typo ("tge" -> "the").
17516 * data/bison.glr: New skeleton for GLR parsing.
17518 * tests/cxx-gram.at: New tests for GLR parsing.
17520 * tests/testsuite.at: Include cxx-gram.at.
17522 * tests/Makefile.am: Add cxx-gram.at.
17524 * src/parse-gram.y:
17526 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
17528 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
17530 2002-06-27 Akim Demaille <akim@epita.fr>
17532 * src/options.h, src/options.c: Remove.
17533 * src/getargs.c (short_options, long_options): New.
17535 2002-06-27 Akim Demaille <akim@epita.fr>
17537 * data/bison.simple, data/bison.c++: Rename as...
17538 * data/yacc.c, data/lalr1.cc: these.
17539 * doc/bison.texinfo (Environment Variables): Remove.
17541 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
17543 * src/getargs.c (report_argmatch): Initialize strtok().
17545 2002-06-20 Akim Demaille <akim@epita.fr>
17547 * data/bison.simple (b4_symbol_actions): New, replaces...
17548 (b4_symbol_destructor, b4_symbol_printer): these.
17549 (yysymprint): Be sure to call YYPRINT only for tokens, and using
17550 user token numbers.
17552 2002-06-20 Akim Demaille <akim@epita.fr>
17554 * data/bison.simple (yydestructor): Rename as...
17555 (yydestruct): this.
17557 2002-06-20 Akim Demaille <akim@epita.fr>
17559 * src/symtab.h, src/symtab.c (symbol_type_set)
17560 (symbol_destructor_set, symbol_precedence_set): The location is
17562 Adjust all callers.
17564 2002-06-20 Akim Demaille <akim@epita.fr>
17566 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17568 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17570 * src/symtab.h, src/symtab.c (symbol_class_set)
17571 (symbol_user_token_number_set): Likewise.
17572 Adjust all callers.
17573 Promote complain_at.
17574 * tests/input.at (Type Clashes): Adjust.
17576 2002-06-20 Akim Demaille <akim@epita.fr>
17578 * data/bison.simple (YYLEX): Fix the declaration when
17581 2002-06-20 Akim Demaille <akim@epita.fr>
17583 * data/bison.simple (yysymprint): Don't print the token number,
17585 * tests/actions.at (Destructors): Rename as...
17586 (Printers and Destructors): this.
17587 Also exercise %printer.
17589 2002-06-20 Akim Demaille <akim@epita.fr>
17591 * data/bison.simple (YYDSYMPRINT): New.
17592 Use it to remove many of the #if YYDEBUG/if (yydebug).
17594 2002-06-20 Akim Demaille <akim@epita.fr>
17596 * src/symtab.h, src/symtab.c (symbol_t): printer and
17597 printer_location are new members.
17598 (symbol_printer_set): New.
17599 * src/parse-gram.y (PERCENT_PRINTER): New token.
17600 Handle its associated rule.
17601 * src/scan-gram.l: Adjust.
17602 (handle_destructor_at, handle_destructor_dollar): Rename as...
17603 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17604 * src/output.c (symbol_printers_output): New.
17605 (output_skeleton): Call it.
17606 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17607 since there are already many grammar files with a user `yyprint'.
17608 Replace the calls to YYPRINT to calls to yysymprint.
17609 * tests/calc.at: Adjust.
17610 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17611 taking advantage of parser very internal details (stack size!).
17613 2002-06-20 Akim Demaille <akim@epita.fr>
17615 * src/scan-gram.l: Complete the scanner with the missing patterns
17617 Use `quote' and `symbol_tag_get' where appropriate.
17619 2002-06-19 Akim Demaille <akim@epita.fr>
17621 * tests/actions.at (Destructors): Augment to test locations.
17622 * data/bison.simple (yydestructor): Pass it the current location
17623 if locations are enabled.
17624 Prototype only when __STDC__ or C++.
17625 Change the argument names to move into the yy name space: there is
17628 2002-06-19 Akim Demaille <akim@epita.fr>
17630 * data/bison.simple (b4_pure_if): New.
17631 Use it instead of #ifdef YYPURE.
17633 2002-06-19 Akim Demaille <akim@epita.fr>
17635 * data/bison.simple (b4_location_if): New.
17636 Use it instead of #ifdef YYLSP_NEEDED.
17638 2002-06-19 Akim Demaille <akim@epita.fr>
17640 Prepare @$ in %destructor, but currently don't bind it in the
17641 skeleton, as %location use is not cleaned up yet.
17643 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17644 (handle_action_at): New.
17645 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17646 a braced_code_t and a location as additional arguments.
17647 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17648 unquote one when outputting `b4_dollar_dollar'.
17650 * data/bison.simple (b4_eval): Remove.
17651 (b4_symbol_destructor): Adjust.
17652 * tests/input.at (Invalid @n): Adjust.
17654 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17656 * doc/bison.texinfo: Document ability to have multiple
17659 2002-06-18 Akim Demaille <akim@epita.fr>
17661 * src/files.c (compute_base_names): When computing the output file
17662 names from the input file name, strip the directory part.
17664 2002-06-18 Akim Demaille <akim@epita.fr>
17666 * data/bison.simple.new: Comment changes.
17667 Reported by Andreas Schwab.
17669 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17671 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17672 there are no `label `yyoverflowlab' defined but not used' warnings
17673 when yyoverflow is defined.
17675 2002-06-18 Akim Demaille <akim@epita.fr>
17677 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17679 (symbol_destructor_set): Adjust.
17680 * src/output.c (symbol_destructors_output): Output the destructor
17682 Output the symbol name.
17683 * data/bison.simple (b4_symbol_destructor): Adjust.
17685 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17686 and Akim Demaille <akim@epita.fr>
17688 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17689 what's left on the stack when the error recovery hits EOF.
17690 * tests/actions.at (Destructors): Complete to exercise this case.
17692 2002-06-17 Akim Demaille <akim@epita.fr>
17694 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17695 arguments is really empty, not only equal to `[]'.
17696 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17698 (symbol_destructor_set): New.
17699 * src/output.c (symbol_destructors_output): New.
17700 * src/reader.h (brace_code_t, current_braced_code): New.
17701 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17702 (handle_dollar): Rename as...
17703 (handle_action_dollar): this.
17704 (handle_destructor_dollar): New.
17705 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17706 (grammar_declaration): Use it.
17707 * data/bison.simple (yystos): Is always defined.
17708 (yydestructor): New.
17709 * tests/actions.at (Destructors): New.
17710 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17712 2002-06-17 Akim Demaille <akim@epita.fr>
17714 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17715 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17716 rule_length only when needed.
17717 * src/output.c (actions_output, token_definitions_output): Output
17719 * src/symtab.c: Don't access directly to the symbol tag, use
17721 * src/parse-gram.y: Use symbol_list_free.
17723 2002-06-17 Akim Demaille <akim@epita.fr>
17725 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17726 (symbol_list_prepend, get_type_name): Move to...
17727 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17728 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17729 Adjust all callers.
17730 (symbol_list_free): New.
17731 * src/scan-gram.l (handle_dollar): Takes a location.
17732 * tests/input.at (Invalid $n): Adjust.
17734 2002-06-17 Akim Demaille <akim@epita.fr>
17736 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17737 (symbol_list_prepend): New.
17738 * src/parse-gram.y (%union): `list' is a new member.
17739 (symbols.1): New, replaces...
17740 (terms_to_prec.1, nterms_to_type.1): these.
17741 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17742 Take a location as additional argument.
17743 Adjust all callers.
17745 2002-06-15 Akim Demaille <akim@epita.fr>
17747 * src/parse-gram.y: Move %token in the declaration section so that
17748 we don't depend upon CVS Bison.
17750 2002-06-15 Akim Demaille <akim@epita.fr>
17752 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17753 * src/print.c (print_core): Use it.
17755 2002-06-15 Akim Demaille <akim@epita.fr>
17757 * src/conflicts.c (log_resolution): Accept the rule involved in
17758 the sr conflicts instead of the lookahead number that points to
17760 (flush_reduce): Accept the current lookahead vector as argument,
17761 instead of the index in LA.
17762 (resolve_sr_conflict): Accept the current number of lookahead
17763 bitset to consider for the STATE, instead of the index in LA.
17764 (set_conflicts): Adjust.
17765 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17767 2002-06-15 Akim Demaille <akim@epita.fr>
17769 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17770 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17771 Adjust all dependencies.
17772 * src/lalr.c (initialize_lookaheads): Split into...
17773 (states_lookaheads_count, states_lookaheads_initialize): these.
17776 2002-06-15 Akim Demaille <akim@epita.fr>
17778 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17780 (grammar_rules_print): here.
17781 * src/reduce.c (reduce_output): Use it.
17782 * tests/reduce.at (Useless Rules, Reduced Automaton)
17783 (Underivable Rules): Adjust.
17785 2002-06-15 Akim Demaille <akim@epita.fr>
17787 Copy BYacc's nice way to report the grammar.
17789 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17791 Don't print the rules' location, it is confusing and useless.
17792 (rule_print): Use grammar_rhs_print.
17793 * src/print.c (print_grammar): Use grammar_rules_print.
17795 2002-06-15 Akim Demaille <akim@epita.fr>
17797 Complete and rationalize `useless thing' warnings.
17799 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17800 (symbol_tag_print): New.
17801 Use them everywhere in place of accessing directly the tag member.
17802 * src/gram.h, src/gram.c (rule_print): New.
17803 Use it where a rule used to be printed `by hand'.
17804 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17805 (reduce_grammar_tables): Report the useless rules.
17806 (reduce_print): Useless things are a warning, not an error.
17808 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17809 (Reduced Automaton, Underivable Rules): Adjust.
17810 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17811 * tests/conflicts.at (Unresolved SR Conflicts)
17812 (Solved SR Conflicts): Adjust.
17814 2002-06-15 Akim Demaille <akim@epita.fr>
17816 Let symbols have a location.
17818 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17820 Adjust all callers.
17821 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17822 Use location_t, not int.
17823 * src/symtab.c (symbol_check_defined): Take advantage of the
17825 * tests/regression.at (Invalid inputs): Adjust.
17827 2002-06-15 Akim Demaille <akim@epita.fr>
17829 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17830 (input): Don't try to initialize yylloc here, do it in the
17832 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17833 * src/gram.h (rule_t): Change line and action_line into location
17834 and action_location, of location_t type.
17835 Adjust all dependencies.
17836 * src/location.h, src/location.c (empty_location): New.
17837 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17838 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17839 (grammar_current_rule_symbol_append)
17840 (grammar_current_rule_action_append): Expect a location as argument.
17841 * src/reader.c (grammar_midrule_action): Adjust to attach an
17842 action's location as dummy symbol location.
17843 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17844 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17847 2002-06-14 Akim Demaille <akim@epita.fr>
17849 Grammar declarations may be found in the grammar section.
17851 * src/parse-gram.y (rules_or_grammar_declaration): New.
17852 (declarations): Each declaration may end with a semicolon, not
17854 (grammar_declaration): `"%union"'.
17855 (grammar): Branch to rules_or_grammar_declaration.
17857 2002-06-14 Akim Demaille <akim@epita.fr>
17859 * src/main.c (main): Invoke scanner_free.
17861 2002-06-14 Akim Demaille <akim@epita.fr>
17863 * src/output.c (m4_invoke): Extracted from...
17864 (output_skeleton): here.
17867 2002-06-14 Akim Demaille <akim@epita.fr>
17869 * src/parse-gram.y (directives, directive, gram)
17870 (grammar_directives, precedence_directives, precedence_directive):
17872 (declarations, declaration, grammar, grammar_declaration)
17873 (precedence_declaration, precedence_declarator): these.
17874 (symbol_declaration): New.
17876 2002-06-14 Akim Demaille <akim@epita.fr>
17878 * src/files.c (action_obstack): Remove, unused.
17879 (output_obstack): Remove it, and all its dependencies, as it is no
17881 * src/reader.c (epilogue_set): Build the epilogue in the
17883 * src/output.h, src/output.c (muscle_obstack): Move to...
17884 * src/muscle_tab.h, src/muscle_tab.h: here.
17885 (muscle_init): Initialize muscle_obstack.
17886 (muscle_free): New.
17887 * src/main.c (main): Call it.
17889 2002-06-14 Akim Demaille <akim@epita.fr>
17891 * src/location.h: New, extracted from...
17892 * src/reader.h: here.
17893 * src/Makefile.am (noinst_HEADERS): Merge into
17894 (bison_SOURCES): this.
17896 * src/parse-gram.y: Use location_t instead of Bison's.
17897 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17898 Use location_t instead of ints.
17900 2002-06-14 Akim Demaille <akim@epita.fr>
17902 * data/bison.simple, data/bison.c++: Be sure to restore the
17903 current #line when returning to the skeleton contents after having
17904 exposed the input file's #line.
17906 2002-06-12 Akim Demaille <akim@epita.fr>
17908 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17910 * tests/actions.at (Exotic Dollars): New.
17912 2002-06-12 Akim Demaille <akim@epita.fr>
17914 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17916 * tests/input.at (Torturing the Scanner): New.
17918 2002-06-11 Akim Demaille <akim@epita.fr>
17920 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17921 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17922 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17923 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17924 * src/reader.c (reader): Use it.
17926 2002-06-11 Akim Demaille <akim@epita.fr>
17928 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17929 Adjust all callers.
17930 (scanner_last_string_free): New.
17932 2002-06-11 Akim Demaille <akim@epita.fr>
17934 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17935 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17936 (last_string, YY_OBS_FREE): New.
17937 Use them when returning an ID.
17939 2002-06-11 Akim Demaille <akim@epita.fr>
17941 Have Bison grammars parsed by a Bison grammar.
17943 * src/reader.c, src/reader.h (prologue_augment): New.
17944 * src/reader.c (copy_definition): Remove.
17946 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17947 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17948 (grammar_current_rule_prec_set, grammar_current_rule_check)
17949 (grammar_current_rule_symbol_append)
17950 (grammar_current_rule_action_append): Export.
17951 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17952 (symbol_list_action_append): Remove.
17953 Hook the routines from reader.
17954 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17955 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17957 * src/reader.c (read_declarations): Remove, unused.
17959 * src/parse-gram.y: Handle the epilogue.
17960 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17961 (grammar_start_symbol_set): this.
17962 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17963 * src/reader.c (readgram): Remove, unused.
17964 (reader): Adjust to insert eoftoken and axiom where appropriate.
17966 * src/reader.c (copy_dollar): Replace with...
17967 * src/scan-gram.h (handle_dollar): this.
17968 * src/parse-gram.y: Remove `%thong'.
17970 * src/reader.c (copy_at): Replace with...
17971 * src/scan-gram.h (handle_at): this.
17973 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17976 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17979 * src/reader.h, src/reader.c (grammar_rule_end): New.
17981 * src/parse.y (current_type, current_class): New.
17982 Implement `%nterm', `%token' support.
17983 Merge `%term' into `%token'.
17984 (string_as_id): New.
17985 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17988 * src/parse-gram.y: Be sure to handle properly the beginning of
17991 * src/parse-gram.y: Handle %type.
17992 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17994 * src/parse-gram.y: More directives support.
17995 * src/options.c: No longer handle source directives.
17997 * src/parse-gram.y: Fix %output.
17999 * src/parse-gram.y: Handle %union.
18000 Use the prologue locations.
18001 * src/reader.c (parse_union_decl): Remove.
18003 * src/reader.h, src/reader.c (epilogue_set): New.
18004 * src/parse-gram.y: Use it.
18006 * data/bison.simple, data/bison.c++: b4_stype is now either not
18007 defined, then default to int, or to the contents of %union,
18008 without `union' itself.
18010 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18012 * src/output.c (actions_output): Don't output braces, as they are
18013 already handled by the scanner.
18015 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18016 characters to themselves.
18018 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18019 that the epilogue has a proper #line.
18021 * src/parse-gram.y: Handle precedence/associativity.
18023 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18025 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18026 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18027 at all to define terminals that cannot be emitted.
18029 * src/scan-gram.l: Escape M4 characters.
18031 * src/scan-gram.l: Working properly with escapes in user
18032 strings/characters.
18034 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18035 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18037 Use more modest sizes, as for the time being the parser does not
18038 release memory, and therefore the process swallows a huge amount
18041 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18042 stricter %token grammar.
18044 * src/symtab.h (associativity): Add `undef_assoc'.
18045 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18046 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18048 * tests/regression.at (Invalid %directive): Remove, as it is now
18050 (Invalid inputs): Adjust to the new error messages.
18051 (Token definitions): The new grammar doesn't allow too many
18054 * src/lex.h, src/lex.c: Remove.
18055 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18056 (copy_character, copy_string2, copy_string, copy_identifier)
18057 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18058 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18059 (parse_action): Remove.
18060 * po/POTFILES.in: Adjust.
18062 2002-06-11 Akim Demaille <akim@epita.fr>
18064 * src/reader.c (parse_action): Don't store directly into the
18065 rule's action member: return the action as a string.
18066 Don't require `rule_length' as an argument: compute it.
18067 (grammar_current_rule_symbol_append)
18068 (grammar_current_rule_action_append): New, eved out from
18070 Remove `action_flag', `rulelength', unused now.
18072 2002-06-11 Akim Demaille <akim@epita.fr>
18074 * src/reader.c (grammar_current_rule_prec_set).
18075 (grammar_current_rule_check): New, eved out from...
18077 Remove `xaction', `first_rhs': useless.
18078 * tests/input.at (Type clashes): New.
18079 * tests/existing.at (GNU Cim Grammar): Adjust.
18081 2002-06-11 Akim Demaille <akim@epita.fr>
18083 * src/reader.c (grammar_midrule_action): New, Eved out from
18086 2002-06-11 Akim Demaille <akim@epita.fr>
18088 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
18090 (readgram): Use them as replacement of inlined code, crule and
18093 2002-06-11 Akim Demaille <akim@epita.fr>
18095 * src/reader.c (grammar_end, grammar_symbol_append): New.
18096 (readgram): Use them.
18097 Make the use of `p' as local as possible.
18099 2002-06-10 Akim Demaille <akim@epita.fr>
18101 GCJ's parser requires the tokens to be defined before the prologue.
18103 * data/bison.simple: Output the token definition before the user's
18105 * tests/regression.at (Braces parsing, Duplicate string)
18106 (Mixing %token styles): Check the output from bison.
18107 (Early token definitions): New.
18109 2002-06-10 Akim Demaille <akim@epita.fr>
18111 * src/symtab.c (symbol_user_token_number_set): Don't complain when
18112 assigning twice the same user number to a token, so that we can
18114 * src/lex.c (lex): here.
18115 Also use `symbol_class_set' instead of hand written code.
18116 * src/reader.c (parse_assoc_decl): Likewise.
18118 2002-06-10 Akim Demaille <akim@epita.fr>
18120 * src/symtab.c, src/symtab.c (symbol_class_set)
18121 (symbol_user_token_number_set): New.
18122 * src/reader.c (parse_token_decl): Use them.
18123 Use a switch instead of ifs.
18124 Use a single argument.
18126 2002-06-10 Akim Demaille <akim@epita.fr>
18128 Remove `%thong' support as it is undocumented, unused, duplicates
18129 `%token's job, and creates useless e-mail traffic with people who
18130 want to know what it is, why it is undocumented, unused, and
18131 duplicates `%token's job.
18133 * src/reader.c (parse_thong_decl): Remove.
18134 * src/options.c (option_table): Remove "thong".
18135 * src/lex.h (tok_thong): Remove.
18137 2002-06-10 Akim Demaille <akim@epita.fr>
18139 * src/symtab.c, src/symtab.c (symbol_type_set)
18140 (symbol_precedence_set): New.
18141 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
18142 (value_components_used): Remove, unused.
18144 2002-06-09 Akim Demaille <akim@epita.fr>
18146 Move symbols handling code out of the reader.
18148 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
18149 (axiom): Move to...
18150 * src/symtab.h, src/symtab.c: here.
18152 * src/gram.c (start_symbol): Remove: use startsymbol->number.
18153 * src/reader.c (startval): Rename as...
18154 * src/symtab.h, src/symtab.c (startsymbol): this.
18155 * src/reader.c: Adjust.
18157 * src/reader.c (symbol_check_defined, symbol_make_alias)
18158 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18159 (token_translations_init)
18161 * src/symtab.c: here.
18162 * src/reader.c (packsymbols): Move to...
18163 * src/symtab.h, src/symtab.c (symbols_pack): here.
18164 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
18167 2002-06-03 Akim Demaille <akim@epita.fr>
18169 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
18172 2002-06-03 Akim Demaille <akim@epita.fr>
18174 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
18175 structs with non literals.
18176 * src/scan-skel.l: never-interactive.
18177 * src/conflicts.c (enum conflict_resolution_e): No trailing
18179 * src/getargs.c (usage): Split long literal strings.
18180 Reported by Hans Aberg.
18182 2002-05-28 Akim Demaille <akim@epita.fr>
18184 * data/bison.c++: Use C++ ostreams.
18185 (cdebug_): New member.
18187 2002-05-28 Akim Demaille <akim@epita.fr>
18189 * src/output.c (output_skeleton): Be sure to allocate enough room
18190 for `/' _and_ for `\0' in full_skeleton.
18192 2002-05-28 Akim Demaille <akim@epita.fr>
18194 * data/bison.c++: Catch up with bison.simple:
18195 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18196 and Paul Eggert <eggert@twinsun.com>: `error' handing.
18197 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
18198 and popping traces.
18200 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18202 * src/output.c (output_skeleton): Put an explicit path in front of
18203 the skeleton file name, rather than relying on the -I directory,
18204 to partially alleviate effects of having a skeleton file lying around
18205 in the current directory.
18207 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18209 * src/conflicts.c (log_resolution): Correct typo:
18210 obstack_printf should be obstack_fgrow1.
18212 2002-05-26 Akim Demaille <akim@epita.fr>
18214 * src/state.h (state_t): `solved_conflicts' is a new member.
18215 * src/LR0.c (new_state): Set it to 0.
18216 * src/conflicts.h, src/conflicts.c (print_conflicts)
18217 (free_conflicts, solve_conflicts): Rename as...
18218 (conflicts_print, conflicts_free, conflicts_solve): these.
18220 * src/conflicts.c (enum conflict_resolution_e)
18221 (solved_conflicts_obstack): New, used by...
18222 (log_resolution): this.
18223 Adjust to attach the conflict resolution to each state.
18224 Complete the description with the precedence/associativity
18226 (resolve_sr_conflict): Adjust.
18227 * src/print.c (print_state): Output its solved_conflicts.
18228 * tests/conflicts.at (Unresolved SR Conflicts)
18229 (Solved SR Conflicts): Exercise --report=all.
18231 2002-05-26 Akim Demaille <akim@epita.fr>
18233 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18234 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18235 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
18236 (token_number_t, item_number_as_token_number)
18237 (token_number_as_item_number, muscle_insert_token_number_table):
18239 (symbol_number_t, item_number_as_symbol_number)
18240 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
18241 these, since it is more appropriate.
18243 2002-05-26 Akim Demaille <akim@epita.fr>
18245 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
18247 * data/bison.simple (yystos) [YYDEBUG]: New.
18248 (yyparse) [YYDEBUG]: Display the symbols which are popped during
18250 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
18252 2002-05-25 Akim Demaille <akim@epita.fr>
18254 * doc/bison.texinfo (Debugging): Split into...
18255 (Tracing): this new section, its former contents, and...
18256 (Understanding): this new section.
18257 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
18259 (report_flag): this.
18260 Adjust all dependencies.
18261 (report_args, report_types, report_argmatch): New.
18262 (usage, getargs): Report/support -r, --report.
18264 (struct option_table_struct): Rename as..,
18265 (struct option_table_s): this.
18266 Rename the `set_flag' member to `flag' to match with getopt_long's
18268 * src/options.c (option_table): Split verbose into an entry for
18269 %verbose, and another for --verbose.
18270 Support --report/-r, so remove -r from the obsolete --raw.
18271 * src/print.c: Attach full item sets and lookaheads reports to
18272 report_flag instead of trace_flag.
18273 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
18275 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18276 and Paul Eggert <eggert@twinsun.com>
18278 * data/bison.simple (yyparse): Correct error handling to conform to
18279 POSIX and yacc. Specifically, after syntax error is discovered,
18280 do not reduce further before shifting the error token.
18281 Clean up the code a bit by removing the labels yyerrdefault,
18282 yyerrhandle, yyerrpop.
18283 * NEWS: Document the above.
18285 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18287 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
18288 type; it isn't always big enough, since it doesn't necessarily
18289 include non-terminals.
18290 (yytranslate): Expand definition of yy_token_number_type, so that
18291 the latter can be removed.
18292 (yy_token_number_type): Remove, only one use.
18293 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
18294 don't use TokenNumberType as element type.
18296 * tests/regression.at: Modify expected output to agree with change
18297 to yyr1 and yytranslate.
18299 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
18301 * src/reader.c (parse_action): Use copy_character instead of
18304 2002-05-13 Akim Demaille <akim@epita.fr>
18306 * tests/regression.at (Token definitions): Prototype yylex and
18309 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18311 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
18312 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
18314 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
18316 2002-05-07 Akim Demaille <akim@epita.fr>
18318 * tests/synclines.at: Be sure to prototype yylex and yyerror to
18319 avoid GCC warnings.
18321 2002-05-07 Akim Demaille <akim@epita.fr>
18325 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
18326 over the RHS of each rule.
18327 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
18328 * src/state.h (state_t): Member `nitems' is unsigned short.
18329 * src/LR0.c (get_state): Adjust.
18330 * src/reader.c (packgram): Likewise.
18331 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
18333 (muscle_insert_int_table): Remove, unused.
18334 (prepare_rules): Remove `max'.
18336 2002-05-06 Akim Demaille <akim@epita.fr>
18338 * src/closure.c (print_firsts): Display of the symbol tags.
18339 (bitmatrix_print): Move to...
18340 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
18342 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
18344 2002-05-06 Akim Demaille <akim@epita.fr>
18346 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
18349 2002-05-06 Akim Demaille <akim@epita.fr>
18351 * src/LR0.c (new_state, get_state): Instead of using the global
18352 `kernel_size' and `kernel_base', have two new arguments:
18353 `core_size' and `core'.
18356 2002-05-06 Akim Demaille <akim@epita.fr>
18358 * src/reader.c (packgram): No longer end `ritem' with a 0
18359 sentinel: it is not used.
18361 2002-05-05 Akim Demaille <akim@epita.fr>
18363 New experimental feature: display the lookaheads in the report and
18366 * src/print (print_core): When --trace-flag, display the rules
18368 * src/print_graph.c (print_core): Likewise.
18369 Swap the arguments.
18372 2002-05-05 Akim Demaille <akim@epita.fr>
18374 * tests/torture.at (Many lookaheads): New test.
18376 2002-05-05 Akim Demaille <akim@epita.fr>
18378 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
18379 (GENERATE_MUSCLE_INSERT_TABLE): this.
18380 (output_int_table, output_unsigned_int_table, output_short_table)
18381 (output_token_number_table, output_item_number_table): Replace with...
18382 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
18383 (muscle_insert_short_table, muscle_insert_token_number_table)
18384 (muscle_insert_item_number_table): these.
18385 Adjust all callers.
18386 (prepare_tokens): Don't free `translations', since...
18387 * src/reader.h, src/reader.c (grammar_free): do it.
18389 * src/gram.h, src/gram.c (grammar_free): here.
18390 * data/bison.simple, data/bison.c++: b4_token_number_max is now
18393 2002-05-05 Akim Demaille <akim@epita.fr>
18395 * src/output.c (output_unsigned_int_table): New.
18396 (prepare_rules): `i' is unsigned.
18397 `prhs', `rline', `r2' are unsigned int.
18398 Rename muscle `rhs_number_max' as `rhs_max'.
18399 Output muscles `prhs_max', `rline_max', and `r2_max'.
18401 * data/bison.simple, data/bison.c++: Adjust to use these muscles
18402 to compute types instead of constant types.
18403 * tests/regression.at (Web2c Actions): Adjust.
18405 2002-05-04 Akim Demaille <akim@epita.fr>
18407 * src/symtab.h (SALIAS, SUNDEF): Rename as...
18408 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
18409 Adjust dependencies.
18410 * src/output.c (token_definitions_output): Be sure not to output a
18411 `#define 'a'' when fed with `%token 'a' "a"'.
18412 * tests/regression.at (Token definitions): New.
18414 2002-05-03 Paul Eggert <eggert@twinsun.com>
18416 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
18419 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
18421 * Makefile.am (SUBDIRS): Remove intl.
18422 (EXTRA_DIST): Add config/config.rpath.
18424 2002-05-03 Akim Demaille <akim@epita.fr>
18426 * data/bison.simple (m4_if): Don't output empty enums.
18427 And actually, output valid enum definitions :(.
18429 2002-05-03 Akim Demaille <akim@epita.fr>
18431 * configure.bat: Remove, completely obsolete.
18432 * Makefile.am (EXTRA_DIST): Adjust.
18433 Don't distribute config.rpath...
18434 * config/Makefile.am (EXTRA_DIST): Do it.
18436 2002-05-03 Akim Demaille <akim@epita.fr>
18438 * configure.in (GETTEXT_VERSION): New.
18439 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
18441 2002-05-03 Akim Demaille <akim@epita.fr>
18443 * data/bison.simple (b4_token_enum): New.
18444 (b4_token_defines): Use it to output tokens both as #define and
18446 Suggested by Paul Eggert.
18447 * src/output.c (token_definitions_output): Don't output spurious
18450 2002-05-03 Akim Demaille <akim@epita.fr>
18452 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18454 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
18456 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
18457 Update the stack class, give a try to deque as the default container.
18459 2002-05-02 Akim Demaille <akim@epita.fr>
18461 * data/bison.simple (yyparse): Do not implement @$ = @1.
18462 (YYLLOC_DEFAULT): Adjust to do it.
18463 * doc/bison.texinfo (Location Default Action): Fix.
18465 2002-05-02 Akim Demaille <akim@epita.fr>
18467 * src/reader.c (parse_braces): Merge into...
18468 (parse_action): this.
18470 2002-05-02 Akim Demaille <akim@epita.fr>
18472 * configure.in (ALL_LINGUAS): Remove.
18473 * po/LINGUAS, hr.po: New.
18475 2002-05-02 Akim Demaille <akim@epita.fr>
18477 Remove the so called hairy (semantic) parsers.
18479 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
18480 * src/gram.h, src/gram.c (semantic_parser): Remove.
18481 (rule_t): Remove the guard and guard_line members.
18482 * src/lex.h (token_t): remove tok_guard.
18483 * src/options.c (option_table): Remove %guard and %semantic_parser
18485 * src/output.c, src/output.h (guards_output): Remove.
18487 (token_definitions_output): Don't output the `T'
18489 (output_skeleton): Don't output the guards.
18490 * src/files.c, src/files.c (attrsfile): Remove.
18491 * src/reader.c (symbol_list): Remove the guard and guard_line
18493 Adjust dependencies.
18494 (parse_guard): Remove.
18495 * data/bison.hairy: Remove.
18496 * doc/bison.texinfo (Environment Variables): Remove occurrences of
18499 2002-05-02 Akim Demaille <akim@epita.fr>
18501 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
18502 (parse_guard): Rename the formal argument `stack_offset' as
18503 `rule_length', which is more readable.
18505 (copy_at, copy_dollar): Instead of outputting the hard coded
18506 values of $$, $n and so forth, output invocation to b4_lhs_value,
18507 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
18508 Note: this patch partially drops `semantic-parser' support: it
18509 always does `rule_length - n', where semantic parsers ought to
18511 * data/bison.simple, data/bison.c++ (b4_lhs_value)
18512 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
18514 2002-05-02 Akim Demaille <akim@epita.fr>
18516 * configure.in (AC_INIT): Bump to 1.49b.
18517 (AM_INIT_AUTOMAKE): Short invocation.
18519 2002-05-02 Akim Demaille <akim@epita.fr>
18523 2002-05-01 Akim Demaille <akim@epita.fr>
18525 * src/skeleton.h: Remove.
18527 2002-05-01 Akim Demaille <akim@epita.fr>
18529 * src/skeleton.h: Fix the #endif.
18530 Reported by Magnus Fromreide.
18532 2002-04-26 Paul Eggert <eggert@twinsun.com>
18534 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
18535 Define if we define YYSTYPE and YYLTYPE, respectively.
18536 (YYCOPY): Fix [] quoting problem in the non-GCC case.
18538 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
18540 * src/scan-skel.l: Postprocess quadrigraphs.
18542 * src/reader.c (copy_character): New function, used to output
18543 single characters while replacing `[' and `]' with quadrigraphs, to
18544 avoid troubles with M4 quotes.
18545 (copy_comment): Output characters with copy_character.
18546 (read_additionnal_code): Likewise.
18547 (copy_string2): Likewise.
18548 (copy_definition): Likewise.
18550 * tests/calc.at: Exercise M4 quoting.
18552 2002-04-25 Akim Demaille <akim@epita.fr>
18554 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18555 between `!' and the command.
18556 Reported by Paul Eggert.
18558 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
18560 * tests/calc.at: Exercise prologue splitting.
18562 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18563 `b4_post_prologue' instead of `b4_prologue'.
18565 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18567 (output): Free pre_prologue_obstack and post_prologue_obstack.
18568 * src/files.h, src/files.c (attrs_obstack): Remove.
18569 (pre_prologue_obstack, post_prologue_obstack): New.
18570 * src/reader.c (copy_definition): Add a parameter to specify the
18571 obstack to fill, instead of using attrs_obstack unconditionally.
18572 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18573 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18575 2002-04-23 Paul Eggert <eggert@twinsun.com>
18577 * data/bison.simple: Remove unnecessary commentary and white
18578 space differences from 1_29-branch.
18579 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18581 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18582 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18583 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18584 constructors or destructors.
18586 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18588 2002-04-23 Akim Demaille <akim@epita.fr>
18590 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18591 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18592 location with columns.
18593 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18594 All reported by Paul Eggert.
18596 2002-04-22 Akim Demaille <akim@epita.fr>
18598 * src/reduce.c (dump_grammar): Move to...
18599 * src/gram.h, src/gram.c (grammar_dump): here.
18600 Be sure to separate long item numbers.
18601 Don't read the members of a rule's prec if its nil.
18603 2002-04-22 Akim Demaille <akim@epita.fr>
18605 * src/output.c (table_size, table_grow): New.
18606 (MAXTABLE): Remove, replace uses with table_size.
18607 (pack_vector): Instead of dying when the table is too big, grow it.
18609 2002-04-22 Akim Demaille <akim@epita.fr>
18611 * data/bison.simple (yyr1): Its type is that of a token number.
18612 * data/bison.c++ (r1_): Likewise.
18613 * tests/regression.at (Web2c Actions): Adjust.
18615 2002-04-22 Akim Demaille <akim@epita.fr>
18617 * src/reader.c (token_translations_init): 256 is now the default
18618 value for the error token, i.e., it will be assigned another
18619 number if the user assigned 256 to one of her tokens.
18620 (reader): Don't force 256 to error.
18621 * doc/bison.texinfo (Symbols): Adjust.
18622 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18623 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18624 etc. instead of 10, 20, 30 (which was used to `jump' over error
18625 (256) and undefined (2)).
18627 2002-04-22 Akim Demaille <akim@epita.fr>
18629 Propagate more token_number_t.
18631 * src/gram.h (token_number_as_item_number)
18632 (item_number_as_token_number): New.
18633 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18634 Use it to create output_item_number_table and
18635 output_token_number_table.
18636 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18637 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18638 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18639 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18641 2002-04-22 Akim Demaille <akim@epita.fr>
18643 * src/output.h, src/output.c (get_lines_number): Remove.
18645 2002-04-19 Akim Demaille <akim@epita.fr>
18647 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18649 (Debugging): More details about enabling the debugging features.
18650 (Table of Symbols): Describe $$, $n, @$, and @n.
18651 Suggested by Tim Josling.
18653 2002-04-19 Akim Demaille <akim@epita.fr>
18655 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18657 2002-04-10 Akim Demaille <akim@epita.fr>
18659 * src/system.h: Rely on HAVE_LIMITS_H.
18660 Suggested by Paul Eggert.
18662 2002-04-09 Akim Demaille <akim@epita.fr>
18664 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18665 full stderr, and strip it according to the bison options, instead
18666 of composing the error message from different bits.
18667 This makes it easier to check for several error messages.
18668 Adjust all the invocations.
18669 Add an invocation exercising the error token.
18670 Add an invocation demonstrating a stupid error message.
18671 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18673 Error message are for stderr, not stdout.
18675 2002-04-09 Akim Demaille <akim@epita.fr>
18677 * src/gram.h, src/gram.c (error_token_number): Remove, use
18679 * src/reader.c (reader): Don't specify the user token number (2)
18680 for $undefined, as it uselessly prevents using it.
18681 * src/gram.h (token_number_t): Move to...
18682 * src/symtab.h: here.
18683 (state_t.number): Is a token_number_t.
18684 * src/print.c, src/reader.c: Use undeftoken->number instead of
18686 (Even though this 2 is not the same as above: the number of the
18687 undeftoken remains being 2, it is its user token number which
18689 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18690 `user_token_number_max'.
18691 Output `undef_token_number'.
18692 * data/bison.simple, data/bison.c++: Use them.
18693 Be sure to map invalid yylex return values to
18694 `undef_token_number'. This saves us from gratuitous SEGV.
18696 * tests/conflicts.at (Solved SR Conflicts)
18697 (Unresolved SR Conflicts): Adjust.
18698 * tests/regression.at (Web2c Actions): Adjust.
18700 2002-04-08 Akim Demaille <akim@epita.fr>
18702 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18704 Remove the duplicate `typedefs'.
18705 (RhsNumberType): Fix the declaration and various other typos.
18707 * data/bison.simple: Use __ofile__.
18708 * src/scan-skel.l: Handle __ofile__.
18710 2002-04-08 Akim Demaille <akim@epita.fr>
18712 * src/gram.h (item_number_t): New, the type of item numbers in
18713 RITEM. Note that it must be able to code symbol numbers as
18714 positive number, and the negation of rule numbers as negative
18716 Adjust all dependencies (pretty many).
18717 * src/reduce.c (rule): Remove this `short *' pointer: use
18719 * src/system.h (MINSHORT, MAXSHORT): Remove.
18720 Include `limits.h'.
18721 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18722 (shortcpy): Remove.
18723 (MAXTABLE): Move to...
18724 * src/output.c (MAXTABLE): here.
18725 (prepare_rules): Use output_int_table to output rhs.
18726 * data/bison.simple, data/bison.c++: Adjust.
18727 * tests/torture.at (Big triangle): Move the limit from 254 to
18729 * tests/regression.at (Web2c Actions): Ajust.
18731 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18732 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18733 passes, but produces negative #line number, once fixed, GCC is
18734 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18736 * src/state.h (state_h): Code input lines on ints, not shorts.
18738 2002-04-08 Akim Demaille <akim@epita.fr>
18740 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18741 and then the grammar.
18743 2002-04-08 Akim Demaille <akim@epita.fr>
18745 * src/system.h: No longer using strndup.
18747 2002-04-07 Akim Demaille <akim@epita.fr>
18749 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18750 * src/output.c (output_table_data): Return the longest number.
18751 (prepare_tokens): Output `token_number_max').
18752 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18754 Use them to define yy_token_number_type/TokenNumberType.
18755 Use this type for yytranslate.
18756 * tests/torture.at (Big triangle): Push the limit from 124 to
18758 * tests/regression.at (Web2c Actions): Adjust.
18760 2002-04-07 Akim Demaille <akim@epita.fr>
18762 * tests/torture.at (Big triangle): New.
18763 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18764 * tests/existing.at: here.
18766 2002-04-07 Akim Demaille <akim@epita.fr>
18768 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18770 Adjust dependencies.
18772 2002-04-07 Akim Demaille <akim@epita.fr>
18774 * src/reader.c: Normalize increments to prefix form.
18776 2002-04-07 Akim Demaille <akim@epita.fr>
18778 * src/reader.c, symtab.c: Remove debugging code.
18780 2002-04-07 Akim Demaille <akim@epita.fr>
18782 Rename all the `bucket's as `symbol_t'.
18784 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18785 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18786 * src/symtab.c, src/symtab.h (bucket): Rename as...
18788 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18789 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18790 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18791 (buckets_new, buckets_free, buckets_do): Rename as...
18792 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18793 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18794 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18795 (symbols_new, symbols_free, symbols_do): these.
18797 2002-04-07 Akim Demaille <akim@epita.fr>
18799 Use lib/hash for the symbol table.
18801 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18803 * src/lex.c (lex): Set the `number' member of new terminals.
18804 * src/reader.c (bucket_check_defined, bucket_make_alias)
18805 (bucket_check_alias_consistence, bucket_translation): New.
18806 (reader, grammar_free, readgram, token_translations_init)
18807 (packsymbols): Adjust.
18808 (reader): Number the predefined tokens.
18809 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18810 for predefined tokens.
18811 * src/symtab.h (bucket): Remove all the hash table related
18813 * src/symtab.c (symtab): Replace by...
18814 (bucket_table): this.
18815 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18816 (buckets_new, buckets_do): New.
18818 2002-04-07 Akim Demaille <akim@epita.fr>
18820 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18821 (start_symbol, max_user_token_number, semantic_parser)
18822 (error_token_number): Initialize.
18823 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18826 (errtoken, eoftoken, undeftoken, axiom): Extern.
18828 2002-04-07 Akim Demaille <akim@epita.fr>
18830 * src/gram.h (rule_s): prec and precsym are now pointers
18831 to the bucket giving the priority/associativity.
18832 Member `associativity' removed: useless.
18833 * src/reduce.c, src/conflicts.c: Adjust.
18835 2002-04-07 Akim Demaille <akim@epita.fr>
18837 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18838 Properly escape the symbols' TAG when outputting them.
18840 2002-04-07 Akim Demaille <akim@epita.fr>
18842 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18844 2002-04-07 Akim Demaille <akim@epita.fr>
18846 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18847 (LArule): this, which is an array to rule_t*.
18848 * src/print.c, src/conflicts.c: Adjust.
18850 2002-04-07 Akim Demaille <akim@epita.fr>
18852 * src/gram.h (rule_t): Rename `number' as `user_number'.
18853 `number' is a new member.
18854 Adjust dependencies.
18855 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18857 2002-04-07 Akim Demaille <akim@epita.fr>
18859 As a result of the previous patch, it is no longer needed
18860 to reorder ritem itself.
18862 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18864 2002-04-07 Akim Demaille <akim@epita.fr>
18866 Be sure never to walk through RITEMS, but use only data related to
18867 the rules themselves. RITEMS should be banished.
18869 * src/output.c (output_token_translations): Rename as...
18870 (prepare_tokens): this.
18871 In addition to `translate', prepare the muscles `tname' and
18872 `toknum', which were handled by...
18873 (output_rule_data): this.
18874 Remove, and move the remainder of its outputs into...
18875 (prepare_rules): this new routines, which also merges content from
18876 (output_gram): this.
18877 (prepare_rules): Be sure never to walk through RITEMS.
18878 (output_stos): Rename as...
18879 (prepare_stos): this.
18880 (output): Always invoke prepare_states, after all, just don't use it
18881 in the output if you don't need it.
18883 2002-04-07 Akim Demaille <akim@epita.fr>
18885 * src/LR0.c (new_state): Display `nstates' as the name of the
18886 newly created state.
18887 Adjust to initialize first_state and last_state if needed.
18888 Be sure to distinguish the initial from the final state.
18889 (new_states): Create the itemset of the initial state, and use
18891 * src/closure.c (closure): Now that the initial state has its
18892 items properly set, there is no need for a special case when
18893 creating `ruleset'.
18895 As a result, now the rule 0, reducing to $axiom, is visible in the
18896 outputs. Adjust the test suite.
18898 * tests/conflicts.at (Solved SR Conflicts)
18899 (Unresolved SR Conflicts): Adjust.
18900 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18901 * tests/conflicts.at (S/R in initial): New.
18903 2002-04-07 Akim Demaille <akim@epita.fr>
18905 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18906 the RHS of the rules.
18907 * src/output.c (output_gram): Likewise.
18909 2002-04-07 Akim Demaille <akim@epita.fr>
18911 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18913 Adjust all dependencies.
18914 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18915 `number' of the buckets too.
18916 * src/gram.h: Include `symtab.h'.
18917 (associativity): Move to...
18918 * src/symtab.h: here.
18919 No longer include `gram.h'.
18921 2002-04-07 Akim Demaille <akim@epita.fr>
18923 * src/gram.h, src/gram.c (rules_rhs_length): New.
18924 (ritem_longest_rhs): Use it.
18925 * src/gram.h (rule_t): `number' is a new member.
18926 * src/reader.c (packgram): Set it.
18927 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18928 the end of `rules', and count them out of `nrules'.
18929 (reduce_output, dump_grammar): Adjust.
18930 * src/print.c (print_grammar): It is no longer needed to check for
18931 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18932 * tests/reduce.at (Reduced Automaton): New test.
18934 2002-04-07 Akim Demaille <akim@epita.fr>
18936 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18937 lacking `+ 1' to nrules, Bison reported as useless a token if it
18938 was used solely to set the precedence of the last rule...
18940 2002-04-07 Akim Demaille <akim@epita.fr>
18942 * data/bison.c++, data/bison.simple: Don't output the current file
18943 name in #line, to avoid useless diffs between two identical
18944 outputs under different names.
18946 2002-04-07 Akim Demaille <akim@epita.fr>
18948 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18949 Normalize loops to using `< nrules + 1', not `<= nrules'.
18951 2002-04-07 Akim Demaille <akim@epita.fr>
18955 2002-04-07 Akim Demaille <akim@epita.fr>
18957 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18958 bucket.value as bucket.number.
18960 2002-04-07 Akim Demaille <akim@epita.fr>
18962 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18963 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18964 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18965 RHS, instead of being an index in RITEMS.
18967 2002-04-04 Paul Eggert <eggert@twinsun.com>
18969 * doc/bison.texinfo: Update copyright date.
18970 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18971 (Symbols): Warn about running Bison in one character set,
18972 but compiling and/or running in an incompatible one.
18973 Warn about character code 256, too.
18975 2002-04-03 Paul Eggert <eggert@twinsun.com>
18977 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18978 YYERROR_VERBOSE is nonzero, not whether it is defined.
18980 Merge changes from bison-1_29-branch.
18982 2002-03-20 Paul Eggert <eggert@twinsun.com>
18984 Merge fixes from Debian bison_1.34-1.diff.
18986 * configure.in (AC_PREREQ): 2.53.
18988 2002-03-20 Akim Demaille <akim@epita.fr>
18990 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18992 2002-03-19 Paul Eggert <eggert@twinsun.com>
18994 * src/bison.simple (YYCOPY): New macro.
18995 (YYSTACK_RELOCATE): Use it.
18996 Remove Type arg; no longer needed. All callers changed.
18997 (yymemcpy): Remove; no longer needed.
18999 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19000 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19002 2002-03-19 Akim Demaille <akim@epita.fr>
19004 Test and fix the #line outputs.
19006 * tests/atlocal.at (GCC): New.
19007 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
19008 (Prologue synch line, %union synch line, Postprologue synch line)
19009 (Action synch line, Epilogue synch line): New tests.
19010 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19011 * data/bison.simple, data/bison.c++: Use it.
19013 2002-03-19 Akim Demaille <akim@epita.fr>
19015 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19016 (Solved SR Conflicts, %expect not enough, %expect right)
19017 (%expect too much): Move to...
19018 * tests/conflicts.at: this new file.
19020 2002-03-19 Akim Demaille <akim@epita.fr>
19022 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19023 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19024 that we can move to enums for instance.
19025 * src/output.c (token_definitions_output): Output a list of
19026 `token-name, token-number' instead of the #define.
19027 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19029 2002-03-14 Akim Demaille <akim@epita.fr>
19031 Use Gettext 0.11.1.
19033 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
19035 * data/bison.c++: Make the user able to add members to the generated
19036 parser by subclassing.
19038 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
19040 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19042 Reported by Nicolas Tisserand and Nicolas Burrus.
19044 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19046 * src/reader.c: Warn about lacking semi-colons, do not complain.
19048 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19050 * data/bison.c++: Remove a debug line.
19052 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
19054 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19055 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19056 provide a default implementation.
19058 2002-03-04 Akim Demaille <akim@epita.fr>
19060 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19061 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19062 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19063 * tests/semantic.at (Parsing Guards): Similarly.
19064 * src/reader.at (readgram): Complain if the last rule is not ended
19067 2002-03-04 Akim Demaille <akim@epita.fr>
19069 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19070 * src/closure.c: here.
19071 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19073 * src/warshall.h, src/warshall.c: Remove.
19074 * tests/sets.at (Broken Closure): Adjust.
19076 2002-03-04 Akim Demaille <akim@epita.fr>
19078 * src/output.c (output_skeleton): tempdir is const.
19079 bytes_read is unused.
19081 2002-03-04 Akim Demaille <akim@epita.fr>
19083 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19084 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19086 From Michael Hayes.
19088 2002-03-04 Akim Demaille <akim@epita.fr>
19090 * src/closure.c (closure): `r' is unused.
19092 2002-03-04 Akim Demaille <akim@epita.fr>
19094 * tests/sets.at (Broken Closure): Add the ending `;'.
19095 * src/reader.at (readgram): Complain if a rule is not ended with a
19098 2002-03-04 Akim Demaille <akim@epita.fr>
19100 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
19101 (count_sr_conflicts): Use bitset_count.
19102 * src/reduce.c (inaccessable_symbols): Ditto.
19103 (bits_size): Remove.
19104 * src/warshall.h, src/warshall.c: Convert to bitsetv.
19106 2002-03-04 Akim Demaille <akim@epita.fr>
19108 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
19109 * src/reduce.c: Remove the `bitset_zero's following the
19110 `bitset_create's, as now it is performed by the latter.
19112 2002-03-04 Akim Demaille <akim@epita.fr>
19114 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
19115 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
19116 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
19117 latest sources from Michael.
19119 2002-03-04 Akim Demaille <akim@epita.fr>
19121 * src/output.c (output): Don't free the grammar.
19122 * src/reader.c (grammar_free): New.
19123 * src/main.c (main): Call it and don't free symtab here.
19125 2002-03-04 Akim Demaille <akim@epita.fr>
19127 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
19129 Reported by Benoit Perrot.
19131 2002-03-04 Akim Demaille <akim@epita.fr>
19133 Use bitset operations when possible, not loops over bits.
19135 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
19137 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
19138 * src/reduce.c (useless_nonterminals): Formatting changes.
19139 * src/warshall.c (TC): Use bitset_or.
19141 2002-03-04 Akim Demaille <akim@epita.fr>
19143 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
19144 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
19147 2002-03-04 Akim Demaille <akim@epita.fr>
19149 * src/lalr.c (F): Now a bitset*.
19150 Adjust all dependencies.
19152 2002-03-04 Akim Demaille <akim@epita.fr>
19154 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
19155 Adjust all dependencies.
19157 2002-03-04 Akim Demaille <akim@epita.fr>
19159 * src/L0.c, src/LR0.h (nstates): Be size_t.
19160 Adjust comparisons (signed vs unsigned).
19161 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
19163 Adjust all dependencies.
19165 2002-03-04 Akim Demaille <akim@epita.fr>
19167 * src/closure.c (firsts): Now, also a bitset.
19168 Adjust all dependencies.
19169 (varsetsize): Remove, now unused.
19170 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
19172 2002-03-04 Akim Demaille <akim@epita.fr>
19174 * src/print.c: Convert to use bitset.h, not hand coded iterations
19177 2002-03-04 Akim Demaille <akim@epita.fr>
19179 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
19181 2002-03-04 Akim Demaille <akim@epita.fr>
19183 * src/closure.c (ruleset): Be a bitset.
19184 (rulesetsize): Remove.
19186 2002-03-04 Akim Demaille <akim@epita.fr>
19188 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19189 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
19190 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
19191 * src/closure.c (fderives): Be an array of bitsets.
19193 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
19195 * data/bison.c++: Merge the two generated headers. Insert a copyright
19196 notice in each output file.
19198 2002-02-28 Akim Demaille <akim@epita.fr>
19200 * data/bison.c++: Copy the prologue of bison.simple to fetch
19201 useful M4 definitions, such as b4_header_guard.
19203 2002-02-25 Akim Demaille <akim@epita.fr>
19205 * src/getargs.c (version): Give the name of the authors, and use a
19206 translator friendly scheme for the bgr
19209 2002-02-25 Akim Demaille <akim@epita.fr>
19211 * src/output.c (header_output): Remove, now handled completely via
19214 2002-02-25 Akim Demaille <akim@epita.fr>
19216 * m4/m4.m4: New, from CVS Autoconf.
19217 * configure.in: Invoke it.
19218 * src/output.c (output_skeleton): Use its result instead of the
19221 2002-02-25 Akim Demaille <akim@epita.fr>
19223 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
19225 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
19226 * src/output.c (output_skeleton): Use mkstemp to create a real
19228 Move the filling of `skeleton' and its muscle to...
19230 (output): Move the definition of the prologue muscle to...
19232 * src/system.h (DEFAULT_TMPDIR): New.
19234 2002-02-14 Paul Eggert <eggert@twinsun.com>
19236 Remove the support for C++ namespace cleanliness; it was
19237 causing more problems than it was curing, since it didn't work
19238 properly on some nonstandard C++ compilers. This can wait
19239 for a proper C++ parser.
19241 * NEWS: Document this.
19242 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
19243 of C++, as it's treated like C now.
19244 * src/bison.simple (YYSTD): Remove.
19245 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
19246 Treat C++ just like Standard C instead of trying to support
19247 namespace cleanliness.
19249 2002-02-14 Akim Demaille <akim@epita.fr>
19251 * tests/regression.at (else): Adjust to Andreas' change.
19253 2002-02-14 Akim Demaille <akim@epita.fr>
19255 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
19257 2002-02-13 Andreas Schwab <schwab@suse.de>
19259 * src/output.c (output_rule_data): Don't output NULL, it might
19260 not be defined yet.
19262 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
19264 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
19265 (Copyright notice): Update.
19267 2002-02-11 Akim Demaille <akim@epita.fr>
19269 * tests/regression.at (%nonassoc and eof): Don't include
19270 nonportable headers.
19272 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
19274 * data/bison.c++: Correct error recovery. Make the user able to
19275 initialize the starting location.
19277 2002-02-07 Akim Demaille <akim@epita.fr>
19279 * tests/input.at: New.
19281 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19283 * data/bison.c++: Replace some direct m4 expansions by constants. Be
19284 more consistent when naming methods and variables. Put preprocessor
19285 directives around tables only needed for debugging.
19287 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19289 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
19291 (yy::b4_name::parse): Use print_.
19293 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19295 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
19297 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
19299 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
19301 (yy::b4_name::parse): Build verbose error messages, and use error_.
19303 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19305 * data/bison.c++: Fix m4 quoting in comments.
19307 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
19309 * data/bison.c++: Adjust the parser code. Fix some muscles that were
19310 not expanded by m4.
19312 2002-02-05 Akim Demaille <akim@epita.fr>
19314 * data/bison.c++: Adjust to the M4 back end.
19315 More is certainly needed.
19317 2002-02-05 Akim Demaille <akim@epita.fr>
19319 Give a try to M4 as a back end.
19321 * lib/readpipe.c: New, from wdiff.
19322 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
19324 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
19325 specific values. Now it is m4 that performs the lookup.
19326 * src/parse-skel.y: Remove.
19327 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
19328 * src/output.c (actions_output, guards_output)
19329 (token_definitions_output): No longer keeps track of the output
19330 line number, hence remove the second argument.
19331 (guards_output): Check against the guard member of a rule, not the
19334 (output_skeleton): Don't look for the skeleton location, let m4 do
19336 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
19338 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
19339 (prepare): Given that for the time being changesyntax is not
19340 usable in M4, rename the muscles using `-' to `_'.
19341 Define `defines_flag', `output_parser_name' and `output_header_name'.
19342 * src/output.h (actions_output, guards_output)
19343 (token_definitions_output): Adjust prototypes.
19344 * src/scan-skel.l: Instead of scanning the skeletons, it now
19345 processes the output of m4: `__oline__' and `#output'.
19346 * data/bison.simple: Adjust to be used by M4(sugar).
19347 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
19349 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
19350 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
19351 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
19352 shamelessly stolen from CVS Autoconf.
19354 2002-02-05 Akim Demaille <akim@epita.fr>
19356 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
19357 * configure.in: Check for the declarations of free and malloc.
19358 * src/muscle_tab.c: Adjust.
19360 2002-02-05 Akim Demaille <akim@epita.fr>
19362 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
19363 which have no values.
19365 2002-02-05 Akim Demaille <akim@epita.fr>
19367 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
19370 2002-01-29 Paul Eggert <eggert@twinsun.com>
19372 * src/bison.simple (YYSIZE_T): Do not define merely because
19373 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
19374 On some platforms, <alloca.h> does not declare YYSTD (size_t).
19376 2002-01-27 Akim Demaille <akim@epita.fr>
19378 Fix `%nonassoc and eof'.
19380 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
19381 which were not properly copied! Replace
19382 memcpy (res->errs, src->errs, src->nerrs);
19384 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
19386 * tests/regression.at (%nonassoc and eof): Adjust to newest
19387 Autotest: `.' is not in the PATH.
19389 2002-01-27 Akim Demaille <akim@epita.fr>
19391 * tests/sets.at (AT_EXTRACT_SETS): New.
19392 (Nullable): Use it.
19395 2002-01-26 Akim Demaille <akim@epita.fr>
19397 * tests/actions.at, tests/calc.at, tests/headers.at,
19398 * tests/torture.at: Adjust to the newest Autotest which no longer
19399 forces `.' in the PATH.
19401 2002-01-25 Akim Demaille <akim@epita.fr>
19403 * tests/regression.at (%nonassoc and eof): New.
19404 Suggested by Robert Anisko.
19406 2002-01-24 Akim Demaille <akim@epita.fr>
19408 Bison dumps core when trying to complain about broken input files.
19409 Reported by Cris van Pelt.
19411 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
19412 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
19414 (Invalid inputs): Strengthen: exercise parse_percent_token.
19416 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
19418 * src/Makefile.am: Add bison.c++.
19419 * src/bison.c++: New skeleton.
19421 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
19425 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
19427 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
19429 2002-01-20 Marc Autret <marc@gnu.org>
19431 * src/files.c (compute_output_file_names): Fix
19433 2002-01-20 Marc Autret <marc@gnu.org>
19435 * tests/output.at: New test.
19436 * src/files.c (compute_base_names): Don't map extensions when
19437 the YACC flag is set, use defaults.
19438 Reported by Evgeny Stambulchik.
19440 2002-01-20 Marc Autret <marc@gnu.org>
19442 * src/system.h: Need to define __attribute__ away for non-GCC
19443 compilers as well (i.e., the vendor C compiler).
19444 Suggested by Albert Chin-A-Young.
19446 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
19448 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
19449 canonical definition.
19450 * src/system.h: Use the canonical definition for PARAMS (avoids
19451 a conflict with the macro from lib/hash.h).
19453 2002-01-11 Akim Demaille <akim@epita.fr>
19455 * configure.in: Use AC_FUNC_STRNLEN.
19456 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
19458 2002-01-09 Akim Demaille <akim@epita.fr>
19460 * src/files.c, src/files.h (output_infix): New.
19461 (tab_extension): Remove.
19462 (compute_base_names): Compute the former, drop the latter.
19463 * src/output.c (prepare): Insert the muscles `output-infix', and
19465 * src/parse-skel.y (string, string.1): New.
19466 (section.header): Use it.
19467 (section.yacc): Remove.
19468 (prefix): Remove too.
19469 * src/scan-skel.l: Adjust.
19470 * src/bison.simple, src/bison.hairy: Adjust.
19472 2002-01-09 Akim Demaille <akim@epita.fr>
19474 * configure.in (WERROR_CFLAGS): Compute it.
19475 * src/Makefile.am (CFLAGS): Pass it.
19476 * tests/atlocal.in (CFLAGS): Idem.
19477 * src/files.c: Fix a few warnings.
19478 (get_extension_index): Remove, unused.
19480 2002-01-08 Akim Demaille <akim@epita.fr>
19482 * src/getargs.c (AS_FILE_NAME): New.
19483 (getargs): Use it to convert DOSish file names.
19484 * src/files.c (base_name): Rename as full_base_name to avoid
19485 clashes with `base_name ()'.
19486 (filename_split): New.
19487 (compute_base_names): N-th rewrite, using filename_split.
19489 2002-01-08 Akim Demaille <akim@epita.fr>
19491 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
19492 New, stolen from the Fileutils 4.1.
19493 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19494 * configure.in: Check for the presence of memrchr, and of its
19497 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
19499 * lib/hash.h (__P): Added definition for this macro.
19500 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
19501 BUILT_SOURCES, to ensure they are generated first.
19502 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
19503 %error-verbose to allow bootstrapping with bison 1.30x.
19505 2002-01-06 Akim Demaille <akim@epita.fr>
19507 * src/reader.c (parse_braces): Don't fetch the next char, the
19508 convention is to fetch on entry.
19509 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
19510 'switch' without a following semicolon.
19511 * tests/regression.at (braces parsing): New.
19513 2002-01-06 Akim Demaille <akim@epita.fr>
19515 Bison is dead wrong in its RR conflict reports.
19517 * tests/torture.at (GNU Cim Grammar): New.
19518 * src/conflicts.c (count_rr_conflicts): Fix.
19520 2002-01-06 Akim Demaille <akim@epita.fr>
19522 Creating package.m4 from configure.ac causes too many problems.
19524 * tests/Makefile.am (package.m4): Create it by hand,
19525 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
19527 2002-01-06 Akim Demaille <akim@epita.fr>
19529 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
19532 2002-01-04 Paul Eggert <eggert@twinsun.com>
19534 * doc/bison.texinfo (Debugging):
19535 Remove YYSTDERR; it's no longer defined or used.
19536 Also, s/cstdio.h/cstdio/.
19538 2002-01-03 Akim Demaille <akim@epita.fr>
19540 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
19542 2002-01-03 Akim Demaille <akim@epita.fr>
19544 * src/parse-skel.y (process_skeleton): Don't bind the parser's
19545 tracing code to --trace, wait for a better --trace option, with
19548 2002-01-03 Akim Demaille <akim@epita.fr>
19550 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
19551 The ISO C++ standard is extremely clear about it: stderr is
19552 considered a macro, not a regular symbol (see table 94 `Header
19553 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19554 Therefore std:: does not apply to it. It still does with fprintf.
19555 Also, s/cstdio.h/cstdio/.
19557 2002-01-03 Akim Demaille <akim@epita.fr>
19559 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19560 for non system headers.
19562 2002-01-02 Akim Demaille <akim@epita.fr>
19564 Equip the skeleton chain with location tracking, runtime trace,
19565 pure parser and scanner.
19567 * src/parse-skel.y: Request a pure parser, locations, and prefix
19569 (%union): Having several members with the same type does not help
19570 type mismatches, simplify.
19571 (YYPRINT, yyprint): New.
19572 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19573 (skel_error): this.
19575 * src/scan-skel.l: Adjust to these changes.
19576 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19577 (LOCATION_PRINT, skel_control_t): New.
19579 2001-12-30 Akim Demaille <akim@epita.fr>
19581 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19582 replace `gb' with BLANKS.
19583 * src/scan-skel.l: Adjust.
19585 2001-12-30 Akim Demaille <akim@epita.fr>
19587 * src/system.h: We don't need nor want bcopy.
19588 Throw away MS-DOS crap: we don't need getpid.
19589 * configure.in: We don't need strndup. It was even causing
19590 problems: because Flex includes the headers *before* us,
19591 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19593 * lib/xstrndup.c: New.
19594 * src/scan-skel.l: Use it.
19595 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19596 * src/parse-skel.y: Use %directives instead of #defines.
19598 2001-12-30 Akim Demaille <akim@epita.fr>
19600 * src/skeleton.h: New.
19601 * src/output.c (output_parser, output_master_parser): Remove, dead
19603 * src/output.h (get_lines_number, actions_output, guards_output)
19604 (token_definitions_output): Prototype them.
19605 * src/parse-skel.y: Add the license notice.
19606 Include output.h and skeleton.h.
19607 (process_skeleton): Returns void, and takes a single parameter.
19608 * src/scan-skel.l: Add the license notice.
19609 Include skeleton.h.
19610 Don't use %option yylineno: it seems that then Flex imagines
19611 REJECT has been used, and therefore it won't reallocate its
19612 buffers (which makes no other sense to me than a bug). It results
19613 in warnings for `unused: yy_flex_realloc'.
19615 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19617 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19618 (MUSCLE_INSERT_PREFIX): ...to there.
19619 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19620 (MUSCLE_INSERT_PREFIX): Move from here...
19622 * src/bison.hairy: Add a section directive. Put braces around muscle
19623 names. This parser skeleton is still broken, but Bison should not
19624 choke on a bad muscle 'syntax'.
19625 * src/bison.simple: Add a section directive. Put braces around muscle
19628 * src/files.h (strsuffix, stringappend): Add declarations.
19629 (tab_extension): Add declaration.
19630 (short_base_name): Add declaration.
19632 * src/files.c (strsuffix, stringappend): No longer static. These
19633 functions are used in the skeleton parser.
19634 (tab_extension): New.
19635 (compute_base_names): Use the computations done in this function
19636 to guess if the generated parsers should have '.tab' in their
19638 (short_base_name): No longer static.
19640 * src/output.c (output_skeleton): New.
19641 (output): Disable call to output_master_parser, and give a try to
19642 a new skeleton handling system.
19643 (guards_output, actions_output): No longer static.
19644 (token_definitions_output, get_lines_number): No longer static.
19646 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19648 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19651 * src/parse-skel.y: New file.
19652 * src/scan-skel.l: New file.
19654 2001-12-29 Akim Demaille <akim@epita.fr>
19656 %name-prefix is broken.
19658 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19659 Adjust all dependencies.
19660 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19663 Renaming yylval but not yylloc is not consistent. Now we do.
19665 * src/bison.simple: Prefix yylloc if used.
19666 * doc/bison.texinfo (Decl Summary): Document that.
19668 2001-12-29 Akim Demaille <akim@epita.fr>
19670 * doc/bison.texinfo: Promote `%long-directive' over
19672 Remove all references to fixed-output-files, yacc is enough.
19674 2001-12-29 Akim Demaille <akim@epita.fr>
19676 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19677 user prologue. These are defaults.
19678 * tests/actions.at (Mid-rule actions): Make sure the user can
19679 define YYDEBUG and YYERROR_VERBOSE.
19681 2001-12-29 Akim Demaille <akim@epita.fr>
19683 * src/output.c (header_output): Don't forget to export YYLTYPE and
19685 * tests/headers.at (export YYLTYPE): New, make sure it does.
19686 * tests/regression.at (%union and --defines, Invalid CPP headers):
19688 * tests/headers.at: here.
19690 2001-12-29 Akim Demaille <akim@epita.fr>
19692 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19694 2001-12-29 Akim Demaille <akim@epita.fr>
19696 * tests/actions.at (Mid-rule actions): Output on a single line
19697 instead of several.
19699 2001-12-29 Akim Demaille <akim@epita.fr>
19701 * doc/bison.texinfo: Formatting changes.
19703 2001-12-29 Akim Demaille <akim@epita.fr>
19705 Don't store the token defs in a muscle, just be ready to output it
19706 on command. Now possible via `symbols'. Fixes a memory leak.
19708 * src/output.c (token_definitions_output): New.
19709 (output_parser, header_output): Use it.
19710 * src/reader.c (symbols_save): Remove.
19712 2001-12-29 Akim Demaille <akim@epita.fr>
19714 * src/bison.simple: Do not provide a default for YYSTYPE and
19715 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19718 2001-12-29 Akim Demaille <akim@epita.fr>
19720 Mid-rule actions are simply... ignored!
19722 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19723 the empty-rule associated to the dummy symbol, not to the host
19725 * tests/actions.at (Mid-rule actions): New.
19727 2001-12-29 Akim Demaille <akim@epita.fr>
19731 * src/reader.c (reader): Free grammar.
19733 2001-12-29 Akim Demaille <akim@epita.fr>
19737 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19738 since it allocates it for each state, although only one is needed.
19739 (allocate_storage): Do it here.
19741 2001-12-29 Akim Demaille <akim@epita.fr>
19743 * src/options.h, src/options.c (create_long_option_table): Rename
19745 (long_option_table_new): this, with a clearer prototype.
19746 (percent_table): Remove, unused,
19747 * src/getargs.c (getargs): Adjust.
19749 2001-12-29 Akim Demaille <akim@epita.fr>
19751 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19752 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19755 2001-12-29 Akim Demaille <akim@epita.fr>
19757 * src/lalr.c (build_relations): Rename `states' as `states1'.
19758 Sorry, I don't understand exactly what it is, no better name...
19760 2001-12-29 Akim Demaille <akim@epita.fr>
19762 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19763 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19764 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19767 2001-12-29 Akim Demaille <akim@epita.fr>
19769 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19772 2001-12-29 Akim Demaille <akim@epita.fr>
19774 * src/reader.c, src/reader.h (user_toknums): Remove.
19775 Adjust all users to use symbols[i]->user_token_number.
19777 2001-12-29 Akim Demaille <akim@epita.fr>
19779 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19780 Adjust all users to use symbols[i]->prec or ->assoc.
19782 2001-12-29 Akim Demaille <akim@epita.fr>
19784 * src/reader.c, src/reader.h (tags): Remove.
19785 Adjust all users to use symbols[i]->tag.
19787 2001-12-29 Akim Demaille <akim@epita.fr>
19789 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19791 * src/reader.c (packsymbols): Fill this table.
19793 * src/conflicts.c (resolve_sr_conflict): Adjust.
19794 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19796 Use symbols[i]->tag instead of tags[i].
19798 2001-12-29 Akim Demaille <akim@epita.fr>
19800 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19801 In addition, put a comment in there, to replace...
19802 * tests/regression.at (%union and C comments): Remove.
19804 2001-12-29 Akim Demaille <akim@epita.fr>
19806 * tests/regression.at (Web2c Actions): Blindly move the actual
19807 output as expected output. The contents *seem* right to me, but I
19808 can't pretend reading perfectly parser tables... Nonetheless, all
19809 the other tests pass correctly, the table look OK, even though the
19810 presence of `$axiom' is to be noted: AFAICS it is useless (but
19813 2001-12-29 Akim Demaille <akim@epita.fr>
19815 * src/reader.c (readgram): Don't add the rule 0 if there were no
19816 rules read. In other words, add it _after_ having performed
19817 grammar sanity checks.
19818 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19820 2001-12-29 Akim Demaille <akim@epita.fr>
19822 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19823 visible, and some states have now a different number.
19825 2001-12-29 Akim Demaille <akim@epita.fr>
19827 * src/reader.c (readgram): Bind the initial rule's lineno to that
19829 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19830 (Solved SR Conflicts): Adjust rule 0's line number.
19832 2001-12-29 Akim Demaille <akim@epita.fr>
19834 Fix the `GAWK Grammar' failure.
19836 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19837 the reductions of the first state which was mistakenly confused
19838 with the final state because precisely final_state was initialized
19840 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19841 now noticed by Bison.
19842 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19843 have a reduction on $default.
19845 2001-12-29 Akim Demaille <akim@epita.fr>
19847 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19849 * src/closure.c (print_closure): Likewise.
19850 * src/derives.c (print_derives): Likewise.
19851 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19854 2001-12-29 Akim Demaille <akim@epita.fr>
19856 * src/lalr.c (lookaheads_print): New.
19857 (lalr): Call it when --trace-flag.
19858 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19861 2001-12-29 Akim Demaille <akim@epita.fr>
19863 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19864 when walking through ritem, even via rule->rhs.
19865 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19866 (useful_production, useless_nonterminals): Likewise.
19867 (reduce_grammar_tables): Likewise, plus update nritems.
19868 * src/nullable.c (set_nullable): Likewise.
19869 * src/lalr.c (build_relations): Likewise.
19870 * tests/sets.at (Nullable): Adjust.
19871 Fortunately, now, the $axiom is no longer nullable.
19873 2001-12-29 Akim Demaille <akim@epita.fr>
19875 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19877 * src/gram.c (ritem_longest_rhs): Likewise.
19878 * src/reduce.c (nonterminals_reduce): Likewise.
19879 * src/print_graph.c (print_graph): Likewise.
19880 * src/output.c (output_rule_data): Likewise.
19881 * src/nullable.c (set_nullable): Likewise.
19883 2001-12-29 Akim Demaille <akim@epita.fr>
19885 * src/output.c: Comment changes.
19887 2001-12-27 Paul Eggert <eggert@twinsun.com>
19889 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19890 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19891 Sparc, as they were causing more porting problems than the
19892 (minor) performance improvement was worth.
19894 Also, catch up with 1.31's YYSTD.
19896 2001-12-27 Akim Demaille <akim@epita.fr>
19898 * src/output.c (output_gram): Rely on nritems, not the
19899 0-sentinel. See below.
19900 Use -1 as separator, not 0.
19901 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19902 Rely on -1 as separator in yyrhs, instead of 0.
19903 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19904 twice `Now at end of input', therefore there are two lines less to
19907 2001-12-27 Akim Demaille <akim@epita.fr>
19909 * tests/regression.at (Unresolved SR Conflicts):
19910 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19913 2001-12-27 Akim Demaille <akim@epita.fr>
19915 * src/LR0.c (new_state): Recognize the final state by the fact it
19916 is reached by eoftoken.
19917 (insert_start_shifting_state, insert_eof_shifting_state)
19918 (insert_accepting_state, augment_automaton): Remove, since now
19919 these states are automatically computed from the initial state.
19920 (generate_states): Adjust.
19921 * src/print.c: When reporting a rule number to the user, substract
19922 1, so that the axiom rule is rule 0, and the first user rule is 1.
19923 * src/reduce.c: Likewise.
19924 * src/print_graph.c (print_core): For the time being, just as for
19925 the report, depend upon --trace-flags to dump the full set of
19927 * src/reader.c (readgram): Once the grammar read, insert the rule
19928 0: `$axiom: START-SYMBOL $'.
19929 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19930 number of the states has changed (the final state is no longer
19931 necessarily the last), catch up.
19933 2001-12-27 Akim Demaille <akim@epita.fr>
19935 Try to make the use of the eoftoken valid. Given that its value
19936 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19937 is used instead of > 0 where appropriate, (ii), depend upon nritems
19938 instead of the 0-sentinel.
19940 * src/gram.h, src/gram.c (nritems): New.
19941 Expected to be duplication of nitems, but for the time being...
19942 * src/reader.c (packgram): Assert nritems and nitems are equal.
19943 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19944 * src/closure.c (print_closure, print_fderives): Likewise.
19945 * src/gram.c (ritem_print): Likewise.
19946 * src/print.c (print_core, print_grammar): Likewise.
19947 * src/print_graph.c: Likewise.
19949 2001-12-27 Akim Demaille <akim@epita.fr>
19951 * src/main.c (main): If there are complains after grammar
19952 reductions, then output the report anyway if requested, then die.
19953 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19954 * src/reader.c (eoftoken): New.
19955 (parse_token_decl): If the token being defined has value `0', it
19957 (packsymbols): No longer hack `tags' to insert `$' by hand.
19958 Be sure to preserve the value of the eoftoken.
19959 (reader): Make sure eoftoken is defined.
19960 Initialize nsyms to 0: now eoftoken is created just like the others.
19961 * src/print.c (print_grammar): Don't special case the eof token.
19962 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19963 lie anyway, albeit pleasant.
19964 * tests/calc.at: Exercise error messages with eoftoken.
19965 Change the grammar so that empty input is invalid.
19966 Adjust expectations.
19967 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19969 2001-12-27 Akim Demaille <akim@epita.fr>
19971 * configure.in: Check the protos of strchr ans strspn.
19972 Replace strchr if needed.
19973 * src/system.h: Provide the protos of strchr, strspn and memchr if
19975 * lib/strchr.c: New.
19976 * src/reader.c (symbols_save): Use strchr.
19978 2001-12-27 Akim Demaille <akim@epita.fr>
19980 * src/print.c, src/print_graph.c (escape): New.
19981 Use it to quote the TAGS outputs.
19982 * src/print_graph.c (print_state): Now errors are in red, and
19983 reductions in green.
19984 Prefer high to wide: output the state number on a line of its own.
19986 2001-12-27 Akim Demaille <akim@epita.fr>
19988 * src/state.h, src/state.c (reductions_new): New.
19989 * src/LR0.c (set_state_table): Let all the states have a
19990 `reductions', even if reduced to 0.
19991 (save_reductions): Adjust.
19992 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19993 * src/print.c (print_reductions, print_actions): Adjust.
19994 * src/output.c (action_row): Adjust.
19996 2001-12-27 Akim Demaille <akim@epita.fr>
19998 * src/state.h, src/state.c (errs_new, errs_dup): New.
19999 * src/LR0.c (set_state_table): Let all the states have an errs,
20000 even if reduced to 0.
20001 * src/print.c (print_errs, print_reductions): Adjust.
20002 * src/output.c (output_actions, action_row): Adjust.
20003 * src/conflicts.c (resolve_sr_conflict): Adjust.
20005 2001-12-27 Akim Demaille <akim@epita.fr>
20007 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20009 2001-12-27 Akim Demaille <akim@epita.fr>
20011 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20012 * src/print.c: here.
20013 (lookaheadset, shiftset): New, used as additional storage by
20015 (print_results): Adjust.
20016 (print_shifts, print_gotos, print_errs): New, extracted from...
20017 (print_actions): here.
20018 * src/print_graph.c (print_actions): Remove dead code.
20020 2001-12-27 Akim Demaille <akim@epita.fr>
20022 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20025 2001-12-27 Akim Demaille <akim@epita.fr>
20027 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20028 (build_relations): Adjust.
20030 2001-12-27 Akim Demaille <akim@epita.fr>
20032 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20035 2001-12-27 Akim Demaille <akim@epita.fr>
20037 * src/reader.c (packgram): Catch nitems overflows.
20039 2001-12-27 Akim Demaille <akim@epita.fr>
20041 * src/files.c, src/files.h (guard_obstack): Remove.
20042 * src/output.c (output): Adjust.
20043 * src/reader.c (parse_braces): New, factoring...
20044 (copy_action, copy_guard): these two which are renamed as...
20045 (parse_action, parse_guard): these.
20046 As a voluntary consequence, using braces around guards is now
20049 2001-12-27 Akim Demaille <akim@epita.fr>
20051 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20052 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20054 (symbol_list_new): Adjust.
20055 (copy_action): action_line is the first line, not the last.
20056 (copy_guard): Just as for actions, store the `action' only, not
20057 the switch/case/break flesh.
20058 Don't parse the user action that might follow the guard, let...
20059 (readgram): do it, i.e., now, there can be an action after a
20061 In other words the guard is just explicitly optional.
20062 (packgram): Adjust.
20063 * src/output.c (guards_output): New.
20064 (output_parser): Call it when needed.
20065 (output): Also free the guard and attrs obstacks.
20066 * src/files.c, src/files.h (obstack_save): Remove.
20067 (output_files): Remove.
20068 As a result, if one needs the former `.act' file, using an
20069 appropriate skeleton which requires actions and guards is now
20071 * src/main.c (main): Adjust.
20072 * tests/semantic.at: New.
20073 * tests/regression.at: Use `input.y' as input file name.
20074 Avoid 8+3 problems by requiring input.c when the test needs the
20077 2001-12-27 Akim Demaille <akim@epita.fr>
20079 * src/reader.c (symbol_list_new): Be sure to initialize all the
20082 2001-12-27 Akim Demaille <akim@epita.fr>
20084 All the hacks using a final pseudo state are now useless.
20086 * src/LR0.c (set_state_table): state_table holds exactly nstates.
20087 * src/lalr.c (nLA): New.
20088 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
20089 instead of lookaheadsp from the pseudo state (nstate + 1).
20091 2001-12-27 Akim Demaille <akim@epita.fr>
20093 * src/output.c (action_row, token_actions): Use a state_t instead
20094 of a integer, and nlookaheads instead of the following state's
20097 2001-12-27 Akim Demaille <akim@epita.fr>
20099 * src/conflicts.c (log_resolution, flush_shift)
20100 (resolve_sr_conflict, set_conflicts, solve_conflicts)
20101 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
20102 (conflicts_print, print_reductions): Use a state_t instead of an
20103 integer when referring to a state.
20104 As much as possible, depend upon nlookaheads, instead of the
20105 `lookaheadsp' member of the following state (since lookaheads of
20106 successive states are successive, the difference between state n + 1
20107 and n served as the number of lookaheads for state n).
20108 * src/lalr.c (add_lookback_edge): Likewise.
20109 * src/print.c (print_core, print_actions, print_state)
20110 (print_results): Likewise.
20111 * src/print_graph.c (print_core, print_actions, print_state)
20112 (print_graph): Likewise.
20113 * src/conflicts.h: Adjust.
20115 2001-12-27 Akim Demaille <akim@epita.fr>
20117 * src/bison.hairy: Formatting/comment changes.
20119 Remove `register' indications.
20120 Add plenty of `static'.
20122 2001-12-27 Akim Demaille <akim@epita.fr>
20124 * src/output.c (prepare): Drop the muscle `ntbase' which
20125 duplicates ntokens.
20126 * src/bison.simple: Formatting/comment changes.
20127 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
20128 is an undocumented synonym.
20130 2001-12-22 Akim Demaille <akim@epita.fr>
20132 * src/output.c (output_table_data): Change the prototype to use
20133 `int' for array ranges: some invocations do pass an int, not a
20135 Reported by Wayne Green.
20137 2001-12-22 Akim Demaille <akim@epita.fr>
20139 Some actions of web2c.y are improperly triggered.
20140 Reported by Mike Castle.
20142 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
20143 * tests/regression.at (Web2c): Rename as...
20144 (Web2c Report): this.
20145 (Web2c Actions): New.
20147 2001-12-22 Akim Demaille <akim@epita.fr>
20149 Reductions in web2c.y are improperly reported.
20150 Reported by Mike Castle.
20152 * src/conflicts.c (print_reductions): Fix.
20153 * tests/regression.at (Web2c): New.
20155 2001-12-18 Akim Demaille <akim@epita.fr>
20157 Some host fail on `assert (!"foo")', which expands to
20158 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
20159 Reported by Nelson Beebee.
20161 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
20162 `#define it_succeeded 0' and `assert (it_succeeded)'.
20164 2001-12-17 Marc Autret <autret_m@epita.fr>
20166 * src/bison.simple: Don't hard code the skeleton line and filename.
20167 * src/output.c (output_parser): Rename 'line' as 'output_line'.
20168 New line counter 'skeleton_line' (skeleton-line muscle).
20170 2001-12-17 Paul Eggert <eggert@twinsun.com>
20172 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
20173 YYDEBUG must be defined to a nonzero value.
20175 * src/bison.simple (yytname): Do not assume that the user defines
20176 YYDEBUG to a properly parenthesized expression.
20178 2001-12-17 Akim Demaille <akim@epita.fr>
20180 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
20181 nlookaheads is a new member.
20183 * src/lalr.h (nlookaheads): Remove this orphan declaration.
20184 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
20187 2001-12-17 Akim Demaille <akim@epita.fr>
20189 * src/files.h, src/files.c (open_files, close_files): Remove.
20190 * src/main.c (main): Don't open/close files, nor invoke lex_free,
20192 * src/reader.c (reader): Do it.
20194 2001-12-17 Akim Demaille <akim@epita.fr>
20196 * src/conflicts.c (print_reductions): Formatting changes.
20198 2001-12-17 Akim Demaille <akim@epita.fr>
20200 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
20201 (flush_reduce): New.
20202 (resolve_sr_conflict): Adjust.
20204 2001-12-17 Akim Demaille <akim@epita.fr>
20206 * src/output.c (output_obstack): Be static and rename as...
20207 (format_obstack): this, to avoid any confusion with files.c's
20209 * src/reader.h (muscle_obstack): Move to...
20210 * src/output.h: here, since it's defined in output.c.
20212 2001-12-17 Akim Demaille <akim@epita.fr>
20214 * src/output.c (action_row, save_column, default_goto)
20215 (sort_actions, matching_state, pack_vector): Better variable
20218 2001-12-17 Akim Demaille <akim@epita.fr>
20220 * src/output.c: Various formatting changes.
20222 2001-12-17 Akim Demaille <akim@epita.fr>
20224 * src/files.c (output_files): Free the output_obstack.
20225 * src/main.c (main): Call print and print_graph conditionally.
20226 * src/print.c (print): Work unconditionally.
20227 * src/print_graph.c (print_graph): Work unconditionally.
20228 * src/conflicts.c (log_resolution): Output only if verbose_flag.
20230 2001-12-16 Marc Autret <autret_m@epita.fr>
20232 * src/output.c (actions_output): Fix. When we use %no-lines,
20233 there is one less line per action.
20235 2001-12-16 Marc Autret <autret_m@epita.fr>
20237 * src/bison.simple: Remove a useless #line directive.
20238 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
20239 * src/output.c (get_lines_number): New.
20240 (output_parser): Adjust, now takes care about the lines of a
20242 Fix line numbering.
20243 (actions_output): Computes the number of lines taken by actions.
20244 (output_master_parser): Insert new skeleton which is the name of
20245 the output parser file name.
20247 2001-12-15 Marc Autret <autret_m@epita.fr>
20249 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
20251 2001-12-15 Marc Autret <autret_m@epita.fr>
20253 * src/output.c (output_gram): Keep track of the hairy one.
20255 2001-12-15 Akim Demaille <akim@epita.fr>
20257 Make `make distcheck' work.
20259 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
20260 system.h which uses libgettext.h.
20262 2001-12-15 Akim Demaille <akim@epita.fr>
20264 * src/nullable.c (set_nullable): Useless rules must be skipped,
20265 otherwise, since we range over their symbols, we might look at a
20266 nonterminal which no longer ``exists'', i.e., it is not counted in
20267 `nvars', hence we overflow our arrays.
20269 2001-12-15 Akim Demaille <akim@epita.fr>
20271 The header can also be produced directly, without any obstack!
20274 * src/files.c, src/files.h (defines_obstack): Remove.
20275 (compute_header_macro): Global.
20276 (defines_obstack_save): Remove.
20277 * src/reader.c (parse_union_decl): No longer output to
20278 defines_obstack: its content can be found in the `stype' muscle
20280 (output_token_translations): Merge into...
20281 (symbols_output): this.
20283 (symbols_save): this.
20285 * src/output.c (header_output): New.
20288 2001-12-15 Akim Demaille <akim@epita.fr>
20290 * src/reader.c (parse_union_decl): Instead of handling two obstack
20291 simultaneously, use one to define the `stype' muscle, and use the
20292 value of the latter to fill defines_obstack.
20293 (copy_comment): Remove.
20294 (copy_comment2): Work for a single obstack.
20296 (copy_comment): this.
20298 2001-12-15 Akim Demaille <akim@epita.fr>
20300 * src/lex.c, src/lex.h (xgetc): No longer static.
20301 * src/reader.c (parse_union_decl): Revamp.
20303 2001-12-15 Akim Demaille <akim@epita.fr>
20305 Still making progress in separating Bison into (i) input, (ii)
20306 process, (iii) output: now we can directly output the parser file
20307 without using table_obstack at all.
20309 * src/files.c, src/files.h (table_obstack): Bye bye.
20310 (parser_file_name): New.
20311 * src/files.c (compute_output_file_names): Compute it.
20312 * src/output.c (actions_output, output_parser)
20313 (output_master_parser): To a file instead of an obstack.
20315 2001-12-15 Akim Demaille <akim@epita.fr>
20317 Attach actions to rules, instead of pre-outputting them to
20320 * src/gram.h (rule_t): action and action_line are new members.
20321 * src/reader.c (symbol_list): Likewise.
20322 (copy_action): Save the actions within the rule.
20323 (packgram): Save them in rule_table.
20324 * src/output.c (actions_output): New.
20325 (output_parser): Use it on `%%actions'.
20326 (output_rule_data): Don't free rule_table.
20328 (prepare): Don't save the `action' muscle.
20329 * src/bison.simple: s/%%action/%%actions/.
20331 2001-12-15 Akim Demaille <akim@epita.fr>
20333 * src/reader.c (copy_action): When --yacc, don't append a `;'
20334 to the user action: let it fail if lacking.
20335 Suggested by Arnold Robbins and Tom Tromey.
20337 2001-12-14 Akim Demaille <akim@epita.fr>
20339 * src/lex.c (literalchar): Simply return the char you decoded, non
20340 longer mess around with obstacks and int pointers.
20341 Adjust all callers.
20343 2001-12-14 Akim Demaille <akim@epita.fr>
20345 * src/lex.c (literalchar): Don't escape the special characters,
20346 just decode them, and keep them as char (before, eol was output as
20347 the 2 char string `\n' etc.).
20348 * src/output.c (output_rule_data): Use quotearg to output the
20351 2001-12-13 Paul Eggert <eggert@twinsun.com>
20353 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
20354 Do not infringe on the global user namespace when using C++.
20355 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
20356 All uses of `fprintf' and `stderr' changed.
20358 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
20360 2001-12-13 Akim Demaille <akim@epita.fr>
20362 The computation of nullable is broken: it doesn't handle empty
20365 * tests/torture.at (GNU AWK Grammar): New.
20366 * tests/sets.at (Nullable): New.
20367 * src/nullable.c (set_nullable): Instead of blindly looping over
20368 `ritems', loop over the rules, and then over their rhs's.
20370 Work around Autotest bugs.
20372 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
20373 frame, because Autotest understand lines starting with a `+' as
20374 traces from the shell. Then, they are not processed properly.
20375 Admittedly an Autotest bug, but we don't have time to wait for
20376 Autotest to catch up.
20377 * tests/regression.at (Broken Closure): Adjust to the new table
20380 * tests/sets.at: here.
20382 2001-12-13 Akim Demaille <akim@epita.fr>
20384 * src/closure.c (closure): Use nrules instead of playing tricks
20385 with BITS_PER_WORD.
20387 2001-12-13 Akim Demaille <akim@epita.fr>
20389 * src/print.c (print_actions): Output the handling of `$' as the
20390 traces do: shifting the token EOF. Before EOF was treated as a
20392 * tests/regression.at: Adjust some tests.
20393 * src/print_graph.c (print_core): Complete the set of items via
20394 closure. The next-to-final and final states are still unsatisfying,
20395 but that's to be addressed elsewhere.
20396 No longer output the rule numbers, but do output the state number.
20397 A single loop for the shifts + gotos is enough, but picked a
20398 distinct color for each.
20399 (print_graph): Initialize and finalize closure.
20401 2001-12-13 Akim Demaille <akim@epita.fr>
20403 * src/reader.c (readgram): Remove dead code, an strip useless
20405 (get_type): Remove, unused.
20407 2001-12-12 Akim Demaille <akim@epita.fr>
20409 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
20410 on that of lib/error.c.
20412 2001-12-12 Akim Demaille <akim@epita.fr>
20414 Some hosts don't like `/' in includes.
20416 * src/system.h: Include libgettext.h without qualifying the path.
20417 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
20420 2001-12-11 Marc Autret <autret_m@epita.fr>
20422 * src/output.c (output_parser): Remove useless muscle.
20424 2001-12-11 Marc Autret <autret_m@epita.fr>
20426 * src/bison.simple: Remove #line just before %%epilogue. It
20427 is now handled in ...
20428 * src/reader.c (read_additionnal_code): Add the output of a
20429 #line for the epilogue.
20431 2001-12-10 Marc Autret <autret_m@epita.fr>
20433 * src/reader.c (copy_definition): Re-use CPP-outed code which
20434 replace precedent remove.
20435 * src/bison.simple: Remove #line before %%prologue because
20436 %%input-line is wrong at this time.
20438 2001-12-10 Marc Autret <autret_m@epita.fr>
20440 * src/reader.c (symbols_output): Clean up.
20441 * src/output.c (output_gram, output): Clean up.
20443 2001-12-10 Akim Demaille <akim@epita.fr>
20445 * src/lalr.c (initialize_lookaheads): New. Extracted from...
20446 * src/LR0.c (set_state_table): here.
20447 * src/lalr.c (lalr): Call it.
20449 2001-12-10 Akim Demaille <akim@epita.fr>
20451 * src/state.h (shifts): Remove the `number' member: shifts are
20452 attached to state, hence no longer need to be labelled with a
20455 2001-12-10 Akim Demaille <akim@epita.fr>
20457 Now that states have a complete set of members, the linked list of
20458 shifts is useless: just fill directly the state's shifts member.
20460 * src/state.h (shifts): Remove the `next' member.
20461 * src/LR0.c (first_state, last_state): Remove.
20462 Adjust the callers.
20463 (augment_automaton): Don't look for the shifts that must be added
20464 a shift on EOF: it is those of the state we looked for! But now,
20465 since shifts are attached, it is no longer needed to looking
20466 merely by its id: its number.
20468 2001-12-10 Akim Demaille <akim@epita.fr>
20470 * src/LR0.c (augment_automaton): Better variable locality.
20471 Remove an impossible branch: if there is a state corresponding to
20472 the start symbol being shifted, then there is shift for the start
20473 symbol from the initial state.
20475 2001-12-10 Akim Demaille <akim@epita.fr>
20477 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
20478 only when appropriate: when insert_start_shifting_state' is not
20480 * tests/regression.at (Rule Line Numbers): Adjust.
20482 2001-12-10 Akim Demaille <akim@epita.fr>
20484 * src/LR0.c (augment_automaton): Now that all states have shifts,
20485 merge the two cases addition shifts to the initial state.
20487 2001-12-10 Akim Demaille <akim@epita.fr>
20489 * src/lalr.c (set_state_table): Move to...
20491 * src/lalr.c (lalr): Don't call it...
20492 * src/LR0.c (generate_states): do it.
20493 * src/LR0.h (first_state): Remove, only the table is used.
20495 2001-12-10 Akim Demaille <akim@epita.fr>
20497 * src/LR0.h (first_shift, first_reduction): Remove.
20498 * src/lalr.c: Don't use first_shift: find shifts through the
20501 2001-12-10 Akim Demaille <akim@epita.fr>
20503 * src/LR0.c: Attach shifts to states as soon as they are
20505 * src/lalr.c (set_state_table): Instead of assigning shifts to
20506 state, just assert that the mapping was properly done.
20508 2001-12-10 Akim Demaille <akim@epita.fr>
20510 * src/LR0.c (insert_start_shift): Rename as...
20511 (insert_start_shifting_state): this.
20512 (insert_eof_shifting_state, insert_accepting_state): New.
20513 (augment_automaton): Adjust.
20514 Better locality of the variables.
20515 When looking if the start_symbol is shifted from the initial
20516 state, using `while (... symbol != start_symbol ...)' sounds
20517 better than `while (... symbol < start_symbol ...)': If fail
20518 to see how the order between symbols could be relevant!
20520 2001-12-10 Akim Demaille <akim@epita.fr>
20522 * src/getargs.h: Don't declare `spec_name_prefix' and
20523 `spec_file_prefix', declared by src/files.h.
20524 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
20525 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
20526 * src/output.c (prepare): Adjust.
20527 * src/reader.c (symbols_output): Likewise.
20528 * src/vmsgetargs.c: Vaguely adjust, but who cares?
20530 2001-12-10 Akim Demaille <akim@epita.fr>
20532 * src/muscle_tab.c (muscle_init): NULL is a better default than
20535 2001-12-10 Akim Demaille <akim@epita.fr>
20537 * src/reader.c (reader): Calling symbols_output once is enough.
20539 2001-12-10 Akim Demaille <akim@epita.fr>
20541 Now that states have a complete set of members, the linked list of
20542 reductions is useless: just fill directly the state's reductions
20545 * src/state.h (struct reductions): Remove member `number' and
20547 * src/LR0.c (first_reduction, last_reduction): Remove.
20548 (save_reductions): Don't link the new reductions, store them in
20550 * src/lalr.c (set_state_table): No need to attach reductions to
20551 states, it's already done.
20552 * src/output.c (output_actions): No longer free the shifts, then
20553 the reductions, then the states: free all the states and their
20556 2001-12-10 Akim Demaille <akim@epita.fr>
20558 * src/options.c (OPTN, DRTV, BOTH): New.
20559 (option_table): Use them.
20561 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20562 the job of system.h.
20563 * src/options.c: Don't include stdio.h and xalloc.h for the same
20566 2001-12-10 Akim Demaille <akim@epita.fr>
20568 * src/output.c (output, prepare): Make sure the values of the
20569 muscles `action' and `prologue' are 0-terminated.
20571 2001-12-10 Akim Demaille <akim@epita.fr>
20573 Clean up GCC warnings.
20575 * src/reader.c (copy_action): `buf' is not used.
20576 (parse_skel_decl): Be static.
20577 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20578 * src/options.h (create_long_option_table): Have a real prototype.
20579 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20580 (hash_delete_at): Return const void *.
20581 Adjust casts to preserve the const.
20583 2001-12-10 Akim Demaille <akim@epita.fr>
20585 * configure.in: Require 2.52g.
20586 M4 is not needed, but AUTOM4TE is.
20587 * m4/m4.m4: Remove.
20588 * tests/Makefile.am: Adjust.
20590 2001-12-10 Akim Demaille <akim@epita.fr>
20592 One structure for states is enough, even though theoretically
20593 there are LR(0) states and LALR(1) states.
20595 * src/lalr.h (state_t): Remove.
20596 (state_table): Be state_t **, not state_t *.
20597 * src/state.h (core, CORE_ALLOC): Rename as...
20598 (state_t, STATE_ALLOC): this.
20599 Add the LALR(1) members: shifts, reductions, errs.
20600 * src/LR0.c (state_table): Rename as...
20601 (state_hash): this, to avoid name clashes with the global
20603 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20604 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20606 2001-12-10 Akim Demaille <akim@epita.fr>
20608 Bison dumps core on bash.y.
20609 Reported by Pascal Bart.
20611 * src/warshall.c (bitmatrix_print): New.
20613 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20614 j must be the outer loop.
20615 * tests/regression.at (Broken Closure): New.
20617 2001-12-05 Akim Demaille <akim@epita.fr>
20619 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20621 Reported by Peter Hamorsky.
20623 2001-12-05 Akim Demaille <akim@epita.fr>
20625 * src/conflicts.c (err_table): Remove.
20626 (resolve_sr_conflict): Adjust.
20627 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20629 (state_t.reductions, state_t.shifts): this.
20631 2001-12-05 Akim Demaille <akim@epita.fr>
20633 * src/reduce.c (reduce_grammar_tables): No longer disable the
20634 removal of useless rules via CPP but via `if (0)', so that the
20635 compiler still check the code is valid.
20636 For instance, it should have noticed `rline' no longer exists: use
20637 the `line' member of rule_t.
20638 * src/gram.c (dummy, rline): Remove, unused.
20640 2001-12-05 Akim Demaille <akim@epita.fr>
20642 * src/output.c (pack_vector): Use assert, not berror.
20643 * src/main.c (berror): Remove, unused.
20645 2001-12-05 Akim Demaille <akim@epita.fr>
20647 New experimental feature: if --verbose --trace output all the
20648 items of a state, not only its kernel.
20650 * src/print.c (print_core): If `trace_flag', then invoke closure
20651 before outputting the items of the state (print_core is no longer
20652 a correct name them).
20653 (print_results): Invoke new_closure/free_closure if needed.
20655 2001-12-05 Akim Demaille <akim@epita.fr>
20657 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20658 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20659 (nitemset): for consistency with the rest of the project.
20661 2001-12-05 Akim Demaille <akim@epita.fr>
20663 * src/closure.c (print_closure): Improve.
20664 (closure): Use it for printing input and output.
20666 2001-12-05 Akim Demaille <akim@epita.fr>
20668 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20669 indexed by nonterminals.
20671 2001-12-05 Akim Demaille <akim@epita.fr>
20673 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20675 * src/warshall.h: Remove accidental duplication of the content.
20677 2001-12-05 Akim Demaille <akim@epita.fr>
20679 * src/closure.c (set_fderives): De-obfuscate.
20681 2001-12-05 Akim Demaille <akim@epita.fr>
20683 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20685 2001-12-05 Akim Demaille <akim@epita.fr>
20687 * src/closure.c (set_firsts): De-obfuscate.
20689 2001-12-05 Akim Demaille <akim@epita.fr>
20691 * src/output.c (action_row): De-obfuscate
20692 using the good o' techniques: arrays not pointers, variable
20693 locality, BITISSET, RESETBIT etc.
20695 2001-12-05 Akim Demaille <akim@epita.fr>
20697 Pessimize the code to simplify it: from now on, all the states
20698 have a valid SHIFTS, which NSHIFTS is possibly 0.
20700 * src/LR0.c (shifts_new): Be global and move to..
20701 * src/state.c, src/state.h: here.
20702 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20703 * src/print_graph: Adjust.
20705 2001-12-05 Akim Demaille <akim@epita.fr>
20707 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20708 * src/conflicts.c: Use it.
20709 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20710 incorrectly ``simplified''.
20712 2001-12-05 Akim Demaille <akim@epita.fr>
20714 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20715 using the good o' techniques: arrays not pointers, variable
20716 locality, BITISSET, RESETBIT etc.
20718 2001-12-05 Akim Demaille <akim@epita.fr>
20720 * src/state.h (SHIFT_SYMBOL): New.
20721 * src/conflicts.c: Use it to deobfuscate.
20723 2001-12-05 Akim Demaille <akim@epita.fr>
20725 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20726 (print_reductions): De-obfuscate using the good o' techniques:
20727 arrays not pointers, variable locality, BITISSET.
20729 2001-12-05 Akim Demaille <akim@epita.fr>
20731 * src/conflicts.c (print_reductions): Arrays, not pointers.
20734 2001-12-05 Akim Demaille <akim@epita.fr>
20736 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20738 2001-12-05 Akim Demaille <akim@epita.fr>
20740 * src/conflicts.c (print_reductions): Improve variable locality.
20742 2001-12-05 Akim Demaille <akim@epita.fr>
20744 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20746 2001-12-05 Akim Demaille <akim@epita.fr>
20748 * src/conflicts.c (print_reductions): Improve variable locality.
20750 2001-12-05 Akim Demaille <akim@epita.fr>
20752 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20753 * src/lalr.c: Use them.
20755 2001-12-05 Akim Demaille <akim@epita.fr>
20757 * src/LR0.c (augment_automaton): Formatting changes.
20758 Better variable locality.
20760 2001-12-05 Akim Demaille <akim@epita.fr>
20762 * src/lalr.c (matrix_print): New.
20763 (transpose): Use it.
20764 Use arrays instead of pointers.
20766 2001-12-05 Akim Demaille <akim@epita.fr>
20768 * src/lalr.c (maxrhs): Move to...
20769 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20770 * src/lalr.c (build_relations): Adjust.
20772 2001-12-05 Akim Demaille <akim@epita.fr>
20774 * src/lalr.c (transpose): Free the memory allocated to the
20775 argument, as it is replaced by the results by the unique caller.
20776 (build_relations): Merely invoke transpose: it handles the memory
20778 Improve variable locality.
20779 Avoid variables used as mere abbreviations.
20780 (compute_lookaheads): Use arrays instead of pointers.
20782 2001-12-05 Akim Demaille <akim@epita.fr>
20784 * src/lalr.c (initialize_F): Improve variable locality.
20785 Avoid variables used as mere abbreviations.
20787 2001-12-05 Akim Demaille <akim@epita.fr>
20789 * src/derives.c (print_derives): Display the ruleno.
20790 * src/lalr.c (initialize_F, transpose): Better variable locality
20791 to improve readability.
20792 Avoid variables used as mere abbreviations.
20794 2001-12-05 Akim Demaille <akim@epita.fr>
20796 * src/lalr.c (traverse): Use arrays instead of pointers.
20798 2001-12-05 Akim Demaille <akim@epita.fr>
20800 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20801 the handling of squeue.
20802 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20804 2001-12-05 Akim Demaille <akim@epita.fr>
20806 Because useless nonterminals are now kept alive (instead of being
20807 `destroyed'), we now sometimes examine them, and store information
20808 related to them. Hence we need to know their number, and adjust
20809 memory allocations.
20811 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20813 * src/LR0.c (allocate_itemsets): The memory allocated to
20814 `symbol_count' was used for two different purpose: once to count
20815 the number of occurrences of each symbol, and later reassigned to
20816 `shift_symbol', containing the symbol that can be shifted from a
20818 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20820 (new_itemsets): Allocate `shift_symbol' here.
20821 (allocate_itemsets): symbol_count includes useless nonterminals.
20822 Make room for them.
20823 (free_storage): Use `free', not `XFREE', for pointers that cannot
20826 2001-12-05 Akim Demaille <akim@epita.fr>
20828 * src/nullable.c (set_nullable): Deobfuscate the handling of
20830 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20832 2001-12-05 Akim Demaille <akim@epita.fr>
20834 * src/gram.c, src/gram.h (ritem_print): New.
20835 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20836 (This useless function was defined only to work around VMS linkers
20837 that can't handle compilation units with variables only).
20838 * src/reduce.c (dump_grammar): Use it to trace the construction of
20841 2001-12-04 Paul Eggert <eggert@twinsun.com>
20843 * src/bison.simple (union yyalloc): Change member names
20844 to be the same as the stack names.
20845 (yyparse): yyptr is now union yyalloc *, not char *.
20846 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20847 and may generate better code on some machines.
20848 (yystpcpy): Use prototype if __STDC__ is defined, not just
20849 if __cplusplus is defined.
20851 2001-11-30 Akim Demaille <akim@epita.fr>
20853 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20854 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20855 Gettext doesn't compile cleanly, and dies with -Werror.
20856 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20857 Include WARNING_CFLAGS here.
20858 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20859 before being defined.
20861 2001-11-27 Paul Eggert <eggert@twinsun.com>
20863 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20864 First arg is int, not unsigned.
20865 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20866 (SIZE_MAX, UINT_MAX): New macros.
20867 (quotearg_n_options): Abort if N is negative.
20868 Avoid overflow check on hosts where size_t is 64 bits and int
20869 is 32 bits, as overflow is impossible there.
20870 Fix off-by-one typo that caused unnecessary reallocation.
20872 2001-11-29 Paul Eggert <eggert@twinsun.com>
20874 Name space cleanup in generated parser.
20876 * doc/bison.texinfo (Bison Parser): Discuss system headers
20877 and their effect on the user name space.
20879 * src/bison.simple:
20880 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20881 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20882 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20884 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20885 on user names when possible.
20887 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20888 Simplify test for whather <alloca.h> exists.
20890 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20892 (<stdio.h>): Include if YYDEBUG.
20894 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20895 ! defined (yyoverflow) && ! defined (yymemcpy).
20897 (yymemcpy, yyparse): Rename local variables as needed so that
20898 they all begin with 'yy'.
20900 (yystrlen, yystpcpy): New functions.
20902 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20905 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20906 instead of relying on string.h functions. Use YYSTACK_ALLOC
20907 and YYSTACK_FREE instead of malloc and free.
20909 2001-11-30 Akim Demaille <akim@epita.fr>
20911 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20912 before their first uses.
20913 (YYBISON, YYPURE): Move to the top of the output.
20915 2001-11-30 Akim Demaille <akim@epita.fr>
20917 * tests/reduce.at (Useless Nonterminals): Fix.
20919 2001-11-30 Akim Demaille <akim@epita.fr>
20921 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20922 if body instead of `;' to pacify GCC's warnings.
20924 2001-11-30 Akim Demaille <akim@epita.fr>
20926 Instead of mapping the LHS of unused rules to -1, keep the LHS
20927 valid, but flag the rules as invalid.
20929 * src/gram.h (rule_t): `useful' is a new member.
20930 * src/print.c (print_grammar): Adjust.
20931 * src/derives.c (set_derives): Likewise.
20932 * src/reader.c (packgram, reduce_output): Likewise.
20933 * src/reduce.c (reduce_grammar_tables): Likewise.
20934 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20936 2001-11-30 Akim Demaille <akim@epita.fr>
20938 * src/reduce.c (reduce_output): Formatting changes.
20939 * src/print.c (print_results, print_grammar): Likewise.
20940 * tests/regression.at (Rule Line Numbers)
20941 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20943 2001-11-30 Akim Demaille <akim@epita.fr>
20945 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20946 useless nonterminals, move them at the end of the symbol arrays.
20947 (reduce_output): Adjust.
20948 * tests/reduce.at (Useless Nonterminals): Adjust.
20950 2001-11-30 Akim Demaille <akim@epita.fr>
20952 * src/reduce.c: Various comment/formatting changes.
20953 (nonterminals_reduce): New, extracted from...
20954 (reduce_grammar_tables): here.
20955 (reduce_grammar): Call nonterminals_reduce.
20957 2001-11-29 Paul Eggert <eggert@twinsun.com>
20959 * src/bison.simple (YYSTACK_REALLOC): Remove.
20960 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20961 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20963 (union yyalloc): New type.
20964 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20965 an arbitrary restriction on hosts where size_t is wider than int.
20967 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20968 a parser stack overflow. Allocate just one block of memory for all
20969 three stacks, instead of allocating three blocks; this typically is
20970 faster and reduces fragmentation.
20972 Do not limit the number of items in the stack to a value that fits
20973 in 'int', as this is an arbitrary limit on hosts with 64-bit
20974 size_t and 32-bit int.
20976 2001-11-29 Marc Autret <autret_m@epita.fr>
20978 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20979 of defining YYERROR_VERBOSE.
20980 [AT_DATA]: $4 is now out of C declarations in the prologue.
20982 2001-11-28 Marc Autret <autret_m@epita.fr>
20984 * src/reader.c (parse_dquoted_param): New.
20985 (parse_skel_decl): Use it.
20986 * src/lex.h: Add its prototype.
20987 * src/lex.c (literalchar): Become not static.
20989 2001-11-28 Marc Autret <autret_m@epita.fr>
20991 * src/output.h: And put its extern declaration here.
20992 * src/output.c (error_verbose): Define here.
20993 (prepare): Echo name modification.
20994 * src/getargs.h: Clean its extern declaration.
20995 * src/getargs.c (error_verbose_flag): Remove.
20996 (getargs): Remove case 'e'.
20997 * src/options.c (option_table): 'error-verbose' is now seen as simple
21001 * src/reader.c (read_declarations): Remove case tok_include.
21002 (parse_include_decl): Remove.
21003 * src/lex.h (token_t): Remove tok_include.
21004 * src/options.c (option_table): 'include' is now a simple command line
21007 2001-11-28 Marc Autret <autret_m@epita.fr>
21009 * src/bison.simple: Adjust muscle names.
21010 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21011 * src/output.c (prepare): s/_/-/ for the muscles names.
21012 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21014 2001-11-28 Marc Autret <autret_m@epita.fr>
21016 * src/bison.simple: Fix debug.
21017 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21019 2001-11-28 Akim Demaille <akim@epita.fr>
21021 * src/LR0.c (shifts_new): New.
21022 (save_shifts, insert_start_shift, augment_automaton): Use it.
21024 2001-11-28 Akim Demaille <akim@epita.fr>
21026 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21029 2001-11-28 Akim Demaille <akim@epita.fr>
21031 * src/closure.c (closure): Instead of looping over word in array
21032 then bits in words, loop over bits in array.
21034 2001-11-28 Akim Demaille <akim@epita.fr>
21036 * src/closure.c (closure): No longer optimize the special case
21037 where all the bits of `ruleset[r]' are set to 0, to make the code
21040 2001-11-28 Akim Demaille <akim@epita.fr>
21042 * src/closure.c (closure): `r' and `c' are new variables, used to
21043 de-obfuscate accesses to RULESET and CORE.
21045 2001-11-28 Akim Demaille <akim@epita.fr>
21047 * src/reduce.c (reduce_print): Use ngettext.
21048 (dump_grammar): Improve the trace accuracy.
21050 2001-11-28 Akim Demaille <akim@epita.fr>
21052 * src/reduce.c (dump_grammar): Don't translate trace messages.
21054 2001-11-28 Akim Demaille <akim@epita.fr>
21056 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21057 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21058 as all tags are free'ed afterwards.
21059 From Enrico Scholz.
21061 2001-11-27 Paul Eggert <eggert@twinsun.com>
21063 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21064 use alloca when we didn't want to, and vice versa.
21066 2001-11-27 Marc Autret <autret_m@epita.fr>
21068 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21070 * src/output.c (prepare): Remove its update.
21072 2001-11-27 Marc Autret <autret_m@epita.fr>
21074 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21075 Use %error-verbose.
21077 2001-11-27 Marc Autret <autret_m@epita.fr>
21079 * src/bison.simple: Remove YYERROR_VERBOSE using.
21080 Use %%error_verbose.
21081 (yyparse): Likewise.
21082 * src/output.c (prepare): Give its final value.
21083 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21084 * src/getargs.h: Add its extern declaration.
21085 * src/getargs.c (error_verbose_flag): New int.
21086 (getargs): Update to catch new case.
21087 * src/options.c (option_table): 'error-verbose' is a new option.
21088 (shortopts): Update.
21090 2001-11-27 Akim Demaille <akim@epita.fr>
21092 * src/system.h: Use intl/libgettext.h.
21093 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
21095 2001-11-27 Akim Demaille <akim@epita.fr>
21097 * tests/torture.at (Exploding the Stack Size with Malloc):
21098 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
21100 2001-11-27 Akim Demaille <akim@epita.fr>
21102 * src/files.c: Include error.h.
21103 Reported by Hans Aberg.
21105 2001-11-26 Marc Autret <autret_m@epita.fr>
21107 * src/reader.c (parse_include_decl): New, not yet implemented.
21108 (read_declarations): Add case tok_include.
21109 * src/getargs.h (include): Add its extern definition.
21110 * src/getargs.c (include): New const char *.
21111 (getargs): Add case '-I'.
21112 * src/options.c (option_table): Add include as command line and
21114 * src/lex.h (token_t): Add tok_include.
21116 2001-11-26 Akim Demaille <akim@epita.fr>
21118 * src/reader.c (readgram): Make sure rules for mid-rule actions
21119 have a lineno equal to that of their host rule.
21120 Reported by Hans Aberg.
21121 * tests/regression.at (Rule Line Numbers): New.
21123 2001-11-26 Akim Demaille <akim@epita.fr>
21125 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
21128 2001-11-26 Akim Demaille <akim@epita.fr>
21130 * src/complain.c, src/complain.h (error): Remove, provided by
21133 2001-11-26 Akim Demaille <akim@epita.fr>
21135 * src/reader.c (read_declarations): Don't abort on tok_illegal,
21136 issue an error message.
21137 * tests/regression.at (Invalid %directive): New.
21138 Reported by Hans Aberg.
21140 2001-11-26 Akim Demaille <akim@epita.fr>
21142 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
21143 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21145 2001-11-26 Akim Demaille <akim@epita.fr>
21147 * src/conflicts.c (conflicts_print): Don't complain at all when
21148 there are no reduce/reduce conflicts, and as many shift/reduce
21149 conflicts as expected.
21150 * tests/regression.at (%expect right): Adjust.
21152 2001-11-23 Akim Demaille <akim@epita.fr>
21154 * lib/alloca.c: Update, from fileutils.
21156 2001-11-23 Akim Demaille <akim@epita.fr>
21158 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
21160 2001-11-23 Akim Demaille <akim@epita.fr>
21162 * src/system.h: Include alloca.h.
21163 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
21165 2001-11-23 Akim Demaille <akim@epita.fr>
21167 * src/print_graph.c (print_actions): Remove `rule', unused.
21168 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
21169 pacify GCC's signed < unsigned warnings.
21170 * src/closure.c (itemsetsize): Likewise.
21171 * src/reader.c (symbol_list_new): Static.
21173 2001-11-23 Akim Demaille <akim@epita.fr>
21175 Attaching lineno to buckets is stupid, since only one copy of each
21176 symbol is kept, only the line of the first occurrence is kept too.
21178 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
21179 * src/reader.c (rline_allocated): Remove, unused.
21180 (symbol_list): Have a `line' member.
21181 (symbol_list_new): New.
21182 (readgram): Use it.
21183 * src/print.c (print_grammar): Output the rule line numbers.
21184 * tests/regression.at (Solved SR Conflicts)
21185 (Unresolved SR Conflicts): Adjust.
21186 Reported by Hans Aberg.
21188 2001-11-22 Marc Autret <autret_m@epita.fr>
21190 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
21192 2001-11-22 Marc Autret <autret_m@epita.fr>
21194 * src/muscle_tab.c (muscle_init): Remove initialization of
21196 * src/output.c (output_master_parser): Do it here.
21198 2001-11-20 Akim Demaille <akim@epita.fr>
21201 * configure.in (ALL_LINGUAS): Adjust.
21202 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
21203 longer contains strings to translate.
21205 2001-11-19 Akim Demaille <akim@epita.fr>
21207 * src/conflicts.c (conflicts_print): Add a missing \n.
21209 2001-11-19 Akim Demaille <akim@epita.fr>
21211 * src/nullable.c (nullable_print): New.
21212 (set_nullable): Call it when tracing.
21213 Better locality of variables.
21215 2001-11-19 Akim Demaille <akim@epita.fr>
21217 * src/print.c (print_actions): Better locality of variables.
21219 2001-11-19 Akim Demaille <akim@epita.fr>
21221 * src/derives.c (print_derives): Fix and enrich.
21222 * src/closure.c (print_fderives): Likewise.
21224 2001-11-19 Akim Demaille <akim@epita.fr>
21226 * src/closure.c (itemsetend): Remove, replaced with...
21227 (itemsetsize): new.
21229 2001-11-19 Akim Demaille <akim@epita.fr>
21231 * src/LR0.c (kernel_end): Remove, replaced with...
21232 (kernel_size): new.
21234 2001-11-19 Akim Demaille <akim@epita.fr>
21236 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
21239 2001-11-19 Akim Demaille <akim@epita.fr>
21241 * src/closure.c (closure): Use arrays instead of pointers to clarify.
21243 2001-11-19 Akim Demaille <akim@epita.fr>
21245 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
21247 * src/LR0.c: Likewise.
21248 (allocate_itemsets): Use arrays instead of pointers to clarify.
21250 2001-11-19 Akim Demaille <akim@epita.fr>
21252 * src/getargs.c (statistics_flag): Replace with...
21254 (longopts): Accept --trace instead of --statistics.
21255 * src/getargs.h, src/options.c: Adjust.
21256 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
21257 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
21259 2001-11-19 Akim Demaille <akim@epita.fr>
21261 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
21262 pointers to clarify the code.
21263 (save_reductions, save_shifts): Factor common parts of alternatives.
21265 2001-11-19 Akim Demaille <akim@epita.fr>
21267 * src/LR0.c (new_state, get_state): Complete TRACE code.
21268 * src/closure.c: Include `reader.h' to get `tags', needed by the
21270 Rename the conditional DEBUG as TRACE.
21271 Output consistently TRACEs to stderr, not stdout.
21272 * src/derives.c: Likewise.
21273 * src/reduce.c: (inaccessable_symbols): Using if is better style
21275 Use `#if TRACE' instead of `#if 0' for tracing code.
21277 2001-11-19 Akim Demaille <akim@epita.fr>
21279 * src/system.h (LIST_FREE, shortcpy): New.
21280 * src/LR0.c: Use them.
21281 * src/output.c (free_itemsets, free_reductions, free_shifts):
21282 Remove, replaced by LIST_FREE.
21284 2001-11-19 Akim Demaille <akim@epita.fr>
21286 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
21287 (REDUCTIONS_ALLOC): New.
21288 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
21291 2001-11-19 Akim Demaille <akim@epita.fr>
21293 * src/LR0.c (new_state): Complete trace code.
21294 * src/nullable.c (set_nullable): Don't translate traces.
21296 2001-11-19 Akim Demaille <akim@epita.fr>
21298 * src/print_graph.c (print_core): Better locality of variables.
21299 * src/print.c (print_core): Likewise.
21301 2001-11-19 Akim Demaille <akim@epita.fr>
21303 * src/vcg.c: You do the output, so you are responsible of the
21304 handling of VCG syntax, in particular: use quotearg.
21305 * src/print_graph.c: Don't.
21306 (print_actions): Don't output the actions as part of the nodes,
21307 since that's the job of the edges.
21308 (print_state): Don't output by hand: fill the node description,
21309 and ask for its output.
21311 2001-11-19 Akim Demaille <akim@epita.fr>
21313 * src/bison.simple (yyparse): When verbosely reporting an error,
21314 no longer put additional quotes around token names.
21315 * tests/calc.at: Adjust.
21317 2001-11-19 Akim Demaille <akim@epita.fr>
21319 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
21320 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
21321 * src/output.c: Adjust.
21323 2001-11-19 Akim Demaille <akim@epita.fr>
21325 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
21327 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
21329 2001-11-19 Akim Demaille <akim@epita.fr>
21331 * src/gram.h (rule_t): New.
21333 (rrhs, rlhs): Remove, part of state_t.
21334 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
21335 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
21336 * src/reader.c, src/reduce.c: Adjust.
21338 2001-11-19 Akim Demaille <akim@epita.fr>
21340 * src/reader.c (symbols_output): New, extracted from...
21341 (packsymbols): Here.
21344 2001-11-19 Akim Demaille <akim@epita.fr>
21346 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
21347 (maxrhs): this new function.
21349 2001-11-19 Akim Demaille <akim@epita.fr>
21351 * src/lalr.c (F): New macro to access the variable F.
21354 2001-11-19 Akim Demaille <akim@epita.fr>
21356 * src/lalr.h (LA): New macro to access the variable LA.
21357 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21358 * src/lalr.c: Adjust.
21360 2001-11-19 Akim Demaille <akim@epita.fr>
21362 * src/lalr.c (initialize_LA): Only initialize LA. Let...
21363 (set_state_table): handle the `lookaheads' members.
21365 2001-11-19 Akim Demaille <akim@epita.fr>
21367 * src/lalr.h (lookaheads): Removed array, whose contents is now
21369 (state_t): this structure.
21370 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21373 2001-11-19 Akim Demaille <akim@epita.fr>
21375 * src/lalr.h (consistent): Removed array, whose contents is now
21377 (state_t): this structure.
21378 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21381 2001-11-19 Akim Demaille <akim@epita.fr>
21383 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
21384 contents are now members of...
21385 (state_t): this structure.
21386 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21389 2001-11-19 Akim Demaille <akim@epita.fr>
21391 * src/lalr.h (state_t): New.
21392 (state_table): Be a state_t * instead of a core **.
21393 (accessing_symbol): Remove, part of state_t.
21394 * src/lalr.c: Adjust.
21395 (set_accessing_symbol): Merge into...
21396 (set_state_table): this.
21397 * src/print_graph.c, src/conflicts.c: Adjust.
21399 2001-11-14 Akim Demaille <akim@epita.fr>
21401 * tests/calc.at, tests/output.at, tests/regression.at,
21402 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
21403 now the tests are run in private dirs, therefore AC_CLEANUP and
21404 family can be simplified to 0-ary.
21405 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
21406 use abs. path to find config.h.
21407 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
21408 stderr, there can be way too much random noise.
21409 Instead pass -Werror to GCC and rely on the exit status.
21410 Reported by Wolfram Wagner.
21412 2001-11-14 Akim Demaille <akim@epita.fr>
21414 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
21415 defined only if yyoverflow is defined, to avoid `warning: unused
21417 Reported by The Test Suite.
21419 2001-11-14 Akim Demaille <akim@epita.fr>
21421 * src/print.c: Include reduce.h.
21422 Reported by Hans Aberg.
21424 2001-11-14 Akim Demaille <akim@epita.fr>
21426 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
21427 Revert a previous patch: these are really const.
21428 * src/conflicts.c (conflict_report): Additional useless pair of
21429 braces to pacify GCC's warnings for `if () if () {} else {}'.
21430 * src/lex.c (parse_percent_token): Replace equal_offset with
21433 Be sure to strdup `arg' when used, since there is no reason for
21434 token_buffer not to change.
21436 2001-11-14 Akim Demaille <akim@epita.fr>
21438 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
21440 * src/main.c (main): Use them.
21441 Suggested by Hans Aberg.
21443 2001-11-12 Akim Demaille <akim@epita.fr>
21445 * src/system.h (ngettext): Now that we use ngettext, be sure to
21446 provide a default definition when NLS are not used.
21448 2001-11-12 Akim Demaille <akim@epita.fr>
21450 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
21451 Use @kbd to denote user input.
21452 (Language and Grammar): ANSIfy the example.
21453 Adjust its layout for info/notinfo.
21454 (Location Tracking Calc): Output error messages to stderr.
21455 Output locations in a more GNUtically correct way.
21456 Fix a couple of Englishos.
21457 Adjust @group/@end group pairs.
21459 2001-11-12 Akim Demaille <akim@epita.fr>
21461 %expect was not functioning at all.
21463 * src/conflicts.c (expected_conflicts): Set to -1.
21464 (conflict_report): Use ngettext.
21465 (conflicts_print): Check %expect and make its violation an error.
21466 * doc/bison.texinfo (Expect Decl): Adjust.
21467 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
21468 * tests/regression.at (%expect not enough, %expect right)
21469 (%expect too much): New.
21471 2001-11-12 Akim Demaille <akim@epita.fr>
21473 * tests/regression.at (Conflicts): Rename as...
21474 (Unresolved SR Conflicts): this.
21475 (Solved SR Conflicts): New.
21477 2001-11-12 Akim Demaille <akim@epita.fr>
21479 * src/reduce.c (print_results): Rename as...
21480 (reduce_output): This.
21481 Output to OUT, passed as argument, instead of output_obstack.
21482 (dump_grammar): Likewise.
21483 (reduce_free): New.
21485 (reduce_grammar): No longer call reduce_output, since...
21486 * src/print.c (print_results): do it.
21487 * src/main.c (main): Call reduce_free;
21489 2001-11-12 Akim Demaille <akim@epita.fr>
21491 * src/conflicts.c (print_reductions): Accept OUT as argument.
21492 Output to it, not to output_obstack.
21493 * src/print.c (print_actions): Adjust.
21495 2001-11-12 Akim Demaille <akim@epita.fr>
21497 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
21498 the result instead of using...
21499 (src_total, rrc_total, src_count, rrc_count): Remove.
21500 (any_conflicts): Remove.
21501 (print_conflicts): Split into...
21502 (conflicts_print, conflicts_output): New.
21503 * src/conflicts.h: Adjust.
21504 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
21505 * src/print.c (print_grammar): Issue `\n' between two rules.
21506 * tests/regression.at (Conflicts): New.
21507 Reported by Tom Lane.
21509 2001-11-12 Akim Demaille <akim@epita.fr>
21511 * tests/regression.at (Invalid input): Remove, duplicate with
21512 ``Invalid input: 1''.
21514 2001-11-12 Akim Demaille <akim@epita.fr>
21516 * tests/torture.at (AT_DATA_STACK_TORTURE)
21517 (Exploding the Stack Size with Alloca)
21518 (Exploding the Stack Size with Malloc): New.
21520 2001-11-12 Akim Demaille <akim@epita.fr>
21522 * src/bison.simple (YYSTACK_REALLOC): New.
21523 (yyparse) [!yyoverflow]: Use it and free the old stack.
21524 Reported by Per Allansson.
21526 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
21528 * src/bison.simple: Define type yystype instead of YYSTYPE, and
21529 define CPP macro, which substitute YYSTYPE by yystype.
21530 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
21531 with yyltype/YYLTYPE. This allows inclusion of the generated
21532 header within the parser if the compiler, such as GGC, accepts
21533 multiple equivalent #defines.
21536 2001-11-05 Akim Demaille <akim@epita.fr>
21538 * src/reader.c (symbols_output): New, extracted from...
21539 (packsymbols): here.
21542 2001-11-05 Akim Demaille <akim@epita.fr>
21544 * src/lex.c (parse_percent_token): s/quotearg/quote/.
21546 2001-11-05 Akim Demaille <akim@epita.fr>
21548 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
21551 2001-11-05 Akim Demaille <akim@epita.fr>
21553 * src/options.h (struct option_table_struct): set_flags is void*.
21554 * src/options.c (longopts): Support `--output' and `%output'.
21556 * src/lex.h (tok_setopt): Remove, replaced with...
21557 (tok_intopt, tok_stropt): these new guys.
21558 * src/lex.c (getopt.h): Not needed.
21559 (token_buffer, unlexed_token_buffer): Not const.
21560 (percent_table): Promote `-' over `_' in directive names.
21561 Active `%name-prefix', `file-prefix', and `output'.
21562 (parse_percent_token): Accept possible arguments to directives.
21563 Promote `-' over `_' in directive names.
21565 2001-11-04 Akim Demaille <akim@epita.fr>
21567 * doc/bison.texinfo (Decl Summary): Split the list into
21568 `directives for grammars' and `directives for bison'.
21570 Add description of `%name-prefix', `file-prefix', and `output'.
21571 Promote `-' over `_' in directive names.
21572 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21573 Simplify the description of `--name-prefix'.
21574 Promote `-' over `_' in directive names.
21575 Promote `--output' over `--output-file'.
21576 Fix the description of `--defines'.
21577 * tests/output.at: Exercise %file-prefix and %output.
21579 2001-11-02 Akim Demaille <akim@epita.fr>
21581 * doc/refcard.tex: Update.
21583 2001-11-02 Akim Demaille <akim@epita.fr>
21585 * src/symtab.h (SUNDEF): New.
21586 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21587 stand for `uninitialized', instead of 0.
21588 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21589 * src/lex.c (lex): Adjust.
21591 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21593 Let yylex return it instead of a plain 0.
21594 Reported by Dick Streefland.
21596 2001-11-02 Akim Demaille <akim@epita.fr>
21598 * tests/regression.at (Mixing %token styles): New test.
21600 2001-11-02 Akim Demaille <akim@epita.fr>
21602 * src/reader.c (parse_thong_decl): Formatting changes.
21603 (token_translations_init): New, extracted from...
21604 (packsymbols): Here.
21607 2001-11-01 Akim Demaille <akim@epita.fr>
21609 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21610 Check that `9foo.y' produces correct cpp guards.
21611 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21615 2001-11-01 Akim Demaille <akim@epita.fr>
21617 * tests/regression.at (Invalid input: 2): New.
21618 * src/lex.c (unlexed_token_buffer): New.
21619 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21623 2001-11-01 Akim Demaille <akim@epita.fr>
21625 * tests/calc.at: Catch up with 1.30.
21626 * configure.in: Bump to 1.49a.
21627 Adjust to newer Autotest.
21629 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21631 * src/conflicts.c: Move global variables rrc_total and src_total ...
21632 (print_conflicts): here.
21633 * src/output.c (output): Free global variable user_toknums.
21634 * src/lex.c (token_obstack): Become static.
21636 2001-10-18 Akim Demaille <akim@epita.fr>
21638 * tests/atlocal.in (GCC): Add.
21639 * tests/calc.at: s/m4_match/m4_bmatch/.
21640 s/m4_patsubst/m4_bpatsubst/.
21641 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21642 * configure.in: AC_SUBST(GCC).
21644 2001-10-14 Marc Autret <autret_m@epita.fr>
21646 * src/options.c (create_long_option_table): Fix.
21648 2001-10-10 Akim Demaille <akim@epita.fr>
21650 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21652 2001-10-04 Akim Demaille <akim@epita.fr>
21654 * src/reader.c (parse_union_decl): Push the caracters in
21655 union_obstack, not attrs_obstack.
21657 2001-10-04 Akim Demaille <akim@epita.fr>
21659 Merge in the branch 1.29.
21661 * src/reader.c (packsymbols): Use a temporary obstack for
21662 `%%tokendef', since output_stack is already used elsewhere.
21664 2001-10-02 Akim Demaille <akim@epita.fr>
21668 2001-10-02 Akim Demaille <akim@epita.fr>
21672 2001-10-02 Akim Demaille <akim@epita.fr>
21674 * tests/regression.at (Invalid CPP headers): New.
21675 From Alexander Belopolsky.
21676 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21678 2001-10-02 Akim Demaille <akim@epita.fr>
21680 * tests/regression.at (Invalid input): New.
21681 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21684 2001-10-02 Akim Demaille <akim@epita.fr>
21686 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21688 2001-10-02 Akim Demaille <akim@epita.fr>
21690 * src/output.c (output_parser): Assert `skeleton'.
21691 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21695 2001-10-01 Marc Autret <autret_m@epita.fr>
21697 * src/lex.h: Echo modifications.
21698 * src/lex.c (unlex): Parameter is now token_t.
21701 2001-10-01 Marc Autret <autret_m@epita.fr>
21703 * src/main.c: Include lex.h.
21706 2001-09-29 Akim Demaille <akim@epita.fr>
21708 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21710 2001-09-28 Akim Demaille <akim@epita.fr>
21712 * tests/testsuite.at: Update to newer Autotest.
21713 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21715 2001-09-27 Akim Demaille <akim@epita.fr>
21717 Position independent wrapper.
21719 * tests/bison: Remove.
21720 * tests/bison.in: New.
21721 * configure.in: Adjust.
21723 2001-09-27 Paul Eggert <eggert@twinsun.com>
21725 Port quotearg fixes from tar 1.13.24.
21727 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21729 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21730 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21732 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21733 * m4/mbrtowc.m4: New file.
21734 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21735 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21737 2001-09-27 Akim Demaille <akim@epita.fr>
21741 2001-09-27 Akim Demaille <akim@epita.fr>
21745 2001-09-25 Akim Demaille <akim@epita.fr>
21747 * src/system.h: Include `xalloc.h'.
21748 Remove it from the C files.
21749 * src/files.c (output_files): Free the obstacks.
21750 * src/lex.c (init_lex): Rename as...
21753 * src/main.c (main): Use it.
21755 2001-09-24 Marc Autret <autret_m@epita.fr>
21757 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21758 to output informations in fout (FILE*).
21759 (open_graph, close_graph): Likewise.
21760 (output_graph, output_edge, output_node): Likewise.
21761 * src/vcg.h: Update function prototypes.
21762 * src/print_graph.c (print_graph): Open output graph file.
21763 (print_actions): Adjust.
21764 * src/files.h: Remove extern declaration.
21765 * src/files.c: Remove graph_obstack declaration.
21766 (open_files): Remove graph_obstack initialization.
21767 (output_files): Remove graph_obstack saving.
21769 2001-09-24 Marc Autret <autret_m@epita.fr>
21771 * src/files.c (compute_output_file_names): Fix.
21773 2001-09-24 Marc Autret <autret_m@epita.fr>,
21774 Akim Demaille <akim@epita.fr>
21776 * src/reader.c (reader): Remove call to free_symtab ().
21777 * src/main.c (main): Call it here.
21779 * src/conflicts.c (initialize_conflicts): Rename as...
21780 (solve_conflicts): this.
21781 * src/print.c (print_core, print_actions, print_state)
21782 (print_grammar): Dump to a file instead a `output_obstack'.
21783 (print_results): Dump `output_obstack', and then proceed with the
21785 * src/files.c (compute_output_file_names, close_files): New.
21786 (output_files): Adjust.
21787 * src/main.c (main): Adjust.
21789 2001-09-23 Marc Autret <autret_m@epita.fr>
21791 * src/files.c (compute_header_macro): Computes header macro name
21792 from spec_defines_file when given.
21794 2001-09-23 Marc Autret <autret_m@epita.fr>
21796 * src/files.c (output_files): Add default extensions.
21798 2001-09-22 Akim Demaille <akim@epita.fr>
21800 * src/conflicts.c (finalize_conflicts): Rename as...
21801 (free_conflicts): this.
21803 2001-09-22 Akim Demaille <akim@epita.fr>
21805 * src/gram.c (gram_free): Rename back as...
21807 (output_token_translations): Free `token_translations'.
21808 * src/symtab.c (free_symtab): Free the tag field.
21810 2001-09-22 Akim Demaille <akim@epita.fr>
21812 Remove `translations' as it is always set to true.
21814 * src/gram.h: Adjust.
21815 * src/reader.c (packsymbols, parse_token_decl): Adjust
21816 * src/print.c (print_grammar): Adjust.
21817 * src/output.c (output_token_translations): Adjust.
21818 * src/lex.c (lex): Adjust.
21819 * src/gram.c: Be sure the set pointers to NULL.
21820 (dummy): Rename as...
21823 2001-09-22 Akim Demaille <akim@epita.fr>
21825 * configure.in: Invoke AM_LIB_DMALLOC.
21826 * src/system.h: Use dmalloc.
21827 * src/LR0.c: Be sure to have pointers initialized to NULL.
21828 (allocate_itemsets): Allocate kernel_items only if needed.
21830 2001-09-22 Akim Demaille <akim@epita.fr>
21832 * configure.in: Bump to 1.29b.
21833 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21834 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21835 need xmalloc.c in calc.y.
21838 2001-09-21 Akim Demaille <akim@epita.fr>
21841 * Makefile.maint, config/config.guess, config/config.sub,
21842 * config/missing: Update from masters.
21843 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21845 * configure.in (ALL_LINGUAS): Add `tr'.
21847 2001-09-21 Akim Demaille <akim@epita.fr>
21849 * tests/Makefile.am (package.m4): Move to...
21850 ($(srcdir)/$(TESTSUITE)): here.
21852 2001-09-20 Akim Demaille <akim@epita.fr>
21854 * src/complain.c: No longer try to be standalone: use system.h.
21855 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21856 * src/complain.h: Likewise.
21857 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21858 Remove the unused variable `n'.
21859 From Albert Chin-A-Young.
21861 2001-09-18 Marc Autret <autret_m@epita.fr>
21863 * doc/bison.1: Update.
21864 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21866 (Option Cross Key): Update.
21869 2001-09-18 Marc Autret <autret_m@epita.fr>
21871 * tests/regression.at: New test (comment in %union).
21873 2001-09-18 Marc Autret <autret_m@epita.fr>
21875 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21877 Reported by Keith Browne.
21879 2001-09-18 Marc Autret <autret_m@epita.fr>
21881 * tests/output.at: Add tests for --defines and --graph.
21883 2001-09-18 Marc Autret <autret_m@epita.fr>
21885 * tests/output.at: Removes tests of %{header,src}_extension features.
21887 2001-09-18 Akim Demaille <akim@epita.fr>
21889 * tests/Makefile.am (package.m4): New.
21890 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21891 (_AT_CHECK_CALC_ERROR): Likewise.
21892 Factor the `, ' part of verbose error messages.
21894 2001-09-18 Marc Autret <autret_m@epita.fr>
21896 * src/getargs.c (longopts): Declare --defines and --graph as options
21897 with optional arguments.
21898 * src/files.h: Add extern declarations.
21899 * src/files.c (spec_graph_file, spec_defines_file): New.
21900 (output_files): Update.
21901 Remove CPP-outed code.
21903 2001-09-18 Marc Autret <autret_m@epita.fr>
21905 Turn off %{source,header}_extension feature.
21907 * src/files.c (compute_exts_from_gf): Update.
21908 (compute_exts_from_src): Update.
21909 (output_files): CPP-out useless code.
21910 * src/files.h: Remove {header,source}_extension extern declarations.
21911 * src/reader.c (parse_dquoted_param): CPP-out.
21912 (parse_header_extension_decl): Remove.
21913 (parse_source_extension_decl): Remove.
21914 (read_declarations): Remove cases tok_{hdrext,srcext}.
21915 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21916 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21918 2001-09-10 Akim Demaille <akim@epita.fr>
21920 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21921 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21922 (AT_CHECK_OUTPUT): this.
21923 Merely check ls' exit status, its output is useless.
21925 2001-09-10 Akim Demaille <akim@epita.fr>
21927 * tests/calc.at: Use m4_match.
21928 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21930 2001-09-10 Marc Autret <autret_m@epita.fr>,
21931 Akim Demaille <akim@epita.fr>
21933 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21935 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21937 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21938 * src/lex.h: Adjust prototype.
21939 (token_t): Add `tok_undef'.
21940 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21941 (parse_percent_token): Now returns token_t.
21942 Add default statement in switch.
21943 (lex): Separate `c' as an input variable, from the token_t result
21945 (unlexed): Is a token_t.
21947 2001-09-10 Akim Demaille <akim@epita.fr>
21949 * configure.in: Bump to 1.29a.
21951 2001-09-07 Akim Demaille <akim@epita.fr>
21955 2001-08-30 Akim Demaille <akim@epita.fr>
21957 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21958 * m4/atconfig.m4: Remove.
21959 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21960 * tests/bison: New.
21961 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21962 m4_if, m4_patsubst, and m4_regexp.
21963 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21964 `input' file instead of echo.
21966 2001-08-29 Akim Demaille <akim@epita.fr>
21970 2001-08-29 Akim Demaille <akim@epita.fr>
21974 2001-08-29 Paul Eggert <eggert@twinsun.com>
21976 * src/bison.simple (yyparse): Don't take the address of an
21977 item before the start of an array, as that doesn't conform to
21980 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21982 * doc/bison.texinfo (Location Tracking Calc): New node.
21984 2001-08-29 Paul Eggert <eggert@twinsun.com>
21986 * src/output.c (output): Do not define const, as this now
21987 causes more problems than it cures.
21989 2001-08-29 Akim Demaille <akim@epita.fr>
21991 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21993 Be sure to tag the `detailmenu'.
21995 2001-08-29 Akim Demaille <akim@epita.fr>
21997 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21998 download in a tmp dir.
22000 2001-08-28 Marc Autret <autret_m@epita.fr>
22002 * config/depcomp: New file.
22004 2001-08-28 Marc Autret <autret_m@epita.fr>
22006 * doc/bison.1 (mandoc): Adjust.
22007 From Juan Manuel Guerrero.
22009 2001-08-28 Marc Autret <autret_m@epita.fr>
22011 * src/print_graph.c (print_state): Fix.
22013 2001-08-27 Marc Autret <autret_m@epita.fr>
22015 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22017 Echo modifications to the functions prototypes.
22018 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22020 2001-08-27 Marc Autret <autret_m@epita.fr>
22022 * src/vcg.c: Include `xalloc.h'.
22023 (add_colorentry): New.
22024 (add_classname): New.
22025 (add_infoname): New.
22026 * src/vcg.h: Add new prototypes.
22028 2001-08-27 Akim Demaille <akim@epita.fr>
22030 * Makefile.maint: Sync. again with CVS Autoconf.
22032 2001-08-27 Akim Demaille <akim@epita.fr>
22034 * Makefile.maint: Formatting changes.
22035 (po-update, cvs-update, update): New targets.
22038 2001-08-27 Akim Demaille <akim@epita.fr>
22040 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22041 * Makefile.maint: Sync. with CVS Autoconf.
22043 2001-08-27 Marc Autret <autret_m@epita.fr>
22045 * src/vcg.h (struct infoname_s): New.
22046 (struct colorentry_s): New.
22047 (graph_s): New fields {vertical,horizontal}_order in structure.
22048 Add `infoname' field.
22049 Add `colorentry' field;
22050 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22051 (G_HORIZONTAL_ORDER): New.
22053 (G_COLORENTRY): New.
22054 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22055 Add output of `infoname'.
22056 Add output of `colorentry'.
22058 2001-08-27 Marc Autret <autret_m@epita.fr>
22060 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22061 This one shadowed a global parameter.
22063 2001-08-24 Marc Autret <autret_m@epita.fr>
22065 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22066 instead of `unsigned'.
22067 (print_state): Do not call obstack_object_size () in obstack_grow ()
22068 to avoid macro variables shadowing.
22070 2001-08-23 Marc Autret <autret_m@epita.fr>
22072 * src/lex.c (percent_table): Typo: s/naem/name/.
22074 Normalize new options declarations.
22076 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22078 * tests/suite.at: Exercise %header_extension and %source_extension.
22080 2001-08-16 Marc Autret <autret_m@epita.fr>
22082 * src/reader.c (parse_dquoted_param): New.
22083 (parse_header_extension_decl): Use it.
22084 (parse_source_extension_decl): Likewise.
22086 2001-08-16 Marc Autret <autret_m@epita.fr>
22088 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
22089 (get_xxxx_str): Use assert () instead of complain ().
22090 Remove return invokations in default cases.
22091 (get_decision_str): Modify default behaviour. Remove second argument.
22092 Echo modifications on calls.
22093 (output_graph): Fix.
22095 2001-08-16 Marc Autret <autret_m@epita.fr>
22097 * src/getargs.c (usage): Update with ``-g, --graph''.
22099 2001-08-16 Marc Autret <autret_m@epita.fr>
22101 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
22102 (Option Cross Key): Likewise.
22103 * doc/bison.1: Update.
22105 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
22107 * src/output.c (output_master_parser): Don't finish action_obstack.
22108 (output_parser): Don't care about the muscle action, here.
22109 (prepare): Copy the action_obstack in the action muscle.
22110 (output): Free action_obstack.
22112 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22114 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
22115 will contain `%union' declaration.
22116 (parse_union_decl): Delete #line directive output.
22117 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
22118 informations about %union.
22119 (parse_union_decl): Copy the union_obstack in the muscle stype.
22120 * src/bison.simple: Add new #line directive.
22121 Add typdef %%stype YYSTYPE.
22123 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
22125 * src/bison.simple: Add new `#line' directive.
22127 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
22129 * src/bison.simple: New `#line' directive.
22130 * src/output.c (output_parser): Support new dynamic muscle input_line.
22132 2001-09-22 Marc Autret <autret_m@epita.fr>
22134 * src/output.c (output_master_parser): New.
22135 (output_parser): Be more re-entrant.
22137 2001-09-21 Marc Autret <autret_m@epita.fr>
22139 * src/reader.c (copy_definition, parse_union_decl): Update and use
22141 (copy_action): Likewise.
22142 Use obstack_1grow ().
22143 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
22145 2001-09-21 Marc Autret <autret_m@epita.fr>
22147 * src/options.c (option_table): Adjust.
22148 * src/lex.c (parse_percent_token): Fix.
22150 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22152 * src/options.c (symtab.h): Include it, need by lex.h.
22154 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
22156 * src/lex.c (parse_percent_token): Change type of variable `tx', which
22157 is now an option_table_struct*.
22158 (option_strcmp): New function option_strcmp.
22159 (parse_percent_token): Call option_strcmp.
22160 * src/getargs.c (xalloc.h, options.h): Include it.
22161 (getargs): Call create_long_option_table.
22162 (getargs): Free longopts at the end of the function.
22163 (shortopts): Move in options.c.
22164 * src/options.c (create_long_option_table): New function. Convert
22165 information from option_table to option structure.
22166 * src/reader.c (options.h): Include it.
22168 * src/Makefile.am: Adjust.
22169 * src/options.c (option_table): Create from longopts and percent_table.
22170 * src/getargs.c (longopts): Delete.
22171 * src/lex.c (struct percent_table_struct): Delete.
22172 (percent_table): Delete.
22173 (options.h): Include it.
22174 * src/options.c: Create.
22175 * src/options.h: Create.
22176 Declare enum opt_access_e.
22177 Define struct option_table_struct.
22179 2001-09-20 Marc Autret <autret_m@epita.fr>
22181 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
22184 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
22186 * src/bison.simple: s/%%filename/%%skeleton.
22187 * src/muscle_tab.c (getargs.h): Include it.
22188 (muscle_init): Insert new muscle skeleton.
22190 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
22192 * src/output.c (output_parser): Delete unused variable actions_dumped.
22194 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
22196 * src/output.c (output): Delete call to reader_output_yylsp.
22197 * src/reader.c (reader): Likewise.
22198 * src/reader.h: Delete declaration of reader_output_yylsp.
22200 2001-09-02 Marc Autret <autret_m@epita.fr>
22202 * src/reader.c: Include muscle_tab.h.
22203 (parse_union_decl): Update.
22204 (parse_macro_decl): Rename parse_muscle_decl.
22205 Update to use renamed functions and variable.
22206 (read_declarations, copy_action, read_additionnal_code, : Updated
22207 with correct variables and functions names.
22208 (packsymbols, reader): Likewise.
22210 * src/reader.h (muscle_obstack): Extern declaration update.
22212 * src/output.c: Include muscle_tab.h
22213 In all functions using macro_insert, change by using muscle_insert ().
22214 (macro_obstack): Rename muscle_obstack.
22215 Echo modifications in the whole file.
22216 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
22217 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
22218 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
22220 * src/muscle_tab.h: Update double inclusion macros.
22221 (macro_entry_s): Rename muscle_entry_s.
22224 * src/muscle_tab.c: Include muscle_tab.h.
22225 Rename macro_tabble to muscle_table.
22226 (mhash1, mhash2, mcmp): Use muscle_entry.
22227 (macro_init): Rename muscle_init. Update.
22228 (macro_insert): Rename muscle_insert. Update.
22229 (macro_find): Rename muscle_find. Update.
22231 * src/main.c: Include muscle_tab.h.
22232 (main): Call muscle_init ().
22233 * src/Makefile.am (bison_SOURCES): Echo modifications.
22235 2001-09-02 Marc Autret <autret_m@epita.fr>
22237 Now the files macro_tab.[ch] are named muscle_tab.[ch].
22239 * src/muscle_tab.c, src/muscle_tab.h: Add files.
22241 2001-09-02 Marc Autret <autret_m@epita.fr>
22243 * src/macrotab.c, src/macrotab.h: Remove.
22245 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
22247 * src/reader.c (copy_guard): Use muscle to specify the `#line'
22250 2001-09-01 Marc Autret <autret_m@epita.fr>
22252 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
22253 to an explicit value to activate the feature. We do it here.
22255 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22257 * src/output.c (prepare): Delete the `filename' muscule insertion.
22258 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
22259 (parse_union_decl): Likewise.
22260 * src/macrotab.c (macro_init): Initialize filename by infile.
22262 2001-08-31 Marc Autret <autret_m@epita.fr>
22264 * src/bison.simple (YYLSP_NEEDED): New definition.
22265 * src/output.c (prepare): Add macro insertion of `locations_flag'
22267 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22269 * src/output.c (prepare): Delete insertion of previous muscles,
22270 and insert the `prefix' muscles.
22271 * src/macrotab.c (macro_init): Likewise.
22272 (macro_init): Initialization prefix directive by `yy'.
22273 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
22274 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
22275 yylval, yydebug, yyerror, yynerrs and yyparse.
22276 New directive `#define' to substitute yydebug, ... with option
22279 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22281 * src/main.c (main): Standardize.
22282 * src/output.c (output_table_data, output_parser): Likewise.
22283 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
22285 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
22287 * src/reader.c (read_additionnal_code): Rename %%user_code to
22289 * src/output.c (output): Rename %%declarations to %%prologue.
22290 * src/bison.simple: Echo modifications.
22292 2001-08-31 Marc Autret <autret_m@epita.fr>
22294 * src/reader.c (readgram): CleanUp.
22295 (output_token_defines): Likewise.
22296 (packsymbols): Likewise.
22297 (reader): Likewise.
22298 * src/output.c (output): CPP-out useless code.
22300 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
22302 * src/reader.c (reader): Delete obsolete call to function
22303 output_trailers and output_headers.
22304 * src/output.h: Remove obsolete functions prototypes of output_headers
22305 and output_trailers.
22307 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
22309 * src/main.c: Include macrotab.h.
22310 * src/macrotab.h (macro_entry_s): Constify fields.
22311 Adjust functions prototypes.
22312 * src/macrotab.c (macro_insert): Constify key and value.
22313 (macro_find): Constify key.
22314 (macro_insert): Include 'xalloc.h'
22315 (macro_insert): Use XMALLOC.
22316 (macro_find): Constify return value.
22317 * src/output.c (output_table_data): Rename table to table_data.
22318 (output_parser): Constify macro_key, macro_value.
22320 2001-08-30 Marc Autret <autret_m@epita.fr>
22322 * src/reader.c (parse_skel_decl): New.
22323 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
22324 * src/lex.h (token_t): New token `tok_skel'.
22325 * src/lex.c (percent_table): Add skeleton option entry.
22328 2001-08-29 Marc Autret <autret_m@epita.fr>
22330 * src/bison.simple: Add %%user_code directive at the end.
22331 * src/reader.c (read_additionnal_code): New.
22333 * src/output.c (output_program): Remove.
22336 2001-08-28 Marc Autret <autret_m@epita.fr>
22338 * src/output.c (output_actions): Clean up.
22339 (output_gram): CPP-out useless code.
22340 * src/reader.c (reader): Clean up, CPP-out useless code.
22342 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
22344 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
22346 * src/bison.simple: Add `%%definitions'.
22348 2001-08-28 Marc Autret <autret_m@epita.fr>
22350 * config/depcomp: New file.
22352 2001-08-27 Paul Eggert <eggert@twinsun.com>
22354 * src/bison.simple (yyparse): Don't take the address of an
22355 item before the start of an array, as that doesn't conform to
22358 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22360 * src/output.c (output): Remove the initialization of the macro
22361 obstack. It was done too late here.
22363 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
22365 (reader): Initialize the macro obstack here, since we need it to grow
22366 '%define' directives.
22368 * src/reader.h: Declare the macro obstack as extern.
22370 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
22372 * src/output.c (output_parser): Fix. Store single '%' characters in
22373 the output obstack instead of throwing them away.
22375 2001-08-27 Akim Demaille <akim@epita.fr>
22377 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22379 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22381 * lib/Makefile.am: Adjust.
22383 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22385 * src/bison.simple: Update and add '%%' directives.
22387 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22389 * src/reader.c (reader): Remove calls to 'output_headers' and
22390 'output_trailers'. Remove some C output.
22391 (readgram): Disable a piece of code that was writing a default
22392 definition for 'YYSTYPE'.
22393 (reader_output_yylsp): Remove.
22394 (packsymbols): Output token defintions to a macro.
22395 (copy_definition): Disable C output.
22397 * src/reader.c (parse_macro_decl): New function used to parse macro
22399 (copy_string2): Put the body of copy_string into this new function.
22400 Add a parameter to let the caller choose whether he wants to copy the
22401 string delimiters or not.
22402 (copy_string): Be a simple call to copy_string2 with the last argument
22404 (read_declarations): Add case for macro definition.
22405 (copy_identifier): New.
22406 (parse_macro_decl): Read macro identifiers using copy_identifier
22409 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22411 * src/output.c (prepare): Add prefixed names.
22412 (output_parser): Output semantic actions.
22413 (output_parser): Fix bug on '%%line' directives.
22415 * src/output.c (output_headers): Remove. The C code printed by this
22416 function should now be in the skeletons.
22417 (output_trailers): Remove.
22418 (output): Disable call to 'reader_output_yylsp'.
22419 (output_rule_data): Do not output tables to the table obstack.
22421 * src/output.c: Remove some C dedicated output.
22422 Improve the use of macro and output obstacks.
22423 (output_defines): Remove.
22425 * src/output.c (output_token_translations): Associate 'translate'
22426 table with a macro. No output to the table obstack.
22427 (output_gram): Same for 'rhs' and 'prhs'.
22428 (output_stos): Same for 'stos'.
22429 (output_rule_data): Same for 'r1' and 'r2'.
22430 (token_actions): Same for 'defact'.
22431 (goto_actions): Same for 'defgoto'.
22432 (output_base): Same for 'pact' and 'pgoto'.
22433 (output_table): Same for 'table'.
22434 (output_check): Same for 'check'.
22436 * src/output.c (output_table_data): New function.
22437 (output_short_table): Remove.
22438 (output_short_or_char_table): Remove.
22440 * src/output.c (output_parser): Replace most of the skeleton copy code
22441 with something new. Skeletons are now processed character by character
22442 rather than line by line, and Bison looks for '%%' macros. This is the
22443 first step in making Bison's output process (a lot) more flexible.
22444 (output_parser): Use the macro table.
22446 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22448 * src/main.c (main): Initialize the macro table.
22450 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22452 * src/lex.c (percent_table): Add tok_define.
22453 * src/lex.h: Add tok_define.
22455 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22457 * src/macrotab.c: New file.
22458 * src/macrotab.h: New file.
22459 * src/Makefile.am: Update.
22461 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
22463 * lib/hash.c: New file.
22464 * lib/hash.h: New file.
22465 * lib/Makefile.am: Update.
22467 2001-08-15 Akim Demaille <akim@epita.fr>
22471 2001-08-15 Marc Autret <autret_m@epita.fr>
22473 * src/reader.c (readgram): Indent output macro YYSTYPE.
22474 (packsymbols): Likewise.
22475 (output_token_defines): Likewise.
22476 * src/files.c: Standardize.
22477 (compute_header_macro): New.
22478 (defines_obstack_save): New. Use compute_header_macro.
22479 (output_files): Update. Use defines_obstack_save.
22481 2001-08-15 Akim Demaille <akim@epita.fr>
22483 * doc/bison.texinfo (Table of Symbols): Document
22484 YYSTACK_USE_ALLOCA.
22486 2001-08-15 Akim Demaille <akim@epita.fr>
22488 * missing: Update from CVS Automake.
22489 * config/config.guess, config/config.sub, config/texinfo.tex:
22490 Update from gnu.org.
22492 2001-08-15 Akim Demaille <akim@epita.fr>
22494 * Makefile.maint: Sync with CVS Autoconf.
22496 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
22498 * doc/bison.texinfo: Include GNU Free Documentation License from
22500 * doc/fdl.texi: Add to package.
22502 2001-08-14 Marc Autret <autret_m@epita.fr>
22504 Turn on %{source,header}_extension features.
22506 * src/lex.c (percent_table): Un-CPP out header_extension and
22508 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
22509 (compute_exts_from_src): Remove conditions. It restores priorities
22512 2001-08-14 Marc Autret <autret_m@epita.fr>
22514 * src/files.c (compute_base_names): Add extensions computing when
22515 `--file-prefix' used.
22516 Standardize function calls.
22518 2001-08-13 Marc Autret <autret_m@epita.fr>
22520 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
22521 defining it (defined but null disables alloca).
22523 2001-08-13 Marc Autret <autret_m@epita.fr>
22525 * src/bison.simple (_yy_memcpy): CPP reformat.
22527 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
22529 * tests/atconfig.in (CPPFLAGS): Fix.
22531 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
22533 * doc/bison.texinfo: Include GNU General Public License from
22535 * doc/gpl.texi: Add to package.
22537 2001-08-10 Marc Autret <autret_m@epita.fr>
22539 * src/print_graph.h: Fix.
22540 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
22542 2001-08-10 Akim Demaille <akim@epita.fr>
22544 * src/system.h: Provide default declarations for stpcpy, strndup,
22547 2001-08-10 Robert Anisko <anisko_r@epita.fr>
22549 * doc/bison.texinfo (Locations): Update @$ stuff.
22551 2001-08-09 Robert Anisko <anisko_r@epita.fr>
22553 * src/bison.simple (YYLLOC_DEFAULT): Update.
22556 2001-08-08 Marc Autret <autret_m@epita.fr>
22558 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
22559 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22560 Reported by Fabrice Bauzac.
22562 2001-08-08 Marc Autret <autret_m@epita.fr>
22564 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22565 * src/vcg.c (output_node): Fix.
22566 * src/vcg.h: Cleanup.
22567 * src/print_graph.c: Add comments.
22568 (node_output_size): New global variable. Simplify the formatting of
22569 the VCG graph output.
22570 (print_actions): Unused code is now used. It notifies the final state
22571 and no action states in the VCG graph. It also give the reduce actions.
22572 The `shift and goto' edges are red and the `go to state' edges are
22574 Get the current node name and node_obstack by argument.
22575 (node_obstack): New variable.
22576 (print_state): Manage node_obstack.
22577 (print_core): Use node_obstack given by argument.
22578 A node is not only computed here but in print_actions also.
22579 (print_graph): CPP out useless code instead of commenting it.
22581 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22583 * tests/atconfig.in (CPPFLAGS): Fix.
22585 2001-08-07 Akim Demaille <akim@epita.fr>
22587 * src/print_graph.c (quote): New.
22588 (print_core): Use it.
22590 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22592 * src/vcg.c (complain.h): Include it.
22593 Unepitaize `return' invocations.
22594 [NDEBUG] (main): Remove.
22595 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22596 * src/files.c (open_files): Initialize graph_obstack.
22597 * src/print_graph.c (print_actions): CPP out useless code.
22598 (print_core): Don't output the last `\n' in labels.
22600 * src/files.c (output_files): Output the VCG file.
22601 * src/main.c (main): Invoke print_graph ();
22603 2001-08-06 Marc Autret <autret_m@epita.fr>
22605 Automaton VCG graph output.
22606 Using option ``-g'' or long option ``--graph'', you can generate
22607 a gram_filename.vcg file containing a VCG description of the LALR (1)
22608 automaton of your grammar.
22610 * src/main.c: Call to print_graph() function.
22611 * src/getargs.h: Update.
22612 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22613 (graph_flag): New flag.
22614 (longopts): Update.
22615 (getargs): Add case `g'.
22616 * src/files.c (graph_obstack): New obstack struct.
22617 (open_files): Initialize new obstack.
22618 (output_files): Saves graph_obstack if required.
22619 * src/files.h (graph_obstack): New extern declaration.
22620 * src/Makefile.am: Add new source files.
22622 2001-08-06 Marc Autret <autret_m@epita.fr>
22624 * src/print_graph.c, src/print_graph.h (graph): New.
22625 * src/vcg.h: New file.
22626 * src/vcg.c: New file, VCG graph handling.
22628 2001-08-06 Marc Autret <autret_m@epita.fr>
22630 Add of %source_extension and %header_extension which specify
22631 the source or/and the header output file extension.
22633 * src/files.c (compute_base_names): Remove initialisation of
22634 src_extension and header_extension.
22635 (compute_exts_from_gf): Update.
22636 (compute_exts_from_src): Update.
22637 (output_files): Update.
22638 * src/reader.c (parse_header_extension_decl): New.
22639 (parse_source_extension_decl): New.
22640 (read_declarations): New case statements for the new tokens.
22641 * src/lex.c (percent_table): Add entries for %source_extension
22642 and %header_extension.
22643 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22645 2001-08-06 Marc Autret <autret_m@epita.fr>
22647 * configure.in: Bump to 1.28c.
22648 * doc/bison.texinfo: Texinfo thingies.
22650 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22652 * tests/atconfig.in (CPPFLAGS): Add.
22653 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22655 2001-08-03 Akim Demaille <akim@epita.fr>
22659 2001-08-03 Akim Demaille <akim@epita.fr>
22661 * tests/Makefile.am (check-local): Ship testsuite.
22662 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22663 Include `string.h'.
22665 2001-08-03 Akim Demaille <akim@epita.fr>
22667 * configure.in: Try using -Wformat when compiling.
22669 2001-08-03 Akim Demaille <akim@epita.fr>
22671 * configure.in: Bump to 1.28b.
22673 2001-08-03 Akim Demaille <akim@epita.fr>
22675 * src/complain.c: Adjust strerror_r portability issues.
22677 2001-08-03 Akim Demaille <akim@epita.fr>
22681 2001-08-03 Akim Demaille <akim@epita.fr>
22683 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22684 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22685 * src/getargs.c: Include complain.h.
22686 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22687 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22689 2001-08-03 Akim Demaille <akim@epita.fr>
22691 * src/reader.c (readgram): Display hidden chars in error messages.
22693 2001-08-03 Akim Demaille <akim@epita.fr>
22695 Update to gettext 0.10.39.
22697 2001-08-03 Akim Demaille <akim@epita.fr>
22699 * lib/strspn.c: New.
22701 2001-08-01 Marc Autret <autret_m@epita.fr>
22703 * doc/bison.texinfo: Update.
22704 * doc/bison.1 (mandoc): Update.
22705 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22706 * src/files.c: Support output files extensions computing.
22707 (src_extension): New static variable.
22708 (header_extension): New static variable.
22709 (tr): New function.
22710 (get_extension_index): New function, gets the index of an extension
22711 filename in a string.
22712 (compute_exts_from_gf): New function, computes extensions from the
22713 grammar file extension.
22714 (compute_exts_from_src): New functions, computes extensions from the
22715 C source file extension, file given by ``-o'' option.
22716 (compute_base_names): Update.
22717 (output_files): Update.
22719 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22721 * doc/bison.texi: Document @$.
22722 (Locations): New section.
22724 2001-07-18 Akim Demaille <akim@epita.fr>
22726 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22727 * config/prev-version.txt, config/move-if-change: New.
22728 * Makefile.am: Adjust.
22730 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22732 * src/bison.simple (yyparse): Suppress warning `comparaison
22733 between signed and unsigned'.
22735 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22737 * src/getargs.h (raw_flag): Remove.
22738 * src/getargs.c: Die on `-r'/`--raw'.
22739 * src/lex.c (parse_percent_token): Die on `%raw'.
22740 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22741 * tests/calc.at: Suppress test with option `--raw'.
22743 2001-07-14 Akim Demaille <akim@epita.fr>
22746 * configure.in: Require Autoconf 2.50.
22747 Update to gettext 0.10.38.
22749 2001-03-16 Akim Demaille <akim@epita.fr>
22751 * doc/bison.texinfo: ANSIfy the examples.
22753 2001-03-16 Akim Demaille <akim@epita.fr>
22755 * getargs.c (skeleton): New variable.
22756 (longopts): --skeleton is a new option.
22757 (shortopts, getargs): -S is a new option.
22758 * getargs.h: Declare skeleton.
22759 * output.c (output_parser): Use it.
22761 2001-03-16 Akim Demaille <akim@epita.fr>
22763 * m4/strerror_r.m4: New.
22764 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22765 * lib/error.h, lib/error.c: Update.
22767 2001-03-16 Akim Demaille <akim@epita.fr>
22769 * src/getargs.c (longopts): Clean up.
22771 2001-02-21 Akim Demaille <akim@epita.fr>
22773 * src/reader.c (gensym): `gensym_count' is your own.
22774 Use a static buf to create the symbol name, as token_buffer is no
22777 2001-02-08 Akim Demaille <akim@epita.fr>
22779 * src/conflicts.c (conflict_report): Be sure not to append to res
22780 between two calls, which could happen if both first sprintf were
22781 skipped, but not the first cp += strlen.
22783 2001-02-08 Akim Demaille <akim@epita.fr>
22785 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22786 New, from fileutils 4.0.37.
22787 * configure.in: Require Autoconf 2.49c. I took some time before
22788 making this decision. This is the only way out for portability
22789 issues in Bison, it would mean way too much duplicate effort to
22790 import in Bison features implemented in 2.49c since 2.13.
22791 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22793 2001-02-02 Akim Demaille <akim@epita.fr>
22795 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22796 * lib/xalloc.h, lib/xmalloc.c: Update.
22798 2001-01-19 Akim Demaille <akim@epita.fr>
22800 Get rid of the ad hoc handling of token_buffer in the scanner: use
22803 * src/lex.c (token_obstack): New.
22804 (init_lex): Initialize it. No longer call...
22805 (grow_token_buffer): this. Remove it.
22806 Adjust all the places which used it to use the obstack.
22808 2001-01-19 Akim Demaille <akim@epita.fr>
22810 * src/lex.h: Rename all the tokens:
22811 s/\bENDFILE\b/tok_eof/g;
22812 s/\bIDENTIFIER\b/tok_identifier/g;
22814 Let them be enums, not #define, to ease debugging.
22815 Adjust all the code.
22817 2001-01-18 Akim Demaille <akim@epita.fr>
22819 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22820 * src/lex.c (maxtoken, grow_token_buffer): Static.
22822 2001-01-18 Akim Demaille <akim@epita.fr>
22824 Since we now use obstacks, more % directives can be enabled.
22826 * src/lex.c (percent_table): Also accept `%yacc',
22827 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22829 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22830 instead of returning a token.
22831 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22832 * src/reader.c (read_declarations): Adjust.
22833 * src/files.c (open_files): Don't call `compute_base_names', don't
22834 compute `attrsfile' since they depend upon data which might be
22835 *in* the input file now.
22836 (output_files): Do it here.
22837 * src/output.c (output_headers): Document the fact that this patch
22838 introduces a guaranteed SEGV for semantic parsers.
22839 * doc/bison.texinfo: Document them.
22840 * tests/suite.at: Exercise these %options.
22842 2000-12-20 Akim Demaille <akim@epita.fr>
22844 Also handle the output file (--verbose) with obstacks.
22846 * files.c (foutput): Remove.
22847 (output_obstack): New.
22848 Adjust all dependencies.
22849 * src/conflicts.c: Return a string.
22850 * src/system.h (obstack_grow_string): Rename as...
22851 (obstack_sgrow): this. Be ready to work with non literals.
22852 (obstack_fgrow4): New.
22854 2000-12-20 Akim Demaille <akim@epita.fr>
22856 * src/files.c (open_files): Fix the computation of short_base_name
22857 in the case of `-o foo.tab.c'.
22859 2000-12-20 Akim Demaille <akim@epita.fr>
22861 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22862 (copy_dollar): Now that everything uses obstacks, get rid of the
22865 2000-12-20 Akim Demaille <akim@epita.fr>
22867 * src/files.c (open_files): Actually the `.output' file is based
22868 on the short_base_name, not base_name.
22869 * tests/suite.at (Checking output file names): Adjust.
22871 2000-12-20 Akim Demaille <akim@epita.fr>
22873 * src/bison.s1: Remove, we now use directly...
22874 * src/bison.simple: this.
22875 * src/Makefile.am: Use pkgdata instead of data.
22877 2000-12-20 Akim Demaille <akim@epita.fr>
22879 * src/files.c (guard_obstack): New.
22880 (open_files): Initialize it.
22881 (output_files): Dump it...
22882 * src/files.h: Export it.
22883 * src/reader.c (copy_guard): Use it.
22885 2000-12-19 Akim Demaille <akim@epita.fr>
22887 * src/files.c (outfile, defsfile, actfile): Removed as global
22889 (open_files): Don't compute them.
22890 (output_files): Adjust.
22891 (base_name, short_base_name): Be global.
22892 Adjust dependencies.
22894 2000-12-19 Akim Demaille <akim@epita.fr>
22896 * src/files.c (strsuffix): New.
22897 (stringappend): Be just like strcat but allocate.
22898 (base_names): Eve out from open_files.
22899 Try to simplify the rather hairy computation of base_name and
22901 (open_files): Use it.
22902 * tests/suite.at (Checking output file names): New test.
22904 2000-12-19 Akim Demaille <akim@epita.fr>
22906 * src/system.h (obstack_grow_literal_string): Rename as...
22907 (obstack_grow_string): this.
22908 * src/output.c (output_parser): Recognize `%% actions' instead of
22910 * src/bison.s1: s/$/%% actions/.
22911 * src/bison.hairy: Likewise.
22913 2000-12-19 Akim Demaille <akim@epita.fr>
22915 * src/output.c (output_parser): Compute the `#line' lines when
22917 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22918 Suggested by Hans Aberg.
22920 2000-12-19 Akim Demaille <akim@epita.fr>
22922 Let the handling of the skeleton files be local to the procedures
22925 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22927 (fparser, open_extra_files): Remove.
22928 (open_files, output_files): Don't take care of fparser.
22929 * src/files.h: Adjust.
22930 * src/output.c (output_parser): Open and close the file to the
22932 * src/reader.c (read_declarations): When %semantic_parser, open
22935 2000-12-19 Akim Demaille <akim@epita.fr>
22937 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22938 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22940 2000-12-19 Akim Demaille <akim@epita.fr>
22942 * src/files.c (open_files): Yipee! We no longer need all the code
22943 looking for `/tmp' since we have no tmp file.
22945 2000-12-19 Akim Demaille <akim@epita.fr>
22947 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22949 * src/files.c (open_files): Less dependency on MSDOS etc.
22951 2000-12-14 Akim Demaille <akim@epita.fr>
22953 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22954 Provide a default definition.
22955 Use it when executing the default @ action.
22956 * src/reader.c (reader_output_yylsp): No longer include
22957 `timestamp' and `text' in the default YYLTYPE.
22959 2000-12-12 Akim Demaille <akim@epita.fr>
22961 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22962 (copy_guard): Quote the file names.
22963 Reported by Laurent Mascherpa.
22965 2000-12-12 Akim Demaille <akim@epita.fr>
22967 * src/output.c (output_headers, output_program, output): Be sure
22968 to escape special characters when outputting filenames.
22969 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22970 (output_headers): Don't depend on them, Use ACTSTR.
22972 2000-11-17 Akim Demaille <akim@epita.fr>
22974 * lib/obstack.h: Formatting changes.
22975 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22976 prevents type checking.
22977 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22978 cast the value to (void *): assigning a `foo *' to a `void *'
22980 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22981 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22984 2000-11-17 Akim Demaille <akim@epita.fr>
22986 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22988 (suite.m4, regression.m4, calc.m4): these.
22989 * tests/atgeneral.m4: Update from CVS Autoconf.
22991 2000-11-17 Akim Demaille <akim@epita.fr>
22993 * tests/regression.m4 (%union and --defines): New test,
22994 demonstrating a current bug in the obstack implementation.
22996 2000-11-17 Akim Demaille <akim@epita.fr>
22998 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23000 Use them to declare the variables which are global or local to
23003 2000-11-17 Akim Demaille <akim@epita.fr>
23005 * acconfig.h: Remove, no longer used.
23007 2000-11-07 Akim Demaille <akim@epita.fr>
23009 * src: s/Copyright (C)/Copyright/g.
23011 2000-11-07 Akim Demaille <akim@epita.fr>
23013 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23015 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23017 2000-11-07 Akim Demaille <akim@epita.fr>
23019 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23020 Merge in a single CPP if/else.
23022 2000-11-07 Akim Demaille <akim@epita.fr>
23024 * src/output.c (output): Remove useless variables.
23025 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23026 argument `data' for consistency with the prototypes.
23027 Qualify it `const'.
23028 (obstack_copy, obstack_copy0): Rename the second argument as
23029 `address' for consistency. Qualify it `const'.
23030 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23031 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23032 `const' their input argument (`data' or `address').
23033 Adjust the corresponding macros to include `const' in casts.
23035 2000-11-03 Akim Demaille <akim@epita.fr>
23037 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23038 s/PFILE1/BISON_HAIRY/.
23039 Adjust dependencies.
23041 2000-11-03 Akim Demaille <akim@epita.fr>
23043 For some reason, this was not applied.
23045 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23046 `unlink': it's no longer used.
23048 2000-11-03 Akim Demaille <akim@epita.fr>
23050 * src/files.c (skeleton_find): New function, eved out of...
23051 (open_files, open_extra_files): here.
23053 2000-11-03 Akim Demaille <akim@epita.fr>
23055 Don't use `atexit'.
23057 * src/files.c (obstack_save): New function.
23058 (done): Rename as...
23059 (output_files): this.
23060 Use `obstack_save'.
23061 * src/main.c (main): Don't use `atexit' to register `done', since
23062 it no longer has to remove tmp files, just call `output_files'
23063 when there are no errors.
23065 2000-11-02 Akim Demaille <akim@epita.fr>
23067 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23068 `unlink': it's no longer used.
23069 * src/files.h: Formatting changes.
23071 2000-11-02 Akim Demaille <akim@epita.fr>
23073 Remove the last uses of mktemp and unlink/delete.
23075 * src/files.c (fdefines, ftable): Removed.
23076 (defines_ostack, table_obstack): New.
23077 Adjust dependencies of the former into uses of the latter.
23078 * src/output.c (output_short_or_char_table, output_short_table):
23079 Convert to using obstacks.
23080 * src/reader.c (copy_comment2): Accept one FILE * and two
23082 (output_token_defines, reader_output_yylsp): Use obstacks.
23083 * src/system.h (obstack_fgrow3): New.
23084 * po/POTFILES.in: Adjust.
23086 2000-11-01 Akim Demaille <akim@epita.fr>
23088 Change each use of `fattrs' into a use of `attrs_obstack'.
23090 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
23091 * src/files.c (fattrs): Remove.
23092 (attrs_obstack): New.
23093 Adjust all dependencies.
23094 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
23096 2000-11-01 Akim Demaille <akim@epita.fr>
23098 Introduce obstacks.
23099 Change each use of `faction' into a use of `action_obstack'.
23101 * lib/obstack.h, lib/obstack.c: New files.
23102 * src/files.c (faction): Remove.
23103 (action_obstack): New.
23104 Adjust all dependencies.
23106 2000-10-20 Akim Demaille <akim@epita.fr>
23108 * lib/quote.h (PARAMS): New macro. Use it.
23110 2000-10-16 Akim Demaille <akim@epita.fr>
23112 * src/output.c (output_short_or_char_table): New function.
23113 (output_short_table, output_token_translations): Use it.
23114 (goto_actions): Use output_short_table.
23116 2000-10-16 Akim Demaille <akim@epita.fr>
23118 * src/symtab.c (bucket_new): New function.
23121 * src/output.c (output_short_table): New argument to display the
23122 comment associated with the table.
23123 Adjust dependencies.
23124 (output_gram): Use it.
23125 (output_rule_data): Nicer output layout for YYTNAME.
23127 2000-10-16 Akim Demaille <akim@epita.fr>
23129 * src/lex.c (read_typename): New function.
23131 * src/reader.c (copy_dollar): Likewise.
23133 2000-10-16 Akim Demaille <akim@epita.fr>
23135 * src/reader.c (copy_comment2): Expect the input stream to be on
23136 the `/' which is suspected to open a comment, instead of being
23137 called after `//' or `/*' was read.
23138 (copy_comment, copy_definition, parse_union_decl, copy_action)
23139 (copy_guard): Adjust.
23141 2000-10-16 Akim Demaille <akim@epita.fr>
23143 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
23144 `read_signed_integer'.
23146 2000-10-16 Akim Demaille <akim@epita.fr>
23148 * src/reader.c (copy_dollar): New function.
23149 (copy_guard, copy_action): Use it.
23151 2000-10-16 Akim Demaille <akim@epita.fr>
23153 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
23154 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
23155 New files, from Fileutils 4.0.27.
23156 * src/main.c (printable_version): Remove.
23157 * src/lex.c, src/reader.c: Use `quote'.
23159 2000-10-04 Akim Demaille <akim@epita.fr>
23161 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
23163 2000-10-04 Akim Demaille <akim@epita.fr>
23165 * doc/bison.texinfo: Various typos spotted by Neil Booth.
23167 2000-10-04 Akim Demaille <akim@epita.fr>
23169 When a literal string is used to define two different tokens,
23170 `bison -v' segfaults.
23171 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
23173 * tests/regression.m4: New file.
23174 Include the core of the sample provided by Piotr Gackiewicz.
23175 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
23178 2000-10-04 Akim Demaille <akim@epita.fr>
23180 * src/reader.c (parse_expect_decl): Keep `count' within the size
23184 2000-10-02 Paul Eggert <eggert@twinsun.com>
23186 * bison.s1 (yyparse): Assign the default value
23187 unconditionally, to avoid a GCC warning and make the parser a
23190 2000-10-02 Akim Demaille <akim@epita.fr>
23192 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
23195 2000-10-02 Akim Demaille <akim@epita.fr>
23197 * src/derives.c, src/print.c, src/reduce.c: To ease the
23198 translation, move some `\n' out of the translated strings.
23200 2000-10-02 Akim Demaille <akim@epita.fr>
23202 The location tracking mechanism is precious for parse error
23203 messages. Nevertheless, it is enabled only when `@n' is used in
23204 the grammar, which is a different issue (you can use it in error
23205 message, but not in the grammar per se). Therefore, there should
23206 be another means to enable it.
23208 * src/getargs.c (getargs): Support `--locations'.
23209 (usage): Report it.
23210 * src/getargs.h (locationsflag): Export it.
23211 * src/lex.c (percent_table): Support `%locations'.
23212 * src/reader.c (yylsp_needed): Remove this variable, now replaced
23213 with `locationsflag'.
23214 * doc/bison.texinfo: Document `--locations' and `%locations'.
23216 * tests/calc.m4: Test it.
23218 For regularity of the names, replace each
23219 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
23220 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
23221 In addition replace each `flag' with `_flag'.
23223 2000-10-02 Akim Demaille <akim@epita.fr>
23225 Also test parse error messages, including with YYERROR_VERBOSE.
23227 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
23229 Use it to check the computations.
23230 Use it to check `nonassoc' is honored.
23231 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
23232 `--yyerror-verbose'.
23233 (_AT_CHECK_CALC): Adjust to this option.
23234 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
23236 2000-10-02 Akim Demaille <akim@epita.fr>
23238 Test also `--verbose', `--defines' and `--name-prefix'. Testing
23239 the latter demonstrates a flaw in the handling of non debugging
23240 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
23241 was used in order to simplify:
23257 unfortunately this leads to a CPP conflict when
23258 `--name-prefix=foo' is used since it produces `#define yydebug
23261 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
23262 (YYDPRINTF): New macro.
23264 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
23266 Also test `--verbose', `--defines' and `--name-prefix'.
23268 2000-10-02 Akim Demaille <akim@epita.fr>
23270 Improve the readability of the produced parsers.
23272 * src/bison.s1: Formatting changes.
23273 Improve the comment related to the `$' mark.
23274 (yydefault): Don't fall through to `yyresume': `goto' there.
23275 * src/output.c (output_parser): When the `$' is met, skip the end
23277 New variable, `number_of_dollar_signs', to check there's exactly
23278 one `$' in the parser skeleton.
23280 2000-10-02 Akim Demaille <akim@epita.fr>
23282 * lib/xstrdup.c: New file, from the fileutils.
23283 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
23284 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
23285 instead of strlen + xmalloc + strcpy.
23286 * src/symtab.c (copys): Remove, use xstrdup instead.
23288 2000-10-02 Akim Demaille <akim@epita.fr>
23290 * src/gram.h (associativity): New enum type which replaces the
23291 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
23292 `right_assoc', `left_assoc' and `non_assoc'.
23293 Adjust all dependencies.
23294 * src/reader.c: Formatting changes.
23295 (LTYPESTR): Don't define it, use it as a literal in
23296 `reader_output_yylsp'.
23297 * src/symtab.h (symbol_class): New enum type which replaces the
23298 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
23299 `sunknown', `stoken and `snterm'.
23301 2000-10-02 Akim Demaille <akim@epita.fr>
23303 * src/getargs.c (fixed_outfiles): Rename as...
23304 (yaccflag): for consistency and accuracy.
23305 Adjust dependencies.
23307 2000-10-02 Akim Demaille <akim@epita.fr>
23309 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
23310 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
23311 difficult and introduced a lot of core dump. It turns out that
23312 Bison used an implementation of `xmalloc' based on `calloc', and
23313 at various places it does depend upon the initialization to 0. I
23314 have not tried to isolate the pertinent places, and all the former
23315 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
23316 someone should address this issue.
23318 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
23319 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
23321 Adjust dependencies.
23322 * src/warshall.h: New file.
23325 2000-10-02 Akim Demaille <akim@epita.fr>
23327 Various anti-`extern in *.c' changes.
23329 * src/system.h: Include `assert.h'.
23331 2000-10-02 Akim Demaille <akim@epita.fr>
23333 * src/state.h (nstates, final_state, first_state, first_shift)
23334 (first_reduction): Move their exportation from here...
23335 * src/LR0.h: to here.
23336 Adjust dependencies.
23337 * src/getargs.c (statisticsflag): New variable.
23338 Add support for `--statistics'.
23339 Adjust dependencies.
23341 Remove a lot of now useless `extern' statements in most files.
23343 2000-10-02 Akim Demaille <akim@epita.fr>
23345 * src/LR0.h: New file.
23348 2000-10-02 Akim Demaille <akim@epita.fr>
23350 * src/print.h: New file.
23352 * src/print.c: Formatting and ordering changes.
23353 (verbose, terse): Replace with...
23354 (print_results): this new function.
23355 Adjust dependencies.
23357 2000-10-02 Akim Demaille <akim@epita.fr>
23359 * src/conflicts.c (conflict_report): New function.
23360 (conflict_log, verbose_conflict_log): Replace with...
23361 (print_conflicts): this function.
23362 Adjust dependencies.
23363 * src/conflicts.h: New file.
23364 Propagate its inclusion.
23366 2000-10-02 Akim Demaille <akim@epita.fr>
23368 * src/nullable.h: New file.
23369 Propagate its inclusion.
23370 * src/nullable.c: Formatting changes.
23372 2000-10-02 Akim Demaille <akim@epita.fr>
23374 * src/reduce.h: New file.
23375 Propagate its inclusion.
23376 * src/reduce.c: Topological sort and other formatting changes.
23377 (bool, TRUE, FALSE): Move their definition to...
23378 * src/system.h: here.
23380 2000-10-02 Akim Demaille <akim@epita.fr>
23382 * src/files.c: Formatting changes.
23383 (tryopen, tryclose, openfiles): Rename as...
23384 (xfopen, xfclose, open_files): this.
23385 (stringappend): static.
23386 * src/files.h: Complete the list of exported symbols.
23389 2000-10-02 Akim Demaille <akim@epita.fr>
23391 * src/reader.h: New file.
23392 Propagate its use instead of tedious list of `extern' and
23394 * src/reader.c: Formatting changes, topological sort,
23397 2000-10-02 Akim Demaille <akim@epita.fr>
23399 * src/lex.h: Prototype `lex.c' exported functions.
23400 * src/reader.c: Adjust.
23401 * src/lex.c: Formatting changes.
23402 (safegetc): Rename as...
23405 2000-10-02 Akim Demaille <akim@epita.fr>
23407 * src/lalr.h: New file.
23408 Propagate its inclusion instead of prototypes and `extern'.
23409 * src/lalr.c: Formatting changes, topological sorting etc.
23411 2000-10-02 Akim Demaille <akim@epita.fr>
23413 * src/output.c (token_actions): Introduce a temporary array,
23414 YYDEFACT, that makes it possible for this function to use
23415 output_short_table.
23417 2000-10-02 Akim Demaille <akim@epita.fr>
23419 `user_toknums' is output as a `short[]' in `output.c', while it is
23420 defined as a `int[]' in `reader.c'. For consistency with the
23421 other output tables, `user_toknums' is now defined as a table of
23424 * src/reader.c (user_toknums): Be a short table instead of an int
23426 Adjust dependencies.
23428 Factor the short table outputs.
23430 * src/output.c (output_short_table): New function.
23431 * src/output.c (output_gram, output_stos, output_rule_data)
23432 (output_base, output_table, output_check): Use it.
23434 2000-10-02 Akim Demaille <akim@epita.fr>
23436 * src/output.c (output): Topological sort of the functions, in
23437 order to get rid of the `static' prototypes.
23438 No longer use `register'.
23439 * src/output.h: New file.
23440 Propagate its inclusion in files explicitly prototyping functions
23443 2000-09-21 Akim Demaille <akim@epita.fr>
23445 * src/atgeneral.m4: Update from Autoconf.
23447 2000-09-21 Akim Demaille <akim@epita.fr>
23449 * src/closure.h: New file.
23450 * src/closure.c: Formatting changes, topological sort over the
23451 functions, use of closure.h.
23452 (initialize_closure, finalize_closure): Rename as...
23453 (new_closure, free_closure): these. Adjust dependencies.
23454 * src/LR0.c: Formatting changes, topological sort, use of
23456 (initialize_states): Rename as...
23457 (new_states): this.
23458 * src/Makefile.am (noinst_HEADERS): Adjust.
23460 2000-09-20 Akim Demaille <akim@epita.fr>
23462 * src/acconfig.h: Don't protect config.h against multiple
23464 Don't define PARAMS.
23465 * src/system.h: Define PARAMS.
23466 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
23467 purpose of config.h. system.h must not try to fix wrong
23468 definitions in config.h.
23470 2000-09-20 Akim Demaille <akim@epita.fr>
23472 * src/derives.h: New file.
23473 * src/main.c, src/derives.h: Use it.
23474 Formatting changes.
23475 * src/Makefile.am (noinst_HEADERS): Adjust.
23477 2000-09-20 Akim Demaille <akim@epita.fr>
23479 * tests/atgeneral.m4: Update from Autoconf.
23480 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
23481 (AT_CHECK_CALC): New macros.
23482 Use these macros to test bison with options `', `--raw',
23483 `--debug', `--yacc', `--yacc --debug'.
23485 2000-09-19 Akim Demaille <akim@epita.fr>
23487 * src/output.c: Formatting changes.
23488 * src/machine.h: Remove, leaving its contents in...
23489 * src/system.h: here.
23491 Adjust all dependencies on stdio.h and machine.h.
23492 * src/getargs.h: New file.
23493 Let all `extern' declarations about getargs.c be replaced with
23494 inclusion of `getargs.h'.
23495 * src/Makefile.am (noinst_HEADERS): Adjust.
23497 * tests/calc.m4 (yyin): Be initialized in main, not on the global
23499 (yyerror): Returns void, not int.
23500 * doc/bison.texinfo: Formatting changes.
23502 2000-09-19 Akim Demaille <akim@epita.fr>
23504 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
23507 2000-09-18 Akim Demaille <akim@epita.fr>
23509 * configure.in: Append WARNING_CFLAGS to CFLAGS.
23510 * src/Makefile.am (INCLUDES): Don't.
23511 Be ready to fetch headers in lib/.
23513 2000-09-18 Akim Demaille <akim@epita.fr>
23515 * doc/bison.texinfo: Update the copyright.
23516 ANSIfy and GNUify the examples.
23517 Remove the old menu.
23519 2000-09-18 Akim Demaille <akim@epita.fr>
23521 First set of tests: use the `calc' example from the documentation.
23523 * src/bison.s1 (yyparse): Condition the code using `yytname' which
23524 is defined only when YYDEBUG is.
23525 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
23526 * src/files.c (tryopen, tryclose): Formatting changes.
23527 Move to the top and be static.
23528 * src/reader.c (read_signed_integer): Likewise.
23529 * tests/calc.m4: New file.
23530 * Makefile.am, suite.m4: Adjust.
23531 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
23533 2000-09-18 Akim Demaille <akim@epita.fr>
23535 Add support for an Autotest test suite for Bison.
23537 * m4/m4.m4, m4/atconfig.m4: New files.
23538 * m4/Makefile.am (EXTRA_DIST): Adjust.
23539 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
23541 * src/getargs.c: Display a more standard --version message.
23542 * src/reader.c (reader): Formatting changes.
23543 No longer depend upon VERSION_STRING.
23544 * configure.in: No longer use `dnl'.
23545 Set up the test suite and the new directory `tests/.
23546 (VERSION_STRING): Remove.
23548 2000-04-14 Akim Demaille <akim@epita.fr>
23550 * src/reader.c (copy_comment2): New function, same as former
23551 `copy_comment', but outputs into two FILE *.
23552 (copy_comment): Use it.
23553 (parse_union_decl): Use it.
23554 (get_type, parse_start_decl): Use the same `invalid' message.
23555 (parse_start_decl, parse_union_decl): Use the same `multiple'
23557 (parse_union_decl, copy_guard, copy_action): Use the same
23558 `unmatched' message.
23559 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23561 2000-03-31 Akim Demaille <akim@epita.fr>
23563 * src/files.c (tryopen, tryclose): Move to the top.
23566 2000-03-31 Akim Demaille <akim@epita.fr>
23568 * src/main.c (main): Don't call `done', exit does it.
23570 2000-03-31 Akim Demaille <akim@epita.fr>
23572 * allocate.c: s/return (foo)/return foo/.
23573 * lalr.c: Likewise.
23575 * output.c: Likewise.
23576 * reader.c: Likewise.
23577 * symtab.c: Likewise.
23578 * vmsgetargs.c: Likewise.
23580 2000-03-31 Akim Demaille <akim@epita.fr>
23582 Clean up the error reporting functions.
23584 * src/report.c: New file.
23585 * src/report.h: Likewise.
23586 * src/Makefile.am: Adjust.
23587 * m4/error.m4: New file.
23588 * m4/Makefile.am: Adjust.
23589 * configure.in (jm_PREREQ_ERROR): Call it.
23590 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23592 (fatal, fatals): Remove. All callers use complain.c::fatal.
23593 (warn, warni, warns, warnss, warnss): Remove. All callers use
23594 complain.c::complain.
23595 (toomany): Remove, use fatal instead.
23596 * src/files.c (done): No argument, use complain_message_count.
23597 * src/main.c (main): Register `done' to `atexit'.
23599 * src/getargs.c (usage): More `fputs', less `fprintf'.
23601 2000-03-28 Akim Demaille <akim@epita.fr>
23603 * lib/: New directory.
23604 * Makefile.am (SUBDIRS): Adjust.
23605 * configure.in: Adjust.
23606 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23608 * src/alloca.c: Moved to lib/.
23609 * src/getopt.c: Likewise.
23610 * src/getopt1.c: Likewise.
23611 * src/getopt.h: Likewise.
23612 * src/ansi2knr.c: Likewise.
23613 * src/ansi2knr.1: Likewise.
23614 * src/Makefile.am: Adjust.
23615 * lib/Makefile.am: New file.
23617 2000-03-28 Akim Demaille <akim@epita.fr>
23619 * src/getargs.c (usage): Refresh the help message.
23621 2000-03-17 Akim Demaille <akim@epita.fr>
23623 * src/getopt1.c: Updated from textutils 2.0e
23624 * src/getopt.c: Likewise.
23625 * src/getopt.h: Likewise.
23627 2000-03-17 Akim Demaille <akim@epita.fr>
23629 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23630 the file name, not the whole `#line LINE FILE'.
23632 2000-03-17 Akim Demaille <akim@epita.fr>
23634 On syntax errors, report the token on which we choked.
23636 * src/bison.s1 (yyparse): In the label yyerrlab, when
23637 YYERROR_VERBOSE, add yychar in msg.
23639 2000-03-17 Akim Demaille <akim@epita.fr>
23641 * src/reader.c (copy_at): New function.
23642 (copy_guard): Use it.
23643 (copy_action): Use it.
23645 2000-03-17 Akim Demaille <akim@epita.fr>
23647 Be kind to translators, save some useless translations.
23649 * src/main.c (banner): New function.
23650 (fatal_banner): Use it.
23651 (warn_banner): Use it.
23653 2000-03-17 Akim Demaille <akim@epita.fr>
23655 * src/reader.c (copy_definition): Use copy_string and
23656 copy_comment. Removed now unused `match', `ended',
23658 (copy_comment, copy_string): Moved, to be visible from
23661 2000-03-17 Akim Demaille <akim@epita.fr>
23663 * src/reader.c (copy_string): Declare `static inline'. No
23664 problems with inline, since it is checked by configure.
23665 (copy_comment): Likewise.
23667 2000-03-17 Akim Demaille <akim@epita.fr>
23669 * src/reader.c (packsymbols): Formatting changes.
23671 2000-03-17 Akim Demaille <akim@epita.fr>
23673 * src/reader.c (copy_comment): New function, factored out from:
23674 (copy_action): Use it. Removed now unused `match', `ended',
23676 (copy_guard): Likewise.
23678 2000-03-17 Akim Demaille <akim@epita.fr>
23680 * src/reader.c (copy_string): New function, factored out from:
23681 (copy_action): Use it.
23682 (copy_guard): Likewise.
23684 2000-03-17 Akim Demaille <akim@epita.fr>
23686 Change the handling of @s so that they behave exactly like $s.
23687 There is now a pseudo variable @$ (readble and writable), location
23688 of the lhs of the rule (by default ranging from the location of
23689 the first symbol of the rhs, to the location of the last symbol,
23690 or, if the rhs is empty, YYLLOC).
23692 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23694 (yyparse): When providing a default semantic action, provide a
23695 default location action.
23696 (after the $): No longer change `*YYLSP', just stack YYLOC the
23697 same way you stack YYVAL.
23698 * src/reader.c (read_declarations): Use warns.
23699 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23700 (copy_action, case '@'): Likewise.
23701 Use a standard error message, to save useless work from
23704 2000-03-17 Akim Demaille <akim@epita.fr>
23706 * src/bison.s1: Formatting and cosmetics changes.
23707 * src/reader.c: Likewise.
23708 Update the Copyright notice.
23710 2000-03-17 Akim Demaille <akim@epita.fr>
23712 * src/bison.s1 (#line): All set to `#line' only, since the
23713 Makefile now handles them.
23715 2000-03-16 Akim Demaille <akim@epita.fr>
23717 * src/output.c (output_rule_data): Output the documentation of
23718 some of the tables.
23719 (Copyright notice): Update.
23720 Formatting changes.
23722 2000-03-16 Akim Demaille <akim@epita.fr>
23724 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23725 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23726 One `#if YYDEBUG' remains, since it uses variables which are
23727 defined only if `YYDEBUG != 0'.
23729 2000-03-16 Akim Demaille <akim@epita.fr>
23731 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23732 and related variables so that the similarities are highlighted.
23734 2000-03-16 Akim Demaille <akim@epita.fr>
23736 * src/bison.s1: Properly indent CPP directives.
23738 2000-03-16 Akim Demaille <akim@epita.fr>
23740 * src/bison.s1: Properly indent the `alloca' CPP section.
23742 2000-03-16 Akim Demaille <akim@epita.fr>
23744 Do not hard code values of directories in `configure.in'.
23745 Update the `configure' tool chain.
23747 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23749 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23750 (AC_OUTPUT): Add m4/Makefile.
23751 Bump to bison 1.28a, 1.29 has never been released.
23752 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23753 handled via src/Makefile.am.
23754 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23755 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23757 * Makefile.am (SUBDIRS): Add m4.
23758 (ACLOCAL_AM_FLAGS): New variable.
23759 (AUTOMAKE_OPTIONS): Add check-news.
23760 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23761 the proper line number and file name.
23762 (DEFS): Propagate the location of bison library files and of the
23764 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23766 * acinclude.m4: Remove, replaced by the directory m4.
23767 * m4/Makefile.am (EXTRA_DIST): New variable.
23768 * m4/gettext.m4: New file, from the fileutils.
23769 * m4/lcmessage.m4: Likewise
23770 * m4/progtest.m4: Likewise.
23771 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23773 2000-03-10 Akim Demaille <akim@epita.fr>
23776 Formatting changes of various comments.
23777 Respect the GNU coding standards at various places.
23778 Don't use `_()' when no translation is needed.
23780 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23783 OS/2 honors TMPDIR environment variable.
23785 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23787 * doc/bison.texinfo: Tweaked spelling and grammar.
23789 Removed reference to price of printed copy.
23790 Mention BISON_SIMPLE and BISON_HAIRY.
23792 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23794 * configure.in, NEWS:
23795 Bison 1.29 released.
23797 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23799 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23800 Added reference card.
23802 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23804 * po/ru.po: Added Russian translation.
23806 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23808 * configure.in: Added Russian translation.
23810 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23812 * configure.in, NEWS, README:
23813 Released version 1.28.
23815 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23818 Squashed redefinition warning on some systems.
23820 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23821 Have configure build version string instead of relying on ANSI string
23824 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23826 * po/POTFILES.in: Got rid of version.c.
23828 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23830 * acconfig.h, configure.in:
23831 Have configure build version string instead of relying on ANSI string
23834 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23837 Dropped mention of `+' for long-named options.
23839 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23841 * src/files.c: Added <unistd.h> for unlink().
23843 * src/Makefile.am, src/system.h:
23846 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23848 * README: Added a FAQ list.
23850 * configure.in, acconfig.h:
23853 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23855 * doc/FAQ, doc/Makefile.am:
23858 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23860 * src/alloc.h, src/symtab.h, src/version.c:
23861 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23863 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23865 * src/.cvsignore, src/Makefile.am:
23866 Reorganized: sources in `src', documentation in `doc'.
23868 * src/lex.c (literalchar):
23869 fixed the code for escaping double quotes (thanks
23872 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23874 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23875 Adjusted paths to reflect directory reorganization.
23877 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23879 * doc/.cvsignore, doc/Makefile.am:
23880 Reorganized: sources in `src', documentation in `doc'.
23882 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23885 Updated AC_INIT file to reflect directory reorganization.
23887 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23888 Reorganized: sources in `src', documentation in `doc'.
23890 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23893 Don't declare calloc() and realloc() if not necessary.
23895 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23897 * configure.in, acconfig.h, acinclude.m4:
23898 Don't declare calloc() and realloc() if not necessary.
23900 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23902 * po/.cvsignore: Added i18n support.
23904 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23906 * acconfig.h, configure.in, Makefile.am:
23907 Added i18n support.
23909 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23911 * src/bison.s1: Fixed #line numbers.
23913 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23915 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23916 Added PO files from Translation Project.
23918 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23921 Added support for non-ANSI compilers (ansi2knr).
23923 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23925 * configure.in: Bumped version number to 1.27.
23928 Added `bison.simple' to list of files removed by `make distclean'.
23930 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23932 * src/files.c, src/files.h:
23933 Defined locations of parser files in config.h instead of Makefile.
23935 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23937 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23938 Defined locations of parser files in config.h instead of Makefile.
23940 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23943 Removed inappropriate use of $< macro.
23945 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23947 * po/Makefile.in.in, po/POTFILES.in:
23948 Add `po' directory skeleton.
23950 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23952 * README: Document help-bison list.
23954 * configure.in: Add check for mkstemp().
23956 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23958 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23959 Hush a few compiler warnings.
23962 Add tryclose(), which verifies that fclose was successful.
23963 Hush a couple of compiler warnings.
23965 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23967 * Makefile.am, OChangeLog:
23968 ChangeLog is now automatically generated. Include the old version as
23971 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23973 * 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:
23974 Update FSF address.
23976 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23978 * doc/bison.texinfo: Fix formatting glitch.
23980 * doc/bison.texinfo: Update FSF address.
23982 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23984 * acconfig.h: Update FSF address.
23986 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23989 Don't define PACKAGE here, since config.h defines it.
23991 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23993 * src/reader.c: Update copyright date.
23996 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23997 favor of output directly to stderr (avoids buffer overruns).
23999 * src/reader.c: Some checks for premature EOF.
24001 * 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:
24002 Use prototypes if the compiler understands them.
24004 * src/files.c: Honor TMPDIR on Unix hosts.
24005 Use prototypes if the compiler understands them.
24008 Fix a couple of buffer overrun bugs.
24009 Use prototypes if the compiler understands them.
24011 * src/system.h: Include unistd.h and ctype.h.
24012 Use #ifdef instead of #if for NLS symbols.
24014 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24016 * doc/bison.texinfo:
24017 Delete comment "consider using @set for edition number, etc..." since
24018 we now are doing so.
24020 1998-12-30 Jesse Thilo <jthilo@gnu.org>
24023 Use prototypes if the compiler understands them.
24025 * NEWS: Document 1.26 highlights.
24027 * Makefile.am: Require Automake 1.3 or later.
24030 Use prototypes if the compiler understands them.
24032 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24035 Use VERSION symbol from automake for version number.
24037 1998-12-29 Jesse Thilo <jthilo@gnu.org>
24039 * acconfig.h, configure.in, version.cin:
24040 Use VERSION symbol from automake for version number.
24042 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24045 Distribute original version of simple parser (bison.s1), not built
24046 version (bison.simple).
24048 1998-11-28 Jesse Thilo <jthilo@gnu.org>
24050 * doc/bison.texinfo: Add info dir entry.
24052 * doc/bison.texinfo:
24053 Let automake put version number into documentation.
24055 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24057 * src/bison.cld, src/build.com, src/vmshlp.mar:
24058 Add non-RCS files from /gd/gnu/bison.
24060 1998-11-26 Jesse Thilo <jthilo@gnu.org>
24063 Document the BISON_HAIRY and BISON_SIMPLE variables.
24065 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24067 * src/version.c: Build version.c automatically.
24070 Fix token numbering (used to start at 258, not 257).
24072 * src/system.h: Include config.h.
24074 * src/getargs.c: Update bug report address.
24076 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24077 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24079 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24082 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24084 * configure.in, version.cin:
24085 Build version.c automatically.
24087 * AUTHORS: Add AUTHORS file.
24089 * README: Update bug report address.
24092 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24094 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
24095 Add automake stuff.
24097 1998-11-25 Jesse Thilo <jthilo@gnu.org>
24099 * doc/bison.texinfo: Clean up some formatting.
24101 1998-05-05 Richard Stallman <rms@gnu.org>
24103 * doc/bison.texinfo:
24104 Explain better why to make a pure parser.
24106 1998-01-05 Richard Stallman <rms@gnu.org>
24108 * src/files.c (openfiles):
24109 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
24110 find a temporary directory, if possible. Do not unlink files while
24113 1997-08-25 Richard Stallman <rms@gnu.org>
24115 * src/reader.c (stack_offset;):
24116 Change some warni to warns.
24118 * src/lex.c (literalchar): Use warns, not warni.
24120 1997-06-28 Richard Stallman <rms@gnu.org>
24122 * src/bison.s1: Add a Bison version comment.
24124 * src/main.c (fatal, warn, berror):
24127 1997-06-28 Richard Stallman <rms@gnu.org>
24129 * Makefile.in (bison_version): New variable.
24130 (dist): Use that variable.
24131 (bison.s1): Substitute the Bison version into bison.simple.
24133 * bison.simple: Add a Bison version comment.
24135 1997-06-18 Richard Stallman <rms@gnu.org>
24137 * src/main.c (fatal, warn, berror):
24138 Make error messages standard.
24139 (toomany): Improve error message text.
24141 * 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:
24142 new.h renamed to alloc.h.
24144 1997-06-18 Richard Stallman <rms@gnu.org>
24146 * Makefile.in: new.h renamed to alloc.h.
24148 1997-05-24 Richard Stallman <rms@gnu.org>
24150 * src/lex.c (literalchar):
24151 Fix the code for escaping \, " and '.
24153 (lex): Avoid trouble when there are many chars
24154 to discard in a char literal with just several chars in it.
24156 1997-05-17 Richard Stallman <rms@gnu.org>
24159 Use malloc, if using alloca is troublesome.
24160 (YYSTACK_USE_ALLOCA): New flag macro.
24161 Define it for some systems and compilers.
24162 (YYSTACK_ALLOC): New macro.
24163 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24164 If it was malloc'd, free it.
24166 1997-05-17 Richard Stallman <rms@gnu.org>
24169 Use malloc, if using alloca is troublesome.
24170 (YYSTACK_USE_ALLOCA): New flag macro.
24171 Define it for some systems and compilers.
24172 (YYSTACK_ALLOC): New macro.
24173 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24174 If it was malloc'd, free it.
24176 1997-04-23 Richard Stallman <rms@gnu.org>
24179 (alloca) [__hpux]: Always define as __builtin_alloca.
24181 1997-04-23 Richard Stallman <rms@gnu.org>
24184 (alloca) [__hpux]: Always define as __builtin_alloca.
24186 1997-04-22 Richard Stallman <rms@gnu.org>
24189 [__hpux]: Include alloca.h (right for HPUX 10)
24190 instead of declaring alloca (right for HPUX 9).
24192 * src/bison.s1 (__yy_memcpy):
24193 Declare arg `count' as unsigned int.
24194 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24196 1997-04-22 Richard Stallman <rms@gnu.org>
24199 [__hpux]: Include alloca.h (right for HPUX 10)
24200 instead of declaring alloca (right for HPUX 9).
24202 * bison.simple (__yy_memcpy):
24203 Declare arg `count' as unsigned int.
24204 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24206 1997-01-03 Richard Stallman <rms@gnu.org>
24208 * src/allocate.c: [__STDC__ or _MSC_VER]:
24209 Declare calloc and realloc to return void *.
24211 1997-01-02 Richard Stallman <rms@gnu.org>
24214 [_MSC_VER]: Include stdlib.h and process.h.
24215 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
24217 * src/main.c (main): Return FAILURE as a value.
24218 (printable_version): Declare arg as int, not char.
24220 1997-01-02 Richard Stallman <rms@gnu.org>
24222 * Makefile.in (dist):
24223 Explicitly check for symlinks, and copy them.
24225 1996-12-19 Richard Stallman <rms@gnu.org>
24228 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
24230 1996-12-18 Paul Eggert <eggert@gnu.org>
24232 * src/bison.s1 (yyparse):
24233 If __GNUC__ and YYPARSE_PARAM are both defined,
24234 declare yyparse to have a void * argument.
24236 1996-12-18 Paul Eggert <eggert@gnu.org>
24238 * bison.simple (yyparse):
24239 If __GNUC__ and YYPARSE_PARAM are both defined,
24240 declare yyparse to have a void * argument.
24242 1996-12-17 Richard Stallman <rms@gnu.org>
24244 * src/reduce.c (nbits): Add some casts.
24246 1996-08-12 Richard Stallman <rms@gnu.org>
24248 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
24250 1996-08-12 Richard Stallman <rms@gnu.org>
24252 * bison.simple: Test _MSDOS as well as _MSDOS_.
24254 1996-07-31 Richard Stallman <rms@gnu.org>
24257 [__sun && __i386]: Include alloca.h.
24259 1996-07-31 Richard Stallman <rms@gnu.org>
24262 [__sun && __i386]: Include alloca.h.
24264 1996-07-30 Richard Stallman <rms@gnu.org>
24266 * src/bison.s1: Comment change.
24268 * src/bison.s1: Test _MSDOS_, not MSDOS.
24270 1996-07-30 Richard Stallman <rms@gnu.org>
24272 * bison.simple: Comment change.
24274 * bison.simple: Test _MSDOS_, not MSDOS.
24276 1996-06-01 Richard Stallman <rms@gnu.org>
24278 * 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:
24279 Insert `_' macro around many string constants.
24282 Insert `_' macro around many string constants.
24284 (main): Call setlocale, bindtextdomain and textdomain.
24286 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
24287 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
24288 [ENABLE_NLS]: Include libintl.h.
24289 [ENABLE_NLS] (gettext): Define.
24290 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
24291 (N_, PACKAGE, LOCALEDIR): New macros.
24293 1996-06-01 Richard Stallman <rms@gnu.org>
24295 * POTFILES.in: New file.
24297 * Makefile.in (allocate.o):
24298 Define target explicitly.
24300 * Makefile.in (CFLAGS): Set to @CFLAGS@.
24301 (LDFLAGS): Set to @LDFLAGS@.
24302 (configure): Run autoconf only if preceding `cd' succeeds.
24303 (bison.s1): Redirect output to temporary file then move the
24304 temporary to the target, rather than redirecting directly to bison.s1.
24305 (clean): Remove config.status and config.log.
24306 (distclean): Don't remove config.status here.
24308 1996-05-12 Richard Stallman <rms@gnu.org>
24311 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24313 1996-05-12 Richard Stallman <rms@gnu.org>
24316 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24318 1996-05-11 Richard Stallman <rms@gnu.org>
24320 * src/bison.s1 (__yy_memcpy):
24321 Really reorder the args, as was supposedly done on Feb 14 1995.
24322 (yyparse): Calls changed accordingly.
24324 1996-05-11 Richard Stallman <rms@gnu.org>
24326 * Makefile.in (dist): Don't use $(srcdir).
24328 * bison.simple (__yy_memcpy):
24329 Really reorder the args, as was supposedly done on Feb 14 1995.
24330 (yyparse): Calls changed accordingly.
24332 1996-01-27 Richard Stallman <rms@gnu.org>
24334 * src/output.c (output_rule_data):
24335 Test YYERROR_VERBOSE in the conditional
24336 around the definition of ttyname.
24338 1995-12-29 Richard Stallman <rms@gnu.org>
24341 Fix line numbers in #line commands.
24343 1995-12-29 Richard Stallman <rms@gnu.org>
24346 Fix line numbers in #line commands.
24348 1995-12-27 Richard Stallman <rms@gnu.org>
24350 * src/bison.s1 (YYPARSE_PARAM_DECL):
24351 In C++, make it always null.
24352 (YYPARSE_PARAM_ARG): New macro.
24353 (yyparse): Use YYPARSE_PARAM_ARG.
24355 1995-12-27 Richard Stallman <rms@gnu.org>
24357 * bison.simple (YYPARSE_PARAM_DECL):
24358 In C++, make it always null.
24359 (YYPARSE_PARAM_ARG): New macro.
24360 (yyparse): Use YYPARSE_PARAM_ARG.
24362 1995-11-29 Richard Stallman <rms@gnu.org>
24364 * doc/bison.texinfo:
24365 Describe literal string tokens, %raw, %no_lines, %token_table.
24367 1995-11-29 Daniel Hagerty <hag@gnu.org>
24369 * doc/bison.texinfo: Fixed update date
24371 1995-10-16 Richard Stallman <rms@gnu.org>
24373 * src/version.c: Version 1.25.
24375 1995-10-16 Richard Stallman <rms@gnu.org>
24377 * NEWS: *** empty log message ***
24379 1995-10-16 Richard Stallman <rms@gnu.org>
24381 * doc/bison.1, doc/bison.rnh:
24384 1995-10-15 Richard Stallman <rms@gnu.org>
24386 * src/vmsgetargs.c, src/getargs.c:
24387 Added -n, -k, and -raw switches.
24388 (noparserflag, toknumflag, rawtoknumflag): New variables.
24390 * src/symtab.h (SALIAS):
24391 New #define for adding aliases to %token.
24392 (struct bucket): Added `alias' field.
24394 * src/reduce.c (reduce_grammar):
24395 Revise error message.
24396 (print_notices): Remove final `.' from error message.
24398 * src/reader.c (reader_output_yylsp):
24400 (readgram): Use `#if 0' around code that accepted %command
24401 inside grammar rules: The documentation doesn't allow it,
24402 and it will fail since the %command processors scan for the next %.
24403 (parse_token_decl): Extended the %token
24404 declaration to allow a multi-character symbol as an alias.
24405 (parse_thong_decl): New function.
24406 (read_declarations): Added %thong declarations.
24407 (read_declarations): Handle NOOP to deal with allowing
24408 % declarations as another means to specify the flags.
24409 (readgram): Allow %prec prior to semantics embedded in a rule.
24410 (skip_to_char, read_declarations, copy_definition)
24411 (parse_token_decl, parse_start_decl, parse_type_decl)
24412 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
24413 (get_type_name, copy_guard, copy_action, readgram)
24414 (get_type, packsymbols): Revised most error messages.
24415 Changed `fatal' to `warnxxx' to avoid aborting for error.
24416 Revised and use multiple warnxxx functions to avoid using VARARGS1.
24417 (read_declarations): Improve the error message for
24418 an invalid character. Do not abort.
24419 (read_declarations, copy_guard, copy_action): Use
24420 printable_version to avoid unprintable characters in printed output.
24421 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
24422 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
24423 Allow the type of a non-terminal can be given
24424 more than once, as long as all specifications give the same type.
24427 (output_headers, output_trailers, output, output_gram)
24428 (output_rule_data): Implement noparserflag variable.
24429 Implement toknumflag variable.
24430 (output): Call reader_output_yylsp to output LTYPESTR.
24432 * src/main.c (main):
24433 If reader sees an error, don't process the grammar.
24434 (fatals): Updated to not use VARARGS1.
24435 (printable_version, int_to_string, warn, warni, warns, warnss)
24436 (warnsss): New error reporting functions. Avoid abort for error.
24439 Added THONG and NOOP for alias processing.
24440 Added SETOPT for the new code that allows setting options with %flags.
24443 Include getopt.h. Add some extern decls.
24444 (safegetc): New function to deal with EOF gracefully.
24445 (literalchar); new function to deal with reading \ escapes.
24446 (lex): Use literalchar.
24447 (lex): Implemented "..." tokens.
24448 (literalchar, lex, parse_percent_token): Made tokenbuffer
24449 always contain the token. This includes growing the token
24450 buffer while reading an integer.
24451 (parse_percent_token): Replaced if-else statement with percent_table.
24452 (parse_percent_token): Added % declarations as another
24453 way to specify the flags -n, -l, and -r. Also added hooks for
24454 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
24455 major changes to files.c.
24456 (lex) Retain in the incoming stream a character following
24458 (skip_white_space, lex): Revised most error messages
24459 and changed fatal to warn to avoid aborting.
24460 (percent_table): Added %thong declarations.
24462 * src/gram.h: Comment changes.
24464 * src/files.c (openfiles, open_extra_files, done):
24466 and actfile file. Handle noparserflag. Both for -n switch.
24468 * src/conflicts.c (resolve_sr_conflict):
24469 Remove use of alloca.
24471 1995-06-01 Jim Meyering <meyering@gnu.org>
24473 * doc/bison.texinfo: *** empty log message ***
24475 1995-05-06 Richard Stallman <rms@gnu.org>
24477 * src/bison.s1: Comment change.
24479 1995-05-06 Richard Stallman <rms@gnu.org>
24481 * bison.simple: Comment change.
24483 1995-05-03 Richard Stallman <rms@gnu.org>
24485 * src/version.c: Version now 1.24.
24487 * src/bison.s1: Change distribution terms.
24489 * src/version.c: Version now 1.23.
24491 1995-05-03 Richard Stallman <rms@gnu.org>
24493 * doc/bison.texinfo:
24494 Rewrite "Conditions for Using Bison".
24495 Update version to 1.24.
24497 1995-05-03 Richard Stallman <rms@gnu.org>
24499 * bison.simple: Change distribution terms.
24501 1995-02-23 Richard Stallman <rms@gnu.org>
24503 * src/files.c: Test __VMS_POSIX as well as VMS.
24505 1995-02-14 Jim Meyering <meyering@gnu.org>
24507 * src/bison.s1 (__yy_memcpy):
24508 Renamed from __yy_bcopy to avoid
24509 confusion. Reverse FROM and TO arguments to be consistent with
24512 1995-02-14 Jim Meyering <meyering@gnu.org>
24514 * bison.simple (__yy_memcpy):
24515 Renamed from __yy_bcopy to avoid
24516 confusion. Reverse FROM and TO arguments to be consistent with
24519 1994-11-10 David J. MacKenzie <djm@gnu.org>
24525 * Makefile.in (DISTFILES): Include NEWS.
24527 * Makefile.in (DISTFILES):
24528 Include install-sh, not install.sh.
24530 * configure.in: Update to Autoconf v2 macro names.
24532 1994-10-05 David J. MacKenzie <djm@gnu.org>
24534 * Makefile.in: fix typo
24536 * Makefile.in (prefix, exec_prefix):
24537 Let configure set them.
24539 1994-09-28 David J. MacKenzie <djm@gnu.org>
24541 * Makefile.in: Set datadir to $(prefix)/share.
24543 1994-09-15 Richard Stallman <rms@gnu.org>
24546 Update copyright notice and GPL version.
24548 1994-09-15 Richard Stallman <rms@gnu.org>
24551 Update copyright notice and GPL version.
24553 1994-07-12 Richard Stallman <rms@gnu.org>
24555 * src/reduce.c, src/reader.c:
24558 1994-05-05 David J. MacKenzie <djm@gnu.org>
24560 * Makefile.in: entered into RCS
24562 1994-03-26 Richard Stallman <rms@gnu.org>
24564 * src/bison.s1: entered into RCS
24566 1994-03-26 Richard Stallman <rms@gnu.org>
24568 * bison.simple: entered into RCS
24570 1994-03-25 Richard Stallman <rms@gnu.org>
24572 * src/main.c: entered into RCS
24574 1994-03-24 Richard Stallman <rms@gnu.org>
24576 * src/conflicts.c: entered into RCS
24578 1994-01-02 Richard Stallman <rms@gnu.org>
24580 * Makefile.in: *** empty log message ***
24582 1993-11-21 Richard Stallman <rms@gnu.org>
24584 * src/bison.s1: *** empty log message ***
24586 1993-11-21 Richard Stallman <rms@gnu.org>
24588 * doc/bison.texinfo: entered into RCS
24590 * doc/bison.texinfo: *** empty log message ***
24592 1993-11-21 Richard Stallman <rms@gnu.org>
24594 * bison.simple: *** empty log message ***
24596 1993-10-25 David J. MacKenzie <djm@gnu.org>
24598 * doc/bison.texinfo: *** empty log message ***
24600 1993-10-19 Richard Stallman <rms@gnu.org>
24602 * src/bison.s1: *** empty log message ***
24604 1993-10-19 Richard Stallman <rms@gnu.org>
24606 * bison.simple: *** empty log message ***
24608 1993-10-14 Richard Stallman <rms@gnu.org>
24610 * src/bison.s1: *** empty log message ***
24612 1993-10-14 Richard Stallman <rms@gnu.org>
24614 * bison.simple: *** empty log message ***
24616 1993-09-14 David J. MacKenzie <djm@gnu.org>
24618 * doc/bison.texinfo: *** empty log message ***
24620 1993-09-13 Noah Friedman <friedman@gnu.org>
24622 * Makefile.in: *** empty log message ***
24624 1993-09-10 Richard Stallman <rms@gnu.org>
24626 * src/conflicts.c: *** empty log message ***
24628 * src/system.h: entered into RCS
24630 1993-09-10 Richard Stallman <rms@gnu.org>
24632 * doc/bison.1: entered into RCS
24634 1993-09-06 Noah Friedman <friedman@gnu.org>
24636 * src/version.c: entered into RCS
24638 1993-09-06 Noah Friedman <friedman@gnu.org>
24640 * Makefile.in: *** empty log message ***
24642 1993-07-30 David J. MacKenzie <djm@gnu.org>
24644 * Makefile.in: *** empty log message ***
24646 1993-07-24 Richard Stallman <rms@gnu.org>
24648 * src/bison.s1: *** empty log message ***
24650 1993-07-24 Richard Stallman <rms@gnu.org>
24652 * bison.simple: *** empty log message ***
24654 1993-07-08 David J. MacKenzie <djm@gnu.org>
24656 * Makefile.in: *** empty log message ***
24658 1993-07-04 Richard Stallman <rms@gnu.org>
24660 * src/bison.s1: *** empty log message ***
24662 1993-07-04 Richard Stallman <rms@gnu.org>
24664 * bison.simple: *** empty log message ***
24666 1993-06-26 David J. MacKenzie <djm@gnu.org>
24668 * src/getargs.c: entered into RCS
24670 1993-06-26 David J. MacKenzie <djm@gnu.org>
24672 * doc/bison.texinfo: *** empty log message ***
24674 * doc/bison.1: New file.
24676 1993-06-25 Richard Stallman <rms@gnu.org>
24678 * src/getargs.c: New file.
24680 1993-06-16 Richard Stallman <rms@gnu.org>
24682 * src/bison.s1: *** empty log message ***
24684 1993-06-16 Richard Stallman <rms@gnu.org>
24686 * bison.simple: *** empty log message ***
24688 1993-06-03 Richard Stallman <rms@gnu.org>
24690 * src/bison.s1: New file.
24692 1993-06-03 Richard Stallman <rms@gnu.org>
24694 * doc/bison.texinfo: *** empty log message ***
24696 1993-06-03 Richard Stallman <rms@gnu.org>
24698 * bison.simple: New file.
24700 1993-05-19 Richard Stallman <rms@gnu.org>
24702 * doc/bison.texinfo: New file.
24704 1993-05-07 Noah Friedman <friedman@gnu.org>
24706 * Makefile.in: *** empty log message ***
24708 1993-04-28 Noah Friedman <friedman@gnu.org>
24710 * src/reader.c: *** empty log message ***
24712 1993-04-23 Noah Friedman <friedman@gnu.org>
24714 * src/alloc.h: entered into RCS
24716 1993-04-20 David J. MacKenzie <djm@gnu.org>
24718 * src/version.c: *** empty log message ***
24720 * src/files.c, src/allocate.c:
24723 * src/reader.c: *** empty log message ***
24725 * src/lex.c: entered into RCS
24727 * src/conflicts.c: New file.
24729 * src/symtab.c: entered into RCS
24731 * src/alloc.h: New file.
24733 * src/LR0.c: entered into RCS
24735 1993-04-18 Noah Friedman <friedman@gnu.org>
24737 * src/reader.c: New file.
24739 * src/version.c: *** empty log message ***
24741 1993-04-18 Noah Friedman <friedman@gnu.org>
24743 * Makefile.in: *** empty log message ***
24745 1993-04-17 Noah Friedman <friedman@gnu.org>
24747 * Makefile.in: *** empty log message ***
24749 1993-04-15 Richard Stallman <rms@gnu.org>
24751 * src/main.c, src/files.c:
24754 1993-04-15 Noah Friedman <friedman@gnu.org>
24756 * configure.in: entered into RCS
24758 * configure.in: *** empty log message ***
24760 * configure.in: New file.
24762 1993-04-14 Richard Stallman <rms@gnu.org>
24764 * Makefile.in: New file.
24766 1993-04-13 Richard Stallman <rms@gnu.org>
24768 * src/version.c: New file.
24770 1993-03-25 Richard Stallman <rms@gnu.org>
24772 * src/output.c: entered into RCS
24774 1992-09-25 Richard Stallman <rms@gnu.org>
24776 * configure.bat: entered into RCS
24778 1992-06-22 Richard Stallman <rms@gnu.org>
24780 * src/vmsgetargs.c: entered into RCS
24782 1992-06-22 Richard Stallman <rms@gnu.org>
24784 * doc/bison.rnh: entered into RCS
24786 1992-04-20 David J. MacKenzie <djm@gnu.org>
24788 * README: entered into RCS
24790 1992-01-22 Richard Stallman <rms@gnu.org>
24792 * src/machine.h: entered into RCS
24794 1991-12-21 Richard Stallman <rms@gnu.org>
24796 * src/lalr.c, src/closure.c:
24799 1991-12-20 Richard Stallman <rms@gnu.org>
24801 * src/state.h: entered into RCS
24803 1991-12-18 Richard Stallman <rms@gnu.org>
24805 * src/print.c, src/nullable.c, src/derives.c:
24808 1991-11-03 David J. MacKenzie <djm@gnu.org>
24810 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24813 1988-09-09 Richard Stallman <rms@gnu.org>
24815 * src/bison.hairy: entered into RCS
24817 1987-12-16 Richard Stallman <rms@gnu.org>
24819 * REFERENCES: entered into RCS
24824 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24825 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24826 2008, 2009 Free Software Foundation, Inc.
24828 Copying and distribution of this file, with or without
24829 modification, are permitted provided the copyright notice and this
24830 notice are preserved.