]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4063: Interpret < > and << >> in \chordmode
authorDavid Kastrup <dak@gnu.org>
Sun, 10 Aug 2014 19:41:12 +0000 (21:41 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 18 Aug 2014 12:40:33 +0000 (14:40 +0200)
There is no compelling reason not to do so, and having < > available
allows stuff like

\chordmode { \clef bass <c> c/e <g,> c/e }

or other ways of explicitly spelling out some not-really chord material.

lily/lexer.ll
lily/parser.yy

index 8b0859630ec04dcd0ea9c0a5fd1b3a1d0ad61843..0c364c1bb20443c148de9a5e7851740aca5ebb3e 100644 (file)
@@ -422,7 +422,7 @@ BOM_UTF8    \357\273\277
                return token;
 }
 
-<INITIAL,notes,lyrics>{ 
+<INITIAL,notes,lyrics,chords>{
        \<\<    {
                 yylval = SCM_UNSPECIFIED;
                return DOUBLE_ANGLE_OPEN;
@@ -433,7 +433,7 @@ BOM_UTF8    \357\273\277
        }
 }
 
-<INITIAL,notes>{
+<INITIAL,notes,chords>{
        \<      {
                 yylval = SCM_UNSPECIFIED;
                return ANGLE_OPEN;
index c8365abf13e05a62bda7fb9a0e6efcead001e195..4a805f1970f7a4c74b832d1c70d96e572ac965b7 100644 (file)
@@ -2656,7 +2656,7 @@ chord_body_elements:
        ;
 
 chord_body_element:
-       pitch exclamations questions octave_check post_events
+       pitch_or_tonic_pitch exclamations questions octave_check post_events
        {
                bool q = to_boolean ($3);
                bool ex = to_boolean ($2);
@@ -2919,6 +2919,11 @@ pitch:
        }
        ;
 
+pitch_or_tonic_pitch:
+       pitch
+       | steno_tonic_pitch
+       ;
+
 gen_text_def:
        full_markup {
                Music *t = MY_MAKE_MUSIC ("TextScriptEvent", @$);