lilypond-devel
[Top][All Lists]
Advanced

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

Re: Regression in parser


From: Han-Wen Nienhuys
Subject: Re: Regression in parser
Date: Tue, 26 Sep 2006 23:54:59 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060913)

Erik Sandberg schreef:
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))

The same problem exists in previous versions, it happens whenever the lexer needs to read a lookahead token before applying a function:

I'm not sure. Since the arity of the function is known beforehand, the parser doesn't need any lookahead before applying the function. How does this work in the new EXPECT_XXX setup?

--

Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com





reply via email to

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