source file of the GNU LilyPond music typesetter
- (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
or
- \repeat { \repeat } \alternative
+ \repeat { \repeat } \alternative
*/
FIXME: Bison needs to translate some of these, eg, STRING.
-*/
-
+*/
+
/* Keyword tokens with plain escaped name. */
%token ACCEPTS "\\accepts"
%token ADDLYRICS "\\addlyrics"
book_block:
BOOK '{' book_body '}' {
$$ = $3;
- unstack_paper (PARSER);
+ pop_paper (PARSER);
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("$current-book"), SCM_BOOL_F);
}
;
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 ();
- stack_paper (PARSER, $$->paper_);
+ push_paper (PARSER, $$->paper_);
$$->header_ = PARSER->lexer_->lookup_identifier ("$defaultheader");
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("$current-book"), $$->self_scm ());
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("book-output-suffix"), SCM_BOOL_F);
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("book-filename"), SCM_BOOL_F);
}
| BOOK_IDENTIFIER {
$$ = unsmob_book ($1);
$$->protect ();
$$->origin ()->set_spot (@$);
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("$current-book"), $1);
}
| book_body paper_block {
$$->paper_ = $2;
bookpart_block:
BOOKPART '{' bookpart_body '}' {
$$ = $3;
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("$current-bookpart"), SCM_BOOL_F);
}
;
{
$$ = new Book;
$$->origin ()->set_spot (@$);
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("$current-bookpart"), $$->self_scm ());
}
| BOOK_IDENTIFIER {
$$ = unsmob_book ($1);
$$->protect ();
$$->origin ()->set_spot (@$);
+ PARSER->lexer_->set_identifier (ly_symbol2scm ("$current-bookpart"), $1);
}
| bookpart_body paper_block {
$$->paper_ = $2;
EXPECT_MARKUP function_arglist full_markup {
$$ = scm_cons ($3, $2);
}
+ | EXPECT_MARKUP function_arglist simple_string {
+ $$ = scm_cons ($3, $2);
+ }
| EXPECT_SCM function_arglist function_scm_argument {
$$ = scm_cons ($3, $2);
}
| EXPECT_MARKUP function_arglist_nonmusic full_markup {
$$ = scm_cons ($3, $2);
}
+ | EXPECT_MARKUP function_arglist_nonmusic simple_string {
+ $$ = scm_cons ($3, $2);
+ }
| EXPECT_SCM function_arglist_nonmusic function_scm_argument {
$$ = scm_cons ($3, $2);
}