Re: S05 question

2004-12-10 Thread John Macdonald
On Thu, Dec 09, 2004 at 11:18:34AM -0800, Larry Wall wrote: On Wed, Dec 08, 2004 at 08:24:20PM -0800, Ashley Winters wrote: : I'm still going to prefer using :=, simply as a good programming : practice. My mind sees a big difference between building a parse-tree : object and just grepping for

Re: S05 question

2004-12-09 Thread Patrick R. Michaud
On Thu, Dec 09, 2004 at 10:52:54AM +, Matthew Walton wrote: Of course, it then begs the question about word ws $foo ws number if we're thinking of parallels with qw//-like constructs, which I certainly am. I'm not quite sure what that would do, as it collides slightly with the

Re: S05 question

2004-12-09 Thread Patrick R. Michaud
On Wed, Dec 08, 2004 at 08:24:20PM -0800, Ashley Winters wrote: I was working on the (possibly misguided) assumption that there's a cost to capturing, and that perhaps agressive capturing isn't worth having on in a one-liner. Some deep part of my mind remembers $` being bad, I think. If

Re: S05 question

2004-12-09 Thread Larry Wall
On Wed, Dec 08, 2004 at 08:24:20PM -0800, Ashley Winters wrote: : I'm still going to prefer using :=, simply as a good programming : practice. My mind sees a big difference between building a parse-tree : object and just grepping for some word I want in a string. Within a : rule{} block, there is

Re: S05 question

2004-12-08 Thread Larry Wall
On Tue, Dec 07, 2004 at 10:36:53PM -0800, Larry Wall wrote: : But somehow I expect that when someone writes (foo) they probably : usually meant («foo»). If we're going to stick with the notion that foo captures and something else doesn't, I'm beginning to think that the other thing isn't «foo»

Re: S05 question

2004-12-08 Thread Austin Hastings
Larry Wall wrote: Another problem we've run into is naming if there are multiple assertions of the same name. If the capture name is just the alpha part of the assertion, then we could allow an optional number, and still recognize it as a ws: ws1 ws2 ws3 Except I can well imagine people

Re: S05 question

2004-12-08 Thread Patrick R. Michaud
On Wed, Dec 08, 2004 at 08:19:17AM -0800, Larry Wall wrote: And people would have to get used to seeing ? as non-capturing assertions: ?before ... ?after ... ?ws ?sp ?null This has a rather Ruby-esque I am a boolean feeling to it. I think I like it. It's pretty easy

Re: S05 question

2004-12-08 Thread Luke Palmer
Larry Wall writes: If we're going to stick with the notion that foo captures and something else doesn't, I'm beginning to think that the other thing isn't foo for a couple of reasons. I just sat down to say the exact same thing. I'm glad you beat me to it. And people would have to get used

Re: S05 question

2004-12-08 Thread Ashley Winters
On Wed, 8 Dec 2004 08:19:17 -0800, Larry Wall [EMAIL PROTECTED] wrote: / $bar := [ (?ident) = (\N+) ]* / You know, to be honest I don't know that I want rules in one-liners to capture by default. I certainly want them to capture in rules, though. And people would have to get used to seeing

Re: S05 question

2004-12-08 Thread Luke Palmer
Ashley Winters writes: I'm thinking capturing rules should be default in rules, where they're downright useful. Your hour/minute/second comment brings up parsing ISO time: grammar ISO8601::DateTime { rule year { \d4 } rule month { \d2 } rule day { \d2 } rule hour { \d2 }

Re: S05 question

2004-12-08 Thread Larry Wall
On Wed, Dec 08, 2004 at 11:09:30AM -0700, Patrick R. Michaud wrote: : On Wed, Dec 08, 2004 at 08:19:17AM -0800, Larry Wall wrote: : And people would have to get used to seeing ? as non-capturing assertions: : ?before ... : ?after ... : ?ws : ?sp : ?null : This has a

Re: S05 question

2004-12-07 Thread Larry Wall
On Tue, Dec 07, 2004 at 12:11:18PM -0700, Patrick R. Michaud wrote: : I'm reviewing the updated S05 (2 Dec 2004) and ran across this : in the Hypothetical Variables section: : : # Pairs of repeated captures can be bound to hashes: : : / %options := [ (ident) = (\N+) ]* / : :