A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-February/033740.html below:

[Python-Dev] Re: re recursion limit

[Python-Dev] Re: re recursion limit [Python-Dev] Re: re recursion limitA.M. Kuchling amk@amk.ca
Wed, 26 Feb 2003 16:57:45 -0500
Gary Herron wrote:
> What to do about RE's that hit the recursion limit? 

I haven't had a chance to look at the SRE code in detail yet, but expect 
that the problem is that the straightforward way to implement .*? is 
with a C function call.  PCRE also implemented it with a function call; 
Python avoided the limit by forking PCRE and adding a heap-allocated 
stack and pushing states onto the stack instead of recursing, which is 
why pre avoids the
recursion limit (well, until you fill up your entire heap).

The problem is that the patches to do this were extensive and ugly.
Maybe just fixing the problem for .* will be sufficient.

Incidentally, before we go making lots of changes, has anyone actually 
pinged Fredrik about the SRE code?  His usual approach with software is 
to process patches and TODO items every N months; maybe he just hasn't 
gotten around to looking at the SRE backlog?

--amk                                                    (www.amk.ca)
KENT: Thou whoreson zed! thou unnecessary letter!
       -- _King Lear_, II, ii





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4