summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/sre.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/sre.py b/Lib/sre.py
index 79f12a1..fbf44a5 100644
--- a/Lib/sre.py
+++ b/Lib/sre.py
@@ -165,7 +165,7 @@ class Scanner:
p = []
for phrase, action in lexicon:
p.append("(?:%s)(?P#%d)" % (phrase, len(p)))
- self.scanner = sre.compile("|".join(p))
+ self.scanner = _compile("|".join(p))
def scan(self, string):
result = []
append = result.append
@@ -178,7 +178,7 @@ class Scanner:
j = m.end()
if i == j:
break
- action = self.lexicon[m.index][1]
+ action = self.lexicon[m.lastindex][1]
if callable(action):
self.match = match
action = action(self, m.group())