[antlr-interest] Implementing Java sourcecode formatters. Where to start?

Anatol Pomozov anatol.pomozov at gmail.com
Sat Sep 6 15:39:09 PDT 2008


Hi,

I work in a big Java team that has heterogeneous software environment. I
prefer to use IDEA for development, some other people Eclipse or Emacs. In
our team we try to keep unified style for the source code. But unfortunately
IDE's that we use have different options for code formatting and quite
difficult to find such style that satisfies all IDE's. So a lot of code
reformatting work I do by hands. And I feel that I do dumb work when I
reorder imports/add blank lines between class member definitions etc... I
want that some tool do it for me.

That is why I wan to implement code formatting tool for Java/Javascript.
Actually I tried to find such opensource tool and only I found is Jalopy
which is not developed anymore (last release in 2005).

I want to use ANTLR. Actually I am ANTLR newbie (although I know general
theoretical part of lexers/parsers) and not sure that it is the best tool
for implementing code transformers.

So what I ask here is advise. Is it ok to use ANTLR for code formatters?
Where to start? Do you have any good example for such kind of tasks? Any
advice would be helpful.

Thanks.

-- 
anatol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080906/05e768c2/attachment.html 


More information about the antlr-interest mailing list