From f0d7f71a64068f2a0eabcb6b27e9b9a4e19b1af6 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 7 Jan 2019 19:36:24 +0100 Subject: [PATCH] NEWS: update --- NEWS | 10 -------- TODO | 57 +++++++++++++++++++++++++++++++++++++++++++++ tests/reduce.at | 4 ++-- tests/regression.at | 4 ++-- 4 files changed, 61 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index 2bb0299e..cb0726db 100644 --- a/NEWS +++ b/NEWS @@ -2,16 +2,6 @@ GNU Bison NEWS * 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 Support for DJGPP, which has been unmaintained and untested for years, is diff --git a/TODO b/TODO index bb318978..17967a97 100644 --- a/TODO +++ b/TODO @@ -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 + #include + 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 Several features are not available in all the backends. @@ -6,6 +54,15 @@ Several features are not available in all the backends. - glr: Java - 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 ** consistency token vs terminal diff --git a/tests/reduce.at b/tests/reduce.at index 3cc4d88b..d10d89f1 100644 --- a/tests/reduce.at +++ b/tests/reduce.at @@ -1447,9 +1447,9 @@ dnl PARSER-EXIT-VALUE, PARSER-STDOUT, PARSER-STDERR -## ------------------------------- ## +## ------------------------------ ## ## %define lr.default-reduction. ## -## ------------------------------- ## +## ------------------------------ ## # AT_TEST_LR_DEFAULT_REDUCTIONS(GRAMMAR, INPUT, TABLES) # ----------------------------------------------------- diff --git a/tests/regression.at b/tests/regression.at index e4f4657a..5fc03db7 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -419,7 +419,7 @@ AT_CLEANUP AT_SETUP([Token definitions]) AT_BISON_OPTION_PUSHDEFS -# Bison managed, when fed with '%token 'f' "f"' to #define 'f'! + AT_DATA_GRAMMAR([input.y], [%{ ]AT_YYERROR_DECLARE[ @@ -427,7 +427,7 @@ AT_DATA_GRAMMAR([input.y], %} [%define parse.error verbose %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 C_TOKEN 'c' %token 'd' D_TOKEN