Comment #3 on issue 2702 by [email protected]: 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.