EditorDoc Sections Nuprl Doc
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html
Parenthesis Generation.

When a term is displayed, whether a subterm is parenthesized (and what parenthesization consists of) is determined by the partial order of "precedence" between individual display forms, together with some stipulations given for the parent and child display forms. It is key that precedence is a relation not between operators, and not between DISP objects, but rather between individual display forms.

The precedence relation is determined by data taken from the display form attributes sequences, and from the LAT objects of the library. (LAT is a misnomer used because the original precedence relation was a lattice.)

For explanation of precedence, doc for precedence.

The determination of whether to parenthesize is made not only on the basis of the precedence relation, but also on whether the inner term display is an "open" or a "closed" form, and on further stipulations given in the outer display for when to parenthesize its children.

Avoiding Parenthesization.
A "closed" display form will never be parenthesized; a display form is declared "open" by including *Open form* among its attributes. (Using `(backspace)' on the display spec will toggle whether *Open form* is included.)
A display form can be declared "insensitive" to a child, in which case the child will simply not be parenthesized. Such insensitivity is indicated by using * in the attributes field of the child format <[?]:[prompt]:<child attributes>>, which will then be displayed as <[?]:[prompt]>.

If the parent is sensitive to a child, and the child display form is open and unrelated to the parent form by the partial order of precedence, then the child WILL be parenthesized.

Parenthesizing precedence-related children: doc for parentheses2 IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html

EditorDoc Sections Nuprl Doc