]> git.donarmstrong.com Git - lilypond.git/commitdiff
parser.yy: allow composite_music rather than closed_music in connection with lyrics
authorDavid Kastrup <dak@gnu.org>
Sun, 16 Oct 2011 15:09:07 +0000 (17:09 +0200)
committerDavid Kastrup <dak@gnu.org>
Sat, 22 Oct 2011 11:18:20 +0000 (13:18 +0200)
lily/parser.yy

index 40003772dc3cedfcb5a7cd48a728b71ca153da0b..3a51c7035c7908de60a6a886c9bbbe3ea75523dc 100644 (file)
@@ -1035,7 +1035,7 @@ braced_music_list:
 
 music:
        simple_music
-       | composite_music
+       | composite_music %prec FUNCTION_ARGUMENTS
        ;
 
 
@@ -1119,14 +1119,13 @@ composite_music:
        | music_bare
        ;
 
-/* Music that can't be followed by additional events or durations */
+/* Music that can be parsed without lookahead */
 closed_music:
        music_bare
        | complex_music_prefix closed_music
        {
                $$ = FINISH_MAKE_SYNTAX ($1, @$, $2);
-       } %prec FUNCTION_ARGUMENTS
-          /* \addlyrics attaches to innermost closed_music */
+       }
        ;
 
 music_bare:
@@ -1439,7 +1438,7 @@ mode_changing_head_with_context:
 new_lyrics:
        ADDLYRICS { PARSER->lexer_->push_lyric_state (); }
        /*cont */
-       closed_music {
+       composite_music {
        /* Can also use music at the expensive of two S/Rs similar to
            \repeat \alternative */
                PARSER->lexer_->pop_state ();
@@ -1448,16 +1447,16 @@ new_lyrics:
        }
        | new_lyrics ADDLYRICS {
                PARSER->lexer_->push_lyric_state ();
-       } closed_music {
+       } composite_music {
                PARSER->lexer_->pop_state ();
                $$ = scm_cons ($4, $1);
        }
        ;
 
 re_rhythmed_music:
-       closed_music new_lyrics {
+       composite_music new_lyrics {
                $$ = MAKE_SYNTAX ("add-lyrics", @$, $1, scm_reverse_x ($2, SCM_EOL));
-       }
+       } %prec FUNCTION_ARGUMENTS
        | LYRICSTO simple_string {
                PARSER->lexer_->push_lyric_state ();
        } music {