Type for variable [message #1731625] |
Sun, 08 May 2016 08:21 |
Parisa Moosavi Messages: 81 Registered: June 2015 |
Member |
|
|
Hi,
I have the following rule for definig variable
Variable returns Variable:
(changeable?='changeable')?
scope=Scope
(eType=[ecore::EClassifier|QualifiedName])?
name=EString
('=' defaultValue=EString)?
'{'
('ordered' ordered=EBoolean)?
('unique' unique=EBoolean)?
('lowerBound' lowerBound=EInt)?
('upperBound' upperBound=EInt)?
('value' value=[ecore::EObject|EString])?
('eAnnotations' '{' eAnnotations+=EAnnotation ( "," eAnnotations+=EAnnotation)* '}' )?
('eGenericType' eGenericType=EGenericType)?
'}';
its DSl looks like as following
variables{
LOCAL ecoreI.Begriff Begriff{},
LOCAL ecoreI.BildAnlegen BildAnlegen{},
//LOCAL EString TRUE{},
LOCAL ecoreI.BegriffContainer BegriffContainer{},
LOCAL ecoreI.Bild Bild = ""{},
LOCAL ecoreI.AudioAnlegen AudioAnlegen{},
LOCAL ecoreI.Audio Audio{},
LOCAL ecoreI.AntwortenAnlegen AntwortenAnlegen{},
LOCAL ecoreI.Antwort AntwortListe {upperBound -1},
LOCAL ecoreI.Antwort Antwort = ""{},
//LOCAL "EBooleanObject" Ergebnis {},
LOCAL ecoreI.Thema Thema {},
//LOCAL "EString" EIGENES = "Eigenes"{},
LOCAL ecoreI.BegriffEingabe BegriffEingabe {}
}
I want to be able to define a variable of type a class which is possible now and also as Type Int or String and ... but it's not possible now. How should I change this line ?
(eType=[ecore::EClassifier|QualifiedName])?
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02455 seconds