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: Sun, 21 May 2006 23:48:07 +0200
User-agent: KMail/1.9.1

On Thursday 18 May 2006 17:46, Han-Wen Nienhuys wrote:
> Erik Sandberg schreef:
> > On 5/18/06, Han-Wen Nienhuys <address@hidden> wrote:
> >>
> >> 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?
>
> Yes, but I think it's useful to keep the connection between the
> productions in parser.yy, and the lisp code that is generated. I'm not
> yet convinced that generating a large expression and eval'ing that is a
> the best way to go through with this; it seems very unstructured. Let's
> move one step at a time.

Hm. I have a feeling that it will be difficult to make macros work without 
either reinventing the Scheme or evaluate stuff directly, at least if we 
want 'macro' to mean what it means in Scheme (an alternative would be to let 
macros transform syntax expressions into syntax expressions, rather than into 
music objects; this is less Scheme-ish but might be good enough for us).

> >> 2. because it would allow a user to override an individual syntax
> >> production rule cleanly.
> >
> > OK. Why would a user want to do that?
>
> In some cases, that's already possible now, eg. with pipeSymbol.
> Another example: we could use this mechanism for invoking all the
> different toplevel-{music,score,book}-handlers.
ok

-- 
Erik





reply via email to

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