develooper Front page | perl.perl6.language | Postings from May 2005

Re: Nested captures

From:
mark.a.biggar
Date:
May 11, 2005 10:58
Subject:
Re: Nested captures
Message ID:
051120051650.9684.428237D900056053000025D422058891169D0E0909070DD20ED2059D0E03@comcast.net
> On Wed, May 11, 2005 at 05:48:59PM +1000, Damian Conway wrote:
> : But that's only the opinion of one(@Larry), not of $Larry.
> 
> Let's go 0-based and make $0 =:= $/[0] so that $/[] is all the parens.
> Our old $0 (P5's $&) could be $<> instead, short for $<MATCH> or some
> such.

Why can't bare $/ just striingify to the whole match?
 
> It's already the case that p5-to-p6 is going to have a *wonderful*
> time translating $7 to $1[2][0]...

Not a real problem.  Patrick has already said that his plan is that :p5 REs will return a match object with an already flattened match list using perl5 left peren counting semantics.

> I wonder how much call there will be for a rule option that uses P6
> syntax but P5 paren binding with "push" semantics.

Just add a :flat 

--
Mark Biggar
mark@biggar.org
mark.a.biggar@comcast.net
mbiggar@paypal.com






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