I wanted to push it seem Joel preferred dashes to underscores in
his newly
introduced variables.
I was able to cherry-pick this patch into branch-2.5 without any other
cherry-picking. The main conflict was that I couldn't apply the
bison.m4
change, but that change isn't relevant in branch-2.5, right?
diff --git a/src/parse-gram.y b/src/parse-gram.y
index 20dee8c..caa3d30 100644
--- a/src/parse-gram.y
+++ b/src/parse-gram.y
@@ -535,15 +535,12 @@ rhs:
variable:
ID
-| STRING { $$ = uniqstr_new ($1); } /* deprecated and not M4-
friendly */
+| STRING { $$ = uniqstr_new ($1); }
;
The idea is that quotes around a variable name were deprecated in
2.3b.
Moreover, that form is allowed to break Bison:
% cat >tmp.y <<EOF
%define "[" "value"
%%
start: ;
EOF
% bison tmp.y
/home/jdenny/installs/m4/using/bin/m4:stdin:190: ERROR: end of file
in string
/home/jdenny/cs/bison/bison-git/src/bison: subsidiary program `/
home/jdenny/installs/m4/using/bin/m4' failed (exit status 1)
Maybe the comment here just needed to be more descriptive?