Anthony Green wrote:
On Tue, 2005-08-09 at 15:26 +0100, Gary Benson wrote:
> This morning I needed a classfile parser for a script I've been
> writing, and I remembered that there was one in the ill-fated
> katana. I dug it out, tidied it up a bit, and stuck it here:
>
>
http://inauspicious.org/files/scripts/classfile.py
I've used that same parser code in gcjlib, and I've received a
couple of bug fixes for it, mostly related to parsing Sun javac
generated bytecode.
See
http://gcc.gnu.org/ml/java/2005-08/msg00006.html for instance.
That's the earlier implementation, in Java. I must've hit the same
out-of-order constant pool things as that guy, though, since I jumped
through hoops in the Python implementation to cope with it.
Cheers,
Gary