Hi

Here is a patch for changing < ... > by { ... } in markups.
I had some reduce/reduce conflicts, so I had to rearrange the markup
rules a bit in order to get rid off them.

As this is not exactly trivial (for me), I send the patch to the list
before commiting, for comments. May I?

make web does not fail, the output in regression/ seems OK at first
sight.

There is one thing I have not done yet: adding a rule in convert-ly.

nicolas

Index: ChangeLog
===================================================================
RCS file: /cvsroot/lilypond/lilypond/ChangeLog,v
retrieving revision 1.2898
diff -u -r1.2898 ChangeLog
--- ChangeLog	26 Nov 2004 13:33:28 -0000	1.2898
+++ ChangeLog	27 Nov 2004 09:56:08 -0000
@@ -1,3 +1,33 @@
+2004-11-27  Nicolas Sceaux  <[EMAIL PROTECTED]>
+
+	* lily/system.cc (get_line): s/penalty_/break_before_penalty_/
+
+	* scm/new-markup.scm (map-markup-command-list): helper function
+	used in parser.yy to map markup commands on a markup list.
+
+	* lily/parser.yy: get rid off < > in markups by treating { } as
+	real lists.
+
+	* lily/lexer.ll: remove < > from markup lexer mode.
+
+	* ly/titling-init.ly: 
+	* input/test/coriolan-margin.ly: 
+	* input/regression/new-markup-syntax.ly: 
+	* input/regression/new-markup-scheme.ly: 
+	* input/regression/multi-measure-rest-text.ly: 
+	* input/regression/markup-stack.ly: 
+	* input/regression/markup-score.ly: 
+	* input/regression/instrument-name-markup.ly: 
+	* input/mutopia/W.A.Mozart/mozart-hrn-3.ly: 
+	* input/mutopia/R.Schumann/romanze-op28-2.ly: 
+	* input/mutopia/J.S.Bach/wtk1-fugue2.ly: 
+	* input/wilhelmus.ly: 
+	* Documentation/user/notation.itely: 
+	* Documentation/user/music-glossary.tely: 
+	* Documentation/user/changing-defaults.itely: change < > to { } in
+	markups
+
+
 2004-11-26  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
 	* Documentation/user/changing-defaults.itely (Creating titles):
Index: Documentation/user/changing-defaults.itely
===================================================================
RCS file: /cvsroot/lilypond/lilypond/Documentation/user/changing-defaults.itely,v
retrieving revision 1.93
diff -u -r1.93 changing-defaults.itely
--- Documentation/user/changing-defaults.itely	26 Nov 2004 13:33:30 -0000	1.93
+++ Documentation/user/changing-defaults.itely	27 Nov 2004 09:56:09 -0000
@@ -1461,14 +1461,14 @@
 In markup mode you can compose expressions, similar to mathematical
 expressions, XML documents, and music expressions.  The braces group
 notes into horizontal lines.  Other types of lists also exist: you can
-stack expressions grouped with @code{<} and @code{>} vertically with
+stack expressions grouped vertically with
 the command @code{\column}.  Similarly, @code{\center-align} aligns
 texts by their center lines:
 
 @lilypond[quote,verbatim,fragment,relative=1]
-c1^\markup { \column < a bbbb c > }
-c1^\markup { \center-align < a bbbb c > }
-c1^\markup { \line < a b c > }
+c1^\markup { \column { a bbbb c } }
+c1^\markup { \center-align { a bbbb c } }
+c1^\markup { \line { a b c } }
 @end lilypond
 
 
