is there any way to autoformat the codes I've written inside ANTLRWorks IDE?
No, there is no such option in ANTLRWorks.