The parenthesization of a term slot of a display form is controlled by the parenthesis slot-option of the term slot in the display form definition (the L, E, or * in the 3rd field), by the parens attribute of the display form filling the term slot, and the relative precedences of the term slot itself and the filling term. The precedence of a term slot is usually that of the display form containing it, although it is possible to assign precedences to individual slots. The parenthesis control works as follows:
Note that the L and E options give the behavior you might
expect; if they are used in the definitions of infix display forms for
the arithmetic terms plus(a;b), and times(a;b),
then plus(a;times(b;c)) is displayed as
, but
times(a;plus(b;c)) is displayed as
.
With the L and the E options you can set up an infix term
as being either right or left associative.
The L, E and * characters in the display of term slot formats are display forms for parenthesization control terms.
Table: Slot Options for Parenthesization Control
These terms can be entered using the names shown in
Table
. The parenthesization control terms
also allow the specification of the delimiter characters used for
parenthesization, and a precedence for the individual slot.
No specific editor support has yet been provided for these features.