source file of the GNU LilyPond music typesetter
- (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
%token <scm> DURATION_IDENTIFIER
%token <scm> FRACTION
%token <id> IDENTIFIER
+%token <scm> CHORDNAMES CHORDNAMES_IDENTIFIER
+%type <scm> chordnames_block chordnames_list chord_scm
%token <scm> SCORE_IDENTIFIER
else
scm_hashq_set_x (tab, ly_caar (s), pt);
}
-
$$ = tab;
}
;
| embedded_scm {
$$ = $1;
}
+ | chordnames_block {
+ $$ = $1;
+ }
+ ;
+
+chordnames_block:
+ CHORDNAMES '{'
+ { THIS->lexer_->push_chord_state (); }
+ chordnames_list
+ { THIS->lexer_->pop_state (); }
+ '}'
+ {
+ $$ = $4;
+ }
;
+chordnames_list:
+ /* empty */ {
+ $$ = SCM_EOL;
+ }
+ | CHORDNAMES_IDENTIFIER chordnames_list {
+ $$ = scm_append (scm_list_2 ($1, $2));
+ }
+ | chord_scm '=' full_markup chordnames_list {
+ $$ = scm_cons (scm_cons ($1, $3), $4);
+ };
+
+chord_scm:
+ steno_tonic_pitch optional_notemode_duration chord_additions chord_subtractions chord_inversion chord_bass {
+ $$ = Chord::tonic_add_sub_to_pitches ($1, $3, $4);
+ /* junk bass and inversion for now */
+ };
+
translator_spec_block:
TRANSLATOR '{' translator_spec_body '}'
{