RE: [sv-bc] `` macro token gluing operator

From: Gran, Alex <alex_gran_at_.....>
Date: Thu Jun 21 2007 - 15:10:55 PDT
Steve,
   So your example in

	`define x \a ``b[1]
 
I think this should result in the escaped identifier '\ab[1] '
Unless the right hand side token of `` needs to be a legal identifier
prior to `` being evaluated.  Does that need to be the case?  I believe
it should be legal to have this

	`define x a``1

result in the identifier 'a1'

  I don't think it is necessary for the right hand side of the `` to be
legal identifier prior to evaluation, the important thing as the end
result is a legal identifier after evaluation of ``

~Alex



-----Original Message-----
From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On
Behalf Of Steven Sharp
Sent: Thursday, June 21, 2007 2:44 PM
To: shalom.bresticker@intel.com; spsaha@cal.interrasystems.com;
sharp@cadence.com
Cc: sv-bc@server.eda.org
Subject: Re: [sv-bc] `` macro token gluing operator


>I had another thought on this.  As noted in Mantis 1537, full backward
>compatibility would require the `` to be treated as part of the escaped
>identifier.  But it is desirable to be able to use token pasting to
>create an escaped identifier.
>
>Could we do this with
>
>`define x \a ``b
>
>The white space after \a completes an escaped identifier token that
>does not include the white space.  Then the following token, b, would
>be pasted onto it, giving \ab.

This does start getting into some questions about how the escaping
works.  If you have

`define x \a ``b[1]

Does the escaping continue to operate after pasting, giving a single
escaped identifier \ab[1] , or has the escaping been used up in
producing the token \a , resulting in \ab [ 1 ]?  In the latter case,
could you do something like

`define x \a ``\b[1]

to produce the single escaped identifier \ab[1] ?

Steven Sharp
sharp@cadence.com


-- 
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.
Received on Thu Jun 21 15:36:13 2007

This archive was generated by hypermail 2.1.8 : Thu Jun 21 2007 - 15:36:30 PDT