logo of the SSW institute ;)
Computer Science
System Software

Home

General
Staff
Contact
Partners
Alumni

Research
Areas
Projects
Papers
Books
Reports
Awards

Teaching
Lectures
Exams
B.Projects
M.Theses
PhD Theses
Go Abroad

Misc
Talks
Library
Gallery
Links
Search

Webmaster


Pretty Printer for Cocol ATGs - Printy"

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

Description

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.

Preconditions

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

Developers

Downloads

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

Features/Screenshots

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.