Re: Adverbs

2006-04-24 Thread Jonathan Lang
Larry Wall wrote: > You might have to write that > >@list ==> $foo.act :bar('baz'); > > I think or the colon on the method would be taken as starting a list. > I dunno, depends on whether .act: is considered a "longest token", > I guess. I could argue it the other way as well, and :bar is a lo

Re: Adverbs

2006-04-24 Thread Damian Conway
One other point: act $foo, @list, bar => 'baz'; is actually the same as: act($foo, @list, bar => 'baz'); which might or might not dispatch to a method on $foo, depending on whether (and how) &act is defined. Jonathan probably meant: act $foo: @list, bar => 'baz'; for the indirec

Re: Adverbs

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 08:30:04PM -0700, Jonathan Lang wrote: : Larry Wall wrote: : > Jonathan Lang wrote: : > : How do you define new adverbs, and how does a subroutine go about : > : accessing them? : > : > Adverbs are just optional named parameters. Most of the magic is in : > the call syntax.

Re: Adverbs

2006-04-24 Thread Jonathan Lang
Larry Wall wrote: > Jonathan Lang wrote: > : How do you define new adverbs, and how does a subroutine go about > : accessing them? > > Adverbs are just optional named parameters. Most of the magic is in > the call syntax. Ah. So every part of a Capture Object has an alternate call syntax: act

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

2006-04-24 Thread larry
Author: larry Date: Mon Apr 24 19:38:40 2006 New Revision: 8935 Modified: doc/trunk/design/syn/S02.pod Log: Clarifications on adverbs. Modified: doc/trunk/design/syn/S02.pod == --- doc/trunk/design/syn/S02.pod

Re: Adverbs

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 06:58:04PM -0700, Jonathan Lang wrote: : How do you define new adverbs, and how does a subroutine go about : accessing them? Adverbs are just optional named parameters. Most of the magic is in the call syntax. Larry

Adverbs

2006-04-24 Thread Jonathan Lang
How do you define new adverbs, and how does a subroutine go about accessing them? -- Jonathan Lang

Re: S05: Interpolated hashes?

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 08:00:55AM -0700, Larry Wall wrote: : If you want to reset to before the key for some reason, you can always : set .pos to $.beg, or whatever the name of the method is. Hmm, : that looks like it's unspecced. I'm wrong, it's already specced as .from and .to methods. So you

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

2006-04-24 Thread larry
Author: larry Date: Mon Apr 24 17:55:46 2006 New Revision: 8934 Modified: doc/trunk/design/syn/S05.pod Log: Random cleanup. Modified: doc/trunk/design/syn/S05.pod == --- doc/trunk/design/syn/S05.pod(original)

Re: S05: Interpolated hashes?

2006-04-24 Thread jerry gay
On 4/24/06, Larry Wall <[EMAIL PROTECTED]> wrote: > If you want to reset to before the key for some reason, you can always > set .pos to $.beg, or whatever the name of the method is. Hmm, > that looks like it's unspecced. > BEGIN .beg looks over-huffmanized to me. .begin is more natural to english

Re: S05: Interpolated hashes?

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 05:22:25PM +0100, [EMAIL PROTECTED] wrote: : Why don't we just have work as an assertation, instead of having this : strange "as if" thing? 'Cause the point of most parsing is to rapidly move on, not to rehash the ground you already covered. And if you really do need to r

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

2006-04-24 Thread larry
Author: larry Date: Mon Apr 24 11:19:24 2006 New Revision: 8933 Modified: doc/trunk/design/syn/S02.pod Log: Clarification requested by spinclad++. Modified: doc/trunk/design/syn/S02.pod == --- doc/trunk/design/syn/S0

Re: S05: Interpolated hashes?

2006-04-24 Thread james
On Mon, Apr 24, 2006 at 08:00:55AM -0700, Larry Wall wrote: > On Mon, Apr 24, 2006 at 09:49:36AM -0500, Jonathan Scott Duff wrote: > : But what if your subrule needs to know exactly which key matched or > : needs to match the key again for some reason? The second passage says > : that you may acces

Re: S05: Interpolated hashes?

2006-04-24 Thread Markus Laire
Thanks, Scott & Larry. IMHO, the explanation about and $ could be moved to where the bare hash behaviour is explained as hash-in-angles-section already says "A leading % matches like a bare hash except ..." On 4/24/06, Larry Wall <[EMAIL PROTECTED]> wrote: > If you want to reset to before the ke

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

2006-04-24 Thread larry
Author: larry Date: Mon Apr 24 08:18:48 2006 New Revision: 8931 Modified: doc/trunk/design/syn/S02.pod Log: A postdeclaration may not change the syntax away from listop parsing rules. Modified: doc/trunk/design/syn/S02.pod =

Re: S05: Interpolated hashes?

2006-04-24 Thread Larry Wall
On Mon, Apr 24, 2006 at 09:49:36AM -0500, Jonathan Scott Duff wrote: : But what if your subrule needs to know exactly which key matched or : needs to match the key again for some reason? The second passage says : that you may access they actual text that matched with $ and you : may again match the

Re: S05: Interpolated hashes?

2006-04-24 Thread Jonathan Scott Duff
On Mon, Apr 24, 2006 at 04:50:43PM +0300, Markus Laire wrote: > In Synopsis 5 (version 22), > > Under "Variable (non-)interpolation" it's said that > > An interpolated hash matches the longest possible key of the hash as a > literal, or fails if no key matches. (A "" key will match anywhere, > pr

S05: Interpolated hashes?

2006-04-24 Thread Markus Laire
In Synopsis 5 (version 22), Under "Variable (non-)interpolation" it's said that An interpolated hash matches the longest possible key of the hash as a literal, or fails if no key matches. (A "" key will match anywhere, provided no longer key matches.) And under "Extensible metasyntax (<...>)" i

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

2006-04-24 Thread larry
Author: larry Date: Mon Apr 24 00:59:42 2006 New Revision: 8928 Modified: doc/trunk/design/syn/S02.pod Log: Rules for parsing and compiling unrecognized identifiers. Modified: doc/trunk/design/syn/S02.pod == --- doc/