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:
| Type | Description |
|---|---|
| String | A string is any string not containing the quotation mark used as a delimiter for that string. |
| Number | The number conforms to IEEE 754:
|
| Date | Only 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. |
| Version | A 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. |