lilypond-devel
[Top][All Lists]
Advanced

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

Re: Syntax change proposal:


From: David Kastrup
Subject: Re: Syntax change proposal:
Date: Thu, 26 Jul 2012 22:23:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Graham Percival <address@hidden> writes:

> On Thu, Jul 26, 2012 at 07:03:11PM +0200, David Kastrup wrote:
>> It's much simpler than that.  Expressions are "greedy": what can become
>> a part of them, will.
>
> ...
> yuck?
>
>> \displayMusic c4-3
>> 
>> is existing syntax.  Long-existing syntax.  A total nuisance to support.
>> But it is not like there is much choice involved here.  It has been
>> around eternities.  Do you think all the backtracking folderol and
>> mode-switching and token-juggling that is going on in the parser
>> bypassing the basic LALR(1) algorithm has been implemented because I
>> consider it fun?
>
> yuck.
>
> Quick off-the-cuff estimate: ignoring all user code, what would we
> lose if we forced expressions to explicitly require arguments,
> i.e.
>   \displayMusic { c4-3 }
>   \displayMusic ( c4-3 )
>
> (ignore the symbol-clash between existing uses of {}() )

"Ignoring all user code, what would we lose"?  That does not even make
sense since the parser is the interface between user code and music
expressions.  If we ignore all user code, we don't need a parser.

LilyPond input language is a compromise between expressivity and
readability.  If everything needs parens, we are venturing into Scheme
territory.

Still, some compromises are more painful than others.  If music
functions were simpler to parse, converters would have better chances to
do the right thing.

-- 
David Kastrup



reply via email to

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