lilypond-devel
[Top][All Lists]
Advanced

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

Re: Make music functions callable from Scheme (issue 244840043 by addres


From: Keith OHara
Subject: Re: Make music functions callable from Scheme (issue 244840043 by address@hidden)
Date: Mon, 08 Jun 2015 08:58:11 -0700
User-agent: Opera Mail/12.16 (Win32)

On Sun, 07 Jun 2015 23:09:31 -0700, <address@hidden> wrote:

So your problem appears to be that you understand the code but it does
something you did not expect.  Cross-check from the user end with the
"Extending LilyPond" guide's explanation of optional arguments.

It is Extending section 2.2.2.  Yuck.  A comment pointing to Extending-2.2.2 
would help.

The behavior in the parser is forced because LilyPond uses no delimiters for 
the arguments to a function.  Scheme has delimiters so you know where the end 
of the argument list is, so we could use a simpler rule for optional arguments 
in Scheme interface.

Or you could scan arguments using a recursive-descent method in C, so the 
parallel with the parser is maybe a bit more clear.

Or maybe advance through 'signature' to the next non-optional argument 
immediately upon using a default value, rather than setting 'skipping'.

The re-structuring I suggested was intended also to change the if-else 
branching so that you don't need the 'continue's.

https://codereview.appspot.com/244840043/




reply via email to

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