X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/c2724603c9d87e816dbdf1a9bfd7d70ffc1bd137..66381412d93f6a54e4d8e7e90b89149a9bca4945:/ChangeLog diff --git a/ChangeLog b/ChangeLog index d1e0bc10..ca92292c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,405 @@ +2009-09-19 Alex Rozenman + + Keep sub-messages aligned. Fix strings for translation. + * src/location.h: (location_print): Add return value. + * src/location.c: (location_print): Return number of printed + characters. + * src/complain.h: Two new functions (complain_at_indent, + warn_at_indent). + * src/complain.cpp: Implement the alignment mechanism. Add new + static variable (indent_ptr). Use and update it (error_message, + complain_at_indent, warn_at_indent). + * src/scan-code.l: Fix strings for translations. Use new *_indent + functions (parse_ref, show_sub_messages). + * NEWS (2.5): Add an announcement about named references. + +2009-09-17 Akim Demaille + + doc: fixes. + * doc/bison.texinfo: here. + Reported by Alex Rozenman. + +2009-09-16 Akim Demaille + + doc: lalr1.cc and variants. + * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and + "variant" %define variables. + (C++ Semantic Values): Split into... + (C++ Unions, C++ Variants): these. + The latter is new. + (C++ Parser Interface): Fix type names. + Document parser::syntax_error. + Document the fact that locations are not mandatory. + (C++ Scanner Interface): Split into... + (Split Symbols, Complete Symbols): these. + The later is new. + (Calc++ Parsing Driver): Use variants. + Add more comments. + Adjust style. + (Calc++ Parser): Declare all the tokens, no + longer accept raw characters. + Remove %union. + Adjust types and printers. + Remove destructors. + (Calc++ Scanner): Use make_ functions. + Use strerror in error message. + +2009-09-16 Akim Demaille + + doc: spell checking. + * doc/bison.texinfo: here. + +2009-09-16 Akim Demaille + + doc: comment changes. + * doc/bison.texinfo: Comment changes. + +2009-09-16 Akim Demaille + + lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS. + * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the + constructor to take a token_type instead of the (internal) symbol + number. + Call yytranslate_. + * data/variant.hh (b4_symbol_constructor_define_): Therefore, + don't call yytranslate_ here. + +2009-09-16 Akim Demaille + + TODO: statistics. + * TODO (Figures): New. + +2009-09-13 Joel E. Denny + + tests: clean up push.at test group titles. + * tests/push.at: Remove "Push Parsing: " from test group titles + because these are already under the banner "Push Parsing Tests". + +2009-09-12 Alex Rozenman + + Provide an additional sub-message for clarity. + Add "symbol not found in production" error message when + an "invalid reference" is detected in named references + resolution. + * src/scan-code.l: Update "invalid reference" case. + * tests/named-ref.at: Adjust test-cases. + +2009-09-10 Joel E. Denny + + Clean up yacc.c a little. + * data/yacc.c: Clean up M4 for readability, and make output + whitespace more consistent. For the main parse function + comment, instead of saying "yyparse or yypush_parse", say either + "yyparse" or "yypush_parse" depending on which it actually is. + +2009-09-10 Joel E. Denny + + Fix --enable-gcc-warnings. + * src/parse-gram.y (%printer ): Handle param_none. + +2009-09-09 Akim Demaille + + lalr1.cc: syntax_error as exceptions. + It is common to use sort of factories in the user actions. These + factories may check some "syntactic" constraints that are not + enforced by the grammar itself. This is possible using YYERROR + within the action itself. Provide the user with a means to throw + a syntax_error exception. + + * data/c++.m4 (b4_public_types_declare, b4_public_types_define): + Declare and define yy::parser::syntax_error. + * data/lalr1.cc: Include stdexcept. + (yy::parser::parse): Wrap the user action within a try/catch. + * data/glr.cc: Include stdexcept. + +2009-09-09 Akim Demaille + + lalr1.cc: add missing "inline". + * data/c++.m4 (b4_public_types_define): Add missing inline to + implementations provided in headers. + +2009-09-09 Akim Demaille + + %param: documentation. + * NEWS (2.6): Document %param, %lex-param, and %parse-param + changes. + * doc/bison.texinfo: Document that %lex-param and %parse-param + are n-ary. + Changes some examples to demonstrate it. + (Calc++ Parser): Use %param. + +2009-09-09 Akim Demaille + + Regen. + +2009-09-09 Akim Demaille + + style changes. + * src/parse-gram.y (add_param): Scope changes. + +2009-09-09 Akim Demaille + + %parse: support several arguments. + * src/parse-gram.y (current_param): New. + (param_type): Add param_none. + (params): New nonterminal. + Use it. + +2009-09-09 Akim Demaille + + Regen. + +2009-09-09 Akim Demaille + + %param. + Provide a means to factor lex-param and parse-param common + declarations. + + * src/parse-gram.y (param_type): New. + Define a %printer for it. + (add_param): Use it. + (%parse-param, %lex-param): Merge into... + (%parse): this new token. + Adjust the grammar to use it. + * src/scan-gram.l (RETURN_VALUE): New. + (RETURN_PERCENT_FLAG): Use it. + (RETURN_PERCENT_PARAM): New. + Use it to support %parse-param, %lex-param and %param. + +2009-09-03 Joel E. Denny + + Use aver not assert. + * src/output.c: Don't include assert.h. + (output_skeleton): Use aver not assert. + * src/system.h (aver): In documentation of why, add links to + Paul Eggert's explanations in the mailing lists. + +2009-09-05 Alex Rozenman + + Use "Unresolved reference" error message when no symbols were found + in a symbolic reference resolution. Remove .expr and -expr from + the shown reference when the reference is unresolved. + * src/scan-code.l: Change the error message, adjust location columns, + rename variable "exact_mode" to "explicit_bracketing". + * tests/named-ref.at: Adjust existing tests and add a new one. + +2009-09-04 Akim Demaille + + Adjust synclines in src/parse-gram.[ch]. + * tests/bison.in: Do some magic (including working around issues + with ylwrap) when this wrapper is used to compile + src/parse-gram.y. + +2009-09-03 Joel E. Denny + + Complain about unused %define variables and %code qualifiers. + * NEWS (2.5): Document. + * data/bison.m4 (b4_check_user_names): Complain instead of warn. + * doc/bison.texinfo (Decl Summary): Document complaint, and + improve %define documentation a little otherwise. + * tests/input.at (Reject unused %code qualifiers): Update. + (%define errors): Update. + (%define, --define, --force-define): Update. + (%define backward compatibility): Update. + (Unused %define api.pure): Update. + * tests/push.at (Push Parsing: Unsupported Skeletons): Update. + +2009-09-03 Joel E. Denny + + Don't suppress warnings about unused parse.error. + * data/bison.m4 (b4_error_verbose_flag): Don't examine value of + %define variable parse.error unless b4_error_verbose_flag is + actually expanded in a skeleton. + +2009-09-03 Akim Demaille + + * NEWS (2.4.2): Add "Internationalization" item. + +2009-09-03 Akim Demaille + + bootstrap: fix/improve find_tool. + * bootstrap (find_tool): Improve error messages. + Fix typo about find_tool_names. + +2009-08-29 Joel E. Denny + + Fix gcc 3.4.4 shadowing warning reported by Eric Blake. + See + . + * src/scan-code.h (code_props_rule_action_init): Rename + named_ref arg to name so it doesn't shadow named_ref type. This + makes it consistent with the function definition in scan-code.l + anyway. + +2009-08-28 Joel E. Denny + + %define: accept unquoted values. + * NEWS (2.5): Group all %define changes together, and document + this one. Remove quotes in IELR and canonical LR entry. + * doc/bison.texinfo: Remove quotes in most examples throughout. + (Decl Summary): Update %define documentation. + (Table of Symbols): Likewise. + * src/ielr.c (LrType): Update documentation. + * src/parse-gram.y (content.opt): Add production for ID. + * tests/actions.at: Remove quotes in most tests. + * tests/calc.at: Likewise. + * tests/existing.at: Likewise. + * tests/input.at: Likewise. + * tests/local.at: Likewise. + * tests/push.at: Likewise. + * tests/reduce.at: Likewise. + * tests/torture.at: Likewise. + +2009-08-28 Joel E. Denny + + %define lr.type: make values lowercase IDs. + That is, "LALR" => "lalr", "IELR" => "ielr", and + "canonical LR" => "canonical-lr". + * NEWS (2.5): Update documentation. + * doc/bison.texinfo (Decl Summary): Likewise. + * src/ielr.c (ielr): Use new values. + * src/ielr.h (ielr): Update documentation. + * src/reader.c (prepare_percent_define_front_end_variables): Use + and validate new values. + * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test + grammars. + * tests/reduce.at (AT_TEST_LR_TYPE): Likewise. + +2009-08-27 Eric Blake + + scan-gram: avoid portability trap with ctype usage. + * src/scan-gram.l (): + Avoid compiler warning. + +2009-08-27 Joel E. Denny + + tests: use perl for printing special sequences to files. + And skip tests if perl is not available. This is better than + playing tricks with shell portability. Suggested by Akim + Demaille. + * tests/input.at (Bad character literals): Use it here for + omitting final newlines. + (Bad escapes in literals): Use it here for special characters. + +2009-08-26 Joel E. Denny + + tests: show a use of %define lr.default-reductions "consistent" + * tests/conflicts.at (%nonassoc and eof): Extend to test that it + prevents the omission of expected tokens for %error-verbose. + +2009-08-26 Akim Demaille + + tests: portability fix. + * tests/input.at (Bad escapes in literals): Don't expect "echo + '\0'" to output \ then 0. + +2009-08-26 Joel E. Denny + + Actually handle the yytable zero value correctly this time. + * data/bison.m4 (b4_integral_parser_tables_map): Don't mention + zero values in the YYTABLE comments. + * data/glr.c (yytable_value_is_error): Don't check for zero + value. + * data/lalr1.cc (yy_table_value_is_error_): Likewise. + * data/yacc.c (yytable_value_is_error): Likewise. + * data/lalr1.java (yy_table_value_is_error_): Likewise. + (yysyntax_error): Fix typo in code: use yytable_ not yycheck_. + * src/tables.h: In header comments, explain why it's useless to + check for a zero value in yytable. + +2009-08-25 Joel E. Denny + + More fixes related to last two patches. + * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE + comments: zero indicates syntax error not default action. + * data/c.m4 (b4_table_value_equals): Comment that YYID must be + defined. + * data/glr.c (yyis_pact_ninf): Rename to... + (yypact_value_is_default): ... this. + (yyisDefaultedState): Update for rename. + (yyis_table_ninf): Rename to... + (yytable_value_is_error): ... this, and check for value zero + besides just YYTABLE_NINF. + (yygetLRActions): Check for default value from yypact. It + appears that this check is always performed before this function + is invoked, and so adding the check here is probably redundant. + However, the code may evolve after this subtlety is forgotten. + Also, update for rename to yytable_value_is_error. Because that + macro now checks for zero, a different but equivalent branch of + the if-then-else here is evaluated. + (yyreportSyntaxError): Update for rename to + yytable_value_is_error. The zero condition was mishandled + before. + (yyrecoverSyntaxError): Update for renames. No behavioral + changes. + * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_): + New function. + (yy_table_value_is_error_): New function. + (parse): Use new functions where possible. No behavioral + changes. + (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_. + The zero condition was mishandled before. + * data/yacc.c (yyis_pact_ninf): Rename to... + (yypact_value_is_default): ... this. + (yyis_table_ninf): Rename to... + (yytable_value_is_error): ... this, and check for value zero + besides just YYTABLE_NINF. + (yysyntax_error): Update for rename to yytable_value_is_error. + The zero condition was mishandled before. + (yyparse): Update for renames. No behavioral changes. + * src/tables.h: Improve comments about yypact, yytable, etc. + more. Most importantly, say yytable value of zero means syntax + error not default action. + +2009-08-25 Joel E. Denny + + Fix %error-verbose for conflicts resolved by %nonassoc. + * NEWS (2.5): Document. + * data/glr.c (yyreportSyntaxError): Fix this by checking + yyis_table_ninf. + * data/yacc.c (yysyntax_error): Likewise. + * data/lalr1.cc (yysyntax_error_): Fix this by checking + yytable_ninf_. + * data/lalr1.java (yysyntax_error): Likewise. + * tests/conflicts.at (%nonassoc and eof): Update expected output + and remove FIXME. + +2009-08-25 Joel E. Denny + + Some code and documentation improvements. + * data/c.m4 (b4_table_value_equals): New macro to capture + some repeated code. + * data/glr.c (yyis_pact_ninf): Use it here. + (yyis_table_ninf): Likewise. + (yyreportSyntaxError): Improve internal comments. + * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c. + Use it everywhere possible. + (yyis_table_ninf): Likewise. + (yysyntax_error): Improve internal comments. + * data/lalr1.cc (yysyntax_error_): Likewise. + * data/lalr1.java (yysyntax_error): Likewise. + * src/tables.h: Improve comments about yypact, yytable, etc. + +2009-08-21 Joel E. Denny + + Use locale when quoting. + * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use + quote rather than implementing quoting here. + +2009-08-20 Eric Blake + + Make previous patch more robust. + * src/output.c (ARRAY_CARDINALITY): New macro, copied from + argmatch.h. + (output_skeleton): Use it. + Suggested by Akim Demaille. + + Import latest m4/m4.m4. + * submodules/autoconf: Update to autoconf 2.64. + * configure.ac (M4_GNU_OPTION): New define. + * src/output.c (output_skeleton): Use it to resolve FIXME. + * NEWS: Mention this. + 2009-08-19 Joel E. Denny Fix complaints about escape sequences. @@ -113,12 +515,12 @@ that perfectly supported Bison mo files. Lower the requirement. http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html - * configure.ac: Require need-ngettext instead of - need-formatstring-macros. - Reported by Martin Jabocs. - Suggested by Bruno Haible. - * INSTALL: Restructure. - (Internationalization): New. + * configure.ac: Require need-ngettext instead of + need-formatstring-macros. + Reported by Martin Jabocs. + Suggested by Bruno Haible. + * INSTALL: Restructure. + (Internationalization): New. 2009-08-14 Joel E. Denny @@ -215,7 +617,7 @@ distcheck: fix. - * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp. + * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp. 2009-08-10 Joel E. Denny @@ -545,13 +947,13 @@ 2009-06-10 Akim Demaille gnulib: update. - * gnulib: Update to latest. - * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, - * m4/.gitignore: Regen. - * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr): - Call xalloc_die on hash_insert failures. - Requested by the new __warn_unused_result__ attribute of - hash_insert. + * gnulib: Update to latest. + * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, + * m4/.gitignore: Regen. + * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr): + Call xalloc_die on hash_insert failures. + Requested by the new __warn_unused_result__ attribute of + hash_insert. 2009-06-10 Akim Demaille