/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
%token <scm> MARKUP_FUNCTION
%token <scm> MARKUP_LIST_FUNCTION
%token <scm> MARKUP_IDENTIFIER
+%token <scm> MARKUPLINES_IDENTIFIER
%token <scm> MUSIC_FUNCTION
%token <scm> MUSIC_IDENTIFIER
%token <scm> NOTENAME_PITCH
%type <scm> step_number
%type <scm> step_numbers
%type <scm> string
+%type <scm> tempo_range
%type <score> score_block
%type <score> score_body
| full_markup {
$$ = $1;
}
+ | full_markup_list {
+ $$ = $1;
+ }
| DIGIT {
$$ = scm_from_int ($1);
}
;
tempo_event:
- TEMPO steno_duration '=' bare_unsigned {
- $$ = MAKE_SYNTAX ("tempo", @$, SCM_BOOL_F, $2, scm_from_int ($4));
- }
- | TEMPO string steno_duration '=' bare_unsigned {
- $$ = MAKE_SYNTAX ("tempo", @$, make_simple_markup($2), $3, scm_from_int ($5));
+ TEMPO steno_duration '=' tempo_range {
+ $$ = MAKE_SYNTAX ("tempo", @$, SCM_EOL, $2, $4);
}
- | TEMPO full_markup steno_duration '=' bare_unsigned {
- $$ = MAKE_SYNTAX ("tempo", @$, $2, $3, scm_from_int ($5));
+ | TEMPO scalar steno_duration '=' tempo_range {
+ $$ = MAKE_SYNTAX ("tempo", @$, $2, $3, $5);
}
- | TEMPO string {
- $$ = MAKE_SYNTAX ("tempoText", @$, make_simple_markup($2) );
- }
- | TEMPO full_markup {
- $$ = MAKE_SYNTAX ("tempoText", @$, $2 );
+ | TEMPO scalar {
+ $$ = MAKE_SYNTAX ("tempo", @$, $2);
}
;
$$ = scm_cons ($3, SCM_EOL);
}
+ | ADDLYRICS {
+ PARSER->lexer_->push_lyric_state (); }
+ MUSIC_IDENTIFIER {
+ PARSER->lexer_->pop_state ();
+ $$ = scm_cons ($3, SCM_EOL);
+ }
| new_lyrics ADDLYRICS {
PARSER->lexer_->push_lyric_state ();
} grouped_music_list {
PARSER->lexer_->pop_state ();
$$ = scm_cons ($4, $1);
}
+ | new_lyrics ADDLYRICS {
+ PARSER->lexer_->push_lyric_state ();
+ } MUSIC_IDENTIFIER {
+ PARSER->lexer_->pop_state ();
+ $$ = scm_cons ($4, $1);
+ }
;
re_rhythmed_music:
grouped_music_list new_lyrics {
$$ = MAKE_SYNTAX ("add-lyrics", @$, $1, scm_reverse_x ($2, SCM_EOL));
}
+ | MUSIC_IDENTIFIER new_lyrics {
+ $$ = MAKE_SYNTAX ("add-lyrics", @$, $1, scm_reverse_x ($2, SCM_EOL));
+ }
| LYRICSTO simple_string {
PARSER->lexer_->push_lyric_state ();
} music {
direction_less_event {
$$ = $1;
}
- | '-' music_function_event {
+ | script_dir music_function_event {
$$ = run_music_function (PARSER, $2);
+ if ($1)
+ {
+ unsmob_music ($$)->set_property ("direction", scm_from_int ($1));
+ }
}
| HYPHEN {
if (!PARSER->lexer_->is_lyric_state ())
}
;
+tempo_range:
+ bare_unsigned {
+ $$ = scm_from_int ($1);
+ }
+ | bare_unsigned '~' bare_unsigned {
+ $$ = scm_cons (scm_from_int ($1), scm_from_int ($3));
+ }
+ ;
+
/*
UTILITIES
}
;
-
exclamations:
{ $$ = 0; }
| exclamations '!' { $$ ++; }
;
full_markup_list:
- MARKUPLINES
+ MARKUPLINES_IDENTIFIER {
+ $$ = $1;
+ }
+ | MARKUPLINES
{ PARSER->lexer_->push_markup_state (); }
markup_list {
$$ = $3;
;
markup_list:
- markup_composed_list {
+ MARKUPLINES_IDENTIFIER {
+ $$ = $1;
+ }
+ | markup_composed_list {
$$ = $1;
}
| markup_braced_list {
if (is_lyric_state ())
return LYRIC_MARKUP_IDENTIFIER;
return MARKUP_IDENTIFIER;
+ } else if (Text_interface::is_markup_list (sid)) {
+ *destination = sid;
+ return MARKUPLINES_IDENTIFIER;
}
return -1;