Commit Graph

13 Commits

Author SHA1 Message Date
Fredrik Lundh ebc37b28fa -- properly reset groups in findall (bug #117612)
-- fixed negative lookbehind to work correctly at the beginning
of the target string (bug #117242)

-- improved syntax check; you can no longer refer to a group
inside itself (bug #110866)
2000-10-28 19:30:41 +00:00
Fredrik Lundh 19f977ba40 - don't hang if group id is followed by whitespace (closes bug #114660) 2000-09-24 14:46:23 +00:00
Fredrik Lundh 03dd010b4f updated SRE test suite (fixes PEP223 problem, shows syntax errors) 2000-09-03 10:43:16 +00:00
Tim Peters acee48628d Repair failing test_sre.py.
This was a funny one!  The test very subtly relied on 1.5.2's
behavior of treating "\x%" as "\x%", i.e. ignoring that was an
\x escape that didn't make sense.  But /F implemented PEP 223,
which causes 2.0 to raise an exception on the bad escape.
Fixed by merely making the 3 such strings of this kind into
raw strings.
2000-09-03 08:15:19 +00:00
Fredrik Lundh 510c97ba2f return -1 for undefined groups (as implemented in 1.5.2) instead of
None (as documented) from start/end/span.  closes bug #113254
2000-09-02 16:36:57 +00:00
Fredrik Lundh 143328ba63 -- tightened up parsing of octal numbers
-- improved the SRE test harness: don't use asserts, test a few more
   things (including more boundary conditions)
2000-09-02 11:03:34 +00:00
Fredrik Lundh 5810064476 -- changed findall to return empty strings instead of None
for undefined groups
2000-08-09 09:14:35 +00:00
Fredrik Lundh 96ab46529b -- added recursion limit (currently ~10,000 levels)
-- improved error messages
-- factored out SRE_COUNT; the same code is used by
   SRE_OP_REPEAT_ONE_TEMPLATE
-- minor cleanups
2000-08-03 16:29:50 +00:00
Fredrik Lundh 067bebfe2d -- SRE 0.9.8: now that the bug is fixed, I might as well enable
the test again...
2000-08-01 13:16:55 +00:00
Fredrik Lundh c2ed621d75 -- SRE 0.9.8: updated test scripts 2000-08-01 13:01:43 +00:00
Fredrik Lundh 6f01398236 - added lookbehind support (?<=pattern), (?<!pattern).
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...
2000-07-03 18:44:21 +00:00
Fredrik Lundh 90a0791322 - pedantic: make sure "python -t" doesn't complain... 2000-06-30 07:50:59 +00:00
Fredrik Lundh df02d0b3f0 - fixed default value handling in group/groupdict
- added test suite
2000-06-30 07:08:20 +00:00