bug-lilypond
[Top][All Lists]
Advanced

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

Re: Regression in parser


From: Nicolas Sceaux
Subject: Re: Regression in parser
Date: Sat, 30 Sep 2006 12:19:57 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Erik Sandberg <address@hidden> writes:

> On Saturday 23 September 2006 17:49, Nicolas Sceaux wrote:
>> Hi,
>>
>> Using LilyPond from CVS, the following snippet causes a syntax error,
>> which 2.9.18 did not:
>>
>> /******************************
>> testFunction =
>> #(define-music-function (parser location) ()
>>   ;; test-data.ly contains music variable definitions
>>   (ly:parser-parse-string parser "\\include \"test-data.ly\"")
>>   (make-music 'SequentialMusic 'void #t))
>
> Hi,
>
> You should use ly:clone-parser to avoid this problem:
>
> #(define-music-function (parser location) ()
>    (ly:parser-parse-string (ly:clone-parser parser) "\\include 
> \"test-data.ly\"")
>    (make-music 'SequentialMusic 'void #t))

No, because then the variables set in the included file are registered
in the cloned parser, not the original one, and cannot be looked up
later.

hm.

But that can be a solution nevertheless, making lookups in the cloned
parser. Thanks.

nicolas





reply via email to

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