-
Notifications
You must be signed in to change notification settings - Fork 1
DeJonge Box Meta model
Firstly, the box meta-model was published in the A Pretty Printer for Every Occasion paper written by Merijn de Jonge and after its definition was refined in author's doctoral thesis. The paper and doctoral thesis deal with the theory of generic pretty printers similarly like the source of the previous box meta-model. The paper also deals with an application of the theory where the subject is to nicely pretty-print input data stored in XML.
As M. de Jonge refers to the Stratego/XT project and the paper written by M. van den Brand and E. Visser, which were mentioned above, some similarities with the Stratego/XT and Brand-Visser box meta-models can be found. The syntax of a textual usage of a box meta-model is the same like in the other two box meta-models. Several of the same operators and its parameters are contained in this meta-model.
- H - The operator aligns inner boxes horizontally exactly like the H operator from the Stratego/XT and Brand-Visser box meta-model. The hs parameter also belongs to the operator with the same functionality.
- V - The operator aligns inner boxes vertically exactly like the V operator from the Stratego/XT and Brand-Visser box meta-model. The parameters vs and is also belongs to the operator with the same functionality.
- HV - The operator aligns boxes as the same operator from the Brand-Visser box meta-model. The parameters hs and vs also belong to the operator with the same functionality. The operator has one extra parameter is for indentation of the second and next lines against the first as with the V operator.
- A - The operator aligns inner boxes into a table exactly like the A operator from the Stratego/XT box meta-model. The operator also exploits the R operator in order to define rows of the table and it is also tied with the parameters hs, vs and is, which perform the same function like in the Stratego/XT box meta-model.
- R - This operator serves as subsidiary operator for the A operator. The R operator defines rows of a table exactly like in the Stratego/XT box meta-model.
- ALT - The operator represents a generalization of the operator HOV known from the Brand-Visser box meta-model. The HOV operator aligns boxes horizontally or vertically according to whether the horizontally alignment does not exceed the maximum line size; the ALT operator uses the first inner box as a result when the first inner box does not exceed the maximum line size, otherwise the operator similarly uses a next inner box under the same condition. If the box is last in a sequence of inner boxes, the box does not have to satisfy the condition in order to be used. Thus the identical behavior of the HOV operator can be replaced by using the ALT operator and by using the operators H and V that represent the first and the second inner boxes. Furthermore, the inner operators have to have the same inner boxes.
- F - The operator is dedicated to specify a font configuration. The specified font configuration are further associated with the text of inner boxes.
- KW - The operator associates a font indicating keywords with the text of inner boxes.
- VAR - The operator associates a font indicating variables with the text of inner boxes.
- NUM - The operator associates a font indicating numbers with the text of inner boxes.
- MATH - The operator associates a font indicating mathematical symbols with the text of inner boxes.
- LBL - The operator serves to define a label for inner boxes.
- REF - The operator serves to refer to a labeled box.
- C - The operator serves to represent lines of code and format them.