Shalom, I don't think this is legal (or really should be). The LRM has: package_scope ::= package_identifier :: | $unit :: and "import" requires a package_identifier, it doesn't go through the "package_scope" production. So the grammar currently does not allow import from $unit. I think that is appropriate conceptually and in practice. $unit is very special -- there are a bunch of special rules regarding function and non-function name resolution for $unit that don't apply to normal packages. The assumption of "import" is that a package is complete and that one can import *any* direct identifier from the package. But $unit may not yet be complete so if one wanted import from $unit, we'd have to define another set of special rules that would deal with forward visibility issues; essentially that an import could only be equivalent to a legal direct reference. The only reason to have import of $unit in any case would be to have a shortcut for $unit::<ident> in nested scopes where there are a large number of intervening "hiding" declarations that you wanted to skip over in the lexical search. Since this *is* a lexical search, I would suggest that such code is very badly structured and that I'm certainly not willing to further convolute the standard to make such a style easier to write. Gord. Bresticker, Shalom wrote: > Is it allowed to do an import (specific or wildcard) from $unit? > > E.g., > import $unit::b ; > or > import $unit::* ? > > What about from std? > > Thanks, > Shalom > > ------------------------------------------------------------------------ > *From:* owner-sv-bc@server.eda.org > [mailto:owner-sv-bc@server.eda.org] *On Behalf Of *Brad Pierce > *Sent:* Monday, July 21, 2008 12:06 PM > *To:* sv-bc@server.eda.org > *Subject:* RE: [sv-bc] Mantis 1809 > > Proposal is attached for easier review. > > > > n Brad > > > > *From:* owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] *On Behalf > Of *Rich, Dave > *Sent:* Monday, July 21, 2008 4:56 PM > *To:* sv-bc@eda.org > *Subject:* [sv-bc] Mantis 1809 > > > > New proposal uploaded and should be reviewed. It’s very late. > > > > David Rich > Verification Technologist > Design Verification & Test Division > Mentor Graphics Corporation > dave_rich@mentor.com > Office: 408 487-7206 > Cell: 510 589-2625 > > > > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>, > and is > believed to be clean. > > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>, > 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* <http://www.mailscanner.info/>, and is > believed to be clean. -- -------------------------------------------------------------------- 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 Mon Jul 21 07:27:18 2008
This archive was generated by hypermail 2.1.8 : Mon Jul 21 2008 - 07:28:06 PDT