Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

[perl #53804] test/grammar conflict
# 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?


Report this thread to moderator Post Follow-up to this message
Old Post
Stephen Weeks (via RT)
05-07-08 10:17 AM


Re: [perl #53804] test/grammar conflict
On 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


Report this thread to moderator Post Follow-up to this message
Old Post
Patrick R. Michaud
05-08-08 12:37 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Perl 6 Compiler archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:59 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.