[net.followup] Pascal pretty-printer summary

rwu (02/25/83)

Here, at long last, is a somewhat condensed compendium of the replies I 
received to my request for Pascal pretty-printer program information. Please
accept my apologies for taking so long to send this back out.

**************************************************************************

>From rabbit!ark Sun Oct 31 17:07:40 1982 remote from harpo
Berkeley unix comes with a Pascal prettyprinter called pxp.
It's written i C.

>From harpo!npoiv!npois!houxm!houxi!houxz!hou5d!hou5a!hou5e!jrh Sun Oct 31 13:00:15 1982 remote from zeppo
The Pascal User's Group (PUG) published the source of a Pascal "pretty printer"
in it's newsletter. Unfortunately my copy is in the U.K. so I can't
give you an exact reference. Also, Henry a formatter - again in standard Pascal - which I got up and working, again
back in the U.K.. Both these programs are explicitly "public", I believe,
so if you can track them down you ought to have no problems using them.
Each could be tuned (read `hacked') to your own idea of "good" style.

Hoping this helps you,
			John Hutchinson
			Bell Labs HO.
			houxi!hou5e!jrh
			HO 5235


>From uucp Mon Nov  1 13:38:12 1982
>From uucp Mon Nov  1 13:36:09 1982 remote from whlmos
>From uucp Mon Nov  1 13:33 EST 1982 remote from whuxlb
>From cdash Mon Nov  1 10:56:08 1982 remote from druxv
FROM: c.m.shub
TO: whuxlb!rwu
DATE: 11/1/82, 10:55 AM
SUBJECT: pascal formatter
there is a reasonably nice one running under TOPS 20 called pform
used it at the last place i was
...druxv!cdash {charlie shub}


>From harpo!decvax!cwruecmp!ccc Mon Nov  1 12:32:36 1982 remote from zeppo
Date: Mon Nov  1 11:08:51 1982
To: decvax!harpo!zeppo!whuxlb!rwu

For a pascal prettyprinter, try "Programming Proverbs for Pascal". It has
one as an example of a large program.

				Clayton Elwell
				{usenet}!decvax!cwruecmp!ccc


>From pur-ee!iuvax!dcm Wed Nov  3 19:26:53 1982 remote from harpo
To: pur-ee!harpo!rwu
Subject: pascal reformatter

We have a locally written one (in Pascal) that runs on a CDC and DEC-10
and would take very little to put on Unix.  It's nice.
David Menges, decvax!pur-ee!iuvax!dcm, Indiana U CS, (812) 335-0920.


>From harpo!decvax!utzoo!utcsrgv!utcsstat!ian Sat Nov  6 00:31:48 1982 remote from zeppo
Date: Fri Nov  5 17:28:27 1982
To: utcsrgv!utzoo!decvax!harpo!zeppo!whuxlb!rwu
I have a pascal formatter and will send you the source via uucp
later today or shortly thereafter.
It's the one from the Ledgard book `Pascal With Style', a book
which played to mixed reviews. We typed it in and have Ledgard'
blessing to pass it on.

Ian Darwin, 
Univ of Toronto Computing Services.

P.S. If you get > 2 subsequent requests RSVP and I'll post it
to net.sources.
It's on another machine else I'd send it right now.
Ian


>From harpo!npoiv!pyuxbb!u1100s!rick Tue Nov  2 10:26:56 1982 remote from zeppo
I have a (couple of) such programs (Pascal Pretty-printers) if you are interested still.
They are not large (a thousand lines of Pascal or so).  They are adaptations
of some stuff that appeared in the Pascal Users Group News a while ago.
Let me know if you are interested.  I have a bunch of other Pascal based
utilities in the same archive.  If you are interested, I'll dig it out
and send you the documentation for them.
Have you contacted the Software Tools User's group.  They have a version
of their package written in pascal, which provides a unix like environment
(unix is a TM of BTL...) in a *portable* way. (All you provide are a few dozen
primitives that adapt their stuff to your local operating system.)

		Rick Thomas
		PY 2 A 304
		(201) 981-7802 (9:00AM-5:00PM)

>From harpo!floyd!cmcl2!philabs!sdcsvax!noscvax!dennis Sat Nov 20 08:09:51 1982 remote from zeppo
Date: Sat Nov 20 06:14:23 1982
To: sdcsvax!philabs!cmcl2!floyd!harpo!zeppo!whuxlb!rwu
Subject: Re:  Pascal program formatter?

  Ron,

    We have developed a Pascal source code formatter here at the Naval
    Ocean Systems Center.  The program is very flexible with a number
    of options to give the user control of the style of the output.  It
    looks for a syntactically correct program.  If there is a syntax
    error, further processing stops and the input is copied verbatim to
    the output.  This has the disadvantage that you must be careful of
    syntax when initially entering your code.  However, we think this
    is more than made up in detecting hard-to-find block structuring
    mixups by looking at the output indentation.  Formatting commands
    can be put in the code in a specially recognized comment, ar
    provided on the calling line of the program.

    The program, called Pasmat, is in Pascal.  We have the program
    running on a VAX 4.1bsd, using Berkeley Pascal.  It originally ran
    on a Univac 1100, and has also run with the Berkeley interpreter on
    an 11/70 with PWB.  In fact, someone has reportedly ported it to
    format Pascal/MT+ code for a Z80 on CP/M.  There are some things in
    the code specific to our flavor of Pascal-1100 for the Univac, and
    Concurrent Pascal, but they are relatively isolated and easy to
    change to the syntax of your particular compiler.

    The source is about 80 Kbytes and I am reluctant to launch it through
    this network.  If you are interested or need more information, let
    me know through one of the addresses below.  Although more
    complicated than some formatters I have seen, I think this gives
    you more control over the output format and is more clever about
    comments (although I have noticed that clever isn't always an
    improvement.)

				USMail	Dennis Cottel
					Code 632
					Naval Ocean Systems Center
					San Diego, CA  92152
				Phone	(619) 225-2504

				ARPA	dennis@nosc-cc
				uucp	...sdcsvax!noscvax