[antlr-interest] Code beautifier-indentation

Andy Tripp atripp at comcast.net
Fri Mar 18 12:26:21 PST 2005


See my JavaEmitter code:
http://jazillian.com/antlr/emitter.html
And in particular, the IndentingPrintStream class for an example of
pretty-printing code.

 > I am trying out with the help of treewalk.g ,but getting stuck.

I know the feeling :(
I was also quite confused by the treewalker approach, so my approach
does not use ANTLR treewalking, it just walks the AST "by hand".

Andy



More information about the antlr-interest mailing list