:syntax (was: \x{123a 123b 123c})

2005-11-23 Thread Damian Conway
Larry wrote: But the language in the following lexical scope is a constant, so what can :syntax($foo) possibly mean? [Wait, this is Damian I'm talking to.] Nevermind, don't answer that... Too late! ;-) Regex syntaxes already are a twisty maze of variations, mostly alike. I can easily

Re: :syntax (was: \x{123a 123b 123c})

2005-11-23 Thread Luke Palmer
On 11/22/05, Damian Conway [EMAIL PROTECTED] wrote: :syntaxPOSIX :syntaxgrep :syntaxegrep :syntaxvim :syntaxSnobol :syntaxGoogle Aren't we providing an interface to define your own regex modifiers? All of these can easily be mapped into Perl 6 patterns, so...

Re: \x{123a 123b 123c}

2005-11-22 Thread Patrick R. Michaud
On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote: : There's also sp, unless someone redefines the sp subrule. But you can't use sp in a character class. Well, that is, unless you write it: +[ a..z ]+sp or some such. Maybe that's good enough. Er, that's now +[ a..z ]+sp,

Re: \x{123a 123b 123c}

2005-11-22 Thread Larry Wall
On Mon, Nov 21, 2005 at 11:25:20AM -0600, Patrick R. Michaud wrote: : On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote: : : There's also sp, unless someone redefines the sp subrule. : : But you can't use sp in a character class. Well, that is, unless : you write it: : : +[

Re: \x{123a 123b 123c}

2005-11-22 Thread Patrick R. Michaud
On Tue, Nov 22, 2005 at 07:52:24AM -0800, Larry Wall wrote: I think we'll leave both _ and \_ meaning the same thing, just to avoid that confusion path [...] Yay! : Whatever shortcuts we introduce, I'll be happy if we can just : rule that backslash+space (i.e., \ ) is a literal space :

Re: \x{123a 123b 123c}

2005-11-22 Thread Damian Conway
Patrick wrote: Since we already have :perl5, I'd think that we'd want globbing to be something like rule jpeg :i :glob /*.jp{e,}g/ or, for something intra-rule-ish: m :w / mv (:glob *.c)+ dir / Here! Here! And perhaps we'd want a general form for specifying other pattern

Re: \x{123a 123b 123c}

2005-11-22 Thread Larry Wall
On Tue, Nov 22, 2005 at 08:19:04PM +1100, Damian Conway wrote: : And perhaps we'd want a general form for specifying other : pattern syntaxes; i.e., :perl5 and :glob are shortcuts for : :syntax('perl5') and :syntax('glob') or something like that. : : Agreed. But the language in the following

Re: \x{123a 123b 123c}

2005-11-22 Thread Dave Whipp
Larry Wall wrote: And there aren't that many regexish languages anyway. So I think :syntax is relatively useless except for documentation, and in practice people will almost always omit it, which makes it even less useful, and pretty nearly kicks it over into the category of multiplied

Re: \x{123a 123b 123c}

2005-11-22 Thread Larry Wall
On Tue, Nov 22, 2005 at 09:46:59AM -0800, Dave Whipp wrote: : Larry Wall wrote: : : And there aren't that many regexish languages anyway. So I think :syntax : is relatively useless except for documentation, and in practice people : will almost always omit it, which makes it even less useful, and

Re: \x{123a 123b 123c}

2005-11-22 Thread Patrick R. Michaud
On Tue, Nov 22, 2005 at 10:30:20AM -0800, Larry Wall wrote: On Tue, Nov 22, 2005 at 09:46:59AM -0800, Dave Whipp wrote: : Larry Wall wrote: : : And there aren't that many regexish languages anyway. So I think :syntax : is relatively useless except for documentation, and in practice people

Re: \x{123a 123b 123c}

2005-11-22 Thread Patrick R. Michaud
On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote: On Sun, Nov 20, 2005 at 10:27:17AM -0600, Patrick R. Michaud wrote: : On Sat, Nov 19, 2005 at 06:32:17PM -0800, Larry Wall wrote: : We already have, from A5, \x[0a;0d], so you can supposedly say : \x[123a;123b;123c] : : Hmm

Re: \x{123a 123b 123c}

2005-11-22 Thread Larry Wall
, \x[0a;0d], so you can supposedly say : : \x[123a;123b;123c] : : : : Hmm, I hadn't caught that particular syntax in A05. AFAIK it's not : : in S05, so I should probably add it, or whatever syntax we end up : : adopting. : : Yes. : : Out of curiosity (and so I can update S05

Re: \x{123a 123b 123c}

2005-11-21 Thread TSa
HaloO, Patrick R. Michaud wrote: There's also sp, unless someone redefines the sp subrule. And in the general case that's a slightly more expensive mechanism to get a space (it involves at least a subrule lookup). Perhaps we could also create a visible meta sequence for it, in the same way

Re: \x{123a 123b 123c}

2005-11-21 Thread Patrick R. Michaud
On Mon, Nov 21, 2005 at 03:23:35PM +0100, TSa wrote: Patrick R. Michaud wrote: There's also sp, unless someone redefines the sp subrule. And in the general case that's a slightly more expensive mechanism to get a space (it involves at least a subrule lookup). Perhaps we could also create a

apo5 (was: Re: \x{123a 123b 123c})

2005-11-21 Thread Ruud H.G. van Tol
Larry Wall: Juerd: Ruud: Maybe \x{123a 123b 123c} is a nice alternative of \x{123a} \x{123b} \x{123c}. Hmm, very cute and friendly! Can we keep it, please? Please? Thanks for the support. We already have, from A5, \x[0a;0d], so you can supposedly say \x[123a;123b;123c

Re: \x{123a 123b 123c}

2005-11-21 Thread Larry Wall
On Sun, Nov 20, 2005 at 10:27:17AM -0600, Patrick R. Michaud wrote: : On Sat, Nov 19, 2005 at 06:32:17PM -0800, Larry Wall wrote: : On Sun, Nov 20, 2005 at 01:26:21AM +0100, Juerd wrote: : : Ruud H.G. van Tol skribis 2005-11-20 1:19 (+0100): : : Maybe : : \x{123a 123b 123c

Re: apo5 (was: Re: \x{123a 123b 123c})

2005-11-21 Thread Larry Wall
On Mon, Nov 21, 2005 at 05:49:59PM +0100, Ruud H.G. van Tol wrote: : Larry Wall: : Juerd: : Ruud: : : Maybe : \x{123a 123b 123c} : is a nice alternative of : \x{123a} \x{123b} \x{123c}. : : Hmm, very cute and friendly! Can we keep it, please? Please? : : Thanks for the support

Re: \x{123a 123b 123c}

2005-11-21 Thread Larry Wall
On Mon, Nov 21, 2005 at 09:02:57AM -0800, Larry Wall wrote: : But I'd like to reserve for delimiting what is returned by $, : the string officially matched: : : foo bar baz ~~ /:w foo \w+ baz/ : say $/; # foo bar baz : say $; # bar Though it occurs to me that there's another

Re: \x{123a 123b 123c}

2005-11-20 Thread Patrick R. Michaud
On Sat, Nov 19, 2005 at 06:32:17PM -0800, Larry Wall wrote: On Sun, Nov 20, 2005 at 01:26:21AM +0100, Juerd wrote: : Ruud H.G. van Tol skribis 2005-11-20 1:19 (+0100): : Maybe : \x{123a 123b 123c} : is a nice alternative of : \x{123a} \x{123b} \x{123c}. We already have

\x{123a 123b 123c}

2005-11-19 Thread Ruud H.G. van Tol
Maybe \x{123a 123b 123c} is a nice alternative of \x{123a} \x{123b} \x{123c}. -- Grtz, Ruud

Re: \x{123a 123b 123c}

2005-11-19 Thread Juerd
Ruud H.G. van Tol skribis 2005-11-20 1:19 (+0100): Maybe \x{123a 123b 123c} is a nice alternative of \x{123a} \x{123b} \x{123c}. Hmm, very cute and friendly! Can we keep it, please? Please? Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl

Re: \x{123a 123b 123c}

2005-11-19 Thread Larry Wall
On Sun, Nov 20, 2005 at 01:26:21AM +0100, Juerd wrote: : Ruud H.G. van Tol skribis 2005-11-20 1:19 (+0100): : Maybe : \x{123a 123b 123c} : is a nice alternative of : \x{123a} \x{123b} \x{123c}. : : Hmm, very cute and friendly! Can we keep it, please? Please? We already have