25.07.2014 Views

VDM-10 Language Manual

VDM-10 Language Manual

VDM-10 Language Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix C. Operator Precedence<br />

precedence level connective<br />

1 <br />

2 =><br />

3 or<br />

4 and<br />

5 not<br />

C.6 The Family of Constructors<br />

This family includes all the operators used to construct a value. Their priority is given either by<br />

brackets, which are an implicit part of the operator, or by the syntax.<br />

C.7 Grouping<br />

The grouping of operands of the binary operators are as follows:<br />

Combinators: Right grouping.<br />

Applicators:<br />

Left grouping.<br />

Connectives: The ‘=>’ operator has right grouping. The other operators are associative and<br />

therefore right and left grouping are equivalent.<br />

Evaluators: Left grouping 1 .<br />

Relations:<br />

No grouping, as it has no meaning.<br />

Constructors: No grouping, as it has no meaning.<br />

C.8 The Type Operators<br />

Type operators have their own separate precedence ordering, as follows:<br />

1. Function types: ->, +> (right grouping).<br />

2. Union type: | (left grouping).<br />

3. Other binary type operators: * (no grouping).<br />

4. Map types: map . . . to . . . and inmap . . . to . . . (right grouping).<br />

5. Unary type operators: seq of, seq1 of, set of.<br />

1 Except the “map domain restrict to” and the “map domain restrict by” operators which have a right grouping. This is<br />

not standard.<br />

209

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!