lilypond-devel
[Top][All Lists]
Advanced

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

Re: Allow digits in identifiers (issue 6493072)


From: dak
Subject: Re: Allow digits in identifiers (issue 6493072)
Date: Sun, 02 Sep 2012 18:22:14 +0000

All in all, this creates so many loose ends and problems of the kind I
have been working to get tied up that I can basically start from scratch
with lexer/parser work.  I am very strongly opposed to this, and it is
easy to come up with examples that fail for inexplicable reasons because
of the interaction of parser lookahead and lexer mode switching.

This is a large step towards making LilyPond behave unpredictable in a
number of corner cases as well as existing usage as witnessed by the
large number of regression tests needing modifications without a
documented or user-discernible reason.

Numbers in identifiers _will_ have drawbacks (clearly \skip4 is not
fitting well with various naming schemes allowing numbers in names).
But I think that the drawbacks of this patch are quite more than what
would be unavoidable.  It is a bad idea for more reasons than the
reasons making the general idea of numbers in words/commands a bad idea.


http://codereview.appspot.com/6493072/diff/14/lily/lexer.ll
File lily/lexer.ll (left):

http://codereview.appspot.com/6493072/diff/14/lily/lexer.ll#oldcode397
lily/lexer.ll:397: <chords,notes,figures>{RESTNAME}/[-_]  |  // pseudo
backup rule
On 2012/09/02 17:59:53, Keith wrote:
On 2012/09/02 11:52:46, dak wrote:
> Did you check that r-. does still work as intended when removing
this rule?

The syntax never allowed new identifier definitions in
sequential/simultaneous
music.

That is not an answer to my question.

  \relative c' { new-variable-name = { c d e f } } % never valid

But \relative c' c new-variable-name = { c d e f }
has been valid and will no longer be because new is seen by the lexer
while still in music mode.

http://codereview.appspot.com/6493072/



reply via email to

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