]> git.donarmstrong.com Git - lilypond.git/commit
Issue 3487: Make several special characters with or without backslash "shorthands"
authorDavid Kastrup <dak@gnu.org>
Sun, 4 Aug 2013 09:32:09 +0000 (11:32 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 13 Aug 2013 12:06:16 +0000 (14:06 +0200)
commit5c58da93f8859c3f15760631db4e63590e073e1e
tree28b73d631effed2dc252e73d0b604c4a5f74012b
parenta7c14a5a83ddf2926895aa40cfdf50e7dcebf53c
Issue 3487: Make several special characters with or without backslash "shorthands"

Single non-alphanumeric ASCII characters not requiring special
treatment in lexer or parser can now be redefined like escaped
identifiers.  The same holds for escaped non-alphanumeric ASCII
characters.  The identifying name you use for redefining them is the
string corresponding to the full shorthand, in contrast to escaped
identifiers where the identifying name omits the initial backslash.

Notable shorthands not treated specially in the parser (some of them
newly so) can be seen in the following definitions from
scm/declarations-init.ly:

"|" = #(make-music 'BarCheck)
"[" = #(make-span-event 'BeamEvent START)
"]" = #(make-span-event 'BeamEvent STOP)
"~" = #(make-music 'TieEvent)
"(" = #(make-span-event 'SlurEvent START)
")" = #(make-span-event 'SlurEvent STOP)
"\\!" = #(make-span-event 'CrescendoEvent STOP)
"\\(" = #(make-span-event 'PhrasingSlurEvent START)
"\\)" = #(make-span-event 'PhrasingSlurEvent STOP)
"\\>" = #(make-span-event 'DecrescendoEvent START)
"\\<" = #(make-span-event 'CrescendoEvent START)
"\\[" = #(make-span-event 'LigatureEvent START)
"\\]" = #(make-span-event 'LigatureEvent STOP)
"\\~" = #(make-music 'PesOrFlexaEvent)
"\\\\" = #(make-music 'VoiceSeparator)
Documentation/changes.tely
lily/include/lily-lexer.hh
lily/lexer.ll
lily/parser.yy
ly/declarations-init.ly
python/convertrules.py
scm/ly-syntax-constructors.scm