An expression is the form in which a value is used in Malaga. Values can be written as follows:
[Surf: "he", Class: Pron, Case&Number: S3]
Variables (these are placeholders for values within a rule) can as well be used as expressions:
$Pron
Furthermore, constants (placeholders for values in a rule file) can be used as expressions:
@combination_table
All three forms can be mixed:
[Surf: "he", Class: Pron, Case&Number: $result]
Furthermore, there are operators which modify values or combine two
values to form a new value. Complex values can be composed using those
operators. All operators have a priority assigned. An operator with
higher priority is applied before an operator with lower priority. If
two operators have the same priority, they are applied from the left to
the right. The order in which the operators are to be applied can be
changed by bracketing with round parentheses ()
.
-
.
*
, /
+
, -