lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Property setting in lyrics: allow markup, not just bare strings (issue45


From: n . puttock
Subject: Property setting in lyrics: allow markup, not just bare strings (issue4571080)
Date: Wed, 15 Jun 2011 22:24:39 +0000

Reviewers: ,

Message:
Prompted by this thread on lilypond-user-fr:

http://lists.gnu.org/archive/html/lilypond-user-fr/2011-06/msg00048.html

Currently, the following code will fail with a syntax error, unless the
markup is recoded in scheme:

\version "2.15.2"

\relative c' {
  c1
}
\addlyrics {
  \set stanza = \markup \box "1"
  foo
}

-> error: syntax error, unexpected LYRIC_MARKUP

Description:
Property setting in lyrics: allow markup

* input/regression/stanza-number.ly:

  test markup as well as bare string

* lily/parser.yy (scalar):

  use lyric_element instead of LYRICS_STRING

Please review this at http://codereview.appspot.com/4571080/

Affected files:
  M input/regression/stanza-number.ly
  M lily/parser.yy


Index: input/regression/stanza-number.ly
diff --git a/input/regression/stanza-number.ly b/input/regression/stanza-number.ly index 28ed6567b8bdcc9e838a478e9cb85c751d8471d7..cfde182339c1dc16d57c68468a81ab3b3572ae55 100644
--- a/input/regression/stanza-number.ly
+++ b/input/regression/stanza-number.ly
@@ -1,9 +1,9 @@
-\version "2.14.0"
+\version "2.15.2"

-\header { texidoc = "Stanza numbers are put left of their lyric.  They
-are aligned in a column."  }
-
-\layout { ragged-right = ##t }
+\header {
+  texidoc = "Stanza numbers are put left of their lyric.  They
+are aligned in a column."
+}

 \relative c'' { r4 r4 c4 c4 }
 \addlyrics {
@@ -13,9 +13,6 @@ are aligned in a column."  }
 }
 \addlyrics {
   \skip 2
-  \set stanza = "2."
+  \set stanza = \markup { 2. }
   FFFooooo8
 }
-
-
-
Index: lily/parser.yy
diff --git a/lily/parser.yy b/lily/parser.yy
index 0bb4c152f273455dd1e02f201803e66d8eeaa685..9b46bfe3cc3d16c1bd0e8ace4eae21c96c2ab9b1 100644
--- a/lily/parser.yy
+++ b/lily/parser.yy
@@ -1447,7 +1447,7 @@ simple_string: STRING {
 scalar: string {
                $$ = $1;
        }
-       | LYRICS_STRING {
+       | lyric_element {
                $$ = $1;
        }
        | bare_number {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]