Text not verified for kermeta 2 | |
---|---|
The following keywords are used by Kermeta textual syntax.
Note | |
---|---|
If you want to name some class or property using those names,
you'll
need to escape them using the
~ (tilda).Ex:
|
Keyword |
Usage |
---|---|
@pre |
Represents self before the call to this operation in the scope of a post condition. See Section 2.21.1.1, “pre – post conditions syntax” |
abstract |
Modifier for class or operation |
alias |
Definition of a primitive type |
and |
Boolean expression |
aspect |
Modifier for class. Indicates that the class reopen another class. See Section 2.22, “ Weaving Kermeta code ” |
attribute |
Definition of an attribute |
bag | |
class |
Definition of a class |
do |
Beginning of a block |
else |
Else part of a conditional instruction |
end |
End of a block |
enumeration |
Definition of an enumeration |
extern |
Call of a java static operation |
false |
Boolean literal |
from |
Loop instruction |
function |
Declares a local function |
getter |
Declaration of a property getter |
if |
Conditional instruction |
inherits |
Declartion of the super classes of the class |
init |
Initialization of a variable. In Kermeta 2, this can be replaced by
|
inv |
Declaration of an invariant. See Section 2.21.1.2, “Invariant constraint syntax” |
is | part of the declaration of an operation or method. See Section 2.8.2, “Defining operations” |
loop |
Loop instruction |
method |
Redefinition of an operation. See Section 2.8.2, “Defining operations” |
modeltype |
Definition of a modeltype. |
not |
Boolean expression |
operation |
Declaration of an operation. See Section 2.8.2, “Defining operations” |
or |
Boolean expression |
oset | |
package |
Declaration of package |
post |
Declaration of a postcondition. See Section 2.21.1.1, “pre – post conditions syntax” |
pre |
Declaration of a precondition. See Section 2.21.1.1, “pre – post conditions syntax” |
property |
Declaration of a derived property |
raise |
Throw an exception |
raises |
Declares the exception that an operation can throw |
readonly |
Modifier for properties |
reference |
Declaration of a reference |
rescue |
Catch an excetion |
result |
Special variable used for the return value of an operation. See Section 2.8.2, “Defining operations” |
setter |
Declaration of property setter |
self |
Special varaible representing this instances |
set | |
seq | |
singleton |
Definition of a singleton class. See Section 2.17, “ Singleton class ” |
super |
Call to the super operation |
then |
Then part of a conditional instruction |
true |
Boolean literal |
until |
Loop condition |
using |
Shortcut used to avoid to write the full qualified name |
value |
Special variable used in getter and setter to represent the actual value of the property |
var |
Declaration of a variable |
void |
Void literal |