[Top][All Lists]

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

Markup parsing question

From: Bertalan Fodor (LilyPondTool)
Subject: Markup parsing question
Date: Tue, 25 Oct 2011 23:44:24 +0200

Dear LilyPond devs,

I have a problem with the LilyPond markup parsing, which prevents me to finish my new release of LilyPondTool.
Could you help me a bit on that?

I have this ly file
dot = \markup {
  "q" \musicglyph #""

{ c^\dot }

When the markup is parsed, it will become:
( "q" (musicglyph ""))
through the rules: markup_braced_list -> markup_list -> markup_top -> full_markup -> identifier_init

This really makes sense, but please correct me if I'm wrong.

Now when I'm referring to it in c^\dot, the following code is run:

if (Text_interface::is_markup (sid)) {
        return MARKUP_IDENTIFIER;
    } else if (Text_interface::is_markup_list (sid)) {

The result of this must be MARKUP_IDENTIFIER (as only those can be used as direction_reqd_event -> gen_text_def -> full_markup

But if I look in Text_interface.isMarkup, it will just do the following:

return (scm_is_string (x)
      || (scm_is_pair (x)
          && SCM_BOOL_F
          != scm_object_property (scm_car (x),
                      ly_symbol2scm ("markup-signature"))));
So my value, ( "q" (musicglyph "")) will not be considered as a markup, but instead a markup list, so I'm getting a parse error.

Can you help me where I misunderstand the code?

Thank you,


reply via email to

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