diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2000-08-01 21:05:41 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2000-08-01 21:05:41 (GMT) |
commit | 2f2c67d7e5934bdf96835f3c4774388b3e654314 (patch) | |
tree | 1d573a6163fe77af982c4637f809b1e468873a74 /Lib/sre_parse.py | |
parent | 329e29198dccbbb7f0e7e84c026196dbfc47befa (diff) | |
download | cpython-2f2c67d7e5934bdf96835f3c4774388b3e654314.zip cpython-2f2c67d7e5934bdf96835f3c4774388b3e654314.tar.gz cpython-2f2c67d7e5934bdf96835f3c4774388b3e654314.tar.bz2 |
-- fixed width calculations for alternations
-- fixed literal check in branch operator
(this broke test_tokenize, as reported by Mark Favas)
-- added REPEAT_ONE operator (still not enabled, though)
-- added some debugging stuff (maxlevel)
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r-- | Lib/sre_parse.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index 299aa0e..1eec3d3 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py @@ -137,12 +137,12 @@ class SubPattern: lo = hi = 0L for op, av in self.data: if op is BRANCH: - l = sys.maxint - h = 0 + i = sys.maxint + j = 0 for av in av[1]: - i, j = av.getwidth() - l = min(l, i) - h = min(h, j) + l, h = av.getwidth() + i = min(i, l) + j = min(j, h) lo = lo + i hi = hi + j elif op is CALL: |