lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and c


From: Graham Percival
Subject: Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes.
Date: Mon, 30 Jul 2012 14:33:30 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jul 30, 2012 at 01:12:44PM +0200, David Kastrup wrote:
> Graham Percival <address@hidden> writes:
> > Could I have some examples?  I just don't get this "word"
> > business.  Is there any syntax which was previously
> > (theoretically) supported, which this patch breaks?
> 
> Here is one thing that can be made to work: we can have music inside of
> output definitions, but currently it is parsed in "initial" mode.  That
> means something like
> 
> \layout { \tempo 4. = 120 }
> 
> will not work and has to be written as
> 
> \layout { \tempo 4 . = 120 }
>
> since 4. is a real number in "initial" mode.  One way out would be to

-snip explanation-

Does this affect

{
  \tempo 4. = 120 
  c2 d
  %\tempo "Adagio" 4. = 43.5
  \tempo "Adagio" 4. = 43
  e4. d8 c2
}

?  I thought that \tempo was something we put with notes, and the
Notation manual agrees with me.  Your example of \layout{} is
confusing me.

I think it would a real shame if we cannot let people specify a
metronome marking with the normal way of writing rhythms (i.e.
"4.").

> switch into "notes" mode temporarily for music.  If we do that,
> something like
> 
> \layout { \tempo "Moderato"
>           line-width = 100\mm }
> 
> will not work any more, since
> 
>           \tempo "Moderato" 4. = 56

hmm, I'm beginning to appreciated why C uses semicolons.  ;)

What about line-breaks?  The combination of "functions" (in the
generic sense, since I don't know if \tempo is an expression or
macro or music function or whatever) having an optional number of
arguments, with a lack of explicit "command is over" symbol,
surely leads to a huge ton of pain in the parser/lexer.

With my python background, I'd be perfectly happy to have
significant-whitespace indents, i.e.
  \tempo "Allegro"
    4. = 100
  line-width = 100\mm

however, I acknowledge that it takes about two weeks for python
beginners to get comfortable with this, so it may scare away
musicians.

I suppose that another option could be a "line continuation
character", like \ in bash.  But again, I could easily imagine
this leading to more confusing syntax for beginners, not less.

- Graham



reply via email to

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