wiki:NamedVariable

Version 2 (modified by Miloš Jakubíček, 15 years ago) (diff)

conjunction and negation description added

Named Variable

A named variable is tag in form of $nameOfVariable. A variable name can contain alphanumeric symbols, dots or underscores.
The variable valuation must be placed on a newline following the rule in following format:

$nameOfVariable[attribute]: <list of values (constraints) separated by whitespace>

For a variable, only the first following valuation applies. This enables sharing same variable names across the rules.
A variable valuation can consist of several constraints listed each on a new line which are taken in conjunction (logical and).
Negative constraints can be created using the not keyword?.

Example:

$CONJUCTION[word]: for and nor but or yet so -- will match any of the listed words.
$NOTNO[word not]: no -- will match any word except of no.