Merge: jwrapper accepts Jar archives
authorJean Privat <jean@pryen.org>
Tue, 21 Jul 2015 20:42:03 +0000 (16:42 -0400)
committerJean Privat <jean@pryen.org>
Tue, 21 Jul 2015 20:42:03 +0000 (16:42 -0400)
This PR modifies jwrapper to accept Jar archives and fix a bunch of bugs/limitations. This is probably the first of 2 PRs on jwrapper. This one targets the frontend to accept any Java classes (tested on over 25k classes) and to mass produce wrappers. It also ensures that both the generated nit code and jwrapper itself is debuggable.

Although the mass generated Nit code is syntactically valid, more work is needed so it can be usable. We will need to somehow apply Java namespace in generated Nit code, and revamp how new wrappers interact with older/custom wrappers. There is also a few missing features, such as copying the class hierarchy to Nit.

With this PR, jwrapper successfully parses 4 large Jar achives:
* OpenJDK 7 standard library `rt.jar` with 18568 classes.
* OpenJDK 7 tools `tools.jar` with 4144 classes.
* Android lib `android.jar` with 2767 classes.
* SableCC `sablecc-3-beta.3.altgen.20041114/lib/sablecc.jar` with 495 classes.

Pull-Request: #1578
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>


Trivial merge