Hans Aberg writes:
> I think the correct fix would be that the "..." part of %token is
> correctly encoded as a C-string, and then this is what is output in
> the error message. I.e., if one wants "\paper" in the output, then one
> should write
> %token PAPER "\\paper"
Ok, see patch below.
Jan.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/bison/bison/ChangeLog,v
retrieving revision 1.1220
diff -p -u -r1.1220 ChangeLog
--- ChangeLog 14 Apr 2005 00:08:56 -0000 1.1220
+++ ChangeLog 14 Apr 2005 19:54:43 -0000
@@ -1,3 +1,11 @@
+2005-04-14 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+
+ * lib/quotearg.c (quoting_style_args): Add
+ literal_double_quoting_style.
+
+ * src/output.c (prepare_symbols): Use it. Fixes special C
+ character sequences and extraneous backslashes.
+
2005-04-13 Paul Eggert <[EMAIL PROTECTED]>
* NEWS: Bison-generated C parsers now use the _ macro to
Index: src/output.c
===================================================================
RCS file: /cvsroot/bison/bison/src/output.c,v
retrieving revision 1.230
diff -p -u -r1.230 output.c
--- src/output.c 7 Mar 2005 06:41:39 -0000 1.230
+++ src/output.c 14 Apr 2005 19:54:43 -0000
@@ -162,7 +162,7 @@ prepare_symbols (void)
int j = 2;
for (i = 0; i < nsyms; i++)
{
+ const char *cp = quotearg_style (literal_double_quoting_style,
+ symbols[i]->tag);
/* Width of the next token, including the two quotes, the
comma and the space. */
int width = strlen (cp) + 2;
--
Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org