bug-lilypond
[Top][All Lists]
Advanced

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

Re: error: unknown escaped string:... after defining a variable


From: David Kastrup
Subject: Re: error: unknown escaped string:... after defining a variable
Date: Thu, 16 Jan 2014 06:43:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Eluze <address@hidden> writes:

> David Kastrup wrote
>> A={c d e}
>> \addlyrics { this is bad }
>> 
>> would be legitimate, so the assignment is not complete without looking
>> at the next token, and the next token is \A which is not defined.
>
> how then would you complete an assignment or hinder  \addlyrics { this is
> bad }  to be assigned to A?

\addlyrics does not make any sense outside of the assignment.  If it is
there, it has to go to the end of A.  Other than that, the assignment is
complete when anything but \addlyrics comes up.  I don't think that

x=...
\x

without anything intervening makes all that much sense, and since one
cannot put a pure
\addlyrics ...
into a variable anyway, one could claim that LilyPond should stop
looking for \addlyrics when seeing \x.  But the point is that we have
_two_ parts of LilyPond involved here, lexer and parser, and the parser
does not get to see \x at all before the lexer has made a decision about
its type, and for making that decision, it needs to look at its value.

-- 
David Kastrup




reply via email to

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