Eluze <elu...@gmail.com> 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


_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to