diff options
author | David Kastrup <dak@gnu.org> | 2015-09-20 16:40:47 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2015-09-26 12:29:10 +0200 |
commit | 2bfeb6186a202b5e228c491ea7e44040ae75589f (patch) | |
tree | afd15098e0367e03856d2921d3d54c8065cb8d4d /python | |
parent | 6530812dbeecdd112f4fcf94e6d362090a5af2a6 (diff) |
Issue 4614/3: convert-ly rule c:5.x, c:5^x, c:sus -> c:3.5.x, c:3.5^x, c:5
Diffstat (limited to 'python')
-rw-r--r-- | python/convertrules.py | 11 |
1 files changed, 11 insertions, 0 deletions
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, |