RE: pre-defined type names are not keywords

From: Yuri Tsoglin <yurit@cadence.com>
Date: Tue Aug 05 2014 - 13:53:27 PDT
Apparently yes, e_core is mentioned in Annex D.
Here it is, I am quoting:


D.2.5 Reserved type names
One set of types in e is considered essential or core, e.g., int, string, and sys. No reasonable e program
would assign the name of any of those types to a user-defined type. Core types are declared under a special
package called e_core. Within the name space model, e_core type names are reserved. Unlike other type
names, they cannot be used in another package. For more information, see D.3.3.


D.3.3 e_core types
The set of types declared in the built-in package e_core is privileged. Unlike all other types, the names of the
e_core types remain unique, even if they have been added by user extension. When a user tries to define a
type using the name of an e_core type, an error is reported. However, these names are not reserved
keywords; they can be used as identifiers in any other context (variable names, method names, and so on).
The e_core types are: int, uint, byte, bit, bool, string, sys, global, base_struct, any_struct, any_unit, and
event_port.


BTW, it seems that the above list of e_core types is incomplete. For example, “real” is missing.

Also, there are no “reserved keywords” in e in general.
Even keywords which are not e_core type names, are such only in the sense that each one of them has a special meaning in a certain context. But no one of them is reserved, and they may also be used in other contexts.
For example, the word “struct” can be used to define a struct (and in this sense it is a keyword), but it is also allowed to be a name of a type, field, variable, method, and anything else.

Thanks,
Yuri.







-----Original Message-----
From: Cristian Amitroaie [mailto:cristian@amiq.com]
Sent: Tuesday, August 05, 2014 23:07
To: Yuri Tsoglin
Cc: ieee1647@eda.org
Subject: Re: pre-defined type names are not keywords



Hi Yuri,



I think it makes sense.



The question is weather we want users to be able to redefine "int" for

example... BTW, is "e_core" in the standard?



Thanks,

Cristian



On Sunday 03 August 2014 07:29:56 pm Yuri Tsoglin wrote:

> Hi,

>

> I think we should remove type names such as "int", "string", or "sys", from

> the keywords table (section 4.1.5.3 in the current LRM).

>

> These words are just type names, which happen to belong to the "e_core"

> package. In this sense, they are not different from any other pre-defined

> types, which may belong to other packages (e.g. rf_manager or

> any_sequence_driver).

>

> Does this make sense?

>

> Thanks,

> Yuri.

>

>

>

>

> [cid:image002.jpg@01CFAF50.EA6C8A20]

>

> Yuri Tsoglin | e Language team, Specman RnD

>

> P: 972.3.9004305 M: 972.54.6468177 F: 972.3.9004001

> www.cadence.com<http://www.cadence.com>





-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Aug 5 13:56:11 2014

This archive was generated by hypermail 2.1.8 : Tue Aug 05 2014 - 13:56:21 PDT