lilypond-auto
[Top][All Lists]
Advanced

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

Re: [Lilypond-auto] Issue 2702 in lilypond: Patch: Unify the lexer's ide


From: lilypond
Subject: Re: [Lilypond-auto] Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes.
Date: Sun, 29 Jul 2012 20:07:42 +0000


Comment #3 on issue 2702 by address@hidden: Patch: Unify the lexer's idea of words and commands across all modes.
http://code.google.com/p/lilypond/issues/detail?id=2702

One consequence is that if you can use \commandname in some context, it can be defined using
commandname = ...
without requiring quote marks since word syntax and command name syntax are in direct correspondence. Being able to access every definition equally well in every lexer mode is also an advantage. The word definition is palindromic: iff a character sequence is a word, so is its reverse. If - or _ is both preceded as well as followed by an alphabetic character, it integrates into a word. It turns out that this definition works with both "make test" as well as "make doc" without requiring any change in the LilyPond code base.

That makes it somewhat likely that its adverse effects on typical LilyPond sources will be limited. The previous mode-dependent rules for words and identifiers were not well-understood and completely undocumented, so people were not likely to drive them to their limits.

Discuss. This is quite a consequential change regarding what word syntax is valid and what not, but the previous state was rather arbitrary to the degree of being wonky.




reply via email to

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