[antlr-interest] Antlr grammar to parse Java classfile?

Robert renyedi at yahoo.com
Tue Dec 4 02:49:19 PST 2001


Greetings!

First of all, I don't know about the existence of such a (n ANTLR) grammar.

I know pretty much the java .class file format. As it is straighforward, I
have built a package that reads and writes this file format.

Based on that experience, I think the main problem of building such a
grammar would be to apply a certain rule a specific number of times (for
instance you read the number of methods the class file holds and based on
this number, you iterate to read every method). This is the main
characteristic of the .class format (as well as of many binary file format).

I know that predicates are one of the features ANTLR has. I think this could
be the only salvation... However, if you manage to find an existing grammar,
please let me know.

Robert

PS.: You may find the exact description of the .class format in the Java
Virtual Machine Specification.

----- Original Message -----
From: "Andreas Rueckert" <a_rueckert at gmx.net>
To: <antlr-interest at yahoogroups.com>
Sent: Tuesday, December 04, 2001 11:31 AM
Subject: [antlr-interest] Antlr grammar to parse Java classfile?


> Hi!
>
> 1st of all, I'd like to thank you for your great work. We use Antlr to
generate
> the parser for Java reverse enginering in the ArgoUML project (
> http://www.argouml.org ), and it works great.
> Now, I'm interested in RE compiled Java code, and was looking for a Antlr
> grammar to parse Java classfiles. So far, I couldn't find anything in the
> resources section of the Antlr site and in my mailing list archive.
> Is such a grammar available? If not, is there a good reason, why one
couldn't
> write such a grammar?
>
> TIA,
> Andreas
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list