%
% $Id: manual-intro.tex,v 1.3 1994/10/27 18:30:33 gaertner Exp $
%
% Introduction to the pretzel user's manual.
%

\chapter{Introduction}


Prettyprinting of source code is a field of heated debate in
the programming community. People like it, because of the
distinguished appearance of programs and feel that prettyprinting
is a contribution towards the understandability of source code.
Others however tend to dislike prettyprinting. They say that
different typefaces distract the reader's attention and that it
is hard to adjust to a new set of formatting rules with every
new program read.

A weak point of most prettyprinters was that they weren't flexible,
i.e.~the special way of formatting that they used was hard wired
into their guts and not easily changable. Research in this area
however has shown, that the style of prettyprinting a given
language can be specified on an abstraction level similar to
the language grammar or even above. This makes way for programs,
that can build prettyprinters automatically from such abstract
specifications. ``Pretzel'' is one such program. With pretzel you
can build {\em prettyprinting parsers} (or parsing prettyprinters,
as you like it), which are a special class of prettyprinters.
Building prettyprinters that conform with your own taste of
formatting has never been so easy. Don't however try to find
the ``perfect'' way of formatting a certain language --- remember
that this heavily depends on personal taste. After all, the author's
dictionary defines ``pretty'' as ``charming in the minor details of
appearance, but lacking the final touches of beauty.''


\bigskip\noindent This ist the user's manual for pretzel. It contains
all technical information needed to write and generate prettyprinters
for any programming language you like. However, it doesn't explain the
prettyprinting method used by the generated prettyprinter. This
document is meant as a reference for pretzel users, who already know
about this method and are sitting near a computer terminal ready to
start. Novices are requested to look at the main documentation of this
project, where this method is explained. You should be familiar with
the meanings of the words ``format command primitive'' and know, which
ones pretzel-prettyprinters can understand.

The following chapter describes the technical details of pretzel.  It
starts with an overview over the concepts of pretzel and explains the
format of the input files that pretzel generates the prettyprinter
from. After that you can read all about how to invoke pretzel
correctly and all the remaining steps to get an executable version of
the prettyprinter you desire. Finally, this document contains a
complete example of a pretzel prettyprinter, in this case it is a
simple one for \PASCAL.



\section{Other Sources of Information}

The main part of this document was taken from the report ``building
a language independent prettyprinter'', which is the main documentation
of the pretzel project. It describes all issues involved in the design
of the system, including a survey of prettyprinting algorithms and
a detailed description of the prettprinting mechanism used by the
programs that pretzel generates.

For people who want to try the system immediately there's a ``getting
started'' section in the {\tt README} file of the distribution. This
tells you how to install pretzel and test the given example
prettyprinter for \PASCAL.


\section{Why ``pretzel''?}

Is there a special significance behind the name ``pretzel''? No, there
isn't!  To be honest, I had severe problems in finding something
appropriate, but looking at my dictionary I had an idea! The system
here is a generator for prettyprinters, i.e.~it is more than a
prettyprinter.  Looking for more about the word ``pretty'' I came
across ``pretzel'', which was the word that immediately followed it
(at least in my dictionary).


\section{Author}

Author of pretzel is Felix G\"artner. If you have problems with
the program or need further information send email to:
$$\hbox{\verb+theedge@rbg.informatik.th-darmstadt.de+}$$


%
% $Log: manual-intro.tex,v $
% Revision 1.3  1994/10/27  18:30:33  gaertner
% Added a passage that you _must_ know format command primitives
% before reading the manual.
%
% Revision 1.2  1994/10/25  16:00:12  gaertner
% Added introduction paragraph and sections about further information,
% the name of the game and the author.
%
% Revision 1.1  1994/10/24  19:10:11  gaertner
% Initial revision
%
%


