]> git.donarmstrong.com Git - lilypond.git/commitdiff
Refactor grammar, folding re_rhythmed_music into composite_music
authorDavid Kastrup <dak@gnu.org>
Mon, 4 Aug 2014 07:55:17 +0000 (09:55 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 14 Sep 2014 05:44:55 +0000 (07:44 +0200)
lily/parser.yy

index 89c4a0036a41c95b8bb9624b5bbdacd5d6f6ac99..e523c2da48ec419e578073addd21bf5ef3ab6688 100644 (file)
@@ -1421,14 +1421,28 @@ context_prefix:
        }
        ;
 
+new_lyrics:
+       ADDLYRICS lyric_mode_music {
+               $$ = scm_list_1 ($2);
+       }
+       | new_lyrics ADDLYRICS lyric_mode_music {
+               $$ = scm_cons ($3, $1);
+       }
+       ;
+
 composite_music:
        music_function_call
        | repeated_music                { $$ = $1; }
-       | re_rhythmed_music     { $$ = $1; }
        | context_prefix music
        {
                $$ = FINISH_MAKE_SYNTAX ($1, @$, $2);
        }
+       | composite_music new_lyrics {
+               $$ = MAKE_SYNTAX ("add-lyrics", @$, $1, scm_reverse_x ($2, SCM_EOL));
+       } %prec COMPOSITE
+       | LYRICSTO simple_string lyric_mode_music {
+               $$ = MAKE_SYNTAX ("lyric-combine", @$, $2, $3);
+       }
        | music_bare
        ;
 
@@ -2245,24 +2259,6 @@ mode_changing_head_with_context:
        }
        ;
 
-new_lyrics:
-       ADDLYRICS lyric_mode_music {
-               $$ = scm_list_1 ($2);
-       }
-       | new_lyrics ADDLYRICS lyric_mode_music {
-               $$ = scm_cons ($3, $1);
-       }
-       ;
-
-re_rhythmed_music:
-       composite_music new_lyrics {
-               $$ = MAKE_SYNTAX ("add-lyrics", @$, $1, scm_reverse_x ($2, SCM_EOL));
-       } %prec COMPOSITE
-       | LYRICSTO simple_string lyric_mode_music {
-               $$ = MAKE_SYNTAX ("lyric-combine", @$, $2, $3);
-       }
-       ;
-
 context_change:
        CHANGE symbol '=' simple_string  {
                $$ = MAKE_SYNTAX ("context-change", @$, $2, $4);