Board index » delphi » Sourcecode Reformatter

Sourcecode Reformatter

Hi, -

I'm looking for a sourcecode reformatter for Pascal ( pretty printer ?
), preferably a freeware reformatter with the sourcecodes available.

any Ideas ?

 

Re:Sourcecode Reformatter


Hi,

Quote
Hans-Georg Thien wrote:
> I'm looking for a sourcecode reformatter for Pascal ( pretty printer ?
> ), preferably a freeware reformatter with the sourcecodes available.

Free Pascal includes ptop (which may not compile under TP). See
<http://www.freepascal.org/tools/ptop.html>.

 - Sebastian

--
Add "NOSPAM" to my email to send me junk!

Re:Sourcecode Reformatter


JRS:  In article <39295982.80535...@concept-software.de> of Mon, 22 May
2000 18:00:02 seen in news:comp.lang.pascal.borland, Hans-Georg Thien

Quote
<th...@concept-software.de> wrote:
>I'm looking for a sourcecode reformatter for Pascal ( pretty printer ?
>), preferably a freeware reformatter with the sourcecodes available.

>any Ideas ?

clean-tp -  PAS, EXE in <URL: http://www.merlyn.demon.co.uk/programs/>

It expects lower-case reserved words, and ONLY alters the indentation.
For samples of its output, see any *.pas in that directory, other than
vastcalc and bwugraph (those are D3 GUI programs, and clean-tp is for
TP5 TP6 TP7 BP7).

There are others - try Garbo, see TSFAQP #4 - which do more.

--
? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ?
 Web <URL: http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
 PAS, EXE in <URL: http://www.merlyn.demon.co.uk/programs/> - see 00index.txt.
 Do not Mail News to me.    Before a reply, quote with ">" or "> " (SoRFC1036)

Re:Sourcecode Reformatter


Quote
> > I'm looking for a sourcecode reformatter for Pascal ( pretty printer ?
> > ), preferably a freeware reformatter with the sourcecodes available.

> Free Pascal includes ptop (which may not compile under TP). See
> <http://www.freepascal.org/tools/ptop.html>.

That source is based op a TP OOP Pretty Printer source, and is
configurable.

It still compiles under BP, only you have to

- {$define TP in all three sources (ptop,ptopu and getopts)
- Get getopts which is part of the RTL source
- Depending on your TP version add a @ to the
   streamerror:=    streamerrorproc;
        line. It seems that streamerror is a proc var in some, and a    pointer
in other versions???

--

Marco van de Voort (Mar...@stack.nl or ma...@freepascal.org)

Other Threads