Box Language

XT -- A Bundle of Program Transformation Tools


The Box language is used in the generic pretty print framework as an language-independent intermediate representation. The input language dependent parts and the output format dependent parts of GPP are connected through this intermediate representation. Box is a mark-up language to describe the intended layout of text and is used in pretty print tables.

A Box expression is constructed by composing sub-boxes using Box operators. These operators specify the relative ordering of boxes. Examples of Box operators are the H and V operator which format boxes horizontally and vertically, respectively:


The exact formatting of each Box operator can be customized using Box options. For example, to control the horizontal layout between boxes the H operator supports the hs space option.


For a detailed description of Box (including a description of all available Box operators) we refer to



Tools.BoxLanguage moved from Stratego.BoxLanguage on 09 Feb 2004 - 14:21 by MartinBravenboer - put it back