--- "Abhijit A. Mahabal" <[EMAIL PROTECTED]> wrote: > In E6 Damien writes about macros: > > "As soon as it has parsed that subroutine call (including its > argument > list) it will detect that the subroutine &request is actually a > macro, so > it will immidiately call &request with the specified arguments". > > If macroness is found *after* parsing the arguments, when does the > "is > parsed" trait's action kick in? > > Elsewhere, he writes: > "The 'is parsed' trait tells the parser what to look for immediately > after it encounters a macro's name". > > I would guess that the latter is what is intended. Or is it that the > absence of an explicit "is parsed" changes the behaviour (for > efficiency > reasons, perhaps, as many common uses will parse arguments in > standard > ways [though act in mind warping ways] ) ?
You're both right. 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). 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. E6> The is parsed trait tells the parser what to look for immediately E6> after it encounters the macro's name. =Austin