mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
SRE 0.9.8: passes the entire test suite
-- reverted REPEAT operator to use "repeat context" strategy (from 0.8.X), but done right this time. -- got rid of backtracking stack; use nested SRE_MATCH calls instead (should probably put it back again in 0.9.9 ;-) -- properly reset state in scanner mode -- don't use aggressive inlining by default
This commit is contained in:
parent
19c6afb42b
commit
29c4ba9ada
7 changed files with 391 additions and 557 deletions
|
@ -5,9 +5,7 @@
|
|||
#
|
||||
# Copyright (c) 1998-2000 by Secret Labs AB. All rights reserved.
|
||||
#
|
||||
# Portions of this engine have been developed in cooperation with
|
||||
# CNRI. Hewlett-Packard provided funding for 2.0 integration and
|
||||
# other compatibility work.
|
||||
# See the sre.py file for information on usage and redistribution.
|
||||
#
|
||||
|
||||
import string, sys
|
||||
|
@ -536,8 +534,6 @@ def _parse(source, state):
|
|||
group = state.getgroup(name)
|
||||
p = _parse_sub(source, state)
|
||||
subpattern.append((SUBPATTERN, (group, p)))
|
||||
if group is not None:
|
||||
p.append((INDEX, group))
|
||||
else:
|
||||
while 1:
|
||||
char = source.get()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue