Using punctuation to avoid ambiguity
Use commas or parentheses to avoid building rules that would otherwise have multiple
interpretations.
Ambiguities occur when part of a rule has at least two interpretations that are semantically correct, or when there are two identical terms or phrases in the vocabulary.
For example, the following statement is ambiguous:
if all of the following conditions are true : - the category of customer is Gold - the age of customer is less than 15 and the salary of customer is more than 100
The editor raises an ambiguity error because it cannot tell whether the salary of the customer is more than 100 is associated with
the age of the customer is at most 15, or whether it is
the third condition of the rule.
To remove the ambiguity, you can add a comma at the end of the the age of the customer is less than 15 condition statement:
if all of the following conditions are true : - the category of customer is Gold - the age of customer is less than 15, and the salary of customer is more than 100
An alternative way to remove ambiguity is to use parentheses to group expressions:
if (all of the following conditions are true : - the category of customer is Gold - the age of customer is less than 15) and the salary of customer is more than 100