lilypond-devel
[Top][All Lists]
Advanced

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

Re: SCM-ification of parser


From: Erik Sandberg
Subject: Re: SCM-ification of parser
Date: Thu, 18 May 2006 17:24:39 +0200

On 5/18/06, Han-Wen Nienhuys <address@hidden> wrote:
Erik Sandberg schreef:

> If we use a separate module for syntax expressions, why not just say foo?
> e.g.:
> (sequential-music .. )
> for a syntax expression that represents (and, incidentally, produces music
> which represents) sequential music.

because we already have those, and we risk compatibility breakage if we
use them to hook into the parser.

But the other sequential-music is defined in a different module, so
there should be no problems with namespace clashes, or?

>>    (ly:parser-set-syntax 'music-sequence my-music-sequencer)
>
> I don't understand. Why would the parser be interested in knowing which syntax
> functions that exist? AFAICS it should be sufficient for the parser to just

1. because the parser also determines which ones are called.

how? According to my plan, the functions do that themselves (by being
either macros or functions). Perhaps my plan differs from yours?

We could
use this to generate documentation for the syntax/grammar automatically
(something which is now done manually in the docstrings of the music
types).

Well, that makes sense.

2. because it would allow a user to override an individual syntax
production rule cleanly.

OK. Why would a user want to do that?

Erik




reply via email to

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