lilypond-devel
[Top][All Lists]
Advanced

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

Re: markup-command and markup-command-list signatures


From: David Kastrup
Subject: Re: markup-command and markup-command-list signatures
Date: Fri, 30 Apr 2010 17:35:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> On Thu, Apr 29, 2010 at 5:13 PM, Nicolas Sceaux
> <address@hidden> wrote:
>>> What type signatures would be actually permissable under the assumption
>>> that they are supported by lexer and parser?
>>>
>>> It is somewhat clear to me that we can't have markup-list followed by
>>> markup in the arguments.  Anything else?
>>
>> I'd say, a markup-list command signature should follow the pattern:
>>
>>   scheme* markup* markup-list*
>>
>> that is, any number of scheme arguments, then any number of single markup
>> arguments, then any number of markup-list arguments, even though I don't
>> know if having several markup list arguments is useful or not (and if it's
>> doable).
>
> AFAICR the ordering is just there for syntax consistency. If you can
> make a patch that generalizes markup argument handling like the
> argument handling for music functions, that would be awesome.

I've went to scheme* markup* markup-list* right now (unifying the
possible arguments for markup and markup list commands) and that appears
to work without regression.  The main problem here is that the syntax
needs to tell (scheme* markup) markup command argument lists from the
rest, because the former can be chained together and worked off with
map-markup-command-list.

I am not sure that it is worth the trouble: I have my doubts that
map-markup-command-list pieces stuff faster together than the bison
parser would when left to its own devices.  After all, the latter does
not need to meddle with closures.

Will post patch soon.  Docs are missing yet.

-- 
David Kastrup




reply via email to

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