Article View: comp.lang.prolog
Article #306Prolog Pretty-Printer
From: Randy Stiles
Date: Tue, 05 Sep 1989 18:51
Date: Tue, 05 Sep 1989 18:51
25 lines
1521 bytes
1521 bytes
In the C programming world, there exist many utilities to
beautify, or pretty-print source code, keeping comments and such
intact, but correctly indenting code blocks and generally making the
code much easier to read.
I have yet to find such a utility for Prolog (Quintus Prolog
preferably), and I want one. Most Prolog environments have a clause
with which you can get a listing of any of your defined predicates,
without any comments. This is not helpful. It does not address a
source file as a whole, nor does it keep comments.
So I am posting a request for information about any existing
pretty-printing utilities before I go off and write my own. It would
seem that such a thing should exist. Prolog's forte is the handling
of languages, via Definite Clause Grammars (DCG's), and parsing a file
of Prolog clauses to identify the components (for proper indentation)
is a plausible task. I just think someone has to have done it
already.
Thanks in advance for any replies I may receive.
-====---====-
-=--=---=----
-====---====-
-=-=-------=-
Technical Details
Message-ID:
<700@laic.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!husc6!brutus.cs.uiuc.edu!apple!bridge2!csi!nsc!voder!pyramid!leadsv!laic!aurora!stilesShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!husc6!brutus.cs.uiuc.edu!apple!bridge2!csi!nsc!voder!pyramid!leadsv!laic!aurora!stiles From: stiles@aurora.laic.uucp (Randy Stiles) Newsgroups: comp.lang.prolog Subject: Prolog Pretty-Printer Keywords: DCG, pretty-printer Message-ID: <700@laic.UUCP> Date: 5 Sep 89 18:51:57 GMT Sender: news@laic.UUCP Lines: 25