RE: [sv-bc] Mantis 1571: proposal for macro defaults

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Sun Nov 25 2007 - 12:58:06 PST
Hi,

I have attached a revised version of this proposal that deals with most
of the comments received. I left two issues out as being outside the
scope of this Mantis:

1. Eric wrote:

'* Shalom's proposed change contains the following paragraph:
"If formal arguments are used, the list of formal argument names shall
be enclosed in parentheses following the name of the macro. The formal
argument names shall be simple_identifiers, separated by commas and
optionally whitespace. The left parenthesis shall follow the text macro
name immediately, with no space in between."

The LRM allows macros to be named with escaped identifiers. If an
escaped identifier names the macro then one character of white space
(space, tab, newline, eof) must be used to delimit the macro name as
defined in section A.9.3 and A.9.4. First of all, does this make sense?
Should language be added that indicates that one, and only one space
character or tab character separate the escaped identifier from the
opening parenthesis?'

However, the text that Eric quotes is not mine, but is in the existing
LRM. It also has no connection to defaults.

2. Greg wrote:

>    2) So-called "token gluing" (actually implemented as 
> token-delimiter
>       removal) has to be placed into this evaluation sequence
>       carefully.  The LRM describes '' only when it appears 
> in "macro text",
>       and shows that it is removed sometime after the formal 
> substitutions
>       for the macro definition in which it appears.  It is 
> probably already
>       true that gluing can produce tokens which will be 
> subject to further
>       macro expansion (but not to any further formal 
> substitution, of course).
>       If it does act on the "literal" text, then it should be able to
>       modify expansions latent in such text:
> 
> 	`define CHAR_1  A
> 	`define CHAR_2  B
> 	`define CHAR_3  C
> 	`define CHAR_12 L
> 	`define BOT( X, Y, Z )  `" `CHAR_``X``Y``2`CHAR_``X `CHAR_``Z `"
> 
>         `BOT( 1, `CHAR_1, 3 )   expands to  " ALA C "

I left this out as well as being connected to token gluing and not to
defaults.

I put the previous series of comments into the Mantis for easy
reference.

The proposal incorporates changes from Mantis 1957, which was already
approved by SV-BC and practically, also by the Champions.

Please review the new proposal. We don't have much time left.

Thanks,
Shalom
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Received on Sun Nov 25 12:58:49 2007

This archive was generated by hypermail 2.1.8 : Sun Nov 25 2007 - 12:59:25 PST