Mime-Version: |
1.0 (Apple Message framework v746.2) |
Content-Type: |
text/plain; charset=US-ASCII; delsp=yes; format=flowed |
Date: |
Tue, 15 Nov 2005 10:51:30 +1030 |
Reply-To: |
|
Subject: |
|
From: |
|
In-Reply-To: |
|
Content-Transfer-Encoding: |
7bit |
Sender: |
|
Parts/Attachments: |
|
|
On 15/11/2005, at 4am, Joachim Schrod wrote:
>>>>>> "WR" == Will Robertson <[log in to unmask]> writes:
>
> WR> The token stream won't change retrospectively, so in theory it
> WR> should be able to be examined.
>
> But it does change. That's the whole point of macros, to change the
> token stream.
It sounds like my understanding of macro expansion is wrong, but I am
still not seeing the argument properly, I'm afraid. Since we're
looking *backward*, won't whatever being expanded (ignore for now
\expandafter...) already BE expanded?
Then, with
\def\a#1{f1\b{#1}}
\def\b#1#2{\par #2 #1}
\a12\previouslet\test
Am I wrong in thinking that by the time \previouslet is activated,
\a12 will have expanded into (char "f") (other "1") (cseq "par")
(other "2") (space " ") (other "1") ?
So we get ... (other "1") (cseq "\previouslet") (cseq "\test")
and end up with the equivalent of \let\test=1 .
Ohhh, but I think I get it now. This is no more useful than actually
looking at nodes, since anything that survives to be \previouslet
will be turned into a node anyway.
(Ignoring whatever you might happen to be able to do with \noexpand /
\expandafter ...)
Will
|
|
|