Re: spaghetti-code indent program

From: Mark Roberts (mu@manumark.de)
Date: Mon Jul 10 2000 - 20:35:31 CEST


Dear Alfi,

> (** Sometimes I think about a spaghetti-code indent program for scripts. It
> would add indents, or remove them, all according to some universal formula.
> Maybe something like this already exists somewhere. Maybe we're better off
> without it.)

There has been an 'indent' for C-programs for decades, and there's a
GNU-version of it, of course. But even the GNU-version is only useful
for C.

It could proove fairly easy to create an indent-program for scripts, using
lex and yacc to create a scanner and simple parser. The parser would only
have to recognise a few things, like 'if', 'while' and function calls.

And if it's so easy, probably someone's done it.

Are you sure you need it, anyway?

Happy Monday from Göttingen, Niedersachsen, Germany.

---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk



This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:15 CET