Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-18 Thread Chris Fields
On Jul 17, 2008, at 9:41 PM, Patrick R. Michaud wrote: On Thu, Jul 17, 2008 at 02:20:33PM -0500, Chris Fields wrote: Okay, I'll set it up so $foo = 'abcd'.match(/alpha+/) returns a Match object, and $/ would remain unset. Makes sense to me. Right now the match object is converted over to a

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-18 Thread Jonathan Worthington
Hi, Chris Fields wrote: The PGE::Match appears to be converted to a Str, regardless of the invoking object type. The following is .match (in any-str.pir, with the builtins). Also, .ACCEPTS now uses .match to retrieve the Match object. # any-str.pir .sub 'match' :method :multi(_)

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-18 Thread Chris Fields
On Jul 18, 2008, at 5:18 PM, Jonathan Worthington wrote: Hi, Chris Fields wrote: The PGE::Match appears to be converted to a Str, regardless of the invoking object type. The following is .match (in any-str.pir, with the builtins). Also, .ACCEPTS now uses .match to retrieve the Match

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-17 Thread Chris Fields
On Jul 16, 2008, at 1:28 PM, Patrick R. Michaud wrote: On Wed, Jul 16, 2008 at 11:20:28AM -0500, Chris Fields wrote: I have submitted a simple 'match' implementation for rakudo (method version of m//, RT#56970) and ran into an odd issue. The current version of match which works uses a tail

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-17 Thread Chris Fields
On Jul 16, 2008, at 5:45 PM, Chris Fields wrote: On Jul 16, 2008, at 1:28 PM, Patrick R. Michaud wrote: On Wed, Jul 16, 2008 at 11:20:28AM -0500, Chris Fields wrote: I have submitted a simple 'match' implementation for rakudo (method version of m//, RT#56970) and ran into an odd issue.

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-17 Thread Moritz Lenz
Chris Fields wrote: On Jul 16, 2008, at 1:28 PM, Patrick R. Michaud wrote: On Wed, Jul 16, 2008 at 11:20:28AM -0500, Chris Fields wrote: I have submitted a simple 'match' implementation for rakudo (method version of m//, RT#56970) and ran into an odd issue. The current version of match

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-17 Thread Chris Fields
On Jul 17, 2008, at 1:56 AM, Moritz Lenz wrote: Essentially the difference is that smart-match sets $/, while a simple call to .match probably should not. Pm I can have .match not set $/ for now and simply return matches based on context IMHO that's the wrong approach. Perl 6 tries not

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-17 Thread Patrick R. Michaud
On Thu, Jul 17, 2008 at 02:20:33PM -0500, Chris Fields wrote: Okay, I'll set it up so $foo = 'abcd'.match(/alpha+/) returns a Match object, and $/ would remain unset. Makes sense to me. Right now the match object is converted over to a Str; I'll take a look at the parser grammar/actions

odd (lexical?) issue with Rakudo/Parrot

2008-07-16 Thread Chris Fields
I have submitted a simple 'match' implementation for rakudo (method version of m//, RT#56970) and ran into an odd issue. The current version of match which works uses a tail call: .sub 'match' :method .param pmc x .return x.ACCEPTS(self) .end If I try the following: .sub 'match'

Re: odd (lexical?) issue with Rakudo/Parrot

2008-07-16 Thread Patrick R. Michaud
On Wed, Jul 16, 2008 at 11:20:28AM -0500, Chris Fields wrote: I have submitted a simple 'match' implementation for rakudo (method version of m//, RT#56970) and ran into an odd issue. The current version of match which works uses a tail call: .sub 'match' :method .param pmc x