RE: [sv-bc] white space at the end of macro text

From: Steven Sharp <sharp_at_.....>
Date: Mon Mar 20 2006 - 15:29:37 PST
>From: "Bresticker, Shalom" <shalom.bresticker@intel.com>

>[Shalom] Note that there are two types of expansion: substitution of
>actual arguments into formal arguments, and expansion of macro calls of
>previously defined macros.
>The text seems to talk only about expansion of arguments, leaving fuzzy
>whether the same applies to macro calls as well.
>It should be explicit.

You are quite right.  I had assumed that macro invocations would be
expanded inside `" before they were turned into quotes, but the text
doesn't seem to say so.  And since the `" functionality was designed
primarily for macro arguments, it isn't clear that also expanding
macro invocations was intended.  The text needs to specify one way or
the other.


>[Shalom] You're correct. Rule 2 was trying to emphasize that you can use
>" without a preceding apostrophe and the " will be preserved and treated
>as the beginning (or end) of a string literal. 
>
>That's not as trivial as it sounds. 1800 says,
>"An `" ... indicates that the expansion should include an actual
>quotation mark." That sounds like it says that a plain " will not cause
>"an actual quotation mark" to be included.

I agree that it is confusing.  The best spin I can put on it is that
you could regard a plain " as part of a string literal token, and that
the string literal token is included as a whole, rather than as a
set of separate characters that includes quotation mark characters
at the start and end.  That is quite a stretch.


>> If " is followed by `", then the `" would just be two
>> characters in a
>> string literal.
>
>[Shalom] Wouldn't the tic be the last character in a string literal and
>the " end the literal?

Oops, you are right.



>> I don't think so.  The LRM only says they can be used in macro
>> text.
>
>[Shalom] True. But when I substitute the arguments, they become part of
>the text. It should be stated explicitly.

I disagree with your interpretation of the terminology.  The term
"macro text" is always used to mean the text in the macro definition.
Substituting the actual arguments does not make them part of the macro
text.  The formal arguments are part of the macro text.  The actual
arguments become part of the expansion of the macro, not part of the
macro text.

You may not like the terminology, but I think it is clear.

Steven Sharp
sharp@cadence.com
Received on Mon Mar 20 15:29:42 2006

This archive was generated by hypermail 2.1.8 : Mon Mar 20 2006 - 15:29:54 PST