Pretty Printer for Cocol ATGs - Printy"

Downloads | Features & Screenshots || Go to Coco/R Tools


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

  • Each file starts off with a prologue section, containing several definitions for tokens, pragmas and comments.
  • These declarations are followed by a section named "productions", which contains several production rules based on the EBNF syntax. To allow user defined actions, Coco/R offers the possibility to add instructions as so called "semantic actions".
  • Each file closes with an epilogue.

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#).



Documentation (in german)

Util library (HTML | PDF | XML)
Config library (HTML | PDF | XML)
Controls library (HTML | PDF | XML)
Main application (HTML | PDF | XML)

Printy documentation / console usage


Common screenshot with various paramters

Various parameters for text formatting - in this example a custom indent width is set; furthermore various options for line breaks

Screenshot with advanced paramters

These parameters offer several additional formatting options; for example the space character setting or the option to generate pure EBNF output.