NEWS: update

This commit is contained in:
Akim Demaille
2019-01-07 19:36:24 +01:00
parent c8ee05c2b2
commit f0d7f71a64
4 changed files with 61 additions and 14 deletions

10
NEWS
View File

@@ -2,16 +2,6 @@ GNU Bison NEWS
* Noteworthy changes in release ?.? (????-??-??) [?] * Noteworthy changes in release ?.? (????-??-??) [?]
** Expected features for Bison 3.3
- per-rule %expect/%expect-rr
- improve syntax errors (UTF-8, internationalization)
- move bitsets to gnulib
- relative paths (allowing to relocate an installation of bison)
- use gettext-h in gnulib instead of gettext
- constexpr/noexcept in C++
- resolving %type/%nterm/%type inconsistencies
** Backward incompatible changes ** Backward incompatible changes
Support for DJGPP, which has been unmaintained and untested for years, is Support for DJGPP, which has been unmaintained and untested for years, is

57
TODO
View File

@@ -1,3 +1,51 @@
* Bison 3.4
** injection rules
** improve syntax errors (UTF-8, internationalization)
Bison depends on the current locale. For instance:
%define parse.error verbose
%code top {
#include <stdio.h>
#include <stdlib.h>
void yyerror(const char* msg) { fprintf(stderr, "%s\n", msg); }
int yylex() { return 0; }
}
%%
exp: "↦" | "🎅🐃" | '\n'
%%
int main() { return yyparse(); }
gives different results with/without LC_ALL=C.
$ LC_ALL=C /opt/local/bin/bison /tmp/mangle.y -o ascii.c
$ /opt/local/bin/bison /tmp/mangle.y -o utf8.c
$ diff -u ascii.c utf8.c -I#line
--- ascii.c 2019-01-12 08:15:35.878010093 +0100
+++ utf8.c 2019-01-12 08:15:38.856495929 +0100
@@ -415,9 +415,8 @@
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "\"\\342\\206\\246\"",
- "\"\\360\\237\\216\\205\\360\\237\\220\\203\"", "'\\n'", "$accept",
- "exp", YY_NULLPTR
+ "$end", "error", "$undefined", "\"↦\"", "\"🎅🐃\"", "'\\n'",
+ "$accept", "exp", YY_NULLPTR
};
#endif
$ gcc ascii.c -o ascii && ./ascii
syntax error, unexpected $end, expecting "\342\206\246" or "\360\237\216\205\360\237\220\203" or '\n'
$ gcc utf8.c -o utf8 && ./utf8
syntax error, unexpected $end, expecting ↦ or 🎅🐃 or '\n'
While at it, we should stop using "$end" by default, in favor of "end of
file", or "end of input", whatever.
** use gettext-h in gnulib instead of gettext
** use gnulib-po
* Completion * Completion
Several features are not available in all the backends. Several features are not available in all the backends.
@@ -6,6 +54,15 @@ Several features are not available in all the backends.
- glr: Java - glr: Java
- token constructors: Java and C - token constructors: Java and C
* Bugs
** Autotest has quotation issues
tests/input.at:1730:AT_SETUP([%define errors])
->
$ ./tests/testsuite -l | grep errors | sed q
38: input.at:1730 errors
* Short term * Short term
** consistency ** consistency
token vs terminal token vs terminal

View File

@@ -1447,9 +1447,9 @@ dnl PARSER-EXIT-VALUE, PARSER-STDOUT, PARSER-STDERR
## ------------------------------- ## ## ------------------------------ ##
## %define lr.default-reduction. ## ## %define lr.default-reduction. ##
## ------------------------------- ## ## ------------------------------ ##
# AT_TEST_LR_DEFAULT_REDUCTIONS(GRAMMAR, INPUT, TABLES) # AT_TEST_LR_DEFAULT_REDUCTIONS(GRAMMAR, INPUT, TABLES)
# ----------------------------------------------------- # -----------------------------------------------------

View File

@@ -419,7 +419,7 @@ AT_CLEANUP
AT_SETUP([Token definitions]) AT_SETUP([Token definitions])
AT_BISON_OPTION_PUSHDEFS AT_BISON_OPTION_PUSHDEFS
# Bison managed, when fed with '%token 'f' "f"' to #define 'f'!
AT_DATA_GRAMMAR([input.y], AT_DATA_GRAMMAR([input.y],
[%{ [%{
]AT_YYERROR_DECLARE[ ]AT_YYERROR_DECLARE[
@@ -427,7 +427,7 @@ AT_DATA_GRAMMAR([input.y],
%} %}
[%define parse.error verbose [%define parse.error verbose
%token MYEOF 0 "end of file" %token MYEOF 0 "end of file"
%token 'a' "a" %token 'a' "a" // Bison managed, when fed with '%token 'f' "f"' to #define 'f'!
%token B_TOKEN "b" %token B_TOKEN "b"
%token C_TOKEN 'c' %token C_TOKEN 'c'
%token 'd' D_TOKEN %token 'd' D_TOKEN