Box Language

XT -- A Bundle of Program Transformation Tools

Introduction

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:

/pub/Tools/BoxLanguage/box.gif

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.

/pub/Tools/BoxLanguage/space-opts.gif

For a detailed description of Box (including a description of all available Box operators) we refer to http://www.cs.uu.nl/groups/ST/twiki/bin/view/Merijn/PaperPrettyPrintingForSoftwareReengineering

Documentation

Publications


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