lilypond-devel
[Top][All Lists]
Advanced

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

Re: parallel-music - no R5RS compliant?


From: Nicolas Sceaux
Subject: Re: parallel-music - no R5RS compliant?
Date: Sat, 13 May 2006 12:20:53 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Bertalan Fodor <address@hidden> writes:

> Hello,
>
> I've found this in the definition of parallelmusic:
>
> ;; check sequence length
>     (apply for-each (lambda (. seqs)
>                       (let ((moment-reference (ly:music-length (car seqs))))
>                         (for-each (lambda (seq moment)
>                                     (if (not (equal? moment
>                                     moment-reference))
>                                         (ly:music-message seq
>                                          "Bars in parallel music don't
>                                          have the same length")))
>                           seqs (map-in-order ly:music-length seqs))))
>            voices)
>
> However, this (lambda (. seqs) ..... )
> does not work on my java-based R5RS parser
>
> I looked at the lexical definition of R5RS and found this:
>
> <lambda expression> --> (lambda <formals> <body>)
> <formals> --> (<variable>*) | <variable> | (<variable>+ .: <variable>)
>
> My JavaCC for this is:
> formals :
>   E_OPEN^ ( ( variable )+ ( DOT variable )? )? E_CLOSE!
> | variable
> ;
>
> This seems to not allow (. seqs)
>
> What do you think I should do?

I think that I should fix it :-)
You're right, I've been lazy, and scheme gets on my nerves sometimes.
It should be (lambda* (#:rest seqs) ...), having
(use-modules (ice-9 optargs)) before.

nicolas




reply via email to

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