lilypond-devel
[Top][All Lists]
Advanced

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

Re: Music function extension...


From: David Kastrup
Subject: Re: Music function extension...
Date: Sun, 31 Oct 2010 17:29:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> On Fri, Oct 29, 2010 at 8:46 AM, David Kastrup <address@hidden> wrote:
>>
>> Are there good reasons left for not allowing music functions to take
>> pitches as arguments?  That would allow implementing something like
>
> how would you encode the pitch though?  Does
>
> \func cis''
>
> parse to
>
>  FUNCTION PITCH
>
> or
>
>  FUNCTION Music ?
>
> (PITCH -> single note -> Music ; names may not be exact wrt parser.yy)

Perhaps I have not put myself forward reasonably clearly: the idea was
not just to use a predicate in the function signature, but to let that
predicate be special-cased in the parser.  The function expands to a
number of tokens representing the signature constituents (that is
already being done, we just need another token type), and then those
signature tokens are used for interpreting the actually upcoming tokens.

So cis'' would never get interpreted or read as "sequential music", but
indeed only as a pitch specification.

-- 
David Kastrup




reply via email to

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