diff --git a/scripts/codemap.py b/scripts/codemap.py index fb150ba6..6692ddba 100755 --- a/scripts/codemap.py +++ b/scripts/codemap.py @@ -480,10 +480,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -499,10 +499,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v) @@ -569,10 +573,10 @@ def psplit(s, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') s_ = [] i = start or 0 diff --git a/scripts/codemapsvg.py b/scripts/codemapsvg.py index 3f747178..8f99201a 100755 --- a/scripts/codemapsvg.py +++ b/scripts/codemapsvg.py @@ -342,10 +342,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -361,10 +361,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v) diff --git a/scripts/csv.py b/scripts/csv.py index 6fe28d1d..8887c25f 100755 --- a/scripts/csv.py +++ b/scripts/csv.py @@ -1718,10 +1718,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -1737,10 +1737,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v) diff --git a/scripts/dbgbmap.py b/scripts/dbgbmap.py index cea6ed24..19ba7b87 100755 --- a/scripts/dbgbmap.py +++ b/scripts/dbgbmap.py @@ -4213,10 +4213,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -4232,10 +4232,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v) @@ -4302,10 +4306,10 @@ def psplit(s, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') s_ = [] i = start or 0 diff --git a/scripts/dbgbmapsvg.py b/scripts/dbgbmapsvg.py index 684c8890..6ac1f728 100755 --- a/scripts/dbgbmapsvg.py +++ b/scripts/dbgbmapsvg.py @@ -4102,10 +4102,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -4121,10 +4121,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v) diff --git a/scripts/dbgtrace.py b/scripts/dbgtrace.py index ab22cfcd..40797cd9 100755 --- a/scripts/dbgtrace.py +++ b/scripts/dbgtrace.py @@ -488,10 +488,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -507,10 +507,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v) @@ -577,10 +581,10 @@ def psplit(s, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') s_ = [] i = start or 0 diff --git a/scripts/plot.py b/scripts/plot.py index 2489d78f..5c2a17ea 100755 --- a/scripts/plot.py +++ b/scripts/plot.py @@ -646,10 +646,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -665,10 +665,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v) @@ -735,10 +739,10 @@ def psplit(s, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') s_ = [] i = start or 0 diff --git a/scripts/plotmpl.py b/scripts/plotmpl.py index acc8d0ea..a6acb3fe 100755 --- a/scripts/plotmpl.py +++ b/scripts/plotmpl.py @@ -530,10 +530,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -549,10 +549,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v) diff --git a/scripts/treemap.py b/scripts/treemap.py index fe4a5241..ea5a2f4e 100755 --- a/scripts/treemap.py +++ b/scripts/treemap.py @@ -567,10 +567,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -586,10 +586,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v) @@ -656,10 +660,10 @@ def psplit(s, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') s_ = [] i = start or 0 diff --git a/scripts/treemapsvg.py b/scripts/treemapsvg.py index 7f754311..f0f263c5 100755 --- a/scripts/treemapsvg.py +++ b/scripts/treemapsvg.py @@ -428,10 +428,10 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): '|' 'u....' '|' 'U........' '|' '\((?P[^)]*)\)' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' '|' '\{' '|' '\}' - '(?P[+\- #0-9\.]*[siIdboxXfFeEgG])' ')') + '(?P[<^>+\- #0-9\.]*[siIdboxXfFeEgG])' ')') def format(f, v): if f[-1] in 'dboxX': @@ -447,10 +447,14 @@ def punescape(s, attrs=None, start=None, end=None, submatch=None): f = f.replace('i', 's').replace('I', 's') if '+' in f and not v.startswith('-'): v = '+'+v - f = f.replace('+', '').replace('-', '') + f = f.replace('+', '') else: - f = ('<' if '-' in f else '>') + f.replace('-', '') v = str(v) + + if '-' in f: + f = '<' + f.replace('-', '') + elif not any(d in f for d in '<^>'): + f = '>' + f # note we need Python's new format syntax for binary return ('{:%s}' % f).format(v)