bug-bison
[Top][All Lists]
Advanced

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

Re: i18n for yacc backend messages


From: Jan Nieuwenhuizen
Subject: Re: i18n for yacc backend messages
Date: Thu, 14 Apr 2005 21:56:50 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

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  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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 <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

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