[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/16] convert-ly rule for \alterbroken, \accidentalStyle, \overr
From: |
David Kastrup |
Subject: |
[PATCH 14/16] convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty |
Date: |
Tue, 9 Oct 2012 20:59:59 +0200 |
This is required since not all of the old call forms can be
automatically recognized anymore, in particular not when the
Scheme-only form #"Context.GrobName" is being used.
---
python/convertrules.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/python/convertrules.py b/python/convertrules.py
index b8921a0..3da8459 100644
--- a/python/convertrules.py
+++ b/python/convertrules.py
@@ -3398,6 +3398,19 @@ def conv (str):
matcharg + ")", r"\\shape\2\1", str)
return str
address@hidden ((2, 17, 5), r"""\accidentalStyle #'Context "style" ->
\accidentalStyle Context.style
+\alterBroken "Context.grob" -> \alterBroken Context.grob
+\overrideProperty "Context.grob" -> \overrideProperty Context.grob""")
+def conv (str):
+ str = re.sub (r'''(\\accidentalStyle\s+)#?"([-A-Za-z]+)"''',
+ r"\1\2", str)
+ str = re.sub
(r'''(\\accidentalStyle\s+)#'([A-Za-z]+)\s+#?"?([-A-Za-z]+)"?''',
+ r"\1\2.\3", str)
+ str = re.sub
(r'''(\\(?:alterBroken|overrideProperty)\s+)#?"([A-Za-z]+)\s*\.\s*([A-Za-z]+)"''',
+ r"\1\2.\3", str)
+ return str
+
+
# Guidelines to write rules (please keep this at the end of this file)
#
# - keep at most one rule per version; if several conversions should be done,
--
1.7.9.5
- Context.Grob considered as symbol list, David Kastrup, 2012/10/09
- [PATCH 08/16] Allow property and grob paths to be constructed from strings, David Kastrup, 2012/10/09
- [PATCH 07/16] Add symbol-list? predicate, David Kastrup, 2012/10/09
- [PATCH 05/16] Let \accidentalStyle detect its optional context argument by looking at its letter case, David Kastrup, 2012/10/09
- [PATCH 11/16] Replace the rather fuzzy list-or-symbol? with symbol-list-or-symbol?, David Kastrup, 2012/10/09
- [PATCH 13/16] Change \accidentalStyle to get a symbol list as argument, David Kastrup, 2012/10/09
- [PATCH 03/16] parser.yy: make is_regular_identifier match the lexer definition, David Kastrup, 2012/10/09
- [PATCH 14/16] convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty,
David Kastrup <=
- [PATCH 01/16] Assignments can't contain literal lyric music (wrong lexer mode), David Kastrup, 2012/10/09
- [PATCH 04/16] Factor SCM_IDENTIFIER out from embedded_scm_arg*, David Kastrup, 2012/10/09
- [PATCH 02/16] parser.yy: FRACTION does not require a closed expression before it, David Kastrup, 2012/10/09
- [PATCH 16/16] Let \overrideProperty accept nested properties, David Kastrup, 2012/10/09
- [PATCH 12/16] Make \alterBroken, \hide, \omit, \overrideProperty, \shape take unquoted Context.Grob specs, David Kastrup, 2012/10/09
- [PATCH 09/16] Allow the string "xxx.yyy" to parse as a symbol list, David Kastrup, 2012/10/09
- [PATCH 06/16] Allow LilyPond strings to stand in for symbols when parsing, David Kastrup, 2012/10/09
- [PATCH 15/16] Run scripts/auxiliar/update-with-convert-ly.sh, David Kastrup, 2012/10/09
- [PATCH 10/16] Add symbol-list-or-music? predicate, David Kastrup, 2012/10/09
- Re: Context.Grob considered as symbol list, Colin Campbell, 2012/10/09