Brian Jones wrote:
I was looking into using Jalopy at one point but the 1.0 version I
think didn't do proper double indentation for curly's on if/while/for,
etc.  Suggestions for something that actually matches our "GNU" style
would be appreciated.

In fact, if you have a pretty good idea of what you want, I could develop a code indenter using my SableCC framework. As Java does have a regular syntax (no preprocessor which allows for random syntax), it would be a relatively easy thing to do.


But, if there already is a free program that works well, I would go for it.

In the SableVM CVS tree, I pass all the Classpath code through:

find | grep \\.java$ | xargs astyle -jbs2
find | grep \\.java$ | awk '{print "mv " $1 " " $1 ".bak ; cat -s " $1 ".bak > " $1 " ; rm " $1 ".bak"}' | sh
find | grep \\.orig$ | xargs rm


All of these programs are Free and available in the "main" Debian distribution.

But, "astyle" only indents lines and curly breaces, it does not pretty-print the use of parentheses, etc. A SableCC derived code indenter could do a comprehensive job, as it would be based on the syntax tree of the analyzed class.

Etienne

--
Etienne M. Gagnon, Ph.D.             http://www.info.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to