X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fconvertrules.py;h=d46daa6577ff2b3eacbf029fa2ee17119ddc9ed2;hb=2bfeb6186a202b5e228c491ea7e44040ae75589f;hp=03670e02cc304b221be5a5730a412b948ca7a4a2;hpb=6530812dbeecdd112f4fcf94e6d362090a5af2a6;p=lilypond.git diff --git a/python/convertrules.py b/python/convertrules.py index 03670e02cc..d46daa6577 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3834,6 +3834,17 @@ def conv (str): str = re.sub (r"(\\applyOutput\s+)#'([a-zA-Z])", r"\1\2", str) return str +@rule ((2, 19, 28), r"c:5.x, c:5^x, c:sus -> c:3.5.x, c:3.5^x, c:5") +def conv (str): + str = re.sub (r":5([.^][1-9])", r":3.5\1", str) + # row back for self-defeating forms + str = re.sub (r":3\.5((?:\.[0-9]+)*\^(?:[0-9]+\.)*)3\.", r":5\1", str) + str = re.sub (r":3\.5((?:\.[0-9]+)*\^?:[0-9]+(?:\.[0-9]+)*)\.3(?![.0-9])", r":5\1", str) + str = re.sub (r":3\.5((?:\.[0-9]+)*)\^3(?=\s|\})", r":5\1", str) + str = re.sub (r":sus(?=\s|\})", ":5", str) + str = re.sub (r":1\.5(?=\s|[.^}])", r":5", 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,