Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Method call parsing
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Luke Palmer  
View profile  
 More options Mar 6 2005, 5:15 pm
Newsgroups: perl.perl6.compiler
From: l...@luqui.org (Luke Palmer)
Date: Sun, 6 Mar 2005 15:15:23 -0700
Local: Sun, Mar 6 2005 5:15 pm
Subject: Method call parsing
In Parser.hs:589, we have the code:

parseParamList parse =    parseParenParamList parse
                      <|> parseNoParenParamList parse

parseParenParamList parse = do
    [inv, norm] <- maybeParens $ parseNoParenParamList parse
    block <- option [] ruleAdverb
    -- XXX we just append the adverbial block onto the end of the arg list
    -- it really goes into the *& slot if there is one. -lp
    processFormals [inv, norm ++ block]

But this allows the syntax '$x.foo $y', that is, an argument to a method
call without parentheses.  This isn't a big deal, and could even be
construed as a feature, if it weren't for:

    for %hash.keys { ... }

Which is misparsed.

Taking out maybeParens and putting 'option [[],[]] $ parens' in its
place makes that part work, but it breaks our regular 'say "foo"'
paren-less syntax.  I would think that the parseParamList rule above
would fix that.  No matter where I put 'try', it never seems to want to
go to parseNoParenParamList.

Luke


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.