lua-users home
lua-l archive

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

On 19/09/2010 19:38, Alexander Gladysh wrote:
I'm looking for a robust Lua code (not data!) pretty-printer. Do you know one?

It might not be what you look for (ie. an out of the box working solution) but for the record, a solution able to correctly parse Lua source code to a syntax tree, then output back Lua code out of this tree is probably a step toward a working solution. I see that Lua Fish <> is able to do that although I don't know what is the quality (raw or pretty-printed) of the output code. The Lpeg Recipes <> page provides other Lpeg-based parsers, and the Lua Grammar <> page gives yet other alternatives. It might be a good starting point for the courageous people with enough free time (and motivation) to do such pretty printer.

Philippe Lhoste
--  (near) Paris -- France
--  --  --  --  --  --  --  --  --  --  --  --  --  --