X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fparser.yy;h=b8849e8f4acaa79447fe0a81daa4d6e0d8a218d3;hb=16981f14a64fef5873300150da1b592139ee77b7;hp=5c58ed37ed6ff3945e394e57b0c8848d522de054;hpb=34917fefd1167f963c44fbcf47ab7f4184fc4cdc;p=lilypond.git diff --git a/lily/parser.yy b/lily/parser.yy index 5c58ed37ed..b8849e8f4a 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -658,11 +658,6 @@ assignment: 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); @@ -679,6 +674,14 @@ assignment: 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); @@ -1731,6 +1734,21 @@ symbol_list_element: | 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 @@ -2579,9 +2597,6 @@ property_path: symbol_list_rev { $$ = scm_reverse_x ($1, SCM_EOL); } - | symbol_list_rev property_path { - $$ = scm_reverse_x ($1, $2); - } ; property_operation: @@ -2591,7 +2606,7 @@ 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; @@ -2891,6 +2906,14 @@ scalar: $$ = 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: @@ -4056,7 +4079,8 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid) *destination = unsmob (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; }