[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Error String>>#copyReplacingAllRegex:with:
From: |
Isaac Gouy |
Subject: |
Re: [Help-smalltalk] Error String>>#copyReplacingAllRegex:with: |
Date: |
Mon, 6 Feb 2006 16:39:12 -0800 (PST) |
Thanks, see
http://shootout.alioth.debian.org/gp4/benchmark.php?test=regexdna&lang=gst&id=0
Any thoughts on the ackermann problem?
--- Paolo Bonzini <address@hidden> wrote:
> Isaac Gouy wrote:
>
> >Seems like
> > String>>#copyFrom:to:replacingAllRegex:with:
> >
> >expects a nil rather than a FailedMatchRegexResults ?
> >
> >See
>
>http://shootout.alioth.debian.org/gp4/benchmark.php?test=regexdna&lang=gst&id=0#log
> >
> >
> Indeed. I attach a patch; you can include the fixed methods in the
> regexdna.st file in order to run the benchmark with 2.2.
>
> Paolo
> > --- orig/examples/regex.st
> +++ mod/examples/regex.st
> @@ -515,7 +515,7 @@
> | regs beg end repl res |
> regs := self searchRegex: pattern from: from to: to.
>
> - regs notNil
> + regs matched
> ifTrue: [
> beg := regs from.
> end := regs to.
> @@ -544,7 +544,7 @@
> idx := from.
> [
> regs := self searchRegex: regex from: idx to: to.
> - regs notNil
> + regs matched
> ] whileTrue: [
> beg := regs from.
> end := regs to.
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com