Haskell parser and pretty printer for the java language. It can parse java up until java 9. Based on language-java, for which we are thankful, this project is expected to diverge (until now: record syntax and new AST representation, fixed some significant bugs, reorganization of the modules, lenses, java 9 support) while we add new features that are needed for java-usage-finder.
How to use
Simple compilation unit parser:
parseCompilationUnit "import java.util.*; public class MyClass {}"
or from a file:
ast <- parseCompilationUnit `fmap` readFile "myClass.java"