Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2003-12-03 02:24:32

Paul Mensonides wrote:

>No. The preprocessor does not "insert spaces" *ever*. At this point in
>translation, the preprocessor is operating on preprocessing tokens, not
>characters. There is a big difference between a lack of whitespace and

Hi again, Paul. I'm sorry to bother so much. I forwarded your reply to
Walter, of Digital Mars, and he still doesn't seem convinced. I am 99%
convinced but I need to understand this fully if I'll ever be able to
convince him :-)

Let me try to put what you said in my own words, and then I'll ask you a
pointed question:

I always thought, myself, that the preprocessor worked at a textual level.
Now I'm getting the idea that the first pass in preprocessing is
'tokenization' which I take it to mean tagging tokens, like "abracadabra"
or "." or ")". So, if we have,

#define a(x) x



is NOT 'concatenation', as no tokens are being merged.

Could we say, then, that ## was invented as a special power tool for
'violating initial tokenization' and forcing a merger of two tokens?
If so, we could say that in the example above, the tokens are not being
violated, and therefore ## is not needed.

Now the pointed question: What then if I write,


without a "."? Should or shouldn't the preprocessor add a space in this
particular case?


Boost list run by bdawes at, gregod at, cpdaniel at, john at