Re: S02: generalized quotes and adverbs

2006-05-10 Thread Larry Wall
On Tue, May 09, 2006 at 11:15:24PM -0700, jerry gay wrote: : according to S02, under 'Literals', generalized quotes may now take : adverbs. in that section is the following comment: : : snip : [Conjectural: Ordinarily the colon is required on adverbs, but the : quote declarator allows you to

Re: Scans

2006-05-10 Thread Markus Laire
On 5/10/06, Austin Hastings [EMAIL PROTECTED] wrote: Mark A. Biggar wrote: Use hyper compare ops to select what you want followed by using filter to prune out the unwanted. filter gives you with scan: filter (list [] @array) @array == first monotonically increasing run in

Re: A rule by any other name...

2006-05-10 Thread Juerd
Damian Conway skribis 2006-05-10 18:07 (+1000): More than that, the current 'rule' and 'regex' can both be used inside and outside a grammar. If we were to take the 'sub'/'method' pattern, then 'rule' should never be allowed outside a grammar, I entirely agree. I don't. While disallowing

Re: Scans

2006-05-10 Thread Markus Laire
In the previous mail I accidentally read [=] as [=] On 5/10/06, Markus Laire [EMAIL PROTECTED] wrote: filter (list [=] @array) @array == first monotonically non-decreasing run in @array So @array = (1 0 -1 -2 -1 -3) == (1, -1) is monotonically non-decreasing? This would

Re: Scans

2006-05-10 Thread Markus Laire
On 5/9/06, Jonathan Scott Duff [EMAIL PROTECTED] wrote: On Tue, May 09, 2006 at 06:07:26PM +0300, Markus Laire wrote: ps. Should first element of scan be 0-argument or 1-argument case. i.e. should list([+] 1) return (0, 1) or (1) I noticed this in earlier posts and thought it odd that anyone

Re: A rule by any other name...

2006-05-10 Thread Damian Conway
Allison wrote: I've never met anyone who *voluntarily* added the 'p'. ;-) You've spent too much time in the U.S. ;) And Australia. I don't know where the silent 'p' comes from but it sure ain't the New World. Picking names that mean what they say is important in Perl. It's why we have

Re: S02: generalized quotes and adverbs

2006-05-10 Thread Daniel Hulme
qX ::= q:x:y:z; as a simple, argumentless word macro. But would that DWIM when I come to write qX(stuff, specifically not an adverb argument); ? -- The rules of programming are transitory; only Tao is eternal. Therefore you must contemplate Tao before you receive

Re: A rule by any other name...

2006-05-10 Thread Allison Randal
On Wed, 10 May 2006, Damian Conway wrote: Allison wrote: I've never met anyone who *voluntarily* added the 'p'. ;-) You've spent too much time in the U.S. ;) and the fact that everyone knows 'regex(p)' means regular expression no matter how may times we say it doesn't. Sure. But

Re: A rule by any other name...

2006-05-10 Thread Ruud H.G. van Tol
Allison Randal schreef: Damian: Match is a better word for what comes back from a regex match (what we currently refer to as a Capture, which is okay too). I agree there. I still prefer 'rule'. Maybe matex (mat-ex) for matching expression and, within that, capex/captex (cap-ex/capt-ex) for

Re: A rule by any other name...

2006-05-10 Thread Ruud H.G. van Tol
Damian Conway schreef: grammar Perl6 is skip(/[ws+ | \# brackets | \# \N]+/) { ... } I think that first + is superfluous. Doubly so if ws already stands for the run of all consecutive word-separators. -- Groet, Ruud

Re: A rule by any other name...

2006-05-10 Thread Patrick R. Michaud
On Wed, May 10, 2006 at 06:07:54PM +1000, Damian Conway wrote: Including :skip(/someotherrule/). Yes, agreed, it's a huge improvement. I'd be more comfortable if the default rule to use for skipping was named skip instead of ws. (On IRC sep was also proposed, but the connection between

Re: A rule by any other name...

2006-05-10 Thread Larry Wall
On Wed, May 10, 2006 at 11:25:26AM +1000, Damian Conway wrote: : True. Token is the wrong word for another reason: a token is a : segments component of the input stream, *not* a rule for matching : segmented components of the input stream. The correct term for that is : terminal. So a suitable

Re: A rule by any other name...

2006-05-10 Thread Damian Conway
Larry wrote: So anyway, I think token is sufficiently close to what we want it to mean that we can force it to mean that, and it's sufficiently orphaned that few people are going to complain about impressing it into forced labor. I'm perfectly fine with that. To quote myself out of context:

Re: A rule by any other name...

2006-05-10 Thread Uri Guttman
AR == Allison Randal [EMAIL PROTECTED] writes: AR Including :skip(/someotherrule/). Yes, agreed, it's a huge AR improvement. I'd be more comfortable if the default rule to use AR for skipping was named skip instead of ws. (On IRC sep was AR also proposed, but the connection between

Re: A rule by any other name...

2006-05-10 Thread Allison Randal
To summarize a phone call today, the more intelligent defaults we add to differently named rule keywords the more comfortable I am with having different names. So, here's what we have so far (posted both as an FYI and to confirm that we have the coherent solution I think we have): rule: - Has

Re: A rule by any other name...

2006-05-10 Thread Patrick R. Michaud
On Wed, May 10, 2006 at 05:58:57PM -0700, Allison Randal wrote: To summarize a phone call today, the more intelligent defaults we add to differently named rule keywords the more comfortable I am with having different names. So, here's what we have so far (posted both as an FYI and to

Re: A rule by any other name...

2006-05-10 Thread Damian Conway
Allison admirably summarized: rule: regex: token: skip: - We keep :words as shorthand for :skip(/ws/) - And :skip is shorthand for :skip(/skip/) ...where skip defaults to ws, but is distinct from it (i.e. it can be redefined independently). - To change skipping behavior: a) override