Index: Documentation/user/music-glossary.tely
===================================================================
RCS file: /cvsroot/lilypond/lilypond/Documentation/user/music-glossary.tely,v
retrieving revision 1.93
diff -u -r1.93 music-glossary.tely
--- Documentation/user/music-glossary.tely	13 Nov 2004 20:46:35 -0000	1.93
+++ Documentation/user/music-glossary.tely	27 Nov 2004 09:56:10 -0000
@@ -1145,7 +1145,7 @@
   d1 |
   g,4^\segno a b c |
   b a g2_\markup{
-    \line < "d.s. " \tiny \raise #1 \musicglyph #"scripts-segno" > }
+    \line { "d.s. " \tiny \raise #1 \musicglyph #"scripts-segno" } }
   \bar "|."
 }
 @end lilypond
Index: Documentation/user/notation.itely
===================================================================
RCS file: /cvsroot/lilypond/lilypond/Documentation/user/notation.itely,v
retrieving revision 1.157
diff -u -r1.157 notation.itely
--- Documentation/user/notation.itely	23 Nov 2004 00:16:16 -0000	1.157
+++ Documentation/user/notation.itely	27 Nov 2004 09:56:14 -0000
@@ -5153,8 +5153,8 @@
 
 @lilypond[quote,fragment,verbatim,raggedright]
 \set Staff.instrument = \markup {
-  \column < "Clarinetti"
-            { "in B" \smaller \flat } > }
+  \column { "Clarinetti"
+            { "in B" \smaller \flat } } }
 c''1
 @end lilypond
 
