Vocabulary properties

In the vocabulary file, you define properties, such as precedence and sortIndex to specify terms and phrases that verbalize the boot BOM.

Vocabulary properties are defined in a vocabulary file (_<locale>.voc) that stores the verbalization data for the BOM. You have one vocabulary file per locale.

Property Element Value Description
sortIndex Static reference Number

The sort Index property specifies the order in which the constants verbalized in the vocabulary are displayed in the rule editor.

If the sorting is locale-specific, you must specify it in the vocabulary file.

The first day of the week can vary depending on the country. In the following example, you set Day of week Monday in the first position:

ilog.rules.brl.DayOfWeek.Monday#label = Monday

ilog.rules.brl.DayOfWeek.Monday#sortIndex = 1

precedence Sentence Formatted string

You can set the precedence property on phrases (sentences) to help the rule language parser disambiguate expressions, such as arithmetic or Boolean expressions.

The value of the precedence property is composed of three parts separated by a colon:
  • Description of the operator
  • Associativity
  • Level of precedence

The following example indicates the precedence for the sentence plus on a number:

ilog.rules.brl.Number.plus(ilog.rules.brl.Number)#sentence.operator = {this} + {0}

ilog.rules.brl.Number.plus(ilog.rules.brl.Number)#sentence.operator.precedence = 1-1:left:100

In this example, the precedence values have the following meaning:
  • 1-1: The indices of the words that represent the operator in the text property.
  • left: The associativity of the operator. The operator is left associative. The possible values are nonassoc, left or right.
  • 100: The level of priority.