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: Eluze
Subject: Re: error: unknown escaped string:... after defining a variable
Date: Thu, 16 Jan 2014 00:36:09 -0800 (PST)

David Kastrup wrote
> Eluze <

> eluzew@

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

maybe this example makes more sense:

lyr=\lyricsto A \new Lyrics \lyricmode { this is bad. }
mus=\new Voice= A {a b c}
<< \mus \lyr >>

this triggers an error

writing mus =... (with a space before the equal sign) works as well as
enclosing the assignment before in braces: 
lyr={...}

can we conclude that it's best (or simplest) to always put a space after the
variable name being assigned a value?

Eluze



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/error-unknown-escaped-string-after-defining-a-variable-tp157873p157993.html
Sent from the Bugs mailing list archive at Nabble.com.



reply via email to

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