Code Comments
Programming Forum and web based access to our favorite programming groups.# New Ticket Created by Stephen Ws # Please include the string: [perl #53804] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53804 > Both rakudo's grammar and STD.pm have this line in token methodop: | ':' <?before \s> <!{ $+inquote }> <EXPR(%list_prefix)> t/spec/S29-list/minmax.t has the following parse failure in a few places, th ough: is @array.min:{ $^a <=> $^b }, -9, This doesn't parse because there's no whitespace after the : Is the test wrong? Should I update the test to match the grammar or the grammar to match the test?
Post Follow-up to this messageOn Tue, May 06, 2008 at 11:35:20PM -0700, Stephen Ws wrote: > Both rakudo's grammar and STD.pm have this line in token methodop: > > | ':' <?before \s> <!{ $+inquote }> <EXPR(%list_prefix)> > > t/spec/S29-list/minmax.t has the following parse failure in a few places, though: > > is @array.min:{ $^a <=> $^b }, -9, > > This doesn't parse because there's no whitespace after the : According to TimToady on #perl6, :{ $^a <=> $^b} is an adverbial block (see S02). So, I'm guessing the :{...} should be parsed by the <postcircumfix> option of the <colonpair> rule: token colonpair { ':' [ | '!' <ident> {*} #= false | <ident> $<val>=[ <.unsp>? <postcircumfix> ]? {*} #= value | <postcircumfix> {*} #= structural | <sigil> <twigil>? <desigilname> {*} #= varname ] } We may still need to find out what causes the parsefail in Rakudo, though. Pm
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.