(j3.2006) Question about macro concatenation
Tue Dec 5 16:24:17 EST 2006
>Is this allowed?
Let me speculate to see if I understand the rules. Just thinking out loud
here, please grade my work. If you are asking
"is this allowed before token replacement/concatenation" I think the
answer is no, because
is not a lexical token (it is 3 lexical tokens) and therefore cannot
sit by itself between two concatenation operators.
would seem to be ok.
If you are asking "is this allowed as a result of token replacement, before
token concatenation" I think the answer is still no because B=1 still isn't
a single token and [06-007r1:36:41] refers to "each sequence of single tokens
separated by %% operators" which implies that between %% operators only
single tokens appear. (Of course it's not authoritative to refer
to the obsolete draft.)
On the other hand, what you get from token replacement is new
token sequences in place.
The sequence of 3 tokens "B" followed by "=" followed by
"1" is probably canonically represented by the processor as
B = 1
so maybe you'd never see "B=1" (without spaces)
after token replacement before token concatenation.
More information about the J3