mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
-- 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)
This commit is contained in:
parent
329e29198d
commit
2f2c67d7e5
4 changed files with 199 additions and 35 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue