[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request for help + Re: java.lang.Class patches
From: |
Prof. Etienne M. Gagnon |
Subject: |
Re: Request for help + Re: java.lang.Class patches |
Date: |
Thu, 03 Apr 2003 13:37:21 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.3) Gecko/20030327 Debian/1.3-4 |
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/