]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/parser.yy
add File_name::canonicalized()
[lilypond.git] / lily / parser.yy
index eea08ee94c567d9fe7b598cd15da2537ebdf8bc8..18668dead09d914cee5e9f18031eab974ac86b3e 100644 (file)
@@ -279,6 +279,7 @@ If we give names, Bison complains.
 %token <scm> MARKUP_HEAD_SCM0_MARKUP1
 %token <scm> MARKUP_HEAD_SCM0_SCM1
 %token <scm> MARKUP_HEAD_SCM0_SCM1_MARKUP2
+%token <scm> MARKUP_HEAD_SCM0_MARKUP1_MARKUP2
 %token <scm> MARKUP_HEAD_SCM0_SCM1_SCM2
 %token <scm> MARKUP_IDENTIFIER
 %token <scm> MUSIC_FUNCTION
@@ -651,12 +652,19 @@ book_body:
                $2->unprotect ();
        }
        | book_body score_block {
-               SCM s = $2->self_scm ();
-               $$->add_score (s);
-               $2->unprotect();
+               Score *score = $2;
+               SCM proc = PARSER->lexer_->lookup_identifier ("book-score-handler");
+               scm_call_2 (proc, $$->self_scm (), score->self_scm ());
+               score->unprotect ();
+       }
+       | book_body composite_music {
+               Music *music = unsmob_music ($2);
+               SCM proc = PARSER->lexer_->lookup_identifier ("book-music-handler");
+               scm_call_3 (proc, PARSER->self_scm (), $$->self_scm (), music->self_scm ());
        }
        | book_body full_markup {
-               $$->add_score ($2);
+               SCM proc = PARSER->lexer_->lookup_identifier ("book-text-handler");
+               scm_call_2 (proc, $$->self_scm (), $2);
        }
        | book_body lilypond_header {
                $$->header_ = $2;
@@ -2286,6 +2294,9 @@ simple_markup:
        | MARKUP_HEAD_SCM0_SCM1 embedded_scm embedded_scm {
                $$ = scm_list_3 ($1, $2, $3);
        }
+       | MARKUP_HEAD_SCM0_MARKUP1_MARKUP2 embedded_scm markup markup {
+               $$ = scm_list_4 ($1, $2, $3, $4);
+       }
        | MARKUP_HEAD_EMPTY {
                $$ = scm_list_1 ($1);
        }