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 macros and is parsed
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
 
Larry Wall  
View profile  
 More options Aug 2 2003, 2:00 pm
Newsgroups: perl.perl6.language
From: la...@wall.org (Larry Wall)
Date: Sat, 2 Aug 2003 10:53:20 -0700
Local: Sat, Aug 2 2003 1:53 pm
Subject: Re: macros and is parsed
On Sat, Aug 02, 2003 at 08:40:26AM -0700, Austin Hastings wrote:

: You're both right.

Well, actually, I think Damian misspoke slightly.  I only aim for
95% accuracy in the Apocalypses (or I'd never get them done).  So I
think it's pretty spectacular if Damian gets to 99.44% accuracy in
the Exegeses.

: Notice that "request" does not have an "is parsed" tag. So the default
: behavior for macro calls is to use the parsing syntax of subroutines
: (which makes a lot of sense).
:
: Thus, the call to result "looks like a subroutine call" (because that's
: the default way to invoke a macro) but is recognized, after parsing, as
: a macro (because that's how it's implemented -- parse a rule, follow
: the results).

I suspect a macro is always recognized the moment its name is parsed,
whether or not there is an "is parsed".  The trait merely overrides the
default parse of the macro.

: What's unclear to me is the behavior as specified -- Ex6 calls for the
: C<is parsed> syntax to specify the argument parsing. I had thought that
: an infix or postfix macro would be possible because the macro would
: have access to the parser internals. How to do that is missing.

It is possible, but an infix or postfix macro may only take a standard
expression on the left, since that part has already been parsed.
The macro could give that expression non-standard semantics, however.
And an infix operator can specify an "is parsed" for its right
argument.  In fact, ??:: could be implemented as an infix:?? macro
that does a special parse looking for a subsequent :: token.

Larry


 
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.