[Top][All Lists]
[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: |
David Kastrup |
Subject: |
Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes. |
Date: |
Mon, 30 Jul 2012 15:48:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Graham Percival <address@hidden> writes:
> 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
> }
>
> ?
No.
> I thought that \tempo was something we put with notes, and the
> Notation manual agrees with me. Your example of \layout{} is
> confusing me.
Uh, right. This was supposed to be \midi { \tempo ... } for setting the
playback speed. Sorry for the confusion.
>> 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
Well, in the Midi block, \tempo "Moderato" is not exactly important.
> hmm, I'm beginning to appreciated why C uses semicolons. ;)
\tempo syntax is insane. This is one thing that will eventually have to
go.
> 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.
Whitespace is whitespace in LilyPond without further significance, and
we are _not_ going to change this against my very firm disapproval. It
would be the death knell for having LilyPond reasonably useful for
computer-generated output, like exports from other music software.
> 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.
No. And I don't want to throw ';' away by using it as a separator,
either.
--
David Kastrup