bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NEWS: update


From: Akim Demaille
Subject: NEWS: update
Date: Sat, 12 Jan 2019 08:21:29 +0100

commit f0d7f71a64068f2a0eabcb6b27e9b9a4e19b1af6
Author: Akim Demaille <address@hidden>
Date:   Mon Jan 7 19:36:24 2019 +0100

    NEWS: update

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 <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
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]