X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fparser.yy;h=70f35f500000a3fb516bd9541d17c17bef939723;hb=98917430c66cf99c9ac706003056396b890319ff;hp=625c107d59a41496949b1529aeeaf036304a4058;hpb=c8442db53e786c61c1b1cf82448e069a645e60ba;p=lilypond.git diff --git a/lily/parser.yy b/lily/parser.yy index 625c107d59..70f35f5000 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -372,8 +372,7 @@ If we give names, Bison complains. %token E_UNSIGNED %token UNSIGNED -%token IDENTIFIER - +%token BOOK_IDENTIFIER %token CHORDMODIFIER_PITCH %token CHORD_MODIFIER %token CONTEXT_DEF_IDENTIFIER @@ -674,6 +673,10 @@ identifier_init: $$ = $1->self_scm (); $1->unprotect (); } + | book_block { + $$ = $1->self_scm (); + $1->unprotect (); + } | output_def { $$ = $1->self_scm (); $1->unprotect (); @@ -757,6 +760,10 @@ book_body: $$->paper_->unprotect (); $$->header_ = THIS->lexer_->lookup_identifier ("$defaultheader"); } + | BOOK_IDENTIFIER { + $$ = unsmob_book ($1); + $$->set_spot (@$); + } | book_body paper_block { $$->paper_ = $2; $2->unprotect (); @@ -2714,6 +2721,9 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid) if (scm_is_string (sid)) { *destination = sid; return STRING_IDENTIFIER; + } else if (unsmob_book (sid)) { + *destination = unsmob_book (sid)->clone ()->self_scm (); + return BOOK_IDENTIFIER; } else if (scm_is_number (sid)) { *destination = sid; return NUMBER_IDENTIFIER;