Re: [sv-bc] Macro mantis proposals 1397 & 1478

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Thu Dec 06 2007 - 12:41:05 PST
Alsop, Thomas R wrote:
> Brad, I think you are making a good point that the escaped identifier 
> should be interpreted, per your example, as not having any white space. 
>  The example you are using is creating a half token example.  If the 
> white space wasn’t stripped out, yes you wouldn’t violate 21.5.1, but 
> you would compile fail after the text is replaced with the wire 
> assignment.  IMHO, this white space stripping proposal is the correct 
> implementation even WRT to your escaped identifier example.  If you have 
> an escaped identifier as a macro replacement, the end user must be smart 
> enough to recognize the implications of escaped identifiers, i.e. you 
> must have white space to terminate it.  I constantly emphasize this in 
> my classes.  Thus if macros are using escaped identifiers and 
> _/terminating/_ with them, the usage of that macro better dang well have 
> the terminating spaces, or you have screwed yourself.


I completely disagree with this.  Please see my response to Brad.

Requiring such an interpretation would break existing code.

    `define ONE_PLUS(x) 1+x

    module m;
       int \y , z;
       initial z = `ONE_PLUS(\y );
    endmodule

This is legal currently and if your intent is to make this illegal,
I am going to oppose the change.

Gord.

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Dec 6 12:41:32 2007

This archive was generated by hypermail 2.1.8 : Thu Dec 06 2007 - 12:41:41 PST