]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4800: Require path separators in assignments/overrides
authorDavid Kastrup <dak@gnu.org>
Sun, 13 Mar 2016 22:08:29 +0000 (23:08 +0100)
committerDavid Kastrup <dak@gnu.org>
Tue, 22 Mar 2016 10:38:44 +0000 (11:38 +0100)
Historical assignments/overrides like
Variable #'x #'y = 7
or
\override Glissando.bound-details #'left #'Y = #3
without dots between the various path components do not match the syntax of
\revert and music functions or other uses.  Disallow the non-separation
by '.' or ',' of such path components.

lily/parser.yy

index 5c58ed37ed6ff3945e394e57b0c8848d522de054..6e8b1435fa9e79c050e435223aeb4ab53b77bb66 100644 (file)
@@ -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);
@@ -2579,9 +2574,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 +2583,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;