(j3.2006) (j3.2005) Re: question on token replacement/concatenation

Aleksandar Donev donev1
Tue Jan 23 15:15:18 EST 2007


On Tuesday 23 January 2007 02:04, Malcolm Cohen wrote:

> W.r.t. 3.14_WP, I think that the right fix is to correct our faulty
> definition of a token.
I understand the part about the wp being a name and having a life on its own. 
But I also do not think one should treat 3.14_wp as three separate lexical 
tokens. They really do go together. Otherwise write REAL(3.14,wp). Maybe this 
requires introducing some concept of a "composite lexical token", if there 
are any examples other than literal constants.

> If we want that to have no "user effect" (i.e. 
> the compiler writers not to have to change anything) we can forbid
> blanks in between the tokens of a literal constant.
But doesn't that directly contradict what Dick wants to do, write:

3.14 kind

and sometimes pass "_ wp" for kind and other times pass nothing? What about 
"_wp", is that a valid macro actual argument (it is not a lexical token it 
seems to me)?

As a user, I'd like to write

3.14%%kind

without spaces and then pass either nothing or "_wp" as a macro actual for 
kind.

Best,
Aleks



More information about the J3 mailing list