ATL: reserved keyword name clash [message #82701] |
Thu, 29 May 2008 19:02 |
Eclipse User |
|
|
|
Originally posted by: min.kong.morganstanley.com
Hi,
In my input metamodel called "model", I have oclTypes with names:
"Integer", "Boolean", "String".
In a rule that I want to execute, I have, for instance:
if (self.oclIsKindOf(model!Integer))....
^^^^^^^^^^^^^
This line is invalid, because ATL doesn't consider modx!Integer a valid
oclType NAME, as "Integer" is a reserved keyword.
How should one get around problem like this, where in a metamodel, some
oclType names clash with ATL reserved keywords?
Thanks,
Min
|
|
|
Re: ATL: reserved keyword name clash [message #82802 is a reply to message #82701] |
Fri, 30 May 2008 07:35 |
Eclipse User |
|
|
|
Originally posted by: r.c.ladan.tue.nl
Min wrote:
> Hi,
>
> In my input metamodel called "model", I have oclTypes with names:
> "Integer", "Boolean", "String".
>
> In a rule that I want to execute, I have, for instance:
>
> if (self.oclIsKindOf(model!Integer))....
> ^^^^^^^^^^^^^
> This line is invalid, because ATL doesn't consider modx!Integer a valid
> oclType NAME, as "Integer" is a reserved keyword.
>
> How should one get around problem like this, where in a metamodel, some
> oclType names clash with ATL reserved keywords?
>
The easiest solution would be to change the metamodel, if that is possible.
Rene
|
|
|
Re: ATL: reserved keyword name clash [message #82851 is a reply to message #82802] |
Fri, 30 May 2008 08:35 |
William Piers Messages: 302 Registered: July 2009 |
Senior Member |
|
|
Hello,
There is another workaround you can try :
model!"Integer" instead of model!Integer
Regards,
William
Rene Ladan a écrit :
> Min wrote:
>> Hi,
>>
>> In my input metamodel called "model", I have oclTypes with names:
>> "Integer", "Boolean", "String".
>>
>> In a rule that I want to execute, I have, for instance:
>>
>> if (self.oclIsKindOf(model!Integer))....
>> ^^^^^^^^^^^^^
>> This line is invalid, because ATL doesn't consider modx!Integer a
>> valid oclType NAME, as "Integer" is a reserved keyword.
>>
>> How should one get around problem like this, where in a metamodel,
>> some oclType names clash with ATL reserved keywords?
>>
> The easiest solution would be to change the metamodel, if that is possible.
>
> Rene
|
|
|
|
Powered by
FUDForum. Page generated in 0.24203 seconds