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)
commit5445a40ac91b8d4d3f0430a09163fa644bae9c8f
treeb80b175a5724fdc05c7dd286c92e7270f6bc7f91
parent1eeffca95fcd4f563ea027a794af7af71bd38aa9
parent6c12704965fde920981f88a719e326bc2df3cb78
Merge: jwrapper accepts Jar archives

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>