Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EOL] Ennumerator with reserved keyword(Accesing an ennumerator value that is an EOL reserved keyword)
[EOL] Ennumerator with reserved keyword [message #655136] Fri, 18 February 2011 08:16 Go to next message
Horacio Hoyos is currently offline Horacio Hoyos
Messages: 151
Registered: October 2009
Senior Member

Hello,

I am transforming a sysml model and for the specific case of FlowPorts the direction attribute is an ennumerator which has three values: inout=0, in=1 and out=2. The problem is that if I use the EOL syntax for accesig ennumeratos for the specific case of the "in" case, as in:

xxx.select(p : sysmlModel!FlowPort | p.direction = sysmlModel!FlowDirection#in);

The "in" is recognized as the EOL reserved keyword and I get a sytnax error. Is there another way to acces ennumerators or a way to avoid this behavior?

Thanks,



Horacio Hoyos Rodriguez
EngD Student
University Of York
Re: [EOL] Ennumerator with reserved keyword [message #655167 is a reply to message #655136] Fri, 18 February 2011 09:27 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen Zschaler
Messages: 228
Registered: July 2009
Senior Member
Hi Horacio,

Backticks are usually the way to do this, as in:

xxx.select(p : sysmlModel!FlowPort | p.direction =
sysmlModel!FlowDirection#`in`);

Cheers,

Steffen

On 18/02/2011 13:16, Horacio wrote:
> Hello,
>
> I am transforming a sysml model and for the specific case of FlowPorts
> the direction attribute is an ennumerator which has three values:
> inout=0, in=1 and out=2. The problem is that if I use the EOL syntax
> for accesig ennumeratos for the specific case of the "in" case, as in:
>
> xxx.select(p : sysmlModel!FlowPort | p.direction =
> sysmlModel!FlowDirection#in);
>
> The "in" is recognized as the EOL reserved keyword and I get a sytnax
> error. Is there another way to acces ennumerators or a way to avoid
> this behavior?
>
> Thanks,
>
>
Re: [EOL] Ennumerator with reserved keyword [message #655173 is a reply to message #655167] Fri, 18 February 2011 09:42 Go to previous message
Horacio Hoyos is currently offline Horacio Hoyos
Messages: 151
Registered: October 2009
Senior Member

Steffen,

In deed they do! Domo arigatoo Mr. Roboto


Horacio Hoyos Rodriguez
EngD Student
University Of York
Previous Topic:Code Beautifier
Next Topic:On ConstraintsBinding for Model validation with EVL
Goto Forum:
  


Current Time: Sat Jul 26 05:28:11 EDT 2014

Powered by FUDForum. Page generated in 0.02738 seconds