Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!news.sprintlink.net!pipex!uunet!EU.net!ub4b!sunbim!usenet
From: ddw2@jacobi.sunbim.be (Dominique de Waleffe)
Subject: Re: Pretty printing prolog?
Message-ID: <DDW2.94Nov25165059@jacobi.sunbim.be>
In-reply-to: hbcsc112@huey.csun.edu's message of 21 Nov 1994 21:46:45 GMT
Sender: usenet@sunbim.be (user news)
Organization: BIM sa/nv, Everberg, Belgium
References: <3ar4g5$fv3@nic-nac.CSU.net>
Date: Fri, 25 Nov 94 15:51:00 GMT
Lines: 40

  >>> "Yuan-chi" == Yuan-chi (Bill) Chiu <hbcsc112@huey.csun.edu> writes:
In article <3ar4g5$fv3@nic-nac.CSU.net> hbcsc112@huey.csun.edu (Yuan-chi (Bill) Chiu) writes:


Yuan-chi> Hello Comp.Lang.Prolog people:

Yuan-chi> I don't think there are any programs to add comments to
Yuan-chi> prolog source code.  But the next best thing -- a
Yuan-chi> postscript pretty print program.

You could have a look at literate programming tools and see what they
can do for you. I'd suggest nuweb. Check the
comp.programming.literate newsgroup and its FAQ for pointers. Also
look at the URL:

http://info.desy.de/user/projects/LitProg.html


Yuan-chi> I have only Grind series pretty printer.  But neither
Yuan-chi> PsGrind or TGrind give me high-lighted predicate name on
Yuan-chi> the right edge of the page for each predicate declaration
Yuan-chi> blocks.  I know this can't be done with Grind because of
Yuan-chi> its limited parsing abilities.

I used to have the following in my vgrindefs file. I seem to remember
it worked quite well even if it failed sometimes.

# for ProLog by BIM in compatibility mode
PRO|pro:\
        :pb=^\d?\p\d?\a?\:-:\
        :cb=%:ce=$:ab=/*:ae=*/:sb=":se=\e":lb=':le=\e':

Dominique
--
Dominique de Waleffe            ddw@sunbim.be
BIM sa
Chaussee de Louvain, 510	Tel: +32 2 719 26 14
B-1930 Zaventem			Fax: +32 2 725 47 83
Belgium				PGP-Public-Key available on request

