X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/9ecafbbfe7a17aa3c2a5f370ffd2ef0616576fc1..68cae94e0b4e83246787fc5a413f085513ae9160:/ChangeLog diff --git a/ChangeLog b/ChangeLog index 0036b898..10d105af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,317 @@ +2006-01-20 Paul Eggert + + Be a bit more systematic about using 'abort'. + * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed. + * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp): + Put 'default: abort ();' before some other case, to satisfy older + pedantic compilers. + * lib/bitset_stats.c (bitset_stats_init): Likewise. + * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise. + * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise. + * src/conflicts.c (resolve_sr_conflict): Likewise. + * src/vcg.c (get_color_str, get_textmode_str, get_shape_str): + (get_decision_str, get_orientation_str, get_node_alignment_str): + (get_arrow_mode_str, get_crossing_type_str, get_view_str): + (get_linestyle_str, get_arrowstyle_str): Likewise. + * src/conflicts.c (resolve_sr_conflict): + Use a default case rather than one for the one remaining enum + value, to catch invalid enum values as well. + * src/lalr.c (set_goto_map, map_goto): + Prefer "assert (FOO);" to "if (!FOO) abort ();". + * src/nullable.c (nullable_compute, token_definitions_output): + Likewise. + * src/reader.c (packgram, reader): Likewise. + * src/state.c (transitions_to, state_new, state_reduction_find): + Likewise. + * src/symtab.c (symbol_user_token_number_set, symbol_make_alias): + (symbol_pack): Likewise. + * src/tables.c (conflict_row, pack_vector): Likewise. + * src/scan-skel.l (QPUTS): Remove unnecessary parens. + (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts. + * src/system.h: Don't include . + (assert): New macro. + + * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl): + (Destructor Decl, Parser Function, Pure Calling): + Describe rules for braces inside C code more carefully. + +2006-01-19 Paul Eggert + + Fix some porting glitches found by Nelson H. F. Beebe. + * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from + compilers that don't understand that abort () does not return. + * src/state.c (transitions_to): Likewise. + * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check + that '#include ' works. + * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX): + (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX): + #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901, + for the benefit of some pre-C99 compilers. + + * bootstrap: Undo changes to gnulib files that autoreconf made. + + Minor fixups to get 'make maintainer-check' to work. + * configure.ac: Don't use -Wnested-externs, as it's incompatible + with the new verify.h implementation. + * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput). + * data/glr.c (YYUSE): Depend on __GNUC__ as well. + * data/yacc.c (YYUSE): Likewise. + * data/lalr1.cc (yysyntax_error_): YYUSE (yystate). + * lib/subpipe.c (end_of_output_subpipe): The args are unused. + * src/parse-gram.y (declaration): Don't pass a string constant + to a function that expects char *, since GCC might complain + about the constant value. + * src/reader.c (symbol_typed_p): Add parens to pacify GCC. + * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval + before #defining them. + * tests/glr-regression.at + (Incorrectly initialized location for empty right-hand side in GLR): + In yyerror, use the msg arg. + (Corrupted semantic options if user action cuts parse): + (Incorrect lookahead during deterministic GLR): + (Incorrect lookahead during nondeterministic GLR): + Don't name a local var 'index'; it shadows string.h's 'index'. + +2006-01-19 Akim Demaille + + * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial + location, not just parts of it. + +2006-01-18 Paul Eggert + + * NEWS: Document the fact that multiple %unions are now allowed. + * doc/bison.texinfo (Union Decl): Likewise. + * TODO: This feature is now implemented, so remove it from + the wishlist. + + * Makefile.maint: Merge with coreutils Makefile.maint. + (CVS_LIST): Use build-aux version if available. + (VERSION_REGEXP): New macro. + (syntax-check-rules): Add sc_no_if_have_config_h, + sc_prohibit_assert_without_use, sc_require_config_h, + sc_useless_cpp_parens. + (sc_obsolete_symbols): Check for O_NDELAY. + (sc_dd_max_sym_length): Track coreutils. + (sc_unmarked_diagnostics): Look in all files, not just *.c. + (sc_useless_cpp_parens): New rule. + (news-date-check): Look for version or today's date. + (changelog-check): Don't require version number near head. + (copyright-check): Use current year instead of hardwiring 2005. + (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz). + (announcement): Add --gpg-key-ID. + + * djgpp/config.sed: Add copyright notice, and replace "filesystem" + with "file system". + + Avoid undefined behavior that addressed just before the start of an + array. Problem reported by twlevo. + * src/reader.c (packgram): Prepend a new sentinel before ritem. + * src/lalr.c (build_relations): Rely on new sentinel. + * src/gram.c (gram_free): Adjust to new sentinel. + +2006-01-12 Joel E. Denny + + * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to + yylookaheadNeeds. All uses updated. + (yysplitStack): Rename local yynewLookaheadStatuses to + yynewLookaheadNeeds. + * data/glr-regression.at (Incorrect lookahead during nondeterministic + GLR): In comments, change `lookahead status' to `lookahead need'. + +2006-01-11 Paul Hilfinger + + * data/glr.c (yysplitStack): A little stylistic rewrite. + +2006-01-11 Paul Hilfinger + + * data/glr.c (yyaddDeferredAction): Flesh out the comment. + +2006-01-11 Joel E. Denny + + * doc/bison.texinfo: Fix some typos. + (GLR Semantic Actions): New subsection discussing special + considerations because GLR semantic actions might be deferred. + (Actions): Mention look-ahead usage of yylval. + (Actions and Locations): Mention look-ahead usage of yylloc. + (Special Features for Use in Actions): Add YYEOF entry and mention it + in the yychar entry. + In the yychar entry, remove mention of the local yychar case (pure + parser) since this is irrelevant information when writing semantic + actions and since it's already discussed in `Bison Symbols' where + yychar is otherwise described as an external variable. + In the yychar entry, don't call it the `current' look-ahead since it + isn't when semantic actions are deferred. + In the yychar and yyclearin entries, add note about deferred semantic + actions. + Add yylloc and yylval entries discussing look-ahead usage. + (Look-Ahead Tokens): When discussing yychar, don't call it the + `current' look-ahead, and do mention yylval and yylloc. + (Error Recovery): Cross-reference `Action Features' when mentioning + yyclearin. + (Bison Symbols): In the yychar entry, don't call it the `current' + look-ahead. + In the yylloc and yylval entries, mention look-ahead usage. + +2006-01-08 Joel E. Denny + + * tests/glr-regression.at: Update copyright year to 2006. + +2006-01-06 Joel E. Denny + + * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to + use during nondeterministic operation to track which stacks have + actually needed the current lookahead. + (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack): + Allocate, deallocate, resize, and otherwise shuffle space for + yylookaheadStatuses in parallel with yystates member of yyGLRStateSet. + (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status + appropriately during nondeterministic operation. + (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc + members to store the current lookahead to be used by the deferred + user action. + (yyaddDeferredAction): Add size_t yyk parameter specifying the stack + from which the RHS is taken. Set the lookahead members of the new + yySemanticOption according to the lookahead status for stack yyk. + (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to + yyaddDeferredAction. + (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead + members of yySemanticOption before invoking yyuserAction, and then set + them back to their current values afterward. + (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY. + (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint. + * tests/glr-regression.at: Remove `.' from the ends of recent test case + titles for consistency. + (Leaked merged semantic value if user action cuts parse): In order to + suppress lint warnings, use arguments in merge function, and assign + char value < 128 in main. + (Incorrect lookahead during deterministic GLR): New test case. + (Incorrect lookahead during nondeterministic GLR): New test case. + +2006-01-06 Joel E. Denny + + * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept + !yyvaluep as signal that no semantic value is available to print. + * data/glr.c (yydestroyGLRState): If state is not resolved, don't try + to print a semantic value. + +2006-01-06 Joel E. Denny + + * tests/glr-regression.at: For consistency with my newer test cases, + don't thank myself. + +2006-01-05 Joel E. Denny + + * data/glr.c (yyresolveValue): When merging semantic options, if at + least one user action succeeds but a later one cuts the parse, then + destroy the semantic value before returning rather than leaking it. + (yyresolveStates): If a user action cuts the parse and thus + yyresolveValue fails, ignore the (unset) semantic value rather than + corrupting the yyGLRState, and empty the semantic options list since + the user actions should have called all necessary destructors. + Simplify code with YYCHK. + * tests/glr-regression.at (Corrupted semantic options if user action + cuts parse): New test case. + (Undesirable destructors if user action cuts parse): New test case. + Before applying any of this patch, this test case never actually failed + for me... but only because the corrupted semantic options usually + masked this bug. + (Leaked merged semantic value if user action cuts parse): New test + case. + +2006-01-05 Akim Demaille + + * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/. + +2006-01-04 Paul Eggert + + * data/c.m4 (b4_c_modern): New macro, with a new provision for + _MSC_VER. Problem reported by Cenzato Marco. + (b4_c_function_def): Use it. + * data/yacc.c (YYMODERN_C): Remove. All uses replaced by + b4_c_modern. + (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather + than rolling our own. + +2006-01-04 Akim Demaille + + Also warn about non-used mid-rule values. + * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule + member. + (symbol_list_new): Adjust. + * src/reader.c (symbol_typed_p): New. + (grammar_rule_check): Use it. + (grammar_midrule_action): Bind a mid-rule LHS to its rule. + Check its rule. + * tests/input.at (AT_CHECK_UNUSED_VALUES): New. + Use it. + * tests/actions.at (Exotic Dollars): Adjust. + +2006-01-04 Akim Demaille + + * src/reader.c (grammar_midrule_action): If $$ is set in a + mid-rule, move the `used' bit to its lhs. + * tests/input.at (Unused values): New. + * tests/actions.at (Exotic Dollars): Adjust: exp is not typed. + +2006-01-03 Paul Eggert + + * doc/bison.texinfo (Bison Options): Say more accurately what + --yacc does. + * src/parse-gram.y (rules_or_grammar_declaration): Don't complain + about declarations in the grammar when in Yacc mode, as POSIX does + not require a diagnostic when the grammar uses extensions. + + * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool. + + Warn about dubious constructions like "%token T T". + Reported by twlevo. + * src/symtab.h (struct symbol.declared): New member. + * src/symtab.c (symbol_new): Initialize it to false. + (symbol_class_set): New arg DECLARING, specifying whether + this is a declaration that we want to warn about, if there + is more than one of them. All uses changed. + + * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: + Allow multiple %union directives, whose contents concatenate. + * src/parse-gram.y (grammar_declaration): Likewise. + Use muscle_code_grow, so that we don't need stype_line any more. + All uses changed. + + * src/muscle_tab.c (muscle_grow): Fix comment. + + * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc: + * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at: + Update copyright year to 2006. + +2006-01-03 Akim Demaille + + Have glr.cc pass (some of) the calc.at tests. + * data/glr.cc (b4_parse_param_orig): New. + (b4_parse_param): Improve its definition, and bound it more + clearly in the skeleton. + (b4_epilogue): Append, instead of prepending, in order to keep + #line consistency. + Simplify the generation of auxiliary functions: locations and + purity are mandated. + (b4_global_tokens_and_yystype): Honor it. + * data/location.cc (c++.m4): Don't include it. + * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF + and AT_SKEL_CC_IF. + * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of + AT_LALR1_CC_IF. + Be sure to initialize the first position's filename. + (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are + mandated anyway. + (AT_CHECK_CALC_GLR_CC): New. + Use it to exercise glr.cc as a lalr1.cc drop-in replacement. + +2006-01-02 Akim Demaille + + * src/output.c (output_skeleton): Don't hard wire the inclusion of + c.m4. + * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4. + * data/glr.cc: Do not include stack.hh. + 2006-01-02 Joel E. Denny * data/glr.c: Reformat whitespace with tabs. @@ -821,7 +1135,7 @@ 2005-09-19 Akim Demaille - * NEWS, configure.ac: Bump to 2.1a. + * NEWS, configure.ac: Version 2.1a. 2005-09-16 Paul Eggert @@ -15066,8 +15380,8 @@ ----- Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, - 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software - Foundation, Inc. + 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free + Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this