RE: pre-defined type names are not keywords

From: Genadi Osowiecki <geryo@frontier.com>
Date: Tue Aug 05 2014 - 16:26:01 PDT
This is hurting my head, please stop :)

Cheers,

G.

 

From: owner-ieee1647@eda.org [mailto:owner-ieee1647@eda.org] On Behalf Of
Yuri Tsoglin
Sent: Tuesday, August 05, 2014 3:27 PM
To: Silas McDermott; Cristian Amitroaie
Cc: ieee1647@eda.org
Subject: RE: pre-defined type names are not keywords

 

Or

 

unit unit {

     unit;

};

 

Or even

 

type type: [ type ];

 

 

From: Silas McDermott 
Sent: Wednesday, August 06, 2014 00:50
To: Yuri Tsoglin; Cristian Amitroaie
Cc: ieee1647@eda.org <mailto:ieee1647@eda.org> 
Subject: Re: pre-defined type names are not keywords

 

Which reminds me of my favorite e code example ever:

 

struct struct {

  struct;

};

 

Try THAT in a different language!

 

- Silas.

 







 


Silas McDermott   |   AE Director   |   Systems and Advanced Verification


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


 





 

	

 

From: Yuri Tsoglin <yurit@cadence.com <mailto:yurit@cadence.com> >
Date: Tuesday, August 5, 2014 at 1:53 PM
To: Cristian Amitroaie <cristian@amiq.com <mailto:cristian@amiq.com> >
Cc: "ieee1647@eda.org <mailto:ieee1647@eda.org> " <ieee1647@eda.org
<mailto:ieee1647@eda.org> >
Subject: RE: pre-defined type names are not keywords

 

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 <mailto: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
<mailto: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  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> 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.




image001.png image002.png
Received on Tue Aug 5 16:26:52 2014

This archive was generated by hypermail 2.1.8 : Tue Aug 05 2014 - 16:26:56 PDT