]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/parser.yy
* lily/include/object-key-undumper.hh (Module): new file.
[lilypond.git] / lily / parser.yy
index 3b2b4ec8eaf0617fb609a6810d9f5e5601e1ce07..9439c6f3bc8dd664078175817f1f746e353f4747 100644 (file)
@@ -299,6 +299,7 @@ or
 %token NAME
 %token NEWCONTEXT
 %token NOTEMODE
+%token OBJECTID        
 %token OCTAVE
 %token ONCE
 %token OVERRIDE SET REVERT
@@ -445,6 +446,7 @@ or
 %type <scm>    markup markup_line markup_list markup_list_body full_markup
 %type <scm>    mode_changing_head
 %type <scm>    mode_changing_head_with_context
+%type <scm>     object_id_setting 
 
 %type <score>  score_block score_body
 
@@ -471,6 +473,11 @@ lilypond:  /* empty */
        }
        ;
 
+
+object_id_setting:
+       OBJECTID STRING { $$ = $2; } 
+       ;
+
 toplevel_expression:
        lilypond_header {
                THIS->lexer_->set_identifier (ly_symbol2scm ("$globalheader"), $1);
@@ -672,8 +679,7 @@ book_body:
        }
        | book_body score_block {
                Score *score = $2;
-               $$->scores_.push (score);
-               scm_gc_unprotect_object (score->self_scm ());
+               $$->add_score (score);
        }
        | book_body lilypond_header {
                $$->header_ = $2;
@@ -682,6 +688,9 @@ book_body:
                $$->paper_ = 0;
                $$->scores_.clear();
        }
+       | book_body object_id_setting {
+               $$->user_key_ = ly_scm2string ($2);
+       }
        ;
 
 score_block:
@@ -704,6 +713,9 @@ score_body:
                $$ = new Score ( *unsmob_score ($1));
                $$->set_spot (THIS->here_input ());
        }
+       | score_body object_id_setting {
+               $$->user_key_ = ly_scm2string ($2);
+       }
        | score_body Music {
                SCM m = $2->self_scm ();
                scm_gc_unprotect_object (m);