summaryrefslogtreecommitdiffstats
path: root/Modules/sre.h
Commit message (Collapse)AuthorAgeFilesLines
* -- added recursion limit (currently ~10,000 levels)Fredrik Lundh2000-08-031-2/+0
| | | | | | | -- improved error messages -- factored out SRE_COUNT; the same code is used by SRE_OP_REPEAT_ONE_TEMPLATE -- minor cleanups
* -- fixed width calculations for alternationsFredrik Lundh2000-08-011-0/+2
| | | | | | | -- 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)
* SRE 0.9.8: passes the entire test suiteFredrik Lundh2000-08-011-15/+11
| | | | | | | | | -- 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
* -- SRE 0.9.6 sync. this includes:Fredrik Lundh2000-07-231-1/+5
| | | | | | | | | | | + 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
* - fixed grouping error bugFredrik Lundh2000-07-031-0/+3
| | | | - changed "group" operator to "groupref"
* - added lookbehind support (?<=pattern), (?<!pattern).Fredrik Lundh2000-07-031-8/+9
| | | | | | | | | | | | | | | | | the pattern must have a fixed width. - got rid of array-module dependencies; the match pro- gram is now stored inside the pattern object, rather than in an extra string buffer. - cleaned up a various of potential leaks, api abuses, and other minors in the engine module. - use mal's new isalnum macro, rather than my own work- around. - untabified test_sre.py. seems like I removed a couple of trailing spaces in the process...
* - experimental: added two new attributes to the match object:Fredrik Lundh2000-07-021-0/+1
| | | | | | | | "lastgroup" is the name of the last matched capturing group, "lastindex" is the index of the same group. if no group was matched, both attributes are set to None. the (?P#) feature will be removed in the next relase.
* - actually enabled charset anchors in the engine (still notFredrik Lundh2000-07-021-0/+2
| | | | | | | | | | used by the code generator) - changed max repeat value in engine (to match earlier array fix) - added experimental "which part matched?" mechanism to sre; see http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954 or python-dev for details.
* - fixed another split problemFredrik Lundh2000-06-291-2/+1
| | | | | | | | | (those semantics are weird...) - got rid of $Id$'s (for the moment, at least). in other words, there should be no more "empty" checkins. - internal: some minor cleanups.
* - fixed splitFredrik Lundh2000-06-291-3/+6
| | | | | | | | | | | | | | (test_sre still complains about split, but that's caused by the group reset bug, not split itself) - added more mark slots (should be dynamically allocated, but 100 is better than 32. and checking for the upper limit is better than overwriting the memory ;-) - internal: renamed the cursor helper class - internal: removed some bloat from sre_compile
* - renamed "tolower" hook (it happened to work withFredrik Lundh2000-06-291-1/+1
| | | | my compiler, but not on guido's box...)
* towards 1.6b1Fredrik Lundh2000-06-291-2/+16
|
* Fredrik Lundh: here's the 96.6% version of SREJeremy Hylton2000-06-011-5/+29
|
* Adding Fredrik Lundh's _sre.c module and its header files.Guido van Rossum2000-03-311-0/+38
NOTE: THIS IS VERY ROUGH ALPHA CODE!