]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/parser.yy (scalar): Bugfix: accept LYRICS_STRING.
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 19 Apr 2004 16:12:54 +0000 (16:12 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 19 Apr 2004 16:12:54 +0000 (16:12 +0000)
FIXME: Replace some `Music's with Grouped_music_list; fixes make web.

* lily/parser.yy (new_lyrics): Return SCM list of lyric musics.
(Music_list): Allow embedded scm.

* lily/parser.yy (book_block, score_block, toplevel_music): Use them.

ChangeLog
Documentation/user/notation.itely
lily/parser.yy

index a12a6654d72babaa4a1b81afd08e1b2c680fed7c..5fe814e32b6600d35bfc686d00d41ab54d365618 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-04-19  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * lily/parser.yy (scalar): Bugfix: accept LYRICS_STRING.
+       FIXME: Replace some `Music's with Grouped_music_list; fixes make web.
+
        * input/regression/newaddlyrics.ly: New file.
 
        * Documentation/topdocs/NEWS.texi: Update.
index 7907f01a097bde784ac3ca2b7210277ebef8ec23..87b6f3a119b8e4e0065f687645959f0a72979cab 100644 (file)
@@ -2734,8 +2734,7 @@ an abbreviated name, and both be used in input files
   hihat hh bassdrum bd
 @end example
 @lilypond[quote,raggedright]
-        \new DrumStaff \drums {   hihat hh bassdrum bd
- }
+\new DrumStaff \drums { hihat hh bassdrum bd }
 @end lilypond
 
 The complete list of drum names is in the init file
@@ -2776,10 +2775,10 @@ polyphonic notation, described in @ref{Polyphony}, can also be used if
 the @internalsref{DrumVoices} are instantiated by hand first. For example, 
 
 @lilypond[quote,fragment,verbatim] 
-\drums \new DrumStaff <<
+\new DrumStaff <<
   \context DrumVoice = "1" {  s1 *2 }
   \context DrumVoice = "2" {  s1 *2 }
-  {
+  \drums {
     bd4 sn4 bd4 sn4
     <<
       { \repeat unfold 16 hh16 }
@@ -3573,11 +3572,11 @@ The complete example is shown here
     \notes \relative c'' \context Voice = duet {
       \time 3/4
        g2 e4 a2 f4 g2. }
-    \lyrics <<
-      \lyricsto "duet" \new Lyrics {
+    <<
+      \lyricsto "duet" \new Lyrics \lyrics {
         \set vocalName = "Bert"
         Hi, my name is Bert. }
-      \lyricsto "duet" \new Lyrics {
+      \lyricsto "duet" \new Lyrics \lyrics {
         \set vocalName = "Ernie"
         Ooooo, ch\'e -- ri, je t'aime. }
     >>
index 1930b93aa552cd2eb6618977eea34cca39564d26..45dc82358b61fffa7d590b3af736019052d7a943 100644 (file)
@@ -909,7 +909,12 @@ Simple_music:
 
 optional_context_mod:
        /**/ { $$ = SCM_EOL; }
-       | WITH '{' context_mod_list '}'  { $$ = $3; }
+       | WITH { THIS->lexer_->push_initial_state (); }
+       '{' context_mod_list '}'
+       {
+               THIS->lexer_->pop_state ();
+               $$ = $4;
+       }
        ;
 
 grace_head:
@@ -1081,13 +1086,20 @@ basic music objects too, since the meaning is different.
                SCM nn = THIS->lexer_->lookup_identifier ("drumPitchNames");
                THIS->lexer_->push_note_state (alist_to_hashq (nn));
        }
+       /* FIXME: This used to be:
        Music
+*/
+       Grouped_music_list
                { $$ = $3;
                  THIS->lexer_->pop_state ();
                }
        | FIGURES
                { THIS->lexer_->push_figuredbass_state (); }
+       /* FIXME: This used to be:
        Music
+       but that breaks web build
+       */
+       Grouped_music_list
                {
                  Music *chm = MY_MAKE_MUSIC ("UntransposableMusic");
                  chm->set_property ("element", $3->self_scm ());
@@ -1102,7 +1114,12 @@ basic music objects too, since the meaning is different.
                nn = THIS->lexer_->lookup_identifier ("pitchnames");
                THIS->lexer_->push_chord_state (alist_to_hashq (nn));
 
-       } Music {
+       }
+       /* FIXME:
+       Music
+*/
+       Grouped_music_list
+       {
                  Music *chm = MY_MAKE_MUSIC ("UnrelativableMusic");
                  chm->set_property ("element", $3->self_scm ());
                  scm_gc_unprotect_object ($3->self_scm ());
@@ -1112,7 +1129,10 @@ basic music objects too, since the meaning is different.
        }
        | LYRICS
                { THIS->lexer_->push_lyric_state (); }
+       /* FIXME:
        Music
+*/
+       Grouped_music_list
                {
                  $$ = $3;
                  THIS->lexer_->pop_state ();
@@ -1218,12 +1238,6 @@ context_change:
        }
        ;
 
-simple_string: STRING {
-          }
-       | LYRICS_STRING {
-       }
-       ;
-
 property_operation:
        STRING '=' scalar {
                $$ = scm_list_3 (ly_symbol2scm ("assign"),
@@ -1313,16 +1327,43 @@ music_property_def:
        ;
 
 
+string:
+       STRING {
+               $$ = $1;
+       }
+       | STRING_IDENTIFIER {
+               $$ = $1;
+       }
+       | string '+' string {
+               $$ = scm_string_append (scm_list_2 ($1, $3));
+       }
+       ;
 
-scalar:
-        string          { $$ = $1; }
-        | bare_int      { $$ = scm_int2num ($1); }
-        | embedded_scm  { $$ = $1; }
-       | full_markup {  $$ = $1; }
-       | DIGIT { $$ = scm_int2num ($1); }
+simple_string: STRING {
+       }
+       | LYRICS_STRING {
+       }
+       ;
+
+scalar: string {
+       }
+       | LYRICS_STRING {
+       }
+        | bare_int {
+               $$ = scm_int2num ($1);
+       }
+        | embedded_scm {
+       }
+       | full_markup {
+       }
+       | DIGIT {
+               $$ = scm_int2num ($1);
+       }
        ;
 
 /*
+FIXME: remove or fix this comment.  What is `This'?
+
 This is a trick:
 
 Adding pre_events to the simple_element
@@ -1946,9 +1987,6 @@ steno_duration:
        }
        ;
 
-
-
-
 multiplied_duration:
        steno_duration {
                $$ = $1;
@@ -1979,7 +2017,6 @@ dots:
        }
        ;
 
-
 tremolo_type:
        ':'     {
                $$ = 0;
@@ -1991,11 +2028,6 @@ tremolo_type:
        }
        ;
 
-
-
-/*****************************************************************
-               BASS FIGURES
-*****************************************************************/
 bass_number:
        DIGIT   {
                $$ = scm_number_to_string (scm_int2num ($1), scm_int2num (10));
@@ -2346,20 +2378,6 @@ bare_int:
        }
        ;
 
-
-string:
-       STRING          {
-               $$ = $1;
-       }
-       | STRING_IDENTIFIER     {
-               $$ = $1;
-       }
-       | string '+' string {
-               $$ = scm_string_append (scm_list_2 ($1, $3));
-       }
-       ;
-
-
 exclamations:
                { $$ = 0; }
        | exclamations '!'      { $$ ++; }