, , and backtracking.

2007-09-06 Thread Jonathan Scott Duff
How do C and C differ with respect to backtracking? For instance, foobar ~~ / [a..z]+ [ ... ] /; Both sides of the C happen in parallel, so I would guess that they both match foo then stop. Please correct me if that's wrong. Were we using the procedural conjunction: foobar ~~ /

Re: , , and backtracking.

2007-09-06 Thread Jonathan Lang
Jonathan Scott Duff wrote: How do C and C differ with respect to backtracking? For instance, foobar ~~ / [a..z]+ [ ... ] /; Both sides of the C happen in parallel, so I would guess that they both match foo then stop. Please correct me if that's wrong. As written, this match would

Re: , , and backtracking.

2007-09-06 Thread Larry Wall
On Thu, Sep 06, 2007 at 01:25:12PM -0500, Patrick R. Michaud wrote: : Were we using the procedural conjunction: : : foobar ~~ / [a..z]+ [ ... ] /; : : I would guess that the LHS matches as much as it can (foobar), then : the RHS matches foo [...and then backtracks the LHS until a :

Re: , , and backtracking.

2007-09-06 Thread Geoffrey Broadwell
On Thu, 2007-09-06 at 12:37 -0700, Larry Wall wrote: Yow. ICATBW. The what now? -'f

Re: [svn:perl6-synopsis] r14447 - doc/trunk/design/syn

2007-09-06 Thread Jonathan Lang
So 'orelse' is exactly like '//', except that the result of the left side gets passed to the right side as an error message. Is there a reason to make this exception, as opposed to altering '//' to behave exactly like 'orelse' does? -- Jonathan Dataweaver Lang

Re: , , and backtracking.

2007-09-06 Thread Patrick R. Michaud
On Thu, Sep 06, 2007 at 12:37:37PM -0700, Larry Wall wrote: On Thu, Sep 06, 2007 at 01:25:12PM -0500, Patrick R. Michaud wrote: : On a somewhat similar question, what happens with a pattern : such as : : foobar ~~ / foo.+? | fooba / : : The LHS initially matches foob, but with

Re: [svn:perl6-synopsis] r14447 - doc/trunk/design/syn

2007-09-06 Thread Larry Wall
On Thu, Sep 06, 2007 at 01:40:20PM -0700, Jonathan Lang wrote: : So 'orelse' is exactly like '//', except that the result of the left : side gets passed to the right side as an error message. Is there a : reason to make this exception, as opposed to altering '//' to behave : exactly like 'orelse'

Re: , , and backtracking.

2007-09-06 Thread Larry Wall
On Thu, Sep 06, 2007 at 03:49:42PM -0700, Larry Wall wrote: : On Thu, Sep 06, 2007 at 04:02:19PM -0500, Patrick R. Michaud wrote: : : I agree. One thought I had was that perhaps non-greedy matching : : could also terminate the token prefix. : : Well, that's more or less arguing it the other way.

Re: [svn:perl6-synopsis] r14447 - doc/trunk/design/syn

2007-09-06 Thread Joe Gottman
[EMAIL PROTECTED] wrote: Author: larry Date: Thu Sep 6 09:31:16 2007 New Revision: 14447 + +C infix:andthen , proceed on success + +test1() andthen test2() + +Returns the left argument if the left argument indicates failure +(that is, if the result is undefined). Otherwise it +evaluates

[svn:perl6-synopsis] r14449 - doc/trunk/design/syn

2007-09-06 Thread larry
Author: larry Date: Thu Sep 6 17:12:02 2007 New Revision: 14449 Modified: doc/trunk/design/syn/S05.pod Log: old ?foo is now +foo to suppress capture new ?foo now is zero-width like !foo clarifications on backtracking and longest-token semantics minimal quantifiers are now considered to

Re: [svn:perl6-synopsis] r14447 - doc/trunk/design/syn

2007-09-06 Thread Jonathan Lang
Larry Wall wrote: Jonathan Lang wrote: : So 'orelse' is exactly like '//', except that the result of the left : side gets passed to the right side as an error message. Is there a : reason to make this exception, as opposed to altering '//' to behave : exactly like 'orelse' does? How 'bout,

[svn:perl6-synopsis] r14453 - doc/trunk/design/syn

2007-09-06 Thread larry
Author: larry Date: Thu Sep 6 20:56:39 2007 New Revision: 14453 Modified: doc/trunk/design/syn/S03.pod Log: fixed it right this time... Modified: doc/trunk/design/syn/S03.pod == --- doc/trunk/design/syn/S03.pod

[svn:perl6-synopsis] r14452 - doc/trunk/design/syn

2007-09-06 Thread larry
Author: larry Date: Thu Sep 6 20:50:04 2007 New Revision: 14452 Modified: doc/trunk/design/syn/S03.pod Log: extra \ found by sunnavy++ Modified: doc/trunk/design/syn/S03.pod == --- doc/trunk/design/syn/S03.pod

[svn:perl6-synopsis] r14451 - doc/trunk/design/syn

2007-09-06 Thread larry
Author: larry Date: Thu Sep 6 20:36:26 2007 New Revision: 14451 Modified: doc/trunk/design/syn/S03.pod Log: typo spotted by sunnavy++ Modified: doc/trunk/design/syn/S03.pod == --- doc/trunk/design/syn/S03.pod

Re: [svn:perl6-synopsis] r14447 - doc/trunk/design/syn

2007-09-06 Thread Larry Wall
On Thu, Sep 06, 2007 at 08:32:55PM -0400, Joe Gottman wrote: : Do the results of andthen and orelse really bind to ANY arguments of : the second block? If the second block has two parameters it makes more : sense to me for the results to bind to the first parameter and nothing : to bind to

[svn:perl6-synopsis] r14450 - doc/trunk/design/syn

2007-09-06 Thread larry
Author: larry Date: Thu Sep 6 19:29:21 2007 New Revision: 14450 Modified: doc/trunk/design/syn/S05.pod Log: typo from [particle]++ Modified: doc/trunk/design/syn/S05.pod == --- doc/trunk/design/syn/S05.pod

Re: [svn:perl6-synopsis] r14449 - doc/trunk/design/syn

2007-09-06 Thread jerry gay
On 9/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: @@ -1254,6 +1273,17 @@ =item * +A leading C? indicates a positive zero-width assertion, and like C! +merely reparses the rest of the assertion recursively as if the C? +were not there. In addition to forcing zero-width, it also

Re: , , and backtracking.

2007-09-06 Thread Larry Wall
On Thu, Sep 06, 2007 at 04:02:19PM -0500, Patrick R. Michaud wrote: : I agree. One thought I had was that perhaps non-greedy matching : could also terminate the token prefix. Well, that's more or less arguing it the other way. It kind of assumes your fooba-ish arguments are smart enough to test