Lisp HUG Maillist Archive

stack overflow with regular expressions

Hi.

When i try to use the pregexp regular expression library with Lispworks 
Personal Edition 4.2.0 for anything other than trivial matches, I get an 
error, either "Stack overflow (stack size 16000)" or "recursive stack 
overflow".   The same code works fine in CLISP.

Can someone tell me:
(1) whether or not i'm doing something wrong
(2) if this is a limitation of Lispworks
(3) if its a limitation of the personal edition
(4) if there is anything I can do about it?


Thanks.
larry

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


Re: stack overflow with regular expressions

On Tue, 2003-07-01 at 19:32, Larry White wrote:
> Hi.
> 
> When i try to use the pregexp regular expression library with Lispworks 
> Personal Edition 4.2.0 for anything other than trivial matches, I get an 
> error, either "Stack overflow (stack size 16000)" or "recursive stack 
> overflow".   The same code works fine in CLISP.
> 
> Can someone tell me:
> (1) whether or not i'm doing something wrong
> (2) if this is a limitation of Lispworks
> (3) if its a limitation of the personal edition
> (4) if there is anything I can do about it?
> 

I think I had the same problem some time ago. 
Did you compile pregexp ?

-- 
Thibault Langlois <tl@di.fc.ul.pt>
FCUL/DI


Re: stack overflow with regular expressions

"Larry White" <ljw1001@hotmail.com> writes:

> When i try to use the pregexp regular expression library with
> Lispworks Personal Edition 4.2.0 for anything other than trivial
> matches, I get an error, either "Stack overflow (stack size 16000)"
> or "recursive stack overflow".  The same code works fine in CLISP.
> 
> Can someone tell me:
> (1) whether or not i'm doing something wrong
> (2) if this is a limitation of Lispworks
> (3) if its a limitation of the personal edition
> (4) if there is anything I can do about it?

You might be able to extend the stack, see

  <http://www1.xanalys.com/support/lisp/kbase.nsf/51fe6e1cdfe748a180256639005a2ba9/f35acd8100dfd9ba8525670b0074a8d6?OpenDocument>

for an explanation. Don't know if this works with the Personal
Edition, though.

However, as you might know, pregexp is a CL program that was
auto-generated from a Scheme program and thus relies on tail-call
optimization (or whatever they call it nowadays). Maybe you'll have
more luck with "real" Common Lisp regex libraries like the one from
Michael Parker or (shameless self-plug) CL-PPCRE. See

  <http://www.cliki.net/Regular%20Expression>

Good luck,
Edi.


Re: stack overflow with regular expressions

Unable to parse email body. Email id is 1167

Updated at: 2020-12-10 09:00 UTC