lilypond-devel
[Top][All Lists]
Advanced

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

Re: [GLISS] turn xxx.yyy into ("xxx" "yyy")


From: David Kastrup
Subject: Re: [GLISS] turn xxx.yyy into ("xxx" "yyy")
Date: Thu, 13 Sep 2012 02:39:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> 2012/9/12 David Kastrup <address@hidden>:
>> Reinhold Kainhofer <address@hidden> writes:
>>
>>> On 2012-09-12 10:38, David Kastrup wrote:
>>>> if we write xxx in LilyPond, this is considered to be a string.  I want
>>>> xxx.yyy.zzz to be a list of strings ("xxx" "yyy" "zzz").  The main
>>>> incentive is to be able to have music functions be able to accept both
>>>> Stem as well as Staff.TimeSignature as a function argument.
>>>
>>> How would this work with lyrics or with markups?
>>
>> No interference.  In lyrics mode, you already have to write things like
>> \override Staff . TimeSignature to get the lexer putting out separate
>> tokens recognizable by the parser.  Since I was not going to change the
>> lexer, this requirement would stay the same when calling the respective
>> functions in lyrics mode.
>
> Some time ago I tried to define some markup-commands to handle
> musicglyphs like `accidentals.sharp' as part of a larger string and
> used them in music-functions.
>
> These markup-commands used
> (string-split <argument> #\. )
>
> I never finished this work, but will it still be possible to use
> (string-split <argument> #\. ) ?

As I repeatedly said: this is a parser-only change, the lexer is not
affected.  The rules about what constitutes a lexical unit like a basic
string remain the same.  In particular, anything which would change
meaning if you inserted a space in its middle is a lexical unit.
However, inside of markup mode, even an isolated dot is not scanned as a
'.' token but rather as STRING.

-- 
David Kastrup



reply via email to

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