[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: music function patch
From: |
Erik Sandberg |
Subject: |
Re: music function patch |
Date: |
Mon, 18 Sep 2006 15:01:30 +0200 |
User-agent: |
KMail/1.9.1 |
On Monday 18 September 2006 12:46, Han-Wen Nienhuys wrote:
> Erik Sandberg wrote:
> > 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.
>
> IIRC, this patch is still pending. Can you have a look at integrating this?
I tried some days ago. A problem is that I still couldn't make web completely,
even without the patch.
I also have an updated patch for my translator patch, which is as well-tested.
Both patches are attached.
I'm also working on a big parser patch that implements music macros, I'll
return to that later (there are some nonobvious design decisions to make).
The file that broke 'make web' was regression/markup-note.ly. Last ChangeLog
entry was from Mats, dated 2006-09-15. I could minimise the problem to the
following snippet:
#(set! toplevel-music-handler
(lambda (p m)
(print-score-with-defaults
p (scorify-music m p))))
\relative c''
{
c4^\markup {
\note #"1" #1
\note #"2" #1
\note #"4" #1
\note #"8" #1
\note #"16" #1
\note #"32" #1
\note #"64" #1
\note #"1" #-1
\note #"2" #-1
\note #"4" #-1
\note #"8" #-1
\note #"16" #-1
\note #"32" #-1
\note #"64" #-1
\note #"1." #-1
\note #"2." #-1
\note #"4." #-1
\note #"8." #-1
\note #"16." #-1
\note #"32." #-1
\note #"64." #-1
\note #"1." #1
\note #"2." #1
\note #"4." #1
\note #"8." #1
\note #"16." #1
\note #"32." #1
\note #"64." #1
\override #'(style . cross)
{ \note-by-number #2 #1 #1
\note-by-number #2 #1 #-1
}
\override #'(style . triangle)
{ \note-by-number #2 #1 #1
\note-by-number #2 #1 #-1
}
}
}
which fails when invoked as follows:
lilypond --backend=eps -ddump-signatures --verbose foo.ly
Stupidly, I didn't save the stderr output, but it was a Scheme stack overflow,
which IIRC was related to stencils. Is it a known issue?
--
Erik
es-060918-arity.diff.gz
Description: GNU Zip compressed data
es-060918-translators.diff.gz
Description: GNU Zip compressed data
- Re: music function patch,
Erik Sandberg <=
Re: music function patch, Han-Wen Nienhuys, 2006/09/18