[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parsing lyrics in a music function
From: |
David Kastrup |
Subject: |
Re: Parsing lyrics in a music function |
Date: |
Thu, 15 Sep 2011 22:46:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Michael Ellis <address@hidden> writes:
> Thanks, David. I figured it must be a parsing issue so it's nice to
> have it clarified by someone knowledgable. I like the
> ly:parser-parse-string idea. Does that function return a music object
> if the parsing is successful?
No. ly:parse-string-expression does, so that would be the smarter idea.
> Would it work to have my \lacc function massage the string so that it
> becomes
>
> "\lyricmode { This is a lyric line }"
>
> and then call ly:parser-parse-string to return the result?
Yes. With parser-parse-string, you'd do something like
"parseStringResult = \lyricmode { ... }" and then look up the parser
variable parseStringResult. ly:parse-string-expression is, of course,
much more suitable.
--
David Kastrup