develooper Front page | perl.perl5.porters | Postings from July 2009

Re: Regex inside regex

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
July 25, 2009 16:12
Subject:
Re: Regex inside regex
Message ID:
20090725231235.GE4204@iabyn.com
On Sat, Jul 25, 2009 at 06:01:03PM -0500, Craig A. Berry wrote:
> On Sat, Jul 25, 2009 at 4:35 PM, Dave Mitchell<davem@iabyn.com> wrote:
> > On Sat, Jul 25, 2009 at 10:30:26PM +0100, Dave Mitchell wrote:
> >> I'm also suspicious of the assorted
> >>
> >>     Foo *old_foo = foo;
> >>     ...
> >>     foo=old_foo
> >
> > having now caught up with other threads, I see this has already been
> > discussed!
> 
> Discussed but not necessarily settled as well as we'd liike.  I
> suppose we could try something like:
> 
>     ENTER:
>     save_item(PL_regeol);
> ...
>     CALLRUNOPS();
> ...
>     LEAVE;
> 
> but that's just $me cribbing from p. 102 of Extending and Embedding
> Perl, and doing so with a pretty superficial understanding of how the
> Perl stack works; for all I know, pushing and popping the stack
> wrapped around an inner op inside of a regex could have all sorts of
> side effects far worse than the original problem.  I have homework to
> do, but I'm not likely to get enough of it done to offer a better
> solution this weekend.

Well, its not going to be a 5.10.1 fix, so I don't think there's any
particualr hurry. If you like I could take a "proper" look at this
sometime later and try to makethe whole regex-in-regex thing robust.
That code combines two areas I;m reasonablty familiar with.

-- 
Never do today what you can put off till tomorrow.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About