mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +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
|
@ -6,9 +6,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.
|
||||
#
|
||||
|
||||
# should this really be here?
|
||||
|
@ -33,15 +31,15 @@ GROUPREF = "groupref"
|
|||
GROUPREF_IGNORE = "groupref_ignore"
|
||||
IN = "in"
|
||||
IN_IGNORE = "in_ignore"
|
||||
INDEX = "index"
|
||||
INFO = "info"
|
||||
JUMP = "jump"
|
||||
LITERAL = "literal"
|
||||
LITERAL_IGNORE = "literal_ignore"
|
||||
MARK = "mark"
|
||||
MAX_REPEAT = "max_repeat"
|
||||
MAX_REPEAT_ONE = "max_repeat_one"
|
||||
MAX_UNTIL = "max_until"
|
||||
MIN_REPEAT = "min_repeat"
|
||||
MIN_UNTIL = "min_until"
|
||||
NEGATE = "negate"
|
||||
NOT_LITERAL = "not_literal"
|
||||
NOT_LITERAL_IGNORE = "not_literal_ignore"
|
||||
|
@ -91,19 +89,19 @@ OPCODES = [
|
|||
CATEGORY,
|
||||
CHARSET,
|
||||
GROUPREF, GROUPREF_IGNORE,
|
||||
INDEX,
|
||||
IN, IN_IGNORE,
|
||||
INFO,
|
||||
JUMP,
|
||||
LITERAL, LITERAL_IGNORE,
|
||||
MARK,
|
||||
MAX_REPEAT,
|
||||
MAX_REPEAT_ONE,
|
||||
MIN_REPEAT,
|
||||
MAX_UNTIL,
|
||||
MIN_UNTIL,
|
||||
NOT_LITERAL, NOT_LITERAL_IGNORE,
|
||||
NEGATE,
|
||||
RANGE,
|
||||
REPEAT
|
||||
REPEAT,
|
||||
REPEAT_ONE,
|
||||
SUBPATTERN
|
||||
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue