chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] pretty-printer for CPS code needed


From: felix winkelmann
Subject: Re: [Chicken-users] pretty-printer for CPS code needed
Date: Tue, 29 May 2007 09:39:39 +0200

On 5/29/07, Ivan Raikov <address@hidden> wrote:
Hi Felix,

   Have you read the paper _Strictly Pretty_ by Christian Lindig?  A
while ago, I used the algorithm it describes to solve a similar
problem. Well, it took some effort to get my pretty printer to work as
I wanted it, but I did manage to get it break the lines in a readable
manner. The paper is here:

http://www.st.cs.uni-sb.de/~lindig/papers/pretty/strictly-pretty.pdf

Thanks for the link - I'll check this out.


   I also ported the Standard ML code in the paper to Scheme, with the
intention of packaging it as an egg, but never got around to it. So
here is my (very untested) Scheme implementation, maybe you will find
it helpful. Since it is a direct port from SML, it relies on the
datatype egg and pattern matching, but it shouldn't be too much work
to rewrite the code to not use datatypes.

Well, I need something that prints s-expressions in the usual Scheme
representation (only with a different formatting the reduces the width
of the output). Apart from that the code works quite well.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]