Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-07 Thread Bart Lateur
On 06 Sep 2000 18:04:18 -0700, Randal L. Schwartz wrote: I think the -1 indexing for "end of array" came from there. Or at least, it was in Perl long before it was in Python, and it was in Icon before it was in Perl, so I had always presumed Larry had seen Icon. Larry? Do not assume that these

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-07 Thread Jarkko Hietaniemi
On Thu, Sep 07, 2000 at 03:42:01PM -0400, Eric Roode wrote: Richard Proctor wrote: I think what is needed is something along the line of : $re = qz{ '(' \$re ')' | \$re \$re | [^()]+ }; Where qz is some hypothetical

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-07 Thread Mark-Jason Dominus
I think what is needed is something along the line of : Joe McMahon and I are working on something along these lines.

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-07 Thread Richard Proctor
On Wed 06 Sep, Mark-Jason Dominus wrote: I've been thinking the same thing. It seems to me that the attempts to shoehorn parsers into regex syntax have either been unsuccessful (yielding an underpowered extension) or illegible or both. SNOBOL: parenstring = '(' *parenstring ')'

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-07 Thread Eric Roode
Richard Proctor wrote: I think what is needed is something along the line of : $re = qz{ '(' \$re ')' | \$re \$re | [^()]+ }; Where qz is some hypothetical new quoting syntax Well, we currently have qr{}, and ??{} does

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-07 Thread Jonathan Scott Duff
On Thu, Sep 07, 2000 at 08:20:42PM +0100, Richard Proctor wrote: I think what is needed is something along the line of : $re = qz{ '(' \$re ')' | \$re \$re | [^()]+ }; Where qz is some hypothetical new quoting syntax

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-06 Thread David Corbin
Nathan Wiger wrote: It would be useful (and increasingly more common) to be able to match qr|\s*(\w+)([^]*)| to qr|\s*/\1\s*|, and handle the case where those can nest as well. Something like listmatch this with list /list not this but /list this. I suspect

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-06 Thread Randal L. Schwartz
"Mark-Jason" == Mark-Jason Dominus [EMAIL PROTECTED] writes: Mark-Jason I have some ideas about how to do this, and I will try to Mark-Jason write up an RFC this week. "You want Icon, you know where to find it..." :) But yes, a way that allows programmatic backtracking sort of "inside out"

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-06 Thread Jarkko Hietaniemi
On Wed, Sep 06, 2000 at 03:47:57PM -0700, Randal L. Schwartz wrote: "Mark-Jason" == Mark-Jason Dominus [EMAIL PROTECTED] writes: Mark-Jason I have some ideas about how to do this, and I will try to Mark-Jason write up an RFC this week. "You want Icon, you know where to find it..." :)

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-06 Thread Randal L. Schwartz
"Jarkko" == Jarkko Hietaniemi [EMAIL PROTECTED] writes: "You want Icon, you know where to find it..." :) Jarkko Hey, it's one of the few languages we haven't yet stolen a Jarkko neat feature or few from... (I don't really count the few Jarkko regex thingies as full-fledged stealing, more

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-06 Thread Tom Christiansen
I am working on an RFC to allow boolean logic ( and || and !) to apply a number of patterns to the same substring to allow easier mining of information out of such constructs. What, you don't like: :-) $pattern = $conjunction eq "AND" ? join('' = map { "(?=.*$_)" }

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-06 Thread Mark-Jason Dominus
...My point is that I think we're approaching this the wrong way. We're trying to apply more and more parser power into what classically has been the lexer / tokenizer, namely our beloved regular-expression engine. I've been thinking the same thing. It seems to me that the attempts to

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-06 Thread Nathan Wiger
David Corbin wrote: m:(?['list' = '/list').*(?]): or more generically m:(?['\w+' = '/\1').*(?]): I think these are good; but I do also like the idea of "automatic reversing" by default, since that's a common operation. Let's combine the ideas, as Richard suggests. How about: 1. When

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-06 Thread Tom Christiansen
...My point is that I think we're approaching this the wrong way. We're trying to apply more and more parser power into what classically has been the lexer / tokenizer, namely our beloved regular-expression engine. A great deal of string processing is possible with perls enhanced NFA engine,