-2006-12-08 Bob Rossi <bob@brasko.net>
+2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Encapsulate the push parser state variables into an M4 macro so the
+ push skeleton doesn't have to list them again for pull mode's yyparse.
+ For push mode, remove yypush_parse's local equivalents of these
+ variables to eliminate unnecessary copying between the two sets at
+ run-time. This patch also fixes at least a bug related to multiple
+ %initial-action invocations in push mode.
+ * data/push.c (b4_declare_parser_variables): Rename to...
+ (b4_declare_scanner_communication_variables): ... this for clarity and
+ update both uses.
+ (b4_declare_yyparse_variables): Remove and move its contents to the one
+ spot where it was invoked.
+ (b4_declare_parser_state_variables): New macro containing the parser
+ state variables required by push mode.
+ (struct yypstate): Replace all fields but yynew with
+ b4_declare_parser_state_variables.
+ (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
+ yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
+ each NAME in this list to yyps->NAME so it can be used in yypush_parse.
+ (yyparse or yypush_parse): For yyparse in pull mode, replace local
+ parser state variable declarations with
+ b4_declare_parser_state_variables.
+ Don't initialize parser state variables when calling yypush_parse since
+ yypstate_new already does that.
+ Invoke the user's initial action only upon the first yypush_parse
+ invocation.
+ Remove all code that copies between the local parser state variables
+ and the yypstate.
+
+2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
+ prevent a name collision in a future patch where these names will
+ sometimes be #define'd.
+ (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
+ since it no longer has the same name as the existing argument.
+ (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
+
+2006-12-19 Paolo Bonzini <bonzini@gnu.org>
+ and Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * doc/bison.texinfo (Decl Summary): In the %language entry, mention
+ that the argument is case-insensitive, and there's no `=' here.
+ For the %skeleton entry, mention that %language is better.
+ (Bison Options): Likewise for --language and --skeleton. Move the
+ --skeleton entry so that the `Tuning the parser' section is sorted
+ alphabetically on long options.
+ (C++ Bison Interface): Don't use the word skeleton. Don't explain the
+ %language directive in detail here; cross-reference the %language
+ documentation instead.
+ (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
+ `%require "2.3b"' so that the example is always up-to-date.
+ (Bison Symbols): Add entries for %language and %skeleton.
+ * examples/extexi (normalize): Instead of replacing every %require
+ argument with the current Bison version, just substitute for
+ `@value{VERSION}'. This guarantees that we're testing what actually
+ appears in the documentation.
+ * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
+ rather than `@VERSION@'.
+
+2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: Reword the %language news a bit, and put it earlier.
+
+ * src/getargs.c (skeleton_arg): Last arg is now location const *.
+ Rewrite to simplify the logic.
+ (language_argmatch): Likewise.
+ (program_name): We now own this var.
+ * src/getargs.h (struct bison_language): Use char[] rather than
+ const char *.
+
+ * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
+ Java is supported.
+ * src/complain.c (program_name): Remove decl; no longer needed.
+ * src/main.c (program_name): Remove; now belongs to getargs.
+
+2006-12-18 Paolo Bonzini <bonzini@gnu.org>
+
+ * NEWS: Document %language.
+
+ * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
+
+ * data/c-skel.m4, data/c++-skel.m4: New files.
+ * data/glr.c: Complain on push parsers.
+
+ * doc/bison.texinfo (C++ Parser Interface): Prefer %language
+ over %skeleton.
+ (Directives): Document %language and %skeleton.
+ (Command line): Document -L.
+
+ * examples/extexi: Rewrite %require directive.
+ * examples/calc++/Makefile.am: Pass VERSION to extexi.
+
+ * src/files.c (compute_exts_from_gc): Look in language structure
+ for .y extension.
+ (compute_file_name_parts): Check whether .tab should be added.
+ * src/getargs.c (valid_languages, skeleton_prio, language_prio):
+ (language, skeleton_arg, language_argmatch): New.
+ (long_options): Add --language.
+ (getargs): Use skeleton_arg, add -L/--language.
+ * src/getargs.h: Include location.h.
+ (struct bison_language, language, skeleton_arg, language_argmatch): New.
+ * src/output.c (prepare): Pick default skeleton from struct language.
+ Don't dispatch C skeletons here.
+ * src/parse-gram.y (PERCENT_LANGUAGE): New.
+ (prologue_declaration): Add "%language" rule, use skeleton_arg.
+ * src/scan-gram.l ("%language"): New rule.
+
+ * tests/calc.at: Test %skeleton and %language.
+ * tests/local.at (AT_SKEL_CC_IF): Look for %language.
+ (AT_GLR_IF): Look for %skeleton "glr.cc".
+ (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
+ (AT_YACC_IF): Reject %language.
+
+2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
+ since it wasn't used; only the typedef name 'semantic_type' is needed.
+ Also, omit trailing white space.
+
+ * bootstrap: Sync from coreutils.
+ (gnulib_extra_files): Add build-aux/announce.gen.
+ (slurp): Adjust .gitignore files like .cvsignore files.
+ * build-aux/announce-gen: Remove from CVS, since bootstrap
+ now creates this.
+
+2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Make %push-parser imply %pure-parser. This fixes several bugs; see
+ <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
+ * src/parse-gram.y (prologue_declaration): For %push-parser, also set
+ pure_parser = true.
+ * data/push.c: Don't bother testing b4_push_if when deciding whether
+ to expand b4_declare_parser_variables globally.
+ (yypush_parse): Likewise in here.
+
+ * data/push.c (yypush_parse): Add b4_parse_param to arguments.
+ (yy_reduce_print): Reformat M4 for readability.
+
+2006-12-15 Bob Rossi <bob@brasko.net>
+ and Joel Denny <jdenny@ces.clemson.edu>
+
+ * data/push.c (yypstate): Add typedef, and update all uses of
+ struct yypstate to just yypstate.
+ * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
+
+2006-12-14 Bob Rossi <bob@brasko.net>
+
+ * data/push.c (yypush_parse): Declare prototype regardless of
+ %locations option.
+
+2006-12-14 Bob Rossi <bob@brasko.net>
+
+ * data/push.c (yyparse): Remove the prototype and the #define when in
+ push-parser mode.
+
+2006-12-13 Bob Rossi <bob@brasko.net>
+
+ * data/push.c (yypstate_init): Rename to...
+ (yypstate_new): ... this and use b4_c_function_def.
+ (yypstate_delete): New.
+ (yypush_parse): Change parameters yynval and yynlloc to be const.
+ * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
+ yypstate_delete functions.
+
+2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
+ strange test case titles. Reported by Bob Rossi.
+
+2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
+
+ * TODO: Add pointer to Sylvain Schmitz's work on static detection
+ of potential ambiguities in GLR grammers.
+
+2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
+ `bison ', use m4_index instead of m4_substr since chopping up a string
+ containing M4-special characters causes problems here.
+
+ Fix a couple of bugs related to special characters in user-specified
+ file names, and make it easier for skeletons to compute output file
+ names with the same file name prefix as Bison-computed output file
+ names.
+ * data/glr.cc, data/push.c, data/yacc.c: In @output, use
+ b4_parser_file_name and b4_spec_defines_file instead of
+ @output_parser_name@ and @output_header_name@, which are now redundant.
+ * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
+ b4_parser_file_name, b4_spec_defines_file, and the new
+ @basename(FILENAME@) instead of @output_parser_name@ and
+ @output_header_name@, which inappropriately escaped the file names as
+ C string literals.
+ * src/files.c (all_but_ext): Remove static qualifier.
+ (compute_output_file_names): Move `free (all_but_ext)' to...
+ (output_file_names_free): ... here since all_but_ext is needed later.
+ * src/files.h (all_but_ext): Extern.
+ * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
+ exactly what MUSCLE_INSERT_STRING used to do.
+ (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
+ characters are escaped properly.
+ * src/output.c (prepare): Define muscle file_name_all_but_ext as
+ all_but_ext.
+ For pkgdatadir muscle, maintain previous functionality by using
+ MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
+ is that b4_pkgdatadir is used inside m4_include in the skeletons, so
+ digraphs would never be expanded. Hopefully no one has M4-special
+ characters in his Bison installation path.
+ * src/scan-skel.l: Don't parse @output_header_name@ and
+ @output_parser_name@ anymore since they're now redundant.
+ In @output, use decode_at_digraphs.
+ Parse a new @basename command that invokes last_component.
+ (decode_at_digraphs): New.
+ (BASE_QPUTS): Remove unused.
+ * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
+ (Output file name): New tests.
+
+2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Warn about output files that are generated by the skeletons and that
+ conflict with other output files.
+ * data/glr.c: Don't generate the header file here when glr.cc does.
+ * src/files.c (file_names, file_names_count): New static globals.
+ (compute_output_file_names): Invoke output_file_name_check for files
+ not generated by the skeletons and remove existing checks.
+ (output_file_name_check): New function that warns about conflicting
+ output file names.
+ (output_file_names_free): Free file_names.
+ * src/files.h (output_file_name_check): Declare.
+ * src/scan-skel.l: Invoke output_file_name_check for files generated by
+ the skeletons.
+ * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
+ (Conflicting output files): New tests.
+
+2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/bison.texinfo: Fix a couple of typos.
+
+2006-12-08 Bob Rossi <bob@brasko.net>
* data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
Rename to...