Re: [sv-bc] Trimming whitespace from macro actuals

From: Steven Sharp <sharp_at_.....>
Date: Fri Oct 26 2007 - 16:50:37 PDT
>From: "Coffin, Eric" <eric_coffin@mentor.com>

>Undefined interactions exist between escaped identifiers, token pasting
>(gluing) and the `" macro operation.  Passing something may not be better
>than nothing in this case.

Based on the analysis I sent out a while back, I don't think there is a
straightforward text-based expansion algorithm that will allow pasting
escaped identifiers like normal ones.  I have pretty much given up on that.
A different token-pasting mechanism and syntax would have been needed to
handle escaped identifiers properly.

But I do think that we need to ensure that an escaped identifier can
be passed as a macro argument without getting mangled or mangling the
macro expansion, even if it cannot be pasted properly.  I think that
stripping all white space would prevent this from working.  Any stripping
needs to exclude the terminating white space character on an escaped
identifier.  Regardless of how the LRM describes it, I think that
terminating space needs to be considered part of the escaped identifier
token, even though it is not part of the resulting identifier name.

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 Fri Oct 26 16:51:01 2007

This archive was generated by hypermail 2.1.8 : Fri Oct 26 2007 - 16:51:14 PDT