Re: Markup parsing question
"Bertalan Fodor (LilyPondTool)" writes: > I thought it was part of 2.14.1 source tarballI, probably I have > changed it myself accidentally, changed this line: > > $$ = scm_list_2 (ly_lily_module_constant ("line-markup"), $1); > to > $$ = $1; > > when playing with it, as the source tarballs are correct. Oh, you are hushing the markup conspiracy by pretending to take personal blame for it. I understand. You have family and a future to look after. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Markup parsing question
I thought it was part of 2.14.1 source tarballI, probably I have changed it myself accidentally, changed this line: $$ = scm_list_2 (ly_lily_module_constant ("line-markup"), $1); to $$ = $1; when playing with it, as the source tarballs are correct. Thank you for your help, Bertalan On Wed, Oct 26, 2011 at 8:45 AM, David Kastrup wrote: > "Bertalan Fodor (LilyPondTool)" writes: > > > Thank you David, this explains me what I didn't understand. > > It turned out that somehow I was looking at a bad parser.yy. > > Interesting. Where did you get it? > > -- > David Kastrup > > > ___ > lilypond-devel mailing list > lilypond-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-devel > ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Markup parsing question
"Bertalan Fodor (LilyPondTool)" writes: > Thank you David, this explains me what I didn't understand. > It turned out that somehow I was looking at a bad parser.yy. Interesting. Where did you get it? -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Markup parsing question
Thank you David, this explains me what I didn't understand. It turned out that somehow I was looking at a bad parser.yy. Actually I'm not running/debugging the C code, but instead only reading it (and porting some of the parsing code to Java). Bertalan On Wed, Oct 26, 2011 at 7:26 AM, David Kastrup wrote: > "Bertalan Fodor (LilyPondTool)" writes: > > > 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 #"accordion.dot" > > } > > > > { c^\dot } > > -- > > > > When the markup is parsed, it will become: > > ( "q" (musicglyph "accordion.dot")) > > 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. > > You are wrong. \markuplines (soon to become \markuplist) takes this > markup list verbatim. \markup, however, wraps it in a line-markup. Put > the following after your assignment: > > #(begin) > #(display dot) > > This produces: > > (# ( q (# musicglyph-markup (layout props glyph-name)> accordion.dot))) > > > 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)) { > > > > return MARKUPLINES_IDENTIFIER; > > } > > > > 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 "accordion.dot")) 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? > > Have you actually tried your code? Works fine here. > > -- > David Kastrup > > > ___ > lilypond-devel mailing list > lilypond-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-devel > ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Markup parsing question
"Bertalan Fodor (LilyPondTool)" writes: > 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 #"accordion.dot" > } > > { c^\dot } > -- > > When the markup is parsed, it will become: > ( "q" (musicglyph "accordion.dot")) > 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. You are wrong. \markuplines (soon to become \markuplist) takes this markup list verbatim. \markup, however, wraps it in a line-markup. Put the following after your assignment: #(begin) #(display dot) This produces: (# ( q (# accordion.dot))) > 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)) { > > return MARKUPLINES_IDENTIFIER; > } > > 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 "accordion.dot")) 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? Have you actually tried your code? Works fine here. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Markup parsing question
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 #"accordion.dot" } { c^\dot } -- When the markup is parsed, it will become: ( "q" (musicglyph "accordion.dot")) 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)) { return MARKUPLINES_IDENTIFIER; } 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 "accordion.dot")) 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, Bertalan ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel