lilypond-devel
[Top][All Lists]
Advanced

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

Re: LyricText = markup?


From: Neil Puttock
Subject: Re: LyricText = markup?
Date: Sat, 15 Aug 2009 12:59:51 +0100

2009/8/15 Mark Polesky <address@hidden>:
> I know that \markup { ... } can be used within Lyrics,
> but are all LyricText objects actually stored as markup
> objects internally, even when not explicitly using the
> \markup command?

No, they're stored as scheme strings:

(lexer.ll)

 457         {LYRICS} {
 458                 /* ugr. This sux. */
 459                 string s (YYText ());
 460                 if (s == "__")
 461                         return yylval.i = EXTENDER;
 462                 if (s == "--")
 463                         return yylval.i = HYPHEN;
 464                 s = lyric_fudge (s);
 465
 466                 char c = s[s.length () - 1];
 467                 if (c == '{' ||  c == '}') // brace open is for
not confusing dumb tools.
 468                         here_input ().warning (
 469                                 _ ("Brace found at end of lyric.
Did you forget a space?"));
 470                 yylval.scm = ly_string2scm (s);
 471
 472
 473                 return LYRICS_STRING;

(parser.yy)

2099         | lyric_element optional_notemode_duration      {
2100                 if (!PARSER->lexer_->is_lyric_state ())
2101                         PARSER->parser_error (@1, _ ("have to be
in Lyric mode for lyrics"));
2102
2103                 Music *levent = MY_MAKE_MUSIC ("LyricEvent", @$);
2104                 levent->set_property ("text", $1);
2105                 levent->set_property ("duration",$2);
2106                 $$= levent->unprotect ();
2107         }

I'd imagine storing them as markup objects would be an unnecessary overhead.

Regards,
Neil




reply via email to

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