[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: |
Sun, 29 Jul 2012 22:15:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Forwarding this from the lilypond-auto list since this review concerns
an important syntax change. GLISS material, in a manner. Consider it a
proposal for word and command syntax across _all_ lexer modes.
Reasonably simple, and somewhat surprisingly not requiring any changes
in the entire .ly codebase of LilyPond. It will likely affect existing
scores. Hopefully not many.
Comment #3 on issue 2702 by me:
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.
--
David Kastrup
- Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes.,
David Kastrup <=
- Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes., Graham Percival, 2012/07/29
- Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes., David Kastrup, 2012/07/29
- Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes., David Kastrup, 2012/07/30
- Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes., Graham Percival, 2012/07/30
- Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes., David Kastrup, 2012/07/30
- Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes., Graham Percival, 2012/07/30
- Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes., David Kastrup, 2012/07/30
- Re: Issue 2702 in lilypond: Patch: Unify the lexer's idea of words and commands across all modes., Bernard Hurley, 2012/07/30