diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2000-07-23 21:46:17 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2000-07-23 21:46:17 (GMT) |
commit | 8a3ebf8ca87a7d2989148d7c218974ab4235ca5d (patch) | |
tree | 1694bf24acdb9defbf770ad34e1181b84bf17428 /Modules/sre.h | |
parent | 4f1b2081e9dde910048ef679f5afe252023a4031 (diff) | |
download | cpython-8a3ebf8ca87a7d2989148d7c218974ab4235ca5d.zip cpython-8a3ebf8ca87a7d2989148d7c218974ab4235ca5d.tar.gz cpython-8a3ebf8ca87a7d2989148d7c218974ab4235ca5d.tar.bz2 |
-- SRE 0.9.6 sync. this includes:
+ added "regs" attribute
+ fixed "pos" and "endpos" attributes
+ reset "lastindex" and "lastgroup" in scanner methods
+ removed (?P#id) syntax; the "lastindex" and "lastgroup"
attributes are now always set
+ removed string module dependencies in sre_parse
+ better debugging support in sre_parse
+ various tweaks to build under 1.5.2
Diffstat (limited to 'Modules/sre.h')
-rw-r--r-- | Modules/sre.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/sre.h b/Modules/sre.h index 1c4bf68..a62b917 100644 --- a/Modules/sre.h +++ b/Modules/sre.h @@ -1,4 +1,5 @@ /* + * * Secret Labs' Regular Expression Engine * * regular expression matching engine @@ -33,6 +34,7 @@ typedef struct { typedef struct { PyObject_VAR_HEAD PyObject* string; /* link to the target string */ + PyObject* regs; /* cached list of matching spans */ PatternObject* pattern; /* link to the regex (pattern) object */ int pos, endpos; /* current target slice */ int lastindex; /* last index marker seen by the engine (-1 if none) */ @@ -60,6 +62,9 @@ typedef struct { void* beginning; /* start of original string */ void* start; /* start of current slice */ void* end; /* end of original string */ + /* attributes for the match object */ + PyObject* string; + int pos, endpos; /* character size */ int charsize; /* registers */ @@ -78,7 +83,6 @@ typedef struct { /* scanner (internal helper object) */ PyObject_HEAD PyObject* pattern; - PyObject* string; SRE_STATE state; } ScannerObject; |