Le 23 avr. 09 à 07:00, Joel E. Denny a écrit :
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?
The clash was big in bison.m4, indeed, and I stopped there. But you
are right, we don't need it.
The other
conflict relates to the change discussed below, and it's superficial.
Did I miss anything? I think it's a nice patch, and I'd like to use
it.
I haven't pushed.
Please, go ahead.
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?
Ah, thanks for the clarification. I removed it because I thought that
in the past we might have simply transformed %define into m4_define (I
honestly don't remember if there were a previous version), in which
case, "foo bar" was not m4 friendly. Since now we are using your
m4_define([b4_percent_$1]...) and use m4_indir, we no longer had this
problem. But you show we have others.