]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/parser.yy
Run `make grand-replace'.
[lilypond.git] / lily / parser.yy
index 213f3ec53967486e6ea63e8563f44d7e20e5c603..83eaf89ec235912c7bccb69ef2b44dd9bc6b3943 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
                  Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
@@ -654,6 +654,7 @@ context_def_spec_body:
 book_block:
        BOOK '{' book_body '}'  {
                $$ = $3;
+               pop_paper (PARSER);
        }
        ;
 
@@ -663,9 +664,11 @@ book_block:
 book_body:
        {
                $$ = new Book;
+               init_papers (PARSER);
                $$->origin ()->set_spot (@$);
                $$->paper_ = dynamic_cast<Output_def*> (unsmob_output_def (PARSER->lexer_->lookup_identifier ("$defaultpaper"))->clone ());
                $$->paper_->unprotect ();
+               push_paper (PARSER, $$->paper_);
                $$->header_ = PARSER->lexer_->lookup_identifier ("$defaultheader"); 
        }
        | BOOK_IDENTIFIER {
@@ -676,6 +679,7 @@ book_body:
        | book_body paper_block {
                $$->paper_ = $2;
                $2->unprotect ();
+               set_paper (PARSER, $2);
        }
        | book_body bookpart_block {
                Book *bookpart = $2;