From 055e91829fca7b391fc309c374ba812843cf232a Mon Sep 17 00:00:00 2001
From: David Kastrup <dak@gnu.org>
Date: Sun, 13 Mar 2016 23:08:29 +0100
Subject: [PATCH] Issue 4800: Require path separators in assignments/overrides

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 | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/lily/parser.yy b/lily/parser.yy
index 5c58ed37ed..6e8b1435fa 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);
@@ -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;
-- 
2.39.5