Pretty Printer for Cocol ATGs - Printy"
The compiler generator Coco/R offers the possibility for software developers to generate scanners and parsers based upon attributed grammar files.
Printy's view of attributed grammar (atg) files
The major task of Printy is to format the "productions" section of atg files. There are several parameters to affect the output of a production rule, like on which positions line breaks must be set or whether parenthesis should be used for alternative lists and so on. Furthermore there are options for line numbering and explicit EBNF only mode. Moreover Printy provides an option for extended XHTML formatting, with configurable usage of cascading style sheets (CSS).
Printy can be used in two different ways: on the one hand there is a command line tool for manual parameter input. On the other hand there is a graphical user interface to relieve the usage of Printy.
To use Printy, Microsoft .NET-Framework (version 1.1 or higher) is required, which also has been used for the development (Printy is written in C#).
Various parameters for text formatting - in this example a custom indent width is set; furthermore various options for line breaks
These parameters offer several additional formatting options; for example the space character setting or the option to generate pure EBNF output.