lilypond-devel
[Top][All Lists]
Advanced

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

music function patch


From: Erik Sandberg
Subject: music function patch
Date: Fri, 25 Aug 2006 08:15:21 +0200
User-agent: KMail/1.9.1

Hi,

The attached patch cleans up music functions:
- functions can have any arity, and parameters can be mixed in any way.
- implementation: A music function generates a sequence of tokens, so e.g. a 
(markup? music? scm?) function generates tokens MUSIC_FUNCTION EXPECT_SCM 
EXPECT_MUSIC EXPECT_MARKUP. After that it's easy to write a grammar to parse 
the argument list.
- there is still a restriction on 'event functions': A function can only be 
applied to a post-event or chord-element if the function has exactly one 
music parameter, and if that parameter is last. If this rule is violated, 
there will be confusing parser errors ("unexpected EXPECT_MUSIC") due my 
implementation, but I also added an error message which describes the problem 
in English.

-- 
Erik

Attachment: es-060825.diff
Description: Text Data


reply via email to

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