]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/lexer.ll, lily/parser.yy:
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 18 Apr 2004 15:14:23 +0000 (15:14 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 18 Apr 2004 15:14:23 +0000 (15:14 +0000)
* input/simple-song.ly: Idem.

ChangeLog
input/simple-song.ly
lily/my-lily-lexer.cc
lily/parser.yy

index 5ddb1543b31058c0d2e6f80109ae4a870727e169..e005535612e0dba63a85ce5fa05cf97cf0637389 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,7 +16,7 @@
 
        * Grok \relative COMPOSITE_MUSIC, make relative on middleC.
 
-       * \addlyrics is a shortcut for \context Lyrics \lyricsto "" \lyrics
+       * \newlyrics is a shortcut for \context Lyrics \lyricsto "" \lyrics
 
        * input/simple.ly: New file.
        
index fed51a97ede6a7379165b7b17868cc2f78164ac7..0b1023628c4c6a7acc151575fcfe35aca9eed12d 100644 (file)
@@ -6,7 +6,7 @@
        c2 c d4 f g2
     }
 
-    \addlyrics {
+    \newlyrics {
        My first Li -- ly song,
        Not much can go wrong!
     }
index d7c320c8969437b20f3f42b8171600bcc8579c3f..f23fdad76c469d7e7b8355889c4a49ab87aacbeb 100644 (file)
@@ -61,6 +61,7 @@ static Keyword_ent the_key_tab[] = {
   {"midi", MIDI},
   {"name", NAME},
   {"new", NEWCONTEXT},
+  {"newlyrics", NEWLYRICS},
   {"notes", NOTES},
   {"octave", OCTAVE},
   {"once", ONCE},
index b4a509c615f1c9589d4725f4873926a08aa7f458..c8c6fa4cdf505bf15256405ae222fd72cdc4f5fc 100644 (file)
@@ -302,6 +302,7 @@ or
 %token SCM_T
 %token SCORE
 %token SEQUENTIAL
+%token NEWLYRICS
 %token SIMULTANEOUS
 %token SKIP
 %token SPANREQUEST
@@ -375,6 +376,7 @@ or
 %type <music>  Composite_music Simple_music
 %type <music>  Repeated_music
 %type <scm>     Alternative_music
+%type <scm>     Composite_music_list
 %type <i>      tremolo_type
 %type <i>      bare_int  bare_unsigned
 %type <i>      script_dir
@@ -845,6 +847,17 @@ Alternative_music:
        }
        ;
 
+Composite_music_list: {};
+/* Too many s/r r/r problems
+       Composite_music {
+               $$ = scm_cons ($1, SCM_EOL);
+       }
+       | '{' Music_list '}' {
+               $$ = $2;
+       }
+       ;
+*/
+
 Repeated_music:
        REPEAT string bare_unsigned Music Alternative_music
        {
@@ -1181,8 +1194,23 @@ relative_music:
        ;
 
 re_rhythmed_music:
-       ADDLYRICS { THIS->lexer_->push_lyric_state (); }
+       ADDLYRICS Music Music {
+               Music *m = MY_MAKE_MUSIC ("LyricCombineMusic");
+               m->set_property ("elements", scm_listify ($2->self_scm (),
+                       $3->self_scm (), SCM_UNDEFINED));
+               scm_gc_unprotect_object ($3->self_scm ());
+               scm_gc_unprotect_object ($2->self_scm ());
+               $$ = m;
+       }
+       |
+/* Too many s/r r/r problems
+       Music
+*/
+       NEWLYRICS { THIS->lexer_->push_lyric_state (); }
        /* cont */
+/* Too many s/r r/r problems
+       Composite_music_list
+*/
        Music {
                THIS->lexer_->pop_state ();