+2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
+ page. Say "you can use it" not "you may use it" as on the web page;
+ we're describing capabilities not granting permission.
+
+2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ * data/glr.c (yyresolveLocations): Rename local variables to avoid
+ shadowing warnings. Use usual patter for iterating through RHS.
+ * tests/glr-regression.at
+ (Uninitialized location when reporting ambiguity):
+ Modify yylex so that it uses its argument, rather than trying
+ to rely on ARGSUSED (which doesn't work for gcc with warnings).
+ const char -> char const.
+
+ * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
+ Don't use tabs inside commands; it messes up 'ps'.
+ Problem reported by twlevo.
+
+2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * tests/glr-regression.at (Uninitialized location when reporting
+ ambiguity): New test case.
+ * data/glr.c (yyresolveLocations): New function, which uses
+ YYLLOC_DEFAULT.
+ (yyresolveValue): Invoke yyresolveLocations before reporting an
+ ambiguity.
+ * doc/bison.texinfo (Default Action for Locations): Note
+ YYLLOC_DEFAULT's usage for ambiguity locations.
+ (GLR Semantic Actions): Cross-reference those notes.
+
+2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * tests/glr-regression.at (Leaked semantic values when reporting
+ ambiguity): Remove unnecessary union and type declarations.
+ (Leaked lookahead after nondeterministic parse syntax error): New test
+ case.
+ * data/glr.c (yyparse): Check for zero stacks remaining before
+ attempting to shift the lookahead so that you don't lose it.
+
+2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
+ * tests/glr-regression.at (Leaked semantic values when reporting
+ ambiguity): New test case.
+ * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
+ yyabort rather than invoking yyFail, which invokes longjmp. Remove the
+ now unnecessary yystackp parameter.
+ (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
+ destructors can be called.
+
+ * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
+ in existing testcases.
+
+2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Don't leak semantic values for parent RHS when a user action cuts the
+ parser, and clean up related code a bit.
+ * tests/glr-regression.at (Leaked merged semantic value if user action
+ cuts parse): Rename to...
+ (Leaked semantic values if user action cuts parse): ... this. Add check
+ for leaked parent RHS values.
+ * data/glr.c (yydestroyGLRState): In debugging output, distinguish
+ between an unresolved state (non-empty chain of semantic options) and
+ an incomplete one (signaled by an empty chain).
+ (yyresolveStates): Document the interface. Move all manipulation of a
+ successfully or unsuccessfully resolved yyGLRState to...
+ (yyresolveValue): ... here so that yyresolveValue always leaves a
+ yyGLRState with consistent data and thus is easier to understand.
+ Remove the yyvalp and yylocp parameters since they are always just
+ taken from the yys parameter. When reporting a discarded merged value
+ in debugging output, note that it is incompletely merged. Document the
+ interface.
+ (yyresolveAction): If resolving any of the RHS states fails, destroy
+ them all rather than leaking them. Thus, as long as user actions are
+ written to clean up the RHS correctly, yyresolveAction always cleans up
+ the RHS of a semantic option. Document the interface.
+
+2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
+ led to a segmentation fault in GNU Pascal. Problem reported
+ by Waldek Hebisch.
+
+2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
+ mid-rule action inside a nonterminal symbol in order to declare a
+ destructor for its semantic value.
+
+2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
+ YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
+ __cplusplus && ! defined _STDLIB_H && !
+ ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
+ defined free))]: Include <stdlib.h> rather than rolling our own
+ declarations of malloc and free, to avoid problems with
+ incompatible declarations (using 'throw') C++'s stdlib.h. This
+ should fix Debian bug 340012
+ <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
+ reported by Guillaume Melquiond.
+
+2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: Clarify symbols versus types in unused-value warnings.
+
+ * configure.ac (AC_INIT): Bump version number.
+
+2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: Version 2.1a.
+ * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
+ since C99 requires this.
+
+2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * m4/c-working.m4: New file.
+ * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
+
+2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.maint: Merge from coreutils.
+
+2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ More portability fixes for problems summarized by Nelson H. F. Beebe.
+
+ * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
+ configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
+ CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
+ LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
+ messes up because C++ code is compiled in 32-bit mode but linked
+ in 64-bit mode.
+
+2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ More portability fixes for problems summarized by Nelson H. F. Beebe.
+
+ * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
+ 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
+
+ * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
+ nodist_PROGRAMS, since we don't need to actually compile the
+ example if we're just doing a plain 'make'. This avoids bothering
+ the installer unnecessarily about problems due to weird C++
+ compilers.
+
+2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ More portability fixes for problems summarized by Nelson H. F. Beebe.
+
+ * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
+ than #include "...", and compile with -I'.'. The old method was
+ not portable, according to Posix and the C standard, and it does
+ not work with Sun C 5.7, where previous #line directives affect
+ the working directory used in later #include "..." directives.
+
+2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
+
+ Various DJGGP specific issues in /djgpp
+
+2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ More portability fixes for problems summarized by Nelson H. F. Beebe.
+
+ * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
+ '#include <map>' works and that you can apply ++ to iterators.
+
+2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ Work around portability problems summarized by Nelson H. F. Beebe in
+ <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
+
+ * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
+ that '#include <string>' works.
+
+ * data/lalr1.cc (yytranslate_): No longer inline, to work around a
+ porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
+ "warning: sorry: semantics of inline function static data `const
+ unsigned char translate_table[262]' are wrong (you'll wind up with
+ multiple copies)".
+
+ * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
+ or, xor to not_, and_, or_, and xor_, respectively. This works
+ around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
+ random system header somewhere that includes the equivalent of
+ <iso646.h>.
+
+ * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
+ -E" works; it apparently doesn't work with PathScale EKO Compiler
+ Suite Version 2.0.
+
+2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ During deterministic GLR operation, user actions should be able to
+ influence the parse by changing yychar. To make this easier to fix and
+ to make glr.c easier to evolve in general, don't maintain yytoken in
+ parallel with yychar; just compute yytoken when needed.
+ * tests/glr-regression.at (Incorrect lookahead during deterministic
+ GLR): Check that setting yychar in a user action has the intended
+ effect.
+ * data/glr.c (yyGLRStack): Remove yytokenp member.
+ (yyclearin): Don't set *yytokenp.
+ (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
+ yychar rather than *yytokenp to determine the current lookahead.
+ Compute yytoken locally when needed.
+ (yyparse): Likewise. Remove the local yytoken that yytokenp used to
+ point to.
+
+ * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
+ after `--report' documentation.
+
+2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * src/parse-gram.y (grammar_declaration): Location of printer
+ symbol is @1, not list->location. Bug reported by twlevo.
+ * tests/input.at (Incompatible Aliases): Adjust to above change.
+
+2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
+ all the test at once. This makes the output easier to read in the
+ normal case.
+
+ Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
+ got from <http://bro-ids.org/download.html>. The bug is that
+ when two actions appeared in succession, the second one was
+ scanned before the first one was added to the grammar rule
+ as a midrule action. Bison then output the incorrect warning
+ "parse.y:905.17-906.36: warning: unused value: $3".
+ * src/parse-gram.y (BRACED_CODE, action): These are no longer
+ associated with a value.
+ (rhs): Don't invoke grammar_current_rule_action_append.
+ (action): Invoke it here instead.
+ * src/reader.c (grammar_midrule_action): Now extern.
+ (grammar_current_rule_action_append): Don't invoke
+ grammar_midrule_action; that is now the scanner's job.
+ * src/reader.h (last_string, last_braced_code_loc):
+ (grammar_midrule_action): New decls.
+ * src/scan-gram.l (last_string): Now extern, sigh.
+ (last_braced_code_loc): New extern variable.
+ (<INITIAL>"{"): Invoke grammar_midrule_action if the current
+ rule already has an action.
+ (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
+ * tests/input.at (AT_CHECK_UNUSED_VALUES):
+ Add some tests to check that the above changes fixed the bug.
+
+2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
+ All used changed. Check whether the symbol has a destructor,
+ not whether it is typed.
+ * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
+ that the values are still reported as unused. All line numbers
+ adjusted.
+
+2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ Work around a bug in bro 0.8, which underparenthesizes its
+ definition of YYLLOC_DEFAULT.
+ * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
+ their arguments.
+ * data/lalr1.cc: Likewise.
+ * data/yacc.cc: Likewise.
+
+2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Work around a bug in Pike 7.0, and give the Pike folks a
+ better way to override the usual int widths.
+ * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
+ user can override the types.
+ (short): #undef, to work around a bug in Pike 7.0.
+ (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
+ (union yyalloc.yyss): Use yytype_int16 rather than short.
+ All uses changed.
+ (yysigned_char): Remove.
+ * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
+ (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
+ * tests/regression.at (Web2c Actions): Adjust to above changes.
+
+ * src/reader.c (check_and_convert_grammar): New function.
+ (reader): Close the input file even if something went wrong during
+ parsing. Minor file descriptor leak reported by twlevo.
+
+ * src/assoc.c (assoc_to_string): Use a default: abort (); case
+ to pacify gcc -Wswitch-default.
+ * src/scan-gram.l (adjust_location): Use a default: break; case
+ to pacify gcc -Wswitch-default.
+ * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
+ (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
+ (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
+ Move these decls to scan-skel.l, since they don't need to be
+ visible elsewhere.
+ * src/scan-skel.l: Accept the above decls.
+ (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
+ is used.
+
+2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.cfg (local-checks-to-skip): Add changelog-check,
+ since we don't want to insist on a version number at the start
+ of the changelog every time.
+ * Makefile.maint: Sync from coreutils a bit better.
+ (sc_trailing_blank): Renamed from sc_trailing_space.
+ All uses changed.
+ (sc_no_if_have_config_h, sc_require_config_h):
+ (sc_prohibit_assert_without_use): New rules.
+ (sc_obsolete_symbols): Don't catch Makefile.maint itself.
+ (sc_dd_max_sym_length): Fix leading spaces in rule.
+ (sc_system_h_headers): Prefix with @.
+ (sc_useless_cpp_parens, m4-check): Output line numbers.
+ (changelog-check): Allow version only in head.
+ * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
+ satisfy new Makefile.maint rule.
+ * data/glr.c: Likewise.
+ * data/glr.cc: Likewise.
+ * data/lalr1.cc: Likewise.
+ * data/yacc.c: Likewise.
+ * lib/ebitsetv.c: Likewise.
+ * lib/lbitset.c: Likewise.
+ * lib/subpipe.c: Likewise.
+ * lib/timevar.c: Likewise.
+ * src/system.h: Likewise.
+ * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
+ * djgpp/Makefile.maint: Add copyright notice.
+ * djgpp/README.in: Likewise.
+ * djgpp/config.bat: Likewise.
+ * djgpp/config.site: Likewise.
+ * djgpp/config_h.sed: Likewise.
+ * djgpp/djunpack.bat: Likewise.
+ * djgpp/config.sed: Fix copyright notice to match standard format.
+ * djgpp/subpipe.h: Likewise.
+ * lib/bitsetv-print.c: Likewise.
+ * lib/bitsetv.c: Likewise.
+ * lib/subpipe.h: Likewise.
+ * lib/timevar.c: Likewise.
+ * lib/timevar.h: Likewise.
+ * djgpp/subpipe.c: Use standard recipe for config.h.
+ * lib/abitset.c: Likewise.
+ * lib/bitset.c: Likewise.
+ * lib/bitset_stats.c: Likewise.
+ * lib/bitsetv-print.c: Likewise.
+ * lib/bitsetv.c: Likewise.
+ * lib/ebitsetv.c: Likewise.
+ * lib/get-errno.c: Likewise.
+ * lib/lbitset.c: Likewise.
+ * lib/subpipe.c: Likewise.
+ * lib/timevar.c: Likewise.
+ * lib/vbitset.c: Likewise.
+ * tests/local.at: Likewise.
+ * src/scan-gram.l: Don't include verify.h, since system.h does
+ that for us.
+ * .x-sc_require_config_h: New file.
+ * .x-sc_unmarked_diagnostics: New file.
+
+2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ 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.h>.
+ (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 <eggert@cs.ucla.edu>
+
+ 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 <cstdlib>' 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 <akim@epita.fr>
* tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2005-09-19 Akim Demaille <akim@epita.fr>
- * NEWS, configure.ac: Version 2.1a.
+ * NEWS, configure.ac: update version number to 2.1a.
2005-09-16 Paul Eggert <eggert@cs.ucla.edu>