Newsgroups: comp.sys.transputer
From: andyr@wizzy.com (Andy Rabagliati)
Subject: pretty printing occam
Organization: W.Z.I.
Date: Sat, 19 Mar 1994 09:41:31 GMT
Message-ID: <CMwo98.FsI@wizzy.com>

A little while back, I asked for occam pretty-printers.

I used a couple of replies I got.

By choice, I use vgrind, because it does such a great job of comments
and keywords, and runs under UNIX.

The vgrind definition follows. I added some other keywords. I cannot get
vgrind to follow PROCs and FUNCTION definitions in the top right corner
though. Carelessness means that I lost Heiko Doerr's Email address, my
apologies.

# Extension for occam 2  29.1.91, Heiko Doerr
# Additions, Andy Rabagliati <andyr@wizzy.com>
occam|Occam|o:\
    :pb=(PROC|FUNCTION)\d\p\d?\(:\
    :sb=":se=":lb=':le=':\
    :bb=--{{{:be=--}}}\
    :id=.:\
    :cb=--:ce=$:\
    :kw=SKIP STOP AFTER SEQ PAR IF WHILE ALT CASE ELSE FOR \
    CHAN OF TIMER BOOL BYTE INT INT16 INT32 INT64 REAL32 REAL64 \
    IS VAL PROTOCOL PROC FUNCTION NOT TRUE RESULT VALOF FROM \
    INCLUDE PRAGMA PERMITALIASES SHARED PLACE RETYPES PRI ASSERT \
    AT FALSE PLUS MINUS TIMES PORT:


I also received a PC program, written by C.Kellner and R.Westendorp. It
followed folds. I append the readme below. I shall leave it to them to
place it on an archive as they see fit.

Cheers,      Andy.

 ##########################################################################
 ##                                                                      ##
 ## PRITEE Ver 1.0    written by C.Kellner and R.Westendorp     (C)1993  ##
 ##                                                                      ##
 ##########################################################################
 ##                                                                      ##
 ## PRITEE is a source lister capable of recognizing folded structures   ##
 ## It is set to be used with OCCAM code, but may easily be changed to   ##
 ## any other language.                                                  ##
 ##                                                                      ##
 ## Command Line syntax:                                                 ##
 ## pritee [-option] <sourcefile> <destination> [printer]                ##
 ##        options :                                                     ##
 ##           i : (intelligent) for closed folds only the header         ##
 ##               is printed                                             ##
 ##           tn: replaces tabs with n spaces                            ##
 ##           p : (pure) produces output without fold structure          ##
 ##           wn: width of paper in characters per Line                  ##
 ##           bn: starts printing from line n                            ##
 ##           en: ends printing with line n                              ##
 ##                                                                      ##
 ##        printer : initializes output for specific destination         ##
 ##           FILE : no initial sequence                                 ##
 ##           nl10 : STAR nl10                                           ##
 ##           hplj3: Hewlett Packard Laserjet III                        ##
 ##           wp51 : WordPerfect 5.1                                     ##
 ##                                                                      ##
 ##        DEFAULTS: no replacing of tabs                                ##
 ##                  print also fold structure                           ##
 ##                  no wrapping at end of Line                          ##
 ##                  print also closed folds                             ##
 ##                  no width limitations                                ##
 ##                  output to file                                      ##
 ##                  whole file listed                                   ##
 ##                                                                      ##
 ##        EXAMPLE :  pritee -t2 -w90 -b20 -e30 myfile.occ lpt1 hplj3    ##
 ##          prints lines 20 to 30 of myfile.occ to Laserjet III at lpt1 ##
 ##          replacing tabs by 2 spaces and wraps a Line after           ##
 ##          90 characters                                               ##
 ##                                                                      ##
 ##########################################################################


 NOTES:

 - This program was compiled with TURBO PASCAL 5.0

 - PRITEE V1.0 is freeware and may be freely distributed, provided the 
   original authors are mentioned in sourcecode

 - Please send bug reports, fixes, improvements or any suggestions to:

            kellner@emt.e-technik.tu-muenchen.de 
                            or
             west@emt.e-technik.tu-muenchen.de  

