Re: [sv-bc] `` macro token gluing operator

From: Steven Sharp <sharp_at_.....>
Date: Thu Jun 21 2007 - 15:48:30 PDT
>From: "Bresticker, Shalom" <shalom.bresticker@intel.com>

>1.   Is `` limited to the contents of a macro definition or may it be
>used in regular code or in an actual argument of a macro call? My
>answer: only inside macro definition, not in regular code, and not in
>macro call actual argument.

The LRM talks about how these special character sequences in a macro
affect the expansion, so I would agree.


>2.   Can it be used to paste fixed text in the macro definition or must
>it paste a formal argument? My answer: it can be used with fixed text.
>Thus, inside a macro definition, a``b gives you "ab" if a and b are not
>formal arguments. If either or both is a formal argument, then the
>actual argument is substituted,

I don't see any real use for this, but the LRM text seems to allow it.
It says that it delimits lexical tokens without introducing white space
(a rather unclear statement), and then says that this allows identifiers
to be constructed from arguments.  The mention of arguments is in the
explanation of how it is useful, not in the description of what it does.
So I don't think it is restricted to arguments.

>3.   Can it be used to paste together anything or only to make an
>identifier? For example, can I do <``= to get <= ? My answer: it is only
>for making identifiers.

Making anything but identifiers this way seems pretty strange.  However,
the LRM text does not appear to restrict it to this.  As with the previous
question, the mention of identifiers is in the explanation of how it is
useful, not in the description of what it does.  So the LRM does not seem
to be restricting it to this.

But we should probably be figuring out how to word the LRM to mean what
we want, rather than trying to extract meaning from the vague wording
that is there.

Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jun 21 15:49:03 2007

This archive was generated by hypermail 2.1.8 : Thu Jun 21 2007 - 15:49:51 PDT