@@ -5922,24 +5922,24 @@
 {
   \fatText
   s^\markup {
-    \column <
+    \column {
       "vaticana"
       { " " \musicglyph #"accidentals-vaticana-1"
       " " \musicglyph #"accidentals-vaticana0" }
-    >
-    \column <
+    }
+    \column {
       "medicaea"
       { " " \musicglyph #"accidentals-medicaea-1" }
-    >
-    \column <
+    }
+    \column {
       "hufnagel"
       { " " \musicglyph #"accidentals-hufnagel-1" }
-    >
-    \column <
+    }
+    \column {
       "mensural"
       { " " \musicglyph #"accidentals-mensural-1"
       " " \musicglyph #"accidentals-mensural1" }
-    >
+    }
   }
 }
 \layout {
@@ -6436,22 +6436,22 @@
 
 @lilypond[quote,raggedright,fragment]
 \new Lyrics \lyricmode {
-  \markup { \column <
+  \markup { \column {
     \typewriter "vaticana"
     { " " \musicglyph #"custodes-vaticana-u0" }
-  > }
-  \markup { \column <
+  } }
+  \markup { \column {
     \typewriter "medicaea"
     { " " \musicglyph #"custodes-medicaea-u0" }
-  >}
-  \markup { \column <
+  }}
+  \markup { \column {
     \typewriter "hufnagel"
     { " " \musicglyph #"custodes-hufnagel-u0" }
-  >}
-  \markup { \column <
+  }}
+  \markup { \column {
     \typewriter "mensural"
     { " " \musicglyph #"custodes-mensural-u0" }
-  >}
+  }}
 }
 @end lilypond
 
@@ -7734,9 +7734,9 @@
 % create 2/4 + 5/8
 tsMarkup =\markup {
   \number {
-    \column < "2" "4" >
+    \column { "2" "4" }
     \musicglyph #"scripts-stopped"
-    \bracket \column < "5" "8" >
+    \bracket \column { "5" "8" }
   }
 }
 
Index: input/wilhelmus.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/wilhelmus.ly,v
retrieving revision 1.17
diff -u -r1.17 wilhelmus.ly
--- input/wilhelmus.ly	30 Oct 2004 20:55:15 -0000	1.17
+++ input/wilhelmus.ly	27 Nov 2004 09:56:14 -0000
@@ -1,4 +1,4 @@
-\version "2.4.0"
+\version "2.5.1"
 
 \header {
   texidoc = "Wilhelmus van Nassouwe"
@@ -142,7 +142,7 @@
 
 oneHalfNoteTime = \markup {
   \override #'(baseline-skip . 0)
-  \column < { \number "1" } { \smaller \smaller \note #"2" #-0.5 } >
+  \column { { \number "1" } { \smaller \smaller \note #"2" #-0.5 } }
 }
 
 \layout {
Index: input/mutopia/J.S.Bach/wtk1-fugue2.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/mutopia/J.S.Bach/wtk1-fugue2.ly,v
retrieving revision 1.31
diff -u -r1.31 wtk1-fugue2.ly
--- input/mutopia/J.S.Bach/wtk1-fugue2.ly	30 Oct 2004 20:55:15 -0000	1.31
+++ input/mutopia/J.S.Bach/wtk1-fugue2.ly	27 Nov 2004 09:56:14 -0000
@@ -17,17 +17,17 @@
     footer = "Mutopia-2002/08/19-6"
 
     tagline = \markup { \smaller
-			\column <
-			    \fill-line < \footer "" >
-			    \fill-line < { "This music is part of the Mutopia project, "
+			\column {
+			    \fill-line { \footer "" }
+			    \fill-line { { "This music is part of the Mutopia project, "
 					   \typewriter { "http://sca.uwaterloo.ca/Mutopia/"; }
-					   "." } >
-			    \fill-line < { "It has been typeset and placed in the public "
-					   "domain by "  \maintainer  "." } >
-			    \fill-line < { "Unrestricted modification and redistribution "
+					   "." } }
+			    \fill-line { { "It has been typeset and placed in the public "
+					   "domain by "  \maintainer  "." } }
+			    \fill-line { { "Unrestricted modification and redistribution "
 					   "is permitted and encouraged---copy this music "
-					   "and share it!" } >
-			>
+					   "and share it!" } }
+			}
 		    }
     lastupdated = "2002/August/19"
 }
@@ -44,7 +44,7 @@
 %}
 
 
-\version "2.4.0"
+\version "2.5.1"
 
 
 
Index: input/mutopia/R.Schumann/romanze-op28-2.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/mutopia/R.Schumann/romanze-op28-2.ly,v
retrieving revision 1.52
diff -u -r1.52 romanze-op28-2.ly
--- input/mutopia/R.Schumann/romanze-op28-2.ly	30 Oct 2004 20:55:15 -0000	1.52
+++ input/mutopia/R.Schumann/romanze-op28-2.ly	27 Nov 2004 09:56:14 -0000
@@ -5,7 +5,7 @@
 
 #(set-global-staff-size 16)
 
-\version "2.4.0"
+\version "2.5.1"
 
 \header {
   title = "Romanzen"
@@ -259,7 +259,7 @@
     \override Staff.InstrumentName #'font-magnification = #1
     \override Staff.InstrumentName #'extra-offset = #'(0 . 6)
    % \set Staff.instrument = "\\begin{turn}{-90}{Rechte Hand}\\end{turn}"
-    \set Staff.instrument = \markup { \column < Rechte Hand >  \hspace #2 }
+    \set Staff.instrument = \markup { \column { Rechte Hand }  \hspace #2 }
       \clef F <<\global \context Voice = "midv" \rightb>>
     }
       \context Staff = "down" {
Index: input/mutopia/W.A.Mozart/mozart-hrn-3.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/mutopia/W.A.Mozart/mozart-hrn-3.ly,v
retrieving revision 1.31
diff -u -r1.31 mozart-hrn-3.ly
--- input/mutopia/W.A.Mozart/mozart-hrn-3.ly	30 Oct 2004 20:55:15 -0000	1.31
+++ input/mutopia/W.A.Mozart/mozart-hrn-3.ly	27 Nov 2004 09:56:14 -0000
@@ -20,17 +20,17 @@
   footer = "Mutopia-2002/05/21-25"
 
   tagline = \markup { \smaller
-      \column <
-	   \fill-line < \footer "" >
-	   \fill-line < { "This music is part of the Mutopia project,"
+      \column {
+	   \fill-line { \footer "" }
+	   \fill-line { { "This music is part of the Mutopia project,"
 			  \typewriter { "http://sca.uwaterloo.ca/Mutopia/"; }
-			 } >
-	   \fill-line < #(ly:export (string-append "It has been typeset and placed in the public "
-			  "domain by "  maintainer  "."))  >
-	   \fill-line < #(ly:export (string-append "Unrestricted modification and redistribution"
+			 } }
+	   \fill-line { #(ly:export (string-append "It has been typeset and placed in the public "
+			  "domain by "  maintainer  "."))  }
+	   \fill-line { #(ly:export (string-append "Unrestricted modification and redistribution"
 			  " is permitted and encouraged---copy this music"
-			  " and share it!")) >
-	   >
+			  " and share it!")) }
+	   }
        }
 }
 %{
@@ -41,7 +41,7 @@
 
 %}
 
-\version "2.4.0"
+\version "2.5.1"
 
 \include "mozart-hrn3-defs.ily"
 \include "mozart-hrn3-allegro.ily"
Index: input/regression/instrument-name-markup.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/regression/instrument-name-markup.ly,v
retrieving revision 1.25
diff -u -r1.25 instrument-name-markup.ly
--- input/regression/instrument-name-markup.ly	30 Oct 2004 20:55:15 -0000	1.25
+++ input/regression/instrument-name-markup.ly	27 Nov 2004 09:56:14 -0000
@@ -7,14 +7,14 @@
 }
 
 
-\version "2.4.0"
+\version "2.5.1"
 
 
 textFlat = \markup {\smaller \flat}
 
 \score {
    \new Staff {
-    \set Staff.instrument = \markup { \column < "Clarinetti" { "in B" \textFlat } > }
+    \set Staff.instrument = \markup { \column { "Clarinetti" { "in B" \textFlat } } }
     \set Staff.instr = \markup { \smaller  { "Cl(B" \textFlat ")" } }
 
     { c''1 \break c'' }
Index: input/regression/markup-score.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/regression/markup-score.ly,v
retrieving revision 1.5
diff -u -r1.5 markup-score.ly
--- input/regression/markup-score.ly	30 Oct 2004 20:55:16 -0000	1.5
+++ input/regression/markup-score.ly	27 Nov 2004 09:56:14 -0000
@@ -2,7 +2,7 @@
     texidoc = "Use \\score block as markup command."
 }
 
-\version "2.4.0"
+\version "2.5.1"
 
 tuning = \markup {
     \score {
@@ -19,7 +19,7 @@
 \header {
     title = "Solo Cello Suites"
     subtitle = "Suite IV"
-    subsubtitle = \markup { \fill-line < { "Originalstimmung: " \tuning } > }
+    subsubtitle = \markup { \fill-line { { "Originalstimmung: " \tuning } } }
 }
 
 \relative {
Index: input/regression/markup-stack.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/regression/markup-stack.ly,v
retrieving revision 1.26
diff -u -r1.26 markup-stack.ly
--- input/regression/markup-stack.ly	30 Oct 2004 20:55:16 -0000	1.26
+++ input/regression/markup-stack.ly	27 Nov 2004 09:56:14 -0000
@@ -1,6 +1,6 @@
-\version "2.4.0"
+\version "2.5.1"
 \header {texidoc="Markup scripts may be stacked."}
 \layout { raggedright = ##t}
-\score {  { c''^\markup { "a" \column < "1" \bold "2"  "3" > } } }
+\score {  { c''^\markup { "a" \column { "1" \bold "2"  "3" } } } }
 
 
Index: input/regression/multi-measure-rest-text.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/regression/multi-measure-rest-text.ly,v
retrieving revision 1.24
diff -u -r1.24 multi-measure-rest-text.ly
--- input/regression/multi-measure-rest-text.ly	30 Oct 2004 20:55:16 -0000	1.24
+++ input/regression/multi-measure-rest-text.ly	27 Nov 2004 09:56:14 -0000
@@ -1,4 +1,4 @@
-\version "2.4.0"
+\version "2.5.1"
 
 \header  {
 
@@ -13,7 +13,7 @@
 \score {  {
   \time 3/4
   \set Score.skipBars = ##t
-  R2._\markup { \center-align < \musicglyph  #"scripts-dfermata" \roman "Ad lib"  >  }
+  R2._\markup { \center-align { \musicglyph  #"scripts-dfermata" \roman "Ad lib"  }  }
   R2.^\fermataMarkup
   R2.^"4"
   R2.*3_\markup { \roman "a1b2c3" }
Index: input/regression/new-markup-scheme.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/regression/new-markup-scheme.ly,v
retrieving revision 1.16
diff -u -r1.16 new-markup-scheme.ly
--- input/regression/new-markup-scheme.ly	30 Oct 2004 20:55:16 -0000	1.16
+++ input/regression/new-markup-scheme.ly	27 Nov 2004 09:56:14 -0000
@@ -5,7 +5,7 @@
     texts using a similar syntax as @code{\\markup}."
 
     }
-\version "2.4.0"
+\version "2.5.1"
 \score {
      {
         \fatText
@@ -14,7 +14,7 @@
             \raise #0.2 \hbracket \bold bar
             \override #'(baseline-skip . 4)
 
-            \bracket \column < baz bazr bla >
+            \bracket \column { baz bazr bla }
             \hspace #2.0
             \override #'(font-family . music) {
                 \lookup #"noteheads-0"
@@ -23,7 +23,7 @@
             \musicglyph #"accidentals--1"
             \combine "X" "+"   
             \combine "o" "/"
-            \box \column < { "string 1" } { "string 2" } >
+            \box \column { { "string 1" } { "string 2" } }
             "$\\emptyset$"
             \italic Norsk
             \super "2"
Index: input/regression/new-markup-syntax.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/regression/new-markup-syntax.ly,v
retrieving revision 1.35
diff -u -r1.35 new-markup-syntax.ly
--- input/regression/new-markup-syntax.ly	30 Oct 2004 20:55:16 -0000	1.35
+++ input/regression/new-markup-syntax.ly	27 Nov 2004 09:56:14 -0000
@@ -2,7 +2,7 @@
 texidoc = "With the new markup syntax, text may be written in various manners."
 }
 
-\version "2.4.0"
+\version "2.5.1"
 
 
 \score {
@@ -13,7 +13,7 @@
 		\raise #0.2 \hbracket \bold bar
 		\override #'(baseline-skip . 4)
 
-		\bracket \column < baz bazr bla >
+		\bracket \column { baz bazr bla }
 		\hspace #2.0
 		\override #'(font-family . music) {
 			\lookup #"noteheads-0"
@@ -26,7 +26,7 @@
 		\combine "X" "+"   
 		\combine "o" "/"
 %		\char-number #"abc1234abc"
-		\box \column < { "string 1" } { "string 2" } >
+		\box \column { { "string 1" } { "string 2" } }
 		"$\\emptyset$"
 		\italic Norsk
 		\super "2"
Index: input/test/coriolan-margin.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/test/coriolan-margin.ly,v
retrieving revision 1.60
diff -u -r1.60 coriolan-margin.ly
--- input/test/coriolan-margin.ly	30 Oct 2004 20:55:16 -0000	1.60
+++ input/test/coriolan-margin.ly	27 Nov 2004 09:56:15 -0000
@@ -1,5 +1,5 @@
 
-\version "2.4.0"
+\version "2.5.1"
 
 
 % Ugh, we need to override some LaTeX titling stuff
@@ -42,7 +42,7 @@
 }
 
 clarinetti =  \relative c' {
-    \set Staff.instrument = \markup { \column < "Clarinetti" { "in B" \raisedFlat } > }
+    \set Staff.instrument = \markup { \column { "Clarinetti" { "in B" \raisedFlat } } }
     \set Staff.instr = \markup { \smaller  { "Cl(B" \raisedFlat ")" } }
 
   c1 c
@@ -55,21 +55,21 @@
 }
 
 corni =  \relative c' {
-    \set Staff.instrument = \markup { \column < "Corni" { "in E" \raisedFlat } > }
+    \set Staff.instrument = \markup { \column { "Corni" { "in E" \raisedFlat } } }
     \set Staff.instr = \markup { \smaller  { "Cor(E" \raisedFlat ")" } }
 
   c1 c
 }
 
 trombe =  \relative c' {
-  \set Staff.instrument = \markup \column < "2 Trombe" "(C)" >
-  \set Staff.instr = \markup \column <  "Tbe." "(C)" >
+  \set Staff.instrument = \markup \column { "2 Trombe" "(C)" }
+  \set Staff.instr = \markup \column {  "Tbe." "(C)" }
 
   c1 c
 }
 
 timpani =  \relative c' {
-  \set Staff.instrument = \markup \column < "Timpani" "(C-G)" >
+  \set Staff.instrument = \markup \column { "Timpani" "(C-G)" }
   \set Staff.instr = #"Timp."
 
   c1 c
@@ -95,8 +95,8 @@
 }
 
 violoncello =  \relative c' {
-  \set Staff.instrument = \markup \column < "Violoncello" "e" "Contrabasso" >
-  \set Staff.instr = \markup \column <  "Vc." "Cb." >
+  \set Staff.instrument = \markup \column { "Violoncello" "e" "Contrabasso" }
+  \set Staff.instr = \markup \column {  "Vc." "Cb." }
   c1 c
 }
 
Index: input/test/title-markup.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/input/test/title-markup.ly,v
retrieving revision 1.48
diff -u -r1.48 title-markup.ly
--- input/test/title-markup.ly	30 Oct 2004 20:55:16 -0000	1.48
+++ input/test/title-markup.ly	27 Nov 2004 09:56:15 -0000
@@ -1,4 +1,4 @@
-\version "2.4.0"
+\version "2.5.1"
 
 %{
    Markup titles also available for direct PostScript output:
@@ -37,7 +37,7 @@
 }
     
 sizeTest = \markup {
-	\column <
+	\column {
             { \normalsize "normalsize"
               \hspace #5
               \smaller "smaller"
@@ -55,7 +55,7 @@
               \hspace #5
               \bigger \bigger \bigger "bigger"
             }
-       >
+       }
 }
 
 \encoding "latin1"
@@ -85,7 +85,7 @@
     piece = "Piece"
 
     %% Override automatic book title
-    %% bookTitle = \markup { \fill-line < \huge\bold \title > > }
+    %% bookTitle = \markup { \fill-line { \huge\bold \title } }
 }
 
 \book {
Index: lily/lexer.ll
===================================================================
RCS file: /cvsroot/lilypond/lilypond/lily/lexer.ll,v
retrieving revision 1.155
diff -u -r1.155 lexer.ll
--- lily/lexer.ll	23 Nov 2004 20:09:16 -0000	1.155
+++ lily/lexer.ll	27 Nov 2004 09:56:15 -0000
@@ -485,12 +485,6 @@
 	\" {
 		start_quote ();
 	}
-	\< {
-		return '<';
-	}
-	\> {
-		return '>';
-	}
 	\\score {
 		return SCORE;
 	}
@@ -530,7 +524,7 @@
 	[{}]	{
 		return YYText ()[0];
 	}
-	[^<>#{}"\\ \t\n\r\f]+ {
+	[^#{}"\\ \t\n\r\f]+ {
 		String s (YYText ()); 
 
 		char c = s[s.length () - 1];
Index: lily/parser.yy
===================================================================
RCS file: /cvsroot/lilypond/lilypond/lily/parser.yy,v
retrieving revision 1.442
diff -u -r1.442 parser.yy
--- lily/parser.yy	26 Nov 2004 11:53:53 -0000	1.442
+++ lily/parser.yy	27 Nov 2004 09:56:16 -0000
@@ -444,7 +444,7 @@
 %type <scm>  	Generic_prefix_music_scm 
 %type <scm>  	lyric_element
 %type <scm>     Alternative_music
-%type <scm>	markup markup_line markup_list markup_list_body full_markup
+%type <scm>	markup markup_list markup_list_body markup_head_1_item markup_head_1_list full_markup simple_markup
 %type <scm> 	mode_changing_head
 %type <scm> 	mode_changing_head_with_context
 %type <scm>     object_id_setting 
@@ -2463,56 +2463,55 @@
 	;
 
 
-
 full_markup:
 	MARKUP_IDENTIFIER {
 		$$ = $1;
  	}
 	| MARKUP
 		{ THIS->lexer_->push_markup_state (); }
-	markup
-		{ $$ = $3;
-		  THIS->lexer_->pop_state ();
-		}
+	markup {
+		$$ = $3;
+		THIS->lexer_->pop_state ();
+	}
 	;
 
+markup_list:
+	'{' markup_list_body '}'	{
+		$$ = scm_reverse_x ($2, SCM_EOL);
+	}
+	;
 
-/*
-This should be done more dynamically if possible.
-*/
-markup:
-	STRING {
-		$$ = make_simple_markup (THIS->lexer_->encoding (), $1);
+markup_list_body:
+	/* empty */	{  $$ = SCM_EOL; }
+	| markup_list_body markup	{
+		$$ = scm_cons ($2, $1);
 	}
-	| MARKUP_HEAD_EMPTY {
+	;
+
+markup_head_1_item:
+	MARKUP_HEAD_MARKUP0	{
 		$$ = scm_list_1 ($1);
 	}
-	| MARKUP_HEAD_MARKUP0 markup {
+	| MARKUP_HEAD_SCM0_MARKUP1 embedded_scm	{
 		$$ = scm_list_2 ($1, $2);
 	}
-	| MARKUP_HEAD_MARKUP0_MARKUP1 markup markup {
-		$$ = scm_list_3 ($1, $2, $3);
-	}
-	| MARKUP_HEAD_SCM0_MARKUP1 SCM_T markup {
+	| MARKUP_HEAD_SCM0_SCM1_MARKUP2 embedded_scm embedded_scm	{
 		$$ = scm_list_3 ($1, $2, $3);
 	}
-	| markup_line {
-		$$ = $1;
-	}
-	| MARKUP_HEAD_LIST0 markup_list {
-		$$ = scm_list_2 ($1,$2);
-	}
-	| MARKUP_HEAD_SCM0 embedded_scm {
-		$$ = scm_list_2 ($1, $2);
-	}
-	| MARKUP_HEAD_SCM0_SCM1_MARKUP2 embedded_scm embedded_scm markup {
-		$$ = scm_list_4 ($1, $2, $3, $4);
+	;
+
+markup_head_1_list:
+	markup_head_1_item	{
+		$$ = scm_list_1 ($1);
 	}
-	| MARKUP_HEAD_SCM0_SCM1_SCM2 embedded_scm embedded_scm embedded_scm {
-		$$ = scm_list_4 ($1, $2, $3, $4);
+	| markup_head_1_list markup_head_1_item	{
+		$$ = scm_cons ($2, $1);
 	}
-	| MARKUP_HEAD_SCM0_SCM1 embedded_scm embedded_scm {
-		$$ = scm_list_3 ($1, $2, $3);
+	;
+
+simple_markup:
+	STRING {
+		$$ = make_simple_markup (THIS->lexer_->encoding (), $1);
 	}
 	| MARKUP_IDENTIFIER {
 		$$ = $1;
@@ -2529,28 +2528,44 @@
 		scm_gc_unprotect_object (sc->self_scm ());
 		THIS->lexer_->pop_state ();
 	}
+	| MARKUP_HEAD_SCM0 embedded_scm {
+		$$ = scm_list_2 ($1, $2);
+	}
+	| MARKUP_HEAD_SCM0_SCM1_SCM2 embedded_scm embedded_scm embedded_scm {
+		$$ = scm_list_4 ($1, $2, $3, $4);
+	}
+	| MARKUP_HEAD_SCM0_SCM1 embedded_scm embedded_scm {
+		$$ = scm_list_3 ($1, $2, $3);
+	}
+	| MARKUP_HEAD_EMPTY {
+		$$ = scm_list_1 ($1);
+	}
+	| MARKUP_HEAD_LIST0 markup_list {
+		$$ = scm_list_2 ($1,$2);
+	}
+	| MARKUP_HEAD_MARKUP0_MARKUP1 markup markup {
+		$$ = scm_list_3 ($1, $2, $3);
+	}
 	;
 
-markup_list:
-	chord_open markup_list_body chord_close { $$ = scm_reverse_x ($2, SCM_EOL); }
-	;
 
-markup_line:
-	'{' markup_list_body '}' {
-		SCM line = ly_scheme_function ("line-markup");
-	
-		$$ = scm_list_2 (line, scm_reverse_x ($2, SCM_EOL));
+markup:
+	markup_head_1_list markup_list	{
+		$$ = scm_list_2 (ly_scheme_function ("line-markup"),
+				scm_call_2 (ly_scheme_function ("map-markup-command-list"), $1, $2));
 	}
-	;
-
-markup_list_body:
-	/**/ {  $$ = SCM_EOL; }
-	| markup_list_body markup {
-		$$ = scm_cons ($2, $1);
+	| 
+	markup_head_1_list simple_markup	{
+		$$ = scm_car (scm_call_2 (ly_scheme_function ("map-markup-command-list"), $1, scm_list_1 ($2)));
+	}
+	| simple_markup	{
+		$$ = $1;
+	}
+	| markup_list	{
+		$$ = scm_list_2 (ly_scheme_function ("line-markup"), $1);
 	}
 	;
 
-
 %%
 
 void
Index: ly/titling-init.ly
===================================================================
RCS file: /cvsroot/lilypond/lilypond/ly/titling-init.ly,v
retrieving revision 1.2
diff -u -r1.2 titling-init.ly
--- ly/titling-init.ly	21 Nov 2004 18:19:10 -0000	1.2
+++ ly/titling-init.ly	27 Nov 2004 09:56:17 -0000
@@ -1,58 +1,58 @@
 bookTitleMarkup = \markup {
-  \column <
-    \fill-line < \fromproperty #'header:dedication >
-    \fill-line <
+  \column {
+    \fill-line { \fromproperty #'header:dedication }
+    \fill-line {
       \huge \bigger \bigger \bigger \bold \fromproperty #'header:title
-    >
-    \fill-line <
+    }
+    \fill-line {
       \override #'(baseline-skip . 3)
-      \column <
-	\fill-line <
+      \column {
+	\fill-line {
 	  \huge \bigger \bigger
 	  \bold \fromproperty #'header:subtitle
-	>
-	\fill-line <
+	}
+	\fill-line {
 	  \huge \bigger
 	  \bold \fromproperty #'header:subsubtitle
-	>
-      >
-    >
-    \fill-line <
+	}
+      }
+    }
+    \fill-line {
       \fromproperty #'header:poet
       \fromproperty #'header:instrument 
-      \column <
+      \column {
 	\fromproperty #'header:composer
 	\fromproperty #'header:arranger
-      >
-    >
-  >
+      }
+    }
+  }
 }
 
 scoreTitleMarkup = \markup {
-  \fill-line <
+  \fill-line {
     \fromproperty #'header:piece
     \fromproperty #'header:opus
-  >
+  }
 }
 
 
 oddHeaderMarkup = \markup
-\fill-line <
+\fill-line {
   ""
   \fromproperty #'header:instrument
   \fromproperty #'page:page-number-string
->
+}
 
 evenHeaderMarkup = \markup
-\fill-line <
+\fill-line {
   \fromproperty #'page:page-number-string
   \fromproperty #'header:instrument
   ""
->
+}
 
 oddFooterMarkup = \markup {
-  \column <
-    \fill-line <
+  \column {
+    \fill-line {
 
       % put copyright only on pagenr. 1 
       \on-the-fly #(lambda (layout props arg)
@@ -61,8 +61,8 @@
 		     empty-stencil
 		   ))
       \fromproperty #'header:copyright
-    >
-    \fill-line <
+    }
+    \fill-line {
       % put tagline only on last page
       \on-the-fly #(lambda (layout props arg)
 		    (if (chain-assoc-get 'page:last?  props #f)
@@ -70,7 +70,7 @@
 		     empty-stencil
 		   ))
       \fromproperty #'header:tagline
-    >
-  >
+    }
+  }
 }
 
Index: scm/new-markup.scm
===================================================================
RCS file: /cvsroot/lilypond/lilypond/scm/new-markup.scm,v
retrieving revision 1.79
diff -u -r1.79 new-markup.scm
--- scm/new-markup.scm	10 Oct 2004 11:42:06 -0000	1.79
+++ scm/new-markup.scm	27 Nov 2004 09:56:17 -0000
@@ -332,6 +332,24 @@
     (and proc (cons proc (markup-command-keyword proc)))))
 
 ;;;;;;;;;;;;;;;;;;;;;;
+;;; used in parser.yy to map a list of markup commands on markup arguments
+(define-public (map-markup-command-list commands markups)
+  "`markups' being a list of markups, eg (markup1 markup2 markup3),
+and `commands' a list of commands with their scheme arguments, in reverse order,
+eg: ((italic) (raise 4) (bold)), maps the commands on each markup argument, eg:
+ ((bold (raise 4 (italic markup1)))
+  (bold (raise 4 (italic markup2)))
+  (bold (raise 4 (italic markup3))))
+"
+  (map-in-order (lambda (arg)
+                  (let ((result arg))
+                    (for-each (lambda (cmd)
+                                (set! result (append cmd (list result))))
+                              commands)
+                    result))
+                markups))
+
+;;;;;;;;;;;;;;;;;;;;;;
 ;;; markup type predicates
 
 (define (markup-function? x)
_______________________________________________
lilypond-devel mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to