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

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Sun Oct 28 2007 - 03:53:17 PDT
Three notes:

1. There is probably no one to the list of special cases that we can
think of. There is likely to be no way to satisfy all of them. What is
good for one case is probably bad for another. We should concentrate on
real cases.

2. `\ was intended for use in `\`". Any other use is caveat emptor.

3. Maybe this entire approach is wrong. I took a PERL course recently.
There one can write qw(blahblah) to indicate that the contents should be
enclosed in quotes. Maybe we should be using that type of approach
instead of weird character sequences that are difficult to read anyway.

Regards,
Shalom 

> -----Original Message-----
> From: owner-sv-bc@server.eda.org 
> [mailto:owner-sv-bc@server.eda.org] On Behalf Of Brad Pierce
> Sent: Sunday, October 28, 2007 12:28 PM
> To: sv-bc@server.eda-stds.org
> Subject: RE: [sv-bc] Trimming whitespace from macro actuals
> 
> Is the following legal?
> 
>    `define M(anything) uwire `\anything = 1'b1;
>    `M2(@@@)
> 
> How about the following?
> 
>    `define M2(anything) uwire `\anything= 1'b1;
>    `M2(@@@ )
>  
> -- Brad
> 
> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On 
> Behalf Of Bresticker, Shalom
> Sent: Sunday, October 28, 2007 2:33 AM
> To: Steven Sharp; sv-bc@eda-stds.org
> Subject: RE: [sv-bc] Trimming whitespace from macro actuals
> 
> Hi, 
> 
> > So we should be careful that we don't define something until we are 
> > sure what we ultimately want to define.
> 
> So far, I have not heard anyone claim that the general rules 
> I proposed are wrong, i.e., 
> 
> 1. Normal actual arguments have leading and trailing white 
> space stripped off.
> 2. Exception: an escaped identifier at the end of an actual 
> argument should keep a white space.
> 
> That takes care of the simple case of escaped identifiers, 
> not involving ``.
> Example:
> 
> `define D(a,b) a+b
> 
> `D(\coco , puffs)
> 
> should give you 
> 
> \coco +puffs
> 
> and not
> 
> \coco+puffs
> 
> There is a special case involving escaped identifiers around 
> ``. That could be added subsequently as a special case which 
> is really a question of how `` works. I don't see that it 
> makes the general rules wrong.
> While it may be clear to everyone that white space is 
> stripped off normal arguments, the behavior regarding escaped 
> identifiers has not been universal, and therefore even the 
> simple example I wrote above does not work in all tools (so I 
> understood).
> 
> If we will manage to specify a desirable behavior for the 
> special cases before the deadline, great. That can be 
> addition or a revision of the general rules. But let's at 
> least the general rules passed, so that at least the simple 
> cases will be guaranteed to work consistently in all tools.
> 
> 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.
> 
> 
> 
> --
> This message has been scanned for viruses and dangerous 
> content by MailScanner, and is believed to be clean.
> 
---------------------------------------------------------------------
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 Oct 28 03:57:00 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 28 2007 - 03:57:08 PDT