[antlr-interest] Re: Antlr grammar to parse Java classfile?
a_rueckert at gmx.net
Wed Dec 19 05:36:29 PST 2001
Just wanted to let you know, that the Antlr grammar has just succesfully parsed
a HelloWorld classfile. If anyone is interested to take a look, let me know.
But I have to warn you. There no reasonable AST construction yet, it's not very
readable due to lots of System.out statements for debugging purposes (that I
won't remove yet, because there's still some debugging to do) and I have no
clue, if it'll work with more complex class files. I've just started the
treeparser and still have to figure to do major tree transformations in the
parser grammar, so I'll get links to the *info structures in the AST instead of
the indexes in the constant pool (if you never studied the classfile format,
you won't know what the cp is. Don't bother. You don't have to know to be a
great Java developer).
I guess the performance is also way too bad to be usable at all. But I've used
the most simple construction to do the job for now. I can think of lots of
tuning options, that I might add, when the thing is actually working.
PS: Yiiippiiieee!!! :-)
PS2: I've just realized, that looking at a classfile with khexedit is enough
for me to read most of the info. I guess, if I'd add bytecode reverse
engineering to the grammar, I could execute the file in my mind with no running
JVM at all. ;-)
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest