Documentation Center

Conditional Text Syntax

Describes the condition syntax using the Extended Backus-Naur Form (EBNF) notation.

EBNF

PrimaryExpr::='(' PrimaryExpr ')' | PrimaryExpr | Expr | PrimaryExpr BoolOperator PrimaryExpr
Expr::=CName EqualityOperator CValue | CName RelationalOperator CValue | CName 'in' '(' CValueList ')'
EqualityOperator::='=' | '=='
RelationalOperator::='<=' | '>='
BoolOperator::='and' | 'or'
CValueList::=CValue | CValue ',' CValueList | '''CValue ''' ',' CValueList
CName::=(Letter | Digit | '.' | '-' | '_')+
CValue::=(Letter | Digit | '.' | '-' | '_' | '+' | space)+
Letter::=[a-zA-Z]
Digit::=[0-9]

Operator precedence

The order of precedence between operators is (lowest precedence first):

  • or
  • and
  • ( )

Condition types

A condition value (CValue) can be a string, a number, a version or a date:

TypeDescription
StringA string is any string not containing the quotation mark used as a delimiter for that string.
NumberThe number conforms to IEEE 754:
  • The number matches the regular expression: -?[0-9]*\.?[0-9]*\s*
  • It must contain at least one digit. This implies that '-' '.' '-.' '' are not valid numbers.
  • The number may be single-quoted. In that case, the part between the single quotes must conform to the above rules. However, we recommend never quoting numbers because this makes numbers more readable.
DateOnly one date format of the ISO 8601 standard is supported: YYYYMMDD. This format is easily readable by software, easily comparable and can be sorted (the date is a number itself), language independent and it has a short notation and constant length.
VersionA string minimally consisting of three numbers, each separated by a dot '.'. A version matches the regular expression: [0-9]+(\.[0-9]+\.[0-9]+)+. So at least two dots and always an even number of dots is required.