start_symbol:
lilypond
| EMBEDDED_LILY {
- SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::pitchnames);
} embedded_lilypond {
parser->lexer_->pop_state ();
*retval = $3;
parser->lexer_->set_identifier ($1, $3);
$$ = SCM_UNSPECIFIED;
}
- | assignment_id property_path '=' identifier_init {
- SCM path = scm_cons (scm_string_to_symbol ($1), $2);
- parser->lexer_->set_identifier (path, $4);
- $$ = SCM_UNSPECIFIED;
- }
| assignment_id '.' property_path '=' identifier_init {
SCM path = scm_cons (scm_string_to_symbol ($1), $3);
parser->lexer_->set_identifier (path, $5);
identifier_init:
identifier_init_nonumber
| number_expression
+ | symbol_list_part_bare '.' property_path
+ {
+ $$ = scm_reverse_x ($1, $3);
+ }
+ | symbol_list_part_bare ',' property_path
+ {
+ $$ = scm_reverse_x ($1, $3);
+ }
| post_event_nofinger post_events
{
$$ = scm_reverse_x ($2, SCM_EOL);
embedded_scm
|
{
- SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::pitchnames);
}
composite_music
{
{
if (scm_is_pair ($1))
$1 = scm_car ($1);
- SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::pitchnames);
} music_or_context_def
{
parser->lexer_->pop_state ();
context_modification:
WITH
{
- SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::pitchnames);
} '{' context_mod_list '}'
{
parser->lexer_->pop_state ();
| UNSIGNED
;
+symbol_list_part_bare:
+ STRING
+ {
+ $$ = try_string_variants (Lily::key_list_p, $1);
+ if (SCM_UNBNDP ($$)) {
+ parser->parser_error (@1, _("not a key"));
+ $$ = SCM_EOL;
+ } else
+ $$ = scm_reverse ($$);
+ }
+ | UNSIGNED
+ {
+ $$ = scm_list_1 ($1);
+ }
+ ;
function_arglist_nonbackup:
function_arglist_common
if (scm_is_true (scm_call_1 ($2, $4)))
// May be 3 \cm or similar
MYREPARSE (@4, $2, REAL, $4);
+ else if (scm_is_true (scm_call_1 ($2, scm_list_1 ($4))))
+ MYREPARSE (@4, $2, SYMBOL_LIST, scm_list_1 ($4));
else {
SCM d = make_duration ($4);
if (!SCM_UNBNDP (d)) {
if (scm_is_true (scm_call_1 ($2, $4)))
// May be 3 \cm or similar
MYREPARSE (@4, $2, REAL, $4);
+ else if (scm_is_true (scm_call_1 ($2, scm_list_1 ($4))))
+ MYREPARSE (@4, $2, SYMBOL_LIST, scm_list_1 ($4));
else {
SCM d = make_duration ($4);
if (!SCM_UNBNDP (d)) {
if (scm_is_true (scm_call_1 ($1, $3)))
// May be 3 \cm or similar
MYREPARSE (@3, $1, REAL, $3);
+ else if (scm_is_true (scm_call_1 ($1, scm_list_1 ($3))))
+ MYREPARSE (@3, $1, SYMBOL_LIST, scm_list_1 ($3));
else {
SCM d = make_duration ($3);
if (!SCM_UNBNDP (d)) {
mode_changing_head:
NOTEMODE {
- SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::pitchnames);
$$ = ly_symbol2scm ("notes");
}
| DRUMMODE
{
- SCM nn = parser->lexer_->lookup_identifier ("drumPitchNames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::drum_pitch_names);
$$ = ly_symbol2scm ("drums");
}
$$ = ly_symbol2scm ("figures");
}
| CHORDMODE {
- SCM nn = parser->lexer_->lookup_identifier ("chordmodifiers");
- parser->lexer_->chordmodifier_tab_ = alist_to_hashq (nn);
- nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_chord_state (nn);
+ parser->lexer_->chordmodifier_tab_ =
+ alist_to_hashq (Lily::chordmodifiers);
+ parser->lexer_->push_chord_state (Lily::pitchnames);
$$ = ly_symbol2scm ("chords");
}
mode_changing_head_with_context:
DRUMS {
- SCM nn = parser->lexer_->lookup_identifier ("drumPitchNames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::drum_pitch_names);
$$ = ly_symbol2scm ("DrumStaff");
}
$$ = ly_symbol2scm ("FiguredBass");
}
| CHORDS {
- SCM nn = parser->lexer_->lookup_identifier ("chordmodifiers");
- parser->lexer_->chordmodifier_tab_ = alist_to_hashq (nn);
- nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_chord_state (nn);
+ parser->lexer_->chordmodifier_tab_ =
+ alist_to_hashq (Lily::chordmodifiers);
+ parser->lexer_->push_chord_state (Lily::pitchnames);
$$ = ly_symbol2scm ("ChordNames");
}
| LYRICS
symbol_list_rev {
$$ = scm_reverse_x ($1, SCM_EOL);
}
- | symbol_list_rev property_path {
- $$ = scm_reverse_x ($1, $2);
- }
;
property_operation:
| UNSET symbol {
$$ = scm_list_2 (ly_symbol2scm ("unset"), $2);
}
- | OVERRIDE property_path '=' scalar {
+ | OVERRIDE revert_arg '=' scalar {
if (scm_ilength ($2) < 2) {
parser->parser_error (@2, _("bad grob property path"));
$$ = SCM_UNDEFINED;
$$ = scm_difference ($2, SCM_UNDEFINED);
}
| string
+ | symbol_list_part_bare '.' property_path
+ {
+ $$ = scm_reverse_x ($1, $3);
+ }
+ | symbol_list_part_bare ',' property_path
+ {
+ $$ = scm_reverse_x ($1, $3);
+ }
;
event_chord:
$$ = $2;
}
| SCORELINES {
- SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::pitchnames);
} '{' score_body '}' {
Score *sc = unsmob<Score> ($4);
sc->origin ()->set_spot (@$);
$$ = make_simple_markup ($1);
}
| SCORE {
- SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::pitchnames);
} '{' score_body '}' {
Score *sc = unsmob<Score> ($4);
sc->origin ()->set_spot (@$);
*destination = unsmob<Score> (sid)->clone ()->unprotect ();
return SCM_IDENTIFIER;
} else if (scm_is_pair (sid)
- && scm_is_true (Lily::key_list_p (sid))) {
+ && scm_is_pair (scm_car (sid))
+ && scm_is_true (Lily::key_p (scm_caar (sid)))) {
*destination = sid;
return LOOKUP_IDENTIFIER;
}