bison-patches
[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 19:57:56 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Paul Eggert writes:

> %token DRUMS "\\drums"
>
> instead of plain "%token DRUMS".
>
> (Sorry, I'm not sure about how many backslashes are needed here.)

This is another improvement, so I tried it for our keywords, but
there's a problem with backslashes.  Using

    %token BOOK "\book"
    %token PAPER "\paper"

yields

    parser.yy:299.17-18: unrecognized escape sequence: `\\p'

However, the backslash is not used as an escape, because using the
parser that has

    %token BOOK "\book"
    %token PAPER "\\paper"

gives these error messages

    $ LANG=C lilypond bison
    GNU LilyPond 2.5.19
    Processing `bison.ly'
    Parsing...
    bison.ly:1:5: error: syntax error, unexpected "\book", expecting '{'
    \book
         \book %expect \book error here
    bison.ly:8:5: error: syntax error, unexpected "\\paper", expecting '{'
    \book
         \paper %expect \paper error here

         \paper

ie, \book shows OK, but \b is not backspace, \\paper shows extra
backslash.  I'm not sure what the correct fix would be, interpret the
escape, or just ignore it and allow \p (etc)?

Jan

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