EditorDoc Sections Nuprl Doc
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html
Parenthesizing a child according to its precedence. doc for parentheses

Assume the parent is sensitive to this child, and that the child is an open form.

Whether parentheses will be inserted depends upon the precedence between the child display forms and parent (or rarely, some other form), and upon the parenthesization attribute specified in the child format command.

(<self) parenthesize the child if it has lower precedence than the parent.
 
(self) parenthesize the child if it has precedence the same as or lower than the parent.
 
(<[ob].[name]) parenthesize the child if it has lower precedence than the indicated display form.
 
([ob].[name]) parenthesize the child if it has precedence the same as or lower than the indicated display form.

(Also, each of these will parenthesize an open child of unrelated precedence.)

The latter two forms are not used much, since it's usually the precedence between the two display forms in question that is relevant, rather than some other form.
For how to name display forms with these forms, see doc for precedence.

It is not necessary to use "(" and ")" as the parens; the choice of open- and close-parens text is specific to the display child format command. Deleting these characters from (<self) gives [left par]<self[right par].

Example: Here is the typical form for left-associativity.

Model: <model> Attrs: *Open form* | <[?]:[prompt]:(<self)><Formats><[?]:[prompt]:(self)> _______________________

It would be an open form, and would tolerate itself as a left-child without parenthesizing, but would parenthesize itself as a right-child. IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html

EditorDoc Sections Nuprl Doc