|
|
Re: [TCS] More than one syntax construction per class AND optional keywords [message #380838 is a reply to message #380836] |
Tue, 08 January 2008 11:33 |
Eclipse User |
|
|
|
Originally posted by: quentin.glineur.obeo.fr
This is a multi-part message in MIME format.
--------------030105070206010408000408
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi Gustavo,
As far as I know, the square brakets are only for model to text
production. The alternatives should work without them.
For optional elements, the question mark is used.
For example:
--KM3
class NounNamePlural {
attribute name : String;
attribute plural[O..1] : String;
}
--TCS
template NounNamePlural addToContext :
(
isDefined(plural)?
name "is a noun and its plural form is " plural "." :
name "is a noun and its plural form is " name "s."
)
;
Quentin GLINEUR
Gustavo Cabral a
|
|
|
|
Re: [TCS] More than one syntax construction per class AND optional keywords [message #611155 is a reply to message #380836] |
Tue, 08 January 2008 11:33 |
Eclipse User |
|
|
|
Originally posted by: quentin.glineur.obeo.fr
This is a multi-part message in MIME format.
--------------030105070206010408000408
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi Gustavo,
As far as I know, the square brakets are only for model to text
production. The alternatives should work without them.
For optional elements, the question mark is used.
For example:
--KM3
class NounNamePlural {
attribute name : String;
attribute plural[O..1] : String;
}
--TCS
template NounNamePlural addToContext :
(
isDefined(plural)?
name "is a noun and its plural form is " plural "." :
name "is a noun and its plural form is " name "s."
)
;
Quentin GLINEUR
Gustavo Cabral a
|
|
|
Powered by
FUDForum. Page generated in 0.02974 seconds