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.19.1.1, “pre – post conditions syntax” |
abstract | Modifier for class or operation |
alias | Definition of a primitive type |
and | Boolean expression |
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 |
inv | Declaration of an invariant. See Section 2.19.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.19.1.1, “pre – post conditions syntax” |
pre | Declaration of a precondition. See Section 2.19.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 |
require | Declaration of a required file |
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 | |
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 |