LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Will Robertson <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 15 Nov 2005 10:51:30 +1030
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
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

ATOM RSS1 RSS2