[ATL] Full reference to a metamodel class [message #78965] |
Sat, 12 April 2008 19:07  |
Eclipse User |
|
|
|
Dear all,
I'm writing the following transformation rule based on the
information provided in
http://wiki.eclipse.org/index.php/ATL_FAQ#Full_name_referenc e_to_metamodel_classes
rule ADT {
from
dc : enumerationDC!DCEnum
to
coopnmodule: COOPNMetaModel!COOPNMetaModel::ADTModule::COOPNADT(
name<- 'MyCOOPNModule'
)
}
I get the error "No viable alternative at input :" in
"COOPNMetaModel!COOPNMetaModel:"
My Metamodel is named "COOPNMetaModel and is defined as follows:
package COOPNMetaModel {
class Module {...}
package ADTModule {
class COOPNADT {
attribute name : String;
}
}
}
Shouldn't my rule work? Any hint how to solve this problem?
Thanks very much in advance for your time.
Best regards,
Luis Pedro
|
|
|
|
Re: [ATL] Full reference to a metamodel class [message #79048 is a reply to message #78974] |
Mon, 14 April 2008 05:42  |
Eclipse User |
|
|
|
Thank you for the quick update. It works for me now.
Best regards,
Luis Pedro
William Piers wrote:
> Hello,
>
> In fact the MM!pck1::pck2::ME form isn't well recognized by the ATL
> parser...
> So you need to use the " around the model element location expression :
> MM!"pck1::pck2::ME"
>
> in your case :
> COOPNMetaModel!"COOPNMetaModel::ADTModule::COOPNADT"
>
> I updated the wiki, thanks for reporting this error !
>
> Best regards,
>
> William
>
> Luis Pedro a écrit :
>> Dear all,
>> I'm writing the following transformation rule based on the
>> information provided in
>> http://wiki.eclipse.org/index.php/ATL_FAQ#Full_name_referenc e_to_metamodel_classes
>>
>>
>> rule ADT {
>>
>> from
>> dc : enumerationDC!DCEnum
>> to
>> coopnmodule: COOPNMetaModel!COOPNMetaModel::ADTModule::COOPNADT(
>> name<- 'MyCOOPNModule'
>> )
>> }
>>
>> I get the error "No viable alternative at input :" in
>> "COOPNMetaModel!COOPNMetaModel:"
>>
>> My Metamodel is named "COOPNMetaModel and is defined as follows:
>>
>> package COOPNMetaModel {
>>
>> class Module {...}
>>
>> package ADTModule {
>> class COOPNADT {
>> attribute name : String;
>> }
>> }
>> }
>>
>> Shouldn't my rule work? Any hint how to solve this problem?
>>
>> Thanks very much in advance for your time.
>>
>> Best regards,
>>
>> Luis Pedro
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03877 seconds