+2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * src/scan-gram.l (braces_level, context_state): Make these globals
+ static.
+
+2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ In the grammar scanner, STRING_FINISH unclosed constructs and return
+ them to the parser in order to improve error messages.
+ * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
+ SC_BRACED_CODE, SC_PROLOGUE): Implement.
+ * tests/input.at (Unclosed constructs): New test case.
+ * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
+ seen.
+
+ * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
+ unused global.
+
+2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Handle string aliases for character tokens correctly.
+ * src/symtab.c (symbol_user_token_number_set): If the token has an
+ alias, check and set its alias's user token number instead of its own,
+ which is set to indicate the alias. Previously, every occurrence of
+ the character token in the grammar overwrote that alias indicator with
+ the character code.
+ * tests/input.at (String aliases for character tokens): New test.
+
+2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
+
+2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
+ to prevent failures when building on older platforms.
+ Check for autopoint failure.
+ Set XGETTEXT_OPTIONS to values that check for C format strings,
+ so that translators are warned about them (this also helps
+ prevent core dumps).
+
+ * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
+ function, since it simplifies our code a bit.
+
+ * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
+ rather than -W, so we don't get bogus warnings about sign comparisons.
+ Add -Wpointer-arith, since that warning is useful (it reports code
+ that does not conform to C89 and that some compilers reject).
+ * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
+ since it's no longer needed.
+
+2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Clean up scanners a bit.
+ * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
+ definitions so gcc won't warn when obstack_for_string is unused.
+ * src/scan-code.l: config.h and system.h are already #include'd by
+ scan-code-c.c, so get rid of them here.
+ * src/scan-gram.l: Likewise.
+ * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
+ definitions rather than duplicating the rest of it.
+ * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
+
+2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Suppress signed/unsigned comparison warnings for yycheck.
+ * data/c.m4 (b4_safest_int_type): New macro.
+ * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
+ a signed int type, cast it to b4_safest_int_type first.
+ * data/yacc.c: Likewise.
+ (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
+ also overwritten.
+
+2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
+
+ * doc/bison.texinfo: Fix some typos.
+
+2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
+ po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
+
+ * bootstrap (gnulib_tool): Stop using --assume-autoconf;
+ the latest gnulib does this a different way.
+ (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
+ translation was patched, so stop omitting it.
+
+2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Enable declaration of default %printer/%destructor. Make the parser
+ use these for all user-declared grammar symbols for which the user does
+ not declare a specific %printer/%destructor. Thus, the parser uses it
+ for token 0 if the user declares it but not if Bison generates it as
+ $end. Discussed starting at
+ <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
+ <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
+ and
+ <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
+ * NEWS (2.3+): Mention.
+ * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
+ declare a %destructor for a mid-rule's semantic value. It's just
+ impossible to declare one specific to it.
+ (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
+ code. Describe default %destructor form.
+ * src/parse-gram.y (grammar_declaration): Parse default
+ %printer/%destructor declarations.
+ * src/output.c (symbol_destructors_output): Use symbol_destructor_get
+ and symbol_destructor_location_get rather than accessing the destructor
+ and destructor_location members of struct symbol.
+ (symbol_printers_output): Likewise but for %printer's.
+ * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
+ again.
+ * src/symtab.c (default_destructor, default_destructor_location,
+ default_printer, default_printer_location): New static global
+ variables to record the default %destructor and %printer.
+ (symbol_destructor_get, symbol_destructor_location_get,
+ symbol_printer_get, symbol_printer_location_get): New functions to
+ compute the appropriate %destructor and %printer for a symbol.
+ (default_destructor_set, default_printer_set): New functions to set the
+ default %destructor and %printer.
+ * src/symtab.h: Prototype all those new functions.
+ * tests/actions.at (Default %printer and %destructor): New test to
+ check that the right %printer and %destructor are called, that they're
+ not called for $end, and that $$ and @$ work correctly.
+ (Default %printer and %destructor for user-declared end token): New
+ test to check that the default %printer and %destructor are called for
+ a user-declared end token.
+ * tests/input.at (Default %printer and %destructor redeclared, Unused
+ values with default %destructor): New tests to check related grammar
+ warnings and errors.
+
+2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Clean up handling of %destructor for the end token (token 0).
+ Discussed starting at
+ <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
+ and
+ <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
+
+ Make the skeletons consistent in how they pop the end token and invoke
+ its %destructor.
+ * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
+ state, which has token number 0, since this would invoke the
+ %destructor for the end token.
+ * data/lalr1.cc (yy::parser::parse): Don't check for the final state
+ until after shifting the end token, or else it won't be popped.
+ * data/yacc.c (yyparse): Likewise.
+
+ * data/glr.c (yyparse): Clear the lookahead after shifting it even when
+ it's the end token. Upon termination, destroy an unshifted lookahead
+ even when it's the end token.
+ * data/lalr1.cc (yy::parser::parse): Likewise.
+ * data/yacc.c (yyparse): Likewise.
+
+ * src/reader.c (packgram): Don't check rule 0. This suppresses unused
+ value warnings for the end token when the user gives the end token a
+ %destructor.
+
+ * tests/actions.at (Printers and Destructors): Test all the above.
+
+2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ Update to latest gnulib and gettext versions.
+ * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
+ Add fopen-safer.
+ (gnulib_files): Add m4/warning.m4. Don't worry about files
+ overwritten by autopoint.
+ Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
+ Suppress "id", "ms", "tr" translations for now, since gettext 0.15
+ rejects them.
+ Don't use autoreconf; instead, invoke autopoint etc. by hand,
+ so that we can remove the intl files at a better time.
+ (intl_files_to_remove): Remove aclocal.m4, since it gets
+ rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
+ m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
+ m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
+ Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
+ Remove datarootdir hack; no longer needed.
+ * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
+ (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
+ * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
+ strdup.h.
+ * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
+ * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
+
+2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * bootstrap: Adjust to today's change to gnulib-tool by invoking
+ it with --assume-autoconf='latest-stable'.
+
+2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
+ least 1.4.7 and 1.4.4) by putting a #line between `typedef union
+ YYSTYPE' and `{'.
+ * src/muscle_tab.h (muscle_grow): Replace the header comments with
+ those from muscle_tab.c since the old ones are misleading.
+
+2006-07-13 Akim Demaille <akim@epita.fr>
+
+ Support %define "KEY" {VALUE}.
+ * src/scan-code.h, src/scan-code.l (translate_action)
+ (translate_rule_action, translate_symbol_action, translate_code):
+ Return char *, not const char *.
+ * src/parse-gram.y (declaration): Rename as...
+ (prologue_declaration): this.
+ (string_content): Remove this nonterminal, use STRING.
+ (braceless, content, content.opt): New nonterminal.
+ Use them.
+ (%define): Now accept content.opt, i.e., accept also BRACED_CODE
+ as value.
+ * src/scan-gram.l (getargs.h): Don't include it.
+
+2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
+
+ * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
+ rather than a for-loop that declares a local bool variable. This
+ should work around a compatibility problem with a Cray x1e C++
+ compiler reported by Hung Nguyen in
+ <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
+ The for-loop was introduced in the 2004-11-17 change but I don't
+ know why it was needed.
+
+2006-07-12 Akim Demaille <akim@epita.fr>
+
+ * data/c.m4: Comment changes.
+
+2006-07-10 Akim Demaille <akim@lrde.epita.fr>
+
+ * src/complain.c (error_message, ERROR_MESSAGE): New.
+ To factor...
+ (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
+ * src/complain.h, src/complain.c (warning_issued): Remove, unused.
+
+2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: Instead of %union, you can define and use your own union type
+ YYSTYPE if your grammar contains at least one <type> tag.
+ Your YYSTYPE need not be a macro; it can be a typedef.
+ * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
+ (Union Decl, Decl Summary): Document this.
+ * data/glr.c (YYSTYPE): Implement this.
+ * data/glr.cc (YYSTYPE): Likewise.
+ * data/lalr1.cc (YYSTYPE): Likewise.
+ * data/yacc.c (YYSTYPE): Likewise.
+ * src/output.c (prepare): Output tag_seen_flag.
+ * src/parse-gram.y (declaration, grammar_declaration):
+ Use 'union_seen' rather than 'typed' to determine whether
+ %union has been seen, since grammars can now be typed without
+ %union.
+ (symbol_declaration, type.opt, symbol_def):
+ Keep track of whether a tag has been seen.
+ * src/reader.c (union_seen, tag_seen): New vars.
+ (typed): remove.
+ * src/reader.h (union_seen, tag_seen, typed): Likewise.
+ * src/scan-code.l (untyped_var_seen): New variable.
+ (handle_action_dollar): Adjust to above changes.
+ (handle_action_dollar, handle_action_at):
+ Improve overflow checking for outlandish numbers.
+ * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
+ avoid new diagnostics generated by above changes.
+ * tests/regression.at (YYSTYPE typedef): Add test to check
+ for type tags without %union.
+
+ * src/symlist.c (symbol_list_length): Return int, not unsigned
+ int, since callers expect int. This may need to get revisited
+ once we have proper integer overflow checking.
+
+ * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
+ object is now static.
+
+ * src/getargs.c (flags_argmatch): Return void, not int,
+ to pacify ./configure --enable-gcc-warnings.
+
+ * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
+ since last_string is already defined to FLEX_PREFIX (last_string).
+
+2006-07-09 Akim Demaille <akim@lrde.epita.fr>
+
+ Implement --warnings/-W.
+ * src/getargs.c (report_argmatch, trace_argmatch): Remove,
+ replaced by...
+ (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
+ Adjust callers.
+ * src/getargs.h, src/getargs.c (warnings, warnings_flags)
+ (warnings_args, warnings_types): New.
+ (getargs, short_options, long_options): Accept -W/--warnings.
+ Sort the options by alphabetical order, upper case letter right
+ before its lower case.
+
+2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Change %merge result type clash warnings to errors. Discussed at
+ <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
+ * src/reader.c (record_merge_function_type): Use complain_at.
+ * tests/glr-regression.at (Missed %merge type warnings when LHS type is
+ declared later): Update test case results.
+
+2006-07-09 Akim Demaille <akim@lrde.epita.fr>
+
+ * src/getargs.h, src/getargs.c: Swap --report and --trace handling
+ to be in alphabetical order.
+ (trace_args): Spelling fixes.
+
+2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
+ so they don't collide with user-defined macros.
+ (yy_stack_print): Don't assume that yytype_int16 promotes to int;
+ this was never guaranteed, and now that we're using gnulib stdint,
+ which defines int_fast16_t to long int, the problem is exposed.
+
+2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ * data/c.m4 (b4_basename): Simplify a bit, since we don't
+ need the full POSIX semantics (and weren't implementing them
+ anyway).
+
+ Adjust to Autoconf 2.60 and today's gnulib.
+ * bootstrap (gnulib_modules): Add stdint.
+ Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
+ no longer copies it.
+ (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
+ since stdint needs the former and wcwidth (which is now required
+ by mbswidth) needs the latter.
+ Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
+ work around a compatibility glitch between gettext 0.14.6 and
+ Autoconf 2.60.
+ * configure.ac (AC_PREREQ): Require Autoconf 2.60.
+ Do not check for uintptr_t, since new stdint module does the right
+ thing.
+ * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
+ Add stdint.h, stdint_.h, wcwidth.h.
+ * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
+ Add absolute-header.m4, double-slash-root.m4, longlong.m4,
+ stdint.m4, wchar_t.m4, wcwidth.m4.
+ * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
+ usual order for ../lib/*.h files.
+ (file_name_split): Use last_component, not base_name, to adjust
+ to gnulib changes.
+ * src/parse-gram.h: Include <strverscmp.h> in the usual order
+ for ../lib/*.h files.
+ (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
+ Define unconditionally, since we now assume the stdint module.
+ * src/scan-skel.l: Include <dirname.h>.
+ (BASE_QPUTS): Use last_component, not base_name.
+ * src/system.h: Include <unlocked-io.h> in the usual order
+ for ../lib/*.h files. Include <stdint.h> unconditionally,
+ since we now use the stdint module.
+ (uintptr_t): Declare if UINTPTR_MAX is not defined, not
+ HAVE_UINTPTR_T, since we now use the stdint module.
+ (base_name): Remove decl, since files now include <dirname.h>
+ to get the decl.
+
2006-07-08 Akim Demaille <akim@lrde.epita.fr>
* data/c.m4 (b4_location_initial_column, b4_location_initial_line):
2006-07-08 Akim Demaille <akim@lrde.epita.fr>
- * data/c.m4 (b4_dirname): New.
+ * data/c.m4 (b4_basename): New.
(b4_syncline): Also output the location of its invocation (from
the skeleton).
(b4_user_action, b4_define_user_action, b4_user_actions)
* data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
-2004-10-28 Akim Demaille <akim@epita.fr>,
+2004-11-17 Akim Demaille <akim@epita.fr>,
Alexandre Duret-Lutz <adl@gnu.org>
* data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow