X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/040984073a54b4c603172be3c3f44b908ea5deb9..b50d2359d7608270561abd5c3cbf6e84834c2019:/ChangeLog diff --git a/ChangeLog b/ChangeLog index 6b30ded8..2f19228a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,439 @@ +2005-10-02 Akim Demaille + + * bootstrap (gnulib_modules): Add strverscmp. + * lib/.cvsignore: Add strverscmp.c, strverscmp.h. + * m4/.cvsignore: Add strverscmp.m4. + * src/parse-gram.y (%require): New token, new rule. + (version_check): New. + * src/scan-gram.l (%require): Adjust. + * tests/input.at (AT_REQUIRE): New. + Use it. + * doc/bison.texinfo (Require Decl): New. + (Calc++ Parser): Use %require. + +2005-10-02 Akim Demaille + + * data/location.cc: New. + +2005-10-02 Paul Eggert , + Akim Demaille + + Make sure -odir/foo.cc creates dir/location.hh etc. + * src/files.h (spec_outfile, parser_file_name, spec_name_prefix) + (spec_file_prefix, spec_verbose_file, spec_graph_file) + (spec_defines_file): Now const. + (dir_prefix): New. + (short_base_name): Remove. + * src/files.c: Adjust. + (dirname.h): Include. + (base_name): Don't prototype it. + (finput): Remove, duplicates gram_in. + (full_base_name, short_base_name): Replace by... + (all_but_ext, all_but_tab_ext): these. + (compute_base_names): Rename as... + (compute_file_name_parts): this. + Update to compute the new variables, including dir_prefix. + Adjust dependencies. + * src/output.c (prepare): Output them. + * src/reader.c: Adjust to use gram_in, not finput. + * src/scan-skel.l (@dir_prefix@): New. + +2005-10-02 Juan Manuel Guerrero + + * lib/subpipe.c: New function end_of_output_subpipe() added + to allow support for non-posix systems. This is a no-op function + for posix systems. + + * lib/subpipe.h: New function end_of_output_subpipe() added + to allow support for non-posix systems. This is a no-op function + for posix systems. + + * src/output.c (output_skeleton): Use end_of_output_subpipe() to + handle the lack of pipe/fork functionality on non-posix systems. + + * djgpp/Makefile.maint: DJGPP specific file. + + * djgpp/README.in: DJGPP specific file. + + * djgpp/config.bat: DJGPP specific configuration file. + + * djgpp/config.sed: DJGPP specific configuration file. + + * djgpp/config.site: DJGPP specific configuration file. + + * djgpp/config_h.sed: DJGPP specific configuration file. + + * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c. + + * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h. + +2005-10-02 Akim Demaille + + * data/location.cc: New, extract from... + * data/lalr1.cc: here. + (location.hh): Include it after the user prologue, in case the + filename type is defined by the user. + Forward declation location and position before the pre-prologue. + (yyresult_): Rename as... + (yyresult): this, it's a local variable, not an attribute. + * data/Makefile.am (dist_pkgdata_DATA): Adjust. + +2005-10-01 Akim Demaille + + * examples/extexi: Restore the #line generation. + +2005-09-30 Akim Demaille , + Alexandre Duret-Lutz + + Move the token type and YYSTYPE in the parser class. + * data/lalr1.cc (stack.hh, location.hh): Include earlier. + (parser::token): New, from the moved free definition of tokens. + (parser::semantic_value): Now a full definition instead of an + indirection to YYSTYPE. + (b4_post_prologue): No longer included in the header file, but + in the implementation file. + * doc/bison.texi (C+ Language Interface): Update. + * src/parse-gram.y: Support unary %define. + * tests/actions.at: Define global_tokens_and_yystype for backward + compatibility until we update the tests. + * tests/calc.at: Idem. + (first_line, first_column, last_line, last_column): Define for lalr1.cc + to simplify the code. + +2005-09-29 Paul Eggert + + Port to SunOS 4.1.4, which lacks strtoul and strerror. + Ah, the good old days! Problem reported by Peter Klein. + * bootstrap (gnulib_modules): Add strerror, strtoul. + * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c + * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4. + +2005-09-29 Akim Demaille + + * data/c.m4 (b4_error_verbose_if): New. + * data/lalr1.cc: Use it. + (YYERROR_VERBOSE_IF): Remove. + (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as + parser members, replaced by... + (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse + local variables. + (yysyntax_error_): Takes the state number as argument. + (yyreduce_print_): Use the argument yyrule, not the former + attribute yyn_. + +2005-09-26 Paul Eggert + + * bootstrap (gnulib_modules): Add verify. + * lib/.cvsignore: Add verify.h. + * src/getargs.c: Use ARGMATCH_VERIFY rather than verify. + * src/system.h (verify): Remove. + Include verify.h instead. + * src/tables.c (tables_generate): Use new API for 'verify'. + +2005-09-21 Paul Eggert + + * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use + local variables whose names begin with 'yy'. + * tests/calc.at (_AT_DATA_CALC_Y): Likewise. + Trivial changes from Joel E. Denny. + + * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need + it itself. + * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we + don't use alloca any more. + + * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined + __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER && + defined _ALLOCA_H]: Don't include ; not needed in this case. + * tests/torture.at (Exploding the Stack Size with Alloca): Adjust + to match yacc.c, to test more hosts. + +2005-09-20 Paul Eggert + + * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This + doesn't affect behavior. + (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for + Solaris, AIX, MSC. + (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed. + This works a bit better with glibc, if user code has already included + stdlib.h. + * doc/bison.texinfo (Bison Parser): Document that users can't + arbitrarily use malloc and free for other purposes. Document + that and might be included. + (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the + user must declare alloca. + + * HACKING (release): Forwarn the Translation Project about + stable releses. + +2005-09-20 Akim Demaille + + * data/glr.c: Use b4_token_enums, not b4_token_enums_defines. + +2005-09-19 Paul Eggert + + * data/yacc.c (YYSIZE_MAXIMUM): New macro. + (YYSTACK_ALLOC_MAXIMUM): Use it. + (yysyntax_error): New function. + (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if + multiple syntax errors are reported, and alloca is being used. + Instead, reallocate buffers twice as big each time, so that + we waste at most half the allocated memory. Start with a small + (128-byte) buffer that will suffice in most cases anyway. + Use yysyntax_error to do most of the work. + + * doc/bison.texinfo (Error Reporting, Table of Symbols): + yynerrs is the number of errors reported, not the number of + errors encountered. + + * tests/glr-regression.at (Duplicated user destructor for lookahead): + Mark it as expected to fail. + Cast result of malloc; problem reported by twlevo@xs4all.nl. + * tests/actions.at, tests/calc.at, tests/glr-regression.at: + Don't start user-code symbols with "yy", to avoid name space problems. + +2005-09-19 Akim Demaille + + Remove the traits, failed experiment. + It never proved useful, and anyway because of the current + definition, it was not possible to have several specialization of + this traits, making it useless. + * data/lalr1.cc (yy:traits): Remove. + Inline its definitions in the parser class. + +2005-09-19 Akim Demaille + + * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at + least Mac OSX with a /usr/local install of gettext. + +2005-09-19 Akim Demaille + + * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar + and yytoken for similarity with the other skeletons. + +2005-09-19 Akim Demaille + + * NEWS, configure.ac: Bump to 2.1a. + +2005-09-16 Paul Eggert + + * NEWS: Version 2.1. + + * NEWS: Remove notice of yytname change, since it was never in an + official release. + * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing + diagnostic. + * src/output.c (prepare): Likewise. + * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro. + (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE + is not defined. This is an awful hack, but it's enough for now. + All callers changed. + * tests/glr-regression-at (make_value): Args are const pointers now, + to avoid GCC warning. + (Duplicated user destructor for lookahead): New test. Currently + skipped. It fails on my host but I'm not sure it'll always fail. + +2005-09-16 Akim Demaille + + * src/symtab.h (struct symbol): Declare the printer and destructor + as const, to avoid accidental calls to free. + (symbol_destructor_set, symbol_printer_set): Adjust. + * src/symtab.c: Adjust. + +2005-09-16 Akim Demaille + + * data/c.m4 (b4_token_enums): New. + (b4_token_defines): Rename as... + (b4_token_enums_defines): this. + (b4_token_defines): New, output only the #defines. + * data/yacc.c, data/glr.c: Adjust. + * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines. + * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define + as default values. + +2005-09-16 Akim Demaille + + * data/lalr1.cc (yylex_): Remove, inline its code. + (yyreport_syntax_error_): Remove, replaced by... + (yysyntax_error_): this which returns a string and leaves to the + caller the call to the users' error function. + (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc): + Move from members of the parser object... + (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc): + to local variables of the parse function. + +2005-09-16 Akim Demaille + + * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF + since it's in Bison's name space. + +2005-09-15 Paul Eggert + + * data/glr.c (yyresolveValue): Add default case to pacify + gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl. + + * NEWS: Document when yyparse started to return 2. + * doc/bison.texinfo (Parser Function): Document when yyparse + returns 2. + + * data/lalr1.cc: Revert part of previous change, as it's incompatible. + (b4_filename_type): Renamed back from b4_file_name_type. All uses + changed. + (class position): file_name -> filename (reverting). All uses changed. + +2005-09-14 Paul Eggert + + * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't + do anything if $@ exists. This reverts part of the 2005-07-07 + patch. + +2005-09-11 Paul Eggert + + * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it + contains obsolete information and isn't worth distributing as a + separate file anyway. + * data/glr.c [defined YYSETJMP]: Don't include . + (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros. + All uses of jmp_buf, setjmp, longjmp changed to use these instead. + (yyparse): Abort if user code uses longjmp to throw an unexpected + value. + +2005-09-09 Paul Eggert + + * data/c.m4 (b4_identification): Define YYBISON_VERSION. + Suggested by twlevo@xs4all.nl. + + * data/glr.c (YYCHK1): Do not assume YYE is in range. + This avoids a diagnostic from gcc -Wswitch-enum. + Problem reported by twlevo@xs4all.nl. + + * doc/bison.texinfo: Don't use "filename", as per GNU coding + standards. Use "file name" or "file" or "name", depending on + the context. + (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c, + not to hack/foo.tab.c. + (Calc++ Top Level): 2nd arg of main is not const. + * data/glr.c: b4_filename -> b4_file_name. + * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type. + All uses changed. + (class position): filename -> file_name. All uses changed. + * data/yacc.c: b4_filename -> b4_file_name. + * lib/bitset.h: filename -> file_name in local vars. + * lib/bitset_stats.c: Likewise. + * src/files.c: Likewise. + * src/scan-skel.l ("@output ".*\n): Likewise. + * src/files.c (file_name_split): Renamed from filename_split. + * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename. + +2005-09-08 Paul Eggert + + * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h, + to accommodate latest gnulib. + + * tests/glr-regression.at (Duplicate representation of merged trees): + Add casts to pacify g++. Problem reported by twlevo@xs4all.nl. + + * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is + needed. + +2005-08-26 Paul Eggert + + * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem. + All uses changed. Invoke user destructor after an error during a + split parse (trivial change from Joel E. Denny). + + * tests/glr-regression.at + (User destructor after an error during a split parse): New test case. + Problem reported by Joel E. Denny in: + http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html + +2005-08-25 Paul Eggert + + * README-cvs: Give URLs for recommended tools. + Mention Gzip version problem, and bootstrapping issues. + Remove troubleshooting section, as it's somewhat obsolete. + + * bootstrap (no_cache): New var, to accommodate different wget + variants. Use it instead of '-C off'. Problem reported by + twlevo@xs4all.nl. + + * data/glr.c (yydestroyStackItem): New function. + (yyrecoverSyntaxError, yyreturn): Use it to improve quality of + debugging information. Problem reported by Joel E. Denny. + +2005-08-25 Akim Demaille + + * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too. + +2005-08-24 Paul Eggert + + * data/glr.c (yyrecoverSyntaxError, yyreturn): + Don't invoke destructor on unresolved entries. + * tests/glr-regression.at + (User destructor for unresolved GLR semantic value): New test case. + Problem reported by Joel E. Denny in: + http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html + +2005-08-21 Paul Eggert + + * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c. + Add strnlen.c. + * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4, + lib-prefix.m4, po.m4. + + * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:" + in yydestruct diagnostic, since it might not be an error. + Problem reported by Joel Denny near end of + . + * data/lalr1.cc (yyerturn): Likewise. + * data/yacc.c (yyreturn): Likewise. + * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change. + + * src/files.c: Remove obsolete FIXME comment. + + * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency + with the other templates, and to fix bogus run-on messages such + as the one reported at the end of + . + All callers changed to avoid the newline. + (yyprocessOneStack): Output two lines rather than one, to accommodate + the above change. This changes the debug output format slightly. + + * data/glr.c (yyresolveValue): Fix redundant parse tree problem + reported by Joel E. Denny in + + (trivial change). + * tests/glr-regression.at (Duplicate representation of merged trees): + New test, from Joel E. Denny in: + . + * THANKS: Add Joel E. Denny. + + * configure.ac (AC_INIT): Bump to 2.0c. + 2005-07-24 Paul Eggert * NEWS: Version 2.0b. + * Makefile.am (SUBDIRS): Put examples before tests, so that + "make check" doesn't finish with "All 1 tests passed". + + * tests/regression.at (Token definitions): Don't rely on + AT_PARSER_CHECK for data that contains backslashes. It currently + uses 'echo', and 'echo' isn't portable if its argument contains + backslashes. Problem found on OpenBSD 3.4. Also, do not assume + that the byte '\0xff' is not printable in the C locale; it is, + under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are + not printable, so use '\0x81' to test. + + * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent + version of GCC, since the macro is used with non-GCC compilers. + + Fix core dump reported by Pablo De Napoli in + . + * tests/regression.at (Invalid inputs with {}): New test. + * src/parse-gram.y (token_name): Translate type before using + it as an index. + * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on the user's name space. All uses changed to __attribute__ ((__unused__)).