This site's content was compiled from 1993 to 2006. Beyond that, Google is your friend.
Franck Arnaud
Traf is a very compact Eiffel pretty printer, for HTML 2.0 and Basser Lout.
Traf can be used both as a command line program or as a library. It can be easily customised for other formats.
Traf takes Eiffel source code on the standard input and delivers formatted text on the standard output.
It should be easily portable to most Eiffel compilers. The brute force approach to parsing implies that it should display any Eiffel-like code correctly, even if it wouldn't go through a proper parser, which is convenient for code extracts for instance.
The root class is TRAF with the creation procedure make. EIFFEL_PRINT is a deferred class which does the actual analysis, effective heirs like EIFFEL_HTML simply need to effect a few deferred features to do the actual output.
Two formats are provided EIFFEL_HTML, for basic HTML and EIFFEL_LOUT for Basser Lout format. The corresponding options on the command line are -html and -lout, the former being the default. New formats can be added in the root class' creation procedure.
The output style is the recommended style from ETL.
HTML output is displayed with a monospaced font using <pre> because there is no standard way to do indentation in standard HTML 2.0. The output is for inclusion into a complete page and not a stand alone document, as there is no structure markup (<head>, <body>, etc).