1 PP
PP - the Pascal Pre-processor (or "Pretty Pascal")

PP takes a  DEC  Pascal  source  file  and  performs  a  number  of text
standardization tasks on it.

PP identifies four different types of symbols (or "tokens"):

   - tokens that are identified as "Pascal reserved words";
       (these are specified in a vocabulary file)
   - tokens that contain a dollar sign ($);
   - tokens that are considered as user-declared identifiers;
   - all characters not included above.

Three contexts are identified:
   - in a comment;
   - in a quoted string;
   - not in either a comment nor a quoted string.

Tokens are only identified when they do not occur in a comment nor
a quoted string.

The Pascal Pre-processor is capable of performing the following tasks:

   - each of the token types (reserved symbol, identifier and dollar
     symbol) can be converted to one of the following lexical styles:
           . all letters uppercased;
           . all letters lowercased;
           . no change from current style;
           . the first letter and each first letter following an
             underscore or dollar sign are uppercased, all other
             letters are lowercased.
   - lines which have white noise beyond the last significant
     character of a line are unequivocally truncated to the
     last significant character;
   - lines may be re-formatted as necessary to maximize the use
     of TAB characters to eliminate SPACES where possible;
   - lines which are longer than the working screen-width (either
     80 or 132 characters) are identified;

  Progress of the processing can be watched with Control-W.


The general format of the PP command is

  $ PP pascal_source_filename [qualifiers]


Caveat:  It is desirable that the Pascal source program should have
         previously been compiled without error.

2 Parameter
PP takes a single mandatory parameter which is the file specification of
a Pascal source file.   This  parameter  is  not required when using the
HELP qualifier.

2 Qualifiers
/ALL[=lexical_style]

The ALL qualifier converts all tokens  of  any type to the specified (or
default) lexical style.

/DOLLARS[=lexical_style]

The DOLLARS qualifier converts all  dollar  tokens  to the specified (or
default) lexical style.

/HELP

Use the HELP qualifier on its own to obtain a usage summary.

/IDENTIFIERS[=lexical_style]

The  IDENTIFIERS  qualifier  converts  all   identifier  tokens  to  the
specified (or default) lexical style.

/LOG
 /[NO]LOG

The LOG qualifier enables output messages.

/OUTPUT=filename

The OUTPUT qualifier allows an  output  file  specification to be given.
By default, the output filename is the same as the input filename.

/RESERVED_SYMBOLS[=lexical_style]

The RESERVED_SYMBOLS qualifier converts  all  reserved  symbol tokens to
the specified (or default) lexical style.

/TAB

The TAB qualifier replace spaces with tabs where possible.

/VERSION

The VERSION qualifier displays the current version of PP.

/VOCABULARY=vocab_filename

The VOCABULARY qualifier allows a vocabulary filename to be specified.

/WARNINGS
 /[NO]WARNINGS

The WARNINGS qualifier enables warnings to de displayed.

/WIDE_SCREEN

The WIDE_SCREEN qualifier indicates  that  the  length  of  lines in the
source can be up to 132 characters.

2 Lexical_Style
A number of lexical styles are available:

  First_Chars_Up means that the first character of the token and the
                 first character following either a dollar sign or an
                 underscore are uppercased, all other letters are
                 lowercased.

  Lowercase      means that all characters are lowercased.

  Nochange       means that all characters remain unchanged.

  Uppercase      means that all characters are uppercased.

2 Logical_Name
There is one logical name which  the  System  Manager may define for PP.
It should be defined in the SYSTEM logical name table in EXECUTIVE mode.
Users may define their own logical name to override this if they wish.

3 PP_VOCABULARY
The logical name PP_VOCABULARY is the file specification of a file which
contains the list of words to be  treated as Pascal reserved words.  The
default  value is "SYS_MANAGER:PP_VOCAB.TXT".  (See the example file for
the details of the format of the file).

2 Status_key
The progress of PP can be watched using Control-W.

2 Installation
To install PP:

  1. Re-link PP (NO Traceback) as directed in the build procedure.
  2. Define EXECUTIVE mode SYSTEM table logical name as required (see help).
  3. Define a foreign command: $ PP :== $device:[directory]PP
  4. Pretty Pascal!

2 Author
The author of PP is

    Jonathan Ridler,
    Information Technology Services,
    The University of Melbourne,
    Parkville, Victoria, AUSTRALIA, 3052.

    Email: jonathan@unimelb.edu.au

PP is written entirely in DEC  Pascal  and  has been built and tested on
OpenVMS  VAX v6.2 (DEC Pascal v5.4) and OpenVMS Alpha v6.2 and v7.1 (DEC
Pascal v5.5).

Suggestions, comments, criticisms, bug reports, bug fixes ... all welcome.

2 Version
The current version of PP is v3.0 (13-Aug-1998).
