[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New argument types (Was: Constructive Criticism and a Question)
From: |
Bertalan Fodor |
Subject: |
Re: New argument types (Was: Constructive Criticism and a Question) |
Date: |
Mon, 8 Jan 2007 21:04:05 +0100 |
When I was writing the Antlr version of the parser I realized that extending
the grammar in dozens of ways makes much more complicatons and unreadability
than you gain in compactness. Actually I don't like that I almost have to
reimplement LilyPond just to be able to decide if an input is syntactically
correct. :-)
So I'd always prefer extensions that do not change the syntax. But I may be not
right.
Bert
> ------- Original Message -------
> From: address@hidden
> To: Erik Sandberg <address@hidden>
> Sent: 07. 01. 08., 5:54:21
> Subject: New argument types (Was: Constructive Criticism and a Question)
>
> On Sun, 7 Jan 2007, Erik Sandberg wrote:
>
> > BTW, one of the biggest problems (IMHO) in the lilypond language is that
> > we can't extend the parser to accept durations as parameters to music
> > functions: \foo c 4. is ambiguous; it's unclear whether the 4. is the
> > c's duration, or if it's a separate argument.
>
> It's probably unfortunate that the choice was made to tolerate spaces in
> things like
> c 4. ~
> but I'm sure that that cannot be undone at this point.
>
> Increasing the number of different argument types for music functions
> would almost certainly be extremely useful for users, who, judging from
> this mailing list, seem to have an unlimited imagination when it comes to
> wanting to be able to extend LP syntax.
>
> Since recognizing a duration expression is purely a notational problem
> (in the sense that a notation has to be found that will be unambiguous for
> the parser), it might be worth asking for people's ideas. The things I
> can think of offhand are the following --
>
> \foo c (4.) % no good -- confusion with slurs
> \foo c \nul 4. % \nul would be a sort of syntactic "breath mark"
> \foo c \ 4. % \ -- same idea as \nul (short, but maybe risky?)
> \foo c \\ 4. % \\ -- same as \nul
> \foo c =4. % = prefixed to any expression: "this is separate item"
>
> -- Tom
>
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>
- Re: New argument types (Was: Constructive Criticism and a Question),
Bertalan Fodor <=