[erlang-questions] where is the best erlang pretty printer

Vlad Dumitrescu <>
Wed May 25 11:29:17 CEST 2011


Hi,

On Wed, May 25, 2011 at 11:15, Joe Armstrong <> wrote:

> I need to identify the best possible erlang pretty printer.
>
> Are there several, or unpublished variants in existence?
>
> I want exact reproduction of inputted constants
> it $a should be pretty printed as $a and NOT 97.
>

Things like [$a, $b | "cde"] should be preserved, too.

This is not only a pretty-printer problem. One can't take the existing
abstract syntax tree and recreate the exact input, but special lexer and
parser are needed that preserve the needed information.

A problem with automatic formatting is also that there are situations where
the rules one generally uses are resulting in an ugly layout and one has to
make an exception or accept the ugliness. I know people that would never do
the latter.

/Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110525/cac959f8/attachment.html>


More information about the erlang-questions mailing list