Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » make String type attributes to be unique
make String type attributes to be unique [message #896500] Wed, 18 July 2012 14:37 Go to next message
frank fotso is currently offline frank fotsoFriend
Messages: 91
Registered: May 2012
Member
hi,

i have donne my dsl grammar and i have used the Estring type as follow:

  
     CHANNEL returns spi::CHANNEL:
	'CHANNEL'
	'{'
		'Name' Name=EString
		'ChannelType' ChannelType=EString
		('DataWidth' DataWidth=EBigInteger)?
		('DefaultData' DefaultData=EBigInteger)?
		('EbMaxLength' EbMaxLength=EBigInteger)?
		('IbNBuffers' IbNBuffers=EBigInteger)?
		'TransferStart' TransferStart=EString
		'channelreflink' '{' channelreflink+=CHANNEL_REF ( "," channelreflink+=CHANNEL_REF)* '}' 
    '}';

JOB_REF returns spi::JOB_REF:
	'JOB_REF'
	'{'
		'Name' Name=EString
    '}';

CHANNEL_REF returns spi::CHANNEL_REF:
	'CHANNEL_REF'
	'{'
		'Name' Name=EString
    '}';

RSTMON returns swsec::RSTMON:
	{swsec::RSTMON}
	'RSTMON'
	'{'
		('WarmResetCounter' WarmResetCounter=EBigInteger)?
		('DelayBeforeWRCounterReset' DelayBeforeWRCounterReset=EBigInteger)?
    '}';


EString returns ecore::EString:
	 ID;


and i want every name enter to be unique , i have used the Id since is pecialized to make name uniq , but that is not working.

any ideas on what can be the problem?
Re: make String type attributes to be unique [message #896515 is a reply to message #896500] Wed, 18 July 2012 15:44 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Maby your problem is that you use 'Name' instead of 'name' as the name
of the name-feature?

- henrik

On 2012-18-07 16:37, frank fotso wrote:
> hi,
>
> i have donne my dsl grammar and i have used the Estring type as follow:
>
>
> CHANNEL returns spi::CHANNEL:
> 'CHANNEL'
> '{'
> 'Name' Name=EString
> 'ChannelType' ChannelType=EString
> ('DataWidth' DataWidth=EBigInteger)?
> ('DefaultData' DefaultData=EBigInteger)?
> ('EbMaxLength' EbMaxLength=EBigInteger)?
> ('IbNBuffers' IbNBuffers=EBigInteger)?
> 'TransferStart' TransferStart=EString
> 'channelreflink' '{' channelreflink+=CHANNEL_REF ( ","
> channelreflink+=CHANNEL_REF)* '}' '}';
>
> JOB_REF returns spi::JOB_REF:
> 'JOB_REF'
> '{'
> 'Name' Name=EString
> '}';
>
> CHANNEL_REF returns spi::CHANNEL_REF:
> 'CHANNEL_REF'
> '{'
> 'Name' Name=EString
> '}';
>
> RSTMON returns swsec::RSTMON:
> {swsec::RSTMON}
> 'RSTMON'
> '{'
> ('WarmResetCounter' WarmResetCounter=EBigInteger)?
> ('DelayBeforeWRCounterReset'
> DelayBeforeWRCounterReset=EBigInteger)?
> '}';
>
>
> EString returns ecore::EString:
> ID;
>
> and i want every name enter to be unique , i have used the Id since is
> pecialized to make name uniq , but that is not working.
>
> any ideas on what can be the problem?
Previous Topic:Replacing the standard EMF/JET based code generator
Next Topic:Adding metadata to emf AST before generator/validator phase?
Goto Forum:
  


Current Time: Mon Aug 10 08:48:23 GMT 2020

Powered by FUDForum. Page generated in 0.01877 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top